reactjs-tiptap-editor 0.2.13 → 0.2.14

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.
@@ -1,30 +1,30 @@
1
- import { a as nn, I as an, U as on, S as rn, C as sn, f as Ce, N as he, b as cn, c as ln, R as je, F as dn, H as un, T as hn, E as H, d as mn, e as fn, g as gn, h as Ae, O as _n, i as bn, j as xn, k as pn, L as wn, l as yn, m as Le, n as vn, o as kn, D as Cn, P as Nn, p as Tn, q as An, G as Ln, r as Sn, s as Mn, t as In, u as En, v as Hn, w as zn, x as Mt, y as It, z as Et, A as Ze, J as Rn, K as Pn, M as Dn, Q as On, V as jn, W as Bn } from "./tiptap-24JNJPT1.js";
2
- import { P as J, b as Q, $ as me, a0 as ge, al as U, am as $n, T as Ht, A as Fn, an as zt, ak as Rt, ao as _t, ap as bt, aq as Un, a4 as Vn, ar as qn, as as Kn } from "./vendor-K5cb6hwc.js";
1
+ import { a as Qt, I as en, U as tn, S as nn, C as an, f as Ce, N as he, b as on, c as rn, R as je, F as sn, H as cn, T as ln, E as H, d as dn, e as un, g as hn, h as Te, O as mn, i as fn, j as gn, k as _n, L as bn, l as xn, m as Le, n as pn, o as wn, D as yn, P as vn, p as kn, q as Cn, G as Nn, r as An, s as Tn, t as Ln, u as Sn, v as Mn, w as In, x as Mt, y as It, z as Et, A as Ze, J as En, K as Hn, M as zn, Q as Rn, V as Pn, W as Dn } from "./tiptap-BG8TB9NM.js";
2
+ import { P as J, b as Q, $ as me, a0 as ge, al as U, am as On, T as Ht, A as jn, an as _t, ao as bt, ap as Bn, a4 as $n, aq as Fn, ar as Un } from "./vendor-HJDKjCL8.js";
3
3
  import { jsxs as g, jsx as r, Fragment as oe } from "react/jsx-runtime";
4
4
  import * as V from "react";
5
5
  import Pe, { useMemo as R, useState as k, useRef as X, useCallback as j, Fragment as Je, forwardRef as Qe, useImperativeHandle as et, useEffect as P } from "react";
6
- import { ChevronDown as tt, Check as Pt, ChevronUp as Wn, Copy as Gn, CopyCheck as Xn, SearchIcon as Yn, LoaderIcon as Zn, LucideTableProperties as Jn, LucideSheet as Qn, LucideImage as ei, LucideFile as ti, LucideVideo as ni, LucideAudioLines as ii } from "lucide-react";
7
- import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ai, f as E, u as at, h as oi, I as D, j as be, k as Dt, l as We, m as ri, n as ot, P as xe, o as pe, p as we, q as rt, C as si, H as ci, L as li, r as di, M as ui, s as hi, t as xt, v as Se, w as st, x as ct, y as lt, z as dt, E as mi, F as fi, G as gi, J as De, K as Oe, N as _i, S as bi, O as xi, Q as pi, U as Y, V as wi, W as yi, X as vi, Y as ki, Z as Ci, _ as Ot } from "./RichTextEditor-DqXFuGeI.js";
8
- import { a5 as Wr, a1 as Gr, $ as Xr, a2 as Yr, a0 as Zr, a3 as Jr, a4 as Qr } from "./RichTextEditor-DqXFuGeI.js";
9
- import { M as Ni, D as jt, u as B, f as Ti, g as Ai, h as pt, i as z, j as Bt, k as Li, I as wt, m as Si, n as yt, V as Mi, T as Me, o as Ie, p as Ee } from "./index-CGVy85-a.js";
6
+ import { ChevronDown as tt, Check as zt, ChevronUp as Vn, Copy as qn, CopyCheck as Kn, SearchIcon as Wn, LoaderIcon as Gn, LucideTableProperties as Xn, LucideSheet as Yn, LucideImage as Zn, LucideFile as Jn, LucideVideo as Qn, LucideAudioLines as ei } from "lucide-react";
7
+ import { i as nt, T as Be, a as $e, B as O, b as Fe, g as it, A as y, D as re, c as se, d as ce, e as ti, f as E, u as at, h as ni, I as D, j as be, k as Rt, l as We, m as ii, n as ot, P as xe, o as pe, p as we, q as rt, C as ai, H as oi, L as ri, r as si, M as ci, s as li, t as xt, v as Se, w as di, x as Pt, y as ui, z as st, E as ct, F as lt, G as dt, J as hi, K as mi, N as fi, O as De, Q as Oe, S as gi, U as _i, V as bi, W as xi, X as Y, Y as pi, Z as wi, _ as yi, $ as vi, a0 as ki, a1 as Dt } from "./RichTextEditor-Jetexq5O.js";
8
+ import { a8 as Kr, a4 as Wr, a2 as Gr, a5 as Xr, a3 as Yr, a6 as Zr, a7 as Jr } from "./RichTextEditor-Jetexq5O.js";
9
+ import { M as Ci, D as Ot, u as B, f as Ni, g as Ai, h as pt, i as z, j as jt, k as Ti, I as wt, m as Li, n as yt, V as Si, T as Me, o as Ie, p as Ee } from "./index-Dxj3kgeV.js";
10
10
  import * as le from "@radix-ui/react-tabs";
11
- import { bundledThemes as $t, bundledLanguages as Ft, createHighlighter as Ii } from "shiki";
11
+ import { bundledThemes as Bt, bundledLanguages as $t, createHighlighter as Mi } from "shiki";
12
12
  import * as I from "@radix-ui/react-select";
13
- import { Slot as Ei } from "@radix-ui/react-slot";
13
+ import { Slot as Ii } from "@radix-ui/react-slot";
14
14
  import ut from "tippy.js";
15
- import Hi from "react-image-crop";
15
+ import Ei from "react-image-crop";
16
16
  import * as Ge from "@radix-ui/react-checkbox";
17
17
  import ht from "scroll-into-view-if-needed";
18
18
  import { EmojiPicker as ae } from "frimousse";
19
- import { Packer as zi, WidthType as Ri } from "docx";
20
- import { DocxSerializer as Pi, defaultNodes as ne, defaultMarks as Di } from "prosemirror-docx";
19
+ import { Packer as Hi, WidthType as zi } from "docx";
20
+ import { DocxSerializer as Ri, defaultNodes as ne, defaultMarks as Pi } from "prosemirror-docx";
21
21
  const mt = Pe.forwardRef(
22
22
  ({ asChild: e, ...t }, n) => {
23
23
  var o;
24
24
  const i = nt[t.icon];
25
25
  return /* @__PURE__ */ g(Be, { children: [
26
26
  /* @__PURE__ */ r($e, { asChild: !0, children: /* @__PURE__ */ r(
27
- e ? Ei : O,
27
+ e ? Ii : O,
28
28
  {
29
29
  className: "richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0",
30
30
  disabled: t == null ? void 0 : t.disabled,
@@ -43,7 +43,7 @@ const mt = Pe.forwardRef(
43
43
  ] }) })
44
44
  ] });
45
45
  }
46
- ), dr = nn.extend({
46
+ ), lr = Qt.extend({
47
47
  addOptions() {
48
48
  var e;
49
49
  return {
@@ -61,7 +61,7 @@ const mt = Pe.forwardRef(
61
61
  })
62
62
  };
63
63
  }
64
- }), ur = an.extend({
64
+ }), dr = en.extend({
65
65
  addOptions() {
66
66
  var e;
67
67
  return {
@@ -81,7 +81,7 @@ const mt = Pe.forwardRef(
81
81
  }
82
82
  };
83
83
  }
84
- }), hr = on.extend({
84
+ }), ur = tn.extend({
85
85
  addOptions() {
86
86
  var e;
87
87
  return {
@@ -101,7 +101,7 @@ const mt = Pe.forwardRef(
101
101
  }
102
102
  };
103
103
  }
104
- }), mr = rn.extend({
104
+ }), hr = nn.extend({
105
105
  addOptions() {
106
106
  var e;
107
107
  return {
@@ -119,7 +119,7 @@ const mt = Pe.forwardRef(
119
119
  })
120
120
  };
121
121
  }
122
- }), fr = sn.extend({
122
+ }), mr = an.extend({
123
123
  addOptions() {
124
124
  var e;
125
125
  return {
@@ -140,30 +140,30 @@ const mt = Pe.forwardRef(
140
140
  });
141
141
  let G, ye;
142
142
  const Ve = /* @__PURE__ */ new Set(), qe = /* @__PURE__ */ new Set();
143
- function Oi() {
143
+ function Di() {
144
144
  return G;
145
145
  }
146
- function ji(e) {
146
+ function Oi(e) {
147
147
  if (!G && !ye) {
148
148
  const t = e.themes.filter(
149
- (i) => !!i && i in $t
149
+ (i) => !!i && i in Bt
150
150
  ), n = e.languages.filter(
151
- (i) => !!i && i in Ft
151
+ (i) => !!i && i in $t
152
152
  );
153
- return ye = Ii({ themes: t, langs: n }).then((i) => {
153
+ return ye = Mi({ themes: t, langs: n }).then((i) => {
154
154
  G = i;
155
155
  }), ye;
156
156
  }
157
157
  if (ye)
158
158
  return ye;
159
159
  }
160
- async function Ut(e) {
161
- return G && !G.getLoadedThemes().includes(e) && !qe.has(e) && e in $t ? (qe.add(e), await G.loadTheme(e), qe.delete(e), !0) : !1;
160
+ async function Ft(e) {
161
+ return G && !G.getLoadedThemes().includes(e) && !qe.has(e) && e in Bt ? (qe.add(e), await G.loadTheme(e), qe.delete(e), !0) : !1;
162
162
  }
163
- async function Vt(e) {
164
- return G && !G.getLoadedLanguages().includes(e) && !Ve.has(e) && e in Ft ? (Ve.add(e), await G.loadLanguage(e), Ve.delete(e), !0) : !1;
163
+ async function Ut(e) {
164
+ return G && !G.getLoadedLanguages().includes(e) && !Ve.has(e) && e in $t ? (Ve.add(e), await G.loadLanguage(e), Ve.delete(e), !0) : !1;
165
165
  }
166
- async function Bi({
166
+ async function ji({
167
167
  doc: e,
168
168
  name: t,
169
169
  defaultTheme: n,
@@ -177,9 +177,9 @@ async function Bi({
177
177
  i
178
178
  ];
179
179
  G ? await Promise.all([
180
- ...o.flatMap((c) => Ut(c)),
181
- ...s.flatMap((c) => !!c && Vt(c))
182
- ]) : await ji({ languages: s, themes: o });
180
+ ...o.flatMap((c) => Ft(c)),
181
+ ...s.flatMap((c) => !!c && Ut(c))
182
+ ]) : await Oi({ languages: s, themes: o });
183
183
  }
184
184
  function vt({
185
185
  doc: e,
@@ -190,7 +190,7 @@ function vt({
190
190
  const a = [];
191
191
  return Ce(e, (s) => s.type.name === t).forEach((s) => {
192
192
  let c = s.pos + 1, l = s.node.attrs.language || i;
193
- const u = s.node.attrs.theme || n, d = Oi();
193
+ const u = s.node.attrs.theme || n, d = Di();
194
194
  if (!d)
195
195
  return;
196
196
  d.getLoadedLanguages().includes(l) || (l = "plaintext");
@@ -209,7 +209,7 @@ function vt({
209
209
  }
210
210
  }), me.create(e, a);
211
211
  }
212
- function $i({
212
+ function Bi({
213
213
  name: e,
214
214
  defaultLanguage: t,
215
215
  defaultTheme: n
@@ -229,7 +229,7 @@ function $i({
229
229
  // Initialize shiki async, and then highlight initial document
230
230
  async initDecorations() {
231
231
  const c = a.state.doc;
232
- await Bi({ doc: c, name: e, defaultLanguage: t, defaultTheme: n });
232
+ await ji({ doc: c, name: e, defaultLanguage: t, defaultTheme: n });
233
233
  const l = a.state.tr.setMeta("shikiPluginForceDecoration", !0);
234
234
  a.dispatch(l);
235
235
  }
@@ -242,8 +242,8 @@ function $i({
242
242
  );
243
243
  if ((await Promise.all(
244
244
  c.flatMap((d) => [
245
- Ut(d.node.attrs.theme),
246
- Vt(d.node.attrs.language)
245
+ Ft(d.node.attrs.theme),
246
+ Ut(d.node.attrs.language)
247
247
  ])
248
248
  )).includes(!0)) {
249
249
  const d = a.state.tr.setMeta("shikiPluginForceDecoration", !0);
@@ -285,11 +285,11 @@ function $i({
285
285
  });
286
286
  return i;
287
287
  }
288
- function Fi({ action: e, languages: t, ...n }) {
288
+ function $i({ action: e, languages: t, ...n }) {
289
289
  const i = (o) => {
290
290
  e(o);
291
291
  }, a = R(() => t == null ? void 0 : t.map((o) => ({
292
- title: Ni[o] || o,
292
+ title: Ci[o] || o,
293
293
  // icon: language.icon,
294
294
  language: o
295
295
  })), [t]);
@@ -302,10 +302,10 @@ function Fi({ action: e, languages: t, ...n }) {
302
302
  icon: n == null ? void 0 : n.icon
303
303
  }
304
304
  ) }),
305
- /* @__PURE__ */ r(ce, { className: "richtext-w-full !richtext-max-h-[180px] !richtext-overflow-y-scroll", children: a == null ? void 0 : a.map((o) => /* @__PURE__ */ r(ai, { onClick: () => i(o.language), children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", children: o.title }) }, `codeblock-${o.title}`)) })
305
+ /* @__PURE__ */ r(ce, { className: "richtext-w-full !richtext-max-h-[180px] !richtext-overflow-y-scroll", children: a == null ? void 0 : a.map((o) => /* @__PURE__ */ r(ti, { onClick: () => i(o.language), children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", children: o.title }) }, `codeblock-${o.title}`)) })
306
306
  ] });
307
307
  }
308
- const Ui = I.Root, Vi = I.Value, qt = V.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ g(
308
+ const Fi = I.Root, Ui = I.Value, Vt = V.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ g(
309
309
  I.Trigger,
310
310
  {
311
311
  ref: i,
@@ -320,8 +320,8 @@ const Ui = I.Root, Vi = I.Value, qt = V.forwardRef(({ className: e, children: t,
320
320
  ]
321
321
  }
322
322
  ));
323
- qt.displayName = I.Trigger.displayName;
324
- const Kt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
323
+ Vt.displayName = I.Trigger.displayName;
324
+ const qt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
325
325
  I.ScrollUpButton,
326
326
  {
327
327
  ref: n,
@@ -330,11 +330,11 @@ const Kt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
330
330
  e
331
331
  ),
332
332
  ...t,
333
- children: /* @__PURE__ */ r(Wn, { className: "richtext-h-4 richtext-w-4" })
333
+ children: /* @__PURE__ */ r(Vn, { className: "richtext-h-4 richtext-w-4" })
334
334
  }
335
335
  ));
336
- Kt.displayName = I.ScrollUpButton.displayName;
337
- const Wt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
336
+ qt.displayName = I.ScrollUpButton.displayName;
337
+ const Kt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
338
338
  I.ScrollDownButton,
339
339
  {
340
340
  ref: n,
@@ -346,8 +346,8 @@ const Wt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
346
346
  children: /* @__PURE__ */ r(tt, { className: "richtext-h-4 richtext-w-4" })
347
347
  }
348
348
  ));
349
- Wt.displayName = I.ScrollDownButton.displayName;
350
- const Gt = V.forwardRef(({ className: e, children: t, position: n = "popper", ...i }, a) => /* @__PURE__ */ r(I.Portal, { children: /* @__PURE__ */ g(
349
+ Kt.displayName = I.ScrollDownButton.displayName;
350
+ const Wt = V.forwardRef(({ className: e, children: t, position: n = "popper", ...i }, a) => /* @__PURE__ */ r(I.Portal, { children: /* @__PURE__ */ g(
351
351
  I.Content,
352
352
  {
353
353
  ref: a,
@@ -359,7 +359,7 @@ const Gt = V.forwardRef(({ className: e, children: t, position: n = "popper", ..
359
359
  position: n,
360
360
  ...i,
361
361
  children: [
362
- /* @__PURE__ */ r(Kt, {}),
362
+ /* @__PURE__ */ r(qt, {}),
363
363
  /* @__PURE__ */ r(
364
364
  I.Viewport,
365
365
  {
@@ -370,12 +370,12 @@ const Gt = V.forwardRef(({ className: e, children: t, position: n = "popper", ..
370
370
  children: t
371
371
  }
372
372
  ),
373
- /* @__PURE__ */ r(Wt, {})
373
+ /* @__PURE__ */ r(Kt, {})
374
374
  ]
375
375
  }
376
376
  ) }));
377
- Gt.displayName = I.Content.displayName;
378
- const qi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
377
+ Wt.displayName = I.Content.displayName;
378
+ const Vi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
379
379
  I.Label,
380
380
  {
381
381
  ref: n,
@@ -383,7 +383,7 @@ const qi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
383
383
  ...t
384
384
  }
385
385
  ));
386
- qi.displayName = I.Label.displayName;
386
+ Vi.displayName = I.Label.displayName;
387
387
  const Xe = V.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ g(
388
388
  I.Item,
389
389
  {
@@ -394,13 +394,13 @@ const Xe = V.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__
394
394
  ),
395
395
  ...n,
396
396
  children: [
397
- /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(I.ItemIndicator, { children: /* @__PURE__ */ r(Pt, { className: "richtext-h-4 richtext-w-4" }) }) }),
397
+ /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(I.ItemIndicator, { children: /* @__PURE__ */ r(zt, { className: "richtext-h-4 richtext-w-4" }) }) }),
398
398
  /* @__PURE__ */ r(I.ItemText, { children: t })
399
399
  ]
400
400
  }
401
401
  ));
402
402
  Xe.displayName = I.Item.displayName;
403
- const Ki = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
403
+ const qi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
404
404
  I.Separator,
405
405
  {
406
406
  ref: n,
@@ -408,8 +408,8 @@ const Ki = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
408
408
  ...t
409
409
  }
410
410
  ));
411
- Ki.displayName = I.Separator.displayName;
412
- function Wi() {
411
+ qi.displayName = I.Separator.displayName;
412
+ function Ki() {
413
413
  const [e, t] = k(!1);
414
414
  return { isCopied: e, copyToClipboard: async (i) => {
415
415
  try {
@@ -419,22 +419,22 @@ function Wi() {
419
419
  }
420
420
  } };
421
421
  }
422
- const Gi = "_wrap_134f4_1", Xi = "_maxHeight_134f4_10", Yi = "_btnCopy_134f4_13", Zi = "_btnDelete_134f4_14", Ji = "_blockInfo_134f4_18", Qi = "_blockInfoEditable_134f4_28", ea = "_selectLang_134f4_32", ta = "_copied_134f4_58", Z = {
423
- wrap: Gi,
424
- maxHeight: Xi,
425
- btnCopy: Yi,
426
- btnDelete: Zi,
427
- blockInfo: Ji,
428
- blockInfoEditable: Qi,
429
- selectLang: ea,
430
- copied: ta
422
+ const Wi = "_wrap_134f4_1", Gi = "_maxHeight_134f4_10", Xi = "_btnCopy_134f4_13", Yi = "_btnDelete_134f4_14", Zi = "_blockInfo_134f4_18", Ji = "_blockInfoEditable_134f4_28", Qi = "_selectLang_134f4_32", ea = "_copied_134f4_58", Z = {
423
+ wrap: Wi,
424
+ maxHeight: Gi,
425
+ btnCopy: Xi,
426
+ btnDelete: Yi,
427
+ blockInfo: Zi,
428
+ blockInfoEditable: Ji,
429
+ selectLang: Qi,
430
+ copied: ea
431
431
  };
432
- function na({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }) {
432
+ function ta({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }) {
433
433
  var m, h;
434
- const { isCopied: a, copyToClipboard: o } = Wi(), s = R(() => {
434
+ const { isCopied: a, copyToClipboard: o } = Ki(), s = R(() => {
435
435
  var b;
436
- return (b = i.options.languages) != null && b.length ? i.options.languages : jt;
437
- }, [i.options.languages]), c = at(), l = (h = (m = e == null ? void 0 : e.options) == null ? void 0 : m.editorProps) == null ? void 0 : h.print, { language: u } = t, d = X(null), f = j(() => oi(ia.name, e), [e]);
436
+ return (b = i.options.languages) != null && b.length ? i.options.languages : Ot;
437
+ }, [i.options.languages]), c = at(), l = (h = (m = e == null ? void 0 : e.options) == null ? void 0 : m.editorProps) == null ? void 0 : h.print, { language: u } = t, d = X(null), f = j(() => ni(na.name, e), [e]);
438
438
  return /* @__PURE__ */ g(he, { className: U(Z.wrap, !l && Z.maxHeight, "render-wrapper"), children: [
439
439
  /* @__PURE__ */ g(
440
440
  "div",
@@ -448,7 +448,7 @@ function na({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
448
448
  {
449
449
  className: U(Z.btnCopy, a && Z.copied),
450
450
  onClick: () => o(d.current.innerText),
451
- children: a ? /* @__PURE__ */ r(Xn, { size: 16 }) : /* @__PURE__ */ r(Gn, { size: 16 })
451
+ children: a ? /* @__PURE__ */ r(Kn, { size: 16 }) : /* @__PURE__ */ r(qn, { size: 16 })
452
452
  }
453
453
  ),
454
454
  /* @__PURE__ */ r(
@@ -465,14 +465,14 @@ function na({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
465
465
  }
466
466
  ),
467
467
  /* @__PURE__ */ r("div", { className: Z.selectLang, children: /* @__PURE__ */ g(
468
- Ui,
468
+ Fi,
469
469
  {
470
470
  defaultValue: u || "auto",
471
471
  disabled: !c,
472
472
  onValueChange: (b) => n({ language: b }),
473
473
  children: [
474
- /* @__PURE__ */ r(qt, { children: /* @__PURE__ */ r(Vi, { placeholder: "Language" }) }),
475
- /* @__PURE__ */ g(Gt, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
474
+ /* @__PURE__ */ r(Vt, { children: /* @__PURE__ */ r(Ui, { placeholder: "Language" }) }),
475
+ /* @__PURE__ */ g(Wt, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
476
476
  /* @__PURE__ */ r(Xe, { value: "auto", children: "Auto" }),
477
477
  s.map((b, x) => /* @__PURE__ */ r(
478
478
  Xe,
@@ -489,10 +489,10 @@ function na({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
489
489
  ]
490
490
  }
491
491
  ),
492
- /* @__PURE__ */ r("pre", { ref: d, children: /* @__PURE__ */ r(cn, { as: "code" }) })
492
+ /* @__PURE__ */ r("pre", { ref: d, children: /* @__PURE__ */ r(on, { as: "code" }) })
493
493
  ] });
494
494
  }
495
- const ia = ln.extend({
495
+ const na = rn.extend({
496
496
  addOptions() {
497
497
  var e;
498
498
  return {
@@ -500,9 +500,9 @@ const ia = ln.extend({
500
500
  languages: [],
501
501
  button: ({ editor: t, t: n, extension: i }) => {
502
502
  var o, s, c;
503
- const a = (s = (o = i == null ? void 0 : i.options) == null ? void 0 : o.languages) != null && s.length ? (c = i == null ? void 0 : i.options) == null ? void 0 : c.languages : jt;
503
+ const a = (s = (o = i == null ? void 0 : i.options) == null ? void 0 : o.languages) != null && s.length ? (c = i == null ? void 0 : i.options) == null ? void 0 : c.languages : Ot;
504
504
  return {
505
- component: Fi,
505
+ component: $i,
506
506
  componentProps: {
507
507
  action: (l = "js") => t.commands.setCodeBlock({
508
508
  language: l
@@ -518,13 +518,13 @@ const ia = ln.extend({
518
518
  };
519
519
  },
520
520
  addNodeView() {
521
- return je(na);
521
+ return je(ta);
522
522
  },
523
523
  addProseMirrorPlugins() {
524
524
  var e;
525
525
  return [
526
526
  ...((e = this.parent) == null ? void 0 : e.call(this)) || [],
527
- $i({
527
+ Bi({
528
528
  name: this.name,
529
529
  defaultLanguage: null,
530
530
  defaultTheme: this.options.defaultTheme
@@ -532,7 +532,7 @@ const ia = ln.extend({
532
532
  ];
533
533
  }
534
534
  });
535
- function aa(e) {
535
+ function ia(e) {
536
536
  var a, o, s;
537
537
  const { t, lang: n } = B(), i = R(() => {
538
538
  var u;
@@ -582,17 +582,17 @@ function aa(e) {
582
582
  )
583
583
  }
584
584
  ),
585
- c.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ r(Dt, {})
585
+ c.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ r(Rt, {})
586
586
  ] }, `font-family-${l}`);
587
587
  }) })
588
588
  ] });
589
589
  }
590
- const gr = dn.extend({
590
+ const fr = sn.extend({
591
591
  addOptions() {
592
592
  var e;
593
593
  return {
594
594
  ...(e = this.parent) == null ? void 0 : e.call(this),
595
- fontFamilyList: Ti,
595
+ fontFamilyList: Ni,
596
596
  button({ editor: t, extension: n, t: i }) {
597
597
  var u;
598
598
  const { extensions: a = [] } = t.extensionManager ?? [], o = We(((u = n == null ? void 0 : n.options) == null ? void 0 : u.fontFamilyList) || []), s = a.find(
@@ -615,7 +615,7 @@ const gr = dn.extend({
615
615
  });
616
616
  const l = c.filter((d) => d.disabled).length === c.length;
617
617
  return {
618
- component: aa,
618
+ component: ia,
619
619
  componentProps: {
620
620
  tooltip: i("editor.fontFamily.tooltip"),
621
621
  disabled: l,
@@ -627,7 +627,7 @@ const gr = dn.extend({
627
627
  };
628
628
  }
629
629
  });
630
- function oa(e) {
630
+ function aa(e) {
631
631
  var n;
632
632
  const t = R(() => {
633
633
  var o;
@@ -667,16 +667,16 @@ function oa(e) {
667
667
  onClick: i.action,
668
668
  children: [
669
669
  /* @__PURE__ */ r("div", { className: `heading- richtext-ml-1 richtext-h-full${i.level}`, children: i.title }),
670
- !!((o = i == null ? void 0 : i.shortcutKeys) != null && o.length) && /* @__PURE__ */ r(ri, { className: "richtext-pl-4", children: (s = i == null ? void 0 : i.shortcutKeys) == null ? void 0 : s.map((c) => ot(c)).join(" ") })
670
+ !!((o = i == null ? void 0 : i.shortcutKeys) != null && o.length) && /* @__PURE__ */ r(ii, { className: "richtext-pl-4", children: (s = i == null ? void 0 : i.shortcutKeys) == null ? void 0 : s.map((c) => ot(c)).join(" ") })
671
671
  ]
672
672
  }
673
673
  ),
674
- i.level === 0 && /* @__PURE__ */ r(Dt, {})
674
+ i.level === 0 && /* @__PURE__ */ r(Rt, {})
675
675
  ] }, `heading-k-${a}`);
676
676
  }) })
677
677
  ] });
678
678
  }
679
- const _r = un.extend({
679
+ const gr = cn.extend({
680
680
  addOptions() {
681
681
  var e;
682
682
  return {
@@ -704,7 +704,7 @@ const _r = un.extend({
704
704
  });
705
705
  const l = c.filter((d) => d.disabled).length === c.length;
706
706
  return {
707
- component: oa,
707
+ component: aa,
708
708
  componentProps: {
709
709
  tooltip: i("editor.heading.tooltip"),
710
710
  disabled: l,
@@ -715,7 +715,7 @@ const _r = un.extend({
715
715
  }
716
716
  };
717
717
  }
718
- }), Xt = le.Root, ft = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
718
+ }), Gt = le.Root, ft = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
719
719
  le.List,
720
720
  {
721
721
  ref: n,
@@ -739,7 +739,7 @@ const Ne = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
739
739
  }
740
740
  ));
741
741
  Ne.displayName = le.Trigger.displayName;
742
- const Te = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
742
+ const Ae = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
743
743
  le.Content,
744
744
  {
745
745
  ref: n,
@@ -750,8 +750,8 @@ const Te = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
750
750
  ...t
751
751
  }
752
752
  ));
753
- Te.displayName = le.Content.displayName;
754
- const Yt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
753
+ Ae.displayName = le.Content.displayName;
754
+ const Xt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
755
755
  Ge.Root,
756
756
  {
757
757
  ref: n,
@@ -764,13 +764,13 @@ const Yt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
764
764
  Ge.Indicator,
765
765
  {
766
766
  className: E("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),
767
- children: /* @__PURE__ */ r(Pt, { className: "!richtext-h-4 !richtext-w-4" })
767
+ children: /* @__PURE__ */ r(zt, { className: "!richtext-h-4 !richtext-w-4" })
768
768
  }
769
769
  )
770
770
  }
771
771
  ));
772
- Yt.displayName = Ge.Root.displayName;
773
- function ra(e) {
772
+ Xt.displayName = Ge.Root.displayName;
773
+ function oa(e) {
774
774
  var n;
775
775
  const t = R(() => {
776
776
  var o;
@@ -838,7 +838,7 @@ function ra(e) {
838
838
  )
839
839
  ] });
840
840
  }
841
- const br = hn.extend({
841
+ const _r = ln.extend({
842
842
  addOptions() {
843
843
  var e;
844
844
  return {
@@ -875,7 +875,7 @@ const br = hn.extend({
875
875
  };
876
876
  }), l = c.filter((d) => d.disabled).length === c.length;
877
877
  return {
878
- component: ra,
878
+ component: oa,
879
879
  componentProps: {
880
880
  icon: "AlignJustify",
881
881
  tooltip: i("editor.textalign.tooltip"),
@@ -887,7 +887,7 @@ const br = hn.extend({
887
887
  };
888
888
  }
889
889
  });
890
- function sa(e) {
890
+ function ra(e) {
891
891
  var i;
892
892
  const { t } = B(), n = R(() => {
893
893
  const a = (e.items || []).find((s) => s.isActive());
@@ -924,7 +924,7 @@ function sa(e) {
924
924
  )) })
925
925
  ] });
926
926
  }
927
- const xr = H.create({
927
+ const br = H.create({
928
928
  name: "fontSize",
929
929
  addOptions() {
930
930
  var e;
@@ -952,7 +952,7 @@ const xr = H.create({
952
952
  default: u.value === o.value || !1
953
953
  })), c = s.filter((u) => u.disabled).length === s.length;
954
954
  return {
955
- component: sa,
955
+ component: ra,
956
956
  componentProps: {
957
957
  editor: t,
958
958
  tooltip: i("editor.fontSize.tooltip"),
@@ -987,7 +987,7 @@ const xr = H.create({
987
987
  };
988
988
  }
989
989
  });
990
- function ca({ fill: e }) {
990
+ function sa({ fill: e }) {
991
991
  return /* @__PURE__ */ r(
992
992
  "svg",
993
993
  {
@@ -1028,7 +1028,7 @@ function ca({ fill: e }) {
1028
1028
  }
1029
1029
  );
1030
1030
  }
1031
- function la(e) {
1031
+ function ca(e) {
1032
1032
  const [t, n] = k(void 0);
1033
1033
  function i(s) {
1034
1034
  var c;
@@ -1039,15 +1039,15 @@ function la(e) {
1039
1039
  (s = e.action) == null || s.call(e, t);
1040
1040
  }
1041
1041
  const o = j(
1042
- $n((s) => {
1042
+ On((s) => {
1043
1043
  n(s);
1044
1044
  }, 350),
1045
1045
  []
1046
1046
  );
1047
1047
  return /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-h-[32px]", children: [
1048
- /* @__PURE__ */ r(y, { tooltip: e == null ? void 0 : e.tooltip, disabled: e == null ? void 0 : e.disabled, action: a, children: /* @__PURE__ */ r("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ r(ca, { fill: t }) }) }),
1048
+ /* @__PURE__ */ r(y, { tooltip: e == null ? void 0 : e.tooltip, disabled: e == null ? void 0 : e.disabled, action: a, children: /* @__PURE__ */ r("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ r(sa, { fill: t }) }) }),
1049
1049
  /* @__PURE__ */ r(
1050
- si,
1050
+ ai,
1051
1051
  {
1052
1052
  selectedColor: t,
1053
1053
  setSelectedColor: o,
@@ -1060,14 +1060,14 @@ function la(e) {
1060
1060
  )
1061
1061
  ] });
1062
1062
  }
1063
- const pr = mn.extend({
1063
+ const xr = dn.extend({
1064
1064
  addOptions() {
1065
1065
  var e;
1066
1066
  return {
1067
1067
  ...(e = this.parent) == null ? void 0 : e.call(this),
1068
1068
  button({ editor: t, t: n, extension: i }) {
1069
1069
  return {
1070
- component: la,
1070
+ component: ca,
1071
1071
  componentProps: {
1072
1072
  colors: i.options.colors,
1073
1073
  defaultColor: i.options.defaultColor,
@@ -1086,14 +1086,14 @@ const pr = mn.extend({
1086
1086
  }
1087
1087
  };
1088
1088
  }
1089
- }), wr = fn.extend({
1089
+ }), pr = un.extend({
1090
1090
  addOptions() {
1091
1091
  var e;
1092
1092
  return {
1093
1093
  ...(e = this.parent) == null ? void 0 : e.call(this),
1094
1094
  multicolor: !0,
1095
1095
  button: ({ editor: t, t: n }) => ({
1096
- component: ci,
1096
+ component: oi,
1097
1097
  componentProps: {
1098
1098
  action: (i) => {
1099
1099
  typeof i == "string" && t.chain().focus().setHighlight({ color: i }).run(), i === void 0 && t.chain().focus().unsetHighlight().run();
@@ -1107,7 +1107,7 @@ const pr = mn.extend({
1107
1107
  })
1108
1108
  };
1109
1109
  }
1110
- }), yr = gn.extend({
1110
+ }), wr = hn.extend({
1111
1111
  addOptions() {
1112
1112
  var e;
1113
1113
  return {
@@ -1125,7 +1125,7 @@ const pr = mn.extend({
1125
1125
  })
1126
1126
  };
1127
1127
  }
1128
- }), vr = Ae.create({
1128
+ }), yr = Te.create({
1129
1129
  name: "clear",
1130
1130
  addOptions() {
1131
1131
  var e;
@@ -1142,7 +1142,7 @@ const pr = mn.extend({
1142
1142
  })
1143
1143
  };
1144
1144
  }
1145
- }), kr = _n.extend({
1145
+ }), vr = mn.extend({
1146
1146
  addOptions() {
1147
1147
  var e;
1148
1148
  return {
@@ -1160,7 +1160,7 @@ const pr = mn.extend({
1160
1160
  })
1161
1161
  };
1162
1162
  }
1163
- }), Cr = bn.extend({
1163
+ }), kr = fn.extend({
1164
1164
  addOptions() {
1165
1165
  var e;
1166
1166
  return {
@@ -1187,9 +1187,9 @@ const pr = mn.extend({
1187
1187
  };
1188
1188
  },
1189
1189
  addExtensions() {
1190
- return [xn.configure(this.options.taskItem)];
1190
+ return [gn.configure(this.options.taskItem)];
1191
1191
  }
1192
- }), Nr = pn.extend({
1192
+ }), Cr = _n.extend({
1193
1193
  addOptions() {
1194
1194
  var e;
1195
1195
  return {
@@ -1211,7 +1211,7 @@ const pr = mn.extend({
1211
1211
  };
1212
1212
  }
1213
1213
  });
1214
- function da(e) {
1214
+ function la(e) {
1215
1215
  const [t, n] = k(!1);
1216
1216
  function i(a, o, s) {
1217
1217
  e.action && (e.action({ link: a, text: o, openInNewTab: s }), n(!1));
@@ -1226,10 +1226,10 @@ function da(e) {
1226
1226
  children: /* @__PURE__ */ r(D, { name: e == null ? void 0 : e.icon })
1227
1227
  }
1228
1228
  ) }),
1229
- /* @__PURE__ */ r(we, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ r(li, { editor: e.editor, onSetLink: i }) })
1229
+ /* @__PURE__ */ r(we, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ r(ri, { editor: e.editor, onSetLink: i }) })
1230
1230
  ] });
1231
1231
  }
1232
- const Tr = wn.extend({
1232
+ const Nr = bn.extend({
1233
1233
  inclusive: !1,
1234
1234
  parseHTML() {
1235
1235
  return [
@@ -1253,7 +1253,7 @@ const Tr = wn.extend({
1253
1253
  ...(e = this.parent) == null ? void 0 : e.call(this),
1254
1254
  openOnClick: !0,
1255
1255
  button: ({ editor: t, t: n }) => ({
1256
- component: da,
1256
+ component: la,
1257
1257
  componentProps: {
1258
1258
  editor: t,
1259
1259
  action: (i) => {
@@ -1286,7 +1286,7 @@ const Tr = wn.extend({
1286
1286
  new J({
1287
1287
  props: {
1288
1288
  handleClick: (e, t) => {
1289
- const { schema: n, doc: i, tr: a } = e.state, o = yn(i.resolve(t), n.marks.link);
1289
+ const { schema: n, doc: i, tr: a } = e.state, o = xn(i.resolve(t), n.marks.link);
1290
1290
  if (!o)
1291
1291
  return !1;
1292
1292
  const s = i.resolve(o.from), c = i.resolve(o.to), l = a.setSelection(new Ht(s, c));
@@ -1296,7 +1296,7 @@ const Tr = wn.extend({
1296
1296
  })
1297
1297
  ];
1298
1298
  }
1299
- }), Ar = vn.extend({
1299
+ }), Ar = pn.extend({
1300
1300
  renderHTML() {
1301
1301
  return [
1302
1302
  "div",
@@ -1328,7 +1328,7 @@ const Tr = wn.extend({
1328
1328
  };
1329
1329
  }
1330
1330
  });
1331
- function ua(e) {
1331
+ function da(e) {
1332
1332
  var u;
1333
1333
  const {
1334
1334
  icon: t = void 0,
@@ -1364,15 +1364,15 @@ function ua(e) {
1364
1364
  ] }) })
1365
1365
  ] });
1366
1366
  }
1367
- const ha = ["undo", "redo"], Lr = kn.extend({
1367
+ const ua = ["undo", "redo"], Tr = wn.extend({
1368
1368
  addOptions() {
1369
1369
  var e;
1370
1370
  return {
1371
1371
  ...(e = this.parent) == null ? void 0 : e.call(this),
1372
1372
  depth: 100,
1373
1373
  newGroupDelay: 500,
1374
- button: ({ editor: t, t: n }) => ha.map((i) => ({
1375
- component: ua,
1374
+ button: ({ editor: t, t: n }) => ua.map((i) => ({
1375
+ component: da,
1376
1376
  componentProps: {
1377
1377
  action: () => {
1378
1378
  i === "undo" && t.chain().focus().undo().run(), i === "redo" && t.chain().focus().redo().run();
@@ -1386,10 +1386,10 @@ const ha = ["undo", "redo"], Lr = kn.extend({
1386
1386
  }))
1387
1387
  };
1388
1388
  }
1389
- }), ma = Cn.extend({
1389
+ }), ha = yn.extend({
1390
1390
  content: "(block|columns)+"
1391
1391
  // echo editor is a block editor
1392
- }), Sr = H.create({
1392
+ }), Lr = H.create({
1393
1393
  name: "columnActionButton",
1394
1394
  addOptions() {
1395
1395
  var e;
@@ -1407,7 +1407,7 @@ const ha = ["undo", "redo"], Lr = kn.extend({
1407
1407
  })
1408
1408
  };
1409
1409
  }
1410
- }), fa = H.create({
1410
+ }), ma = H.create({
1411
1411
  name: "selection",
1412
1412
  addProseMirrorPlugins() {
1413
1413
  const { editor: e } = this;
@@ -1427,7 +1427,7 @@ const ha = ["undo", "redo"], Lr = kn.extend({
1427
1427
  ];
1428
1428
  }
1429
1429
  });
1430
- function ga(e) {
1430
+ function fa(e) {
1431
1431
  const { t } = B(), n = R(() => [
1432
1432
  {
1433
1433
  name: "paragraph",
@@ -1541,7 +1541,7 @@ function ga(e) {
1541
1541
  )
1542
1542
  ] });
1543
1543
  }
1544
- const _a = H.create({
1544
+ const ga = H.create({
1545
1545
  name: "text-bubble",
1546
1546
  addOptions() {
1547
1547
  var e;
@@ -1549,7 +1549,7 @@ const _a = H.create({
1549
1549
  ...(e = this.parent) == null ? void 0 : e.call(this),
1550
1550
  toolbar: !1,
1551
1551
  button: () => ({
1552
- component: ga,
1552
+ component: fa,
1553
1553
  componentProps: {}
1554
1554
  })
1555
1555
  };
@@ -1558,7 +1558,7 @@ const _a = H.create({
1558
1558
  function kt({ types: e, node: t }) {
1559
1559
  return Array.isArray(e) && e.includes(t.type) || t.type === e;
1560
1560
  }
1561
- const ba = H.create({
1561
+ const _a = H.create({
1562
1562
  name: "trailingNode",
1563
1563
  addOptions() {
1564
1564
  return {
@@ -1591,12 +1591,12 @@ const ba = H.create({
1591
1591
  })
1592
1592
  ];
1593
1593
  }
1594
- }), Mr = H.create({
1594
+ }), Sr = H.create({
1595
1595
  name: "base-kit",
1596
1596
  addExtensions() {
1597
1597
  const e = [];
1598
- return this.options.document !== !1 && e.push(ma.configure()), this.options.placeholder !== !1 && e.push(
1599
- Nn.configure({
1598
+ return this.options.document !== !1 && e.push(ha.configure()), this.options.placeholder !== !1 && e.push(
1599
+ vn.configure({
1600
1600
  placeholder: ({ node: t, pos: n, editor: i }) => {
1601
1601
  var a, o, s, c, l;
1602
1602
  return ((a = t == null ? void 0 : t.type) == null ? void 0 : a.name) === "columns" || ((o = t == null ? void 0 : t.content) == null ? void 0 : o.size) !== 0 ? "" : ((s = t == null ? void 0 : t.type) == null ? void 0 : s.name) === "heading" ? `${z.t(`editor.heading.h${t.attrs.level}.tooltip`)}` : ((c = t == null ? void 0 : t.type) == null ? void 0 : c.name) === "codeBlock" || ((l = t == null ? void 0 : t.type) == null ? void 0 : l.name) === "table" ? "" : i.extensionManager.extensions.some((u) => u.name === "slashCommand") ? z.t("editor.slash") : n === 0 ? z.t("editor.content") : z.t("editor.content");
@@ -1604,19 +1604,19 @@ const ba = H.create({
1604
1604
  ...this.options.placeholder
1605
1605
  })
1606
1606
  ), this.options.focus !== !1 && e.push(
1607
- Tn.configure({
1607
+ kn.configure({
1608
1608
  className: "focus",
1609
1609
  ...this.options.focus
1610
1610
  })
1611
- ), this.options.text !== !1 && e.push(An.configure()), this.options.textBubble !== !1 && e.push(_a.configure()), this.options.gapcursor !== !1 && e.push(Ln.configure()), this.options.dropcursor !== !1 && e.push(
1612
- Sn.configure({
1611
+ ), this.options.text !== !1 && e.push(Cn.configure()), this.options.textBubble !== !1 && e.push(ga.configure()), this.options.gapcursor !== !1 && e.push(Nn.configure()), this.options.dropcursor !== !1 && e.push(
1612
+ An.configure({
1613
1613
  ...this.options.dropcursor,
1614
1614
  width: 2,
1615
1615
  class: "ProseMirror-dropcursor border-black"
1616
1616
  })
1617
- ), this.options.characterCount !== !1 && e.push(Mn.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(In.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(En.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Hn.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(zn.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(ba.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(fa), this.options.multiColumn !== !1 && e.push(di, ui), e;
1617
+ ), this.options.characterCount !== !1 && e.push(Tn.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Ln.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(Sn.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Mn.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(In.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(_a.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(ma), this.options.multiColumn !== !1 && e.push(si, ci), e;
1618
1618
  }
1619
- }), Ir = H.create({
1619
+ }), Mr = H.create({
1620
1620
  name: "subAndSuperScript",
1621
1621
  addOptions() {
1622
1622
  var e;
@@ -1651,7 +1651,7 @@ const ba = H.create({
1651
1651
  return this.options.subscript !== !1 && e.push(Mt.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(It.configure(this.options.superscript)), e;
1652
1652
  }
1653
1653
  });
1654
- function xa(e) {
1654
+ function ba(e) {
1655
1655
  var n;
1656
1656
  const t = R(() => {
1657
1657
  var o;
@@ -1678,7 +1678,7 @@ function xa(e) {
1678
1678
  disabled: e == null ? void 0 : e.disabled,
1679
1679
  icon: e == null ? void 0 : e.icon,
1680
1680
  tooltip: e == null ? void 0 : e.tooltip,
1681
- children: /* @__PURE__ */ r(hi, { className: "richtext-size-3 richtext-text-gray-500" })
1681
+ children: /* @__PURE__ */ r(li, { className: "richtext-size-3 richtext-text-gray-500" })
1682
1682
  }
1683
1683
  )
1684
1684
  }
@@ -1699,7 +1699,7 @@ function xa(e) {
1699
1699
  )) })
1700
1700
  ] });
1701
1701
  }
1702
- const Er = H.create({
1702
+ const Ir = H.create({
1703
1703
  name: "moreMark",
1704
1704
  addOptions() {
1705
1705
  var e;
@@ -1722,7 +1722,7 @@ const Er = H.create({
1722
1722
  shortcutKeys: ["mod", ","]
1723
1723
  }, l = [];
1724
1724
  return a !== !1 && l.push(s), o !== !1 && l.push(c), {
1725
- component: xa,
1725
+ component: ba,
1726
1726
  componentProps: {
1727
1727
  icon: "Type",
1728
1728
  tooltip: i("editor.moremark"),
@@ -1737,7 +1737,7 @@ const Er = H.create({
1737
1737
  const e = [];
1738
1738
  return this.options.subscript !== !1 && e.push(Mt.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(It.configure(this.options.superscript)), e;
1739
1739
  }
1740
- }), Hr = H.create({
1740
+ }), Er = H.create({
1741
1741
  name: "indent",
1742
1742
  addOptions() {
1743
1743
  var e;
@@ -1810,10 +1810,10 @@ const Er = H.create({
1810
1810
  };
1811
1811
  }
1812
1812
  });
1813
- function pa(e) {
1813
+ function xa(e) {
1814
1814
  return Number.parseFloat(e.replace("%", "")) / 100;
1815
1815
  }
1816
- function wa(e) {
1816
+ function pa(e) {
1817
1817
  const { t } = B(), [n, i] = k("default");
1818
1818
  function a(s) {
1819
1819
  s === "default" ? e.editor.commands.unsetLineHeight() : e.editor.commands.setLineHeight(s), i(s);
@@ -1822,7 +1822,7 @@ function wa(e) {
1822
1822
  const l = e.editor.extensionManager.extensions.find(
1823
1823
  (u) => u.name === "lineHeight"
1824
1824
  ).options.lineHeights.map((u) => ({
1825
- label: pa(u),
1825
+ label: xa(u),
1826
1826
  value: u
1827
1827
  }));
1828
1828
  return l.unshift({
@@ -1865,15 +1865,15 @@ function wa(e) {
1865
1865
  )) })
1866
1866
  ] });
1867
1867
  }
1868
- const ya = ["paragraph", "heading", "list_item", "todo_item"];
1869
- function va(e, t) {
1868
+ const wa = ["paragraph", "heading", "list_item", "todo_item"];
1869
+ function ya(e, t) {
1870
1870
  const { selection: n, doc: i } = e;
1871
- if (!n || !i || !(n instanceof Ht || n instanceof Fn))
1871
+ if (!n || !i || !(n instanceof Ht || n instanceof jn))
1872
1872
  return e;
1873
- const { from: a, to: o } = n, s = [], c = t && t !== Bt ? t : null;
1873
+ const { from: a, to: o } = n, s = [], c = t && t !== jt ? t : null;
1874
1874
  if (i.nodesBetween(a, o, (l, u) => {
1875
1875
  const d = l.type;
1876
- return ya.includes(d.name) ? ((l.attrs.lineHeight || null) !== c && s.push({
1876
+ return wa.includes(d.name) ? ((l.attrs.lineHeight || null) !== c && s.push({
1877
1877
  node: l,
1878
1878
  pos: u,
1879
1879
  nodeType: d
@@ -1890,25 +1890,25 @@ function va(e, t) {
1890
1890
  }
1891
1891
  return e;
1892
1892
  }
1893
- function ka(e) {
1893
+ function va(e) {
1894
1894
  return ({ state: t, dispatch: n }) => {
1895
1895
  const { selection: i } = t;
1896
1896
  let { tr: a } = t;
1897
- return a = a.setSelection(i), a = va(a, e), a.docChanged ? (n && n(a), !0) : !1;
1897
+ return a = a.setSelection(i), a = ya(a, e), a.docChanged ? (n && n(a), !0) : !1;
1898
1898
  };
1899
1899
  }
1900
- const zr = H.create({
1900
+ const Hr = H.create({
1901
1901
  name: "lineHeight",
1902
1902
  addOptions() {
1903
1903
  var e;
1904
1904
  return {
1905
1905
  ...(e = this.parent) == null ? void 0 : e.call(this),
1906
1906
  types: ["paragraph", "heading", "list_item", "todo_item"],
1907
- lineHeights: Li,
1908
- defaultHeight: Bt,
1907
+ lineHeights: Ti,
1908
+ defaultHeight: jt,
1909
1909
  button({ editor: t, t: n }) {
1910
1910
  return {
1911
- component: wa,
1911
+ component: pa,
1912
1912
  componentProps: {
1913
1913
  editor: t,
1914
1914
  tooltip: n("editor.lineheight.tooltip")
@@ -1933,28 +1933,30 @@ const zr = H.create({
1933
1933
  },
1934
1934
  addCommands() {
1935
1935
  return {
1936
- setLineHeight: (e) => ka(e),
1936
+ setLineHeight: (e) => va(e),
1937
1937
  unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
1938
1938
  };
1939
1939
  }
1940
- }), Zt = Rt(!1);
1941
- function Ca() {
1942
- return zt(Zt);
1940
+ });
1941
+ function ka() {
1942
+ const [e] = di((t) => t.value);
1943
+ return e;
1943
1944
  }
1944
1945
  const ue = {
1945
1946
  setOpen: (e) => {
1946
- Zt(e);
1947
+ Pt("UPLOAD_IMAGE", e);
1947
1948
  }
1948
- }, Jt = Rt(!1);
1949
- function Na() {
1950
- return zt(Jt);
1949
+ };
1950
+ function Ca() {
1951
+ const [e] = ui((t) => t.value);
1952
+ return e;
1951
1953
  }
1952
1954
  const ke = {
1953
1955
  setOpen: (e) => {
1954
- Jt(e);
1956
+ Pt("UPLOAD_VIDEO", e);
1955
1957
  }
1956
1958
  };
1957
- function Ta(e) {
1959
+ function Na(e) {
1958
1960
  const t = [
1959
1961
  {
1960
1962
  name: "format",
@@ -2128,7 +2130,7 @@ function Aa(e, t) {
2128
2130
  "button",
2129
2131
  {
2130
2132
  onClick: () => b(_, C),
2131
- ref: (T) => x(_, C, T),
2133
+ ref: (A) => x(_, C, A),
2132
2134
  className: E("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ", {
2133
2135
  "slash-command-active": a === _ && n === C
2134
2136
  }),
@@ -2157,13 +2159,13 @@ function Aa(e, t) {
2157
2159
  }
2158
2160
  );
2159
2161
  }
2160
- const La = Qe(Aa), ie = "slashCommand";
2161
- let A;
2162
- const Rr = H.create({
2162
+ const Ta = Qe(Aa), ie = "slashCommand";
2163
+ let T;
2164
+ const zr = H.create({
2163
2165
  name: ie,
2164
2166
  priority: 200,
2165
2167
  onCreate() {
2166
- A = ut("body", {
2168
+ T = ut("body", {
2167
2169
  interactive: !0,
2168
2170
  trigger: "manual",
2169
2171
  placement: "bottom-start",
@@ -2200,7 +2202,7 @@ const Rr = H.create({
2200
2202
  const { view: i } = e;
2201
2203
  n.action({ editor: e, range: t }), i.focus();
2202
2204
  },
2203
- items: ({ query: e, editor: t }) => Ta(t.extensionManager.extensions).map((s) => ({
2205
+ items: ({ query: e, editor: t }) => Na(t.extensionManager.extensions).map((s) => ({
2204
2206
  ...s,
2205
2207
  commands: s.commands.filter((c) => {
2206
2208
  const l = c.label.toLowerCase().trim(), u = e.toLowerCase().trim();
@@ -2224,7 +2226,7 @@ const Rr = H.create({
2224
2226
  return {
2225
2227
  onStart: (n) => {
2226
2228
  var o;
2227
- e = new Ze(La, {
2229
+ e = new Ze(Ta, {
2228
2230
  props: n,
2229
2231
  editor: n.editor
2230
2232
  });
@@ -2242,14 +2244,14 @@ const Rr = H.create({
2242
2244
  return new DOMRect(s.x, c, s.width, s.height);
2243
2245
  };
2244
2246
  t = () => {
2245
- A == null || A[0].setProps({
2247
+ T == null || T[0].setProps({
2246
2248
  getReferenceClientRect: a
2247
2249
  });
2248
- }, (o = i.dom.parentElement) == null || o.addEventListener("scroll", t), A == null || A[0].setProps({
2250
+ }, (o = i.dom.parentElement) == null || o.addEventListener("scroll", t), T == null || T[0].setProps({
2249
2251
  getReferenceClientRect: a,
2250
2252
  appendTo: () => document.body,
2251
2253
  content: e.element
2252
- }), A == null || A[0].show();
2254
+ }), T == null || T[0].show();
2253
2255
  },
2254
2256
  onUpdate(n) {
2255
2257
  var s;
@@ -2260,7 +2262,7 @@ const Rr = H.create({
2260
2262
  const c = n.clientRect();
2261
2263
  return c ? new DOMRect(c.x, c.y, c.width, c.height) : n.editor.storage[ie].rect;
2262
2264
  }, o = () => {
2263
- A == null || A[0].setProps({
2265
+ T == null || T[0].setProps({
2264
2266
  getReferenceClientRect: a
2265
2267
  });
2266
2268
  };
@@ -2271,17 +2273,17 @@ const Rr = H.create({
2271
2273
  top: 0,
2272
2274
  right: 0,
2273
2275
  bottom: 0
2274
- }, A == null || A[0].setProps({
2276
+ }, T == null || T[0].setProps({
2275
2277
  getReferenceClientRect: a
2276
2278
  });
2277
2279
  },
2278
2280
  onKeyDown(n) {
2279
2281
  var i;
2280
- return n.event.key === "Escape" ? (A == null || A[0].hide(), !0) : (A != null && A[0].state.isShown || A == null || A[0].show(), (i = e.ref) == null ? void 0 : i.onKeyDown(n));
2282
+ return n.event.key === "Escape" ? (T == null || T[0].hide(), !0) : (T != null && T[0].state.isShown || T == null || T[0].show(), (i = e.ref) == null ? void 0 : i.onKeyDown(n));
2281
2283
  },
2282
2284
  onExit(n) {
2283
2285
  var i;
2284
- if (A == null || A[0].hide(), t) {
2286
+ if (T == null || T[0].hide(), t) {
2285
2287
  const { view: a } = n.editor;
2286
2288
  (i = a.dom.parentElement) == null || i.removeEventListener("scroll", t);
2287
2289
  }
@@ -2305,7 +2307,7 @@ const Rr = H.create({
2305
2307
  };
2306
2308
  }
2307
2309
  });
2308
- function Sa({ editor: e, imageInline: t, onClose: n }) {
2310
+ function La({ editor: e, imageInline: t, onClose: n }) {
2309
2311
  const { t: i } = B(), [a, o] = k(!1), s = Pe.useRef(null), [c, l] = Pe.useState(), [u, d] = Pe.useState(""), f = X(null), [m, h] = k({
2310
2312
  src: "",
2311
2313
  file: null
@@ -2317,29 +2319,29 @@ function Sa({ editor: e, imageInline: t, onClose: n }) {
2317
2319
  }
2318
2320
  }
2319
2321
  function x(_, w) {
2320
- const C = document.createElement("canvas"), T = _.naturalWidth / _.width, L = _.naturalHeight / _.height;
2321
- C.width = w.width * T, C.height = w.height * L;
2322
+ const C = document.createElement("canvas"), A = _.naturalWidth / _.width, L = _.naturalHeight / _.height;
2323
+ C.width = w.width * A, C.height = w.height * L;
2322
2324
  const q = C.getContext("2d");
2323
2325
  return q && (q.imageSmoothingEnabled = !1, q.drawImage(
2324
2326
  _,
2325
- w.x * T,
2327
+ w.x * A,
2326
2328
  w.y * L,
2327
- w.width * T,
2329
+ w.width * A,
2328
2330
  w.height * L,
2329
2331
  0,
2330
2332
  0,
2331
- w.width * T,
2333
+ w.width * A,
2332
2334
  w.height * L
2333
2335
  )), C.toDataURL("image/png", 1);
2334
2336
  }
2335
2337
  async function N() {
2336
2338
  var _, w;
2337
2339
  try {
2338
- const C = fi(u, ((_ = m == null ? void 0 : m.file) == null ? void 0 : _.name) || "image.png"), T = (w = e.extensionManager.extensions.find(
2340
+ const C = mi(u, ((_ = m == null ? void 0 : m.file) == null ? void 0 : _.name) || "image.png"), A = (w = e.extensionManager.extensions.find(
2339
2341
  (q) => q.name === "image"
2340
2342
  )) == null ? void 0 : w.options;
2341
2343
  let L = "";
2342
- T.upload ? L = await T.upload(C) : L = URL.createObjectURL(C), e.chain().focus().setImageInline({ src: L, inline: t }).run(), o(!1), h({
2344
+ A.upload ? L = await A.upload(C) : L = URL.createObjectURL(C), e.chain().focus().setImageInline({ src: L, inline: t }).run(), o(!1), h({
2343
2345
  src: "",
2344
2346
  file: null
2345
2347
  }), n();
@@ -2356,9 +2358,9 @@ function Sa({ editor: e, imageInline: t, onClose: n }) {
2356
2358
  const w = (L = _ == null ? void 0 : _.target) == null ? void 0 : L.files;
2357
2359
  if (!e || e.isDestroyed || w.length === 0)
2358
2360
  return;
2359
- const C = w[0], T = await gi(C);
2361
+ const C = w[0], A = await fi(C);
2360
2362
  o(!0), h({
2361
- src: T.src,
2363
+ src: A.src,
2362
2364
  file: C
2363
2365
  });
2364
2366
  };
@@ -2377,7 +2379,7 @@ function Sa({ editor: e, imageInline: t, onClose: n }) {
2377
2379
  /* @__PURE__ */ g(lt, { children: [
2378
2380
  /* @__PURE__ */ r(dt, { children: i("editor.image.dialog.tab.uploadCrop") }),
2379
2381
  /* @__PURE__ */ r("div", { children: m.src && /* @__PURE__ */ r(
2380
- Hi,
2382
+ Ei,
2381
2383
  {
2382
2384
  className: "richtext-w-full",
2383
2385
  crop: c,
@@ -2393,7 +2395,7 @@ function Sa({ editor: e, imageInline: t, onClose: n }) {
2393
2395
  )
2394
2396
  }
2395
2397
  ) }),
2396
- /* @__PURE__ */ g(mi, { children: [
2398
+ /* @__PURE__ */ g(hi, { children: [
2397
2399
  /* @__PURE__ */ g(
2398
2400
  O,
2399
2401
  {
@@ -2450,9 +2452,9 @@ function Sa({ editor: e, imageInline: t, onClose: n }) {
2450
2452
  )
2451
2453
  ] });
2452
2454
  }
2453
- function Ma(e) {
2455
+ function Sa(e) {
2454
2456
  var m;
2455
- const { t } = B(), n = Ca(), [i, a] = k(""), o = X(null), [s, c] = k(((m = e.editor.extensionManager.extensions.find(
2457
+ const { t } = B(), n = ka(), [i, a] = k(""), o = X(null), [s, c] = k(((m = e.editor.extensionManager.extensions.find(
2456
2458
  (h) => h.name === Ct.name
2457
2459
  )) == null ? void 0 : m.options.defaultInline) || !1), l = R(() => {
2458
2460
  var b;
@@ -2493,7 +2495,7 @@ function Ma(e) {
2493
2495
  /* @__PURE__ */ g(lt, { children: [
2494
2496
  /* @__PURE__ */ r(dt, { children: t("editor.image.dialog.title") }),
2495
2497
  /* @__PURE__ */ g(
2496
- Xt,
2498
+ Gt,
2497
2499
  {
2498
2500
  activationMode: "manual",
2499
2501
  defaultValue: l.resourceImage === "both" || l.resourceImage === "upload" ? "upload" : "link",
@@ -2504,7 +2506,7 @@ function Ma(e) {
2504
2506
  ] }),
2505
2507
  /* @__PURE__ */ g("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
2506
2508
  /* @__PURE__ */ r(
2507
- Yt,
2509
+ Xt,
2508
2510
  {
2509
2511
  checked: s,
2510
2512
  onCheckedChange: (h) => {
@@ -2514,7 +2516,7 @@ function Ma(e) {
2514
2516
  ),
2515
2517
  /* @__PURE__ */ r(De, { children: t("editor.link.dialog.inline") })
2516
2518
  ] }),
2517
- /* @__PURE__ */ g(Te, { value: "upload", children: [
2519
+ /* @__PURE__ */ g(Ae, { value: "upload", children: [
2518
2520
  /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
2519
2521
  /* @__PURE__ */ r(
2520
2522
  O,
@@ -2526,7 +2528,7 @@ function Ma(e) {
2526
2528
  }
2527
2529
  ),
2528
2530
  /* @__PURE__ */ r(
2529
- Sa,
2531
+ La,
2530
2532
  {
2531
2533
  editor: e.editor,
2532
2534
  imageInline: s,
@@ -2548,7 +2550,7 @@ function Ma(e) {
2548
2550
  }
2549
2551
  )
2550
2552
  ] }),
2551
- /* @__PURE__ */ r(Te, { value: "link", children: /* @__PURE__ */ r("form", { onSubmit: d, children: /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
2553
+ /* @__PURE__ */ r(Ae, { value: "link", children: /* @__PURE__ */ r("form", { onSubmit: d, children: /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
2552
2554
  /* @__PURE__ */ r(
2553
2555
  Oe,
2554
2556
  {
@@ -2576,7 +2578,7 @@ const He = {
2576
2578
  BOTTOM_LEFT: "bl",
2577
2579
  BOTTOM_RIGHT: "br"
2578
2580
  };
2579
- function Ia(e) {
2581
+ function Ma(e) {
2580
2582
  var L, q;
2581
2583
  const [t, n] = k({
2582
2584
  width: wt,
@@ -2599,14 +2601,14 @@ function Ia(e) {
2599
2601
  var gt;
2600
2602
  const { src: v, alt: $, width: F, height: ee, flipX: te, flipY: M } = (gt = e == null ? void 0 : e.node) == null ? void 0 : gt.attrs, K = _t(F) ? `${F}px` : F, W = _t(ee) ? `${ee}px` : ee, Ue = [];
2601
2603
  te && Ue.push("rotateX(180deg)"), M && Ue.push("rotateY(180deg)");
2602
- const tn = Ue.join(" ");
2604
+ const Jt = Ue.join(" ");
2603
2605
  return {
2604
2606
  src: v || void 0,
2605
2607
  alt: $ || void 0,
2606
2608
  style: {
2607
2609
  width: K || void 0,
2608
2610
  height: W || void 0,
2609
- transform: tn || "none"
2611
+ transform: Jt || "none"
2610
2612
  }
2611
2613
  };
2612
2614
  }, [(q = e == null ? void 0 : e.node) == null ? void 0 : q.attrs]), h = R(() => {
@@ -2652,7 +2654,7 @@ function Ia(e) {
2652
2654
  bt((v) => {
2653
2655
  if (v.preventDefault(), v.stopPropagation(), !s)
2654
2656
  return;
2655
- const { x: $, w: F, dir: ee } = l, te = (v.clientX - $) * (/l/.test(ee) ? -1 : 1), M = Un(F + te, Si, t.width);
2657
+ const { x: $, w: F, dir: ee } = l, te = (v.clientX - $) * (/l/.test(ee) ? -1 : 1), M = Bn(F + te, Li, t.width);
2656
2658
  e.updateAttributes({
2657
2659
  width: M,
2658
2660
  height: null
@@ -2678,10 +2680,10 @@ function Ia(e) {
2678
2680
  P(() => (s ? w() : C(), () => {
2679
2681
  C();
2680
2682
  }), [s, w, C]);
2681
- const T = R(() => new ResizeObserver(() => N()), [N]);
2682
- return P(() => (T.observe(e.editor.view.dom), () => {
2683
- T.disconnect();
2684
- }), [e.editor.view.dom, T]), /* @__PURE__ */ r(
2683
+ const A = R(() => new ResizeObserver(() => N()), [N]);
2684
+ return P(() => (A.observe(e.editor.view.dom), () => {
2685
+ A.disconnect();
2686
+ }), [e.editor.view.dom, A]), /* @__PURE__ */ r(
2685
2687
  he,
2686
2688
  {
2687
2689
  as: f ? "span" : "div",
@@ -2722,7 +2724,7 @@ function Ia(e) {
2722
2724
  );
2723
2725
  }
2724
2726
  const fe = new Q("upload-image");
2725
- function Ea() {
2727
+ function Ia() {
2726
2728
  return new J({
2727
2729
  key: fe,
2728
2730
  state: {
@@ -2734,7 +2736,7 @@ function Ea() {
2734
2736
  const n = e.getMeta(fe);
2735
2737
  if (n != null && n.add)
2736
2738
  for (const { id: i, pos: a, src: o } of n.add) {
2737
- const s = Ha(o), c = ge.widget(a, s, { id: i });
2739
+ const s = Ea(o), c = ge.widget(a, s, { id: i });
2738
2740
  t = t.add(e.doc, [c]);
2739
2741
  }
2740
2742
  else if (n != null && n.remove)
@@ -2750,18 +2752,18 @@ function Ea() {
2750
2752
  }
2751
2753
  });
2752
2754
  }
2753
- function Ha(e) {
2755
+ function Ea(e) {
2754
2756
  const t = document.createElement("div"), n = document.createElement("img");
2755
2757
  return n.setAttribute("class", "opacity-50"), n.src = e, n.addEventListener("load", () => {
2756
2758
  t.setAttribute("class", "img-placeholder");
2757
2759
  }), t.append(n), t;
2758
2760
  }
2759
- function za(e, t) {
2761
+ function Ha(e, t) {
2760
2762
  var a;
2761
2763
  const i = fe.getState(e).find(void 0, void 0, (o) => o.id === t);
2762
2764
  return i.length > 0 ? (a = i[0]) == null ? void 0 : a.from : null;
2763
2765
  }
2764
- function Ra({ validateFn: e, onUpload: t, postUpload: n, defaultInline: i = !1 }) {
2766
+ function za({ validateFn: e, onUpload: t, postUpload: n, defaultInline: i = !1 }) {
2765
2767
  return (a, o, s) => {
2766
2768
  for (const c of a) {
2767
2769
  if (e && !e(c))
@@ -2776,7 +2778,7 @@ function Ra({ validateFn: e, onUpload: t, postUpload: n, defaultInline: i = !1 }
2776
2778
  var p;
2777
2779
  n && typeof f == "string" && (f = await n(f));
2778
2780
  const { schema: m } = o.state;
2779
- let h = za(o.state, l);
2781
+ let h = Ha(o.state, l);
2780
2782
  if (h === null)
2781
2783
  return;
2782
2784
  const b = typeof f == "object" ? d : f, x = (p = m.nodes.image) == null ? void 0 : p.create({
@@ -2798,7 +2800,7 @@ function Ra({ validateFn: e, onUpload: t, postUpload: n, defaultInline: i = !1 }
2798
2800
  }
2799
2801
  };
2800
2802
  }
2801
- function Pa(e, t, n) {
2803
+ function Ra(e, t, n) {
2802
2804
  var a;
2803
2805
  const i = [...((a = t.clipboardData) == null ? void 0 : a.files) || []];
2804
2806
  if (i.length > 0) {
@@ -2808,7 +2810,7 @@ function Pa(e, t, n) {
2808
2810
  }
2809
2811
  return !1;
2810
2812
  }
2811
- function Da(e, t, n, i) {
2813
+ function Pa(e, t, n, i) {
2812
2814
  var o;
2813
2815
  const a = [...((o = t.dataTransfer) == null ? void 0 : o.files) || []];
2814
2816
  if (!n && a.length > 0) {
@@ -2822,13 +2824,13 @@ function Da(e, t, n, i) {
2822
2824
  }
2823
2825
  return !1;
2824
2826
  }
2825
- const Oa = {
2827
+ const Da = {
2826
2828
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
2827
2829
  maxSize: 1024 * 1024 * 5,
2828
2830
  // 5MB
2829
2831
  resourceImage: "both",
2830
2832
  defaultInline: !1
2831
- }, Ct = Rn.extend({
2833
+ }, Ct = En.extend({
2832
2834
  group: "inline",
2833
2835
  inline: !0,
2834
2836
  defining: !0,
@@ -2837,7 +2839,7 @@ const Oa = {
2837
2839
  addOptions() {
2838
2840
  var e;
2839
2841
  return {
2840
- ...Oa,
2842
+ ...Da,
2841
2843
  ...(e = this.parent) == null ? void 0 : e.call(this),
2842
2844
  upload: () => Promise.reject("Image Upload Function"),
2843
2845
  button: ({
@@ -2847,7 +2849,7 @@ const Oa = {
2847
2849
  }) => {
2848
2850
  var a, o;
2849
2851
  return {
2850
- component: Ma,
2852
+ component: Sa,
2851
2853
  componentProps: {
2852
2854
  action: () => !0,
2853
2855
  upload: n.options.upload,
@@ -2898,7 +2900,7 @@ const Oa = {
2898
2900
  };
2899
2901
  },
2900
2902
  addNodeView() {
2901
- return je(Ia);
2903
+ return je(Ma);
2902
2904
  },
2903
2905
  addCommands() {
2904
2906
  var e;
@@ -2974,7 +2976,7 @@ const Oa = {
2974
2976
  ];
2975
2977
  },
2976
2978
  addProseMirrorPlugins() {
2977
- const t = Ra({
2979
+ const t = za({
2978
2980
  validateFn: (n) => !(!this.options.acceptMimes.includes(n.type) || n.size > this.options.maxSize),
2979
2981
  onUpload: this.options.upload,
2980
2982
  // postUpload: this.options.postUpload,
@@ -2983,22 +2985,22 @@ const Oa = {
2983
2985
  return [
2984
2986
  new J({
2985
2987
  props: {
2986
- handlePaste: (n, i) => !i.clipboardData || [...i.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 : Pa(n, i, t),
2987
- handleDrop: (n, i, a, o) => (!(i instanceof DragEvent) || !i.dataTransfer || Da(n, i, o, t), !1)
2988
+ handlePaste: (n, i) => !i.clipboardData || [...i.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 : Ra(n, i, t),
2989
+ handleDrop: (n, i, a, o) => (!(i instanceof DragEvent) || !i.dataTransfer || Pa(n, i, o, t), !1)
2988
2990
  }
2989
2991
  }),
2990
- Ea()
2992
+ Ia()
2991
2993
  ];
2992
2994
  }
2993
2995
  });
2994
- function ja(e) {
2996
+ function Oa(e) {
2995
2997
  return /\.(?:mp4|webm|ogg|mov)$/i.test(e);
2996
2998
  }
2997
- function Ba(e) {
2998
- const { t } = B(), [n, i] = k(""), a = X(null), o = Na(), [s, c] = k(""), l = R(() => {
2999
+ function ja(e) {
3000
+ const { t } = B(), [n, i] = k(""), a = X(null), o = Ca(), [s, c] = k(""), l = R(() => {
2999
3001
  var h;
3000
3002
  return (h = e.editor.extensionManager.extensions.find(
3001
- (b) => b.name === Fa.name
3003
+ (b) => b.name === $a.name
3002
3004
  )) == null ? void 0 : h.options;
3003
3005
  }, [e.editor]);
3004
3006
  async function u(m) {
@@ -3035,7 +3037,7 @@ function Ba(e) {
3035
3037
  /* @__PURE__ */ g(lt, { children: [
3036
3038
  /* @__PURE__ */ r(dt, { children: t("editor.video.dialog.title") }),
3037
3039
  /* @__PURE__ */ g(
3038
- Xt,
3040
+ Gt,
3039
3041
  {
3040
3042
  defaultValue: (l == null ? void 0 : l.resourceVideo) === "both" || (l == null ? void 0 : l.resourceVideo) === "upload" ? "upload" : "link",
3041
3043
  activationMode: "manual",
@@ -3044,7 +3046,7 @@ function Ba(e) {
3044
3046
  ((l == null ? void 0 : l.resourceVideo) === "both" || (l == null ? void 0 : l.resourceVideo) === "upload") && /* @__PURE__ */ r(Ne, { value: "upload", children: t("editor.video.dialog.tab.upload") }),
3045
3047
  ((l == null ? void 0 : l.resourceVideo) === "both" || (l == null ? void 0 : l.resourceVideo) === "link") && /* @__PURE__ */ r(Ne, { value: "link", children: t("editor.video.dialog.link") })
3046
3048
  ] }),
3047
- /* @__PURE__ */ g(Te, { value: "upload", children: [
3049
+ /* @__PURE__ */ g(Ae, { value: "upload", children: [
3048
3050
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ r(O, { className: "richtext-w-full richtext-mt-1", size: "sm", onClick: f, children: t("editor.video.dialog.tab.upload") }) }),
3049
3051
  /* @__PURE__ */ r(
3050
3052
  "input",
@@ -3060,7 +3062,7 @@ function Ba(e) {
3060
3062
  }
3061
3063
  )
3062
3064
  ] }),
3063
- /* @__PURE__ */ g(Te, { value: "link", children: [
3065
+ /* @__PURE__ */ g(Ae, { value: "link", children: [
3064
3066
  /* @__PURE__ */ r("form", { onSubmit: d, children: /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
3065
3067
  /* @__PURE__ */ r(
3066
3068
  Oe,
@@ -3070,7 +3072,7 @@ function Ba(e) {
3070
3072
  value: n,
3071
3073
  onChange: (m) => {
3072
3074
  const h = m.target.value;
3073
- if (!ja(h)) {
3075
+ if (!Oa(h)) {
3074
3076
  c("Invalid video URL"), i("");
3075
3077
  return;
3076
3078
  }
@@ -3090,10 +3092,10 @@ function Ba(e) {
3090
3092
  ] })
3091
3093
  ] });
3092
3094
  }
3093
- function $a(e) {
3095
+ function Ba(e) {
3094
3096
  return e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/"), e = e.replace("https://vimeo.com/", "https://player.vimeo.com/video/"), /^https?:\/\/www.bilibili.com\/video\/.*/i.test(e) && (e = e.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), e.includes("drive.google.com") && (e = e.replace("/view", "/preview")), e;
3095
3097
  }
3096
- const Fa = Ae.create({
3098
+ const $a = Te.create({
3097
3099
  name: "video",
3098
3100
  group: "block",
3099
3101
  atom: !0,
@@ -3106,7 +3108,7 @@ const Fa = Ae.create({
3106
3108
  upload: void 0,
3107
3109
  frameborder: !1,
3108
3110
  resourceVideo: "both",
3109
- width: Mi["size-medium"],
3111
+ width: Si["size-medium"],
3110
3112
  HTMLAttributes: {
3111
3113
  class: "iframe-wrapper",
3112
3114
  style: "display: flex;justify-content: center;"
@@ -3114,7 +3116,7 @@ const Fa = Ae.create({
3114
3116
  button: ({ editor: e, t }) => {
3115
3117
  var n, i;
3116
3118
  return {
3117
- component: Ba,
3119
+ component: ja,
3118
3120
  componentProps: {
3119
3121
  action: () => {
3120
3122
  },
@@ -3134,13 +3136,13 @@ const Fa = Ae.create({
3134
3136
  src: {
3135
3137
  default: null,
3136
3138
  renderHTML: ({ src: e }) => ({
3137
- src: e ? $a(e) : null
3139
+ src: e ? Ba(e) : null
3138
3140
  })
3139
3141
  },
3140
3142
  width: {
3141
3143
  default: this.options.width,
3142
3144
  renderHTML: ({ width: e }) => ({
3143
- width: _i(e)
3145
+ width: gi(e)
3144
3146
  })
3145
3147
  },
3146
3148
  frameborder: {
@@ -3181,7 +3183,7 @@ const Fa = Ae.create({
3181
3183
  };
3182
3184
  }
3183
3185
  });
3184
- function Ua(e, t, n) {
3186
+ function Fa(e, t, n) {
3185
3187
  if (!e.doc)
3186
3188
  return e;
3187
3189
  const i = e.doc.nodeAt(t);
@@ -3193,19 +3195,19 @@ function Ua(e, t, n) {
3193
3195
  };
3194
3196
  return e.setNodeMarkup(t, i.type, a, i.marks);
3195
3197
  }
3196
- function Va(e, t, n) {
3198
+ function Ua(e, t, n) {
3197
3199
  const { doc: i, selection: a } = e;
3198
- return !i || !a || !(a instanceof Vn) || a.forEachCell((o, s) => {
3199
- e = Ua(e, s, n);
3200
+ return !i || !a || !(a instanceof $n) || a.forEachCell((o, s) => {
3201
+ e = Fa(e, s, n);
3200
3202
  }), e;
3201
3203
  }
3202
3204
  function Nt(e, t) {
3203
3205
  return ({ tr: n, state: i, dispatch: a }) => {
3204
3206
  const { selection: o } = i;
3205
- return n = n.setSelection(o), n = Va(n, t, e), n.docChanged ? (a == null || a(n), !0) : !1;
3207
+ return n = n.setSelection(o), n = Ua(n, t, e), n.docChanged ? (a == null || a(n), !0) : !1;
3206
3208
  };
3207
3209
  }
3208
- const qa = H.create({
3210
+ const Va = H.create({
3209
3211
  name: "tableCellBackground",
3210
3212
  addOptions() {
3211
3213
  return {
@@ -3234,17 +3236,17 @@ const qa = H.create({
3234
3236
  unsetTableCellBackground: () => Nt("", this.options)
3235
3237
  };
3236
3238
  }
3237
- }), Ka = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, Wa = /CrOS/, Ga = /android|ipad|playbook|silk/i;
3238
- function Tt(e = {}) {
3239
+ }), qa = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, Ka = /CrOS/, Wa = /android|ipad|playbook|silk/i;
3240
+ function At(e = {}) {
3239
3241
  let t = e.ua || typeof navigator < "u" && navigator.userAgent;
3240
- return t && typeof t == "object" && t.headers && typeof t.headers["user-agent"] == "string" && (t = t.headers["user-agent"]), typeof t != "string" ? !1 : !!(Ka.test(t) && !Wa.test(t) || e.tablet && Ga.test(t) || e.tablet && e.featureDetect && navigator && navigator.maxTouchPoints > 1 && t.includes("Macintosh") && t.includes("Safari"));
3242
+ return t && typeof t == "object" && t.headers && typeof t.headers["user-agent"] == "string" && (t = t.headers["user-agent"]), typeof t != "string" ? !1 : !!(qa.test(t) && !Ka.test(t) || e.tablet && Wa.test(t) || e.tablet && e.featureDetect && navigator && navigator.maxTouchPoints > 1 && t.includes("Macintosh") && t.includes("Safari"));
3241
3243
  }
3242
- const At = (e) => Array.from({ length: e }).map((t, n) => n + 1);
3243
- function Xa(e) {
3244
+ const Tt = (e) => Array.from({ length: e }).map((t, n) => n + 1);
3245
+ function Ga(e) {
3244
3246
  var d;
3245
3247
  const [t, n] = k(!0), [i, a] = k({
3246
- rows: Tt() ? Me : Ie,
3247
- cols: Tt() ? Me : Ie
3248
+ rows: At() ? Me : Ie,
3249
+ cols: At() ? Me : Ie
3248
3250
  }), [o, s] = k({
3249
3251
  rows: Ee,
3250
3252
  cols: Ee
@@ -3282,13 +3284,13 @@ function Xa(e) {
3282
3284
  className: "richtext-w-full !richtext-p-2",
3283
3285
  side: "bottom",
3284
3286
  children: /* @__PURE__ */ g("div", { className: "table-grid-size-editor richtext-p-0", children: [
3285
- /* @__PURE__ */ r("div", { className: "richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1", children: (d = At(i == null ? void 0 : i.rows)) == null ? void 0 : d.map((f) => {
3287
+ /* @__PURE__ */ r("div", { className: "richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1", children: (d = Tt(i == null ? void 0 : i.rows)) == null ? void 0 : d.map((f) => {
3286
3288
  var m;
3287
3289
  return /* @__PURE__ */ r(
3288
3290
  "div",
3289
3291
  {
3290
3292
  className: "richtext-flex richtext-gap-1",
3291
- children: (m = At(i == null ? void 0 : i.cols)) == null ? void 0 : m.map((h) => /* @__PURE__ */ r(
3293
+ children: (m = Tt(i == null ? void 0 : i.cols)) == null ? void 0 : m.map((h) => /* @__PURE__ */ r(
3292
3294
  "div",
3293
3295
  {
3294
3296
  onMouseDown: () => l(f, h),
@@ -3313,11 +3315,11 @@ function Xa(e) {
3313
3315
  )
3314
3316
  ] });
3315
3317
  }
3316
- function Ya(e) {
3318
+ function Xa(e) {
3317
3319
  function t(n) {
3318
3320
  e.disabled || e.editor.chain().focus().insertTable({ ...n, withHeaderRow: !1 }).run();
3319
3321
  }
3320
- return /* @__PURE__ */ r(Xa, { createTable: t, children: /* @__PURE__ */ r(
3322
+ return /* @__PURE__ */ r(Ga, { createTable: t, children: /* @__PURE__ */ r(
3321
3323
  y,
3322
3324
  {
3323
3325
  icon: e == null ? void 0 : e.icon,
@@ -3329,7 +3331,7 @@ function Ya(e) {
3329
3331
  }
3330
3332
  ) });
3331
3333
  }
3332
- const Pr = Pn.extend({
3334
+ const Rr = Hn.extend({
3333
3335
  addOptions() {
3334
3336
  var e;
3335
3337
  return {
@@ -3338,7 +3340,7 @@ const Pr = Pn.extend({
3338
3340
  lastColumnResizable: !0,
3339
3341
  allowTableNodeSelection: !1,
3340
3342
  button: ({ editor: t, t: n }) => ({
3341
- component: Ya,
3343
+ component: Xa,
3342
3344
  componentProps: {
3343
3345
  disabled: t.isActive("table") || !1,
3344
3346
  icon: "Table",
@@ -3350,13 +3352,13 @@ const Pr = Pn.extend({
3350
3352
  },
3351
3353
  addExtensions() {
3352
3354
  return [
3353
- Dn.configure(this.options.tableRow),
3354
- On.configure(this.options.tableHeader),
3355
- jn.configure(this.options.tableCell),
3356
- qa.configure(this.options.tableCellBackground)
3355
+ zn.configure(this.options.tableRow),
3356
+ Rn.configure(this.options.tableHeader),
3357
+ Pn.configure(this.options.tableCell),
3358
+ Va.configure(this.options.tableCellBackground)
3357
3359
  ];
3358
3360
  }
3359
- }), Dr = H.create({
3361
+ }), Pr = H.create({
3360
3362
  name: "painter",
3361
3363
  addOptions() {
3362
3364
  var e;
@@ -3425,7 +3427,7 @@ const Pr = Pn.extend({
3425
3427
  ];
3426
3428
  }
3427
3429
  });
3428
- function Za({ editor: e, ...t }) {
3430
+ function Ya({ editor: e, ...t }) {
3429
3431
  const { t: n } = B(), [i, a] = k(-1), [o, s] = k([]), [c, l] = k(""), [u, d] = k(""), [f, m] = k(!1), [h, b] = k(!1);
3430
3432
  return P(() => {
3431
3433
  f || (l(""), d(""), a(-1), s([]), e.commands.setSearchTerm(""), e.commands.setReplaceTerm(""));
@@ -3436,14 +3438,14 @@ function Za({ editor: e, ...t }) {
3436
3438
  }, [f, u, e]), P(() => {
3437
3439
  if (!e)
3438
3440
  return;
3439
- const x = e.extensionManager.extensions.find((S) => S.name === no.name);
3441
+ const x = e.extensionManager.extensions.find((S) => S.name === to.name);
3440
3442
  if (!x)
3441
3443
  return;
3442
3444
  const N = () => {
3443
3445
  if (!f)
3444
3446
  return;
3445
3447
  const S = x ? x.storage.currentIndex : -1, p = x ? x.storage.results : [];
3446
- a((_) => _ !== S ? S : _), s((_) => qn(_, p) ? _ : p);
3448
+ a((_) => _ !== S ? S : _), s((_) => Fn(_, p) ? _ : p);
3447
3449
  };
3448
3450
  return window.addEventListener(Ye, N), () => {
3449
3451
  x && window.removeEventListener(Ye, N);
@@ -3512,7 +3514,7 @@ function Za({ editor: e, ...t }) {
3512
3514
  ) }) }),
3513
3515
  /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-space-x-2 richtext-mb-[10px]", children: [
3514
3516
  /* @__PURE__ */ r(
3515
- bi,
3517
+ _i,
3516
3518
  {
3517
3519
  checked: h,
3518
3520
  onCheckedChange: (x) => {
@@ -3534,10 +3536,10 @@ function Za({ editor: e, ...t }) {
3534
3536
  );
3535
3537
  }
3536
3538
  const ve = (e, t) => t(e.tr);
3537
- function Ja(e, t, n) {
3539
+ function Za(e, t, n) {
3538
3540
  return RegExp(t ? e.replace(/[$()*+./?[\\\]^{|}-]/g, String.raw`\$&`) : e, n ? "gu" : "gui");
3539
3541
  }
3540
- function Qa(e, t, n) {
3542
+ function Ja(e, t, n) {
3541
3543
  const i = [];
3542
3544
  let a = [];
3543
3545
  const o = [];
@@ -3577,7 +3579,7 @@ function Lt(e, t, { state: n, dispatch: i }) {
3577
3579
  const { from: o, to: s } = t[0];
3578
3580
  i && i(n.tr.insertText(e, o, s));
3579
3581
  }
3580
- function eo(e, t, n, i) {
3582
+ function Qa(e, t, n, i) {
3581
3583
  const a = t + 1;
3582
3584
  if (!i[a])
3583
3585
  return null;
@@ -3587,14 +3589,14 @@ function eo(e, t, n, i) {
3587
3589
  from: l - c
3588
3590
  }, [c, i];
3589
3591
  }
3590
- function to(e, t, { tr: n, dispatch: i }) {
3592
+ function eo(e, t, { tr: n, dispatch: i }) {
3591
3593
  let a = 0, o = t.slice();
3592
3594
  if (o.length === 0)
3593
3595
  return !1;
3594
3596
  for (let s = 0; s < o.length; s += 1) {
3595
3597
  const { from: c, to: l } = o[s];
3596
3598
  n.insertText(e, c, l);
3597
- const u = eo(e, s, a, o);
3599
+ const u = Qa(e, s, a, o);
3598
3600
  u && (a = u[0], o = u[1]);
3599
3601
  }
3600
3602
  return i(n), !0;
@@ -3614,7 +3616,7 @@ function St({ view: e, tr: t, searchResults: n, searchResultCurrentClass: i, got
3614
3616
  }
3615
3617
  return !1;
3616
3618
  }
3617
- const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), no = H.create({
3619
+ const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), to = H.create({
3618
3620
  name: "search",
3619
3621
  addOptions() {
3620
3622
  var e;
@@ -3631,7 +3633,7 @@ const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), no = H.create({
3631
3633
  onChange: () => {
3632
3634
  },
3633
3635
  button: ({ editor: t, t: n }) => ({
3634
- component: Za,
3636
+ component: Ya,
3635
3637
  componentProps: {
3636
3638
  action: () => {
3637
3639
  },
@@ -3661,7 +3663,7 @@ const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), no = H.create({
3661
3663
  },
3662
3664
  replaceAll: () => ({ state: e, tr: t, dispatch: n }) => {
3663
3665
  const { replaceTerm: i } = this.options, { results: a } = this.storage;
3664
- return to(i, a, { tr: t, dispatch: n }), this.storage.currentIndex = -1, this.storage.results = [], window.dispatchEvent(de), ve(e, n), !1;
3666
+ return eo(i, a, { tr: t, dispatch: n }), this.storage.currentIndex = -1, this.storage.results = [], window.dispatchEvent(de), ve(e, n), !1;
3665
3667
  },
3666
3668
  goToPrevSearchResult: () => ({ view: e, tr: t }) => {
3667
3669
  const { searchResultCurrentClass: n } = this.options, { currentIndex: i, results: a } = this.storage, o = (i + a.length - 1) % a.length;
@@ -3697,9 +3699,9 @@ const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), no = H.create({
3697
3699
  apply(t) {
3698
3700
  const { doc: n, docChanged: i } = t, { searchTerm: a, searchResultClass: o, searchResultCurrentClass: s, disableRegex: c, caseSensitive: l } = e.options;
3699
3701
  if (i || a) {
3700
- const { decorationsToReturn: u, results: d } = Qa(
3702
+ const { decorationsToReturn: u, results: d } = Ja(
3701
3703
  n,
3702
- Ja(a, c, l),
3704
+ Za(a, c, l),
3703
3705
  o
3704
3706
  );
3705
3707
  if (e.storage.results = d, e.storage.currentIndex > d.length - 1 && (e.storage.currentIndex = 0), window.dispatchEvent(de), t.getMeta("directDecoration")) {
@@ -3723,7 +3725,7 @@ const Ye = "ON_SEARCH_RESULTS", de = new CustomEvent(Ye), no = H.create({
3723
3725
  ];
3724
3726
  }
3725
3727
  });
3726
- function io({
3728
+ function no({
3727
3729
  className: e,
3728
3730
  ...t
3729
3731
  }) {
@@ -3739,7 +3741,7 @@ function io({
3739
3741
  }
3740
3742
  );
3741
3743
  }
3742
- function ao({
3744
+ function io({
3743
3745
  className: e,
3744
3746
  ...t
3745
3747
  }) {
@@ -3749,7 +3751,7 @@ function ao({
3749
3751
  className: E("richtext-flex richtext-h-9 richtext-items-center richtext-gap-2 richtext-border-b richtext-px-3", e),
3750
3752
  "data-slot": "emoji-picker-search-wrapper",
3751
3753
  children: [
3752
- /* @__PURE__ */ r(Yn, { className: "richtext-size-4 richtext-shrink-0 richtext-opacity-50" }),
3754
+ /* @__PURE__ */ r(Wn, { className: "richtext-size-4 richtext-shrink-0 richtext-opacity-50" }),
3753
3755
  /* @__PURE__ */ r(
3754
3756
  ae.Search,
3755
3757
  {
@@ -3762,10 +3764,10 @@ function ao({
3762
3764
  }
3763
3765
  );
3764
3766
  }
3765
- function oo({ children: e, ...t }) {
3767
+ function ao({ children: e, ...t }) {
3766
3768
  return /* @__PURE__ */ r("div", { ...t, className: "richtext-scroll-my-1 richtext-px-1", "data-slot": "emoji-picker-row", children: e });
3767
3769
  }
3768
- function ro({
3770
+ function oo({
3769
3771
  emoji: e,
3770
3772
  className: t,
3771
3773
  ...n
@@ -3783,7 +3785,7 @@ function ro({
3783
3785
  }
3784
3786
  );
3785
3787
  }
3786
- function so({
3788
+ function ro({
3787
3789
  category: e,
3788
3790
  ...t
3789
3791
  }) {
@@ -3797,7 +3799,7 @@ function so({
3797
3799
  }
3798
3800
  );
3799
3801
  }
3800
- function co({
3802
+ function so({
3801
3803
  className: e,
3802
3804
  ...t
3803
3805
  }) {
@@ -3813,7 +3815,7 @@ function co({
3813
3815
  {
3814
3816
  className: "richtext-absolute richtext-inset-0 richtext-flex richtext-items-center richtext-justify-center richtext-text-muted-foreground",
3815
3817
  "data-slot": "emoji-picker-loading",
3816
- children: /* @__PURE__ */ r(Zn, { className: "richtext-size-4 richtext-animate-spin" })
3818
+ children: /* @__PURE__ */ r(Gn, { className: "richtext-size-4 richtext-animate-spin" })
3817
3819
  }
3818
3820
  ),
3819
3821
  /* @__PURE__ */ r(
@@ -3829,9 +3831,9 @@ function co({
3829
3831
  {
3830
3832
  className: "richtext-select-none richtext-pb-1",
3831
3833
  components: {
3832
- Row: oo,
3833
- Emoji: ro,
3834
- CategoryHeader: so
3834
+ Row: ao,
3835
+ Emoji: oo,
3836
+ CategoryHeader: ro
3835
3837
  },
3836
3838
  "data-slot": "emoji-picker-list"
3837
3839
  }
@@ -3840,7 +3842,7 @@ function co({
3840
3842
  }
3841
3843
  );
3842
3844
  }
3843
- function lo({
3845
+ function co({
3844
3846
  className: e,
3845
3847
  ...t
3846
3848
  }) {
@@ -3860,7 +3862,7 @@ function lo({
3860
3862
  }
3861
3863
  );
3862
3864
  }
3863
- function uo({ onSelectEmoji: e, children: t }) {
3865
+ function lo({ onSelectEmoji: e, children: t }) {
3864
3866
  return /* @__PURE__ */ g(xe, { modal: !0, children: [
3865
3867
  /* @__PURE__ */ r(pe, { asChild: !0, children: t }),
3866
3868
  /* @__PURE__ */ r(
@@ -3871,16 +3873,16 @@ function uo({ onSelectEmoji: e, children: t }) {
3871
3873
  hideWhenDetached: !0,
3872
3874
  side: "bottom",
3873
3875
  children: /* @__PURE__ */ g(
3874
- io,
3876
+ no,
3875
3877
  {
3876
3878
  className: "!richtext-h-[342px]",
3877
3879
  onEmojiSelect: ({ emoji: n }) => {
3878
3880
  e(n);
3879
3881
  },
3880
3882
  children: [
3881
- /* @__PURE__ */ r(ao, {}),
3882
- /* @__PURE__ */ r(co, {}),
3883
- /* @__PURE__ */ r(lo, {})
3883
+ /* @__PURE__ */ r(io, {}),
3884
+ /* @__PURE__ */ r(so, {}),
3885
+ /* @__PURE__ */ r(co, {})
3884
3886
  ]
3885
3887
  }
3886
3888
  )
@@ -3888,7 +3890,7 @@ function uo({ onSelectEmoji: e, children: t }) {
3888
3890
  )
3889
3891
  ] });
3890
3892
  }
3891
- function ho({ editor: e, icon: t, ...n }) {
3893
+ function uo({ editor: e, icon: t, ...n }) {
3892
3894
  const i = j(
3893
3895
  (a) => {
3894
3896
  const { selection: o } = e.state, { $anchor: s } = o;
@@ -3896,7 +3898,7 @@ function ho({ editor: e, icon: t, ...n }) {
3896
3898
  },
3897
3899
  [e]
3898
3900
  );
3899
- return /* @__PURE__ */ r(uo, { onSelectEmoji: i, children: /* @__PURE__ */ r(
3901
+ return /* @__PURE__ */ r(lo, { onSelectEmoji: i, children: /* @__PURE__ */ r(
3900
3902
  y,
3901
3903
  {
3902
3904
  icon: t,
@@ -3904,7 +3906,7 @@ function ho({ editor: e, icon: t, ...n }) {
3904
3906
  }
3905
3907
  ) });
3906
3908
  }
3907
- const Qt = Qe((e, t) => {
3909
+ const Yt = Qe((e, t) => {
3908
3910
  const n = X(null), [i, a] = k(0), { t: o } = B(), s = (d) => {
3909
3911
  const f = e.items[d];
3910
3912
  f && e.command(f);
@@ -3943,7 +3945,7 @@ const Qt = Qe((e, t) => {
3943
3945
  `emoji-list-code-${f}`
3944
3946
  )) : /* @__PURE__ */ r("div", { className: "richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors", children: /* @__PURE__ */ r("span", { children: o("no_result_found") }) }) }) });
3945
3947
  });
3946
- Qt.displayName = "EmojiList";
3948
+ Yt.displayName = "EmojiList";
3947
3949
  const _e = {
3948
3950
  100: "💯",
3949
3951
  1234: "🔢",
@@ -5788,18 +5790,18 @@ Object.keys(_e).reduce((e, t) => {
5788
5790
  const n = _e[t];
5789
5791
  return e[n] = t, e;
5790
5792
  }, {});
5791
- const mo = Object.keys(_e).map((e) => e);
5793
+ const ho = Object.keys(_e).map((e) => e);
5792
5794
  Object.keys(_e).map((e) => _e[e]);
5793
- function fo(e) {
5794
- return mo.filter((t) => t.startsWith(e)).map((t) => ({
5795
+ function mo(e) {
5796
+ return ho.filter((t) => t.startsWith(e)).map((t) => ({
5795
5797
  name: t,
5796
5798
  emoji: _e[t]
5797
5799
  }));
5798
5800
  }
5799
- const go = 200, _o = new Q("emoji"), Or = Ae.create({
5801
+ const fo = 200, go = new Q("emoji"), Dr = Te.create({
5800
5802
  name: "emoji",
5801
5803
  content: "text*",
5802
- priority: go,
5804
+ priority: fo,
5803
5805
  addOptions() {
5804
5806
  var e;
5805
5807
  return {
@@ -5807,13 +5809,13 @@ const go = 200, _o = new Q("emoji"), Or = Ae.create({
5807
5809
  HTMLAttributes: {},
5808
5810
  suggestion: {
5809
5811
  char: ":",
5810
- pluginKey: _o,
5812
+ pluginKey: go,
5811
5813
  command: ({ editor: t, range: n, props: i }) => {
5812
5814
  t.chain().focus().insertContentAt(n, `${i.emoji} `).run();
5813
5815
  }
5814
5816
  },
5815
5817
  button: ({ editor: t, t: n }) => ({
5816
- component: ho,
5818
+ component: uo,
5817
5819
  componentProps: {
5818
5820
  editor: t,
5819
5821
  action: () => {
@@ -5841,12 +5843,12 @@ const go = 200, _o = new Q("emoji"), Or = Ae.create({
5841
5843
  }
5842
5844
  }).configure({
5843
5845
  suggestion: {
5844
- items: ({ query: e }) => fo(e),
5846
+ items: ({ query: e }) => mo(e),
5845
5847
  render: () => {
5846
5848
  let e, t, n;
5847
5849
  return {
5848
5850
  onStart: (i) => {
5849
- n = i.editor.isEditable, n && (e = new Ze(Qt, {
5851
+ n = i.editor.isEditable, n && (e = new Ze(Yt, {
5850
5852
  props: i,
5851
5853
  editor: i.editor
5852
5854
  }), t = ut("body", {
@@ -5876,7 +5878,7 @@ const go = 200, _o = new Q("emoji"), Or = Ae.create({
5876
5878
  }
5877
5879
  }
5878
5880
  });
5879
- function bo(e) {
5881
+ function _o(e) {
5880
5882
  const t = document.createElement("iframe");
5881
5883
  t.setAttribute("style", "position: absolute; width: 0; height: 0; top: 0; left: 0;"), document.body.appendChild(t), t.textContent = `
5882
5884
  <!DOCTYPE html>
@@ -5913,11 +5915,11 @@ function bo(e) {
5913
5915
  }, 100);
5914
5916
  });
5915
5917
  }
5916
- function xo(e) {
5918
+ function bo(e) {
5917
5919
  const t = e.getHTML();
5918
- return t ? (bo(t), !0) : !1;
5920
+ return t ? (_o(t), !0) : !1;
5919
5921
  }
5920
- const jr = H.create({
5922
+ const Or = H.create({
5921
5923
  name: "exportPdf",
5922
5924
  addOptions() {
5923
5925
  var e;
@@ -5927,7 +5929,7 @@ const jr = H.create({
5927
5929
  component: y,
5928
5930
  componentProps: {
5929
5931
  action: () => {
5930
- xo(t);
5932
+ bo(t);
5931
5933
  },
5932
5934
  icon: "ExportPdf",
5933
5935
  tooltip: n("editor.exportPdf.tooltip"),
@@ -5938,18 +5940,18 @@ const jr = H.create({
5938
5940
  };
5939
5941
  }
5940
5942
  });
5941
- function po(e, t) {
5943
+ function xo(e, t) {
5942
5944
  const n = atob(e.split(",")[1]), i = Array.from({ length: n.length });
5943
5945
  for (let o = 0; o < n.length; o++)
5944
5946
  i[o] = n.charCodeAt(o);
5945
5947
  const a = new Uint8Array(i);
5946
5948
  return new Blob([a], { type: t });
5947
5949
  }
5948
- function wo(e, t) {
5950
+ function po(e, t) {
5949
5951
  return new File([e], t, { type: e.type });
5950
5952
  }
5951
- function yo(e) {
5952
- const { toast: t } = xi(), { t: n } = B(), [i, a] = k(!1), o = X(null);
5953
+ function wo(e) {
5954
+ const { toast: t } = bi(), { t: n } = B(), [i, a] = k(!1), o = X(null);
5953
5955
  function s() {
5954
5956
  var f;
5955
5957
  (f = o.current) == null || f.click();
@@ -5972,21 +5974,21 @@ function yo(e) {
5972
5974
  const h = new DOMParser().parseFromString(f, "text/html"), b = h.querySelectorAll("img");
5973
5975
  if (b.length === 0)
5974
5976
  return h.body.innerHTML;
5975
- if (pi(e.editor, "image")) {
5977
+ if (xi(e.editor, "image")) {
5976
5978
  const S = (N = e.editor.extensionManager.extensions.find(
5977
5979
  (p) => p.name === "importWord"
5978
5980
  )) == null ? void 0 : N.options;
5979
5981
  if (S && typeof S.upload == "function") {
5980
5982
  const p = [];
5981
5983
  for (const w of b) {
5982
- const C = w.getAttribute("src"), T = po(C, "image/jpeg"), L = wo(T, "image.jpeg");
5984
+ const C = w.getAttribute("src"), A = xo(C, "image/jpeg"), L = po(A, "image.jpeg");
5983
5985
  p.push(L);
5984
5986
  }
5985
5987
  const _ = await S.upload(p);
5986
5988
  for (const [w, C] of b.entries()) {
5987
5989
  C.setAttribute("src", _[w].src);
5988
- const T = C.parentElement;
5989
- (T == null ? void 0 : T.tagName) === "P" && (T.insertAdjacentElement("beforebegin", C), !T.hasChildNodes() && T.textContent === "" && T.remove());
5990
+ const A = C.parentElement;
5991
+ (A == null ? void 0 : A.tagName) === "P" && (A.insertAdjacentElement("beforebegin", C), !A.hasChildNodes() && A.textContent === "" && A.remove());
5990
5992
  }
5991
5993
  return h.body.innerHTML;
5992
5994
  } else
@@ -6001,7 +6003,7 @@ function yo(e) {
6001
6003
  const m = await e.convert(f);
6002
6004
  d(m);
6003
6005
  } else {
6004
- const m = await f.arrayBuffer(), { value: h } = await Kn.convertToHtml(
6006
+ const m = await f.arrayBuffer(), { value: h } = await Un.convertToHtml(
6005
6007
  { arrayBuffer: m },
6006
6008
  e == null ? void 0 : e.mammothOptions
6007
6009
  );
@@ -6040,7 +6042,7 @@ function yo(e) {
6040
6042
  )
6041
6043
  ] });
6042
6044
  }
6043
- const Br = H.create({
6045
+ const jr = H.create({
6044
6046
  name: "importWord",
6045
6047
  addOptions() {
6046
6048
  var e;
@@ -6053,7 +6055,7 @@ const Br = H.create({
6053
6055
  button: ({ editor: t, extension: n, t: i }) => {
6054
6056
  const { convert: a, limit: o, mammothOptions: s } = n.options;
6055
6057
  return {
6056
- component: yo,
6058
+ component: wo,
6057
6059
  componentProps: {
6058
6060
  editor: t,
6059
6061
  convert: a,
@@ -6069,15 +6071,15 @@ const Br = H.create({
6069
6071
  }
6070
6072
  };
6071
6073
  }
6072
- }), vo = typeof window < "u";
6073
- function ko(e, t) {
6074
- if (vo) {
6074
+ }), yo = typeof window < "u";
6075
+ function vo(e, t) {
6076
+ if (yo) {
6075
6077
  const n = window.URL.createObjectURL(e), i = document.createElement("a");
6076
6078
  return i.href = n, i.download = t, i.click(), window.URL.revokeObjectURL(n), Promise.resolve();
6077
6079
  }
6078
6080
  return console.error("Download is not supported in Node.js"), Promise.resolve();
6079
6081
  }
6080
- const Co = {
6082
+ const ko = {
6081
6083
  ...ne,
6082
6084
  hardBreak: ne.hard_break,
6083
6085
  codeBlock: ne.code_block,
@@ -6094,12 +6096,12 @@ const Co = {
6094
6096
  tableOptions: {
6095
6097
  width: {
6096
6098
  size: 100,
6097
- type: Ri.PERCENTAGE
6099
+ type: zi.PERCENTAGE
6098
6100
  }
6099
6101
  }
6100
6102
  });
6101
6103
  }
6102
- }, No = new Pi(Co, Di), $r = H.create({
6104
+ }, Co = new Ri(ko, Pi), Br = H.create({
6103
6105
  name: "exportWord",
6104
6106
  addOptions() {
6105
6107
  var e;
@@ -6128,18 +6130,18 @@ const Co = {
6128
6130
  const o = await (await fetch(i)).arrayBuffer();
6129
6131
  return new Uint8Array(o);
6130
6132
  }
6131
- }, n = No.serialize(e.state.doc, t);
6132
- return zi.toBlob(n).then((i) => ko(new Blob([i]), "export-document.docx")), !0;
6133
+ }, n = Co.serialize(e.state.doc, t);
6134
+ return Hi.toBlob(n).then((i) => vo(new Blob([i]), "export-document.docx")), !0;
6133
6135
  }
6134
6136
  };
6135
6137
  }
6136
- }), To = "_toc_aag8a_1", Ao = "_visible_aag8a_7", Lo = "_list_aag8a_11", So = "_item_aag8a_16", ze = {
6137
- toc: To,
6138
+ }), No = "_toc_aag8a_1", Ao = "_visible_aag8a_7", To = "_list_aag8a_11", Lo = "_item_aag8a_16", ze = {
6139
+ toc: No,
6138
6140
  visible: Ao,
6139
- list: Lo,
6140
- item: So
6141
+ list: To,
6142
+ item: Lo
6141
6143
  };
6142
- function Mo(e) {
6144
+ function So(e) {
6143
6145
  const t = [], n = [t];
6144
6146
  return e.forEach((i) => {
6145
6147
  let a = -1, o = n[i.level + a];
@@ -6148,7 +6150,7 @@ function Mo(e) {
6148
6150
  o.push({ ...i, children: n[i.level] = [] });
6149
6151
  }), t;
6150
6152
  }
6151
- function Io({ editor: e }) {
6153
+ function Mo({ editor: e }) {
6152
6154
  const t = at(), [n, i] = k([]), { t: a } = B(), o = j(() => {
6153
6155
  const s = [], c = e.state.tr;
6154
6156
  e.state.doc.descendants((l, u) => {
@@ -6163,7 +6165,7 @@ function Io({ editor: e }) {
6163
6165
  id: d
6164
6166
  });
6165
6167
  }
6166
- }), c.setMeta("addToHistory", !1), c.setMeta("preventUpdate", !0), e.view.dispatch(c), i(s), e.eventEmitter && e.eventEmitter.emit("TableOfContents", Mo(s));
6168
+ }), c.setMeta("addToHistory", !1), c.setMeta("preventUpdate", !0), e.view.dispatch(c), i(s), e.eventEmitter && e.eventEmitter.emit("TableOfContents", So(s));
6167
6169
  }, [e]);
6168
6170
  return P(() => {
6169
6171
  if (e) {
@@ -6190,7 +6192,7 @@ function Io({ editor: e }) {
6190
6192
  )) })
6191
6193
  ] }) : null });
6192
6194
  }
6193
- function Eo(e, ...t) {
6195
+ function Io(e, ...t) {
6194
6196
  const [n, i] = k(!1);
6195
6197
  return P(() => {
6196
6198
  const a = () => {
@@ -6201,8 +6203,8 @@ function Eo(e, ...t) {
6201
6203
  };
6202
6204
  }, [e, t, i]), n;
6203
6205
  }
6204
- function Ho({ editor: e, icon: t, tooltip: n }) {
6205
- const i = Eo(e, Po.name), a = j(() => {
6206
+ function Eo({ editor: e, icon: t, tooltip: n }) {
6207
+ const i = Io(e, Ro.name), a = j(() => {
6206
6208
  if (i) {
6207
6209
  e.chain().focus().removeTableOfContents().run();
6208
6210
  return;
@@ -6219,10 +6221,10 @@ function Ho({ editor: e, icon: t, tooltip: n }) {
6219
6221
  }
6220
6222
  );
6221
6223
  }
6222
- function zo(e) {
6224
+ function Ho(e) {
6223
6225
  return e && e.type.name === "title";
6224
6226
  }
6225
- function Ro(e, t) {
6227
+ function zo(e, t) {
6226
6228
  const i = [e.getJSON()], a = [];
6227
6229
  for (; i.length > 0; ) {
6228
6230
  const o = i.shift();
@@ -6230,7 +6232,7 @@ function Ro(e, t) {
6230
6232
  }
6231
6233
  return a;
6232
6234
  }
6233
- const Po = Ae.create({
6235
+ const Ro = Te.create({
6234
6236
  name: "tableOfContents",
6235
6237
  group: "block",
6236
6238
  atom: !0,
@@ -6244,7 +6246,7 @@ const Po = Ae.create({
6244
6246
  lastColumnResizable: !0,
6245
6247
  allowTableNodeSelection: !1,
6246
6248
  button: ({ editor: t, t: n }) => ({
6247
- component: Ho,
6249
+ component: Eo,
6248
6250
  componentProps: {
6249
6251
  disabled: !1,
6250
6252
  icon: "BookMarked",
@@ -6265,18 +6267,18 @@ const Po = Ae.create({
6265
6267
  return ["toc", Le(e)];
6266
6268
  },
6267
6269
  addNodeView() {
6268
- return je(Io);
6270
+ return je(Mo);
6269
6271
  },
6270
6272
  // @ts-expect-error
6271
6273
  addCommands() {
6272
6274
  return {
6273
6275
  setTableOfContents: () => ({ commands: e, editor: t, view: n }) => {
6274
- if (Ro(t, this.name).length > 0) {
6276
+ if (zo(t, this.name).length > 0) {
6275
6277
  this.options.onHasOneBeforeInsert();
6276
6278
  return;
6277
6279
  }
6278
6280
  const a = n.props.state.doc.content.firstChild;
6279
- if (zo(a)) {
6281
+ if (Ho(a)) {
6280
6282
  const o = (a.firstChild && a.firstChild.nodeSize || 0) + 1;
6281
6283
  return e.insertContentAt(o, { type: this.name });
6282
6284
  }
@@ -6308,7 +6310,7 @@ const Po = Ae.create({
6308
6310
  ];
6309
6311
  }
6310
6312
  });
6311
- function Do(e) {
6313
+ function Po(e) {
6312
6314
  var n;
6313
6315
  const t = R(() => {
6314
6316
  var o;
@@ -6376,7 +6378,7 @@ function Do(e) {
6376
6378
  )
6377
6379
  ] });
6378
6380
  }
6379
- const Fr = H.create({
6381
+ const $r = H.create({
6380
6382
  name: "text-direction",
6381
6383
  addOptions() {
6382
6384
  var e;
@@ -6410,7 +6412,7 @@ const Fr = H.create({
6410
6412
  disabled: !1
6411
6413
  })), c = s.filter((u) => u.disabled).length === s.length;
6412
6414
  return {
6413
- component: Do,
6415
+ component: Po,
6414
6416
  componentProps: {
6415
6417
  icon: "TextDirection",
6416
6418
  tooltip: i("editor.textDirection.tooltip"),
@@ -6442,11 +6444,11 @@ const Fr = H.create({
6442
6444
  unsetTextDirection: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "dir"))
6443
6445
  };
6444
6446
  }
6445
- }), Oo = "_listUsers_en3pm_1", jo = "_itemUser_en3pm_10", Bo = "_selectedUser_en3pm_31", Re = {
6446
- listUsers: Oo,
6447
- itemUser: jo,
6448
- selectedUser: Bo
6449
- }, $o = Qe((e, t) => {
6447
+ }), Do = "_listUsers_en3pm_1", Oo = "_itemUser_en3pm_10", jo = "_selectedUser_en3pm_31", Re = {
6448
+ listUsers: Do,
6449
+ itemUser: Oo,
6450
+ selectedUser: jo
6451
+ }, Bo = Qe((e, t) => {
6450
6452
  const n = X(null), [i, a] = k(0), o = (u) => {
6451
6453
  const d = e.items[u];
6452
6454
  d && e.command({ id: d, label: d });
@@ -6473,7 +6475,7 @@ const Fr = H.create({
6473
6475
  },
6474
6476
  d
6475
6477
  )) : /* @__PURE__ */ r("div", { className: U("itemUserEmpty", Re.itemUser), children: "Empty" }) }) });
6476
- }), Fo = [
6478
+ }), $o = [
6477
6479
  {
6478
6480
  id: "1",
6479
6481
  name: "John Doe"
@@ -6490,13 +6492,13 @@ const Fr = H.create({
6490
6492
  id: "4",
6491
6493
  name: "Bob"
6492
6494
  }
6493
- ], Uo = {
6494
- items: async ({ query: e }) => Fo.map((n) => n.name).filter((n) => n.toLowerCase().startsWith(e.toLowerCase())),
6495
+ ], Fo = {
6496
+ items: async ({ query: e }) => $o.map((n) => n.name).filter((n) => n.toLowerCase().startsWith(e.toLowerCase())),
6495
6497
  render: () => {
6496
6498
  let e, t;
6497
6499
  return {
6498
6500
  onStart: (n) => {
6499
- e = new Ze($o, {
6501
+ e = new Ze(Bo, {
6500
6502
  props: n,
6501
6503
  editor: n.editor
6502
6504
  }), t = ut("body", {
@@ -6523,7 +6525,7 @@ const Fr = H.create({
6523
6525
  }
6524
6526
  };
6525
6527
  }
6526
- }, Ur = Bn.extend({
6528
+ }, Fr = Dn.extend({
6527
6529
  addAttributes() {
6528
6530
  return {
6529
6531
  id: {
@@ -6540,8 +6542,8 @@ const Fr = H.create({
6540
6542
  HTMLAttributes: {
6541
6543
  class: "mention"
6542
6544
  },
6543
- suggestion: Uo
6544
- }), Vo = {
6545
+ suggestion: Fo
6546
+ }), Uo = {
6545
6547
  audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
6546
6548
  video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
6547
6549
  file: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
@@ -6569,8 +6571,8 @@ const Fr = H.create({
6569
6571
  excel: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
6570
6572
  ppt: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
6571
6573
  };
6572
- function qo(e) {
6573
- const t = Vo[e], a = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, o = [
6574
+ function Vo(e) {
6575
+ const t = Uo[e], a = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, o = [
6574
6576
  "svg",
6575
6577
  {
6576
6578
  ...Array.from(a.attributes).reduce((s, c) => (s[c.name] = c.value, s), {})
@@ -6586,37 +6588,37 @@ function qo(e) {
6586
6588
  }
6587
6589
  }), o;
6588
6590
  }
6589
- const Ko = {
6590
- audio: /* @__PURE__ */ r(ii, {}),
6591
- video: /* @__PURE__ */ r(ni, {}),
6592
- file: /* @__PURE__ */ r(ti, {}),
6593
- image: /* @__PURE__ */ r(ei, {}),
6594
- pdf: /* @__PURE__ */ r(vi, {}),
6595
- word: /* @__PURE__ */ r(yi, {}),
6596
- excel: /* @__PURE__ */ r(Qn, {}),
6597
- ppt: /* @__PURE__ */ r(Jn, {})
6591
+ const qo = {
6592
+ audio: /* @__PURE__ */ r(ei, {}),
6593
+ video: /* @__PURE__ */ r(Qn, {}),
6594
+ file: /* @__PURE__ */ r(Jn, {}),
6595
+ image: /* @__PURE__ */ r(Zn, {}),
6596
+ pdf: /* @__PURE__ */ r(yi, {}),
6597
+ word: /* @__PURE__ */ r(wi, {}),
6598
+ excel: /* @__PURE__ */ r(Yn, {}),
6599
+ ppt: /* @__PURE__ */ r(Xn, {})
6598
6600
  };
6599
- function en(e, t = !1) {
6600
- const n = wi(e), i = Ko[n] || /* @__PURE__ */ r(oe, {});
6601
- return t ? qo(n) : i;
6601
+ function Zt(e, t = !1) {
6602
+ const n = pi(e), i = qo[n] || /* @__PURE__ */ r(oe, {});
6603
+ return t ? Vo(n) : i;
6602
6604
  }
6603
- const Wo = "_wrap_1x1ms_2", Ke = {
6604
- wrap: Wo
6605
+ const Ko = "_wrap_1x1ms_2", Ke = {
6606
+ wrap: Ko
6605
6607
  };
6606
- function Go({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension: a }) {
6608
+ function Wo({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension: a }) {
6607
6609
  var C;
6608
6610
  const o = X(null), s = at(), { hasTrigger: c, fileName: l, fileSize: u, fileExt: d, fileType: f, url: m, error: h } = t.attrs, [b, x] = k(!1), { t: N } = B(), S = (C = a == null ? void 0 : a.options) == null ? void 0 : C.upload, p = j(() => {
6609
6611
  !s || m || s && o.current.click();
6610
6612
  }, [s, m]), _ = j(
6611
- async (T) => {
6612
- const L = T.target.files && T.target.files[0];
6613
+ async (A) => {
6614
+ const L = A.target.files && A.target.files[0];
6613
6615
  if (!L)
6614
6616
  return;
6615
6617
  const q = {
6616
- fileName: Ci(L.name),
6618
+ fileName: ki(L.name),
6617
6619
  fileSize: L.size,
6618
6620
  fileType: L.type,
6619
- fileExt: ki(L.name)
6621
+ fileExt: vi(L.name)
6620
6622
  };
6621
6623
  x(!0);
6622
6624
  try {
@@ -6657,7 +6659,7 @@ function Go({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
6657
6659
  onClick: p,
6658
6660
  children: [
6659
6661
  /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: [
6660
- /* @__PURE__ */ r("span", { children: en(f) }),
6662
+ /* @__PURE__ */ r("span", { children: Zt(f) }),
6661
6663
  /* @__PURE__ */ g("span", { children: [
6662
6664
  l,
6663
6665
  ".",
@@ -6665,7 +6667,7 @@ function Go({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
6665
6667
  ] }),
6666
6668
  /* @__PURE__ */ g("span", { children: [
6667
6669
  "(",
6668
- Ot(u),
6670
+ Dt(u),
6669
6671
  ")"
6670
6672
  ] })
6671
6673
  ] }),
@@ -6688,7 +6690,7 @@ function Go({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
6688
6690
  }
6689
6691
  ) }) : /* @__PURE__ */ r(oe, {});
6690
6692
  }
6691
- const Vr = Ae.create({
6693
+ const Ur = Te.create({
6692
6694
  name: "attachment",
6693
6695
  content: "",
6694
6696
  marks: "",
@@ -6739,12 +6741,12 @@ const Vr = Ae.create({
6739
6741
  [
6740
6742
  "span",
6741
6743
  { class: "attachment__icon" },
6742
- en(a, !0)
6744
+ Zt(a, !0)
6743
6745
  ],
6744
6746
  [
6745
6747
  "span",
6746
6748
  { class: "attachment__text" },
6747
- `${n}.${o} (${Ot(i)})`
6749
+ `${n}.${o} (${Dt(i)})`
6748
6750
  ]
6749
6751
  ] : ["div", { class: "attachment__placeholder" }]
6750
6752
  ];
@@ -6787,57 +6789,57 @@ const Vr = Ae.create({
6787
6789
  };
6788
6790
  },
6789
6791
  addNodeView() {
6790
- return je(Go);
6792
+ return je(Wo);
6791
6793
  }
6792
6794
  });
6793
6795
  export {
6794
- Vr as Attachment,
6795
- Mr as BaseKit,
6796
- Nr as Blockquote,
6797
- dr as Bold,
6798
- yr as BulletList,
6799
- vr as Clear,
6800
- fr as Code,
6801
- ia as CodeBlock,
6802
- pr as Color,
6803
- di as Column,
6804
- Sr as ColumnActionButton,
6805
- Wr as Drawer,
6806
- Or as Emoji,
6807
- Gr as Excalidraw,
6808
- jr as ExportPdf,
6809
- $r as ExportWord,
6810
- gr as FontFamily,
6811
- xr as FontSize,
6812
- Dr as FormatPainter,
6813
- _r as Heading,
6814
- wr as Highlight,
6815
- Lr as History,
6796
+ Ur as Attachment,
6797
+ Sr as BaseKit,
6798
+ Cr as Blockquote,
6799
+ lr as Bold,
6800
+ wr as BulletList,
6801
+ yr as Clear,
6802
+ mr as Code,
6803
+ na as CodeBlock,
6804
+ xr as Color,
6805
+ si as Column,
6806
+ Lr as ColumnActionButton,
6807
+ Kr as Drawer,
6808
+ Dr as Emoji,
6809
+ Wr as Excalidraw,
6810
+ Or as ExportPdf,
6811
+ Br as ExportWord,
6812
+ fr as FontFamily,
6813
+ br as FontSize,
6814
+ Pr as FormatPainter,
6815
+ gr as Heading,
6816
+ pr as Highlight,
6817
+ Tr as History,
6816
6818
  Ar as HorizontalRule,
6817
- Xr as Iframe,
6819
+ Gr as Iframe,
6818
6820
  Ct as Image,
6819
- Yr as ImageGif,
6820
- Br as ImportWord,
6821
- Hr as Indent,
6822
- ur as Italic,
6823
- Zr as Katex,
6824
- zr as LineHeight,
6825
- Tr as Link,
6826
- Ur as Mention,
6827
- Jr as Mermaid,
6828
- Er as MoreMark,
6829
- ui as MultiColumn,
6830
- kr as OrderedList,
6831
- no as SearchAndReplace,
6832
- Rr as SlashCommand,
6833
- mr as Strike,
6834
- Ir as SubAndSuperScript,
6835
- Pr as Table,
6836
- Po as TableOfContents,
6837
- Cr as TaskList,
6838
- br as TextAlign,
6839
- Fr as TextDirection,
6840
- Qr as Twitter,
6841
- hr as Underline,
6842
- Fa as Video
6821
+ Xr as ImageGif,
6822
+ jr as ImportWord,
6823
+ Er as Indent,
6824
+ dr as Italic,
6825
+ Yr as Katex,
6826
+ Hr as LineHeight,
6827
+ Nr as Link,
6828
+ Fr as Mention,
6829
+ Zr as Mermaid,
6830
+ Ir as MoreMark,
6831
+ ci as MultiColumn,
6832
+ vr as OrderedList,
6833
+ to as SearchAndReplace,
6834
+ zr as SlashCommand,
6835
+ hr as Strike,
6836
+ Mr as SubAndSuperScript,
6837
+ Rr as Table,
6838
+ Ro as TableOfContents,
6839
+ kr as TaskList,
6840
+ _r as TextAlign,
6841
+ $r as TextDirection,
6842
+ Jr as Twitter,
6843
+ ur as Underline,
6844
+ $a as Video
6843
6845
  };