@ryzeup/richtexteditor 1.0.0 → 1.0.2

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,5 +1,5 @@
1
- import Y, { useRef as $, useState as O, useEffect as le } from "react";
2
- var de = { exports: {} }, oe = {};
1
+ import U, { useRef as Y, useState as H, useEffect as oe } from "react";
2
+ var de = { exports: {} }, ne = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,29 +9,29 @@ var de = { exports: {} }, oe = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var be;
13
- function ze() {
14
- if (be) return oe;
15
- be = 1;
12
+ var ye;
13
+ function He() {
14
+ if (ye) return ne;
15
+ ye = 1;
16
16
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
17
- function u(c, h, g) {
18
- var E = null;
19
- if (g !== void 0 && (E = "" + g), h.key !== void 0 && (E = "" + h.key), "key" in h) {
20
- g = {};
17
+ function u(c, h, v) {
18
+ var L = null;
19
+ if (v !== void 0 && (L = "" + v), h.key !== void 0 && (L = "" + h.key), "key" in h) {
20
+ v = {};
21
21
  for (var y in h)
22
- y !== "key" && (g[y] = h[y]);
23
- } else g = h;
24
- return h = g.ref, {
22
+ y !== "key" && (v[y] = h[y]);
23
+ } else v = h;
24
+ return h = v.ref, {
25
25
  $$typeof: t,
26
26
  type: c,
27
- key: E,
27
+ key: L,
28
28
  ref: h !== void 0 ? h : null,
29
- props: g
29
+ props: v
30
30
  };
31
31
  }
32
- return oe.Fragment = s, oe.jsx = u, oe.jsxs = u, oe;
32
+ return ne.Fragment = s, ne.jsx = u, ne.jsxs = u, ne;
33
33
  }
34
- var ae = {};
34
+ var re = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,44 +41,44 @@ var ae = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var ye;
45
- function Oe() {
46
- return ye || (ye = 1, process.env.NODE_ENV !== "production" && (function() {
44
+ var Ce;
45
+ function Fe() {
46
+ return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && (function() {
47
47
  function t(n) {
48
48
  if (n == null) return null;
49
49
  if (typeof n == "function")
50
- return n.$$typeof === S ? null : n.displayName || n.name || null;
50
+ return n.$$typeof === le ? null : n.displayName || n.name || null;
51
51
  if (typeof n == "string") return n;
52
52
  switch (n) {
53
- case _:
53
+ case S:
54
54
  return "Fragment";
55
- case z:
55
+ case D:
56
56
  return "Profiler";
57
- case X:
57
+ case W:
58
58
  return "StrictMode";
59
- case J:
59
+ case G:
60
60
  return "Suspense";
61
61
  case pe:
62
62
  return "SuspenseList";
63
- case P:
63
+ case ge:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof n == "object")
67
67
  switch (typeof n.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
69
  ), n.$$typeof) {
70
- case U:
70
+ case B:
71
71
  return "Portal";
72
- case A:
72
+ case M:
73
73
  return n.displayName || "Context";
74
- case m:
74
+ case f:
75
75
  return (n._context.displayName || "Context") + ".Consumer";
76
- case G:
76
+ case X:
77
77
  var p = n.render;
78
78
  return n = n.displayName, n || (n = p.displayName || p.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
79
- case se:
79
+ case ae:
80
80
  return p = n.displayName || null, p !== null ? p : t(n.type) || "Memo";
81
- case ee:
81
+ case J:
82
82
  p = n._payload, n = n._init;
83
83
  try {
84
84
  return t(n(p));
@@ -99,17 +99,17 @@ function Oe() {
99
99
  }
100
100
  if (p) {
101
101
  p = console;
102
- var R = p.error, j = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
102
+ var R = p.error, _ = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
103
  return R.call(
104
104
  p,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- j
106
+ _
107
107
  ), s(n);
108
108
  }
109
109
  }
110
110
  function c(n) {
111
- if (n === _) return "<>";
112
- if (typeof n == "object" && n !== null && n.$$typeof === ee)
111
+ if (n === S) return "<>";
112
+ if (typeof n == "object" && n !== null && n.$$typeof === J)
113
113
  return "<...>";
114
114
  try {
115
115
  var p = t(n);
@@ -119,14 +119,14 @@ function Oe() {
119
119
  }
120
120
  }
121
121
  function h() {
122
- var n = Z.A;
122
+ var n = z.A;
123
123
  return n === null ? null : n.getOwner();
124
124
  }
125
- function g() {
125
+ function v() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function E(n) {
129
- if (V.call(n, "key")) {
128
+ function L(n) {
129
+ if (T.call(n, "key")) {
130
130
  var p = Object.getOwnPropertyDescriptor(n, "key").get;
131
131
  if (p && p.isReactWarning) return !1;
132
132
  }
@@ -146,19 +146,19 @@ function Oe() {
146
146
  }
147
147
  function x() {
148
148
  var n = t(this.type);
149
- return ce[n] || (ce[n] = !0, console.error(
149
+ return K[n] || (K[n] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), n = this.props.ref, n !== void 0 ? n : null;
152
152
  }
153
- function I(n, p, R, j, Q, ne) {
154
- var k = R.ref;
153
+ function F(n, p, R, _, Z, ee) {
154
+ var j = R.ref;
155
155
  return n = {
156
156
  $$typeof: q,
157
157
  type: n,
158
158
  key: p,
159
159
  props: R,
160
- _owner: j
161
- }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(n, "ref", {
160
+ _owner: _
161
+ }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(n, "ref", {
162
162
  enumerable: !1,
163
163
  get: x
164
164
  }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
@@ -175,125 +175,125 @@ function Oe() {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: Q
178
+ value: Z
179
179
  }), Object.defineProperty(n, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: ne
183
+ value: ee
184
184
  }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
185
185
  }
186
- function B(n, p, R, j, Q, ne) {
187
- var k = p.children;
188
- if (k !== void 0)
189
- if (j)
190
- if (ge(k)) {
191
- for (j = 0; j < k.length; j++)
192
- N(k[j]);
193
- Object.freeze && Object.freeze(k);
186
+ function O(n, p, R, _, Z, ee) {
187
+ var j = p.children;
188
+ if (j !== void 0)
189
+ if (_)
190
+ if (se(j)) {
191
+ for (_ = 0; _ < j.length; _++)
192
+ k(j[_]);
193
+ Object.freeze && Object.freeze(j);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else N(k);
199
- if (V.call(p, "key")) {
200
- k = t(n);
201
- var F = Object.keys(p).filter(function(ve) {
198
+ else k(j);
199
+ if (T.call(p, "key")) {
200
+ j = t(n);
201
+ var V = Object.keys(p).filter(function(ve) {
202
202
  return ve !== "key";
203
203
  });
204
- j = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", ue[k + j] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ _ = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Q[j + _] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
+ _,
211
212
  j,
212
- k,
213
- F,
214
- k
215
- ), ue[k + j] = !0);
213
+ V,
214
+ j
215
+ ), Q[j + _] = !0);
216
216
  }
217
- if (k = null, R !== void 0 && (u(R), k = "" + R), E(p) && (u(p.key), k = "" + p.key), "key" in p) {
217
+ if (j = null, R !== void 0 && (u(R), j = "" + R), L(p) && (u(p.key), j = "" + p.key), "key" in p) {
218
218
  R = {};
219
- for (var re in p)
220
- re !== "key" && (R[re] = p[re]);
219
+ for (var te in p)
220
+ te !== "key" && (R[te] = p[te]);
221
221
  } else R = p;
222
- return k && y(
222
+ return j && y(
223
223
  R,
224
224
  typeof n == "function" ? n.displayName || n.name || "Unknown" : n
225
- ), I(
225
+ ), F(
226
226
  n,
227
- k,
227
+ j,
228
228
  R,
229
229
  h(),
230
- Q,
231
- ne
230
+ Z,
231
+ ee
232
232
  );
233
233
  }
234
- function N(n) {
235
- H(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === ee && (n._payload.status === "fulfilled" ? H(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
234
+ function k(n) {
235
+ P(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === J && (n._payload.status === "fulfilled" ? P(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
236
  }
237
- function H(n) {
237
+ function P(n) {
238
238
  return typeof n == "object" && n !== null && n.$$typeof === q;
239
239
  }
240
- var L = Y, q = Symbol.for("react.transitional.element"), U = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), A = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), J = Symbol.for("react.suspense"), pe = Symbol.for("react.suspense_list"), se = Symbol.for("react.memo"), ee = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), S = Symbol.for("react.client.reference"), Z = L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, ge = Array.isArray, K = console.createTask ? console.createTask : function() {
240
+ var C = U, q = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), f = Symbol.for("react.consumer"), M = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), pe = Symbol.for("react.suspense_list"), ae = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), z = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, se = Array.isArray, $ = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- L = {
243
+ C = {
244
244
  react_stack_bottom_frame: function(n) {
245
245
  return n();
246
246
  }
247
247
  };
248
- var ie, ce = {}, te = L.react_stack_bottom_frame.bind(
249
- L,
250
- g
251
- )(), W = K(c(g)), ue = {};
252
- ae.Fragment = _, ae.jsx = function(n, p, R) {
253
- var j = 1e4 > Z.recentlyCreatedOwnerStacks++;
254
- return B(
248
+ var ie, K = {}, ce = C.react_stack_bottom_frame.bind(
249
+ C,
250
+ v
251
+ )(), ue = $(c(v)), Q = {};
252
+ re.Fragment = S, re.jsx = function(n, p, R) {
253
+ var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
254
+ return O(
255
255
  n,
256
256
  p,
257
257
  R,
258
258
  !1,
259
- j ? Error("react-stack-top-frame") : te,
260
- j ? K(c(n)) : W
259
+ _ ? Error("react-stack-top-frame") : ce,
260
+ _ ? $(c(n)) : ue
261
261
  );
262
- }, ae.jsxs = function(n, p, R) {
263
- var j = 1e4 > Z.recentlyCreatedOwnerStacks++;
264
- return B(
262
+ }, re.jsxs = function(n, p, R) {
263
+ var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
264
+ return O(
265
265
  n,
266
266
  p,
267
267
  R,
268
268
  !0,
269
- j ? Error("react-stack-top-frame") : te,
270
- j ? K(c(n)) : W
269
+ _ ? Error("react-stack-top-frame") : ce,
270
+ _ ? $(c(n)) : ue
271
271
  );
272
272
  };
273
- })()), ae;
273
+ })()), re;
274
274
  }
275
- var Ee;
276
- function Pe() {
277
- return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? de.exports = ze() : de.exports = Oe()), de.exports;
275
+ var Re;
276
+ function Ie() {
277
+ return Re || (Re = 1, process.env.NODE_ENV === "production" ? de.exports = He() : de.exports = Fe()), de.exports;
278
278
  }
279
- var r = Pe(), ke = {
279
+ var a = Ie(), _e = {
280
280
  color: void 0,
281
281
  size: void 0,
282
282
  className: void 0,
283
283
  style: void 0,
284
284
  attr: void 0
285
- }, Re = Y.createContext && /* @__PURE__ */ Y.createContext(ke), De = ["attr", "size", "title"];
286
- function He(t, s) {
285
+ }, Ee = U.createContext && /* @__PURE__ */ U.createContext(_e), Be = ["attr", "size", "title"];
286
+ function $e(t, s) {
287
287
  if (t == null) return {};
288
- var u = Fe(t, s), c, h;
288
+ var u = Ve(t, s), c, h;
289
289
  if (Object.getOwnPropertySymbols) {
290
- var g = Object.getOwnPropertySymbols(t);
291
- for (h = 0; h < g.length; h++)
292
- c = g[h], !(s.indexOf(c) >= 0) && Object.prototype.propertyIsEnumerable.call(t, c) && (u[c] = t[c]);
290
+ var v = Object.getOwnPropertySymbols(t);
291
+ for (h = 0; h < v.length; h++)
292
+ c = v[h], !(s.indexOf(c) >= 0) && Object.prototype.propertyIsEnumerable.call(t, c) && (u[c] = t[c]);
293
293
  }
294
294
  return u;
295
295
  }
296
- function Fe(t, s) {
296
+ function Ve(t, s) {
297
297
  if (t == null) return {};
298
298
  var u = {};
299
299
  for (var c in t)
@@ -313,7 +313,7 @@ function fe() {
313
313
  return t;
314
314
  }, fe.apply(this, arguments);
315
315
  }
316
- function Ce(t, s) {
316
+ function je(t, s) {
317
317
  var u = Object.keys(t);
318
318
  if (Object.getOwnPropertySymbols) {
319
319
  var c = Object.getOwnPropertySymbols(t);
@@ -326,22 +326,22 @@ function Ce(t, s) {
326
326
  function he(t) {
327
327
  for (var s = 1; s < arguments.length; s++) {
328
328
  var u = arguments[s] != null ? arguments[s] : {};
329
- s % 2 ? Ce(Object(u), !0).forEach(function(c) {
330
- Ie(t, c, u[c]);
331
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(u)) : Ce(Object(u)).forEach(function(c) {
329
+ s % 2 ? je(Object(u), !0).forEach(function(c) {
330
+ Ye(t, c, u[c]);
331
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(u)) : je(Object(u)).forEach(function(c) {
332
332
  Object.defineProperty(t, c, Object.getOwnPropertyDescriptor(u, c));
333
333
  });
334
334
  }
335
335
  return t;
336
336
  }
337
- function Ie(t, s, u) {
338
- return s = Be(s), s in t ? Object.defineProperty(t, s, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = u, t;
337
+ function Ye(t, s, u) {
338
+ return s = Ue(s), s in t ? Object.defineProperty(t, s, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = u, t;
339
339
  }
340
- function Be(t) {
341
- var s = Ve(t, "string");
340
+ function Ue(t) {
341
+ var s = We(t, "string");
342
342
  return typeof s == "symbol" ? s : s + "";
343
343
  }
344
- function Ve(t, s) {
344
+ function We(t, s) {
345
345
  if (typeof t != "object" || !t) return t;
346
346
  var u = t[Symbol.toPrimitive];
347
347
  if (u !== void 0) {
@@ -351,28 +351,28 @@ function Ve(t, s) {
351
351
  }
352
352
  return (s === "string" ? String : Number)(t);
353
353
  }
354
- function Le(t) {
355
- return t && t.map((s, u) => /* @__PURE__ */ Y.createElement(s.tag, he({
354
+ function ke(t) {
355
+ return t && t.map((s, u) => /* @__PURE__ */ U.createElement(s.tag, he({
356
356
  key: u
357
- }, s.attr), Le(s.child)));
357
+ }, s.attr), ke(s.child)));
358
358
  }
359
- function T(t) {
360
- return (s) => /* @__PURE__ */ Y.createElement($e, fe({
359
+ function N(t) {
360
+ return (s) => /* @__PURE__ */ U.createElement(qe, fe({
361
361
  attr: he({}, t.attr)
362
- }, s), Le(t.child));
362
+ }, s), ke(t.child));
363
363
  }
364
- function $e(t) {
364
+ function qe(t) {
365
365
  var s = (u) => {
366
366
  var {
367
367
  attr: c,
368
368
  size: h,
369
- title: g
370
- } = t, E = He(t, De), y = h || u.size || "1em", x;
371
- return u.className && (x = u.className), t.className && (x = (x ? x + " " : "") + t.className), /* @__PURE__ */ Y.createElement("svg", fe({
369
+ title: v
370
+ } = t, L = $e(t, Be), y = h || u.size || "1em", x;
371
+ return u.className && (x = u.className), t.className && (x = (x ? x + " " : "") + t.className), /* @__PURE__ */ U.createElement("svg", fe({
372
372
  stroke: "currentColor",
373
373
  fill: "currentColor",
374
374
  strokeWidth: "0"
375
- }, u.attr, c, E, {
375
+ }, u.attr, c, L, {
376
376
  className: x,
377
377
  style: he(he({
378
378
  color: t.color || u.color
@@ -380,56 +380,56 @@ function $e(t) {
380
380
  height: y,
381
381
  width: y,
382
382
  xmlns: "http://www.w3.org/2000/svg"
383
- }), g && /* @__PURE__ */ Y.createElement("title", null, g), t.children);
383
+ }), v && /* @__PURE__ */ U.createElement("title", null, v), t.children);
384
384
  };
385
- return Re !== void 0 ? /* @__PURE__ */ Y.createElement(Re.Consumer, null, (u) => s(u)) : s(ke);
386
- }
387
- function Ye(t) {
388
- return T({ 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: [] }] })(t);
389
- }
390
- function Ue(t) {
391
- return T({ 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: [] }] })(t);
392
- }
393
- function We(t) {
394
- return T({ 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: [] }] })(t);
395
- }
396
- function qe(t) {
397
- return T({ 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: [] }] })(t);
385
+ return Ee !== void 0 ? /* @__PURE__ */ U.createElement(Ee.Consumer, null, (u) => s(u)) : s(_e);
398
386
  }
399
387
  function Xe(t) {
400
- return T({ 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: [] }] })(t);
388
+ 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: [] }] })(t);
401
389
  }
402
390
  function Ge(t) {
403
- return T({ 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: [] }] })(t);
404
- }
405
- function Je(t) {
406
- return T({ 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: [] }] })(t);
391
+ 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: [] }] })(t);
407
392
  }
408
393
  function Ze(t) {
409
- return T({ 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: [] }] })(t);
394
+ 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: [] }] })(t);
395
+ }
396
+ function Je(t) {
397
+ 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: [] }] })(t);
410
398
  }
411
399
  function Ke(t) {
412
- return T({ 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: [] }] })(t);
400
+ 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: [] }] })(t);
413
401
  }
414
402
  function Qe(t) {
415
- return T({ 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: [] }] })(t);
403
+ 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: [] }] })(t);
416
404
  }
417
405
  function et(t) {
418
- return T({ 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: [] }] })(t);
406
+ 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: [] }] })(t);
419
407
  }
420
408
  function tt(t) {
421
- return T({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z" }, child: [] }] })(t);
409
+ 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: [] }] })(t);
422
410
  }
423
411
  function nt(t) {
424
- return T({ 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: [] }] })(t);
412
+ 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: [] }] })(t);
425
413
  }
426
414
  function rt(t) {
427
- return T({ 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: [] }] })(t);
415
+ 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: [] }] })(t);
428
416
  }
429
417
  function ot(t) {
430
- return T({ 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: [] }] })(t);
418
+ 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: [] }] })(t);
419
+ }
420
+ function at(t) {
421
+ return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z" }, child: [] }] })(t);
422
+ }
423
+ function lt(t) {
424
+ 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: [] }] })(t);
425
+ }
426
+ function st(t) {
427
+ 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: [] }] })(t);
431
428
  }
432
- const at = [
429
+ function it(t) {
430
+ 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: [] }] })(t);
431
+ }
432
+ const ct = [
433
433
  "😀",
434
434
  "😁",
435
435
  "😂",
@@ -541,141 +541,141 @@ const at = [
541
541
  "👏",
542
542
  "🫶",
543
543
  "👐"
544
- ], lt = ({
544
+ ], ut = ({
545
545
  exec: t,
546
546
  saveSelection: s,
547
547
  handleFileChange: u,
548
548
  handleFontSizeChange: c,
549
549
  handleFontFamilyChange: h,
550
550
  // insertListBlock,
551
- insertEmoji: g,
552
- handleLink: E,
551
+ insertEmoji: v,
552
+ handleLink: L,
553
553
  removeFormatting: y,
554
554
  visibleActions: x,
555
- className: I,
556
- style: B
555
+ className: F,
556
+ style: O
557
557
  }) => {
558
- const N = $(null), H = $(null), L = $(null), [q, U] = O(!1);
559
- le(() => {
560
- const m = (A) => {
561
- !A.target.closest(".rte-emoji-popup") && !A.target.closest("button[title='Emoji']") && U(!1);
558
+ const k = Y(null), P = Y(null), C = Y(null), [q, B] = H(!1);
559
+ oe(() => {
560
+ const f = (M) => {
561
+ !M.target.closest(".rte-emoji-popup") && !M.target.closest("button[title='Emoji']") && B(!1);
562
562
  };
563
- return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
563
+ return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
564
564
  }, []);
565
- const _ = (m) => {
566
- m.preventDefault();
567
- const A = m.currentTarget.dataset.command;
568
- if (A)
569
- switch (A) {
565
+ const S = (f) => {
566
+ f.preventDefault();
567
+ const M = f.currentTarget.dataset.command;
568
+ if (M)
569
+ switch (M) {
570
570
  case "bold":
571
571
  case "italic":
572
572
  case "underline":
573
573
  case "insertUnorderedList":
574
574
  case "insertOrderedList":
575
575
  case "removeFormat":
576
- t(A);
576
+ t(M);
577
577
  break;
578
578
  case "insertImage": {
579
- N.current?.click();
579
+ k.current?.click();
580
580
  break;
581
581
  }
582
582
  default:
583
- console.warn("Unknown command:", A);
583
+ console.warn("Unknown command:", M);
584
584
  }
585
- }, X = (m) => {
586
- t("foreColor", m.target.value);
587
- }, z = (m) => {
588
- t("backColor", m.target.value);
585
+ }, W = (f) => {
586
+ t("foreColor", f.target.value);
587
+ }, D = (f) => {
588
+ t("backColor", f.target.value);
589
589
  };
590
- return /* @__PURE__ */ r.jsxs("div", { className: `rte-toolbar ${I || ""}`, style: B, children: [
591
- x.bold && /* @__PURE__ */ r.jsx(
590
+ return /* @__PURE__ */ a.jsxs("div", { className: `rte-toolbar ${F || ""}`, style: O, children: [
591
+ x.bold && /* @__PURE__ */ a.jsx(
592
592
  "button",
593
593
  {
594
594
  "data-command": "bold",
595
595
  title: "Bold",
596
- onMouseDown: _,
597
- children: /* @__PURE__ */ r.jsx(Ge, {})
596
+ onMouseDown: S,
597
+ children: /* @__PURE__ */ a.jsx(Qe, {})
598
598
  }
599
599
  ),
600
- x.italic && /* @__PURE__ */ r.jsx(
600
+ x.italic && /* @__PURE__ */ a.jsx(
601
601
  "button",
602
602
  {
603
603
  "data-command": "italic",
604
604
  title: "Italic",
605
- onMouseDown: _,
606
- children: /* @__PURE__ */ r.jsx(Ze, {})
605
+ onMouseDown: S,
606
+ children: /* @__PURE__ */ a.jsx(tt, {})
607
607
  }
608
608
  ),
609
- x.underline && /* @__PURE__ */ r.jsx(
609
+ x.underline && /* @__PURE__ */ a.jsx(
610
610
  "button",
611
611
  {
612
612
  "data-command": "underline",
613
613
  title: "Underline",
614
- onMouseDown: _,
615
- children: /* @__PURE__ */ r.jsx(nt, {})
614
+ onMouseDown: S,
615
+ children: /* @__PURE__ */ a.jsx(lt, {})
616
616
  }
617
617
  ),
618
- x.unorderedList && /* @__PURE__ */ r.jsx(
618
+ x.unorderedList && /* @__PURE__ */ a.jsx(
619
619
  "button",
620
620
  {
621
621
  "data-command": "insertUnorderedList",
622
- onMouseDown: _,
622
+ onMouseDown: S,
623
623
  title: "UnorderedList",
624
- children: /* @__PURE__ */ r.jsx(Qe, {})
624
+ children: /* @__PURE__ */ a.jsx(rt, {})
625
625
  }
626
626
  ),
627
- x.orderedList && /* @__PURE__ */ r.jsx(
627
+ x.orderedList && /* @__PURE__ */ a.jsx(
628
628
  "button",
629
629
  {
630
630
  "data-command": "insertOrderedList",
631
631
  title: "OrderedList",
632
- onMouseDown: _,
633
- children: /* @__PURE__ */ r.jsx(qe, {})
632
+ onMouseDown: S,
633
+ children: /* @__PURE__ */ a.jsx(Je, {})
634
634
  }
635
635
  ),
636
- x.link && /* @__PURE__ */ r.jsx("button", { "data-command": "createLink", title: "Link", onClick: E, children: /* @__PURE__ */ r.jsx(Ke, {}) }),
637
- x.removeFormat && /* @__PURE__ */ r.jsx(
636
+ x.link && /* @__PURE__ */ a.jsx("button", { "data-command": "createLink", title: "Link", onClick: L, children: /* @__PURE__ */ a.jsx(nt, {}) }),
637
+ x.removeFormat && /* @__PURE__ */ a.jsx(
638
638
  "button",
639
639
  {
640
640
  "data-command": "Remove format",
641
641
  title: "removeFormat",
642
- onMouseDown: (m) => {
643
- m.preventDefault(), s(), y();
642
+ onMouseDown: (f) => {
643
+ f.preventDefault(), s(), y();
644
644
  },
645
- children: /* @__PURE__ */ r.jsx(ot, {})
645
+ children: /* @__PURE__ */ a.jsx(it, {})
646
646
  }
647
647
  ),
648
- x.image && /* @__PURE__ */ r.jsx(
648
+ x.image && /* @__PURE__ */ a.jsx(
649
649
  "button",
650
650
  {
651
651
  "data-command": "insertImage",
652
652
  title: "Image",
653
- onMouseDown: _,
654
- children: /* @__PURE__ */ r.jsx(We, {})
653
+ onMouseDown: S,
654
+ children: /* @__PURE__ */ a.jsx(Ze, {})
655
655
  }
656
656
  ),
657
- /* @__PURE__ */ r.jsx(
657
+ /* @__PURE__ */ a.jsx(
658
658
  "input",
659
659
  {
660
660
  type: "file",
661
661
  accept: "image/*",
662
- ref: N,
662
+ ref: k,
663
663
  style: { display: "none" },
664
664
  onChange: u
665
665
  }
666
666
  ),
667
- x.emoji && /* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
668
- /* @__PURE__ */ r.jsx(
667
+ x.emoji && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
668
+ /* @__PURE__ */ a.jsx(
669
669
  "button",
670
670
  {
671
671
  title: "Emoji",
672
- onMouseDown: (m) => {
673
- m.preventDefault(), s(), U((A) => !A);
672
+ onMouseDown: (f) => {
673
+ f.preventDefault(), s(), B((M) => !M);
674
674
  },
675
- children: /* @__PURE__ */ r.jsx(et, {})
675
+ children: /* @__PURE__ */ a.jsx(ot, {})
676
676
  }
677
677
  ),
678
- q && /* @__PURE__ */ r.jsx("div", { className: "rte-emoji-popup", children: at.map((m) => /* @__PURE__ */ r.jsx(
678
+ q && /* @__PURE__ */ a.jsx("div", { className: "rte-emoji-popup", children: ct.map((f) => /* @__PURE__ */ a.jsx(
679
679
  "span",
680
680
  {
681
681
  style: {
@@ -683,42 +683,42 @@ const at = [
683
683
  cursor: "pointer",
684
684
  textAlign: "center"
685
685
  },
686
- onMouseDown: (A) => {
687
- A.preventDefault(), g(m), U(!1);
686
+ onMouseDown: (M) => {
687
+ M.preventDefault(), v(f), B(!1);
688
688
  },
689
- children: m
689
+ children: f
690
690
  },
691
- m
691
+ f
692
692
  )) })
693
693
  ] }),
694
- x.color && /* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
695
- /* @__PURE__ */ r.jsx(
694
+ x.color && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
695
+ /* @__PURE__ */ a.jsx(
696
696
  "button",
697
697
  {
698
698
  title: "Text Color",
699
- onMouseDown: (m) => {
700
- m.preventDefault(), s(), H.current?.click();
699
+ onMouseDown: (f) => {
700
+ f.preventDefault(), s(), P.current?.click();
701
701
  },
702
702
  style: {
703
703
  display: "flex",
704
704
  alignItems: "center",
705
705
  justifyContent: "center",
706
- color: H.current?.value || "#000",
706
+ color: P.current?.value || "#000",
707
707
  fontSize: "18px"
708
708
  },
709
- children: /* @__PURE__ */ r.jsx(rt, {})
709
+ children: /* @__PURE__ */ a.jsx(st, {})
710
710
  }
711
711
  ),
712
- /* @__PURE__ */ r.jsx(
712
+ /* @__PURE__ */ a.jsx(
713
713
  "input",
714
714
  {
715
- ref: H,
715
+ ref: P,
716
716
  type: "color",
717
717
  defaultValue: "#000000",
718
- onChange: (m) => {
719
- X(m), (m.target.parentElement?.querySelector(
718
+ onChange: (f) => {
719
+ W(f), (f.target.parentElement?.querySelector(
720
720
  "button"
721
- )).style.color = m.target.value;
721
+ )).style.color = f.target.value;
722
722
  },
723
723
  style: {
724
724
  position: "absolute",
@@ -730,33 +730,33 @@ const at = [
730
730
  }
731
731
  )
732
732
  ] }),
733
- x.highlight && /* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
734
- /* @__PURE__ */ r.jsx(
733
+ x.highlight && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
734
+ /* @__PURE__ */ a.jsx(
735
735
  "button",
736
736
  {
737
737
  title: "Highlight",
738
- onMouseDown: (m) => {
739
- m.preventDefault(), s(), L.current?.click();
738
+ onMouseDown: (f) => {
739
+ f.preventDefault(), s(), C.current?.click();
740
740
  },
741
741
  style: {
742
742
  display: "flex",
743
743
  alignItems: "center",
744
744
  justifyContent: "center",
745
- color: L.current?.value || "#000",
745
+ color: C.current?.value || "#000",
746
746
  fontSize: "18px"
747
747
  },
748
- children: /* @__PURE__ */ r.jsx(Je, {})
748
+ children: /* @__PURE__ */ a.jsx(et, {})
749
749
  }
750
750
  ),
751
- /* @__PURE__ */ r.jsx(
751
+ /* @__PURE__ */ a.jsx(
752
752
  "input",
753
753
  {
754
- ref: L,
754
+ ref: C,
755
755
  type: "color",
756
- onChange: (m) => {
757
- z(m), (m.target.parentElement?.querySelector(
756
+ onChange: (f) => {
757
+ D(f), (f.target.parentElement?.querySelector(
758
758
  "button"
759
- )).style.color = m.target.value;
759
+ )).style.color = f.target.value;
760
760
  },
761
761
  defaultValue: "#000000",
762
762
  style: {
@@ -769,45 +769,45 @@ const at = [
769
769
  }
770
770
  )
771
771
  ] }),
772
- x.align && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
773
- /* @__PURE__ */ r.jsx(
772
+ x.align && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
773
+ /* @__PURE__ */ a.jsx(
774
774
  "button",
775
775
  {
776
776
  title: "Align Left",
777
- onMouseDown: (m) => m.preventDefault(),
777
+ onMouseDown: (f) => f.preventDefault(),
778
778
  onClick: () => t("justifyLeft"),
779
- children: /* @__PURE__ */ r.jsx(Xe, {})
779
+ children: /* @__PURE__ */ a.jsx(Ke, {})
780
780
  }
781
781
  ),
782
- /* @__PURE__ */ r.jsx(
782
+ /* @__PURE__ */ a.jsx(
783
783
  "button",
784
784
  {
785
785
  title: "Align Center",
786
- onMouseDown: (m) => m.preventDefault(),
786
+ onMouseDown: (f) => f.preventDefault(),
787
787
  onClick: () => t("justifyCenter"),
788
- children: /* @__PURE__ */ r.jsx(Ye, {})
788
+ children: /* @__PURE__ */ a.jsx(Xe, {})
789
789
  }
790
790
  ),
791
- /* @__PURE__ */ r.jsx(
791
+ /* @__PURE__ */ a.jsx(
792
792
  "button",
793
793
  {
794
794
  title: "Align Right",
795
- onMouseDown: (m) => m.preventDefault(),
795
+ onMouseDown: (f) => f.preventDefault(),
796
796
  onClick: () => t("justifyRight"),
797
- children: /* @__PURE__ */ r.jsx(Ue, {})
797
+ children: /* @__PURE__ */ a.jsx(Ge, {})
798
798
  }
799
799
  )
800
800
  ] }),
801
- x.table && /* @__PURE__ */ r.jsx(
801
+ x.table && /* @__PURE__ */ a.jsx(
802
802
  "button",
803
803
  {
804
804
  title: "Insert Table",
805
- onMouseDown: (m) => m.preventDefault(),
805
+ onMouseDown: (f) => f.preventDefault(),
806
806
  onClick: () => t("insertTable"),
807
- children: /* @__PURE__ */ r.jsx(tt, {})
807
+ children: /* @__PURE__ */ a.jsx(at, {})
808
808
  }
809
809
  ),
810
- x.fontFamily && /* @__PURE__ */ r.jsxs(
810
+ x.fontFamily && /* @__PURE__ */ a.jsxs(
811
811
  "select",
812
812
  {
813
813
  className: "rte-dropdown",
@@ -815,16 +815,16 @@ const at = [
815
815
  onMouseDown: () => s(),
816
816
  onChange: h,
817
817
  children: [
818
- /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: "Font Family" }),
819
- /* @__PURE__ */ r.jsx("option", { value: "Arial", children: "Arial" }),
820
- /* @__PURE__ */ r.jsx("option", { value: "Georgia", children: "Georgia" }),
821
- /* @__PURE__ */ r.jsx("option", { value: "Times New Roman", children: "Times New Roman" }),
822
- /* @__PURE__ */ r.jsx("option", { value: "Courier New", children: "Courier New" }),
823
- /* @__PURE__ */ r.jsx("option", { value: "Verdana", children: "Verdana" })
818
+ /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Family" }),
819
+ /* @__PURE__ */ a.jsx("option", { value: "Arial", children: "Arial" }),
820
+ /* @__PURE__ */ a.jsx("option", { value: "Georgia", children: "Georgia" }),
821
+ /* @__PURE__ */ a.jsx("option", { value: "Times New Roman", children: "Times New Roman" }),
822
+ /* @__PURE__ */ a.jsx("option", { value: "Courier New", children: "Courier New" }),
823
+ /* @__PURE__ */ a.jsx("option", { value: "Verdana", children: "Verdana" })
824
824
  ]
825
825
  }
826
826
  ),
827
- x.fontSize && /* @__PURE__ */ r.jsxs(
827
+ x.fontSize && /* @__PURE__ */ a.jsxs(
828
828
  "select",
829
829
  {
830
830
  className: "rte-dropdown",
@@ -832,66 +832,78 @@ const at = [
832
832
  onMouseDown: () => s(),
833
833
  onChange: c,
834
834
  children: [
835
- /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: "Font Size" }),
836
- /* @__PURE__ */ r.jsx("option", { value: "2", children: "Small " }),
837
- /* @__PURE__ */ r.jsx("option", { value: "3", children: "Normal" }),
838
- /* @__PURE__ */ r.jsx("option", { value: "4", children: "Medium" }),
839
- /* @__PURE__ */ r.jsx("option", { value: "5", children: "Large" })
835
+ /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Size" }),
836
+ /* @__PURE__ */ a.jsx("option", { value: "2", children: "Small " }),
837
+ /* @__PURE__ */ a.jsx("option", { value: "3", children: "Normal" }),
838
+ /* @__PURE__ */ a.jsx("option", { value: "4", children: "Medium" }),
839
+ /* @__PURE__ */ a.jsx("option", { value: "5", children: "Large" })
840
840
  ]
841
841
  }
842
842
  )
843
843
  ] });
844
- }, st = ({
844
+ }, dt = ({
845
845
  show: t,
846
846
  position: s,
847
847
  filtered: u,
848
848
  insertMention: c,
849
- onClose: h
849
+ onClose: h,
850
+ query: v
850
851
  }) => {
851
- const g = $(null);
852
- return le(() => {
853
- const E = (y) => {
854
- g.current && !g.current.contains(y.target) && h();
852
+ const L = Y(null);
853
+ return oe(() => {
854
+ const y = (x) => {
855
+ L.current && !L.current.contains(x.target) && h();
855
856
  };
856
- return t && document.addEventListener("mousedown", E), () => {
857
- document.removeEventListener("mousedown", E);
857
+ return t && document.addEventListener("mousedown", y), () => {
858
+ document.removeEventListener("mousedown", y);
858
859
  };
859
- }, [t, h]), t ? /* @__PURE__ */ r.jsx(
860
+ }, [t, h]), t ? /* @__PURE__ */ a.jsx(
860
861
  "ul",
861
862
  {
862
- ref: g,
863
+ ref: L,
863
864
  className: "rte-popup",
864
865
  style: {
865
866
  top: s.y,
866
867
  left: s.x
867
868
  },
868
- children: u.length > 0 ? u.map((E) => /* @__PURE__ */ r.jsx(
869
- "li",
870
- {
871
- onMouseDown: (y) => {
872
- y.preventDefault(), c(E);
873
- },
874
- style: {
875
- padding: "6px 12px",
876
- cursor: "pointer",
877
- fontSize: "14px"
869
+ children: u.length > 0 ? u.map(({ key: y, value: x }) => {
870
+ const F = y.toLowerCase(), O = v.toLowerCase(), k = F.indexOf(O);
871
+ let P = y;
872
+ if (k !== -1 && v.length > 0) {
873
+ const C = k + v.length;
874
+ P = y.substring(0, k) + `<span class="rte-highlight">${y.substring(
875
+ k,
876
+ C
877
+ )}</span>` + y.substring(C);
878
+ }
879
+ return /* @__PURE__ */ a.jsx(
880
+ "li",
881
+ {
882
+ onMouseDown: (C) => {
883
+ C.preventDefault(), c({ key: y, value: x });
884
+ },
885
+ style: {
886
+ padding: "6px 12px",
887
+ cursor: "pointer",
888
+ fontSize: "14px"
889
+ },
890
+ dangerouslySetInnerHTML: { __html: P },
891
+ onMouseEnter: (C) => C.currentTarget.style.background = "#f0f0f0",
892
+ onMouseLeave: (C) => C.currentTarget.style.background = "#fff"
878
893
  },
879
- onMouseEnter: (y) => y.currentTarget.style.background = "#f0f0f0",
880
- onMouseLeave: (y) => y.currentTarget.style.background = "#fff",
881
- children: E.key
882
- },
883
- E.value
884
- )) : /* @__PURE__ */ r.jsx("li", { style: { padding: "6px 12px", color: "#999" }, children: "No matches" })
894
+ x
895
+ );
896
+ }) : /* @__PURE__ */ a.jsx("li", { style: { padding: "6px 12px", color: "#999" }, children: "No matches" })
885
897
  }
886
898
  ) : null;
887
899
  };
888
- function je(t) {
889
- return T({ 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: [] }] }] }] })(t);
900
+ function Le(t) {
901
+ 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: [] }] }] }] })(t);
890
902
  }
891
903
  function me(t) {
892
- return T({ 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: [] }] }] }] })(t);
904
+ 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: [] }] }] }] })(t);
893
905
  }
894
- const it = ({
906
+ const mt = ({
895
907
  visible: t,
896
908
  x: s,
897
909
  y: u,
@@ -899,46 +911,46 @@ const it = ({
899
911
  onClose: h
900
912
  }) => {
901
913
  if (!t) return null;
902
- const g = {
914
+ const v = {
903
915
  top: u,
904
916
  left: s
905
917
  };
906
- return /* @__PURE__ */ r.jsxs("div", { style: g, className: "rte-table-menu", onMouseLeave: h, children: [
907
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("insertRowAbove"), children: [
908
- /* @__PURE__ */ r.jsx(me, {}),
918
+ return /* @__PURE__ */ a.jsxs("div", { style: v, className: "rte-table-menu", onMouseLeave: h, children: [
919
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertRowAbove"), children: [
920
+ /* @__PURE__ */ a.jsx(me, {}),
909
921
  " Insert row above"
910
922
  ] }),
911
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("insertRowBelow"), children: [
912
- /* @__PURE__ */ r.jsx(me, {}),
923
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertRowBelow"), children: [
924
+ /* @__PURE__ */ a.jsx(me, {}),
913
925
  " Insert row below"
914
926
  ] }),
915
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("insertColLeft"), children: [
916
- /* @__PURE__ */ r.jsx(me, {}),
927
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertColLeft"), children: [
928
+ /* @__PURE__ */ a.jsx(me, {}),
917
929
  " Insert col left"
918
930
  ] }),
919
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("insertColRight"), children: [
920
- /* @__PURE__ */ r.jsx(me, {}),
931
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertColRight"), children: [
932
+ /* @__PURE__ */ a.jsx(me, {}),
921
933
  " Insert col right"
922
934
  ] }),
923
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("deleteRow"), children: [
924
- /* @__PURE__ */ r.jsx(je, {}),
935
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("deleteRow"), children: [
936
+ /* @__PURE__ */ a.jsx(Le, {}),
925
937
  " Delete row"
926
938
  ] }),
927
- /* @__PURE__ */ r.jsxs("button", { onClick: () => c("deleteCol"), children: [
928
- /* @__PURE__ */ r.jsx(je, {}),
939
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => c("deleteCol"), children: [
940
+ /* @__PURE__ */ a.jsx(Le, {}),
929
941
  " Delete column"
930
942
  ] })
931
943
  ] });
932
- }, ct = ({ html: t, className: s, style: u }) => {
944
+ }, ft = ({ html: t, className: s, style: u }) => {
933
945
  const c = (h) => {
934
- const g = h.target;
935
- if (g.tagName === "A") {
946
+ const v = h.target;
947
+ if (v.tagName === "A") {
936
948
  h.preventDefault();
937
- const E = g.href;
938
- E && window.open(E, "_blank", "noopener,noreferrer");
949
+ const L = v.href;
950
+ L && window.open(L, "_blank", "noopener,noreferrer");
939
951
  }
940
952
  };
941
- return /* @__PURE__ */ r.jsx(
953
+ return /* @__PURE__ */ a.jsx(
942
954
  "div",
943
955
  {
944
956
  className: `rte-preview ${s || ""}`,
@@ -947,79 +959,79 @@ const it = ({
947
959
  dangerouslySetInnerHTML: { __html: t }
948
960
  }
949
961
  );
950
- }, ut = ({
962
+ }, ht = ({
951
963
  visible: t,
952
964
  linkData: s,
953
965
  onClose: u,
954
966
  onInsert: c
955
967
  }) => {
956
- const [h, g] = O(""), [E, y] = O(""), [x, I] = O(""), [B, N] = O("_self");
957
- if (le(() => {
958
- t ? (g(s.url || ""), y(s.text || ""), I(s.title || ""), N(s.target || "_self")) : (g(""), y(""), I(""), N("_self"));
968
+ const [h, v] = H(""), [L, y] = H(""), [x, F] = H(""), [O, k] = H("_self");
969
+ if (oe(() => {
970
+ t ? (v(s.url || ""), y(s.text || ""), F(s.title || ""), k(s.target || "_self")) : (v(""), y(""), F(""), k("_self"));
959
971
  }, [t, s]), !t) return null;
960
- const H = () => {
961
- c({ url: h, text: E, title: x, target: B });
972
+ const P = () => {
973
+ c({ url: h, text: L, title: x, target: O });
962
974
  };
963
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
964
- /* @__PURE__ */ r.jsx("div", { className: "rte-link-modal-overlay", onClick: u }),
965
- /* @__PURE__ */ r.jsxs("div", { className: "rte-link-modal", children: [
966
- /* @__PURE__ */ r.jsx("h4", { className: "rte-link-modal__title", children: h ? "Edit Link" : "Insert Link" }),
967
- /* @__PURE__ */ r.jsx(
975
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
976
+ /* @__PURE__ */ a.jsx("div", { className: "rte-link-modal-overlay", onClick: u }),
977
+ /* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal", children: [
978
+ /* @__PURE__ */ a.jsx("h4", { className: "rte-link-modal__title", children: h ? "Edit Link" : "Insert Link" }),
979
+ /* @__PURE__ */ a.jsx(
968
980
  "input",
969
981
  {
970
982
  type: "text",
971
983
  className: "rte-link-modal__input",
972
984
  placeholder: "URL",
973
985
  value: h,
974
- onChange: (L) => g(L.target.value)
986
+ onChange: (C) => v(C.target.value)
975
987
  }
976
988
  ),
977
- /* @__PURE__ */ r.jsx(
989
+ /* @__PURE__ */ a.jsx(
978
990
  "input",
979
991
  {
980
992
  type: "text",
981
993
  className: "rte-link-modal__input",
982
994
  placeholder: "Text to Display",
983
- value: E,
984
- onChange: (L) => y(L.target.value)
995
+ value: L,
996
+ onChange: (C) => y(C.target.value)
985
997
  }
986
998
  ),
987
- /* @__PURE__ */ r.jsx(
999
+ /* @__PURE__ */ a.jsx(
988
1000
  "input",
989
1001
  {
990
1002
  type: "text",
991
1003
  className: "rte-link-modal__input",
992
1004
  placeholder: "Title",
993
1005
  value: x,
994
- onChange: (L) => I(L.target.value)
1006
+ onChange: (C) => F(C.target.value)
995
1007
  }
996
1008
  ),
997
- /* @__PURE__ */ r.jsxs(
1009
+ /* @__PURE__ */ a.jsxs(
998
1010
  "select",
999
1011
  {
1000
1012
  className: "rte-link-modal__select",
1001
- value: B,
1002
- onChange: (L) => N(L.target.value),
1013
+ value: O,
1014
+ onChange: (C) => k(C.target.value),
1003
1015
  children: [
1004
- /* @__PURE__ */ r.jsx("option", { value: "_self", children: "Same tab" }),
1005
- /* @__PURE__ */ r.jsx("option", { value: "_blank", children: "New tab" })
1016
+ /* @__PURE__ */ a.jsx("option", { value: "_self", children: "Same tab" }),
1017
+ /* @__PURE__ */ a.jsx("option", { value: "_blank", children: "New tab" })
1006
1018
  ]
1007
1019
  }
1008
1020
  ),
1009
- /* @__PURE__ */ r.jsxs("div", { className: "rte-link-modal__actions", children: [
1010
- /* @__PURE__ */ r.jsx("button", { className: "rte-link-modal__btn", onClick: u, children: "Cancel" }),
1011
- /* @__PURE__ */ r.jsx(
1021
+ /* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal__actions", children: [
1022
+ /* @__PURE__ */ a.jsx("button", { className: "rte-link-modal__btn", onClick: u, children: "Cancel" }),
1023
+ /* @__PURE__ */ a.jsx(
1012
1024
  "button",
1013
1025
  {
1014
1026
  className: "rte-link-modal__btn rte-link-modal__btn--ok",
1015
- onClick: H,
1027
+ onClick: P,
1016
1028
  children: "OK"
1017
1029
  }
1018
1030
  )
1019
1031
  ] })
1020
1032
  ] })
1021
1033
  ] });
1022
- }, mt = ({
1034
+ }, gt = ({
1023
1035
  atSuggestions: t = [],
1024
1036
  showOutput: s = !1,
1025
1037
  showPreview: u = !1,
@@ -1034,16 +1046,18 @@ const it = ({
1034
1046
  highlight: !1
1035
1047
  },
1036
1048
  classNames: h = {},
1037
- styles: g = {},
1038
- handleGetHtml: E = () => {
1049
+ styles: v = {},
1050
+ handleGetHtml: L = () => {
1039
1051
  }
1040
1052
  }) => {
1041
- const y = $(null), [x, I] = O("<p>Always bet on Prime!</p>"), [B, N] = O(!1), [H, L] = O({ x: 0, y: 0 }), [q, U] = O([]), _ = $(null), X = $(null), [z, m] = O({ visible: !1, x: 0, y: 0 }), [A, G] = O(!1), J = $(null), [pe, se] = O({
1053
+ const y = Y(null), [x, F] = H("<p>Always bet on Prime!</p>"), [O, k] = H(!1), [P, C] = H({ x: 0, y: 0 }), [q, B] = H(
1054
+ []
1055
+ ), S = Y(null), W = Y(null), [D, f] = H({ visible: !1, x: 0, y: 0 }), [M, X] = H(!1), G = Y(null), [pe, ae] = H({
1042
1056
  url: "",
1043
1057
  text: "",
1044
1058
  title: "",
1045
1059
  target: "_self"
1046
- }), ee = {
1060
+ }), J = {
1047
1061
  bold: !0,
1048
1062
  italic: !0,
1049
1063
  underline: !0,
@@ -1059,160 +1073,211 @@ const it = ({
1059
1073
  fontFamily: c.fontFamily ?? !1,
1060
1074
  fontSize: c.fontSize ?? !1,
1061
1075
  highlight: c.fontSize ?? !1
1062
- }, P = () => y.current, S = () => {
1063
- I(P()?.innerHTML ?? "");
1064
- const e = we();
1065
- E?.(e);
1066
- }, Z = () => {
1076
+ }, [ge, le] = H(""), z = () => y.current, T = () => {
1077
+ F(z()?.innerHTML ?? "");
1078
+ const e = be();
1079
+ L?.(e);
1080
+ }, se = () => {
1067
1081
  const e = window.getSelection();
1068
- e?.rangeCount && (_.current = e.getRangeAt(0));
1069
- }, V = () => {
1082
+ e?.rangeCount && (S.current = e.getRangeAt(0));
1083
+ }, $ = () => {
1070
1084
  const e = window.getSelection();
1071
- e && _.current && (e.removeAllRanges(), e.addRange(_.current));
1072
- }, ge = (e, a) => {
1073
- const o = window.getSelection();
1074
- o && o.rangeCount > 0 && (_.current = o.getRangeAt(0)), V(), document.execCommand(e, !1, a), S();
1085
+ e && S.current && (e.removeAllRanges(), e.addRange(S.current));
1086
+ }, ie = (e, o) => {
1087
+ const r = window.getSelection();
1088
+ r && r.rangeCount > 0 && (S.current = r.getRangeAt(0)), $(), document.execCommand(e, !1, o), T();
1075
1089
  };
1076
- le(() => {
1077
- const e = P();
1078
- e && !e.innerHTML && (e.innerHTML = x), S();
1079
- }, []), le(() => () => {
1090
+ oe(() => {
1091
+ const e = z();
1092
+ e && !e.innerHTML && (e.innerHTML = x), T();
1093
+ }, []), oe(() => () => {
1080
1094
  document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
1081
1095
  }, []);
1082
1096
  const K = (e) => {
1083
1097
  for (; e && e.nodeName !== "LI"; )
1084
1098
  e = e.parentNode;
1085
1099
  return e;
1086
- }, ie = (e) => {
1087
- let a = 0, o = e.parentElement;
1088
- for (; o; )
1089
- (o.tagName === "UL" || o.tagName === "OL") && a++, o = o.parentElement;
1090
- return a;
1091
1100
  }, ce = (e) => {
1092
- const a = e.querySelector("li"), o = a ? ie(a) : 1;
1101
+ let o = 0, r = e.parentElement;
1102
+ for (; r; )
1103
+ (r.tagName === "UL" || r.tagName === "OL") && o++, r = r.parentElement;
1104
+ return o;
1105
+ }, ue = (e) => {
1106
+ const o = e.querySelector("li"), r = o ? ce(o) : 1;
1093
1107
  if (e.querySelector("[data-hidden-array-start]")) return;
1094
- const l = `{{#arrayData${o > 1 ? o : ""}}}`, v = `{{/arrayData${o > 1 ? o : ""}}}`, i = document.createElement("span");
1108
+ const l = `{{#arrayData${r > 1 ? r : ""}}}`, g = `{{/arrayData${r > 1 ? r : ""}}}`, i = document.createElement("span");
1095
1109
  i.textContent = l, i.style.display = "none", i.setAttribute("data-hidden-array-start", "true"), e.insertBefore(i, e.firstChild);
1096
- const f = document.createElement("span");
1097
- f.textContent = v, f.style.display = "none", f.setAttribute("data-hidden-array-end", "true"), e.appendChild(f);
1098
- }, te = (e) => {
1099
- const a = window.getSelection();
1100
- if (!a?.rangeCount) return;
1101
- const o = a.getRangeAt(0), l = K(o.startContainer);
1102
- let v, i;
1110
+ const m = document.createElement("span");
1111
+ m.textContent = g, m.style.display = "none", m.setAttribute("data-hidden-array-end", "true"), e.appendChild(m);
1112
+ }, Q = (e) => {
1113
+ const o = window.getSelection();
1114
+ if (!o?.rangeCount) return;
1115
+ const r = o.getRangeAt(0), l = K(r.startContainer);
1116
+ let g, i;
1103
1117
  if (l) {
1104
1118
  let d = l.querySelector(e);
1105
- d || (d = document.createElement(e), d.style.margin = "0", d.style.paddingLeft = "20px", l.appendChild(d)), i = d, v = document.createElement("li"), v.textContent = "​", i.appendChild(v);
1119
+ d || (d = document.createElement(e), d.style.margin = "0", d.style.paddingLeft = "20px", l.appendChild(d)), i = d, g = document.createElement("li"), g.textContent = "​", i.appendChild(g);
1106
1120
  } else {
1107
1121
  if (document.execCommand(
1108
1122
  e === "ul" ? "insertUnorderedList" : "insertOrderedList"
1109
- ), i = P()?.querySelector(`${e}:last-child`), !i) return;
1110
- v = i.querySelector("li:last-child");
1123
+ ), i = z()?.querySelector(`${e}:last-child`), !i) return;
1124
+ g = i.querySelector("li:last-child");
1111
1125
  }
1112
- ce(i);
1113
- const f = document.createRange();
1114
- f.setStart(v, 0), f.collapse(!0), a.removeAllRanges(), a.addRange(f), P()?.focus(), S();
1115
- }, W = (e, a) => {
1116
- e === "insertOrderedList" ? te("ol") : e === "insertUnorderedList" ? te("ul") : ge(e, a), e === "insertTable" && ne();
1117
- }, ue = (e) => {
1118
- const a = document.createElement("span");
1119
- a.textContent = "​", e.insertNode(a), e.setStartAfter(a), e.collapse(!0);
1120
- const o = a.getBoundingClientRect();
1121
- a.remove(), L({ x: o.left, y: o.bottom + window.scrollY }), U(t || []), N(!0), X.current = e.cloneRange();
1122
- }, n = (e) => {
1123
- const a = X.current;
1124
- if (!a) return;
1126
+ ue(i);
1127
+ const m = document.createRange();
1128
+ m.setStart(g, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), z()?.focus(), T();
1129
+ }, n = (e, o) => {
1130
+ e === "insertOrderedList" ? Q("ol") : e === "insertUnorderedList" ? Q("ul") : ie(e, o), e === "insertTable" && ve();
1131
+ }, p = (e) => {
1132
+ const o = document.createElement("span");
1133
+ o.textContent = "​", e.insertNode(o), e.setStartAfter(o), e.collapse(!0);
1134
+ const r = o.getBoundingClientRect();
1135
+ o.remove(), C({ x: r.left, y: r.bottom + window.scrollY }), B(t || []), k(!0), W.current = e.cloneRange();
1136
+ }, R = () => {
1137
+ const e = window.getSelection();
1138
+ if (!e || e.rangeCount === 0) return null;
1139
+ const o = e.anchorNode;
1140
+ let r = e.anchorOffset;
1141
+ if (!o) return null;
1142
+ let l = o;
1143
+ for (l.nodeType !== Node.TEXT_NODE && (l.childNodes && l.childNodes[r] ? l = l.childNodes[r] : l = o.previousSibling); l; ) {
1144
+ if (l.nodeType === Node.TEXT_NODE) {
1145
+ const g = l.textContent || "", i = l === o ? r : g.length, m = g.lastIndexOf("@", i - 1);
1146
+ if (m !== -1) {
1147
+ const d = document.createRange();
1148
+ return d.setStart(l, m), d.setEnd(l, i), d;
1149
+ }
1150
+ }
1151
+ l = l.previousSibling;
1152
+ }
1153
+ return null;
1154
+ }, _ = (e) => {
1125
1155
  const o = window.getSelection();
1126
- o?.removeAllRanges(), o?.addRange(a);
1156
+ if (!o) return;
1157
+ const r = R();
1158
+ r ? (o.removeAllRanges(), o.addRange(r)) : W.current && (o.removeAllRanges(), o.addRange(W.current));
1127
1159
  const l = document.createElement("span");
1128
- l.textContent = `{{${e.key}}}`, l.style.color = "#007bff", l.style.display = "inline", l.contentEditable = "false", a.deleteContents(), a.insertNode(l);
1129
- const v = document.createTextNode(" ");
1130
- a.setStartAfter(l), a.insertNode(v);
1131
- const i = document.createRange();
1132
- i.setStartAfter(v), i.collapse(!0), o?.removeAllRanges(), o?.addRange(i), N(!1), P()?.focus(), S();
1133
- }, p = (e) => {
1134
- const a = e.key.toLowerCase();
1135
- if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(a) && (e.preventDefault(), W(
1136
- a === "b" ? "bold" : a === "i" ? "italic" : a === "u" ? "underline" : ""
1160
+ l.textContent = `{{${e.key}}}`, l.style.color = "#007bff", l.style.display = "inline", l.contentEditable = "false", l.setAttribute("data-mention", e.value || e.key || "");
1161
+ try {
1162
+ const g = o.rangeCount ? o.getRangeAt(0) : null;
1163
+ if (g)
1164
+ g.deleteContents(), g.insertNode(l);
1165
+ else {
1166
+ const d = document.createRange(), w = z();
1167
+ d.selectNodeContents(w), d.collapse(!1), d.insertNode(l);
1168
+ }
1169
+ const i = document.createTextNode(" ");
1170
+ l.after(i);
1171
+ const m = document.createRange();
1172
+ m.setStartAfter(i), m.collapse(!0), o.removeAllRanges(), o.addRange(m);
1173
+ } catch (g) {
1174
+ console.error("insertMention error:", g);
1175
+ }
1176
+ k(!1), z()?.focus(), T();
1177
+ }, Z = (e) => {
1178
+ const o = e.key.toLowerCase();
1179
+ if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(o) && (e.preventDefault(), n(
1180
+ o === "b" ? "bold" : o === "i" ? "italic" : o === "u" ? "underline" : ""
1137
1181
  )), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
1138
- const o = window.getSelection(), l = o?.anchorNode ? K(o.anchorNode) : null;
1182
+ const r = window.getSelection(), l = r?.anchorNode ? K(r.anchorNode) : null;
1139
1183
  if (!l) return;
1140
1184
  if (l.textContent?.replace(/\u200B/g, "").trim() === "") {
1141
1185
  e.preventDefault();
1142
- const i = l.parentElement, f = i?.closest("li");
1143
- if (f) {
1186
+ const i = l.parentElement, m = i?.closest("li");
1187
+ if (m) {
1144
1188
  i?.removeChild(l);
1145
1189
  const d = document.createElement("p");
1146
- d.innerHTML = "<br />", f.parentElement?.insertBefore(d, f.nextSibling);
1147
- const b = document.createRange();
1148
- b.setStart(d, 0), b.collapse(!0), o?.removeAllRanges(), o?.addRange(b);
1190
+ d.innerHTML = "<br />", m.parentElement?.insertBefore(d, m.nextSibling);
1191
+ const w = document.createRange();
1192
+ w.setStart(d, 0), w.collapse(!0), r?.removeAllRanges(), r?.addRange(w);
1149
1193
  } else {
1150
1194
  const d = l.closest("ul, ol");
1151
1195
  if (d) {
1152
- const b = document.createElement("p");
1153
- b.innerHTML = "<br />", d.parentElement?.insertBefore(b, d.nextSibling), d.removeChild(l);
1154
- const C = document.createRange();
1155
- C.setStart(b, 0), C.collapse(!0), o?.removeAllRanges(), o?.addRange(C);
1196
+ const w = document.createElement("p");
1197
+ w.innerHTML = "<br />", d.parentElement?.insertBefore(w, d.nextSibling), d.removeChild(l);
1198
+ const E = document.createRange();
1199
+ E.setStart(w, 0), E.collapse(!0), r?.removeAllRanges(), r?.addRange(E);
1156
1200
  }
1157
1201
  }
1158
- S();
1202
+ T();
1159
1203
  }
1160
1204
  }
1161
- }, R = (e) => {
1162
- if (e.data !== "@") return;
1163
- e.preventDefault();
1164
- const a = window.getSelection();
1165
- a?.rangeCount && ue(a.getRangeAt(0));
1166
- }, j = (e) => {
1167
- const a = e.target.files?.[0];
1168
- if (!a) return;
1169
- const o = new FileReader();
1170
- o.onload = (l) => {
1171
- const v = l.target?.result;
1172
- V();
1205
+ }, ee = (e) => {
1206
+ if (e.data === "@") {
1207
+ const r = window.getSelection();
1208
+ if (!r?.rangeCount) return;
1209
+ setTimeout(() => {
1210
+ p(r.getRangeAt(0)), le(""), B(t), k(!0);
1211
+ }, 0);
1212
+ return;
1213
+ }
1214
+ if (O) {
1215
+ setTimeout(() => j(), 0);
1216
+ return;
1217
+ }
1218
+ }, j = () => {
1219
+ if (T(), !O) return;
1220
+ const e = window.getSelection();
1221
+ if (!e || !e.anchorNode) return;
1222
+ const r = (e.anchorNode.textContent || "").match(/@([a-zA-Z0-9_]*)$/);
1223
+ if (!r) {
1224
+ k(!1);
1225
+ return;
1226
+ }
1227
+ const l = r[1].toLowerCase();
1228
+ le(l);
1229
+ const g = t.filter((i) => i.key.toLowerCase().includes(l));
1230
+ B(g);
1231
+ }, V = (e) => {
1232
+ const o = e.target.files?.[0];
1233
+ if (!o) return;
1234
+ const r = new FileReader();
1235
+ r.onload = (l) => {
1236
+ const g = l.target?.result;
1237
+ $();
1173
1238
  const i = window.getSelection();
1174
- let f = i && i.rangeCount ? i.getRangeAt(0) : null;
1239
+ let m = i && i.rangeCount ? i.getRangeAt(0) : null;
1175
1240
  const d = document.createElement("img");
1176
- d.src = v, d.alt = a.name || "image", d.className = "rte-inserted-image", d.contentEditable = "true";
1177
- const b = P();
1178
- if (!f || !b) {
1179
- b?.appendChild(d);
1180
- const M = document.createTextNode(" ");
1181
- b?.appendChild(M);
1182
- const D = document.createRange();
1183
- D.setStartAfter(M), D.collapse(!0), i?.removeAllRanges(), i?.addRange(D), b?.focus(), S(), e.target.value = "";
1241
+ d.src = g, d.alt = o.name || "image", d.className = "rte-inserted-image", d.contentEditable = "true";
1242
+ const w = z();
1243
+ if (!m || !w) {
1244
+ w?.appendChild(d);
1245
+ const A = document.createTextNode(" ");
1246
+ w?.appendChild(A);
1247
+ const I = document.createRange();
1248
+ I.setStartAfter(A), I.collapse(!0), i?.removeAllRanges(), i?.addRange(I), w?.focus(), T(), e.target.value = "";
1184
1249
  return;
1185
1250
  }
1186
- f.deleteContents(), f.insertNode(d);
1187
- const C = document.createTextNode(" ");
1188
- d.after(C);
1189
- const w = document.createRange();
1190
- w.setStartAfter(C), w.collapse(!0), i.removeAllRanges(), i.addRange(w), b.focus(), S(), e.target.value = "";
1191
- }, o.readAsDataURL(a);
1192
- }, Q = (e) => {
1193
- V();
1194
- const a = window.getSelection();
1195
- if (!a?.rangeCount) return;
1196
- const o = a.getRangeAt(0), l = document.createTextNode(e);
1197
- o.insertNode(l), o.setStartAfter(l), o.collapse(!0), a.removeAllRanges(), a.addRange(o), P()?.focus(), S();
1198
- }, ne = () => {
1199
- V();
1251
+ m.deleteContents(), m.insertNode(d);
1252
+ const E = document.createTextNode(" ");
1253
+ d.after(E);
1254
+ const b = document.createRange();
1255
+ b.setStartAfter(E), b.collapse(!0), i.removeAllRanges(), i.addRange(b), w.focus(), T(), e.target.value = "";
1256
+ }, r.readAsDataURL(o);
1257
+ }, te = (e) => {
1258
+ $();
1259
+ const o = window.getSelection();
1260
+ if (!o?.rangeCount) return;
1261
+ const r = o.getRangeAt(0), l = document.createTextNode(e);
1262
+ r.insertNode(l), r.setStartAfter(l), r.collapse(!0), o.removeAllRanges(), o.addRange(r), z()?.focus(), T();
1263
+ }, ve = () => {
1264
+ $();
1200
1265
  const e = document.createElement("table");
1201
1266
  e.style.borderCollapse = "collapse", e.style.width = "100%", e.style.border = "1px solid #ccc", e.style.margin = "8px 0", e.style.position = "relative";
1202
- const a = document.createElement("thead"), o = document.createElement("tbody"), l = document.createElement("tr"), v = document.createElement("tr");
1267
+ const o = document.createElement("thead"), r = document.createElement("tbody"), l = document.createElement("tr"), g = document.createElement("tr");
1203
1268
  for (let d = 0; d < 2; d++) {
1204
- const b = document.createElement("th");
1205
- b.textContent = `Header ${d + 1}`, b.style.border = "1px solid #999", b.style.padding = "8px", b.style.position = "relative";
1206
- const C = document.createElement("td");
1207
- C.textContent = `Row 1 Col ${d + 1}`, C.style.border = "1px solid #999", C.style.padding = "8px", C.style.position = "relative", F(b), F(C), l.appendChild(b), v.appendChild(C);
1269
+ const w = document.createElement("th");
1270
+ w.textContent = `Header ${d + 1}`, w.style.border = "1px solid #999", w.style.padding = "8px", w.style.position = "relative";
1271
+ const E = document.createElement("td");
1272
+ E.textContent = `Row 1 Col ${d + 1}`, E.style.border = "1px solid #999", E.style.padding = "8px", E.style.position = "relative", xe(w), xe(E), l.appendChild(w), g.appendChild(E);
1208
1273
  }
1209
- a.appendChild(l), o.appendChild(v), e.appendChild(a), e.appendChild(o), Se(e), k(e);
1274
+ o.appendChild(l), r.appendChild(g), e.appendChild(o), e.appendChild(r), Me(e), Se(e);
1210
1275
  const i = window.getSelection();
1211
1276
  if (!i?.rangeCount) return;
1212
- i.getRangeAt(0).insertNode(e), S();
1213
- }, k = (e) => {
1214
- const a = document.createElement("div");
1215
- Object.assign(a.style, {
1277
+ i.getRangeAt(0).insertNode(e), T();
1278
+ }, Se = (e) => {
1279
+ const o = document.createElement("div");
1280
+ Object.assign(o.style, {
1216
1281
  position: "absolute",
1217
1282
  width: "14px",
1218
1283
  height: "14px",
@@ -1223,22 +1288,22 @@ const it = ({
1223
1288
  zIndex: "20",
1224
1289
  borderRadius: "2px"
1225
1290
  });
1226
- let o = 0, l = 0, v = 0, i = 0;
1227
- a.addEventListener("mousedown", (f) => {
1228
- f.preventDefault(), o = f.clientX, l = f.clientY;
1291
+ let r = 0, l = 0, g = 0, i = 0;
1292
+ o.addEventListener("mousedown", (m) => {
1293
+ m.preventDefault(), r = m.clientX, l = m.clientY;
1229
1294
  const d = e.getBoundingClientRect();
1230
- v = d.width, i = d.height;
1231
- const b = (w) => {
1232
- const M = Math.max(100, v + (w.clientX - o)), D = Math.max(60, i + (w.clientY - l));
1233
- e.style.width = `${M}px`, e.style.height = `${D}px`, S();
1234
- }, C = () => {
1235
- document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", C), S();
1295
+ g = d.width, i = d.height;
1296
+ const w = (b) => {
1297
+ const A = Math.max(100, g + (b.clientX - r)), I = Math.max(60, i + (b.clientY - l));
1298
+ e.style.width = `${A}px`, e.style.height = `${I}px`, T();
1299
+ }, E = () => {
1300
+ document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", E), T();
1236
1301
  };
1237
- document.addEventListener("mousemove", b), document.addEventListener("mouseup", C);
1238
- }), e.appendChild(a);
1239
- }, F = (e) => {
1240
- const a = document.createElement("div"), o = document.createElement("div");
1241
- Object.assign(a.style, {
1302
+ document.addEventListener("mousemove", w), document.addEventListener("mouseup", E);
1303
+ }), e.appendChild(o);
1304
+ }, xe = (e) => {
1305
+ const o = document.createElement("div"), r = document.createElement("div");
1306
+ Object.assign(o.style, {
1242
1307
  position: "absolute",
1243
1308
  right: "0",
1244
1309
  top: "0",
@@ -1247,7 +1312,7 @@ const it = ({
1247
1312
  cursor: "col-resize",
1248
1313
  background: "rgba(0,0,0,0.15)",
1249
1314
  zIndex: "10"
1250
- }), Object.assign(o.style, {
1315
+ }), Object.assign(r.style, {
1251
1316
  position: "absolute",
1252
1317
  bottom: "0",
1253
1318
  left: "0",
@@ -1256,248 +1321,249 @@ const it = ({
1256
1321
  cursor: "row-resize",
1257
1322
  background: "rgba(0,0,0,0.15)",
1258
1323
  zIndex: "10"
1259
- }), re(e, a, o), e.appendChild(a), e.appendChild(o);
1260
- }, re = (e, a, o) => {
1261
- let l = 0, v = 0, i = 0, f = 0;
1262
- a.addEventListener("mousedown", (w) => {
1263
- w.preventDefault(), l = w.clientX, i = e.offsetWidth, document.addEventListener("mousemove", d), document.addEventListener("mouseup", C);
1264
- }), o.addEventListener("mousedown", (w) => {
1265
- w.preventDefault(), v = w.clientY, f = e.offsetHeight, document.addEventListener("mousemove", b), document.addEventListener("mouseup", C);
1324
+ }), Te(e, o, r), e.appendChild(o), e.appendChild(r);
1325
+ }, Te = (e, o, r) => {
1326
+ let l = 0, g = 0, i = 0, m = 0;
1327
+ o.addEventListener("mousedown", (b) => {
1328
+ b.preventDefault(), l = b.clientX, i = e.offsetWidth, document.addEventListener("mousemove", d), document.addEventListener("mouseup", E);
1329
+ }), r.addEventListener("mousedown", (b) => {
1330
+ b.preventDefault(), g = b.clientY, m = e.offsetHeight, document.addEventListener("mousemove", w), document.addEventListener("mouseup", E);
1266
1331
  });
1267
- const d = (w) => {
1268
- const M = i + (w.clientX - l);
1269
- e.style.width = `${Math.max(30, M)}px`;
1270
- }, b = (w) => {
1271
- const M = f + (w.clientY - v);
1272
- e.style.height = `${Math.max(20, M)}px`;
1273
- }, C = () => {
1274
- document.removeEventListener("mousemove", d), document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", C);
1332
+ const d = (b) => {
1333
+ const A = i + (b.clientX - l);
1334
+ e.style.width = `${Math.max(30, A)}px`;
1335
+ }, w = (b) => {
1336
+ const A = m + (b.clientY - g);
1337
+ e.style.height = `${Math.max(20, A)}px`;
1338
+ }, E = () => {
1339
+ document.removeEventListener("mousemove", d), document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", E);
1275
1340
  };
1276
- }, ve = (e) => {
1277
- const o = e.target.closest("td, th");
1278
- o && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((l) => l.classList.remove("rte-cell-highlight")), o.classList.add("rte-cell-highlight"), m({ visible: !0, x: e.clientX, y: e.clientY, cell: o }));
1279
- }, xe = () => {
1341
+ }, Ne = (e) => {
1342
+ const r = e.target.closest("td, th");
1343
+ r && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((l) => l.classList.remove("rte-cell-highlight")), r.classList.add("rte-cell-highlight"), f({ visible: !0, x: e.clientX, y: e.clientY, cell: r }));
1344
+ }, we = () => {
1280
1345
  document.querySelectorAll(".rte-cell-highlight").forEach((e) => e.classList.remove("rte-cell-highlight"));
1281
- }, _e = (e) => {
1282
- if (!z.cell) return;
1283
- const a = z.cell.closest("table"), o = z.cell.cellIndex, l = z.cell.parentElement.rowIndex, v = (i) => {
1284
- const f = i.tagName.toLowerCase(), d = document.createElement(f);
1285
- return d.textContent = i.textContent || "", d.style.cssText = i.style.cssText, F(d), d;
1346
+ }, Ae = (e) => {
1347
+ if (!D.cell) return;
1348
+ const o = D.cell.closest("table"), r = D.cell.cellIndex, l = D.cell.parentElement.rowIndex, g = (i) => {
1349
+ const m = i.tagName.toLowerCase(), d = document.createElement(m);
1350
+ return d.textContent = i.textContent || "", d.style.cssText = i.style.cssText, xe(d), d;
1286
1351
  };
1287
1352
  switch (e) {
1288
1353
  case "insertRowAbove": {
1289
- const i = a.rows[l], f = a.insertRow(l);
1354
+ const i = o.rows[l], m = o.insertRow(l);
1290
1355
  Array.from(i.cells).forEach((d) => {
1291
- f.appendChild(v(d));
1356
+ m.appendChild(g(d));
1292
1357
  });
1293
1358
  break;
1294
1359
  }
1295
1360
  case "insertRowBelow": {
1296
- const i = a.rows[l], f = a.insertRow(l + 1);
1361
+ const i = o.rows[l], m = o.insertRow(l + 1);
1297
1362
  Array.from(i.cells).forEach((d) => {
1298
- f.appendChild(v(d));
1363
+ m.appendChild(g(d));
1299
1364
  });
1300
1365
  break;
1301
1366
  }
1302
1367
  case "insertColLeft": {
1303
- Array.from(a.rows).forEach((i) => {
1304
- const f = i.cells[o];
1305
- i.insertBefore(v(f), f);
1368
+ Array.from(o.rows).forEach((i) => {
1369
+ const m = i.cells[r];
1370
+ i.insertBefore(g(m), m);
1306
1371
  });
1307
1372
  break;
1308
1373
  }
1309
1374
  case "insertColRight": {
1310
- Array.from(a.rows).forEach((i) => {
1311
- const f = i.cells[o];
1312
- i.insertBefore(v(f), f.nextSibling);
1375
+ Array.from(o.rows).forEach((i) => {
1376
+ const m = i.cells[r];
1377
+ i.insertBefore(g(m), m.nextSibling);
1313
1378
  });
1314
1379
  break;
1315
1380
  }
1316
1381
  case "deleteRow":
1317
- a.rows.length > 1 && a.deleteRow(l);
1382
+ o.rows.length > 1 && o.deleteRow(l);
1318
1383
  break;
1319
1384
  case "deleteCol":
1320
- Array.from(a.rows).forEach((i) => {
1321
- i.cells[o] && i.deleteCell(o);
1385
+ Array.from(o.rows).forEach((i) => {
1386
+ i.cells[r] && i.deleteCell(r);
1322
1387
  });
1323
1388
  break;
1324
1389
  }
1325
- S(), m({ ...z, visible: !1 }), xe();
1326
- }, Se = (e) => {
1327
- const a = e.querySelector("tbody");
1328
- if (!a || a.querySelector("[data-hidden-table-start]")) return;
1329
- const o = document.createElement("span");
1330
- o.textContent = "{{#tableData}}", o.style.display = "none", o.setAttribute("data-hidden-table-start", "true"), a.insertBefore(o, a.firstChild);
1390
+ T(), f({ ...D, visible: !1 }), we();
1391
+ }, Me = (e) => {
1392
+ const o = e.querySelector("tbody");
1393
+ if (!o || o.querySelector("[data-hidden-table-start]")) return;
1394
+ const r = document.createElement("span");
1395
+ r.textContent = "{{#tableData}}", r.style.display = "none", r.setAttribute("data-hidden-table-start", "true"), o.insertBefore(r, o.firstChild);
1331
1396
  const l = document.createElement("span");
1332
- l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"), a.appendChild(l);
1333
- }, we = () => {
1334
- const e = P();
1397
+ l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"), o.appendChild(l);
1398
+ }, be = () => {
1399
+ const e = z();
1335
1400
  if (!e) return x;
1336
- const a = e.cloneNode(!0);
1337
- return a.querySelectorAll(".rte-cell-highlight").forEach((o) => {
1338
- o.classList.remove("rte-cell-highlight");
1339
- }), a.querySelectorAll("div").forEach((o) => {
1340
- (o.style.cursor === "col-resize" || o.style.cursor === "row-resize" || o.style.cursor === "nwse-resize") && o.remove();
1341
- }), a.innerHTML;
1342
- }, Te = () => {
1343
- Z(), J.current = _.current, se({ url: "", text: "", title: "", target: "_self" }), G(!0);
1344
- }, Me = (e) => {
1345
- const a = window.getSelection();
1346
- if (!a || !J.current) return;
1347
- a.removeAllRanges(), a.addRange(J.current);
1348
- let o = e.url.trim();
1349
- /^https?:\/\//i.test(o) || (o = "https://" + o);
1401
+ const o = e.cloneNode(!0);
1402
+ return o.querySelectorAll(".rte-cell-highlight").forEach((r) => {
1403
+ r.classList.remove("rte-cell-highlight");
1404
+ }), o.querySelectorAll("div").forEach((r) => {
1405
+ (r.style.cursor === "col-resize" || r.style.cursor === "row-resize" || r.style.cursor === "nwse-resize") && r.remove();
1406
+ }), o.innerHTML;
1407
+ }, ze = () => {
1408
+ se(), G.current = S.current, ae({ url: "", text: "", title: "", target: "_self" }), X(!0);
1409
+ }, Oe = (e) => {
1410
+ const o = window.getSelection();
1411
+ if (!o || !G.current) return;
1412
+ o.removeAllRanges(), o.addRange(G.current);
1413
+ let r = e.url.trim();
1414
+ /^https?:\/\//i.test(r) || (r = "https://" + r);
1350
1415
  const l = document.createElement("a");
1351
- l.href = o, l.style.cursor = "pointer", l.style.outline = "none", l.textContent = e.text || o, l.title = e.title, l.target = e.target, l.contentEditable = "true";
1352
- const v = a.getRangeAt(0);
1353
- v.deleteContents(), v.insertNode(l);
1416
+ l.href = r, l.style.cursor = "pointer", l.style.outline = "none", l.textContent = e.text || r, l.title = e.title, l.target = e.target, l.contentEditable = "true";
1417
+ const g = o.getRangeAt(0);
1418
+ g.deleteContents(), g.insertNode(l);
1354
1419
  const i = document.createTextNode(" ");
1355
1420
  l.after(i);
1356
- const f = document.createRange();
1357
- f.setStartAfter(i), f.collapse(!0), a.removeAllRanges(), a.addRange(f), G(!1), S();
1358
- }, Ae = (e) => {
1359
- const a = e.target;
1360
- if (a.tagName === "A") {
1361
- const o = a;
1421
+ const m = document.createRange();
1422
+ m.setStartAfter(i), m.collapse(!0), o.removeAllRanges(), o.addRange(m), X(!1), T();
1423
+ }, Pe = (e) => {
1424
+ const o = e.target;
1425
+ if (o.tagName === "A") {
1426
+ const r = o;
1362
1427
  if (e.ctrlKey || e.metaKey) {
1363
- window.open(o.href, "_blank", "noopener,noreferrer");
1428
+ window.open(r.href, "_blank", "noopener,noreferrer");
1364
1429
  return;
1365
1430
  }
1366
1431
  e.preventDefault();
1367
1432
  const l = document.createRange();
1368
- l.selectNode(o), J.current = l, se({
1369
- url: o.href,
1370
- text: o.textContent || o.href,
1371
- title: o.title,
1372
- target: o.target
1373
- }), G(!0);
1433
+ l.selectNode(r), G.current = l, ae({
1434
+ url: r.href,
1435
+ text: r.textContent || r.href,
1436
+ title: r.title,
1437
+ target: r.target
1438
+ }), X(!0);
1374
1439
  }
1375
- }, Ne = () => {
1376
- const e = P();
1440
+ }, De = () => {
1441
+ const e = z();
1377
1442
  if (!e) return;
1378
- const a = window.getSelection();
1379
- if ((!a || a.rangeCount === 0) && _.current) {
1380
- const w = window.getSelection();
1381
- w?.removeAllRanges(), w?.addRange(_.current);
1382
- }
1383
1443
  const o = window.getSelection();
1384
- if (!o || o.rangeCount === 0) return;
1385
- const l = o.getRangeAt(0);
1386
- V(), document.execCommand("removeFormat", !1);
1387
- const v = l.cloneContents(), i = document.createElement("div");
1388
- i.appendChild(v);
1389
- const f = document.createTreeWalker(
1444
+ if ((!o || o.rangeCount === 0) && S.current) {
1445
+ const b = window.getSelection();
1446
+ b?.removeAllRanges(), b?.addRange(S.current);
1447
+ }
1448
+ const r = window.getSelection();
1449
+ if (!r || r.rangeCount === 0) return;
1450
+ const l = r.getRangeAt(0);
1451
+ $(), document.execCommand("removeFormat", !1);
1452
+ const g = l.cloneContents(), i = document.createElement("div");
1453
+ i.appendChild(g);
1454
+ const m = document.createTreeWalker(
1390
1455
  i,
1391
1456
  NodeFilter.SHOW_ELEMENT,
1392
1457
  null
1393
1458
  ), d = [];
1394
- for (; f.nextNode(); ) {
1395
- const w = f.currentNode, M = w.tagName.toUpperCase(), D = w.getAttribute && w.getAttribute("data-mention") !== null;
1396
- M !== "A" && !D && d.push(w);
1459
+ for (; m.nextNode(); ) {
1460
+ const b = m.currentNode, A = b.tagName.toUpperCase(), I = b.getAttribute && b.getAttribute("data-mention") !== null;
1461
+ A !== "A" && !I && d.push(b);
1397
1462
  }
1398
- for (let w = d.length - 1; w >= 0; w--) {
1399
- const M = d[w], D = M.parentNode;
1400
- if (D) {
1401
- for (; M.firstChild; ) D.insertBefore(M.firstChild, M);
1402
- D.removeChild(M);
1463
+ for (let b = d.length - 1; b >= 0; b--) {
1464
+ const A = d[b], I = A.parentNode;
1465
+ if (I) {
1466
+ for (; A.firstChild; ) I.insertBefore(A.firstChild, A);
1467
+ I.removeChild(A);
1403
1468
  }
1404
1469
  }
1405
- i.querySelectorAll("[style]").forEach((w) => w.removeAttribute("style")), l.deleteContents();
1406
- const b = document.createDocumentFragment();
1407
- for (; i.firstChild; ) b.appendChild(i.firstChild);
1408
- l.insertNode(b);
1409
- const C = document.createRange();
1410
- C.setStartAfter(
1470
+ i.querySelectorAll("[style]").forEach((b) => b.removeAttribute("style")), l.deleteContents();
1471
+ const w = document.createDocumentFragment();
1472
+ for (; i.firstChild; ) w.appendChild(i.firstChild);
1473
+ l.insertNode(w);
1474
+ const E = document.createRange();
1475
+ E.setStartAfter(
1411
1476
  l.endContainer.nodeType === Node.TEXT_NODE ? l.endContainer : l.startContainer
1412
- ), C.collapse(!0), o.removeAllRanges(), o.addRange(C), e.normalize(), S();
1477
+ ), E.collapse(!0), r.removeAllRanges(), r.addRange(E), e.normalize(), T();
1413
1478
  };
1414
- return /* @__PURE__ */ r.jsxs(
1479
+ return /* @__PURE__ */ a.jsxs(
1415
1480
  "div",
1416
1481
  {
1417
1482
  className: `rte-wrapper ${h?.wrapper || ""}`,
1418
- style: g.wrapper,
1483
+ style: v.wrapper,
1419
1484
  children: [
1420
- /* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
1421
- /* @__PURE__ */ r.jsx(
1422
- lt,
1485
+ /* @__PURE__ */ a.jsxs("div", { style: { flex: 1 }, children: [
1486
+ /* @__PURE__ */ a.jsx(
1487
+ ut,
1423
1488
  {
1424
- exec: W,
1425
- saveSelection: Z,
1426
- handleFileChange: j,
1427
- handleFontSizeChange: (e) => W("fontSize", e.target.value),
1428
- handleFontFamilyChange: (e) => W("fontName", e.target.value),
1429
- insertEmoji: Q,
1430
- handleLink: Te,
1431
- removeFormatting: Ne,
1432
- visibleActions: ee,
1489
+ exec: n,
1490
+ saveSelection: se,
1491
+ handleFileChange: V,
1492
+ handleFontSizeChange: (e) => n("fontSize", e.target.value),
1493
+ handleFontFamilyChange: (e) => n("fontName", e.target.value),
1494
+ insertEmoji: te,
1495
+ handleLink: ze,
1496
+ removeFormatting: De,
1497
+ visibleActions: J,
1433
1498
  className: h.toolbar,
1434
- style: g.toolbar
1499
+ style: v.toolbar
1435
1500
  }
1436
1501
  ),
1437
- /* @__PURE__ */ r.jsx(
1502
+ /* @__PURE__ */ a.jsx(
1438
1503
  "div",
1439
1504
  {
1440
1505
  ref: y,
1441
1506
  className: `rte-editor ${h?.editor || ""}`,
1442
- style: g.editor,
1507
+ style: v.editor,
1443
1508
  contentEditable: !0,
1444
1509
  suppressContentEditableWarning: !0,
1445
- onInput: S,
1446
- onKeyDown: p,
1447
- onBeforeInput: R,
1448
- onContextMenu: ve,
1449
- onClick: Ae
1510
+ onInput: j,
1511
+ onKeyDown: Z,
1512
+ onBeforeInput: ee,
1513
+ onContextMenu: Ne,
1514
+ onClick: Pe
1450
1515
  }
1451
1516
  ),
1452
- /* @__PURE__ */ r.jsx(
1453
- st,
1517
+ /* @__PURE__ */ a.jsx(
1518
+ dt,
1454
1519
  {
1455
- show: B,
1456
- position: H,
1520
+ show: O,
1521
+ position: P,
1457
1522
  filtered: q,
1458
- insertMention: n,
1459
- onClose: () => N(!1)
1523
+ insertMention: _,
1524
+ onClose: () => k(!1),
1525
+ query: ge
1460
1526
  }
1461
1527
  ),
1462
- s && /* @__PURE__ */ r.jsxs(
1528
+ s && /* @__PURE__ */ a.jsxs(
1463
1529
  "div",
1464
1530
  {
1465
1531
  className: `rte-output ${h?.output || ""}`,
1466
- style: g.output,
1532
+ style: v.output,
1467
1533
  children: [
1468
- /* @__PURE__ */ r.jsx("h4", { children: "Output HTML:" }),
1469
- /* @__PURE__ */ r.jsx("p", { children: x })
1534
+ /* @__PURE__ */ a.jsx("h4", { children: "Output HTML:" }),
1535
+ /* @__PURE__ */ a.jsx("p", { children: x })
1470
1536
  ]
1471
1537
  }
1472
1538
  ),
1473
- /* @__PURE__ */ r.jsx(
1474
- it,
1539
+ /* @__PURE__ */ a.jsx(
1540
+ mt,
1475
1541
  {
1476
- visible: z.visible,
1477
- x: z.x,
1478
- y: z.y,
1479
- onAction: _e,
1542
+ visible: D.visible,
1543
+ x: D.x,
1544
+ y: D.y,
1545
+ onAction: Ae,
1480
1546
  onClose: () => {
1481
- m({ ...z, visible: !1 }), xe();
1547
+ f({ ...D, visible: !1 }), we();
1482
1548
  }
1483
1549
  }
1484
1550
  ),
1485
- /* @__PURE__ */ r.jsx(
1486
- ut,
1551
+ /* @__PURE__ */ a.jsx(
1552
+ ht,
1487
1553
  {
1488
- visible: A,
1554
+ visible: M,
1489
1555
  linkData: pe,
1490
- onClose: () => G(!1),
1491
- onInsert: Me
1556
+ onClose: () => X(!1),
1557
+ onInsert: Oe
1492
1558
  }
1493
1559
  )
1494
1560
  ] }),
1495
- u ? /* @__PURE__ */ r.jsx(
1496
- ct,
1561
+ u ? /* @__PURE__ */ a.jsx(
1562
+ ft,
1497
1563
  {
1498
1564
  className: h.preview,
1499
- style: g.preview,
1500
- html: we()
1565
+ style: v.preview,
1566
+ html: be()
1501
1567
  }
1502
1568
  ) : null
1503
1569
  ]
@@ -1505,7 +1571,7 @@ const it = ({
1505
1571
  );
1506
1572
  };
1507
1573
  export {
1508
- mt as RichTextEditor,
1509
- ct as RtePreview,
1510
- lt as RteToolbar
1574
+ gt as RichTextEditor,
1575
+ ft as RtePreview,
1576
+ ut as RteToolbar
1511
1577
  };