@ryzeup/richtexteditor 1.0.27 → 1.0.29

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.es.js CHANGED
@@ -1,37 +1,37 @@
1
- var pt = Object.defineProperty, vt = Object.defineProperties;
2
- var yt = Object.getOwnPropertyDescriptors;
1
+ var vt = Object.defineProperty, yt = Object.defineProperties;
2
+ var Et = Object.getOwnPropertyDescriptors;
3
3
  var ke = Object.getOwnPropertySymbols;
4
- var Et = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable;
5
- var ze = (r, s, u) => s in r ? pt(r, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : r[s] = u, ce = (r, s) => {
4
+ var wt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable;
5
+ var ze = (r, s, u) => s in r ? vt(r, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : r[s] = u, ce = (r, s) => {
6
6
  for (var u in s || (s = {}))
7
- Et.call(s, u) && ze(r, u, s[u]);
7
+ wt.call(s, u) && ze(r, u, s[u]);
8
8
  if (ke)
9
9
  for (var u of ke(s))
10
- wt.call(s, u) && ze(r, u, s[u]);
10
+ Ct.call(s, u) && ze(r, u, s[u]);
11
11
  return r;
12
- }, se = (r, s) => vt(r, yt(s));
13
- import * as Ct from "react";
12
+ }, se = (r, s) => yt(r, Et(s));
13
+ import * as bt from "react";
14
14
  import i, { useRef as W, useState as D, useEffect as U } from "react";
15
- import { createPortal as bt } from "react-dom";
16
- window.React = Ct;
15
+ import { createPortal as Lt } from "react-dom";
16
+ window.React = bt;
17
17
  var je = {
18
18
  color: void 0,
19
19
  size: void 0,
20
20
  className: void 0,
21
21
  style: void 0,
22
22
  attr: void 0
23
- }, De = i.createContext && /* @__PURE__ */ i.createContext(je), Lt = ["attr", "size", "title"];
24
- function xt(r, s) {
23
+ }, De = i.createContext && /* @__PURE__ */ i.createContext(je), xt = ["attr", "size", "title"];
24
+ function Rt(r, s) {
25
25
  if (r == null) return {};
26
- var u = Rt(r, s), g, p;
26
+ var u = St(r, s), g, p;
27
27
  if (Object.getOwnPropertySymbols) {
28
- var b = Object.getOwnPropertySymbols(r);
29
- for (p = 0; p < b.length; p++)
30
- g = b[p], !(s.indexOf(g) >= 0) && Object.prototype.propertyIsEnumerable.call(r, g) && (u[g] = r[g]);
28
+ var M = Object.getOwnPropertySymbols(r);
29
+ for (p = 0; p < M.length; p++)
30
+ g = M[p], !(s.indexOf(g) >= 0) && Object.prototype.propertyIsEnumerable.call(r, g) && (u[g] = r[g]);
31
31
  }
32
32
  return u;
33
33
  }
34
- function Rt(r, s) {
34
+ function St(r, s) {
35
35
  if (r == null) return {};
36
36
  var u = {};
37
37
  for (var g in r)
@@ -41,15 +41,15 @@ function Rt(r, s) {
41
41
  }
42
42
  return u;
43
43
  }
44
- function ee() {
45
- return ee = Object.assign ? Object.assign.bind() : function(r) {
44
+ function te() {
45
+ return te = Object.assign ? Object.assign.bind() : function(r) {
46
46
  for (var s = 1; s < arguments.length; s++) {
47
47
  var u = arguments[s];
48
48
  for (var g in u)
49
49
  Object.prototype.hasOwnProperty.call(u, g) && (r[g] = u[g]);
50
50
  }
51
51
  return r;
52
- }, ee.apply(this, arguments);
52
+ }, te.apply(this, arguments);
53
53
  }
54
54
  function He(r, s) {
55
55
  var u = Object.keys(r);
@@ -61,25 +61,25 @@ function He(r, s) {
61
61
  }
62
62
  return u;
63
63
  }
64
- function te(r) {
64
+ function ne(r) {
65
65
  for (var s = 1; s < arguments.length; s++) {
66
66
  var u = arguments[s] != null ? arguments[s] : {};
67
67
  s % 2 ? He(Object(u), !0).forEach(function(g) {
68
- St(r, g, u[g]);
68
+ Mt(r, g, u[g]);
69
69
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(u)) : He(Object(u)).forEach(function(g) {
70
70
  Object.defineProperty(r, g, Object.getOwnPropertyDescriptor(u, g));
71
71
  });
72
72
  }
73
73
  return r;
74
74
  }
75
- function St(r, s, u) {
76
- return s = Mt(s), s in r ? Object.defineProperty(r, s, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : r[s] = u, r;
75
+ function Mt(r, s, u) {
76
+ return s = Tt(s), s in r ? Object.defineProperty(r, s, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : r[s] = u, r;
77
77
  }
78
- function Mt(r) {
79
- var s = Tt(r, "string");
78
+ function Tt(r) {
79
+ var s = At(r, "string");
80
80
  return typeof s == "symbol" ? s : s + "";
81
81
  }
82
- function Tt(r, s) {
82
+ function At(r, s) {
83
83
  if (typeof r != "object" || !r) return r;
84
84
  var u = r[Symbol.toPrimitive];
85
85
  if (u !== void 0) {
@@ -90,93 +90,93 @@ function Tt(r, s) {
90
90
  return (s === "string" ? String : Number)(r);
91
91
  }
92
92
  function Fe(r) {
93
- return r && r.map((s, u) => /* @__PURE__ */ i.createElement(s.tag, te({
93
+ return r && r.map((s, u) => /* @__PURE__ */ i.createElement(s.tag, ne({
94
94
  key: u
95
95
  }, s.attr), Fe(s.child)));
96
96
  }
97
- function N(r) {
98
- return (s) => /* @__PURE__ */ i.createElement(At, ee({
99
- attr: te({}, r.attr)
97
+ function k(r) {
98
+ return (s) => /* @__PURE__ */ i.createElement(Nt, te({
99
+ attr: ne({}, r.attr)
100
100
  }, s), Fe(r.child));
101
101
  }
102
- function At(r) {
102
+ function Nt(r) {
103
103
  var s = (u) => {
104
104
  var {
105
105
  attr: g,
106
106
  size: p,
107
- title: b
108
- } = r, S = xt(r, Lt), T = p || u.size || "1em", E;
109
- return u.className && (E = u.className), r.className && (E = (E ? E + " " : "") + r.className), /* @__PURE__ */ i.createElement("svg", ee({
107
+ title: M
108
+ } = r, L = Rt(r, xt), T = p || u.size || "1em", y;
109
+ return u.className && (y = u.className), r.className && (y = (y ? y + " " : "") + r.className), /* @__PURE__ */ i.createElement("svg", te({
110
110
  stroke: "currentColor",
111
111
  fill: "currentColor",
112
112
  strokeWidth: "0"
113
- }, u.attr, g, S, {
114
- className: E,
115
- style: te(te({
113
+ }, u.attr, g, L, {
114
+ className: y,
115
+ style: ne(ne({
116
116
  color: r.color || u.color
117
117
  }, u.style), r.style),
118
118
  height: T,
119
119
  width: T,
120
120
  xmlns: "http://www.w3.org/2000/svg"
121
- }), b && /* @__PURE__ */ i.createElement("title", null, b), r.children);
121
+ }), M && /* @__PURE__ */ i.createElement("title", null, M), r.children);
122
122
  };
123
123
  return De !== void 0 ? /* @__PURE__ */ i.createElement(De.Consumer, null, (u) => s(u)) : s(je);
124
124
  }
125
- function Nt(r) {
126
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(r);
127
- }
128
125
  function kt(r) {
129
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, child: [] }] })(r);
126
+ return k({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(r);
130
127
  }
131
128
  function zt(r) {
132
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" }, child: [] }] })(r);
129
+ return k({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, child: [] }] })(r);
133
130
  }
134
131
  function Dt(r) {
135
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z" }, child: [] }] })(r);
132
+ return k({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" }, child: [] }] })(r);
136
133
  }
137
134
  function Ht(r) {
138
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
135
+ return k({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z" }, child: [] }] })(r);
139
136
  }
140
137
  function Ot(r) {
141
- return N({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z" }, child: [] }] })(r);
138
+ return k({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
142
139
  }
143
140
  function _t(r) {
144
- return N({ attr: { viewBox: "0 0 544 512" }, child: [{ tag: "path", attr: { d: "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z" }, child: [] }] })(r);
141
+ return k({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z" }, child: [] }] })(r);
145
142
  }
146
143
  function jt(r) {
147
- return N({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z" }, child: [] }] })(r);
144
+ return k({ attr: { viewBox: "0 0 544 512" }, child: [{ tag: "path", attr: { d: "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z" }, child: [] }] })(r);
148
145
  }
149
146
  function Ft(r) {
150
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(r);
147
+ return k({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z" }, child: [] }] })(r);
151
148
  }
152
149
  function It(r) {
153
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
150
+ return k({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(r);
154
151
  }
155
152
  function Pt(r) {
156
- return N({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(r);
153
+ return k({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
157
154
  }
158
155
  function qt(r) {
159
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
156
+ return k({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(r);
160
157
  }
161
158
  function Bt(r) {
162
- return N({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z" }, child: [] }] })(r);
159
+ return k({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
163
160
  }
164
161
  function Vt(r) {
165
- return N({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M2 18H9V20H2V18ZM2 11H11V13H2V11ZM2 4H22V6H2V4ZM20.674 13.0251L21.8301 12.634L22.8301 14.366L21.914 15.1711C21.9704 15.4386 22 15.7158 22 16C22 16.2842 21.9704 16.5614 21.914 16.8289L22.8301 17.634L21.8301 19.366L20.674 18.9749C20.2635 19.3441 19.7763 19.6295 19.2391 19.8044L19 21H17L16.7609 19.8044C16.2237 19.6295 15.7365 19.3441 15.326 18.9749L14.1699 19.366L13.1699 17.634L14.086 16.8289C14.0296 16.5614 14 16.2842 14 16C14 15.7158 14.0296 15.4386 14.086 15.1711L13.1699 14.366L14.1699 12.634L15.326 13.0251C15.7365 12.6559 16.2237 12.3705 16.7609 12.1956L17 11H19L19.2391 12.1956C19.7763 12.3705 20.2635 12.6559 20.674 13.0251ZM18 17C18.5523 17 19 16.5523 19 16C19 15.4477 18.5523 15 18 15C17.4477 15 17 15.4477 17 16C17 16.5523 17.4477 17 18 17Z" }, child: [] }] })(r);
162
+ return k({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z" }, child: [] }] })(r);
166
163
  }
167
164
  function Ut(r) {
168
- return N({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 21h-7a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }, { tag: "path", attr: { d: "M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M19.001 15.5v1.5" }, child: [] }, { tag: "path", attr: { d: "M19.001 21v1.5" }, child: [] }, { tag: "path", attr: { d: "M22.032 17.25l-1.299 .75" }, child: [] }, { tag: "path", attr: { d: "M17.27 20l-1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M15.97 17.25l1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M20.733 20l1.3 .75" }, child: [] }] })(r);
165
+ return k({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M2 18H9V20H2V18ZM2 11H11V13H2V11ZM2 4H22V6H2V4ZM20.674 13.0251L21.8301 12.634L22.8301 14.366L21.914 15.1711C21.9704 15.4386 22 15.7158 22 16C22 16.2842 21.9704 16.5614 21.914 16.8289L22.8301 17.634L21.8301 19.366L20.674 18.9749C20.2635 19.3441 19.7763 19.6295 19.2391 19.8044L19 21H17L16.7609 19.8044C16.2237 19.6295 15.7365 19.3441 15.326 18.9749L14.1699 19.366L13.1699 17.634L14.086 16.8289C14.0296 16.5614 14 16.2842 14 16C14 15.7158 14.0296 15.4386 14.086 15.1711L13.1699 14.366L14.1699 12.634L15.326 13.0251C15.7365 12.6559 16.2237 12.3705 16.7609 12.1956L17 11H19L19.2391 12.1956C19.7763 12.3705 20.2635 12.6559 20.674 13.0251ZM18 17C18.5523 17 19 16.5523 19 16C19 15.4477 18.5523 15 18 15C17.4477 15 17 15.4477 17 16C17 16.5523 17.4477 17 18 17Z" }, child: [] }] })(r);
169
166
  }
170
167
  function $t(r) {
171
- return N({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }] })(r);
168
+ return k({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 21h-7a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }, { tag: "path", attr: { d: "M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M19.001 15.5v1.5" }, child: [] }, { tag: "path", attr: { d: "M19.001 21v1.5" }, child: [] }, { tag: "path", attr: { d: "M22.032 17.25l-1.299 .75" }, child: [] }, { tag: "path", attr: { d: "M17.27 20l-1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M15.97 17.25l1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M20.733 20l1.3 .75" }, child: [] }] })(r);
172
169
  }
173
170
  function Wt(r) {
174
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(r);
171
+ return k({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }] })(r);
175
172
  }
176
173
  function Zt(r) {
177
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(r);
174
+ return k({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(r);
178
175
  }
179
- const Xt = [
176
+ function Xt(r) {
177
+ return k({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(r);
178
+ }
179
+ const Kt = [
180
180
  "😀",
181
181
  "😁",
182
182
  "😂",
@@ -288,37 +288,37 @@ const Xt = [
288
288
  "👏",
289
289
  "🫶",
290
290
  "👐"
291
- ], Kt = ({
291
+ ], Yt = ({
292
292
  exec: r,
293
293
  saveSelection: s,
294
294
  handleFileChange: u,
295
295
  handleFontSizeChange: g,
296
296
  handleFontFamilyChange: p,
297
297
  // insertListBlock,
298
- insertEmoji: b,
299
- handleLink: S,
298
+ insertEmoji: M,
299
+ handleLink: L,
300
300
  removeFormatting: T,
301
- visibleActions: E,
302
- className: w,
303
- style: x
301
+ visibleActions: y,
302
+ className: S,
303
+ style: C
304
304
  }) => {
305
305
  var X, B;
306
- const R = W(null), H = W(null), k = W(null), [O, j] = D(!1), [P, z] = D({
306
+ const x = W(null), P = W(null), N = W(null), [_, j] = D(!1), [H, F] = D({
307
307
  x: 0,
308
308
  y: 0
309
309
  });
310
310
  U(() => {
311
- const f = (L) => {
312
- !L.target.closest(".rte-emoji-popup") && !L.target.closest("button[title='Emoji']") && j(!1);
311
+ const f = (b) => {
312
+ !b.target.closest(".rte-emoji-popup") && !b.target.closest("button[title='Emoji']") && j(!1);
313
313
  };
314
314
  return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
315
315
  }, []);
316
- const _ = (f) => {
316
+ const z = (f) => {
317
317
  var V;
318
318
  f.preventDefault();
319
- const L = f.currentTarget.dataset.command;
320
- if (L)
321
- switch (L) {
319
+ const b = f.currentTarget.dataset.command;
320
+ if (b)
321
+ switch (b) {
322
322
  case "bold":
323
323
  case "italic":
324
324
  case "underline":
@@ -327,20 +327,20 @@ const Xt = [
327
327
  case "insertOrderedList":
328
328
  case "insertStaticOrderedList":
329
329
  case "removeFormat":
330
- r(L);
330
+ r(b);
331
331
  break;
332
332
  case "insertImage": {
333
- (V = R.current) == null || V.click();
333
+ (V = x.current) == null || V.click();
334
334
  break;
335
335
  }
336
336
  default:
337
- console.warn("Unknown command:", L);
337
+ console.warn("Unknown command:", b);
338
338
  }
339
339
  }, $ = (f) => {
340
340
  r("foreColor", f.target.value);
341
341
  }, Z = (f) => {
342
342
  r("backColor", f.target.value);
343
- }, [M, F] = D({
343
+ }, [R, I] = D({
344
344
  bold: !1,
345
345
  italic: !1,
346
346
  underline: !1,
@@ -359,7 +359,7 @@ const Xt = [
359
359
  });
360
360
  return U(() => {
361
361
  const f = () => {
362
- F({
362
+ I({
363
363
  bold: document.queryCommandState("bold"),
364
364
  italic: document.queryCommandState("italic"),
365
365
  underline: document.queryCommandState("underline"),
@@ -379,72 +379,72 @@ const Xt = [
379
379
  };
380
380
  return document.addEventListener("selectionchange", f), () => document.removeEventListener("selectionchange", f);
381
381
  }, []), /* @__PURE__ */ i.createElement("div", {
382
- className: `rte-toolbar ${w || ""}`,
383
- style: x
384
- }, E.bold && /* @__PURE__ */ i.createElement("button", {
382
+ className: `rte-toolbar ${S || ""}`,
383
+ style: C
384
+ }, y.bold && /* @__PURE__ */ i.createElement("button", {
385
385
  "data-command": "bold",
386
386
  title: "Bold",
387
- onMouseDown: _,
388
- className: M.bold ? "rte-active" : ""
389
- }, /* @__PURE__ */ i.createElement(Ot, null)), E.italic && /* @__PURE__ */ i.createElement("button", {
387
+ onMouseDown: z,
388
+ className: R.bold ? "rte-active" : ""
389
+ }, /* @__PURE__ */ i.createElement(_t, null)), y.italic && /* @__PURE__ */ i.createElement("button", {
390
390
  "data-command": "italic",
391
391
  title: "Italic",
392
- onMouseDown: _,
393
- className: M.italic ? "rte-active" : ""
394
- }, /* @__PURE__ */ i.createElement(jt, null)), E.underline && /* @__PURE__ */ i.createElement("button", {
392
+ onMouseDown: z,
393
+ className: R.italic ? "rte-active" : ""
394
+ }, /* @__PURE__ */ i.createElement(Ft, null)), y.underline && /* @__PURE__ */ i.createElement("button", {
395
395
  "data-command": "underline",
396
396
  title: "Underline",
397
- onMouseDown: _,
398
- className: M.underline ? "rte-active" : ""
399
- }, /* @__PURE__ */ i.createElement(qt, null)), E.unorderedList && /* @__PURE__ */ i.createElement("button", {
397
+ onMouseDown: z,
398
+ className: R.underline ? "rte-active" : ""
399
+ }, /* @__PURE__ */ i.createElement(Bt, null)), y.unorderedList && /* @__PURE__ */ i.createElement("button", {
400
400
  "data-command": "insertUnorderedList",
401
- onMouseDown: _,
401
+ onMouseDown: z,
402
402
  title: "UnorderedList",
403
- className: M.unorderedList ? "rte-active" : ""
404
- }, /* @__PURE__ */ i.createElement(Vt, null)), E.staticUnorderedList && /* @__PURE__ */ i.createElement("button", {
403
+ className: R.unorderedList ? "rte-active" : ""
404
+ }, /* @__PURE__ */ i.createElement(Ut, null)), y.staticUnorderedList && /* @__PURE__ */ i.createElement("button", {
405
405
  "data-command": "insertStaticUnorderedList",
406
- onMouseDown: _,
406
+ onMouseDown: z,
407
407
  title: "StaticUnorderedList",
408
- className: M.unorderedList ? "rte-active" : ""
409
- }, /* @__PURE__ */ i.createElement(It, null)), E.orderedList && /* @__PURE__ */ i.createElement("button", {
408
+ className: R.unorderedList ? "rte-active" : ""
409
+ }, /* @__PURE__ */ i.createElement(Pt, null)), y.orderedList && /* @__PURE__ */ i.createElement("button", {
410
410
  "data-command": "insertOrderedList",
411
411
  title: "OrderedList",
412
- onMouseDown: _,
413
- className: M.orderedList ? "rte-active" : "",
412
+ onMouseDown: z,
413
+ className: R.orderedList ? "rte-active" : "",
414
414
  style: {
415
415
  fontSize: "medium"
416
416
  }
417
- }, /* @__PURE__ */ i.createElement(Bt, null)), E.staticOrderedList && /* @__PURE__ */ i.createElement("button", {
417
+ }, /* @__PURE__ */ i.createElement(Vt, null)), y.staticOrderedList && /* @__PURE__ */ i.createElement("button", {
418
418
  "data-command": "insertStaticOrderedList",
419
419
  title: "StaticOrderedList",
420
- onMouseDown: _,
421
- className: M.orderedList ? "rte-active" : ""
422
- }, /* @__PURE__ */ i.createElement(Dt, null)), E.link && /* @__PURE__ */ i.createElement("button", {
420
+ onMouseDown: z,
421
+ className: R.orderedList ? "rte-active" : ""
422
+ }, /* @__PURE__ */ i.createElement(Ht, null)), y.link && /* @__PURE__ */ i.createElement("button", {
423
423
  "data-command": "createLink",
424
424
  title: "Link",
425
- onClick: S,
426
- className: M.link ? "rte-active" : ""
427
- }, /* @__PURE__ */ i.createElement(Ft, null)), E.removeFormat && /* @__PURE__ */ i.createElement("button", {
425
+ onClick: L,
426
+ className: R.link ? "rte-active" : ""
427
+ }, /* @__PURE__ */ i.createElement(It, null)), y.removeFormat && /* @__PURE__ */ i.createElement("button", {
428
428
  "data-command": "Remove format",
429
429
  title: "removeFormat",
430
430
  onMouseDown: (f) => {
431
431
  f.preventDefault(), s(), T();
432
432
  },
433
- className: M.removeFormat ? "rte-active" : ""
434
- }, /* @__PURE__ */ i.createElement(Zt, null)), E.image && /* @__PURE__ */ i.createElement("button", {
433
+ className: R.removeFormat ? "rte-active" : ""
434
+ }, /* @__PURE__ */ i.createElement(Xt, null)), y.image && /* @__PURE__ */ i.createElement("button", {
435
435
  "data-command": "insertImage",
436
436
  title: "Image",
437
- onMouseDown: _,
438
- className: M.image ? "rte-active" : ""
439
- }, /* @__PURE__ */ i.createElement(zt, null)), /* @__PURE__ */ i.createElement("input", {
437
+ onMouseDown: z,
438
+ className: R.image ? "rte-active" : ""
439
+ }, /* @__PURE__ */ i.createElement(Dt, null)), /* @__PURE__ */ i.createElement("input", {
440
440
  type: "file",
441
441
  accept: "image/*",
442
- ref: R,
442
+ ref: x,
443
443
  style: {
444
444
  display: "none"
445
445
  },
446
446
  onChange: u
447
- }), E.emoji && /* @__PURE__ */ i.createElement("div", {
447
+ }), y.emoji && /* @__PURE__ */ i.createElement("div", {
448
448
  style: {
449
449
  position: "relative"
450
450
  }
@@ -452,55 +452,55 @@ const Xt = [
452
452
  title: "Emoji",
453
453
  onMouseDown: (f) => {
454
454
  f.preventDefault(), s();
455
- const L = f.currentTarget.getBoundingClientRect();
456
- z({
457
- x: L.left,
458
- y: L.bottom + 8
455
+ const b = f.currentTarget.getBoundingClientRect();
456
+ F({
457
+ x: b.left,
458
+ y: b.bottom + 8
459
459
  // small spacing
460
460
  }), j((V) => !V);
461
461
  },
462
- className: M.emoji ? "rte-active" : ""
463
- }, /* @__PURE__ */ i.createElement(Pt, null)), O && /* @__PURE__ */ bt(/* @__PURE__ */ i.createElement("div", {
462
+ className: R.emoji ? "rte-active" : ""
463
+ }, /* @__PURE__ */ i.createElement(qt, null)), _ && /* @__PURE__ */ Lt(/* @__PURE__ */ i.createElement("div", {
464
464
  className: "rte-emoji-popup",
465
465
  style: {
466
- top: P.y,
467
- left: P.x
466
+ top: H.y,
467
+ left: H.x
468
468
  }
469
- }, Xt.map((f, L) => /* @__PURE__ */ i.createElement("span", {
470
- key: L,
469
+ }, Kt.map((f, b) => /* @__PURE__ */ i.createElement("span", {
470
+ key: b,
471
471
  style: {
472
472
  fontSize: "20px",
473
473
  cursor: "pointer",
474
474
  textAlign: "center"
475
475
  },
476
476
  onMouseDown: (V) => {
477
- V.preventDefault(), b(f), j(!1);
477
+ V.preventDefault(), M(f), j(!1);
478
478
  }
479
- }, f))), document.body)), E.color && /* @__PURE__ */ i.createElement("div", {
479
+ }, f))), document.body)), y.color && /* @__PURE__ */ i.createElement("div", {
480
480
  style: {
481
481
  position: "relative"
482
482
  }
483
483
  }, /* @__PURE__ */ i.createElement("button", {
484
484
  title: "Text Color",
485
485
  onMouseDown: (f) => {
486
- var L;
487
- f.preventDefault(), s(), (L = H.current) == null || L.click();
486
+ var b;
487
+ f.preventDefault(), s(), (b = P.current) == null || b.click();
488
488
  },
489
489
  style: {
490
490
  display: "flex",
491
491
  alignItems: "center",
492
492
  justifyContent: "center",
493
- color: ((X = H.current) == null ? void 0 : X.value) || "#000",
493
+ color: ((X = P.current) == null ? void 0 : X.value) || "#000",
494
494
  fontSize: "18px"
495
495
  },
496
- className: M.color ? "rte-active" : ""
497
- }, /* @__PURE__ */ i.createElement(Wt, null)), /* @__PURE__ */ i.createElement("input", {
498
- ref: H,
496
+ className: R.color ? "rte-active" : ""
497
+ }, /* @__PURE__ */ i.createElement(Zt, null)), /* @__PURE__ */ i.createElement("input", {
498
+ ref: P,
499
499
  type: "color",
500
500
  defaultValue: "#000000",
501
501
  onChange: (f) => {
502
- var L;
503
- $(f), ((L = f.target.parentElement) == null ? void 0 : L.querySelector("button")).style.color = f.target.value;
502
+ var b;
503
+ $(f), ((b = f.target.parentElement) == null ? void 0 : b.querySelector("button")).style.color = f.target.value;
504
504
  },
505
505
  style: {
506
506
  position: "absolute",
@@ -509,30 +509,30 @@ const Xt = [
509
509
  height: 0,
510
510
  pointerEvents: "none"
511
511
  }
512
- })), E.highlight && /* @__PURE__ */ i.createElement("div", {
512
+ })), y.highlight && /* @__PURE__ */ i.createElement("div", {
513
513
  style: {
514
514
  position: "relative"
515
515
  }
516
516
  }, /* @__PURE__ */ i.createElement("button", {
517
517
  title: "Highlight",
518
518
  onMouseDown: (f) => {
519
- var L;
520
- f.preventDefault(), s(), (L = k.current) == null || L.click();
519
+ var b;
520
+ f.preventDefault(), s(), (b = N.current) == null || b.click();
521
521
  },
522
522
  style: {
523
523
  display: "flex",
524
524
  alignItems: "center",
525
525
  justifyContent: "center",
526
- color: ((B = k.current) == null ? void 0 : B.value) || "#000",
526
+ color: ((B = N.current) == null ? void 0 : B.value) || "#000",
527
527
  fontSize: "18px"
528
528
  },
529
- className: M.highlight ? "rte-active" : ""
530
- }, /* @__PURE__ */ i.createElement(_t, null)), /* @__PURE__ */ i.createElement("input", {
531
- ref: k,
529
+ className: R.highlight ? "rte-active" : ""
530
+ }, /* @__PURE__ */ i.createElement(jt, null)), /* @__PURE__ */ i.createElement("input", {
531
+ ref: N,
532
532
  type: "color",
533
533
  onChange: (f) => {
534
- var L;
535
- Z(f), ((L = f.target.parentElement) == null ? void 0 : L.querySelector("button")).style.color = f.target.value;
534
+ var b;
535
+ Z(f), ((b = f.target.parentElement) == null ? void 0 : b.querySelector("button")).style.color = f.target.value;
536
536
  },
537
537
  defaultValue: "#000000",
538
538
  style: {
@@ -542,38 +542,38 @@ const Xt = [
542
542
  height: 0,
543
543
  pointerEvents: "none"
544
544
  }
545
- })), E.align && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("button", {
545
+ })), y.align && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("button", {
546
546
  title: "Align Left",
547
547
  onMouseDown: (f) => f.preventDefault(),
548
548
  onClick: () => r("justifyLeft"),
549
- className: M.alignLeft ? "rte-active" : ""
550
- }, /* @__PURE__ */ i.createElement(Ht, null)), /* @__PURE__ */ i.createElement("button", {
549
+ className: R.alignLeft ? "rte-active" : ""
550
+ }, /* @__PURE__ */ i.createElement(Ot, null)), /* @__PURE__ */ i.createElement("button", {
551
551
  title: "Align Center",
552
552
  onMouseDown: (f) => f.preventDefault(),
553
553
  onClick: () => r("justifyCenter"),
554
- className: M.alignCenter ? "rte-active" : ""
555
- }, /* @__PURE__ */ i.createElement(Nt, null)), /* @__PURE__ */ i.createElement("button", {
554
+ className: R.alignCenter ? "rte-active" : ""
555
+ }, /* @__PURE__ */ i.createElement(kt, null)), /* @__PURE__ */ i.createElement("button", {
556
556
  title: "Align Right",
557
557
  onMouseDown: (f) => f.preventDefault(),
558
558
  onClick: () => r("justifyRight"),
559
- className: M.alignRight ? "rte-active" : ""
560
- }, /* @__PURE__ */ i.createElement(kt, null))), E.table && /* @__PURE__ */ i.createElement("button", {
559
+ className: R.alignRight ? "rte-active" : ""
560
+ }, /* @__PURE__ */ i.createElement(zt, null))), y.table && /* @__PURE__ */ i.createElement("button", {
561
561
  title: "Insert Dynamic Table",
562
562
  onMouseDown: (f) => f.preventDefault(),
563
563
  onClick: () => r("insertTable"),
564
- className: M.table ? "rte-active" : "",
564
+ className: R.table ? "rte-active" : "",
565
565
  style: {
566
566
  fontSize: "medium"
567
567
  }
568
- }, /* @__PURE__ */ i.createElement(Ut, null)), E.table && /* @__PURE__ */ i.createElement("button", {
568
+ }, /* @__PURE__ */ i.createElement($t, null)), y.table && /* @__PURE__ */ i.createElement("button", {
569
569
  title: "Insert Static Table",
570
570
  onMouseDown: (f) => f.preventDefault(),
571
571
  onClick: () => r("insertStaticTable"),
572
- className: M.table ? "rte-active" : "",
572
+ className: R.table ? "rte-active" : "",
573
573
  style: {
574
574
  fontSize: "medium"
575
575
  }
576
- }, /* @__PURE__ */ i.createElement($t, null)), E.fontFamily && /* @__PURE__ */ i.createElement("select", {
576
+ }, /* @__PURE__ */ i.createElement(Wt, null)), y.fontFamily && /* @__PURE__ */ i.createElement("select", {
577
577
  className: "rte-dropdown",
578
578
  defaultValue: "",
579
579
  onMouseDown: () => s(),
@@ -591,7 +591,7 @@ const Xt = [
591
591
  value: "Courier New"
592
592
  }, "Courier New"), /* @__PURE__ */ i.createElement("option", {
593
593
  value: "Verdana"
594
- }, "Verdana")), E.fontSize && /* @__PURE__ */ i.createElement("select", {
594
+ }, "Verdana")), y.fontSize && /* @__PURE__ */ i.createElement("select", {
595
595
  className: "rte-dropdown rte-fontsize-dropdown",
596
596
  defaultValue: "",
597
597
  onMouseDown: () => s(),
@@ -601,80 +601,80 @@ const Xt = [
601
601
  disabled: !0
602
602
  }, "Font Size"), Array.from({
603
603
  length: 16
604
- }, (f, L) => 10 + L).map((f) => /* @__PURE__ */ i.createElement("option", {
604
+ }, (f, b) => 10 + b).map((f) => /* @__PURE__ */ i.createElement("option", {
605
605
  key: f,
606
606
  value: f
607
607
  }, f, "px"))));
608
- }, Yt = ({
608
+ }, Qt = ({
609
609
  show: r,
610
610
  position: s,
611
611
  filtered: u,
612
612
  insertMention: g,
613
613
  onClose: p,
614
- query: b
614
+ query: M
615
615
  }) => {
616
- const S = W(null), [T, E] = D(0);
616
+ const L = W(null), [T, y] = D(0);
617
617
  return U(() => {
618
- r && E(0);
618
+ r && y(0);
619
619
  }, [r]), U(() => {
620
- const w = (x) => {
621
- S.current && !S.current.contains(x.target) && p();
620
+ const S = (C) => {
621
+ L.current && !L.current.contains(C.target) && p();
622
622
  };
623
- return r && document.addEventListener("mousedown", w), () => {
624
- document.removeEventListener("mousedown", w);
623
+ return r && document.addEventListener("mousedown", S), () => {
624
+ document.removeEventListener("mousedown", S);
625
625
  };
626
626
  }, [r, p]), U(() => {
627
627
  if (!r) return;
628
- const w = (x) => {
629
- if (!(!r || u.length === 0) && (x.key === "ArrowDown" && (x.preventDefault(), E((R) => Math.min(R + 1, u.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), E((R) => Math.max(R - 1, 0))), x.key === "Enter")) {
630
- x.preventDefault();
631
- const R = u[T];
632
- R && g(R);
628
+ const S = (C) => {
629
+ if (!(!r || u.length === 0) && (C.key === "ArrowDown" && (C.preventDefault(), y((x) => Math.min(x + 1, u.length - 1))), C.key === "ArrowUp" && (C.preventDefault(), y((x) => Math.max(x - 1, 0))), C.key === "Enter")) {
630
+ C.preventDefault();
631
+ const x = u[T];
632
+ x && g(x);
633
633
  }
634
634
  };
635
- return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
635
+ return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
636
636
  }, [r, u, T]), U(() => {
637
- if (!S.current) return;
638
- const x = S.current.querySelectorAll("li")[T];
639
- x && x.scrollIntoView({
637
+ if (!L.current) return;
638
+ const C = L.current.querySelectorAll("li")[T];
639
+ C && C.scrollIntoView({
640
640
  block: "nearest",
641
641
  behavior: "smooth"
642
642
  });
643
643
  }, [T]), r ? /* @__PURE__ */ i.createElement("ul", {
644
- ref: S,
644
+ ref: L,
645
645
  className: "rte-popup",
646
646
  style: {
647
647
  top: s.y,
648
648
  left: s.x
649
649
  }
650
650
  }, u.length > 0 ? u.map(({
651
- name: w,
652
- value: x
653
- }, R) => {
654
- const H = w.toLowerCase(), k = b.toLowerCase(), O = H.indexOf(k);
655
- let j = w;
656
- if (O !== -1 && b.length > 0) {
657
- const P = O + b.length;
658
- j = w.substring(0, O) + `<span class="rte-highlight">${w.substring(O, P)}</span>` + w.substring(P);
651
+ name: S,
652
+ value: C
653
+ }, x) => {
654
+ const P = S.toLowerCase(), N = M.toLowerCase(), _ = P.indexOf(N);
655
+ let j = S;
656
+ if (_ !== -1 && M.length > 0) {
657
+ const H = _ + M.length;
658
+ j = S.substring(0, _) + `<span class="rte-highlight">${S.substring(_, H)}</span>` + S.substring(H);
659
659
  }
660
660
  return /* @__PURE__ */ i.createElement("li", {
661
- key: x,
662
- onMouseDown: (P) => {
663
- P.preventDefault(), g({
664
- name: w,
665
- value: x
661
+ key: C,
662
+ onMouseDown: (H) => {
663
+ H.preventDefault(), g({
664
+ name: S,
665
+ value: C
666
666
  });
667
667
  },
668
668
  style: {
669
669
  padding: "6px 12px",
670
670
  cursor: "pointer",
671
671
  fontSize: "14px",
672
- background: R === T ? "#dce8ff" : "white"
672
+ background: x === T ? "#dce8ff" : "white"
673
673
  },
674
674
  dangerouslySetInnerHTML: {
675
675
  __html: j
676
676
  },
677
- onMouseEnter: () => E(R)
677
+ onMouseEnter: () => y(x)
678
678
  });
679
679
  }) : /* @__PURE__ */ i.createElement("li", {
680
680
  style: {
@@ -684,12 +684,12 @@ const Xt = [
684
684
  }, "No matches")) : null;
685
685
  };
686
686
  function Oe(r) {
687
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Minus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,11.5h0a.5.5,0,0,1,0,1H9a.5.5,0,0,1,0-1Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.934A9.933,9.933,0,1,1,21.932,12,9.945,9.945,0,0,1,12,21.934ZM12,3.068A8.933,8.933,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.068Z" }, child: [] }] }] }] })(r);
687
+ return k({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Minus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,11.5h0a.5.5,0,0,1,0,1H9a.5.5,0,0,1,0-1Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.934A9.933,9.933,0,1,1,21.932,12,9.945,9.945,0,0,1,12,21.934ZM12,3.068A8.933,8.933,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.068Z" }, child: [] }] }] }] })(r);
688
688
  }
689
- function G(r) {
690
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(r);
689
+ function ee(r) {
690
+ return k({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(r);
691
691
  }
692
- const Qt = ({
692
+ const Jt = ({
693
693
  visible: r,
694
694
  x: s,
695
695
  y: u,
@@ -697,106 +697,106 @@ const Qt = ({
697
697
  onClose: p
698
698
  }) => {
699
699
  if (!r) return null;
700
- const b = {
700
+ const M = {
701
701
  top: u,
702
702
  left: s
703
703
  };
704
704
  return /* @__PURE__ */ i.createElement("div", {
705
- style: b,
705
+ style: M,
706
706
  className: "rte-table-menu",
707
707
  onMouseLeave: p
708
708
  }, /* @__PURE__ */ i.createElement("button", {
709
709
  onClick: () => g("insertRowAbove")
710
- }, /* @__PURE__ */ i.createElement(G, null), " Insert row above"), /* @__PURE__ */ i.createElement("button", {
710
+ }, /* @__PURE__ */ i.createElement(ee, null), " Insert row above"), /* @__PURE__ */ i.createElement("button", {
711
711
  onClick: () => g("insertRowBelow")
712
- }, /* @__PURE__ */ i.createElement(G, null), " Insert row below"), /* @__PURE__ */ i.createElement("button", {
712
+ }, /* @__PURE__ */ i.createElement(ee, null), " Insert row below"), /* @__PURE__ */ i.createElement("button", {
713
713
  onClick: () => g("insertColLeft")
714
- }, /* @__PURE__ */ i.createElement(G, null), " Insert col left"), /* @__PURE__ */ i.createElement("button", {
714
+ }, /* @__PURE__ */ i.createElement(ee, null), " Insert col left"), /* @__PURE__ */ i.createElement("button", {
715
715
  onClick: () => g("insertColRight")
716
- }, /* @__PURE__ */ i.createElement(G, null), " Insert col right"), /* @__PURE__ */ i.createElement("button", {
716
+ }, /* @__PURE__ */ i.createElement(ee, null), " Insert col right"), /* @__PURE__ */ i.createElement("button", {
717
717
  onClick: () => g("deleteRow")
718
718
  }, /* @__PURE__ */ i.createElement(Oe, null), " Delete row"), /* @__PURE__ */ i.createElement("button", {
719
719
  onClick: () => g("deleteCol")
720
720
  }, /* @__PURE__ */ i.createElement(Oe, null), " Delete column"));
721
- }, Jt = ({
721
+ }, Gt = ({
722
722
  html: r,
723
723
  className: s,
724
724
  style: u
725
725
  }) => {
726
- const g = (b) => {
727
- const S = b.target;
728
- if (S.tagName === "A") {
729
- b.preventDefault();
730
- const T = S.href;
731
- T && window.open(T, "_blank", "noopener,noreferrer");
726
+ const g = (L) => {
727
+ const T = L.target;
728
+ if (T.tagName === "A") {
729
+ L.preventDefault();
730
+ const y = T.href;
731
+ y && window.open(y, "_blank", "noopener,noreferrer");
732
732
  }
733
- }, p = (b) => {
734
- const S = document.createElement("div");
735
- S.innerHTML = b;
736
- const T = document.createTreeWalker(S, NodeFilter.SHOW_TEXT, null), E = [];
737
- for (; T.nextNode(); ) {
738
- const w = T.currentNode;
739
- w.nodeValue && /{{\s*[\s\S]*?\s*}}/.test(w.nodeValue) && E.push(w);
733
+ }, p = (L) => L === "rgb(0, 0, 0)" || L === "rgba(0, 0, 0, 1)" || L === "#000" || L === "#000000" || L === "black", M = (L) => {
734
+ const T = document.createElement("div");
735
+ T.innerHTML = L;
736
+ const y = document.createTreeWalker(T, NodeFilter.SHOW_TEXT, null), S = [];
737
+ for (; y.nextNode(); ) {
738
+ const C = y.currentNode;
739
+ C.nodeValue && /{{\s*[\s\S]*?\s*}}/.test(C.nodeValue) && S.push(C);
740
740
  }
741
- return E.forEach((w) => {
742
- var P;
743
- const x = w.nodeValue || "", R = w.parentElement;
744
- if (!R) return;
745
- let H = R, k = !1;
746
- for (; H; ) {
747
- if (H.tagName === "FONT" && H.getAttribute("color")) {
748
- k = !0;
741
+ return S.forEach((C) => {
742
+ var F;
743
+ const x = C.nodeValue || "", P = C.parentElement;
744
+ if (!P) return;
745
+ let N = P, _ = !1;
746
+ for (; N; ) {
747
+ if (N.tagName === "FONT" && N.getAttribute("color")) {
748
+ _ = !0;
749
749
  break;
750
750
  }
751
- const z = (P = H.style) == null ? void 0 : P.color;
752
- if (z && z !== "") {
753
- k = !0;
751
+ const z = (F = N.style) == null ? void 0 : F.color;
752
+ if (z && !p(z)) {
753
+ _ = !0;
754
754
  break;
755
755
  }
756
- const _ = window.getComputedStyle(H);
757
- if (_.color && _.color !== "rgb(0, 0, 0)" && _.color !== "rgba(0, 0, 0, 0)") {
758
- k = !0;
756
+ const $ = window.getComputedStyle(N);
757
+ if ($.color && !p($.color)) {
758
+ _ = !0;
759
759
  break;
760
760
  }
761
- H = H.parentElement;
761
+ N = N.parentElement;
762
762
  }
763
- const O = document.createDocumentFragment();
764
- let j = 0;
765
- x.replace(/{{\s*([\s\S]*?)\s*}}/g, (z, _, $) => {
766
- if ($ > j && O.appendChild(document.createTextNode(x.slice(j, $))), k)
767
- O.appendChild(document.createTextNode(z));
763
+ const j = document.createDocumentFragment();
764
+ let H = 0;
765
+ x.replace(/{{\s*([\s\S]*?)\s*}}/g, (z, $, Z) => {
766
+ if (Z > H && j.appendChild(document.createTextNode(x.slice(H, Z))), _)
767
+ j.appendChild(document.createTextNode(z));
768
768
  else {
769
- const Z = document.createElement("span");
770
- Z.style.color = "blue", Z.textContent = z, O.appendChild(Z);
769
+ const R = document.createElement("span");
770
+ R.style.color = "blue", R.textContent = z, j.appendChild(R);
771
771
  }
772
- return j = $ + z.length, z;
773
- }), j < x.length && O.appendChild(document.createTextNode(x.slice(j))), R.replaceChild(O, w);
774
- }), S.innerHTML = S.innerHTML.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""), S.innerHTML;
772
+ return H = Z + z.length, z;
773
+ }), H < x.length && j.appendChild(document.createTextNode(x.slice(H))), P.replaceChild(j, C);
774
+ }), T.innerHTML = T.innerHTML.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""), T.innerHTML;
775
775
  };
776
776
  return /* @__PURE__ */ i.createElement("div", {
777
777
  className: `rte-preview ${s || ""}`,
778
778
  style: u,
779
779
  onClick: g,
780
780
  dangerouslySetInnerHTML: {
781
- __html: p(r)
781
+ __html: M(r)
782
782
  }
783
783
  });
784
- }, Gt = ({
784
+ }, en = ({
785
785
  visible: r,
786
786
  linkData: s,
787
787
  onClose: u,
788
788
  onInsert: g
789
789
  }) => {
790
- const [p, b] = D(""), [S, T] = D(""), [E, w] = D(""), [x, R] = D("_self");
790
+ const [p, M] = D(""), [L, T] = D(""), [y, S] = D(""), [C, x] = D("_self");
791
791
  if (U(() => {
792
- r ? (b(s.url || ""), T(s.text || ""), w(s.title || ""), R(s.target || "_self")) : (b(""), T(""), w(""), R("_self"));
792
+ r ? (M(s.url || ""), T(s.text || ""), S(s.title || ""), x(s.target || "_self")) : (M(""), T(""), S(""), x("_self"));
793
793
  }, [r, s]), !r) return null;
794
- const H = () => {
794
+ const P = () => {
795
795
  g({
796
796
  url: p,
797
- text: S,
798
- title: E,
799
- target: x
797
+ text: L,
798
+ title: y,
799
+ target: C
800
800
  });
801
801
  };
802
802
  return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("div", {
@@ -811,23 +811,23 @@ const Qt = ({
811
811
  className: "rte-link-modal__input",
812
812
  placeholder: "URL",
813
813
  value: p,
814
- onChange: (k) => b(k.target.value)
814
+ onChange: (N) => M(N.target.value)
815
815
  }), /* @__PURE__ */ i.createElement("input", {
816
816
  type: "text",
817
817
  className: "rte-link-modal__input",
818
818
  placeholder: "Text to Display",
819
- value: S,
820
- onChange: (k) => T(k.target.value)
819
+ value: L,
820
+ onChange: (N) => T(N.target.value)
821
821
  }), /* @__PURE__ */ i.createElement("input", {
822
822
  type: "text",
823
823
  className: "rte-link-modal__input",
824
824
  placeholder: "Title",
825
- value: E,
826
- onChange: (k) => w(k.target.value)
825
+ value: y,
826
+ onChange: (N) => S(N.target.value)
827
827
  }), /* @__PURE__ */ i.createElement("select", {
828
828
  className: "rte-link-modal__select",
829
- value: x,
830
- onChange: (k) => R(k.target.value)
829
+ value: C,
830
+ onChange: (N) => x(N.target.value)
831
831
  }, /* @__PURE__ */ i.createElement("option", {
832
832
  value: "_self"
833
833
  }, "Same tab"), /* @__PURE__ */ i.createElement("option", {
@@ -839,7 +839,7 @@ const Qt = ({
839
839
  onClick: u
840
840
  }, "Cancel"), /* @__PURE__ */ i.createElement("button", {
841
841
  className: "rte-link-modal__btn rte-link-modal__btn--ok",
842
- onClick: H
842
+ onClick: P
843
843
  }, "OK"))));
844
844
  };
845
845
  function _e(r) {
@@ -851,7 +851,7 @@ function _e(r) {
851
851
  value: g
852
852
  }));
853
853
  }
854
- const rn = ({
854
+ const an = ({
855
855
  atSuggestions: r = [],
856
856
  showOutput: s = !1,
857
857
  showPreview: u = !1,
@@ -870,26 +870,26 @@ const rn = ({
870
870
  staticOrderedList: !1
871
871
  },
872
872
  classNames: p = {},
873
- styles: b = {},
874
- handleGetHtml: S = () => {
873
+ styles: M = {},
874
+ handleGetHtml: L = () => {
875
875
  },
876
876
  onChange: T = () => {
877
877
  },
878
- value: E,
879
- onMentionSelect: w = () => {
878
+ value: y,
879
+ onMentionSelect: S = () => {
880
880
  },
881
- handleAddAttributes: x = () => {
881
+ handleAddAttributes: C = () => {
882
882
  }
883
883
  }) => {
884
884
  var Ee, we, Ce, be, Le, xe, Re, Se, Me, Te, Ae, Ne;
885
- const R = W(null), [H, k] = D(E != null && E.length ? E : " "), [O, j] = D(""), [P, z] = D(!1), [_, $] = D({
885
+ const x = W(null), [P, N] = D(y != null && y.length ? y : " "), [_, j] = D(""), [H, F] = D(!1), [z, $] = D({
886
886
  x: 0,
887
887
  y: 0
888
- }), [Z, M] = D([]), F = W(null), X = W(null), [B, f] = D({
888
+ }), [Z, R] = D([]), I = W(null), X = W(null), [B, f] = D({
889
889
  visible: !1,
890
890
  x: 0,
891
891
  y: 0
892
- }), [L, V] = D(!1), J = W(null), [Ie, de] = D({
892
+ }), [b, V] = D(!1), G = W(null), [Ie, de] = D({
893
893
  url: "",
894
894
  text: "",
895
895
  title: "",
@@ -912,21 +912,21 @@ const rn = ({
912
912
  fontFamily: (Te = g.fontFamily) != null ? Te : !1,
913
913
  fontSize: (Ae = g.fontSize) != null ? Ae : !1,
914
914
  highlight: (Ne = g.fontSize) != null ? Ne : !1
915
- }, [qe, ne] = D(""), [ue, re] = D([]), q = () => R.current, A = () => {
915
+ }, [qe, re] = D(""), [ue, ae] = D([]), q = () => x.current, A = () => {
916
916
  const e = Be(), t = /^<div[^>]*style=["'][^"']*font-size\s*:\s*\d+px[^"']*["'][^>]*>/.test(e.trim());
917
917
  let n = e;
918
- t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>[\s\S]*?<\/\1>/g, (o, h, y) => {
919
- if (/list-type=["']static["']/.test(y) || o.includes("data-hidden-array-start") || o.includes("data-hidden-array-end")) return o;
920
- const m = `<${h}${y}>`, c = '<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>', v = '<span data-hidden-array-end="true" style="display:none">{{/arrayData}}</span>', C = `</${h}>`, I = o.replace(new RegExp(`^${m}`), "").replace(new RegExp(`${C}$`), "");
921
- return `${m}${c}${I}${v}${C}`;
922
- }), j(n), S == null || S(n);
918
+ t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>[\s\S]*?<\/\1>/g, (o, v, E) => {
919
+ if (/list-type=["']static["']/.test(E) || o.includes("data-hidden-array-start") || o.includes("data-hidden-array-end")) return o;
920
+ const m = `<${v}${E}>`, c = '<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>', h = '<span data-hidden-array-end="true" style="display:none">{{/arrayData}}</span>', w = `</${v}>`, O = o.replace(new RegExp(`^${m}`), "").replace(new RegExp(`${w}$`), "");
921
+ return `${m}${c}${O}${h}${w}`;
922
+ }), j(n), L == null || L(n);
923
923
  const a = ct(e);
924
924
  T(a);
925
925
  const d = Ye(), l = _e(d);
926
- JSON.stringify(l) !== JSON.stringify(ue) && (re(l), w(l));
926
+ JSON.stringify(l) !== JSON.stringify(ue) && (ae(l), S(l));
927
927
  }, Be = () => {
928
928
  const e = q();
929
- if (!e) return H;
929
+ if (!e) return P;
930
930
  const t = e.cloneNode(!0);
931
931
  t.querySelectorAll("table div").forEach((a) => a.remove()), t.querySelectorAll("table").forEach((a) => {
932
932
  a.removeAttribute("data-has-resize-handle");
@@ -944,32 +944,32 @@ const rn = ({
944
944
  const t = document.getElementById("rte-editor-body");
945
945
  if (!t) return;
946
946
  const n = e.getRangeAt(0);
947
- t.contains(n.startContainer) && (F.current = n.cloneRange());
947
+ t.contains(n.startContainer) && (I.current = n.cloneRange());
948
948
  }, Y = () => {
949
949
  const e = window.getSelection();
950
- !e || !F.current || (e.removeAllRanges(), e.addRange(F.current));
950
+ !e || !I.current || (e.removeAllRanges(), e.addRange(I.current));
951
951
  }, me = (e, t) => {
952
952
  const n = window.getSelection();
953
- n && n.rangeCount > 0 && (F.current = n.getRangeAt(0)), Y(), document.execCommand(e, !1, t), A();
953
+ n && n.rangeCount > 0 && (I.current = n.getRangeAt(0)), Y(), document.execCommand(e, !1, t), A();
954
954
  };
955
955
  U(() => {
956
956
  const e = q();
957
- if (!e || !E) return;
958
- const t = Ue(E);
957
+ if (!e || !y) return;
958
+ const t = Ue(y);
959
959
  e.innerHTML = t, A();
960
960
  }, []);
961
961
  const Ue = (e) => e.replace(/(<table[\s\S]*?>[\s\S]*?<\/table>)/g, (t) => t.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""));
962
962
  U(() => () => {
963
963
  document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
964
964
  }, []), U(() => {
965
- x && x((e) => {
965
+ C && C((e) => {
966
966
  Ke(e);
967
967
  });
968
968
  }, []), U(() => {
969
969
  const e = q();
970
970
  if (!e) return;
971
971
  e.querySelectorAll("table").forEach((n) => {
972
- n.hasAttribute("data-has-resize-handle") || (le(n), n.querySelectorAll("th, td").forEach((d) => Q(d)));
972
+ n.hasAttribute("data-has-resize-handle") || (ie(n), n.querySelectorAll("th, td").forEach((d) => Q(d)));
973
973
  });
974
974
  }, []);
975
975
  const ge = (e) => {
@@ -982,7 +982,7 @@ const rn = ({
982
982
  if (!(n != null && n.rangeCount)) return;
983
983
  const a = n.getRangeAt(0), d = ge(a.startContainer);
984
984
  let l, o;
985
- const h = t === "insertStaticUnorderedList" || t === "insertStaticOrderedList";
985
+ const v = t === "insertStaticUnorderedList" || t === "insertStaticOrderedList";
986
986
  if (d) {
987
987
  let c = d.querySelector(e);
988
988
  c || (c = document.createElement(e), c.style.margin = "0", c.style.paddingLeft = "20px", d.appendChild(c)), o = c, l = document.createElement("li"), l.textContent = "​", o.appendChild(l);
@@ -990,11 +990,11 @@ const rn = ({
990
990
  document.execCommand(e === "ul" ? "insertUnorderedList" : "insertOrderedList");
991
991
  const c = q();
992
992
  if (o = c == null ? void 0 : c.querySelector(`${e}:last-child`), !o) return;
993
- h && o.setAttribute("list-type", "static"), l = o.querySelector("li:last-child");
993
+ v && o.setAttribute("list-type", "static"), l = o.querySelector("li:last-child");
994
994
  }
995
- const y = document.createRange();
996
- y.setStart(l, 0), y.collapse(!0), n.removeAllRanges(), n.addRange(y), (m = q()) == null || m.focus(), A();
997
- }, ae = (e, t) => {
995
+ const E = document.createRange();
996
+ E.setStart(l, 0), E.collapse(!0), n.removeAllRanges(), n.addRange(E), (m = q()) == null || m.focus(), A();
997
+ }, oe = (e, t) => {
998
998
  e === "insertOrderedList" || e === "insertStaticOrderedList" ? fe("ol", e) : e === "insertUnorderedList" || e === "insertStaticUnorderedList" ? fe("ul", e) : e.startsWith("justify") ? dt(e) : me(e, t), e === "insertTable" && pe(), e === "insertStaticTable" && pe("insertStaticTable");
999
999
  }, $e = (e) => {
1000
1000
  const t = document.createElement("span");
@@ -1003,7 +1003,7 @@ const rn = ({
1003
1003
  t.remove(), $({
1004
1004
  x: n.left,
1005
1005
  y: n.bottom + window.scrollY
1006
- }), M(r || []), z(!0), X.current = e.cloneRange();
1006
+ }), R(r || []), F(!0), X.current = e.cloneRange();
1007
1007
  }, We = () => {
1008
1008
  const e = window.getSelection();
1009
1009
  if (!e || e.rangeCount === 0) return null;
@@ -1015,8 +1015,8 @@ const rn = ({
1015
1015
  if (a.nodeType === Node.TEXT_NODE) {
1016
1016
  const d = a.textContent || "", l = a === t ? n : d.length, o = d.lastIndexOf("@", l - 1);
1017
1017
  if (o !== -1) {
1018
- const h = document.createRange();
1019
- return h.setStart(a, o), h.setEnd(a, l), h;
1018
+ const v = document.createRange();
1019
+ return v.setStart(a, o), v.setEnd(a, l), v;
1020
1020
  }
1021
1021
  }
1022
1022
  a = a.previousSibling;
@@ -1038,20 +1038,20 @@ const rn = ({
1038
1038
  const m = document.createRange(), c = q();
1039
1039
  m.selectNodeContents(c), m.collapse(!1), m.insertNode(a);
1040
1040
  }
1041
- const h = document.createTextNode("​");
1042
- a.after(h);
1043
- const y = document.createRange();
1044
- y.setStartAfter(h), y.collapse(!0), t.removeAllRanges(), t.addRange(y);
1041
+ const v = document.createTextNode("​");
1042
+ a.after(v);
1043
+ const E = document.createRange();
1044
+ E.setStartAfter(v), E.collapse(!0), t.removeAllRanges(), t.addRange(E);
1045
1045
  } catch (o) {
1046
1046
  console.error("insertMention error:", o);
1047
1047
  }
1048
1048
  let d = _e([...ue, e]);
1049
- re(d), w(d), z(!1), (l = q()) == null || l.focus(), A();
1049
+ ae(d), S(d), F(!1), (l = q()) == null || l.focus(), A();
1050
1050
  }, Xe = (e) => {
1051
1051
  const t = q();
1052
1052
  if (!t) return;
1053
1053
  let n = null;
1054
- F.current && t.contains(F.current.startContainer) ? n = F.current.cloneRange() : (n = document.createRange(), n.selectNodeContents(t), n.collapse(!1));
1054
+ I.current && t.contains(I.current.startContainer) ? n = I.current.cloneRange() : (n = document.createRange(), n.selectNodeContents(t), n.collapse(!1));
1055
1055
  const a = window.getSelection();
1056
1056
  if (!a) return;
1057
1057
  a.removeAllRanges(), a.addRange(n);
@@ -1060,11 +1060,11 @@ const rn = ({
1060
1060
  const l = document.createTextNode(" ");
1061
1061
  d.after(l);
1062
1062
  const o = document.createRange();
1063
- o.setStartAfter(l), o.collapse(!0), a.removeAllRanges(), a.addRange(o), F.current = o.cloneRange(), t.focus();
1063
+ o.setStartAfter(l), o.collapse(!0), a.removeAllRanges(), a.addRange(o), I.current = o.cloneRange(), t.focus();
1064
1064
  }, Ke = (e) => {
1065
- e.forEach((t) => Xe(t)), re((t) => {
1065
+ e.forEach((t) => Xe(t)), ae((t) => {
1066
1066
  const n = [...t, ...e], a = Array.from(new Map(n.map((d) => [d.name, d])).values());
1067
- return w(a), a;
1067
+ return S(a), a;
1068
1068
  }), A();
1069
1069
  }, Ye = () => {
1070
1070
  const e = q();
@@ -1080,25 +1080,25 @@ const rn = ({
1080
1080
  }, Qe = (e) => {
1081
1081
  var n, a, d;
1082
1082
  const t = e.key.toLowerCase();
1083
- if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(t) && (e.preventDefault(), ae(t === "b" ? "bold" : t === "i" ? "italic" : t === "u" ? "underline" : "")), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
1083
+ if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(t) && (e.preventDefault(), oe(t === "b" ? "bold" : t === "i" ? "italic" : t === "u" ? "underline" : "")), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
1084
1084
  const l = window.getSelection(), o = l != null && l.anchorNode ? ge(l.anchorNode) : null;
1085
1085
  if (!o) return;
1086
1086
  if (((n = o.textContent) == null ? void 0 : n.replace(/\u200B/g, "").trim()) === "") {
1087
1087
  e.preventDefault();
1088
- const y = o.parentElement, m = y == null ? void 0 : y.closest("li");
1088
+ const E = o.parentElement, m = E == null ? void 0 : E.closest("li");
1089
1089
  if (m) {
1090
- y == null || y.removeChild(o);
1090
+ E == null || E.removeChild(o);
1091
1091
  const c = document.createElement("p");
1092
1092
  c.innerHTML = "<br />", (a = m.parentElement) == null || a.insertBefore(c, m.nextSibling);
1093
- const v = document.createRange();
1094
- v.setStart(c, 0), v.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(v);
1093
+ const h = document.createRange();
1094
+ h.setStart(c, 0), h.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(h);
1095
1095
  } else {
1096
1096
  const c = o.closest("ul, ol");
1097
1097
  if (c) {
1098
- const v = document.createElement("p");
1099
- v.innerHTML = "<br />", (d = c.parentElement) == null || d.insertBefore(v, c.nextSibling), c.removeChild(o);
1100
- const C = document.createRange();
1101
- C.setStart(v, 0), C.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(C);
1098
+ const h = document.createElement("p");
1099
+ h.innerHTML = "<br />", (d = c.parentElement) == null || d.insertBefore(h, c.nextSibling), c.removeChild(o);
1100
+ const w = document.createRange();
1101
+ w.setStart(h, 0), w.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(w);
1102
1102
  }
1103
1103
  }
1104
1104
  A();
@@ -1120,18 +1120,18 @@ const rn = ({
1120
1120
  const n = window.getSelection();
1121
1121
  if (!(n != null && n.rangeCount)) return;
1122
1122
  const a = n.anchorNode;
1123
- if (oe(a))
1123
+ if (le(a))
1124
1124
  return;
1125
1125
  setTimeout(() => {
1126
- $e(n.getRangeAt(0)), ne(""), M(r), z(!0);
1126
+ $e(n.getRangeAt(0)), re(""), R(r), F(!0);
1127
1127
  }, 0);
1128
1128
  return;
1129
1129
  }
1130
- if (P) {
1130
+ if (H) {
1131
1131
  setTimeout(() => he(), 0);
1132
1132
  return;
1133
1133
  }
1134
- }, oe = (e) => {
1134
+ }, le = (e) => {
1135
1135
  if (!e) return !1;
1136
1136
  let t = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement;
1137
1137
  for (; t; ) {
@@ -1143,48 +1143,48 @@ const rn = ({
1143
1143
  A();
1144
1144
  const e = window.getSelection();
1145
1145
  if (!e || !e.anchorNode) return;
1146
- if (oe(e.anchorNode)) {
1147
- z(!1);
1146
+ if (le(e.anchorNode)) {
1147
+ F(!1);
1148
1148
  return;
1149
1149
  }
1150
1150
  let t = e.anchorNode.textContent || "";
1151
1151
  t = t.replace(/\u00A0/g, " ");
1152
1152
  const n = t.match(/@([^\n]*)$/);
1153
1153
  if (!n) {
1154
- z(!1);
1154
+ F(!1);
1155
1155
  return;
1156
1156
  }
1157
1157
  const a = n[1].trim().toLowerCase();
1158
- ne(a);
1158
+ re(a);
1159
1159
  const d = r.filter((l) => l.name.toLowerCase().includes(a));
1160
- d.length > 0 ? (M(d), z(!0)) : z(!1);
1160
+ d.length > 0 ? (R(d), F(!0)) : F(!1);
1161
1161
  }, Ge = (e) => {
1162
1162
  var a;
1163
1163
  const t = (a = e.target.files) == null ? void 0 : a[0];
1164
1164
  if (!t) return;
1165
1165
  const n = new FileReader();
1166
1166
  n.onload = (d) => {
1167
- var C;
1168
- const l = (C = d.target) == null ? void 0 : C.result;
1167
+ var w;
1168
+ const l = (w = d.target) == null ? void 0 : w.result;
1169
1169
  Y();
1170
1170
  const o = window.getSelection();
1171
- let h = o && o.rangeCount ? o.getRangeAt(0) : null;
1172
- const y = document.createElement("img");
1173
- y.src = l, y.alt = t.name || "image", y.className = "rte-inserted-image", y.contentEditable = "true";
1171
+ let v = o && o.rangeCount ? o.getRangeAt(0) : null;
1172
+ const E = document.createElement("img");
1173
+ E.src = l, E.alt = t.name || "image", E.className = "rte-inserted-image", E.contentEditable = "true";
1174
1174
  const m = q();
1175
- if (!h || !m) {
1176
- m == null || m.appendChild(y);
1177
- const I = document.createTextNode(" ");
1178
- m == null || m.appendChild(I);
1179
- const ie = document.createRange();
1180
- ie.setStartAfter(I), ie.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(ie), m == null || m.focus(), A(), e.target.value = "";
1175
+ if (!v || !m) {
1176
+ m == null || m.appendChild(E);
1177
+ const O = document.createTextNode(" ");
1178
+ m == null || m.appendChild(O);
1179
+ const J = document.createRange();
1180
+ J.setStartAfter(O), J.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(J), m == null || m.focus(), A(), e.target.value = "";
1181
1181
  return;
1182
1182
  }
1183
- h.deleteContents(), h.insertNode(y);
1183
+ v.deleteContents(), v.insertNode(E);
1184
1184
  const c = document.createTextNode(" ");
1185
- y.after(c);
1186
- const v = document.createRange();
1187
- v.setStartAfter(c), v.collapse(!0), o.removeAllRanges(), o.addRange(v), m.focus(), A(), e.target.value = "";
1185
+ E.after(c);
1186
+ const h = document.createRange();
1187
+ h.setStartAfter(c), h.collapse(!0), o.removeAllRanges(), o.addRange(h), m.focus(), A(), e.target.value = "";
1188
1188
  }, n.readAsDataURL(t);
1189
1189
  }, et = (e) => {
1190
1190
  var d;
@@ -1195,7 +1195,7 @@ const rn = ({
1195
1195
  n.insertNode(a), n.setStartAfter(a), n.collapse(!0), t.removeAllRanges(), t.addRange(n), (d = q()) == null || d.focus(), A();
1196
1196
  }, pe = (e) => {
1197
1197
  var c;
1198
- ft(), Y();
1198
+ ht(), Y();
1199
1199
  const t = document.createElement("table");
1200
1200
  t.style.borderCollapse = "collapse", t.style.width = "100%", t.style.border = "1px solid #ccc", t.style.margin = "8px 0", t.style.position = "relative", t.style.textAlign = "center", p.table && t.classList.add(p.table);
1201
1201
  const n = document.createElement("thead");
@@ -1206,22 +1206,22 @@ const rn = ({
1206
1206
  p.tr && d.classList.add(p.tr);
1207
1207
  const l = document.createElement("tr");
1208
1208
  p.tr && l.classList.add(p.tr);
1209
- for (let v = 0; v < 2; v++) {
1210
- const C = document.createElement("th");
1211
- C.textContent = "", C.style.border = "1px solid #999", C.style.padding = "4px", C.style.position = "relative", C.style.backgroundColor = "lightgray", C.style.height = "20px", p.th && C.classList.add(p.th);
1212
- const I = document.createElement("td");
1213
- I.textContent = "", I.style.border = "1px solid #999", I.style.padding = "4px", I.style.position = "relative", I.style.backgroundColor = "#fff", I.style.height = "20px", p.td && I.classList.add(p.td), Q(C), Q(I), d.appendChild(C), l.appendChild(I);
1209
+ for (let h = 0; h < 2; h++) {
1210
+ const w = document.createElement("th");
1211
+ w.textContent = "", w.style.border = "1px solid #999", w.style.padding = "4px", w.style.position = "relative", w.style.backgroundColor = "lightgray", w.style.height = "20px", p.th && w.classList.add(p.th);
1212
+ const O = document.createElement("td");
1213
+ O.textContent = "", O.style.border = "1px solid #999", O.style.padding = "4px", O.style.position = "relative", O.style.backgroundColor = "#fff", O.style.height = "20px", p.td && O.classList.add(p.td), Q(w), Q(O), d.appendChild(w), l.appendChild(O);
1214
1214
  }
1215
- n.appendChild(d), a.appendChild(l), t.appendChild(n), t.appendChild(a), le(t);
1215
+ n.appendChild(d), a.appendChild(l), t.appendChild(n), t.appendChild(a), ie(t);
1216
1216
  const o = window.getSelection();
1217
1217
  if (!(o != null && o.rangeCount)) return;
1218
- const h = o.getRangeAt(0);
1219
- h.collapse(!1), h.insertNode(t);
1220
- const y = document.createElement("p");
1221
- y.innerHTML = "<br/>", t.after(y);
1218
+ const v = o.getRangeAt(0);
1219
+ v.collapse(!1), v.insertNode(t);
1220
+ const E = document.createElement("p");
1221
+ E.innerHTML = "<br/>", t.after(E);
1222
1222
  const m = document.createRange();
1223
- m.setStart(y, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), (c = q()) == null || c.focus(), A();
1224
- }, le = (e) => {
1223
+ m.setStart(E, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), (c = q()) == null || c.focus(), A();
1224
+ }, ie = (e) => {
1225
1225
  if (e.dataset.hasResizeHandle === "true") return;
1226
1226
  const t = document.createElement("div");
1227
1227
  Object.assign(t.style, {
@@ -1238,15 +1238,15 @@ const rn = ({
1238
1238
  let n = 0, a = 0, d = 0, l = 0;
1239
1239
  t.addEventListener("mousedown", (o) => {
1240
1240
  o.preventDefault(), n = o.clientX, a = o.clientY;
1241
- const h = e.getBoundingClientRect();
1242
- d = h.width, l = h.height;
1243
- const y = (c) => {
1244
- const v = Math.max(100, d + (c.clientX - n)), C = Math.max(20, l + (c.clientY - a));
1245
- e.style.width = `${v}px`, e.style.height = `${C}px`, A();
1241
+ const v = e.getBoundingClientRect();
1242
+ d = v.width, l = v.height;
1243
+ const E = (c) => {
1244
+ const h = Math.max(100, d + (c.clientX - n)), w = Math.max(20, l + (c.clientY - a));
1245
+ e.style.width = `${h}px`, e.style.height = `${w}px`, A();
1246
1246
  }, m = () => {
1247
- document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), A();
1247
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", m), A();
1248
1248
  };
1249
- document.addEventListener("mousemove", y), document.addEventListener("mouseup", m);
1249
+ document.addEventListener("mousemove", E), document.addEventListener("mouseup", m);
1250
1250
  }), e.appendChild(t);
1251
1251
  }, Q = (e) => {
1252
1252
  const t = document.createElement("div"), n = document.createElement("div");
@@ -1278,18 +1278,18 @@ const rn = ({
1278
1278
  }, tt = (e, t, n) => {
1279
1279
  let a = 0, d = 0, l = 0, o = 0;
1280
1280
  t.addEventListener("mousedown", (c) => {
1281
- c.preventDefault(), a = c.clientX, l = e.offsetWidth, document.addEventListener("mousemove", h), document.addEventListener("mouseup", m);
1281
+ c.preventDefault(), a = c.clientX, l = e.offsetWidth, document.addEventListener("mousemove", v), document.addEventListener("mouseup", m);
1282
1282
  }), n.addEventListener("mousedown", (c) => {
1283
- c.preventDefault(), d = c.clientY, o = e.offsetHeight, document.addEventListener("mousemove", y), document.addEventListener("mouseup", m);
1283
+ c.preventDefault(), d = c.clientY, o = e.offsetHeight, document.addEventListener("mousemove", E), document.addEventListener("mouseup", m);
1284
1284
  });
1285
- const h = (c) => {
1286
- const v = l + (c.clientX - a);
1287
- e.style.width = `${Math.max(30, v)}px`, A();
1288
- }, y = (c) => {
1289
- const v = o + (c.clientY - d);
1290
- e.style.height = `${Math.max(20, v)}px`, A();
1285
+ const v = (c) => {
1286
+ const h = l + (c.clientX - a);
1287
+ e.style.width = `${Math.max(30, h)}px`, A();
1288
+ }, E = (c) => {
1289
+ const h = o + (c.clientY - d);
1290
+ e.style.height = `${Math.max(20, h)}px`, A();
1291
1291
  }, m = () => {
1292
- document.removeEventListener("mousemove", h), document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), A();
1292
+ document.removeEventListener("mousemove", v), document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", m), A();
1293
1293
  };
1294
1294
  }, nt = (e) => {
1295
1295
  const n = e.target.closest("td, th");
@@ -1304,21 +1304,21 @@ const rn = ({
1304
1304
  }, rt = (e) => {
1305
1305
  if (!B.cell) return;
1306
1306
  const t = B.cell.closest("table"), n = B.cell.cellIndex, a = B.cell.parentElement.rowIndex, d = (l) => {
1307
- const o = l.tagName.toLowerCase(), h = document.createElement(o);
1308
- return h.textContent = "", h.style.cssText = l.style.cssText, Q(h), h;
1307
+ const o = l.tagName.toLowerCase(), v = document.createElement(o);
1308
+ return v.textContent = "", v.style.cssText = l.style.cssText, Q(v), v;
1309
1309
  };
1310
1310
  switch (e) {
1311
1311
  case "insertRowAbove": {
1312
1312
  const l = t.rows[a], o = t.insertRow(a);
1313
- Array.from(l.cells).forEach((h) => {
1314
- o.appendChild(d(h));
1313
+ Array.from(l.cells).forEach((v) => {
1314
+ o.appendChild(d(v));
1315
1315
  });
1316
1316
  break;
1317
1317
  }
1318
1318
  case "insertRowBelow": {
1319
1319
  const l = t.rows[a], o = t.insertRow(a + 1);
1320
- Array.from(l.cells).forEach((h) => {
1321
- o.appendChild(d(h));
1320
+ Array.from(l.cells).forEach((v) => {
1321
+ o.appendChild(d(v));
1322
1322
  });
1323
1323
  break;
1324
1324
  }
@@ -1349,7 +1349,7 @@ const rn = ({
1349
1349
  visible: !1
1350
1350
  })), ve();
1351
1351
  }, at = () => {
1352
- K(), J.current = F.current, de({
1352
+ K(), G.current = I.current, de({
1353
1353
  url: "",
1354
1354
  text: "",
1355
1355
  title: "",
@@ -1357,8 +1357,8 @@ const rn = ({
1357
1357
  }), V(!0);
1358
1358
  }, ot = (e) => {
1359
1359
  const t = window.getSelection();
1360
- if (!t || !J.current) return;
1361
- t.removeAllRanges(), t.addRange(J.current);
1360
+ if (!t || !G.current) return;
1361
+ t.removeAllRanges(), t.addRange(G.current);
1362
1362
  let n = e.url.trim();
1363
1363
  /^https?:\/\//i.test(n) || (n = "https://" + n);
1364
1364
  const a = document.createElement("a");
@@ -1379,7 +1379,7 @@ const rn = ({
1379
1379
  }
1380
1380
  e.preventDefault();
1381
1381
  const a = document.createRange();
1382
- a.selectNode(n), J.current = a, de({
1382
+ a.selectNode(n), G.current = a, de({
1383
1383
  url: n.href,
1384
1384
  text: n.textContent || n.href,
1385
1385
  title: n.title,
@@ -1390,9 +1390,9 @@ const rn = ({
1390
1390
  const e = q();
1391
1391
  if (!e) return;
1392
1392
  const t = window.getSelection();
1393
- if ((!t || t.rangeCount === 0) && F.current) {
1393
+ if ((!t || t.rangeCount === 0) && I.current) {
1394
1394
  const c = window.getSelection();
1395
- c == null || c.removeAllRanges(), c == null || c.addRange(F.current);
1395
+ c == null || c.removeAllRanges(), c == null || c.addRange(I.current);
1396
1396
  }
1397
1397
  const n = window.getSelection();
1398
1398
  if (!n || n.rangeCount === 0) return;
@@ -1400,22 +1400,22 @@ const rn = ({
1400
1400
  Y(), document.execCommand("removeFormat", !1);
1401
1401
  const d = a.cloneContents(), l = document.createElement("div");
1402
1402
  l.appendChild(d);
1403
- const o = document.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, null), h = [];
1403
+ const o = document.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, null), v = [];
1404
1404
  for (; o.nextNode(); ) {
1405
- const c = o.currentNode, v = c.tagName.toUpperCase(), C = c.getAttribute && c.getAttribute("data-mention") !== null;
1406
- v !== "A" && !C && h.push(c);
1405
+ const c = o.currentNode, h = c.tagName.toUpperCase(), w = c.getAttribute && c.getAttribute("data-mention") !== null;
1406
+ h !== "A" && !w && v.push(c);
1407
1407
  }
1408
- for (let c = h.length - 1; c >= 0; c--) {
1409
- const v = h[c], C = v.parentNode;
1410
- if (C) {
1411
- for (; v.firstChild; ) C.insertBefore(v.firstChild, v);
1412
- C.removeChild(v);
1408
+ for (let c = v.length - 1; c >= 0; c--) {
1409
+ const h = v[c], w = h.parentNode;
1410
+ if (w) {
1411
+ for (; h.firstChild; ) w.insertBefore(h.firstChild, h);
1412
+ w.removeChild(h);
1413
1413
  }
1414
1414
  }
1415
1415
  l.querySelectorAll("[style]").forEach((c) => c.removeAttribute("style")), a.deleteContents();
1416
- const y = document.createDocumentFragment();
1417
- for (; l.firstChild; ) y.appendChild(l.firstChild);
1418
- a.insertNode(y);
1416
+ const E = document.createDocumentFragment();
1417
+ for (; l.firstChild; ) E.appendChild(l.firstChild);
1418
+ a.insertNode(E);
1419
1419
  const m = document.createRange();
1420
1420
  m.setStartAfter(a.endContainer.nodeType === Node.TEXT_NODE ? a.endContainer : a.startContainer), m.collapse(!0), n.removeAllRanges(), n.addRange(m), e.normalize(), A();
1421
1421
  }, ct = (e) => {
@@ -1442,8 +1442,8 @@ const rn = ({
1442
1442
  const t = e.getRangeAt(0);
1443
1443
  if (t.collapsed) {
1444
1444
  let l = t.startContainer, o = l.nodeType === Node.ELEMENT_NODE ? l : l.parentElement;
1445
- const h = o == null ? void 0 : o.closest("td, th");
1446
- return h ? [h] : [];
1445
+ const v = o == null ? void 0 : o.closest("td, th");
1446
+ return v ? [v] : [];
1447
1447
  }
1448
1448
  const n = t.commonAncestorContainer, a = n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement;
1449
1449
  return Array.from(a.querySelectorAll("td, th")).filter((l) => {
@@ -1462,47 +1462,66 @@ const rn = ({
1462
1462
  a.style.textAlign = n;
1463
1463
  }), A();
1464
1464
  }
1465
- const ut = (e) => {
1466
- e.preventDefault();
1467
- const t = e.clipboardData.items;
1468
- for (let m = 0; m < t.length; m++) {
1469
- const c = t[m];
1470
- if (c.kind === "file" && c.type.startsWith("image/"))
1471
- return;
1472
- c.kind === "string" && c.getAsString((v) => {
1473
- /<img\s/i.test(v);
1474
- });
1465
+ const ut = () => {
1466
+ const e = window.getSelection();
1467
+ if (!e || !e.anchorNode) return !1;
1468
+ let t = e.anchorNode.nodeType === Node.ELEMENT_NODE ? e.anchorNode : e.anchorNode.parentElement;
1469
+ for (; t; ) {
1470
+ if (t.tagName === "TABLE") return !0;
1471
+ t = t.parentElement;
1472
+ }
1473
+ return !1;
1474
+ }, mt = (e) => {
1475
+ if (ut()) {
1476
+ e.preventDefault();
1477
+ const m = e.clipboardData.getData("text/plain");
1478
+ if (!m) return;
1479
+ const c = window.getSelection();
1480
+ if (!c || !c.rangeCount) return;
1481
+ const h = c.getRangeAt(0);
1482
+ h.deleteContents();
1483
+ const w = m.split(/\r?\n/);
1484
+ w.forEach((O, J) => {
1485
+ h.insertNode(document.createTextNode(O)), J < w.length - 1 && h.insertNode(document.createElement("br"));
1486
+ }), h.collapse(!1), c.removeAllRanges(), c.addRange(h), A();
1487
+ return;
1475
1488
  }
1476
- const n = e.clipboardData.getData("text/html") || "";
1477
- if (!n) return;
1489
+ const t = e.clipboardData.getData("text/html") || "";
1490
+ if (!t) return;
1491
+ const n = document.createElement("div");
1492
+ if (n.innerHTML = t, n.querySelector("img")) {
1493
+ e.preventDefault();
1494
+ return;
1495
+ }
1496
+ e.preventDefault();
1478
1497
  const a = document.createElement("div");
1479
- a.innerHTML = n;
1498
+ a.innerHTML = t;
1480
1499
  const d = (m) => {
1481
- m.style.borderCollapse = "collapse", m.style.width = "100%", m.style.border = "1px solid #ccc", m.style.margin = "8px 0", m.style.position = "relative", m.style.textAlign = "center", m.querySelectorAll("th").forEach((c) => {
1482
- const v = c;
1483
- v.style.border = "1px solid #999", v.style.padding = "4px", v.style.position = "relative", v.style.backgroundColor = "lightgray", v.style.height = "20px";
1500
+ m.hasAttribute("data-has-resize-handle") || (m.style.borderCollapse = "collapse", m.style.width = "100%", m.style.border = "1px solid #ccc", m.style.margin = "8px 0", m.style.position = "relative", m.style.textAlign = "center", m.querySelectorAll("th").forEach((c) => {
1501
+ const h = c;
1502
+ h.style.border = "1px solid #999", h.style.padding = "4px", h.style.position = "relative", h.style.backgroundColor = "lightgray", h.style.height = "20px";
1484
1503
  }), m.querySelectorAll("td").forEach((c) => {
1485
- const v = c;
1486
- v.style.border = "1px solid #999", v.style.padding = "4px", v.style.position = "relative", v.style.backgroundColor = "#fff", v.style.height = "20px";
1487
- });
1504
+ const h = c;
1505
+ h.style.border = "1px solid #999", h.style.padding = "4px", h.style.position = "relative", h.style.backgroundColor = "#fff", h.style.height = "20px";
1506
+ }));
1488
1507
  };
1489
1508
  a.querySelectorAll("table").forEach((m) => d(m));
1490
1509
  const l = window.getSelection();
1491
1510
  if (!l || !l.rangeCount) return;
1492
1511
  const o = l.getRangeAt(0);
1493
1512
  o.deleteContents();
1494
- const h = document.createDocumentFragment();
1495
- for (; a.firstChild; ) h.appendChild(a.firstChild);
1496
- o.insertNode(h), o.collapse(!1), l.removeAllRanges(), l.addRange(o);
1497
- const y = R.current;
1498
- y && (y.querySelectorAll("table").forEach((m) => {
1513
+ const v = document.createDocumentFragment();
1514
+ for (; a.firstChild; ) v.appendChild(a.firstChild);
1515
+ o.insertNode(v), o.collapse(!1), l.removeAllRanges(), l.addRange(o);
1516
+ const E = x.current;
1517
+ E && (E.querySelectorAll("table").forEach((m) => {
1499
1518
  const c = m;
1500
- c.hasAttribute("data-has-resize-handle") || (le(c), c.querySelectorAll("th, td").forEach((v) => {
1501
- const C = v;
1502
- C.dataset.hasResizeHandles || Q(C);
1519
+ c.hasAttribute("data-has-resize-handle") || (ie(c), c.querySelectorAll("th, td").forEach((h) => {
1520
+ const w = h;
1521
+ w.dataset.hasResizeHandles || Q(w);
1503
1522
  }));
1504
1523
  }), A());
1505
- }, mt = (e) => {
1524
+ }, gt = (e) => {
1506
1525
  Y();
1507
1526
  const t = window.getSelection();
1508
1527
  if (!t || !t.rangeCount) return;
@@ -1510,11 +1529,11 @@ const rn = ({
1510
1529
  a.style.fontSize = `${e}px`, a.appendChild(n.extractContents()), n.insertNode(a);
1511
1530
  const d = document.createRange();
1512
1531
  d.setStartAfter(a), d.collapse(!0), t.removeAllRanges(), t.addRange(d), A();
1513
- }, gt = () => {
1532
+ }, ft = () => {
1514
1533
  const e = window.getSelection();
1515
1534
  if (!e || !e.anchorNode) return null;
1516
1535
  const t = e.anchorNode;
1517
- if (oe(t) || t.nodeType !== Node.TEXT_NODE) return null;
1536
+ if (le(t) || t.nodeType !== Node.TEXT_NODE) return null;
1518
1537
  const n = t.textContent || "", a = e.anchorOffset, d = n.lastIndexOf("@", a - 1);
1519
1538
  if (d === -1) return null;
1520
1539
  const l = n.substring(d + 1, a);
@@ -1525,7 +1544,7 @@ const rn = ({
1525
1544
  query: l
1526
1545
  };
1527
1546
  }, ye = () => {
1528
- const e = gt();
1547
+ const e = ft();
1529
1548
  if (!e) return;
1530
1549
  const {
1531
1550
  range: t,
@@ -1536,58 +1555,58 @@ const rn = ({
1536
1555
  a.remove(), $({
1537
1556
  x: d.left,
1538
1557
  y: d.bottom + window.scrollY
1539
- }), ne(n.toLowerCase());
1558
+ }), re(n.toLowerCase());
1540
1559
  const l = r.filter((o) => o.name.toLowerCase().includes(n.toLowerCase()));
1541
- M(l), z(!0), X.current = t.cloneRange();
1560
+ R(l), F(!0), X.current = t.cloneRange();
1542
1561
  };
1543
- function ft() {
1544
- const e = R.current;
1562
+ function ht() {
1563
+ const e = x.current;
1545
1564
  if (!e) return;
1546
1565
  const t = window.getSelection();
1547
1566
  if (!t || t.rangeCount > 0 && e.contains(t.anchorNode))
1548
1567
  return;
1549
1568
  const n = document.createRange();
1550
- n.selectNodeContents(e), n.collapse(!1), t.removeAllRanges(), t.addRange(n), F.current = n.cloneRange();
1569
+ n.selectNodeContents(e), n.collapse(!1), t.removeAllRanges(), t.addRange(n), I.current = n.cloneRange();
1551
1570
  }
1552
- const ht = (e) => {
1571
+ const pt = (e) => {
1553
1572
  const t = e.target;
1554
- if (!t || !(t.textContent || "").match(/{{([\s\S]+?)}}/) || !R.current) return;
1573
+ if (!t || !(t.textContent || "").match(/{{([\s\S]+?)}}/) || !x.current) return;
1555
1574
  let l = t.firstChild;
1556
1575
  if ((!l || l.nodeType !== Node.TEXT_NODE) && (l = t.childNodes[0]), !l || l.nodeType !== Node.TEXT_NODE) return;
1557
- const o = l.textContent || "", h = o.indexOf("{{"), y = o.indexOf("}}");
1558
- if (h === -1 || y === -1) return;
1576
+ const o = l.textContent || "", v = o.indexOf("{{"), E = o.indexOf("}}");
1577
+ if (v === -1 || E === -1) return;
1559
1578
  const m = window.getSelection();
1560
1579
  if (!m) return;
1561
1580
  const c = document.createRange();
1562
- c.setStart(l, h), c.setEnd(l, y + 2), m.removeAllRanges(), m.addRange(c);
1581
+ c.setStart(l, v), c.setEnd(l, E + 2), m.removeAllRanges(), m.addRange(c);
1563
1582
  };
1564
1583
  return /* @__PURE__ */ i.createElement("div", {
1565
1584
  className: `rte-wrapper ${(p == null ? void 0 : p.wrapper) || ""}`,
1566
- style: b.wrapper
1585
+ style: M.wrapper
1567
1586
  }, /* @__PURE__ */ i.createElement("div", {
1568
1587
  style: {
1569
1588
  flex: 1
1570
1589
  }
1571
- }, /* @__PURE__ */ i.createElement(Kt, {
1572
- exec: ae,
1590
+ }, /* @__PURE__ */ i.createElement(Yt, {
1591
+ exec: oe,
1573
1592
  saveSelection: K,
1574
1593
  handleFileChange: Ge,
1575
- handleFontSizeChange: (e) => mt(e.target.value),
1576
- handleFontFamilyChange: (e) => ae("fontName", e.target.value),
1594
+ handleFontSizeChange: (e) => gt(e.target.value),
1595
+ handleFontFamilyChange: (e) => oe("fontName", e.target.value),
1577
1596
  insertEmoji: et,
1578
1597
  handleLink: at,
1579
1598
  removeFormatting: it,
1580
1599
  visibleActions: Pe,
1581
1600
  className: p.toolbar,
1582
- style: b.toolbar
1601
+ style: M.toolbar
1583
1602
  }), /* @__PURE__ */ i.createElement("div", {
1584
- ref: R,
1603
+ ref: x,
1585
1604
  id: "rte-editor-body",
1586
1605
  className: `rte-editor ${(p == null ? void 0 : p.editor) || ""}`,
1587
- style: b.editor,
1606
+ style: M.editor,
1588
1607
  contentEditable: !0,
1589
1608
  suppressContentEditableWarning: !0,
1590
- onPaste: ut,
1609
+ onPaste: mt,
1591
1610
  onKeyUp: () => {
1592
1611
  K(), ye();
1593
1612
  },
@@ -1601,18 +1620,18 @@ const rn = ({
1601
1620
  onClick: (e) => {
1602
1621
  lt(e), K(), ye();
1603
1622
  },
1604
- onDoubleClick: ht
1605
- }), /* @__PURE__ */ i.createElement(Yt, {
1606
- show: P,
1607
- position: _,
1623
+ onDoubleClick: pt
1624
+ }), /* @__PURE__ */ i.createElement(Qt, {
1625
+ show: H,
1626
+ position: z,
1608
1627
  filtered: Z,
1609
1628
  insertMention: Ze,
1610
- onClose: () => z(!1),
1629
+ onClose: () => F(!1),
1611
1630
  query: qe
1612
1631
  }), s && /* @__PURE__ */ i.createElement("div", {
1613
1632
  className: `rte-output ${(p == null ? void 0 : p.output) || ""}`,
1614
- style: b.output
1615
- }, /* @__PURE__ */ i.createElement("h4", null, "Output HTML:"), /* @__PURE__ */ i.createElement("p", null, O)), /* @__PURE__ */ i.createElement(Qt, {
1633
+ style: M.output
1634
+ }, /* @__PURE__ */ i.createElement("h4", null, "Output HTML:"), /* @__PURE__ */ i.createElement("p", null, _)), /* @__PURE__ */ i.createElement(Jt, {
1616
1635
  visible: B.visible,
1617
1636
  x: B.x,
1618
1637
  y: B.y,
@@ -1622,19 +1641,19 @@ const rn = ({
1622
1641
  visible: !1
1623
1642
  })), ve();
1624
1643
  }
1625
- }), /* @__PURE__ */ i.createElement(Gt, {
1626
- visible: L,
1644
+ }), /* @__PURE__ */ i.createElement(en, {
1645
+ visible: b,
1627
1646
  linkData: Ie,
1628
1647
  onClose: () => V(!1),
1629
1648
  onInsert: ot
1630
- })), u ? /* @__PURE__ */ i.createElement(Jt, {
1649
+ })), u ? /* @__PURE__ */ i.createElement(Gt, {
1631
1650
  className: p.preview,
1632
- style: b.preview,
1633
- html: O
1651
+ style: M.preview,
1652
+ html: _
1634
1653
  }) : null);
1635
1654
  };
1636
1655
  export {
1637
- rn as RichTextEditor,
1638
- Jt as RtePreview,
1639
- Kt as RteToolbar
1656
+ an as RichTextEditor,
1657
+ Gt as RtePreview,
1658
+ Yt as RteToolbar
1640
1659
  };