@dialpad/dialtone 9.2.0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/css/dialtone.css +2 -2
  2. package/dist/eslint-plugin/rules/custom-implementation.js +1 -1
  3. package/dist/eslint-plugin/rules/deprecated-component.js +5 -5
  4. package/dist/eslint-plugin/rules/deprecated-directive.js +1 -1
  5. package/dist/eslint-plugin/rules/deprecated-icons.js +1 -1
  6. package/dist/icons/icons.json +1 -1
  7. package/dist/icons/keywords.json +1 -1
  8. package/dist/icons/svg/unread.svg +1 -0
  9. package/dist/icons/svg/user-rematch.svg +1 -0
  10. package/dist/tokens/android/java/tokens-dark.kt +1 -1
  11. package/dist/tokens/android/java/tokens-light.kt +1 -1
  12. package/dist/tokens/android/res/values/colors-dark.xml +1 -1
  13. package/dist/tokens/android/res/values/colors-light.xml +1 -1
  14. package/dist/tokens/android/res/values/dimens.xml +1 -1
  15. package/dist/tokens/css/variables-dark.css +1 -1
  16. package/dist/tokens/css/variables-light.css +1 -1
  17. package/dist/tokens/ios/tokens-dark.swift +1 -1
  18. package/dist/tokens/ios/tokens-light.swift +1 -1
  19. package/dist/tokens/less/variables-dark.less +1 -1
  20. package/dist/tokens/less/variables-light.less +1 -1
  21. package/dist/vue2/component-documentation.json +1 -1
  22. package/dist/vue2/dialtone-vue.cjs +5 -6
  23. package/dist/vue2/dialtone-vue.js +1757 -3809
  24. package/dist/vue2/directives.cjs +1 -1
  25. package/dist/vue2/directives.js +1 -1
  26. package/dist/vue2/emoji-BMxSCSLg.js +56039 -0
  27. package/dist/vue2/emoji-ZkNhBVKW.cjs +1 -0
  28. package/dist/vue2/emoji.cjs +1 -1
  29. package/dist/vue2/emoji.js +29 -27
  30. package/dist/vue2/emoji_picker-Qces1MZK.cjs +1 -0
  31. package/dist/vue2/emoji_picker-sjGJ0HVH.js +83604 -0
  32. package/dist/vue2/emoji_text_wrapper-Tni6PAOS.cjs +1 -0
  33. package/dist/vue2/emoji_text_wrapper-uHcCrlwz.js +91 -0
  34. package/dist/vue2/message_input.cjs +92 -0
  35. package/dist/vue2/message_input.js +13530 -0
  36. package/dist/vue2/stack-153kJjKj.cjs +2 -0
  37. package/dist/vue2/stack-DRdhbSNl.js +2336 -0
  38. package/dist/vue2/style.css +1 -1
  39. package/dist/vue2/{tooltip-_ykHbRFm.js → tooltip-PDBwUvGD.js} +17 -14
  40. package/dist/vue2/{tooltip-N61DaooE.cjs → tooltip-RmgCyjmY.cjs} +6 -6
  41. package/dist/vue2/types/common/dates.d.ts +1 -1
  42. package/dist/vue2/types/common/storybook_utils.d.ts +1 -1
  43. package/dist/vue2/types/common/storybook_utils.d.ts.map +1 -1
  44. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +2 -2
  45. package/dist/vue2/types/components/badge/badge.vue.d.ts +8 -10
  46. package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
  47. package/dist/vue2/types/components/checkbox/checkbox.vue.d.ts +7 -7
  48. package/dist/vue2/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  49. package/dist/vue2/types/components/checkbox_group/checkbox_group.vue.d.ts +1 -3
  50. package/dist/vue2/types/components/checkbox_group/checkbox_group.vue.d.ts.map +1 -1
  51. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +7 -10
  52. package/dist/vue2/types/components/combobox/combobox.vue.d.ts.map +1 -1
  53. package/dist/vue2/types/components/emoji/emoji.vue.d.ts +2 -2
  54. package/dist/vue2/types/components/input_group/input_group.vue.d.ts +4 -9
  55. package/dist/vue2/types/components/input_group/input_group.vue.d.ts.map +1 -1
  56. package/dist/vue2/types/components/popover/popover.vue.d.ts +1 -4
  57. package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
  58. package/dist/vue2/types/components/radio/radio.vue.d.ts +12 -2
  59. package/dist/vue2/types/components/radio/radio.vue.d.ts.map +1 -1
  60. package/dist/vue2/types/components/radio_group/radio_group.vue.d.ts +6 -1
  61. package/dist/vue2/types/components/radio_group/radio_group.vue.d.ts.map +1 -1
  62. package/dist/vue2/types/components/toast/toast.vue.d.ts +1 -4
  63. package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
  64. package/dist/vue2/types/index.d.ts +1 -1
  65. package/dist/vue2/types/message_input.d.ts +3 -0
  66. package/dist/vue2/types/message_input.d.ts.map +1 -0
  67. package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +6 -6
  68. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +4 -4
  69. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +80 -0
  70. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -0
  71. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel_constants.d.ts +6 -0
  72. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel_constants.d.ts.map +1 -0
  73. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/index.d.ts +2 -0
  74. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/index.d.ts.map +1 -0
  75. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +47 -0
  76. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -0
  77. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +30 -0
  78. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts.map +1 -0
  79. package/dist/vue2/types/recipes/conversation_view/message_input/index.d.ts +2 -0
  80. package/dist/vue2/types/recipes/conversation_view/message_input/index.d.ts.map +1 -0
  81. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +354 -0
  82. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -0
  83. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_constants.d.ts +6 -0
  84. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_constants.d.ts.map +1 -0
  85. package/dist/vue3/component-documentation.json +1 -1
  86. package/dist/vue3/dialtone-vue.cjs +1 -1
  87. package/dist/vue3/dialtone-vue.js +12 -12
  88. package/dist/vue3/emoji-AfK6oyUP.cjs +1 -0
  89. package/dist/vue3/{emoji-1yDNLQQx.js → emoji-w7mkBLzY.js} +5115 -5059
  90. package/dist/vue3/emoji.cjs +1 -1
  91. package/dist/vue3/emoji.js +3 -3
  92. package/dist/vue3/{emoji_picker-sjmzGlSc.cjs → emoji_picker-4xiNkfJF.cjs} +1 -1
  93. package/dist/vue3/{emoji_picker-DCzVDeyC.js → emoji_picker-nLVt8cFZ.js} +1 -1
  94. package/dist/vue3/{emoji_text_wrapper-dcKiFm0_.cjs → emoji_text_wrapper-MBYdbA6A.cjs} +1 -1
  95. package/dist/vue3/{emoji_text_wrapper-N58kVmVI.js → emoji_text_wrapper-mBDw9Xy3.js} +1 -1
  96. package/dist/vue3/message_input.cjs +10 -10
  97. package/dist/vue3/message_input.js +162 -143
  98. package/dist/vue3/{stack-l0ciejd8.js → stack-FdfddyeK.js} +4 -2
  99. package/dist/vue3/{stack-eFs3WCJT.cjs → stack-w8PNJngT.cjs} +2 -2
  100. package/dist/vue3/style.css +1 -1
  101. package/dist/vue3/types/common/dates.d.ts +1 -1
  102. package/dist/vue3/types/components/badge/badge.vue.d.ts +8 -10
  103. package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
  104. package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts +7 -7
  105. package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  106. package/dist/vue3/types/components/checkbox_group/checkbox_group.vue.d.ts +8 -11
  107. package/dist/vue3/types/components/checkbox_group/checkbox_group.vue.d.ts.map +1 -1
  108. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +11 -4
  109. package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
  110. package/dist/vue3/types/components/emoji/emoji.vue.d.ts +2 -2
  111. package/dist/vue3/types/components/input_group/input_group.vue.d.ts +1 -3
  112. package/dist/vue3/types/components/input_group/input_group.vue.d.ts.map +1 -1
  113. package/dist/vue3/types/components/modal/modal.vue.d.ts +4 -1
  114. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  115. package/dist/vue3/types/components/radio/radio.vue.d.ts +4 -4
  116. package/dist/vue3/types/components/radio/radio.vue.d.ts.map +1 -1
  117. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts.map +1 -1
  118. package/dist/vue3/types/components/toast/toast.vue.d.ts +1 -4
  119. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  120. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +6 -6
  121. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +4 -4
  122. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +7 -2
  123. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  124. package/package.json +1 -1
  125. package/dist/vue2/emoji-Cr1KlTAT.cjs +0 -1
  126. package/dist/vue2/emoji-tPpc6ODh.js +0 -139701
  127. package/dist/vue3/emoji-_XsewxWh.cjs +0 -1
@@ -1,8 +1,8 @@
1
- import { t as sn, _ as Ue, j as Do, l as Ao, D as Io } from "./tooltip-Cr_G7ib3.js";
2
- import { defineComponent as ft, ref as on, onMounted as Vi, onBeforeUnmount as ar, h as Ve, getCurrentInstance as Po, watchEffect as Ro, nextTick as Bo, unref as Fo, Teleport as zo, markRaw as ln, reactive as ji, provide as Nr, customRef as Lo, resolveComponent as j, openBlock as _, createBlock as se, withCtx as V, createVNode as Z, createElementBlock as qt, withDirectives as $i, createElementVNode as Be, Fragment as Vo, renderList as jo, normalizeClass as Hn, withModifiers as Hi, resolveDynamicComponent as $o, vShow as qi, createTextVNode as cr, toDisplayString as it, withKeys as Ho, normalizeStyle as qo, mergeProps as vr, renderSlot as _o, createCommentVNode as Xe, createSlots as Wo } from "vue";
3
- import { D as _i, C as Ko, m as Jo, o as Wi, B as Uo, w as Go, t as Yo } from "./emoji-1yDNLQQx.js";
4
- import { D as Xo, a as Ki, b as Zo, c as Qo, d as el } from "./stack-l0ciejd8.js";
5
- import { _ as tl } from "./emoji_picker-DCzVDeyC.js";
1
+ import { t as sn, _ as Ue, j as vo, l as Ao, D as Io } from "./tooltip-Cr_G7ib3.js";
2
+ import { defineComponent as ft, ref as on, onMounted as Vi, onBeforeUnmount as ar, h as Ve, getCurrentInstance as Po, watchEffect as Ro, nextTick as Bo, unref as Fo, Teleport as zo, markRaw as ln, reactive as ji, provide as Nr, customRef as Lo, resolveComponent as j, openBlock as _, createBlock as se, withCtx as V, createVNode as Z, createElementBlock as qt, withDirectives as $i, createElementVNode as Be, Fragment as Vo, renderList as jo, normalizeClass as Hn, withModifiers as Hi, resolveDynamicComponent as $o, vShow as qi, createTextVNode as cr, toDisplayString as it, withKeys as Ho, normalizeStyle as qo, mergeProps as Dr, renderSlot as _o, createCommentVNode as Xe, createSlots as Wo } from "vue";
3
+ import { D as _i, C as Ko, m as Jo, o as Wi, B as Uo, w as Go, t as Yo } from "./emoji-w7mkBLzY.js";
4
+ import { D as Xo, a as Ki, b as Zo, c as Qo, d as el } from "./stack-FdfddyeK.js";
5
+ import { _ as tl } from "./emoji_picker-nLVt8cFZ.js";
6
6
  function L(n) {
7
7
  this.content = n;
8
8
  }
@@ -1605,14 +1605,14 @@ function al(n) {
1605
1605
  break;
1606
1606
  return e;
1607
1607
  }
1608
- function Dr(n) {
1608
+ function vr(n) {
1609
1609
  /\D/.test(n.next) && n.err("Expected number, got '" + n.next + "'");
1610
1610
  let e = Number(n.next);
1611
1611
  return n.pos++, e;
1612
1612
  }
1613
1613
  function cl(n, e) {
1614
- let t = Dr(n), r = t;
1615
- return n.eat(",") && (n.next != "}" ? r = Dr(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
1614
+ let t = vr(n), r = t;
1615
+ return n.eat(",") && (n.next != "}" ? r = vr(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
1616
1616
  }
1617
1617
  function dl(n, e) {
1618
1618
  let t = n.nodeTypes, r = t[e];
@@ -3461,7 +3461,7 @@ function pt(n) {
3461
3461
  }
3462
3462
  return null;
3463
3463
  }
3464
- function vl(n, e, t) {
3464
+ function Dl(n, e, t) {
3465
3465
  let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
3466
3466
  for (let p = s, m = !1; p > t; p--)
3467
3467
  m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
@@ -3471,13 +3471,13 @@ function vl(n, e, t) {
3471
3471
  n.step(new F(a, c, o, l, new k(d.append(h), u, f), d.size - u, !0));
3472
3472
  }
3473
3473
  function ms(n, e, t = null, r = n) {
3474
- let i = Dl(n, e), s = i && Al(r, e);
3474
+ let i = vl(n, e), s = i && Al(r, e);
3475
3475
  return s ? i.map(Vr).concat({ type: e, attrs: t }).concat(s.map(Vr)) : null;
3476
3476
  }
3477
3477
  function Vr(n) {
3478
3478
  return { type: n, attrs: null };
3479
3479
  }
3480
- function Dl(n, e) {
3480
+ function vl(n, e) {
3481
3481
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
3482
3482
  if (!s)
3483
3483
  return null;
@@ -4105,7 +4105,7 @@ class ws {
4105
4105
  sure the lift is valid.
4106
4106
  */
4107
4107
  lift(e, t) {
4108
- return vl(this, e, t), this;
4108
+ return Dl(this, e, t), this;
4109
4109
  }
4110
4110
  /**
4111
4111
  Join the blocks around the given position. If depth is 2, their
@@ -4794,7 +4794,7 @@ const Gl = [
4794
4794
  }
4795
4795
  })
4796
4796
  ];
4797
- class vn {
4797
+ class Dn {
4798
4798
  constructor(e, t) {
4799
4799
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Gl.slice(), t && t.forEach((r) => {
4800
4800
  if (this.pluginsByKey[r.key])
@@ -4895,7 +4895,7 @@ class nt {
4895
4895
  Create a new state.
4896
4896
  */
4897
4897
  static create(e) {
4898
- let t = new vn(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new nt(t);
4898
+ let t = new Dn(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new nt(t);
4899
4899
  for (let i = 0; i < t.fields.length; i++)
4900
4900
  r[t.fields[i].name] = t.fields[i].init(e, r);
4901
4901
  return r;
@@ -4909,7 +4909,7 @@ class nt {
4909
4909
  configuration object..
4910
4910
  */
4911
4911
  reconfigure(e) {
4912
- let t = new vn(this.schema, e.plugins), r = t.fields, i = new nt(t);
4912
+ let t = new Dn(this.schema, e.plugins), r = t.fields, i = new nt(t);
4913
4913
  for (let s = 0; s < r.length; s++) {
4914
4914
  let o = r[s].name;
4915
4915
  i[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, i);
@@ -4946,7 +4946,7 @@ class nt {
4946
4946
  throw new RangeError("Invalid input for EditorState.fromJSON");
4947
4947
  if (!e.schema)
4948
4948
  throw new RangeError("Required config field 'schema' missing");
4949
- let i = new vn(e.schema, e.plugins), s = new nt(i);
4949
+ let i = new Dn(e.schema, e.plugins), s = new nt(i);
4950
4950
  return i.fields.forEach((o) => {
4951
4951
  if (o.name == "doc")
4952
4952
  s.doc = He.fromJSON(e.schema, t.doc);
@@ -4989,9 +4989,9 @@ class ee {
4989
4989
  return e[this.key];
4990
4990
  }
4991
4991
  }
4992
- const Dn = /* @__PURE__ */ Object.create(null);
4992
+ const vn = /* @__PURE__ */ Object.create(null);
4993
4993
  function Cs(n) {
4994
- return n in Dn ? n + "$" + ++Dn[n] : (Dn[n] = 0, n + "$");
4994
+ return n in vn ? n + "$" + ++vn[n] : (vn[n] = 0, n + "$");
4995
4995
  }
4996
4996
  class re {
4997
4997
  /**
@@ -5246,7 +5246,7 @@ function ua(n, e, t, r) {
5246
5246
  }
5247
5247
  return i > -1 ? i : n.docView.posFromDOM(e, t, -1);
5248
5248
  }
5249
- function vs(n, e, t) {
5249
+ function Ds(n, e, t) {
5250
5250
  let r = n.childNodes.length;
5251
5251
  if (r && t.top < t.bottom)
5252
5252
  for (let i = Math.max(0, Math.min(r - 1, Math.floor(r * (e.top - t.top) / (t.bottom - t.top)) - 2)), s = i; ; ) {
@@ -5256,7 +5256,7 @@ function vs(n, e, t) {
5256
5256
  for (let a = 0; a < l.length; a++) {
5257
5257
  let c = l[a];
5258
5258
  if (pr(e, c))
5259
- return vs(o, e, c);
5259
+ return Ds(o, e, c);
5260
5260
  }
5261
5261
  }
5262
5262
  if ((s = (s + 1) % r) == i)
@@ -5270,7 +5270,7 @@ function ha(n, e) {
5270
5270
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
5271
5271
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
5272
5272
  let c = n.dom.getBoundingClientRect();
5273
- if (!pr(e, c) || (o = vs(n.dom, e, c), !o))
5273
+ if (!pr(e, c) || (o = Ds(n.dom, e, c), !o))
5274
5274
  return null;
5275
5275
  }
5276
5276
  if (U)
@@ -5301,7 +5301,7 @@ function xe(n, e) {
5301
5301
  return Array.prototype.find.call(t, Yr) || n.getBoundingClientRect();
5302
5302
  }
5303
5303
  const fa = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
5304
- function Ds(n, e, t) {
5304
+ function vs(n, e, t) {
5305
5305
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Rt || de;
5306
5306
  if (r.nodeType == 3)
5307
5307
  if (o && (fa.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
@@ -5382,7 +5382,7 @@ function pa(n, e, t) {
5382
5382
  }
5383
5383
  s = l.dom.parentNode;
5384
5384
  }
5385
- let o = Ds(n, i.pos, 1);
5385
+ let o = vs(n, i.pos, 1);
5386
5386
  for (let l = s.firstChild; l; l = l.nextSibling) {
5387
5387
  let a;
5388
5388
  if (l.nodeType == 1)
@@ -6474,7 +6474,7 @@ function Se(n, e = !1) {
6474
6474
  }
6475
6475
  }
6476
6476
  if (n.domObserver.disconnectSelection(), n.cursorWrapper)
6477
- va(n);
6477
+ Da(n);
6478
6478
  else {
6479
6479
  let { anchor: r, head: i } = t, s, o;
6480
6480
  ri && !(t instanceof N) && (t.$from.parent.inlineContent || (s = ii(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = ii(n, t.to))), n.docView.setSelection(r, i, n.root, e), ri && (s && si(s), o && si(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Na(n));
@@ -6510,7 +6510,7 @@ function Na(n) {
6510
6510
  }, 20));
6511
6511
  });
6512
6512
  }
6513
- function va(n) {
6513
+ function Da(n) {
6514
6514
  let e = n.domSelection(), t = document.createRange(), r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
6515
6515
  i ? t.setEnd(r.parentNode, J(r) + 1) : t.setEnd(r, 0), t.collapse(!1), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && Q && Te <= 11 && (r.disabled = !0, r.disabled = !1);
6516
6516
  }
@@ -6540,7 +6540,7 @@ function Vs(n) {
6540
6540
  return !1;
6541
6541
  }
6542
6542
  }
6543
- function Da(n) {
6543
+ function va(n) {
6544
6544
  let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
6545
6545
  return Ke(e.node, e.offset, t.anchorNode, t.anchorOffset);
6546
6546
  }
@@ -7250,12 +7250,12 @@ function sc(n, e) {
7250
7250
  t.parentNode && t.parentNode.removeChild(t), n.focus();
7251
7251
  }, 50);
7252
7252
  }
7253
- const vt = Q && Te < 15 || ut && na < 604;
7253
+ const Dt = Q && Te < 15 || ut && na < 604;
7254
7254
  G.copy = Y.cut = (n, e) => {
7255
7255
  let t = e, r = n.state.selection, i = t.type == "cut";
7256
7256
  if (r.empty)
7257
7257
  return;
7258
- let s = vt ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = $s(n, o);
7258
+ let s = Dt ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = $s(n, o);
7259
7259
  s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : sc(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
7260
7260
  };
7261
7261
  function oc(n) {
@@ -7268,10 +7268,10 @@ function lc(n, e) {
7268
7268
  t || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
7269
7269
  let i = n.input.shiftKey && n.input.lastKeyCode != 45;
7270
7270
  setTimeout(() => {
7271
- n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? Dt(n, r.value, null, i, e) : Dt(n, r.textContent, r.innerHTML, i, e);
7271
+ n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? vt(n, r.value, null, i, e) : vt(n, r.textContent, r.innerHTML, i, e);
7272
7272
  }, 50);
7273
7273
  }
7274
- function Dt(n, e, t, r, i) {
7274
+ function vt(n, e, t, r, i) {
7275
7275
  let s = Hs(n, e, t, r, n.state.selection.$from);
7276
7276
  if (n.someProp("handlePaste", (a) => a(n, i, s || k.empty)))
7277
7277
  return !0;
@@ -7291,8 +7291,8 @@ Y.paste = (n, e) => {
7291
7291
  let t = e;
7292
7292
  if (n.composing && !ae)
7293
7293
  return;
7294
- let r = vt ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
7295
- r && Dt(n, Zs(r), r.getData("text/html"), i, t) ? t.preventDefault() : lc(n, t);
7294
+ let r = Dt ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
7295
+ r && vt(n, Zs(r), r.getData("text/html"), i, t) ? t.preventDefault() : lc(n, t);
7296
7296
  };
7297
7297
  class ac {
7298
7298
  constructor(e, t) {
@@ -7314,7 +7314,7 @@ G.dragstart = (n, e) => {
7314
7314
  }
7315
7315
  }
7316
7316
  let o = n.state.selection.content(), { dom: l, text: a } = $s(n, o);
7317
- t.dataTransfer.clearData(), t.dataTransfer.setData(vt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", vt || t.dataTransfer.setData("text/plain", a), n.dragging = new ac(o, !t[Qs]);
7317
+ t.dataTransfer.clearData(), t.dataTransfer.setData(Dt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Dt || t.dataTransfer.setData("text/plain", a), n.dragging = new ac(o, !t[Qs]);
7318
7318
  };
7319
7319
  G.dragend = (n) => {
7320
7320
  let e = n.dragging;
@@ -7333,7 +7333,7 @@ Y.drop = (n, e) => {
7333
7333
  let s = n.state.doc.resolve(i.pos), o = r && r.slice;
7334
7334
  o ? n.someProp("transformPasted", (p) => {
7335
7335
  o = p(o, n);
7336
- }) : o = Hs(n, Zs(t.dataTransfer), vt ? null : t.dataTransfer.getData("text/html"), !1, s);
7336
+ }) : o = Hs(n, Zs(t.dataTransfer), Dt ? null : t.dataTransfer.getData("text/html"), !1, s);
7337
7337
  let l = !!(r && !t[Qs]);
7338
7338
  if (n.someProp("handleDrop", (p) => p(n, t, o || k.empty, l))) {
7339
7339
  t.preventDefault();
@@ -7410,7 +7410,7 @@ class Qt {
7410
7410
  this.spec.destroy && this.spec.destroy(e);
7411
7411
  }
7412
7412
  }
7413
- class ve {
7413
+ class De {
7414
7414
  constructor(e, t) {
7415
7415
  this.attrs = e, this.spec = t || qe;
7416
7416
  }
@@ -7422,10 +7422,10 @@ class ve {
7422
7422
  return t.from < t.to;
7423
7423
  }
7424
7424
  eq(e) {
7425
- return this == e || e instanceof ve && At(this.attrs, e.attrs) && At(this.spec, e.spec);
7425
+ return this == e || e instanceof De && At(this.attrs, e.attrs) && At(this.spec, e.spec);
7426
7426
  }
7427
7427
  static is(e) {
7428
- return e.type instanceof ve;
7428
+ return e.type instanceof De;
7429
7429
  }
7430
7430
  destroy() {
7431
7431
  }
@@ -7492,7 +7492,7 @@ class ne {
7492
7492
  each inline node between `from` and `to`.
7493
7493
  */
7494
7494
  static inline(e, t, r, i) {
7495
- return new ne(e, t, new ve(r, i));
7495
+ return new ne(e, t, new De(r, i));
7496
7496
  }
7497
7497
  /**
7498
7498
  Creates a node decoration. `from` and `to` should point precisely
@@ -7513,7 +7513,7 @@ class ne {
7513
7513
  @internal
7514
7514
  */
7515
7515
  get inline() {
7516
- return this.type instanceof ve;
7516
+ return this.type instanceof De;
7517
7517
  }
7518
7518
  /**
7519
7519
  @internal
@@ -7647,7 +7647,7 @@ class R {
7647
7647
  let s = e + 1, o = s + t.content.size;
7648
7648
  for (let l = 0; l < this.local.length; l++) {
7649
7649
  let a = this.local[l];
7650
- if (a.from < o && a.to > s && a.type instanceof ve) {
7650
+ if (a.from < o && a.to > s && a.type instanceof De) {
7651
7651
  let c = Math.max(s, a.from) - s, d = Math.min(o, a.to) - s;
7652
7652
  c < d && (i || (i = [])).push(a.copy(c, d));
7653
7653
  }
@@ -7686,11 +7686,11 @@ class R {
7686
7686
  localsInner(e) {
7687
7687
  if (this == q)
7688
7688
  return tt;
7689
- if (e.inlineContent || !this.local.some(ve.is))
7689
+ if (e.inlineContent || !this.local.some(De.is))
7690
7690
  return this.local;
7691
7691
  let t = [];
7692
7692
  for (let r = 0; r < this.local.length; r++)
7693
- this.local[r].type instanceof ve || t.push(this.local[r]);
7693
+ this.local[r].type instanceof De || t.push(this.local[r]);
7694
7694
  return t;
7695
7695
  }
7696
7696
  }
@@ -8156,25 +8156,25 @@ function Sc(n, e, t, r, i) {
8156
8156
  return M(n, Fe(13, "Enter"));
8157
8157
  });
8158
8158
  }, 20));
8159
- let D = p.start, A = p.endA, O, P, v;
8159
+ let v = p.start, A = p.endA, O, P, D;
8160
8160
  if (x) {
8161
8161
  if (m.pos == g.pos)
8162
- Q && Te <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Se(n), 20)), O = n.state.tr.delete(D, A), P = d.resolve(p.start).marksAcross(d.resolve(p.endA));
8162
+ Q && Te <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Se(n), 20)), O = n.state.tr.delete(v, A), P = d.resolve(p.start).marksAcross(d.resolve(p.endA));
8163
8163
  else if (
8164
8164
  // Adding or removing a mark
8165
- p.endA == p.endB && (v = xc(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
8165
+ p.endA == p.endB && (D = xc(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
8166
8166
  )
8167
- O = n.state.tr, v.type == "add" ? O.addMark(D, A, v.mark) : O.removeMark(D, A, v.mark);
8167
+ O = n.state.tr, D.type == "add" ? O.addMark(v, A, D.mark) : O.removeMark(v, A, D.mark);
8168
8168
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
8169
8169
  let M = m.parent.textBetween(m.parentOffset, g.parentOffset);
8170
- if (n.someProp("handleTextInput", (X) => X(n, D, A, M)))
8170
+ if (n.someProp("handleTextInput", (X) => X(n, v, A, M)))
8171
8171
  return;
8172
- O = n.state.tr.insertText(M, D, A);
8172
+ O = n.state.tr.insertText(M, v, A);
8173
8173
  }
8174
8174
  }
8175
- if (O || (O = n.state.tr.replace(D, A, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
8175
+ if (O || (O = n.state.tr.replace(v, A, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
8176
8176
  let M = bi(n, O.doc, c.sel);
8177
- M && !(W && ae && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == D || M.head == O.mapping.map(A) - 1) || Q && M.empty && M.head == D) && O.setSelection(M);
8177
+ M && !(W && ae && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == v || M.head == O.mapping.map(A) - 1) || Q && M.empty && M.head == v) && O.setSelection(M);
8178
8178
  }
8179
8179
  P && O.ensureMarks(P), s && O.setMeta("composition", s), n.dispatch(O.scrollIntoView());
8180
8180
  }
@@ -8320,7 +8320,7 @@ class Cc {
8320
8320
  let f = W ? this.trackWrites = this.domSelectionRange().focusNode : null;
8321
8321
  (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = ti(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
8322
8322
  }
8323
- h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Da(this)) ? Se(this, h) : (Ls(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
8323
+ h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && va(this)) ? Se(this, h) : (Ls(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
8324
8324
  }
8325
8325
  this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && oa(u);
8326
8326
  }
@@ -8443,7 +8443,7 @@ class Cc {
8443
8443
  otherwise the element after.
8444
8444
  */
8445
8445
  coordsAtPos(e, t = 1) {
8446
- return Ds(this, e, t);
8446
+ return vs(this, e, t);
8447
8447
  }
8448
8448
  /**
8449
8449
  Find the DOM position that corresponds to the given document
@@ -8505,13 +8505,13 @@ class Cc {
8505
8505
  [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
8506
8506
  */
8507
8507
  pasteHTML(e, t) {
8508
- return Dt(this, "", e, !1, t || new ClipboardEvent("paste"));
8508
+ return vt(this, "", e, !1, t || new ClipboardEvent("paste"));
8509
8509
  }
8510
8510
  /**
8511
8511
  Run the editor's paste logic with the given plain-text input.
8512
8512
  */
8513
8513
  pasteText(e, t) {
8514
- return Dt(this, e, null, !0, t || new ClipboardEvent("paste"));
8514
+ return vt(this, e, null, !0, t || new ClipboardEvent("paste"));
8515
8515
  }
8516
8516
  /**
8517
8517
  Removes the editor from the DOM and destroys all [node
@@ -8605,7 +8605,7 @@ function Mi(n) {
8605
8605
  if (n.spec.state || n.spec.filterTransaction || n.spec.appendTransaction)
8606
8606
  throw new RangeError("Plugins passed directly to the view must not have a state component");
8607
8607
  }
8608
- var De = {
8608
+ var ve = {
8609
8609
  8: "Backspace",
8610
8610
  9: "Tab",
8611
8611
  10: "Enter",
@@ -8685,18 +8685,18 @@ var De = {
8685
8685
  222: '"'
8686
8686
  }, Tc = typeof navigator < "u" && /Mac/.test(navigator.platform), Nc = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
8687
8687
  for (var H = 0; H < 10; H++)
8688
- De[48 + H] = De[96 + H] = String(H);
8688
+ ve[48 + H] = ve[96 + H] = String(H);
8689
8689
  for (var H = 1; H <= 24; H++)
8690
- De[H + 111] = "F" + H;
8690
+ ve[H + 111] = "F" + H;
8691
8691
  for (var H = 65; H <= 90; H++)
8692
- De[H] = String.fromCharCode(H + 32), tn[H] = String.fromCharCode(H);
8693
- for (var Bn in De)
8694
- tn.hasOwnProperty(Bn) || (tn[Bn] = De[Bn]);
8695
- function vc(n) {
8696
- var e = Tc && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Nc && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? tn : De)[n.keyCode] || n.key || "Unidentified";
8692
+ ve[H] = String.fromCharCode(H + 32), tn[H] = String.fromCharCode(H);
8693
+ for (var Bn in ve)
8694
+ tn.hasOwnProperty(Bn) || (tn[Bn] = ve[Bn]);
8695
+ function Dc(n) {
8696
+ var e = Tc && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Nc && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? tn : ve)[n.keyCode] || n.key || "Unidentified";
8697
8697
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
8698
8698
  }
8699
- const Dc = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
8699
+ const vc = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
8700
8700
  function Ac(n) {
8701
8701
  let e = n.split(/-(?!$)/), t = e[e.length - 1];
8702
8702
  t == "Space" && (t = " ");
@@ -8712,7 +8712,7 @@ function Ac(n) {
8712
8712
  else if (/^s(hift)?$/i.test(a))
8713
8713
  s = !0;
8714
8714
  else if (/^mod$/i.test(a))
8715
- Dc ? o = !0 : i = !0;
8715
+ vc ? o = !0 : i = !0;
8716
8716
  else
8717
8717
  throw new Error("Unrecognized modifier name: " + a);
8718
8718
  }
@@ -8733,7 +8733,7 @@ function Pc(n) {
8733
8733
  function Rc(n) {
8734
8734
  let e = Ic(n);
8735
8735
  return function(t, r) {
8736
- let i = vc(r), s, o = e[Fn(i, r)];
8736
+ let i = Dc(r), s, o = e[Fn(i, r)];
8737
8737
  if (o && o(t.state, t.dispatch, t))
8738
8738
  return !0;
8739
8739
  if (i.length == 1 && i != " ") {
@@ -8742,7 +8742,7 @@ function Rc(n) {
8742
8742
  if (l && l(t.state, t.dispatch, t))
8743
8743
  return !0;
8744
8744
  }
8745
- if ((r.shiftKey || r.altKey || r.metaKey || i.charCodeAt(0) > 127) && (s = De[r.keyCode]) && s != i) {
8745
+ if ((r.shiftKey || r.altKey || r.metaKey || i.charCodeAt(0) > 127) && (s = ve[r.keyCode]) && s != i) {
8746
8746
  let l = e[Fn(s, r)];
8747
8747
  if (l && l(t.state, t.dispatch, t))
8748
8748
  return !0;
@@ -9583,12 +9583,12 @@ function gd(n) {
9583
9583
  md(m, s.find).forEach((y) => {
9584
9584
  if (y.index === void 0)
9585
9585
  return;
9586
- const x = f + y.index + 1, C = x + y[0].length, D = {
9586
+ const x = f + y.index + 1, C = x + y[0].length, v = {
9587
9587
  from: t.tr.mapping.map(x),
9588
9588
  to: t.tr.mapping.map(C)
9589
9589
  }, A = s.handler({
9590
9590
  state: t,
9591
- range: D,
9591
+ range: v,
9592
9592
  match: y,
9593
9593
  commands: o,
9594
9594
  chain: l,
@@ -9917,7 +9917,7 @@ const Sd = le.create({
9917
9917
  }, Nd = (n) => ({ tr: e, dispatch: t }) => {
9918
9918
  const { from: r, to: i } = n;
9919
9919
  return t && e.delete(r, i), !0;
9920
- }, vd = () => ({ state: n, dispatch: e }) => Bc(n, e), Dd = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Ad = () => ({ state: n, dispatch: e }) => Kc(n, e);
9920
+ }, Dd = () => ({ state: n, dispatch: e }) => Bc(n, e), vd = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Ad = () => ({ state: n, dispatch: e }) => Kc(n, e);
9921
9921
  function nn(n, e, t = { strict: !0 }) {
9922
9922
  const r = Object.keys(e);
9923
9923
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : wr(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
@@ -10143,7 +10143,7 @@ const Jd = (n, e = {}) => ({ state: t, dispatch: r }) => {
10143
10143
  function bn(n, e) {
10144
10144
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
10145
10145
  }
10146
- function vi(n, e) {
10146
+ function Di(n, e) {
10147
10147
  const t = typeof e == "string" ? [e] : e;
10148
10148
  return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
10149
10149
  }
@@ -10152,8 +10152,8 @@ const Xd = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
10152
10152
  const l = bn(typeof n == "string" ? n : n.name, r.schema);
10153
10153
  return l ? (l === "node" && (s = z(n, r.schema)), l === "mark" && (o = Pe(n, r.schema)), i && t.selection.ranges.forEach((a) => {
10154
10154
  r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
10155
- s && s === c.type && t.setNodeMarkup(d, void 0, vi(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
10156
- o === u.type && t.addMark(d, d + c.nodeSize, o.create(vi(u.attrs, e)));
10155
+ s && s === c.type && t.setNodeMarkup(d, void 0, Di(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
10156
+ o === u.type && t.addMark(d, d + c.nodeSize, o.create(Di(u.attrs, e)));
10157
10157
  });
10158
10158
  });
10159
10159
  }), !0) : !1;
@@ -10313,8 +10313,8 @@ function or(n, e, t = {}) {
10313
10313
  if (!m.isText && !m.marks.length)
10314
10314
  return;
10315
10315
  const y = Math.max(f, g), x = Math.min(p, g + m.nodeSize), C = x - y;
10316
- o += C, l.push(...m.marks.map((D) => ({
10317
- mark: D,
10316
+ o += C, l.push(...m.marks.map((v) => ({
10317
+ mark: v,
10318
10318
  from: y,
10319
10319
  to: x
10320
10320
  })));
@@ -10330,7 +10330,7 @@ function bu(n, e, t = {}) {
10330
10330
  const r = bn(e, n.schema);
10331
10331
  return r === "node" ? It(n, e, t) : r === "mark" ? or(n, e, t) : !1;
10332
10332
  }
10333
- function Di(n, e) {
10333
+ function vi(n, e) {
10334
10334
  const { nodeExtensions: t } = mn(e), r = t.find((o) => o.name === n);
10335
10335
  if (!r)
10336
10336
  return !1;
@@ -10464,7 +10464,7 @@ const Nu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
10464
10464
  n && Ai(t, i.extensionManager.splittableMarks), e.scrollIntoView();
10465
10465
  }
10466
10466
  return !0;
10467
- }, vu = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
10467
+ }, Du = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
10468
10468
  var s;
10469
10469
  const o = z(n, t.schema), { $from: l, $to: a } = t.selection, c = t.selection.node;
10470
10470
  if (c && c.isBlock || l.depth < 2 || !l.sameParent(a))
@@ -10481,15 +10481,15 @@ const Nu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
10481
10481
  const y = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
10482
10482
  for (let P = l.depth - y; P >= l.depth - 3; P -= 1)
10483
10483
  g = b.from(l.node(P).copy(g));
10484
- const x = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, C = Ht(u, l.node().type.name, l.node().attrs), D = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(C)) || void 0;
10485
- g = g.append(b.from(o.createAndFill(null, D) || void 0));
10484
+ const x = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, C = Ht(u, l.node().type.name, l.node().attrs), v = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(C)) || void 0;
10485
+ g = g.append(b.from(o.createAndFill(null, v) || void 0));
10486
10486
  const A = l.before(l.depth - (y - 1));
10487
10487
  e.replace(A, l.after(-x), new k(g, 4 - y, 0));
10488
10488
  let O = -1;
10489
- e.doc.nodesBetween(A, e.doc.content.size, (P, v) => {
10489
+ e.doc.nodesBetween(A, e.doc.content.size, (P, D) => {
10490
10490
  if (O > -1)
10491
10491
  return !1;
10492
- P.isTextblock && P.content.size === 0 && (O = v + 1);
10492
+ P.isTextblock && P.content.size === 0 && (O = D + 1);
10493
10493
  }), O > -1 && e.setSelection(N.near(e.doc.resolve(O))), e.scrollIntoView();
10494
10494
  }
10495
10495
  return !0;
@@ -10506,8 +10506,8 @@ const Nu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
10506
10506
  const { selection: g, storedMarks: y } = t, { splittableMarks: x } = i.extensionManager, C = y || g.$to.parentOffset && g.$from.marks();
10507
10507
  if (e.split(l.pos, 2, m).scrollIntoView(), !C || !r)
10508
10508
  return !0;
10509
- const D = C.filter((A) => x.includes(A.type.name));
10510
- e.ensureMarks(D);
10509
+ const v = C.filter((A) => x.includes(A.type.name));
10510
+ e.ensureMarks(v);
10511
10511
  }
10512
10512
  return !0;
10513
10513
  }, jn = (n, e) => {
@@ -10528,19 +10528,19 @@ const Nu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
10528
10528
  return !0;
10529
10529
  const i = n.doc.nodeAt(r);
10530
10530
  return t.node.type === (i == null ? void 0 : i.type) && Ge(n.doc, r) && n.join(r), !0;
10531
- }, Du = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
10532
- const { extensions: u, splittableMarks: h } = i.extensionManager, f = z(n, o.schema), p = z(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, C = y.blockRange(x), D = g || m.$to.parentOffset && m.$from.marks();
10531
+ }, vu = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
10532
+ const { extensions: u, splittableMarks: h } = i.extensionManager, f = z(n, o.schema), p = z(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, C = y.blockRange(x), v = g || m.$to.parentOffset && m.$from.marks();
10533
10533
  if (!C)
10534
10534
  return !1;
10535
- const A = Or((O) => Di(O.type.name, u))(m);
10535
+ const A = Or((O) => vi(O.type.name, u))(m);
10536
10536
  if (C.depth >= 1 && A && C.depth - A.depth <= 1) {
10537
10537
  if (A.node.type === f)
10538
10538
  return c.liftListItem(p);
10539
- if (Di(A.node.type.name, u) && f.validContent(A.node.content) && l)
10539
+ if (vi(A.node.type.name, u) && f.validContent(A.node.content) && l)
10540
10540
  return a().command(() => (s.setNodeMarkup(A.pos, f), !0)).command(() => jn(s, f)).command(() => $n(s, f)).run();
10541
10541
  }
10542
- return !t || !D || !l ? a().command(() => d().wrapInList(f, r) ? !0 : c.clearNodes()).wrapInList(f, r).command(() => jn(s, f)).command(() => $n(s, f)).run() : a().command(() => {
10543
- const O = d().wrapInList(f, r), P = D.filter((v) => h.includes(v.type.name));
10542
+ return !t || !v || !l ? a().command(() => d().wrapInList(f, r) ? !0 : c.clearNodes()).wrapInList(f, r).command(() => jn(s, f)).command(() => $n(s, f)).run() : a().command(() => {
10543
+ const O = d().wrapInList(f, r), P = v.filter((D) => h.includes(D.type.name));
10544
10544
  return s.ensureMarks(P), O ? !0 : c.clearNodes();
10545
10545
  }).wrapInList(f, r).command(() => jn(s, f)).command(() => $n(s, f)).run();
10546
10546
  }, Au = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
@@ -10628,8 +10628,8 @@ var ju = /* @__PURE__ */ Object.freeze({
10628
10628
  deleteCurrentNode: Ed,
10629
10629
  deleteNode: Td,
10630
10630
  deleteRange: Nd,
10631
- deleteSelection: vd,
10632
- enter: Dd,
10631
+ deleteSelection: Dd,
10632
+ enter: vd,
10633
10633
  exitCode: Ad,
10634
10634
  extendMarkRange: Pd,
10635
10635
  first: Rd,
@@ -10662,8 +10662,8 @@ var ju = /* @__PURE__ */ Object.freeze({
10662
10662
  setTextSelection: Eu,
10663
10663
  sinkListItem: Tu,
10664
10664
  splitBlock: Nu,
10665
- splitListItem: vu,
10666
- toggleList: Du,
10665
+ splitListItem: Du,
10666
+ toggleList: vu,
10667
10667
  toggleMark: Au,
10668
10668
  toggleNode: Iu,
10669
10669
  toggleWrap: Pu,
@@ -11400,14 +11400,14 @@ class Zu {
11400
11400
  if (m || !a && !c)
11401
11401
  return;
11402
11402
  this.createTooltip();
11403
- const { ranges: x } = g, C = Math.min(...x.map((O) => O.$from.pos)), D = Math.max(...x.map((O) => O.$to.pos));
11403
+ const { ranges: x } = g, C = Math.min(...x.map((O) => O.$from.pos)), v = Math.max(...x.map((O) => O.$to.pos));
11404
11404
  if (!((u = this.shouldShow) === null || u === void 0 ? void 0 : u.call(this, {
11405
11405
  editor: this.editor,
11406
11406
  view: l,
11407
11407
  state: p,
11408
11408
  oldState: d,
11409
11409
  from: C,
11410
- to: D
11410
+ to: v
11411
11411
  }))) {
11412
11412
  this.hide();
11413
11413
  return;
@@ -11420,7 +11420,7 @@ class Zu {
11420
11420
  if (P && (O = P.firstChild), O)
11421
11421
  return O.getBoundingClientRect();
11422
11422
  }
11423
- return bo(l, C, D);
11423
+ return bo(l, C, v);
11424
11424
  })
11425
11425
  }), this.show();
11426
11426
  }, this.editor = e, this.element = t, this.view = r, this.updateDelay = s, o && (this.shouldShow = o), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = i, this.element.remove(), this.element.style.visibility = "visible";
@@ -12244,11 +12244,11 @@ function Co({ pluginKey: n = mh, editor: e, char: t = "@", allowSpaces: r = !1,
12244
12244
  view() {
12245
12245
  return {
12246
12246
  update: async (m, g) => {
12247
- var y, x, C, D, A, O, P;
12248
- const v = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), M = (x = this.key) === null || x === void 0 ? void 0 : x.getState(m.state), X = v.active && M.active && v.range.from !== M.range.from, Re = !v.active && M.active, Ft = v.active && !M.active, No = !Re && !Ft && v.query !== M.query, mt = Re || X, zt = No && !X, kn = Ft || X;
12247
+ var y, x, C, v, A, O, P;
12248
+ const D = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), M = (x = this.key) === null || x === void 0 ? void 0 : x.getState(m.state), X = D.active && M.active && D.range.from !== M.range.from, Re = !D.active && M.active, Ft = D.active && !M.active, No = !Re && !Ft && D.query !== M.query, mt = Re || X, zt = No && !X, kn = Ft || X;
12249
12249
  if (!mt && !zt && !kn)
12250
12250
  return;
12251
- const Ye = kn && !mt ? v : M, Tr = m.dom.querySelector(`[data-decoration-id="${Ye.decorationId}"]`);
12251
+ const Ye = kn && !mt ? D : M, Tr = m.dom.querySelector(`[data-decoration-id="${Ye.decorationId}"]`);
12252
12252
  h = {
12253
12253
  editor: e,
12254
12254
  range: Ye.range,
@@ -12267,10 +12267,10 @@ function Co({ pluginKey: n = mh, editor: e, char: t = "@", allowSpaces: r = !1,
12267
12267
  // this can be used for building popups without a DOM node
12268
12268
  clientRect: Tr ? () => {
12269
12269
  var gt;
12270
- const { decorationId: vo } = (gt = this.key) === null || gt === void 0 ? void 0 : gt.getState(e.state), Sn = m.dom.querySelector(`[data-decoration-id="${vo}"]`);
12270
+ const { decorationId: Do } = (gt = this.key) === null || gt === void 0 ? void 0 : gt.getState(e.state), Sn = m.dom.querySelector(`[data-decoration-id="${Do}"]`);
12271
12271
  return (Sn == null ? void 0 : Sn.getBoundingClientRect()) || null;
12272
12272
  } : null
12273
- }, mt && ((C = f == null ? void 0 : f.onBeforeStart) === null || C === void 0 || C.call(f, h)), zt && ((D = f == null ? void 0 : f.onBeforeUpdate) === null || D === void 0 || D.call(f, h)), (zt || mt) && (h.items = await c({
12273
+ }, mt && ((C = f == null ? void 0 : f.onBeforeStart) === null || C === void 0 || C.call(f, h)), zt && ((v = f == null ? void 0 : f.onBeforeUpdate) === null || v === void 0 || v.call(f, h)), (zt || mt) && (h.items = await c({
12274
12274
  editor: e,
12275
12275
  query: Ye.query
12276
12276
  })), kn && ((A = f == null ? void 0 : f.onExit) === null || A === void 0 || A.call(f, h)), zt && ((O = f == null ? void 0 : f.onUpdate) === null || O === void 0 || O.call(f, h)), mt && ((P = f == null ? void 0 : f.onStart) === null || P === void 0 || P.call(f, h));
@@ -12297,9 +12297,9 @@ function Co({ pluginKey: n = mh, editor: e, char: t = "@", allowSpaces: r = !1,
12297
12297
  },
12298
12298
  // Apply changes to the plugin state from a view transaction.
12299
12299
  apply(m, g, y, x) {
12300
- const { isEditable: C } = e, { composing: D } = e.view, { selection: A } = m, { empty: O, from: P } = A, v = { ...g };
12301
- if (v.composing = D, C && (O || e.view.composing)) {
12302
- (P < g.range.from || P > g.range.to) && !D && !g.composing && (v.active = !1);
12300
+ const { isEditable: C } = e, { composing: v } = e.view, { selection: A } = m, { empty: O, from: P } = A, D = { ...g };
12301
+ if (D.composing = v, C && (O || e.view.composing)) {
12302
+ (P < g.range.from || P > g.range.to) && !v && !g.composing && (D.active = !1);
12303
12303
  const M = ph({
12304
12304
  char: t,
12305
12305
  allowSpaces: r,
@@ -12307,10 +12307,10 @@ function Co({ pluginKey: n = mh, editor: e, char: t = "@", allowSpaces: r = !1,
12307
12307
  startOfLine: s,
12308
12308
  $position: A.$from
12309
12309
  }), X = `id_${Math.floor(Math.random() * 4294967295)}`;
12310
- M && u({ editor: e, state: x, range: M.range }) ? (v.active = !0, v.decorationId = g.decorationId ? g.decorationId : X, v.range = M.range, v.query = M.query, v.text = M.text) : v.active = !1;
12310
+ M && u({ editor: e, state: x, range: M.range }) ? (D.active = !0, D.decorationId = g.decorationId ? g.decorationId : X, D.range = M.range, D.query = M.query, D.text = M.text) : D.active = !1;
12311
12311
  } else
12312
- v.active = !1;
12313
- return v.active || (v.decorationId = null, v.range = { from: 0, to: 0 }, v.query = null, v.text = null), v;
12312
+ D.active = !1;
12313
+ return D.active || (D.decorationId = null, D.range = { from: 0, to: 0 }, D.query = null, D.text = null), D;
12314
12314
  }
12315
12315
  },
12316
12316
  props: {
@@ -12519,11 +12519,11 @@ const wh = /* @__PURE__ */ Ue(Sh, [["render", xh]]), Mh = {
12519
12519
  text: n[0],
12520
12520
  match: n
12521
12521
  };
12522
- }, vh = (n) => [...n.matchAll(Eh)].filter((t) => Wi(t[0])).map((t) => ({
12522
+ }, Dh = (n) => [...n.matchAll(Eh)].filter((t) => Wi(t[0])).map((t) => ({
12523
12523
  index: t.index,
12524
12524
  text: t[0],
12525
12525
  match: t
12526
- })), Dh = ge.create({
12526
+ })), vh = ge.create({
12527
12527
  addOptions() {
12528
12528
  return {
12529
12529
  HTMLAttributes: {},
@@ -12597,7 +12597,7 @@ const wh = /* @__PURE__ */ Ue(Sh, [["render", xh]]), Mh = {
12597
12597
  addPasteRules() {
12598
12598
  return [
12599
12599
  Ri({
12600
- find: vh,
12600
+ find: Dh,
12601
12601
  type: this.type,
12602
12602
  getAttributes(n) {
12603
12603
  return {
@@ -12675,7 +12675,7 @@ function Bh(n, e, t, r) {
12675
12675
  for (const l of o)
12676
12676
  l.mark.type === r && t.removeMark(l.from, l.to, r);
12677
12677
  }
12678
- const zi = Do(1, 15);
12678
+ const zi = vo(1, 15);
12679
12679
  function Li(n, e, t, r, i, s) {
12680
12680
  if (!n)
12681
12681
  return;
@@ -12968,10 +12968,6 @@ const Jh = /* @__PURE__ */ Ue(Wh, [["render", Kh]]), Uh = {
12968
12968
  return {
12969
12969
  onStart: (t) => {
12970
12970
  n = new Er(Oo, {
12971
- // // using vue 2:
12972
- // parent: this,
12973
- // propsData: props,
12974
- // using vue 3:
12975
12971
  props: {
12976
12972
  itemComponent: ln(Jh),
12977
12973
  itemType: "mention",
@@ -13155,7 +13151,7 @@ const Jh = /* @__PURE__ */ Ue(Wh, [["render", Kh]]), Uh = {
13155
13151
  const e = { ...this.mentionSuggestion, ...Uh };
13156
13152
  n.push(_h.configure({ suggestion: e }));
13157
13153
  }
13158
- return n.push(Dh), n;
13154
+ return n.push(vh), n;
13159
13155
  },
13160
13156
  inputAttrs() {
13161
13157
  const n = {
@@ -13467,7 +13463,25 @@ const Xh = /* @__PURE__ */ Ue(Gh, [["render", Yh]]), Zh = {
13467
13463
  * @event selected-emoji
13468
13464
  * @type {String}
13469
13465
  */
13470
- "selected-emoji"
13466
+ "selected-emoji",
13467
+ /**
13468
+ * Native focus event
13469
+ * @event input
13470
+ * @type {String|JSON}
13471
+ */
13472
+ "focus",
13473
+ /**
13474
+ * Native blur event
13475
+ * @event input
13476
+ * @type {String|JSON}
13477
+ */
13478
+ "blur",
13479
+ /**
13480
+ * Native input event
13481
+ * @event input
13482
+ * @type {String|JSON}
13483
+ */
13484
+ "input"
13471
13485
  ],
13472
13486
  data() {
13473
13487
  return {
@@ -13549,8 +13563,14 @@ const Xh = /* @__PURE__ */ Ue(Gh, [["render", Yh]]), Zh = {
13549
13563
  onCancel() {
13550
13564
  this.$emit("cancel");
13551
13565
  },
13552
- focus() {
13553
- this.$refs.richTextEditor.focusEditor(), this.hasFocus = !0;
13566
+ onFocus(n) {
13567
+ this.hasFocus = !0, this.$refs.richTextEditor.focusEditor(), this.$emit("focus", n);
13568
+ },
13569
+ onBlur(n) {
13570
+ this.hasFocus = !1, this.$emit("blur", n);
13571
+ },
13572
+ onInput(n) {
13573
+ this.$emit("input", n);
13554
13574
  }
13555
13575
  }
13556
13576
  }, Qh = { class: "d-d-flex d-jc-space-between d-mx8 d-my4" }, ef = { class: "d-d-flex" }, tf = { class: "d-d-flex" }, nf = { key: 0 };
@@ -13568,19 +13588,17 @@ function rf(n, e, t, r, i, s) {
13568
13588
  "d-c-text",
13569
13589
  { "d-bc-black-500 d-bs-sm": i.hasFocus, "d-bc-default": !i.hasFocus }
13570
13590
  ]),
13571
- onClick: e[16] || (e[16] = (f) => n.$refs.richTextEditor.focusEditor()),
13572
- onDragEnter: e[17] || (e[17] = (...f) => s.onDrag && s.onDrag(...f)),
13573
- onDragOver: e[18] || (e[18] = (...f) => s.onDrag && s.onDrag(...f)),
13574
- onDrop: e[19] || (e[19] = (...f) => s.onDrop && s.onDrop(...f)),
13575
- onKeydown: e[20] || (e[20] = Ho(Hi((...f) => s.onSend && s.onSend(...f), ["exact"]), ["enter"])),
13576
- onFocusin: e[21] || (e[21] = (f) => i.hasFocus = !0),
13577
- onFocusout: e[22] || (e[22] = (f) => i.hasFocus = !1)
13591
+ onClick: e[15] || (e[15] = (f) => n.$refs.richTextEditor.focusEditor()),
13592
+ onDragEnter: e[16] || (e[16] = (...f) => s.onDrag && s.onDrag(...f)),
13593
+ onDragOver: e[17] || (e[17] = (...f) => s.onDrag && s.onDrag(...f)),
13594
+ onDrop: e[18] || (e[18] = (...f) => s.onDrop && s.onDrop(...f)),
13595
+ onKeydown: e[19] || (e[19] = Ho(Hi((...f) => s.onSend && s.onSend(...f), ["exact"]), ["enter"]))
13578
13596
  }, [
13579
13597
  Be("div", {
13580
13598
  class: "d-of-auto d-mx16 d-mt8 d-mb4",
13581
13599
  style: qo({ "max-height": t.maxHeight })
13582
13600
  }, [
13583
- Z(o, vr({
13601
+ Z(o, Dr({
13584
13602
  ref: "richTextEditor",
13585
13603
  modelValue: i.internalInputValue,
13586
13604
  "onUpdate:modelValue": e[0] || (e[0] = (f) => i.internalInputValue = f),
@@ -13592,9 +13610,10 @@ function rf(n, e, t, r, i, s) {
13592
13610
  link: t.link,
13593
13611
  placeholder: t.placeholder
13594
13612
  }, n.$attrs, {
13595
- onFocus: e[1] || (e[1] = (f) => i.hasFocus = !0),
13596
- onBlur: e[2] || (e[2] = (f) => i.hasFocus = !1)
13597
- }), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder"])
13613
+ onFocus: s.onFocus,
13614
+ onBlur: s.onBlur,
13615
+ onInput: e[1] || (e[1] = (f) => s.onInput(f))
13616
+ }), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder", "onFocus", "onBlur"])
13598
13617
  ], 4),
13599
13618
  _o(n.$slots, "middle"),
13600
13619
  Be("section", Qh, [
@@ -13614,10 +13633,10 @@ function rf(n, e, t, r, i, s) {
13614
13633
  importance: "clear",
13615
13634
  "aria-label": t.showImagePicker.ariaLabel,
13616
13635
  onClick: s.onSelectImage,
13617
- onMouseenter: e[3] || (e[3] = (f) => i.imagePickerFocus = !0),
13618
- onMouseleave: e[4] || (e[4] = (f) => i.imagePickerFocus = !1),
13619
- onFocusin: e[5] || (e[5] = (f) => i.imagePickerFocus = !0),
13620
- onFocusout: e[6] || (e[6] = (f) => i.imagePickerFocus = !1)
13636
+ onMouseenter: e[2] || (e[2] = (f) => i.imagePickerFocus = !0),
13637
+ onMouseleave: e[3] || (e[3] = (f) => i.imagePickerFocus = !1),
13638
+ onFocus: e[4] || (e[4] = (f) => i.imagePickerFocus = !0),
13639
+ onBlur: e[5] || (e[5] = (f) => i.imagePickerFocus = !1)
13621
13640
  }, {
13622
13641
  icon: V(() => [
13623
13642
  Z(l, {
@@ -13645,7 +13664,7 @@ function rf(n, e, t, r, i, s) {
13645
13664
  open: i.emojiPickerOpened,
13646
13665
  "initial-focus-element": "#searchInput",
13647
13666
  padding: "none",
13648
- onOpened: e[11] || (e[11] = (f) => {
13667
+ onOpened: e[10] || (e[10] = (f) => {
13649
13668
  i.emojiPickerOpened = f;
13650
13669
  })
13651
13670
  }, {
@@ -13664,10 +13683,10 @@ function rf(n, e, t, r, i, s) {
13664
13683
  "aria-label": t.emojiButtonAriaLabel,
13665
13684
  offset: [0, 0],
13666
13685
  onClick: s.toggleEmojiPicker,
13667
- onMouseenter: e[7] || (e[7] = (f) => i.emojiPickerFocus = !0),
13668
- onMouseleave: e[8] || (e[8] = (f) => i.emojiPickerFocus = !1),
13669
- onFocusin: e[9] || (e[9] = (f) => i.emojiPickerFocus = !0),
13670
- onFocusout: e[10] || (e[10] = (f) => i.emojiPickerFocus = !1)
13686
+ onMouseenter: e[6] || (e[6] = (f) => i.emojiPickerFocus = !0),
13687
+ onMouseleave: e[7] || (e[7] = (f) => i.emojiPickerFocus = !1),
13688
+ onFocus: e[8] || (e[8] = (f) => i.emojiPickerFocus = !0),
13689
+ onBlur: e[9] || (e[9] = (f) => i.emojiPickerFocus = !1)
13671
13690
  }, {
13672
13691
  icon: V(() => [
13673
13692
  Z(l, {
@@ -13682,7 +13701,7 @@ function rf(n, e, t, r, i, s) {
13682
13701
  }, 8, ["message"])
13683
13702
  ]),
13684
13703
  content: V(() => [
13685
- Z(u, vr(t.emojiPickerProps, {
13704
+ Z(u, Dr(t.emojiPickerProps, {
13686
13705
  onSkinTone: s.onSkinTone,
13687
13706
  onSelectedEmoji: s.onSelectEmoji
13688
13707
  }), null, 16, ["onSkinTone", "onSelectedEmoji"])
@@ -13745,10 +13764,10 @@ function rf(n, e, t, r, i, s) {
13745
13764
  "aria-label": t.showSend.ariaLabel,
13746
13765
  "aria-disabled": s.isSendDisabled,
13747
13766
  onClick: s.onSend,
13748
- onMouseenter: e[12] || (e[12] = (f) => i.sendButtonFocus = !0),
13749
- onMouseleave: e[13] || (e[13] = (f) => i.sendButtonFocus = !1),
13750
- onFocusin: e[14] || (e[14] = (f) => i.sendButtonFocus = !0),
13751
- onFocusout: e[15] || (e[15] = (f) => i.sendButtonFocus = !1)
13767
+ onMouseenter: e[11] || (e[11] = (f) => i.sendButtonFocus = !0),
13768
+ onMouseleave: e[12] || (e[12] = (f) => i.sendButtonFocus = !1),
13769
+ onFocus: e[13] || (e[13] = (f) => i.sendButtonFocus = !0),
13770
+ onBlur: e[14] || (e[14] = (f) => i.sendButtonFocus = !1)
13752
13771
  }, Wo({
13753
13772
  default: V(() => [
13754
13773
  t.showSend.text ? (_(), qt("p", nf, it(t.showSend.text), 1)) : Xe("", !0)