@remarkablejames/editor 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/lib/{ActionMenuButton-NfiUDE60.cjs → ActionMenuButton-DI9_8wC0.cjs} +1 -1
  3. package/lib/{ActionMenuButton-CpmEfz31.js → ActionMenuButton-DL05l66z.js} +1 -1
  4. package/lib/Attachment.cjs +1 -1
  5. package/lib/Attachment.js +2 -2
  6. package/lib/Blockquote.cjs +1 -1
  7. package/lib/Blockquote.js +1 -1
  8. package/lib/Bold.cjs +1 -1
  9. package/lib/Bold.js +1 -1
  10. package/lib/BulletList.cjs +1 -1
  11. package/lib/BulletList.js +1 -1
  12. package/lib/Callout.cjs +1 -1
  13. package/lib/Callout.js +16 -15
  14. package/lib/Clear.cjs +1 -1
  15. package/lib/Clear.js +1 -1
  16. package/lib/Code.cjs +1 -1
  17. package/lib/Code.js +1 -1
  18. package/lib/CodeBlock.cjs +1 -1
  19. package/lib/CodeBlock.js +32 -31
  20. package/lib/CodeView.cjs +1 -1
  21. package/lib/CodeView.js +1 -1
  22. package/lib/Color.cjs +1 -1
  23. package/lib/Color.js +2 -2
  24. package/lib/Column.cjs +1 -1
  25. package/lib/Column.js +1 -1
  26. package/lib/{Drawer-DlgdaO_B.cjs → Drawer-DEzhWKwY.cjs} +1 -1
  27. package/lib/{Drawer-CayP4Ww4.js → Drawer-DhM1qM6R.js} +15 -15
  28. package/lib/Drawer.cjs +1 -1
  29. package/lib/Drawer.js +2 -2
  30. package/lib/Emoji.cjs +1 -1
  31. package/lib/Emoji.js +8 -8
  32. package/lib/Excalidraw.cjs +1 -1
  33. package/lib/Excalidraw.js +36 -36
  34. package/lib/ExportPdf.cjs +1 -1
  35. package/lib/ExportPdf.js +1 -1
  36. package/lib/ExportWord.cjs +1 -1
  37. package/lib/ExportWord.js +1 -1
  38. package/lib/FontFamily.cjs +1 -1
  39. package/lib/FontFamily.js +3 -3
  40. package/lib/FontSize.cjs +1 -1
  41. package/lib/FontSize.js +3 -3
  42. package/lib/Heading.cjs +1 -1
  43. package/lib/Heading.js +8 -8
  44. package/lib/Highlight.cjs +1 -1
  45. package/lib/Highlight.js +2 -2
  46. package/lib/History.cjs +1 -1
  47. package/lib/History.js +1 -1
  48. package/lib/HorizontalRule.cjs +1 -1
  49. package/lib/HorizontalRule.js +1 -1
  50. package/lib/{Iframe-CANdxSpV.cjs → Iframe-DbYJ82AI.cjs} +1 -1
  51. package/lib/{Iframe-C6Sb97KS.js → Iframe-yDX_zHls.js} +1 -1
  52. package/lib/Iframe.cjs +1 -1
  53. package/lib/Iframe.js +2 -2
  54. package/lib/Image.cjs +1 -1
  55. package/lib/Image.js +3 -3
  56. package/lib/ImageGif.cjs +1 -1
  57. package/lib/ImageGif.js +28 -28
  58. package/lib/ImportWord.cjs +1 -1
  59. package/lib/ImportWord.js +12 -12
  60. package/lib/{Indent-CcFe8py3.js → Indent-CA46zsbb.js} +1 -1
  61. package/lib/{Indent-DuB2U6Cs.cjs → Indent-CYaCq_Mv.cjs} +1 -1
  62. package/lib/Indent.cjs +1 -1
  63. package/lib/Indent.js +1 -1
  64. package/lib/Italic.cjs +1 -1
  65. package/lib/Italic.js +1 -1
  66. package/lib/Katex-Dh-kTBjf.cjs +4 -0
  67. package/lib/{Katex-Bp6AnIUF.js → Katex-g3ZS3zUf.js} +4 -3
  68. package/lib/Katex.cjs +1 -1
  69. package/lib/Katex.js +1 -1
  70. package/lib/LineHeight.cjs +1 -1
  71. package/lib/LineHeight.js +2 -2
  72. package/lib/Link.cjs +1 -1
  73. package/lib/Link.js +1 -1
  74. package/lib/{LinkEditBlock-C2zX0WVK.cjs → LinkEditBlock-ClqpI1FH.cjs} +1 -1
  75. package/lib/{LinkEditBlock-BiHumIJR.js → LinkEditBlock-qE5KHPQs.js} +7 -7
  76. package/lib/Mermaid-BmUChJSB.cjs +2 -0
  77. package/lib/{Mermaid-Dlx0XTJj.js → Mermaid-CefRECZY.js} +24 -23
  78. package/lib/Mermaid.cjs +1 -1
  79. package/lib/Mermaid.js +1 -1
  80. package/lib/MoreMark.cjs +1 -1
  81. package/lib/MoreMark.js +2 -2
  82. package/lib/OrderedList.cjs +1 -1
  83. package/lib/OrderedList.js +1 -1
  84. package/lib/PaywallSeparator.cjs +1 -1
  85. package/lib/PaywallSeparator.js +1 -1
  86. package/lib/SearchAndReplace.cjs +1 -1
  87. package/lib/SearchAndReplace.js +7 -7
  88. package/lib/SlashCommand.cjs +1 -1
  89. package/lib/SlashCommand.js +2 -2
  90. package/lib/{SlashCommandNodeView-DzmsYaNc.js → SlashCommandNodeView-BsIrWlhS.js} +5 -5
  91. package/lib/{SlashCommandNodeView-BfWNWGRr.cjs → SlashCommandNodeView-DpXsfGmo.cjs} +1 -1
  92. package/lib/Strike.cjs +1 -1
  93. package/lib/Strike.js +1 -1
  94. package/lib/{Table-BfM6ywrZ.cjs → Table-B-0TePQ3.cjs} +1 -1
  95. package/lib/{Table-IH34r4jd.js → Table-CG0nisk4.js} +2 -2
  96. package/lib/Table.cjs +1 -1
  97. package/lib/Table.js +1 -1
  98. package/lib/TaskList.cjs +1 -1
  99. package/lib/TaskList.js +1 -1
  100. package/lib/TextAlign.cjs +1 -1
  101. package/lib/TextAlign.js +2 -2
  102. package/lib/TextDirection.cjs +1 -1
  103. package/lib/TextDirection.js +2 -2
  104. package/lib/TextUnderline.cjs +1 -1
  105. package/lib/TextUnderline.js +1 -1
  106. package/lib/{Twitter-FVQKPaq6.js → Twitter-DlGSWdh7.js} +7 -7
  107. package/lib/{Twitter-axcoCgD7.cjs → Twitter-DvMmVNMF.cjs} +1 -1
  108. package/lib/Twitter.cjs +1 -1
  109. package/lib/Twitter.js +1 -1
  110. package/lib/Video.cjs +1 -1
  111. package/lib/Video.js +3 -3
  112. package/lib/bubble.cjs +3 -3
  113. package/lib/bubble.js +83 -81
  114. package/lib/components/RichTextProvider.d.ts +1 -1
  115. package/lib/{dropdown-menu-Ce2TorkG.js → dropdown-menu-D-mNjyKn.js} +1 -1
  116. package/lib/{dropdown-menu-DirUyRAI.cjs → dropdown-menu-gOopBX-L.cjs} +1 -1
  117. package/lib/index-CUnpdrCy.cjs +28 -0
  118. package/lib/{index-CnKgiZFQ.js → index-CelRl0mr.js} +1062 -1191
  119. package/lib/index.cjs +3 -3
  120. package/lib/index.js +61 -59
  121. package/lib/{popover-BdLwAlrM.cjs → popover-DEMkixfo.cjs} +1 -1
  122. package/lib/{popover-BzJyaFvy.js → popover-SMtif0E1.js} +1 -1
  123. package/lib/select-BqlizSg4.cjs +1 -0
  124. package/lib/select-Dc3RkAhQ.js +120 -0
  125. package/lib/{separator-D-fyzbfx.js → separator-DWLSmuSh.js} +14 -14
  126. package/lib/{separator-CoQaQmFK.cjs → separator-DuP4NoiV.cjs} +1 -1
  127. package/lib/textarea-C89l2GRG.cjs +1 -0
  128. package/lib/textarea-DvciwVxS.js +20 -0
  129. package/lib/theme.cjs +1 -1
  130. package/lib/theme.js +18 -18
  131. package/package.json +21 -32
  132. package/lib/Katex-DFU1unCm.cjs +0 -4
  133. package/lib/Mermaid-B8lQSOGn.cjs +0 -2
  134. package/lib/index-BynXHtjJ.cjs +0 -28
@@ -1,56 +1,55 @@
1
- import { jsxs as y, jsx as n, Fragment as q } from "react/jsx-runtime";
2
- import * as _ from "react";
3
- import ie, { useCallback as oe, useState as I, useEffect as Ie, useMemo as F, useRef as me } from "react";
4
- import { Slot as vt } from "@radix-ui/react-slot";
5
- import { y as er, b as tr, S as rr } from "./index-BG0kQamI.js";
1
+ import { jsxs as y, jsx as n, Fragment as Z } from "react/jsx-runtime";
2
+ import * as U from "react";
3
+ import re, { useCallback as ne, useState as z, useEffect as Ie, useMemo as $, useRef as fe } from "react";
4
+ import { y as Yt, b as Zt, S as qt } from "./index-BG0kQamI.js";
6
5
  import "./theme.js";
7
- import { j as Ae, h as Le, a3 as ir, aa as nr, N as Xe, k as wt, m as Ye, n as or, ab as ar } from "./clsx-BUPZHhq3.js";
6
+ import * as Y from "@radix-ui/react-dialog";
7
+ import { NotebookPen as Jt, ExternalLink as Kt, X as xt, Loader2 as Qt, WrapText as er, PencilRuler as tr, FlipHorizontal as rr, FlipVertical as ir, CropIcon as nr, ChevronUp as or, Download as ar, Paperclip as sr, Eye as lr, Settings as cr, ZoomOut as dr, ZoomIn as ur, BookMarked as hr, Sigma as fr, SmilePlusIcon as mr, Replace as nt, SmilePlus as gr, Frame as pr, Columns2 as ot, PanelRight as xr, PanelLeft as vr, Clipboard as br, Copy as wr, GripVertical as yr, Plus as Cr, Columns4 as kr, Columns3 as Mr, Heading6 as Tr, Heading5 as Ar, Heading4 as Nr, Heading3 as Ir, Heading2 as zr, Heading1 as Lr, Pilcrow as Sr, ChevronsUpDown as Er, Trash as Rr, Trash2 as Vr, TableCellsSplit as _r, TableCellsMerge as Hr, BetweenVerticalEnd as Dr, BetweenVerticalStart as Or, BetweenHorizonalStart as Pr, BetweenHorizonalEnd as jr, Unlink as Br, Pencil as Ur, Sparkles as $r, Table as Fr, Minimize as Wr, Maximize as Gr, Video as Xr, ImageUp as Yr, Link as Zr, ListTodo as qr, ListOrdered as Jr, List as Kr, IndentDecrease as Qr, IndentIncrease as ei, Type as ti, CodeXml as ri, Code as ii, Superscript as ni, Subscript as oi, ChevronDown as ai, Undo2 as si, Redo2 as li, PaintRoller as ci, Eraser as di, Minus as ui, Strikethrough as hi, Quote as fi, Underline as mi, Italic as gi, LoaderCircle as pi, Bold as xi, Check as vi, LucideTableProperties as bi, LucideSheet as wi, LucideImage as yi, LucideFile as Ci, LucideVideo as ki, LucideAudioLines as Mi } from "lucide-react";
8
+ import { j as ze, h as Le, a3 as Ti, aa as Ai, N as Ge, k as vt, m as Xe, n as Ni, ab as Ii } from "./clsx-BUPZHhq3.js";
9
+ import zi from "react-image-crop";
10
+ import { Slot as bt } from "@radix-ui/react-slot";
11
+ import { u as ie, I as at, i as st, j as Li, V as Si } from "./index-BGd2HiwP.js";
12
+ import * as ke from "@radix-ui/react-tooltip";
13
+ import * as wt from "@radix-ui/react-toggle";
14
+ import { TextAlignRightIcon as Ei, TextAlignLeftIcon as Ri, TextAlignJustifyIcon as Vi, TextAlignCenterIcon as _i } from "@radix-ui/react-icons";
15
+ import * as ae from "@radix-ui/react-tabs";
16
+ import * as $e from "@radix-ui/react-checkbox";
8
17
  import * as yt from "@radix-ui/react-label";
9
- import * as se from "@radix-ui/react-tabs";
10
- import * as Me from "@radix-ui/react-tooltip";
11
- import * as D from "@radix-ui/react-select";
12
- import { NotebookPen as sr, ExternalLink as lr, X as Ct, Loader2 as cr, WrapText as dr, PencilRuler as ur, FlipHorizontal as hr, FlipVertical as fr, CropIcon as mr, ChevronUp as kt, Download as pr, Paperclip as gr, Eye as xr, Settings as br, ZoomOut as vr, ZoomIn as wr, BookMarked as yr, Sigma as Cr, SmilePlusIcon as kr, Replace as at, SmilePlus as Mr, Frame as Nr, Columns2 as st, PanelRight as Tr, PanelLeft as Sr, Clipboard as zr, Copy as Ir, GripVertical as Ar, Plus as Lr, Columns4 as Er, Columns3 as Rr, Heading6 as Vr, Heading5 as _r, Heading4 as Hr, Heading3 as Dr, Heading2 as jr, Heading1 as Pr, Pilcrow as Or, ChevronsUpDown as Br, Trash as Ur, Trash2 as $r, TableCellsSplit as Fr, TableCellsMerge as Wr, BetweenVerticalEnd as Gr, BetweenVerticalStart as Xr, BetweenHorizonalStart as Yr, BetweenHorizonalEnd as Zr, Unlink as qr, Pencil as Jr, Sparkles as Kr, Table as Qr, Minimize as ei, Maximize as ti, Video as ri, ImageUp as ii, Link as ni, ListTodo as oi, ListOrdered as ai, List as si, IndentDecrease as li, IndentIncrease as ci, Type as di, CodeXml as ui, Code as hi, Superscript as fi, Subscript as mi, ChevronDown as Ze, Undo2 as pi, Redo2 as gi, PaintRoller as xi, Eraser as bi, Minus as vi, Strikethrough as wi, Quote as yi, Underline as Ci, Italic as ki, LoaderCircle as Mi, Bold as Ni, Check as Mt, LucideTableProperties as Ti, LucideSheet as Si, LucideImage as zi, LucideFile as Ii, LucideVideo as Ai, LucideAudioLines as Li } from "lucide-react";
13
- import * as Fe from "@radix-ui/react-checkbox";
14
- import * as Z from "@radix-ui/react-dialog";
15
- import Ei from "react-image-crop";
16
- import { u as ne, I as lt, i as ct, j as Ri, V as Vi } from "./index-BGd2HiwP.js";
17
- import { TextAlignRightIcon as _i, TextAlignLeftIcon as Hi, TextAlignJustifyIcon as Di, TextAlignCenterIcon as ji } from "@radix-ui/react-icons";
18
- import * as Nt from "@radix-ui/react-toggle";
19
- const qe = "-", Pi = (e) => {
20
- const t = Bi(e), {
18
+ const Ye = "-", Hi = (e) => {
19
+ const t = Oi(e), {
21
20
  conflictingClassGroups: r,
22
21
  conflictingClassGroupModifiers: i
23
22
  } = e;
24
23
  return {
25
24
  getClassGroupId: (l) => {
26
- const s = l.split(qe);
27
- return s[0] === "" && s.length !== 1 && s.shift(), Tt(s, t) || Oi(l);
25
+ const s = l.split(Ye);
26
+ return s[0] === "" && s.length !== 1 && s.shift(), Ct(s, t) || Di(l);
28
27
  },
29
28
  getConflictingClassGroupIds: (l, s) => {
30
29
  const c = r[l] || [];
31
30
  return s && i[l] ? [...c, ...i[l]] : c;
32
31
  }
33
32
  };
34
- }, Tt = (e, t) => {
33
+ }, Ct = (e, t) => {
35
34
  var l;
36
35
  if (e.length === 0)
37
36
  return t.classGroupId;
38
- const r = e[0], i = t.nextPart.get(r), o = i ? Tt(e.slice(1), i) : void 0;
37
+ const r = e[0], i = t.nextPart.get(r), o = i ? Ct(e.slice(1), i) : void 0;
39
38
  if (o)
40
39
  return o;
41
40
  if (t.validators.length === 0)
42
41
  return;
43
- const a = e.join(qe);
42
+ const a = e.join(Ye);
44
43
  return (l = t.validators.find(({
45
44
  validator: s
46
45
  }) => s(a))) == null ? void 0 : l.classGroupId;
47
- }, dt = /^\[(.+)\]$/, Oi = (e) => {
48
- if (dt.test(e)) {
49
- const t = dt.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
46
+ }, lt = /^\[(.+)\]$/, Di = (e) => {
47
+ if (lt.test(e)) {
48
+ const t = lt.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
50
49
  if (r)
51
50
  return "arbitrary.." + r;
52
51
  }
53
- }, Bi = (e) => {
52
+ }, Oi = (e) => {
54
53
  const {
55
54
  theme: t,
56
55
  prefix: r
@@ -58,19 +57,19 @@ const qe = "-", Pi = (e) => {
58
57
  nextPart: /* @__PURE__ */ new Map(),
59
58
  validators: []
60
59
  };
61
- return $i(Object.entries(e.classGroups), r).forEach(([a, l]) => {
62
- We(l, i, a, t);
60
+ return ji(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
+ Fe(l, i, a, t);
63
62
  }), i;
64
- }, We = (e, t, r, i) => {
63
+ }, Fe = (e, t, r, i) => {
65
64
  e.forEach((o) => {
66
65
  if (typeof o == "string") {
67
- const a = o === "" ? t : ut(t, o);
66
+ const a = o === "" ? t : ct(t, o);
68
67
  a.classGroupId = r;
69
68
  return;
70
69
  }
71
70
  if (typeof o == "function") {
72
- if (Ui(o)) {
73
- We(o(i), t, r, i);
71
+ if (Pi(o)) {
72
+ Fe(o(i), t, r, i);
74
73
  return;
75
74
  }
76
75
  t.validators.push({
@@ -80,21 +79,21 @@ const qe = "-", Pi = (e) => {
80
79
  return;
81
80
  }
82
81
  Object.entries(o).forEach(([a, l]) => {
83
- We(l, ut(t, a), r, i);
82
+ Fe(l, ct(t, a), r, i);
84
83
  });
85
84
  });
86
- }, ut = (e, t) => {
85
+ }, ct = (e, t) => {
87
86
  let r = e;
88
- return t.split(qe).forEach((i) => {
87
+ return t.split(Ye).forEach((i) => {
89
88
  r.nextPart.has(i) || r.nextPart.set(i, {
90
89
  nextPart: /* @__PURE__ */ new Map(),
91
90
  validators: []
92
91
  }), r = r.nextPart.get(i);
93
92
  }), r;
94
- }, Ui = (e) => e.isThemeGetter, $i = (e, t) => t ? e.map(([r, i]) => {
93
+ }, Pi = (e) => e.isThemeGetter, ji = (e, t) => t ? e.map(([r, i]) => {
95
94
  const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a);
96
95
  return [r, o];
97
- }) : e, Fi = (e) => {
96
+ }) : e, Bi = (e) => {
98
97
  if (e < 1)
99
98
  return {
100
99
  get: () => {
@@ -118,13 +117,13 @@ const qe = "-", Pi = (e) => {
118
117
  r.has(a) ? r.set(a, l) : o(a, l);
119
118
  }
120
119
  };
121
- }, St = "!", Wi = (e) => {
120
+ }, kt = "!", Ui = (e) => {
122
121
  const {
123
122
  separator: t,
124
123
  experimentalParseClassName: r
125
124
  } = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
126
125
  const c = [];
127
- let d = 0, f = 0, g;
126
+ let d = 0, f = 0, p;
128
127
  for (let h = 0; h < s.length; h++) {
129
128
  let x = s[h];
130
129
  if (d === 0) {
@@ -133,17 +132,17 @@ const qe = "-", Pi = (e) => {
133
132
  continue;
134
133
  }
135
134
  if (x === "/") {
136
- g = h;
135
+ p = h;
137
136
  continue;
138
137
  }
139
138
  }
140
139
  x === "[" ? d++ : x === "]" && d--;
141
140
  }
142
- const u = c.length === 0 ? s : s.substring(f), v = u.startsWith(St), p = v ? u.substring(1) : u, k = g && g > f ? g - f : void 0;
141
+ const u = c.length === 0 ? s : s.substring(f), b = u.startsWith(kt), g = b ? u.substring(1) : u, k = p && p > f ? p - f : void 0;
143
142
  return {
144
143
  modifiers: c,
145
- hasImportantModifier: v,
146
- baseClassName: p,
144
+ hasImportantModifier: b,
145
+ baseClassName: g,
147
146
  maybePostfixModifierPosition: k
148
147
  };
149
148
  };
@@ -151,7 +150,7 @@ const qe = "-", Pi = (e) => {
151
150
  className: s,
152
151
  parseClassName: l
153
152
  }) : l;
154
- }, Gi = (e) => {
153
+ }, $i = (e) => {
155
154
  if (e.length <= 1)
156
155
  return e;
157
156
  const t = [];
@@ -159,27 +158,27 @@ const qe = "-", Pi = (e) => {
159
158
  return e.forEach((i) => {
160
159
  i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
161
160
  }), t.push(...r.sort()), t;
162
- }, Xi = (e) => ({
163
- cache: Fi(e.cacheSize),
164
- parseClassName: Wi(e),
165
- ...Pi(e)
166
- }), Yi = /\s+/, Zi = (e, t) => {
161
+ }, Fi = (e) => ({
162
+ cache: Bi(e.cacheSize),
163
+ parseClassName: Ui(e),
164
+ ...Hi(e)
165
+ }), Wi = /\s+/, Gi = (e, t) => {
167
166
  const {
168
167
  parseClassName: r,
169
168
  getClassGroupId: i,
170
169
  getConflictingClassGroupIds: o
171
- } = t, a = [], l = e.trim().split(Yi);
170
+ } = t, a = [], l = e.trim().split(Wi);
172
171
  let s = "";
173
172
  for (let c = l.length - 1; c >= 0; c -= 1) {
174
173
  const d = l[c], {
175
174
  modifiers: f,
176
- hasImportantModifier: g,
175
+ hasImportantModifier: p,
177
176
  baseClassName: u,
178
- maybePostfixModifierPosition: v
177
+ maybePostfixModifierPosition: b
179
178
  } = r(d);
180
- let p = !!v, k = i(p ? u.substring(0, v) : u);
179
+ let g = !!b, k = i(g ? u.substring(0, b) : u);
181
180
  if (!k) {
182
- if (!p) {
181
+ if (!g) {
183
182
  s = d + (s.length > 0 ? " " + s : s);
184
183
  continue;
185
184
  }
@@ -187,94 +186,94 @@ const qe = "-", Pi = (e) => {
187
186
  s = d + (s.length > 0 ? " " + s : s);
188
187
  continue;
189
188
  }
190
- p = !1;
189
+ g = !1;
191
190
  }
192
- const h = Gi(f).join(":"), x = g ? h + St : h, m = x + k;
191
+ const h = $i(f).join(":"), x = p ? h + kt : h, m = x + k;
193
192
  if (a.includes(m))
194
193
  continue;
195
194
  a.push(m);
196
- const T = o(k, p);
197
- for (let b = 0; b < T.length; ++b) {
198
- const A = T[b];
199
- a.push(x + A);
195
+ const A = o(k, g);
196
+ for (let v = 0; v < A.length; ++v) {
197
+ const L = A[v];
198
+ a.push(x + L);
200
199
  }
201
200
  s = d + (s.length > 0 ? " " + s : s);
202
201
  }
203
202
  return s;
204
203
  };
205
- function qi() {
204
+ function Xi() {
206
205
  let e = 0, t, r, i = "";
207
206
  for (; e < arguments.length; )
208
- (t = arguments[e++]) && (r = zt(t)) && (i && (i += " "), i += r);
207
+ (t = arguments[e++]) && (r = Mt(t)) && (i && (i += " "), i += r);
209
208
  return i;
210
209
  }
211
- const zt = (e) => {
210
+ const Mt = (e) => {
212
211
  if (typeof e == "string")
213
212
  return e;
214
213
  let t, r = "";
215
214
  for (let i = 0; i < e.length; i++)
216
- e[i] && (t = zt(e[i])) && (r && (r += " "), r += t);
215
+ e[i] && (t = Mt(e[i])) && (r && (r += " "), r += t);
217
216
  return r;
218
217
  };
219
- function Ji(e, ...t) {
218
+ function Yi(e, ...t) {
220
219
  let r, i, o, a = l;
221
220
  function l(c) {
222
- const d = t.reduce((f, g) => g(f), e());
223
- return r = Xi(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
221
+ const d = t.reduce((f, p) => p(f), e());
222
+ return r = Fi(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
224
223
  }
225
224
  function s(c) {
226
225
  const d = i(c);
227
226
  if (d)
228
227
  return d;
229
- const f = Zi(c, r);
228
+ const f = Gi(c, r);
230
229
  return o(c, f), f;
231
230
  }
232
231
  return function() {
233
- return a(qi.apply(null, arguments));
232
+ return a(Xi.apply(null, arguments));
234
233
  };
235
234
  }
236
- const R = (e) => {
235
+ const E = (e) => {
237
236
  const t = (r) => r[e] || [];
238
237
  return t.isThemeGetter = !0, t;
239
- }, It = /^\[(?:([a-z-]+):)?(.+)\]$/i, Ki = /^\d+\/\d+$/, Qi = /* @__PURE__ */ new Set(["px", "full", "screen"]), en = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, nn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, on = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, J = (e) => he(e) || Qi.has(e) || Ki.test(e), te = (e) => pe(e, "length", fn), he = (e) => !!e && !Number.isNaN(Number(e)), De = (e) => pe(e, "number", he), be = (e) => !!e && Number.isInteger(Number(e)), an = (e) => e.endsWith("%") && he(e.slice(0, -1)), M = (e) => It.test(e), re = (e) => en.test(e), sn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ln = (e) => pe(e, sn, At), cn = (e) => pe(e, "position", At), dn = /* @__PURE__ */ new Set(["image", "url"]), un = (e) => pe(e, dn, pn), hn = (e) => pe(e, "", mn), ve = () => !0, pe = (e, t, r) => {
240
- const i = It.exec(e);
238
+ }, Tt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Zi = /^\d+\/\d+$/, qi = /* @__PURE__ */ new Set(["px", "full", "screen"]), Ji = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ki = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, en = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, tn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, q = (e) => ue(e) || qi.has(e) || Zi.test(e), ee = (e) => me(e, "length", dn), ue = (e) => !!e && !Number.isNaN(Number(e)), He = (e) => me(e, "number", ue), xe = (e) => !!e && Number.isInteger(Number(e)), rn = (e) => e.endsWith("%") && ue(e.slice(0, -1)), M = (e) => Tt.test(e), te = (e) => Ji.test(e), nn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), on = (e) => me(e, nn, At), an = (e) => me(e, "position", At), sn = /* @__PURE__ */ new Set(["image", "url"]), ln = (e) => me(e, sn, hn), cn = (e) => me(e, "", un), ve = () => !0, me = (e, t, r) => {
239
+ const i = Tt.exec(e);
241
240
  return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
242
- }, fn = (e) => (
241
+ }, dn = (e) => (
243
242
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
244
243
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
245
244
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
246
- tn.test(e) && !rn.test(e)
247
- ), At = () => !1, mn = (e) => nn.test(e), pn = (e) => on.test(e), gn = () => {
248
- const e = R("colors"), t = R("spacing"), r = R("blur"), i = R("brightness"), o = R("borderColor"), a = R("borderRadius"), l = R("borderSpacing"), s = R("borderWidth"), c = R("contrast"), d = R("grayscale"), f = R("hueRotate"), g = R("invert"), u = R("gap"), v = R("gradientColorStops"), p = R("gradientColorStopPositions"), k = R("inset"), h = R("margin"), x = R("opacity"), m = R("padding"), T = R("saturate"), b = R("scale"), A = R("sepia"), C = R("skew"), L = R("space"), H = R("translate"), P = () => ["auto", "contain", "none"], O = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", M, t], S = () => [M, t], w = () => ["", J, te], N = () => ["auto", he, M], V = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], j = () => ["solid", "dashed", "dotted", "double", "none"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", M], W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [he, M];
245
+ Ki.test(e) && !Qi.test(e)
246
+ ), At = () => !1, un = (e) => en.test(e), hn = (e) => tn.test(e), fn = () => {
247
+ const e = E("colors"), t = E("spacing"), r = E("blur"), i = E("brightness"), o = E("borderColor"), a = E("borderRadius"), l = E("borderSpacing"), s = E("borderWidth"), c = E("contrast"), d = E("grayscale"), f = E("hueRotate"), p = E("invert"), u = E("gap"), b = E("gradientColorStops"), g = E("gradientColorStopPositions"), k = E("inset"), h = E("margin"), x = E("opacity"), m = E("padding"), A = E("saturate"), v = E("scale"), L = E("sepia"), C = E("skew"), S = E("space"), V = E("translate"), H = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", M, t], N = () => [M, t], w = () => ["", q, ee], T = () => ["auto", ue, M], R = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], _ = () => ["solid", "dashed", "dotted", "double", "none"], O = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], I = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], B = () => ["", "0", M], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ue, M];
249
248
  return {
250
249
  cacheSize: 500,
251
250
  separator: ":",
252
251
  theme: {
253
252
  colors: [ve],
254
- spacing: [J, te],
255
- blur: ["none", "", re, M],
256
- brightness: G(),
253
+ spacing: [q, ee],
254
+ blur: ["none", "", te, M],
255
+ brightness: W(),
257
256
  borderColor: [e],
258
- borderRadius: ["none", "", "full", re, M],
259
- borderSpacing: S(),
257
+ borderRadius: ["none", "", "full", te, M],
258
+ borderSpacing: N(),
260
259
  borderWidth: w(),
261
- contrast: G(),
262
- grayscale: $(),
263
- hueRotate: G(),
264
- invert: $(),
265
- gap: S(),
260
+ contrast: W(),
261
+ grayscale: B(),
262
+ hueRotate: W(),
263
+ invert: B(),
264
+ gap: N(),
266
265
  gradientColorStops: [e],
267
- gradientColorStopPositions: [an, te],
268
- inset: U(),
269
- margin: U(),
270
- opacity: G(),
271
- padding: S(),
272
- saturate: G(),
273
- scale: G(),
274
- sepia: $(),
275
- skew: G(),
276
- space: S(),
277
- translate: S()
266
+ gradientColorStopPositions: [rn, ee],
267
+ inset: j(),
268
+ margin: j(),
269
+ opacity: W(),
270
+ padding: N(),
271
+ saturate: W(),
272
+ scale: W(),
273
+ sepia: B(),
274
+ skew: W(),
275
+ space: N(),
276
+ translate: N()
278
277
  },
279
278
  classGroups: {
280
279
  // Layout
@@ -295,21 +294,21 @@ const R = (e) => {
295
294
  * @see https://tailwindcss.com/docs/columns
296
295
  */
297
296
  columns: [{
298
- columns: [re]
297
+ columns: [te]
299
298
  }],
300
299
  /**
301
300
  * Break After
302
301
  * @see https://tailwindcss.com/docs/break-after
303
302
  */
304
303
  "break-after": [{
305
- "break-after": W()
304
+ "break-after": F()
306
305
  }],
307
306
  /**
308
307
  * Break Before
309
308
  * @see https://tailwindcss.com/docs/break-before
310
309
  */
311
310
  "break-before": [{
312
- "break-before": W()
311
+ "break-before": F()
313
312
  }],
314
313
  /**
315
314
  * Break Inside
@@ -368,49 +367,49 @@ const R = (e) => {
368
367
  * @see https://tailwindcss.com/docs/object-position
369
368
  */
370
369
  "object-position": [{
371
- object: [...V(), M]
370
+ object: [...R(), M]
372
371
  }],
373
372
  /**
374
373
  * Overflow
375
374
  * @see https://tailwindcss.com/docs/overflow
376
375
  */
377
376
  overflow: [{
378
- overflow: O()
377
+ overflow: D()
379
378
  }],
380
379
  /**
381
380
  * Overflow X
382
381
  * @see https://tailwindcss.com/docs/overflow
383
382
  */
384
383
  "overflow-x": [{
385
- "overflow-x": O()
384
+ "overflow-x": D()
386
385
  }],
387
386
  /**
388
387
  * Overflow Y
389
388
  * @see https://tailwindcss.com/docs/overflow
390
389
  */
391
390
  "overflow-y": [{
392
- "overflow-y": O()
391
+ "overflow-y": D()
393
392
  }],
394
393
  /**
395
394
  * Overscroll Behavior
396
395
  * @see https://tailwindcss.com/docs/overscroll-behavior
397
396
  */
398
397
  overscroll: [{
399
- overscroll: P()
398
+ overscroll: H()
400
399
  }],
401
400
  /**
402
401
  * Overscroll Behavior X
403
402
  * @see https://tailwindcss.com/docs/overscroll-behavior
404
403
  */
405
404
  "overscroll-x": [{
406
- "overscroll-x": P()
405
+ "overscroll-x": H()
407
406
  }],
408
407
  /**
409
408
  * Overscroll Behavior Y
410
409
  * @see https://tailwindcss.com/docs/overscroll-behavior
411
410
  */
412
411
  "overscroll-y": [{
413
- "overscroll-y": P()
412
+ "overscroll-y": H()
414
413
  }],
415
414
  /**
416
415
  * Position
@@ -490,7 +489,7 @@ const R = (e) => {
490
489
  * @see https://tailwindcss.com/docs/z-index
491
490
  */
492
491
  z: [{
493
- z: ["auto", be, M]
492
+ z: ["auto", xe, M]
494
493
  }],
495
494
  // Flexbox and Grid
496
495
  /**
@@ -498,7 +497,7 @@ const R = (e) => {
498
497
  * @see https://tailwindcss.com/docs/flex-basis
499
498
  */
500
499
  basis: [{
501
- basis: U()
500
+ basis: j()
502
501
  }],
503
502
  /**
504
503
  * Flex Direction
@@ -526,21 +525,21 @@ const R = (e) => {
526
525
  * @see https://tailwindcss.com/docs/flex-grow
527
526
  */
528
527
  grow: [{
529
- grow: $()
528
+ grow: B()
530
529
  }],
531
530
  /**
532
531
  * Flex Shrink
533
532
  * @see https://tailwindcss.com/docs/flex-shrink
534
533
  */
535
534
  shrink: [{
536
- shrink: $()
535
+ shrink: B()
537
536
  }],
538
537
  /**
539
538
  * Order
540
539
  * @see https://tailwindcss.com/docs/order
541
540
  */
542
541
  order: [{
543
- order: ["first", "last", "none", be, M]
542
+ order: ["first", "last", "none", xe, M]
544
543
  }],
545
544
  /**
546
545
  * Grid Template Columns
@@ -555,7 +554,7 @@ const R = (e) => {
555
554
  */
556
555
  "col-start-end": [{
557
556
  col: ["auto", {
558
- span: ["full", be, M]
557
+ span: ["full", xe, M]
559
558
  }, M]
560
559
  }],
561
560
  /**
@@ -563,14 +562,14 @@ const R = (e) => {
563
562
  * @see https://tailwindcss.com/docs/grid-column
564
563
  */
565
564
  "col-start": [{
566
- "col-start": N()
565
+ "col-start": T()
567
566
  }],
568
567
  /**
569
568
  * Grid Column End
570
569
  * @see https://tailwindcss.com/docs/grid-column
571
570
  */
572
571
  "col-end": [{
573
- "col-end": N()
572
+ "col-end": T()
574
573
  }],
575
574
  /**
576
575
  * Grid Template Rows
@@ -585,7 +584,7 @@ const R = (e) => {
585
584
  */
586
585
  "row-start-end": [{
587
586
  row: ["auto", {
588
- span: [be, M]
587
+ span: [xe, M]
589
588
  }, M]
590
589
  }],
591
590
  /**
@@ -593,14 +592,14 @@ const R = (e) => {
593
592
  * @see https://tailwindcss.com/docs/grid-row
594
593
  */
595
594
  "row-start": [{
596
- "row-start": N()
595
+ "row-start": T()
597
596
  }],
598
597
  /**
599
598
  * Grid Row End
600
599
  * @see https://tailwindcss.com/docs/grid-row
601
600
  */
602
601
  "row-end": [{
603
- "row-end": N()
602
+ "row-end": T()
604
603
  }],
605
604
  /**
606
605
  * Grid Auto Flow
@@ -649,7 +648,7 @@ const R = (e) => {
649
648
  * @see https://tailwindcss.com/docs/justify-content
650
649
  */
651
650
  "justify-content": [{
652
- justify: ["normal", ...z()]
651
+ justify: ["normal", ...I()]
653
652
  }],
654
653
  /**
655
654
  * Justify Items
@@ -670,7 +669,7 @@ const R = (e) => {
670
669
  * @see https://tailwindcss.com/docs/align-content
671
670
  */
672
671
  "align-content": [{
673
- content: ["normal", ...z(), "baseline"]
672
+ content: ["normal", ...I(), "baseline"]
674
673
  }],
675
674
  /**
676
675
  * Align Items
@@ -691,7 +690,7 @@ const R = (e) => {
691
690
  * @see https://tailwindcss.com/docs/place-content
692
691
  */
693
692
  "place-content": [{
694
- "place-content": [...z(), "baseline"]
693
+ "place-content": [...I(), "baseline"]
695
694
  }],
696
695
  /**
697
696
  * Place Items
@@ -839,7 +838,7 @@ const R = (e) => {
839
838
  * @see https://tailwindcss.com/docs/space
840
839
  */
841
840
  "space-x": [{
842
- "space-x": [L]
841
+ "space-x": [S]
843
842
  }],
844
843
  /**
845
844
  * Space Between X Reverse
@@ -851,7 +850,7 @@ const R = (e) => {
851
850
  * @see https://tailwindcss.com/docs/space
852
851
  */
853
852
  "space-y": [{
854
- "space-y": [L]
853
+ "space-y": [S]
855
854
  }],
856
855
  /**
857
856
  * Space Between Y Reverse
@@ -879,8 +878,8 @@ const R = (e) => {
879
878
  */
880
879
  "max-w": [{
881
880
  "max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
882
- screen: [re]
883
- }, re]
881
+ screen: [te]
882
+ }, te]
884
883
  }],
885
884
  /**
886
885
  * Height
@@ -916,7 +915,7 @@ const R = (e) => {
916
915
  * @see https://tailwindcss.com/docs/font-size
917
916
  */
918
917
  "font-size": [{
919
- text: ["base", re, te]
918
+ text: ["base", te, ee]
920
919
  }],
921
920
  /**
922
921
  * Font Smoothing
@@ -933,7 +932,7 @@ const R = (e) => {
933
932
  * @see https://tailwindcss.com/docs/font-weight
934
933
  */
935
934
  "font-weight": [{
936
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", De]
935
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", He]
937
936
  }],
938
937
  /**
939
938
  * Font Family
@@ -984,14 +983,14 @@ const R = (e) => {
984
983
  * @see https://tailwindcss.com/docs/line-clamp
985
984
  */
986
985
  "line-clamp": [{
987
- "line-clamp": ["none", he, De]
986
+ "line-clamp": ["none", ue, He]
988
987
  }],
989
988
  /**
990
989
  * Line Height
991
990
  * @see https://tailwindcss.com/docs/line-height
992
991
  */
993
992
  leading: [{
994
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", J, M]
993
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", q, M]
995
994
  }],
996
995
  /**
997
996
  * List Style Image
@@ -1060,21 +1059,21 @@ const R = (e) => {
1060
1059
  * @see https://tailwindcss.com/docs/text-decoration-style
1061
1060
  */
1062
1061
  "text-decoration-style": [{
1063
- decoration: [...j(), "wavy"]
1062
+ decoration: [..._(), "wavy"]
1064
1063
  }],
1065
1064
  /**
1066
1065
  * Text Decoration Thickness
1067
1066
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1068
1067
  */
1069
1068
  "text-decoration-thickness": [{
1070
- decoration: ["auto", "from-font", J, te]
1069
+ decoration: ["auto", "from-font", q, ee]
1071
1070
  }],
1072
1071
  /**
1073
1072
  * Text Underline Offset
1074
1073
  * @see https://tailwindcss.com/docs/text-underline-offset
1075
1074
  */
1076
1075
  "underline-offset": [{
1077
- "underline-offset": ["auto", J, M]
1076
+ "underline-offset": ["auto", q, M]
1078
1077
  }],
1079
1078
  /**
1080
1079
  * Text Decoration Color
@@ -1105,7 +1104,7 @@ const R = (e) => {
1105
1104
  * @see https://tailwindcss.com/docs/text-indent
1106
1105
  */
1107
1106
  indent: [{
1108
- indent: S()
1107
+ indent: N()
1109
1108
  }],
1110
1109
  /**
1111
1110
  * Vertical Alignment
@@ -1177,7 +1176,7 @@ const R = (e) => {
1177
1176
  * @see https://tailwindcss.com/docs/background-position
1178
1177
  */
1179
1178
  "bg-position": [{
1180
- bg: [...V(), cn]
1179
+ bg: [...R(), an]
1181
1180
  }],
1182
1181
  /**
1183
1182
  * Background Repeat
@@ -1193,7 +1192,7 @@ const R = (e) => {
1193
1192
  * @see https://tailwindcss.com/docs/background-size
1194
1193
  */
1195
1194
  "bg-size": [{
1196
- bg: ["auto", "cover", "contain", ln]
1195
+ bg: ["auto", "cover", "contain", on]
1197
1196
  }],
1198
1197
  /**
1199
1198
  * Background Image
@@ -1202,7 +1201,7 @@ const R = (e) => {
1202
1201
  "bg-image": [{
1203
1202
  bg: ["none", {
1204
1203
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1205
- }, un]
1204
+ }, ln]
1206
1205
  }],
1207
1206
  /**
1208
1207
  * Background Color
@@ -1216,42 +1215,42 @@ const R = (e) => {
1216
1215
  * @see https://tailwindcss.com/docs/gradient-color-stops
1217
1216
  */
1218
1217
  "gradient-from-pos": [{
1219
- from: [p]
1218
+ from: [g]
1220
1219
  }],
1221
1220
  /**
1222
1221
  * Gradient Color Stops Via Position
1223
1222
  * @see https://tailwindcss.com/docs/gradient-color-stops
1224
1223
  */
1225
1224
  "gradient-via-pos": [{
1226
- via: [p]
1225
+ via: [g]
1227
1226
  }],
1228
1227
  /**
1229
1228
  * Gradient Color Stops To Position
1230
1229
  * @see https://tailwindcss.com/docs/gradient-color-stops
1231
1230
  */
1232
1231
  "gradient-to-pos": [{
1233
- to: [p]
1232
+ to: [g]
1234
1233
  }],
1235
1234
  /**
1236
1235
  * Gradient Color Stops From
1237
1236
  * @see https://tailwindcss.com/docs/gradient-color-stops
1238
1237
  */
1239
1238
  "gradient-from": [{
1240
- from: [v]
1239
+ from: [b]
1241
1240
  }],
1242
1241
  /**
1243
1242
  * Gradient Color Stops Via
1244
1243
  * @see https://tailwindcss.com/docs/gradient-color-stops
1245
1244
  */
1246
1245
  "gradient-via": [{
1247
- via: [v]
1246
+ via: [b]
1248
1247
  }],
1249
1248
  /**
1250
1249
  * Gradient Color Stops To
1251
1250
  * @see https://tailwindcss.com/docs/gradient-color-stops
1252
1251
  */
1253
1252
  "gradient-to": [{
1254
- to: [v]
1253
+ to: [b]
1255
1254
  }],
1256
1255
  // Borders
1257
1256
  /**
@@ -1434,7 +1433,7 @@ const R = (e) => {
1434
1433
  * @see https://tailwindcss.com/docs/border-style
1435
1434
  */
1436
1435
  "border-style": [{
1437
- border: [...j(), "hidden"]
1436
+ border: [..._(), "hidden"]
1438
1437
  }],
1439
1438
  /**
1440
1439
  * Divide Width X
@@ -1472,7 +1471,7 @@ const R = (e) => {
1472
1471
  * @see https://tailwindcss.com/docs/divide-style
1473
1472
  */
1474
1473
  "divide-style": [{
1475
- divide: j()
1474
+ divide: _()
1476
1475
  }],
1477
1476
  /**
1478
1477
  * Border Color
@@ -1549,21 +1548,21 @@ const R = (e) => {
1549
1548
  * @see https://tailwindcss.com/docs/outline-style
1550
1549
  */
1551
1550
  "outline-style": [{
1552
- outline: ["", ...j()]
1551
+ outline: ["", ..._()]
1553
1552
  }],
1554
1553
  /**
1555
1554
  * Outline Offset
1556
1555
  * @see https://tailwindcss.com/docs/outline-offset
1557
1556
  */
1558
1557
  "outline-offset": [{
1559
- "outline-offset": [J, M]
1558
+ "outline-offset": [q, M]
1560
1559
  }],
1561
1560
  /**
1562
1561
  * Outline Width
1563
1562
  * @see https://tailwindcss.com/docs/outline-width
1564
1563
  */
1565
1564
  "outline-w": [{
1566
- outline: [J, te]
1565
+ outline: [q, ee]
1567
1566
  }],
1568
1567
  /**
1569
1568
  * Outline Color
@@ -1603,7 +1602,7 @@ const R = (e) => {
1603
1602
  * @see https://tailwindcss.com/docs/ring-offset-width
1604
1603
  */
1605
1604
  "ring-offset-w": [{
1606
- "ring-offset": [J, te]
1605
+ "ring-offset": [q, ee]
1607
1606
  }],
1608
1607
  /**
1609
1608
  * Ring Offset Color
@@ -1618,7 +1617,7 @@ const R = (e) => {
1618
1617
  * @see https://tailwindcss.com/docs/box-shadow
1619
1618
  */
1620
1619
  shadow: [{
1621
- shadow: ["", "inner", "none", re, hn]
1620
+ shadow: ["", "inner", "none", te, cn]
1622
1621
  }],
1623
1622
  /**
1624
1623
  * Box Shadow Color
@@ -1639,14 +1638,14 @@ const R = (e) => {
1639
1638
  * @see https://tailwindcss.com/docs/mix-blend-mode
1640
1639
  */
1641
1640
  "mix-blend": [{
1642
- "mix-blend": [...B(), "plus-lighter", "plus-darker"]
1641
+ "mix-blend": [...O(), "plus-lighter", "plus-darker"]
1643
1642
  }],
1644
1643
  /**
1645
1644
  * Background Blend Mode
1646
1645
  * @see https://tailwindcss.com/docs/background-blend-mode
1647
1646
  */
1648
1647
  "bg-blend": [{
1649
- "bg-blend": B()
1648
+ "bg-blend": O()
1650
1649
  }],
1651
1650
  // Filters
1652
1651
  /**
@@ -1683,7 +1682,7 @@ const R = (e) => {
1683
1682
  * @see https://tailwindcss.com/docs/drop-shadow
1684
1683
  */
1685
1684
  "drop-shadow": [{
1686
- "drop-shadow": ["", "none", re, M]
1685
+ "drop-shadow": ["", "none", te, M]
1687
1686
  }],
1688
1687
  /**
1689
1688
  * Grayscale
@@ -1704,21 +1703,21 @@ const R = (e) => {
1704
1703
  * @see https://tailwindcss.com/docs/invert
1705
1704
  */
1706
1705
  invert: [{
1707
- invert: [g]
1706
+ invert: [p]
1708
1707
  }],
1709
1708
  /**
1710
1709
  * Saturate
1711
1710
  * @see https://tailwindcss.com/docs/saturate
1712
1711
  */
1713
1712
  saturate: [{
1714
- saturate: [T]
1713
+ saturate: [A]
1715
1714
  }],
1716
1715
  /**
1717
1716
  * Sepia
1718
1717
  * @see https://tailwindcss.com/docs/sepia
1719
1718
  */
1720
1719
  sepia: [{
1721
- sepia: [A]
1720
+ sepia: [L]
1722
1721
  }],
1723
1722
  /**
1724
1723
  * Backdrop Filter
@@ -1768,7 +1767,7 @@ const R = (e) => {
1768
1767
  * @see https://tailwindcss.com/docs/backdrop-invert
1769
1768
  */
1770
1769
  "backdrop-invert": [{
1771
- "backdrop-invert": [g]
1770
+ "backdrop-invert": [p]
1772
1771
  }],
1773
1772
  /**
1774
1773
  * Backdrop Opacity
@@ -1782,14 +1781,14 @@ const R = (e) => {
1782
1781
  * @see https://tailwindcss.com/docs/backdrop-saturate
1783
1782
  */
1784
1783
  "backdrop-saturate": [{
1785
- "backdrop-saturate": [T]
1784
+ "backdrop-saturate": [A]
1786
1785
  }],
1787
1786
  /**
1788
1787
  * Backdrop Sepia
1789
1788
  * @see https://tailwindcss.com/docs/backdrop-sepia
1790
1789
  */
1791
1790
  "backdrop-sepia": [{
1792
- "backdrop-sepia": [A]
1791
+ "backdrop-sepia": [L]
1793
1792
  }],
1794
1793
  // Tables
1795
1794
  /**
@@ -1847,7 +1846,7 @@ const R = (e) => {
1847
1846
  * @see https://tailwindcss.com/docs/transition-duration
1848
1847
  */
1849
1848
  duration: [{
1850
- duration: G()
1849
+ duration: W()
1851
1850
  }],
1852
1851
  /**
1853
1852
  * Transition Timing Function
@@ -1861,7 +1860,7 @@ const R = (e) => {
1861
1860
  * @see https://tailwindcss.com/docs/transition-delay
1862
1861
  */
1863
1862
  delay: [{
1864
- delay: G()
1863
+ delay: W()
1865
1864
  }],
1866
1865
  /**
1867
1866
  * Animation
@@ -1883,42 +1882,42 @@ const R = (e) => {
1883
1882
  * @see https://tailwindcss.com/docs/scale
1884
1883
  */
1885
1884
  scale: [{
1886
- scale: [b]
1885
+ scale: [v]
1887
1886
  }],
1888
1887
  /**
1889
1888
  * Scale X
1890
1889
  * @see https://tailwindcss.com/docs/scale
1891
1890
  */
1892
1891
  "scale-x": [{
1893
- "scale-x": [b]
1892
+ "scale-x": [v]
1894
1893
  }],
1895
1894
  /**
1896
1895
  * Scale Y
1897
1896
  * @see https://tailwindcss.com/docs/scale
1898
1897
  */
1899
1898
  "scale-y": [{
1900
- "scale-y": [b]
1899
+ "scale-y": [v]
1901
1900
  }],
1902
1901
  /**
1903
1902
  * Rotate
1904
1903
  * @see https://tailwindcss.com/docs/rotate
1905
1904
  */
1906
1905
  rotate: [{
1907
- rotate: [be, M]
1906
+ rotate: [xe, M]
1908
1907
  }],
1909
1908
  /**
1910
1909
  * Translate X
1911
1910
  * @see https://tailwindcss.com/docs/translate
1912
1911
  */
1913
1912
  "translate-x": [{
1914
- "translate-x": [H]
1913
+ "translate-x": [V]
1915
1914
  }],
1916
1915
  /**
1917
1916
  * Translate Y
1918
1917
  * @see https://tailwindcss.com/docs/translate
1919
1918
  */
1920
1919
  "translate-y": [{
1921
- "translate-y": [H]
1920
+ "translate-y": [V]
1922
1921
  }],
1923
1922
  /**
1924
1923
  * Skew X
@@ -1996,126 +1995,126 @@ const R = (e) => {
1996
1995
  * @see https://tailwindcss.com/docs/scroll-margin
1997
1996
  */
1998
1997
  "scroll-m": [{
1999
- "scroll-m": S()
1998
+ "scroll-m": N()
2000
1999
  }],
2001
2000
  /**
2002
2001
  * Scroll Margin X
2003
2002
  * @see https://tailwindcss.com/docs/scroll-margin
2004
2003
  */
2005
2004
  "scroll-mx": [{
2006
- "scroll-mx": S()
2005
+ "scroll-mx": N()
2007
2006
  }],
2008
2007
  /**
2009
2008
  * Scroll Margin Y
2010
2009
  * @see https://tailwindcss.com/docs/scroll-margin
2011
2010
  */
2012
2011
  "scroll-my": [{
2013
- "scroll-my": S()
2012
+ "scroll-my": N()
2014
2013
  }],
2015
2014
  /**
2016
2015
  * Scroll Margin Start
2017
2016
  * @see https://tailwindcss.com/docs/scroll-margin
2018
2017
  */
2019
2018
  "scroll-ms": [{
2020
- "scroll-ms": S()
2019
+ "scroll-ms": N()
2021
2020
  }],
2022
2021
  /**
2023
2022
  * Scroll Margin End
2024
2023
  * @see https://tailwindcss.com/docs/scroll-margin
2025
2024
  */
2026
2025
  "scroll-me": [{
2027
- "scroll-me": S()
2026
+ "scroll-me": N()
2028
2027
  }],
2029
2028
  /**
2030
2029
  * Scroll Margin Top
2031
2030
  * @see https://tailwindcss.com/docs/scroll-margin
2032
2031
  */
2033
2032
  "scroll-mt": [{
2034
- "scroll-mt": S()
2033
+ "scroll-mt": N()
2035
2034
  }],
2036
2035
  /**
2037
2036
  * Scroll Margin Right
2038
2037
  * @see https://tailwindcss.com/docs/scroll-margin
2039
2038
  */
2040
2039
  "scroll-mr": [{
2041
- "scroll-mr": S()
2040
+ "scroll-mr": N()
2042
2041
  }],
2043
2042
  /**
2044
2043
  * Scroll Margin Bottom
2045
2044
  * @see https://tailwindcss.com/docs/scroll-margin
2046
2045
  */
2047
2046
  "scroll-mb": [{
2048
- "scroll-mb": S()
2047
+ "scroll-mb": N()
2049
2048
  }],
2050
2049
  /**
2051
2050
  * Scroll Margin Left
2052
2051
  * @see https://tailwindcss.com/docs/scroll-margin
2053
2052
  */
2054
2053
  "scroll-ml": [{
2055
- "scroll-ml": S()
2054
+ "scroll-ml": N()
2056
2055
  }],
2057
2056
  /**
2058
2057
  * Scroll Padding
2059
2058
  * @see https://tailwindcss.com/docs/scroll-padding
2060
2059
  */
2061
2060
  "scroll-p": [{
2062
- "scroll-p": S()
2061
+ "scroll-p": N()
2063
2062
  }],
2064
2063
  /**
2065
2064
  * Scroll Padding X
2066
2065
  * @see https://tailwindcss.com/docs/scroll-padding
2067
2066
  */
2068
2067
  "scroll-px": [{
2069
- "scroll-px": S()
2068
+ "scroll-px": N()
2070
2069
  }],
2071
2070
  /**
2072
2071
  * Scroll Padding Y
2073
2072
  * @see https://tailwindcss.com/docs/scroll-padding
2074
2073
  */
2075
2074
  "scroll-py": [{
2076
- "scroll-py": S()
2075
+ "scroll-py": N()
2077
2076
  }],
2078
2077
  /**
2079
2078
  * Scroll Padding Start
2080
2079
  * @see https://tailwindcss.com/docs/scroll-padding
2081
2080
  */
2082
2081
  "scroll-ps": [{
2083
- "scroll-ps": S()
2082
+ "scroll-ps": N()
2084
2083
  }],
2085
2084
  /**
2086
2085
  * Scroll Padding End
2087
2086
  * @see https://tailwindcss.com/docs/scroll-padding
2088
2087
  */
2089
2088
  "scroll-pe": [{
2090
- "scroll-pe": S()
2089
+ "scroll-pe": N()
2091
2090
  }],
2092
2091
  /**
2093
2092
  * Scroll Padding Top
2094
2093
  * @see https://tailwindcss.com/docs/scroll-padding
2095
2094
  */
2096
2095
  "scroll-pt": [{
2097
- "scroll-pt": S()
2096
+ "scroll-pt": N()
2098
2097
  }],
2099
2098
  /**
2100
2099
  * Scroll Padding Right
2101
2100
  * @see https://tailwindcss.com/docs/scroll-padding
2102
2101
  */
2103
2102
  "scroll-pr": [{
2104
- "scroll-pr": S()
2103
+ "scroll-pr": N()
2105
2104
  }],
2106
2105
  /**
2107
2106
  * Scroll Padding Bottom
2108
2107
  * @see https://tailwindcss.com/docs/scroll-padding
2109
2108
  */
2110
2109
  "scroll-pb": [{
2111
- "scroll-pb": S()
2110
+ "scroll-pb": N()
2112
2111
  }],
2113
2112
  /**
2114
2113
  * Scroll Padding Left
2115
2114
  * @see https://tailwindcss.com/docs/scroll-padding
2116
2115
  */
2117
2116
  "scroll-pl": [{
2118
- "scroll-pl": S()
2117
+ "scroll-pl": N()
2119
2118
  }],
2120
2119
  /**
2121
2120
  * Scroll Snap Align
@@ -2198,7 +2197,7 @@ const R = (e) => {
2198
2197
  * @see https://tailwindcss.com/docs/stroke-width
2199
2198
  */
2200
2199
  "stroke-w": [{
2201
- stroke: [J, te, De]
2200
+ stroke: [q, ee, He]
2202
2201
  }],
2203
2202
  /**
2204
2203
  * Stroke
@@ -2273,21 +2272,21 @@ const R = (e) => {
2273
2272
  "font-size": ["leading"]
2274
2273
  }
2275
2274
  };
2276
- }, xn = /* @__PURE__ */ Ji(gn);
2277
- function E(...e) {
2278
- return xn(Ae(e));
2275
+ }, mn = /* @__PURE__ */ Yi(fn);
2276
+ function P(...e) {
2277
+ return mn(ze(e));
2279
2278
  }
2280
- let je;
2281
- function Pe() {
2282
- return je === void 0 && (je = navigator.platform.includes("Mac")), je;
2279
+ let De;
2280
+ function Oe() {
2281
+ return De === void 0 && (De = navigator.platform.includes("Mac")), De;
2283
2282
  }
2284
- function bn(e) {
2285
- return `${e}`.toLowerCase() === "mod" ? Pe() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Pe() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Pe() ? "⇧" : "Shift" : e;
2283
+ function gn(e) {
2284
+ return `${e}`.toLowerCase() === "mod" ? Oe() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Oe() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Oe() ? "⇧" : "Shift" : e;
2286
2285
  }
2287
- function vn(e) {
2288
- return e.map(bn).join(" ");
2286
+ function pn(e) {
2287
+ return e.map(gn).join(" ");
2289
2288
  }
2290
- const fe = ie.forwardRef(
2289
+ const he = re.forwardRef(
2291
2290
  (e, t) => {
2292
2291
  const {
2293
2292
  icon: r = void 0,
@@ -2301,44 +2300,44 @@ const fe = ie.forwardRef(
2301
2300
  tooltipOptions: c = {},
2302
2301
  action: d = void 0,
2303
2302
  isActive: f = void 0,
2304
- children: g,
2303
+ children: p,
2305
2304
  asChild: u = !1,
2306
- upload: v = !1,
2307
- initialDisplayedColor: p = void 0,
2305
+ upload: b = !1,
2306
+ initialDisplayedColor: g = void 0,
2308
2307
  dataState: k = !1,
2309
2308
  ...h
2310
- } = e, x = Rt[r], m = u ? vt : Vt, T = (b) => {
2309
+ } = e, x = zt[r], m = u ? bt : Lt, A = (v) => {
2311
2310
  if (o) {
2312
- b.preventDefault();
2311
+ v.preventDefault();
2313
2312
  return;
2314
2313
  }
2315
- d == null || d(b);
2314
+ d == null || d(v);
2316
2315
  };
2317
- return /* @__PURE__ */ y(Xn, { children: [
2318
- /* @__PURE__ */ n(Yn, { asChild: !0, children: /* @__PURE__ */ y(
2316
+ return /* @__PURE__ */ y($n, { children: [
2317
+ /* @__PURE__ */ n(Fn, { asChild: !0, children: /* @__PURE__ */ y(
2319
2318
  m,
2320
2319
  {
2321
- className: E("richtext-h-[32px] richtext-w-[32px]", a),
2320
+ className: P("richtext-h-[32px] richtext-w-[32px]", a),
2322
2321
  "data-state": k ? "on" : "off",
2323
2322
  disabled: o,
2324
- onClick: T,
2323
+ onClick: A,
2325
2324
  ref: t,
2326
2325
  size: "sm",
2327
2326
  ...h,
2328
2327
  children: [
2329
2328
  x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
2330
- g
2329
+ p
2331
2330
  ]
2332
2331
  }
2333
2332
  ) }),
2334
- i && /* @__PURE__ */ n(_t, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2333
+ i && /* @__PURE__ */ n(St, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2335
2334
  /* @__PURE__ */ n("div", { children: i }),
2336
- !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: vn(s) })
2335
+ !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: pn(s) })
2337
2336
  ] }) })
2338
2337
  ] });
2339
2338
  }
2340
2339
  );
2341
- function wn(e) {
2340
+ function xn(e) {
2342
2341
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2343
2342
  "path",
2344
2343
  {
@@ -2347,7 +2346,7 @@ function wn(e) {
2347
2346
  }
2348
2347
  ) });
2349
2348
  }
2350
- function yn(e) {
2349
+ function vn(e) {
2351
2350
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2352
2351
  "path",
2353
2352
  {
@@ -2360,7 +2359,7 @@ function yn(e) {
2360
2359
  }
2361
2360
  ) });
2362
2361
  }
2363
- function Cn() {
2362
+ function bn() {
2364
2363
  return /* @__PURE__ */ n(
2365
2364
  "svg",
2366
2365
  {
@@ -2387,7 +2386,7 @@ function Cn() {
2387
2386
  }
2388
2387
  );
2389
2388
  }
2390
- function kn() {
2389
+ function wn() {
2391
2390
  return /* @__PURE__ */ n(
2392
2391
  "svg",
2393
2392
  {
@@ -2414,7 +2413,7 @@ function kn() {
2414
2413
  }
2415
2414
  );
2416
2415
  }
2417
- function Mn(e) {
2416
+ function yn(e) {
2418
2417
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2419
2418
  "path",
2420
2419
  {
@@ -2423,8 +2422,8 @@ function Mn(e) {
2423
2422
  }
2424
2423
  ) });
2425
2424
  }
2426
- function Oe(e) {
2427
- const t = Rt[e.name];
2425
+ function Pe(e) {
2426
+ const t = zt[e.name];
2428
2427
  return t ? /* @__PURE__ */ n(
2429
2428
  t,
2430
2429
  {
@@ -2433,7 +2432,7 @@ function Oe(e) {
2433
2432
  }
2434
2433
  ) : null;
2435
2434
  }
2436
- function Nn(e) {
2435
+ function Cn(e) {
2437
2436
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2438
2437
  "path",
2439
2438
  {
@@ -2442,7 +2441,7 @@ function Nn(e) {
2442
2441
  }
2443
2442
  ) });
2444
2443
  }
2445
- function Tn(e) {
2444
+ function kn(e) {
2446
2445
  return /* @__PURE__ */ n(
2447
2446
  "svg",
2448
2447
  {
@@ -2467,10 +2466,10 @@ function Tn(e) {
2467
2466
  }
2468
2467
  );
2469
2468
  }
2470
- function Sn(e) {
2469
+ function Mn(e) {
2471
2470
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
2472
2471
  }
2473
- function zn(e) {
2472
+ function Tn(e) {
2474
2473
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2475
2474
  "path",
2476
2475
  {
@@ -2479,7 +2478,7 @@ function zn(e) {
2479
2478
  }
2480
2479
  ) });
2481
2480
  }
2482
- function In(e) {
2481
+ function An(e) {
2483
2482
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
2484
2483
  "path",
2485
2484
  {
@@ -2488,7 +2487,7 @@ function In(e) {
2488
2487
  }
2489
2488
  ) });
2490
2489
  }
2491
- function An() {
2490
+ function Nn() {
2492
2491
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2493
2492
  "path",
2494
2493
  {
@@ -2497,7 +2496,7 @@ function An() {
2497
2496
  }
2498
2497
  ) });
2499
2498
  }
2500
- function Ln() {
2499
+ function In() {
2501
2500
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2502
2501
  "path",
2503
2502
  {
@@ -2510,7 +2509,7 @@ function Ln() {
2510
2509
  }
2511
2510
  ) });
2512
2511
  }
2513
- function En() {
2512
+ function zn() {
2514
2513
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2515
2514
  "path",
2516
2515
  {
@@ -2523,7 +2522,7 @@ function En() {
2523
2522
  }
2524
2523
  ) });
2525
2524
  }
2526
- function Rn() {
2525
+ function Ln() {
2527
2526
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2528
2527
  "path",
2529
2528
  {
@@ -2536,7 +2535,7 @@ function Rn() {
2536
2535
  }
2537
2536
  ) });
2538
2537
  }
2539
- function Vn() {
2538
+ function Sn() {
2540
2539
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2541
2540
  "path",
2542
2541
  {
@@ -2545,7 +2544,7 @@ function Vn() {
2545
2544
  }
2546
2545
  ) });
2547
2546
  }
2548
- function Lt() {
2547
+ function Nt() {
2549
2548
  return /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2550
2549
  /* @__PURE__ */ n(
2551
2550
  "path",
@@ -2563,7 +2562,7 @@ function Lt() {
2563
2562
  )
2564
2563
  ] });
2565
2564
  }
2566
- function Et() {
2565
+ function It() {
2567
2566
  return /* @__PURE__ */ y(
2568
2567
  "svg",
2569
2568
  {
@@ -2591,7 +2590,7 @@ function Et() {
2591
2590
  }
2592
2591
  );
2593
2592
  }
2594
- function _n() {
2593
+ function En() {
2595
2594
  return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
2596
2595
  "path",
2597
2596
  {
@@ -2600,7 +2599,7 @@ function _n() {
2600
2599
  }
2601
2600
  ) });
2602
2601
  }
2603
- function Hn() {
2602
+ function Rn() {
2604
2603
  return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ y(
2605
2604
  "g",
2606
2605
  {
@@ -2616,7 +2615,7 @@ function Hn() {
2616
2615
  }
2617
2616
  ) });
2618
2617
  }
2619
- function Dn() {
2618
+ function Vn() {
2620
2619
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2621
2620
  "path",
2622
2621
  {
@@ -2625,7 +2624,7 @@ function Dn() {
2625
2624
  }
2626
2625
  ) });
2627
2626
  }
2628
- function jn() {
2627
+ function _n() {
2629
2628
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ y("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
2630
2629
  /* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
2631
2630
  /* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
@@ -2634,7 +2633,7 @@ function jn() {
2634
2633
  /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
2635
2634
  ] }) });
2636
2635
  }
2637
- function Pn() {
2636
+ function Hn() {
2638
2637
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2639
2638
  "path",
2640
2639
  {
@@ -2643,7 +2642,7 @@ function Pn() {
2643
2642
  }
2644
2643
  ) });
2645
2644
  }
2646
- function On() {
2645
+ function Dn() {
2647
2646
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2648
2647
  "path",
2649
2648
  {
@@ -2657,7 +2656,7 @@ function On() {
2657
2656
  }
2658
2657
  ) });
2659
2658
  }
2660
- function Bn() {
2659
+ function On() {
2661
2660
  return /* @__PURE__ */ n(
2662
2661
  "svg",
2663
2662
  {
@@ -2678,7 +2677,7 @@ function Bn() {
2678
2677
  }
2679
2678
  );
2680
2679
  }
2681
- function Un(e) {
2680
+ function Pn(e) {
2682
2681
  return /* @__PURE__ */ y(
2683
2682
  "svg",
2684
2683
  {
@@ -2698,131 +2697,131 @@ function Un(e) {
2698
2697
  }
2699
2698
  );
2700
2699
  }
2701
- const Rt = {
2702
- Bold: Ni,
2703
- LoaderCircle: Mi,
2704
- Italic: ki,
2705
- Underline: Ci,
2706
- Quote: yi,
2707
- TextQuote: yn,
2708
- Strikethrough: wi,
2709
- Minus: vi,
2710
- Eraser: bi,
2711
- PaintRoller: xi,
2712
- Redo2: gi,
2713
- Undo2: pi,
2714
- AlignCenter: ji,
2715
- AlignJustify: Di,
2716
- AlignLeft: Hi,
2717
- AlignRight: _i,
2718
- ChevronDown: Ze,
2719
- Subscript: mi,
2720
- Superscript: fi,
2721
- Code: hi,
2722
- Code2: ui,
2723
- Type: di,
2724
- IndentIncrease: ci,
2725
- IndentDecrease: li,
2726
- List: si,
2727
- ListOrdered: ai,
2728
- ListTodo: oi,
2729
- Link: ni,
2730
- ImageUp: ii,
2731
- Video: ri,
2732
- Maximize: ti,
2733
- Minimize: ei,
2734
- Table: Qr,
2735
- Sparkles: Kr,
2736
- Pencil: Jr,
2737
- Unlink: qr,
2738
- BetweenHorizonalEnd: Zr,
2739
- BetweenHorizonalStart: Yr,
2740
- BetweenVerticalStart: Xr,
2741
- BetweenVerticalEnd: Gr,
2742
- TableCellsMerge: Wr,
2743
- TableCellsSplit: Fr,
2744
- Trash2: $r,
2745
- Trash: Ur,
2746
- Replace: at,
2747
- ChevronsUpDown: Br,
2748
- LineHeight: Nn,
2749
- Word: Mn,
2750
- HeadingParagraph: Or,
2751
- Heading1: Pr,
2752
- Heading2: jr,
2753
- Heading3: Dr,
2754
- Heading4: Hr,
2755
- Heading5: _r,
2756
- Heading6: Vr,
2757
- Columns2: st,
2758
- Columns3: Rr,
2759
- Columns4: Er,
2760
- Plus: Lr,
2761
- Grip: Ar,
2762
- Copy: Ir,
2763
- Clipboard: zr,
2764
- PanelLeft: Sr,
2765
- PanelRight: Tr,
2766
- Columns: st,
2767
- Iframe: Nr,
2768
- MenuDown: Tn,
2769
- SizeS: In,
2770
- SizeM: zn,
2771
- SizeL: Sn,
2772
- AspectRatio: wn,
2773
- Emoji: Mr,
2774
- DeleteColumn: Cn,
2775
- DeleteRow: kn,
2776
- SearchAndReplace: at,
2777
- EmojiIcon: kr,
2778
- KatexIcon: Cr,
2779
- ExportPdf: Lt,
2780
- ExportWord: Et,
2781
- ImportWord: Bn,
2782
- ColumnAddLeft: Ln,
2783
- ColumnAddRight: En,
2784
- BookMarked: yr,
2785
- Excalidraw: Vn,
2786
- ZoomIn: wr,
2787
- ZoomOut: vr,
2788
- Settings: br,
2789
- Eye: xr,
2790
- TextDirection: Rn,
2791
- LeftToRight: Dn,
2792
- RightToLeft: Pn,
2793
- Attachment: gr,
2794
- AttachmentDownload: pr,
2795
- GifIcon: _n,
2796
- ChevronUp: kt,
2797
- Crop: mr,
2798
- Mermaid: jn,
2799
- Twitter: On,
2800
- CodeView: An,
2801
- FlipX: fr,
2802
- FlipY: hr,
2803
- PencilRuler: ur,
2804
- WrapText: dr,
2805
- Loader: cr,
2806
- X: Ct,
2807
- Html: Hn,
2808
- ExternalLink: lr,
2809
- Callout: sr,
2810
- PaywallIcon: Un
2811
- }, ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ft = Ae, Je = (e, t) => (r) => {
2700
+ const zt = {
2701
+ Bold: xi,
2702
+ LoaderCircle: pi,
2703
+ Italic: gi,
2704
+ Underline: mi,
2705
+ Quote: fi,
2706
+ TextQuote: vn,
2707
+ Strikethrough: hi,
2708
+ Minus: ui,
2709
+ Eraser: di,
2710
+ PaintRoller: ci,
2711
+ Redo2: li,
2712
+ Undo2: si,
2713
+ AlignCenter: _i,
2714
+ AlignJustify: Vi,
2715
+ AlignLeft: Ri,
2716
+ AlignRight: Ei,
2717
+ ChevronDown: ai,
2718
+ Subscript: oi,
2719
+ Superscript: ni,
2720
+ Code: ii,
2721
+ Code2: ri,
2722
+ Type: ti,
2723
+ IndentIncrease: ei,
2724
+ IndentDecrease: Qr,
2725
+ List: Kr,
2726
+ ListOrdered: Jr,
2727
+ ListTodo: qr,
2728
+ Link: Zr,
2729
+ ImageUp: Yr,
2730
+ Video: Xr,
2731
+ Maximize: Gr,
2732
+ Minimize: Wr,
2733
+ Table: Fr,
2734
+ Sparkles: $r,
2735
+ Pencil: Ur,
2736
+ Unlink: Br,
2737
+ BetweenHorizonalEnd: jr,
2738
+ BetweenHorizonalStart: Pr,
2739
+ BetweenVerticalStart: Or,
2740
+ BetweenVerticalEnd: Dr,
2741
+ TableCellsMerge: Hr,
2742
+ TableCellsSplit: _r,
2743
+ Trash2: Vr,
2744
+ Trash: Rr,
2745
+ Replace: nt,
2746
+ ChevronsUpDown: Er,
2747
+ LineHeight: Cn,
2748
+ Word: yn,
2749
+ HeadingParagraph: Sr,
2750
+ Heading1: Lr,
2751
+ Heading2: zr,
2752
+ Heading3: Ir,
2753
+ Heading4: Nr,
2754
+ Heading5: Ar,
2755
+ Heading6: Tr,
2756
+ Columns2: ot,
2757
+ Columns3: Mr,
2758
+ Columns4: kr,
2759
+ Plus: Cr,
2760
+ Grip: yr,
2761
+ Copy: wr,
2762
+ Clipboard: br,
2763
+ PanelLeft: vr,
2764
+ PanelRight: xr,
2765
+ Columns: ot,
2766
+ Iframe: pr,
2767
+ MenuDown: kn,
2768
+ SizeS: An,
2769
+ SizeM: Tn,
2770
+ SizeL: Mn,
2771
+ AspectRatio: xn,
2772
+ Emoji: gr,
2773
+ DeleteColumn: bn,
2774
+ DeleteRow: wn,
2775
+ SearchAndReplace: nt,
2776
+ EmojiIcon: mr,
2777
+ KatexIcon: fr,
2778
+ ExportPdf: Nt,
2779
+ ExportWord: It,
2780
+ ImportWord: On,
2781
+ ColumnAddLeft: In,
2782
+ ColumnAddRight: zn,
2783
+ BookMarked: hr,
2784
+ Excalidraw: Sn,
2785
+ ZoomIn: ur,
2786
+ ZoomOut: dr,
2787
+ Settings: cr,
2788
+ Eye: lr,
2789
+ TextDirection: Ln,
2790
+ LeftToRight: Vn,
2791
+ RightToLeft: Hn,
2792
+ Attachment: sr,
2793
+ AttachmentDownload: ar,
2794
+ GifIcon: En,
2795
+ ChevronUp: or,
2796
+ Crop: nr,
2797
+ Mermaid: _n,
2798
+ Twitter: Dn,
2799
+ CodeView: Nn,
2800
+ FlipX: ir,
2801
+ FlipY: rr,
2802
+ PencilRuler: tr,
2803
+ WrapText: er,
2804
+ Loader: Qt,
2805
+ X: xt,
2806
+ Html: Rn,
2807
+ ExternalLink: Kt,
2808
+ Callout: Jt,
2809
+ PaywallIcon: Pn
2810
+ }, dt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ut = ze, Ze = (e, t) => (r) => {
2812
2811
  var i;
2813
- if ((t == null ? void 0 : t.variants) == null) return ft(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2812
+ if ((t == null ? void 0 : t.variants) == null) return ut(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2814
2813
  const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
2815
- const f = r == null ? void 0 : r[d], g = a == null ? void 0 : a[d];
2814
+ const f = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
2816
2815
  if (f === null) return null;
2817
- const u = ht(f) || ht(g);
2816
+ const u = dt(f) || dt(p);
2818
2817
  return o[d][u];
2819
2818
  }), s = r && Object.entries(r).reduce((d, f) => {
2820
- let [g, u] = f;
2821
- return u === void 0 || (d[g] = u), d;
2819
+ let [p, u] = f;
2820
+ return u === void 0 || (d[p] = u), d;
2822
2821
  }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, f) => {
2823
- let { class: g, className: u, ...v } = f;
2824
- return Object.entries(v).every((p) => {
2825
- let [k, h] = p;
2822
+ let { class: p, className: u, ...b } = f;
2823
+ return Object.entries(b).every((g) => {
2824
+ let [k, h] = g;
2826
2825
  return Array.isArray(h) ? h.includes({
2827
2826
  ...a,
2828
2827
  ...s
@@ -2832,12 +2831,12 @@ const Rt = {
2832
2831
  }[k] === h;
2833
2832
  }) ? [
2834
2833
  ...d,
2835
- g,
2834
+ p,
2836
2835
  u
2837
2836
  ] : d;
2838
2837
  }, []);
2839
- return ft(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2840
- }, $n = Je(
2838
+ return ut(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2839
+ }, jn = Ze(
2841
2840
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
2842
2841
  {
2843
2842
  variants: {
@@ -2861,17 +2860,17 @@ const Rt = {
2861
2860
  size: "default"
2862
2861
  }
2863
2862
  }
2864
- ), X = _.forwardRef(
2865
- ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? vt : "button", { className: E($n({ variant: t, size: r, className: e })), ref: a, ...o })
2863
+ ), G = U.forwardRef(
2864
+ ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? bt : "button", { className: P(jn({ variant: t, size: r, className: e })), ref: a, ...o })
2866
2865
  );
2867
- X.displayName = "Button";
2868
- const ae = _.forwardRef(
2866
+ G.displayName = "Button";
2867
+ const oe = U.forwardRef(
2869
2868
  ({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
2870
2869
  "input",
2871
2870
  {
2872
2871
  ref: i,
2873
2872
  type: t,
2874
- className: E(
2873
+ className: P(
2875
2874
  "richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
2876
2875
  e
2877
2876
  ),
@@ -2879,62 +2878,48 @@ const ae = _.forwardRef(
2879
2878
  }
2880
2879
  )
2881
2880
  );
2882
- ae.displayName = "Input";
2883
- const Fn = Je(
2881
+ oe.displayName = "Input";
2882
+ const Bn = Ze(
2884
2883
  "richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
2885
- ), ke = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(yt.Root, { className: E(Fn(), e), ref: r, ...t }));
2886
- ke.displayName = yt.Root.displayName;
2887
- const _e = se.Root, Ne = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2888
- se.List,
2884
+ ), Ce = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(yt.Root, { className: P(Bn(), e), ref: r, ...t }));
2885
+ Ce.displayName = yt.Root.displayName;
2886
+ const Ve = ae.Root, Me = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2887
+ ae.List,
2889
2888
  {
2890
2889
  ref: r,
2891
- className: E(
2890
+ className: P(
2892
2891
  "richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",
2893
2892
  e
2894
2893
  ),
2895
2894
  ...t
2896
2895
  }
2897
2896
  ));
2898
- Ne.displayName = se.List.displayName;
2899
- const K = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2900
- se.Trigger,
2897
+ Me.displayName = ae.List.displayName;
2898
+ const J = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2899
+ ae.Trigger,
2901
2900
  {
2902
2901
  ref: r,
2903
- className: E(
2902
+ className: P(
2904
2903
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",
2905
2904
  e
2906
2905
  ),
2907
2906
  ...t
2908
2907
  }
2909
2908
  ));
2910
- K.displayName = se.Trigger.displayName;
2911
- const Q = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2912
- se.Content,
2909
+ J.displayName = ae.Trigger.displayName;
2910
+ const K = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2911
+ ae.Content,
2913
2912
  {
2914
2913
  ref: r,
2915
- className: E(
2914
+ className: P(
2916
2915
  "richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",
2917
2916
  e
2918
2917
  ),
2919
2918
  ...t
2920
2919
  }
2921
2920
  ));
2922
- Q.displayName = se.Content.displayName;
2923
- const Wn = _.forwardRef(
2924
- ({ className: e, ...t }, r) => /* @__PURE__ */ n(
2925
- "textarea",
2926
- {
2927
- ref: r,
2928
- className: E(
2929
- "richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
2930
- e
2931
- ),
2932
- ...t
2933
- }
2934
- )
2935
- );
2936
- Wn.displayName = "Textarea";
2937
- const Gn = Je(
2921
+ K.displayName = ae.Content.displayName;
2922
+ const Un = Ze(
2938
2923
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
2939
2924
  {
2940
2925
  variants: {
@@ -2953,160 +2938,52 @@ const Gn = Je(
2953
2938
  size: "default"
2954
2939
  }
2955
2940
  }
2956
- ), Vt = _.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2957
- Nt.Root,
2941
+ ), Lt = U.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2942
+ wt.Root,
2958
2943
  {
2959
2944
  ref: o,
2960
- className: E(Gn({ variant: t, size: r, className: e })),
2945
+ className: P(Un({ variant: t, size: r, className: e })),
2961
2946
  ...i
2962
2947
  }
2963
2948
  ));
2964
- Vt.displayName = Nt.Root.displayName;
2965
- const _a = Me.Provider, Xn = Me.Root, Yn = Me.Trigger, _t = _.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2966
- Me.Content,
2949
+ Lt.displayName = wt.Root.displayName;
2950
+ const Aa = ke.Provider, $n = ke.Root, Fn = ke.Trigger, St = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2951
+ ke.Content,
2967
2952
  {
2968
2953
  "data-richtext-portal": !0,
2969
2954
  ref: i,
2970
2955
  sideOffset: t,
2971
- className: E(
2956
+ className: P(
2972
2957
  "richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
2973
2958
  e
2974
2959
  ),
2975
2960
  ...r
2976
2961
  }
2977
2962
  ));
2978
- _t.displayName = Me.Content.displayName;
2979
- const Ha = D.Root, Da = D.Value, Zn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
2980
- D.Trigger,
2981
- {
2982
- ref: i,
2983
- className: E(
2984
- "richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",
2985
- e
2986
- ),
2987
- ...r,
2988
- children: [
2989
- t,
2990
- /* @__PURE__ */ n(D.Icon, { asChild: !0, children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4 richtext-opacity-50" }) })
2991
- ]
2992
- }
2993
- ));
2994
- Zn.displayName = D.Trigger.displayName;
2995
- const Ht = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2996
- D.ScrollUpButton,
2997
- {
2998
- ref: r,
2999
- className: E(
3000
- "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
3001
- e
3002
- ),
3003
- ...t,
3004
- children: /* @__PURE__ */ n(kt, { className: "richtext-size-4" })
3005
- }
3006
- ));
3007
- Ht.displayName = D.ScrollUpButton.displayName;
3008
- const Dt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3009
- D.ScrollDownButton,
3010
- {
3011
- ref: r,
3012
- className: E(
3013
- "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
3014
- e
3015
- ),
3016
- ...t,
3017
- children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4" })
3018
- }
3019
- ));
3020
- Dt.displayName = D.ScrollDownButton.displayName;
3021
- const qn = _.forwardRef(({ className: e, children: t, position: r = "popper", ...i }, o) => /* @__PURE__ */ n(D.Portal, { children: /* @__PURE__ */ y(
3022
- D.Content,
3023
- {
3024
- "data-richtext-portal": !0,
3025
- position: r,
3026
- ref: o,
3027
- className: E(
3028
- "richtext-relative richtext-z-50 richtext-max-h-60 richtext-min-w-[8rem] richtext-overflow-hidden richtext-overflow-y-auto richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
3029
- r === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
3030
- e
3031
- ),
3032
- ...i,
3033
- children: [
3034
- /* @__PURE__ */ n(Ht, {}),
3035
- /* @__PURE__ */ n(
3036
- D.Viewport,
3037
- {
3038
- className: E(
3039
- "richtext-p-1",
3040
- r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
3041
- ),
3042
- children: t
3043
- }
3044
- ),
3045
- /* @__PURE__ */ n(Dt, {})
3046
- ]
3047
- }
3048
- ) }));
3049
- qn.displayName = D.Content.displayName;
3050
- const Jn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3051
- D.Label,
3052
- {
3053
- className: E(
3054
- "richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",
3055
- e
3056
- ),
3057
- ref: r,
3058
- ...t
3059
- }
3060
- ));
3061
- Jn.displayName = D.Label.displayName;
3062
- const Kn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
3063
- D.Item,
3064
- {
3065
- ref: i,
3066
- className: E(
3067
- "richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
3068
- e
3069
- ),
3070
- ...r,
3071
- children: [
3072
- /* @__PURE__ */ n("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ n(D.ItemIndicator, { children: /* @__PURE__ */ n(Mt, { className: "richtext-size-4" }) }) }),
3073
- /* @__PURE__ */ n(D.ItemText, { children: t })
3074
- ]
3075
- }
3076
- ));
3077
- Kn.displayName = D.Item.displayName;
3078
- const Qn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3079
- D.Separator,
3080
- {
3081
- className: E("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
3082
- ref: r,
3083
- ...t
3084
- }
3085
- ));
3086
- Qn.displayName = D.Separator.displayName;
3087
- const eo = 1, to = 1e6;
3088
- let Be = 0;
3089
- function ro() {
3090
- return Be = (Be + 1) % Number.MAX_SAFE_INTEGER, Be.toString();
2963
+ St.displayName = ke.Content.displayName;
2964
+ const Wn = 1, Gn = 1e6;
2965
+ let je = 0;
2966
+ function Xn() {
2967
+ return je = (je + 1) % Number.MAX_SAFE_INTEGER, je.toString();
3091
2968
  }
3092
- const Ue = /* @__PURE__ */ new Map();
3093
- function mt(e) {
3094
- if (Ue.has(e))
2969
+ const Be = /* @__PURE__ */ new Map();
2970
+ function ht(e) {
2971
+ if (Be.has(e))
3095
2972
  return;
3096
2973
  const t = setTimeout(() => {
3097
- Ue.delete(e), ye({
2974
+ Be.delete(e), we({
3098
2975
  type: "REMOVE_TOAST",
3099
2976
  toastId: e
3100
2977
  });
3101
- }, to);
3102
- Ue.set(e, t);
2978
+ }, Gn);
2979
+ Be.set(e, t);
3103
2980
  }
3104
- function io(e, t) {
2981
+ function Yn(e, t) {
3105
2982
  switch (t.type) {
3106
2983
  case "ADD_TOAST":
3107
2984
  return {
3108
2985
  ...e,
3109
- toasts: [t.toast, ...e.toasts].slice(0, eo)
2986
+ toasts: [t.toast, ...e.toasts].slice(0, Wn)
3110
2987
  };
3111
2988
  case "UPDATE_TOAST":
3112
2989
  return {
@@ -3115,8 +2992,8 @@ function io(e, t) {
3115
2992
  };
3116
2993
  case "DISMISS_TOAST": {
3117
2994
  const { toastId: r } = t;
3118
- return r ? mt(r) : e.toasts.forEach((i) => {
3119
- mt(i.id);
2995
+ return r ? ht(r) : e.toasts.forEach((i) => {
2996
+ ht(i.id);
3120
2997
  }), {
3121
2998
  ...e,
3122
2999
  toasts: e.toasts.map(
@@ -3137,19 +3014,19 @@ function io(e, t) {
3137
3014
  };
3138
3015
  }
3139
3016
  }
3140
- const Se = [];
3141
- let ze = { toasts: [] };
3142
- function ye(e) {
3143
- ze = io(ze, e), Se.forEach((t) => {
3144
- t(ze);
3017
+ const Ae = [];
3018
+ let Ne = { toasts: [] };
3019
+ function we(e) {
3020
+ Ne = Yn(Ne, e), Ae.forEach((t) => {
3021
+ t(Ne);
3145
3022
  });
3146
3023
  }
3147
- function no({ ...e }) {
3148
- const t = ro(), r = (o) => ye({
3024
+ function Zn({ ...e }) {
3025
+ const t = Xn(), r = (o) => we({
3149
3026
  type: "UPDATE_TOAST",
3150
3027
  toast: { ...o, id: t }
3151
- }), i = () => ye({ type: "DISMISS_TOAST", toastId: t });
3152
- return ye({
3028
+ }), i = () => we({ type: "DISMISS_TOAST", toastId: t });
3029
+ return we({
3153
3030
  type: "ADD_TOAST",
3154
3031
  toast: {
3155
3032
  ...e,
@@ -3165,39 +3042,39 @@ function no({ ...e }) {
3165
3042
  update: r
3166
3043
  };
3167
3044
  }
3168
- function Ke() {
3169
- const [e, t] = _.useState(ze);
3170
- return _.useEffect(() => (Se.push(t), () => {
3171
- const r = Se.indexOf(t);
3172
- r > -1 && Se.splice(r, 1);
3045
+ function qe() {
3046
+ const [e, t] = U.useState(Ne);
3047
+ return U.useEffect(() => (Ae.push(t), () => {
3048
+ const r = Ae.indexOf(t);
3049
+ r > -1 && Ae.splice(r, 1);
3173
3050
  }), [e]), {
3174
3051
  ...e,
3175
- toast: no,
3176
- dismiss: (r) => ye({ type: "DISMISS_TOAST", toastId: r })
3052
+ toast: Zn,
3053
+ dismiss: (r) => we({ type: "DISMISS_TOAST", toastId: r })
3177
3054
  };
3178
3055
  }
3179
- const Qe = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3180
- Fe.Root,
3056
+ const Je = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3057
+ $e.Root,
3181
3058
  {
3182
3059
  ref: r,
3183
- className: E(
3060
+ className: P(
3184
3061
  "!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
3185
3062
  e
3186
3063
  ),
3187
3064
  ...t,
3188
3065
  children: /* @__PURE__ */ n(
3189
- Fe.Indicator,
3066
+ $e.Indicator,
3190
3067
  {
3191
- className: E(
3068
+ className: P(
3192
3069
  "!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
3193
3070
  ),
3194
- children: /* @__PURE__ */ n(Mt, { className: "!richtext-h-4 !richtext-w-4" })
3071
+ children: /* @__PURE__ */ n(vi, { className: "!richtext-h-4 !richtext-w-4" })
3195
3072
  }
3196
3073
  )
3197
3074
  }
3198
3075
  ));
3199
- Qe.displayName = Fe.Root.displayName;
3200
- function oo(e) {
3076
+ Je.displayName = $e.Root.displayName;
3077
+ function qn(e) {
3201
3078
  return e = e || /* @__PURE__ */ new Map(), {
3202
3079
  /**
3203
3080
  * A Map of event names to registered handler functions.
@@ -3244,57 +3121,57 @@ function oo(e) {
3244
3121
  }
3245
3122
  };
3246
3123
  }
3247
- const et = oo(), jt = ie.createContext(et), ao = () => ie.useContext(jt);
3248
- function tt(e, t) {
3249
- const r = ao();
3250
- ie.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3124
+ const Ke = qn(), Et = re.createContext(Ke), Jn = () => re.useContext(Et);
3125
+ function Qe(e, t) {
3126
+ const r = Jn();
3127
+ re.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3251
3128
  t.map((i) => r.off(i, e));
3252
3129
  }), [r, t, e]);
3253
3130
  }
3254
- const so = et.emit;
3255
- function ja({ children: e }) {
3256
- return /* @__PURE__ */ n(jt.Provider, { value: et, children: e });
3131
+ const Kn = Ke.emit;
3132
+ function Na({ children: e }) {
3133
+ return /* @__PURE__ */ n(Et.Provider, { value: Ke, children: e });
3257
3134
  }
3258
- const ge = Z.Root, rt = Z.Trigger, lo = Z.Portal, Pt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3259
- Z.Overlay,
3135
+ const ge = Y.Root, et = Y.Trigger, Qn = Y.Portal, Rt = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3136
+ Y.Overlay,
3260
3137
  {
3261
3138
  ref: r,
3262
- className: E(
3139
+ className: P(
3263
3140
  "richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
3264
3141
  e
3265
3142
  ),
3266
3143
  ...t
3267
3144
  }
3268
3145
  ));
3269
- Pt.displayName = Z.Overlay.displayName;
3270
- const le = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(lo, { "data-richtext-portal": !0, children: [
3271
- /* @__PURE__ */ n(Pt, {}),
3146
+ Rt.displayName = Y.Overlay.displayName;
3147
+ const se = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(Qn, { "data-richtext-portal": !0, children: [
3148
+ /* @__PURE__ */ n(Rt, {}),
3272
3149
  /* @__PURE__ */ y(
3273
- Z.Content,
3150
+ Y.Content,
3274
3151
  {
3275
3152
  "data-richtext-portal": !0,
3276
3153
  ref: i,
3277
- className: E(
3154
+ className: P(
3278
3155
  "richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
3279
3156
  e
3280
3157
  ),
3281
3158
  ...r,
3282
3159
  children: [
3283
3160
  t,
3284
- /* @__PURE__ */ y(Z.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
3285
- /* @__PURE__ */ n(Ct, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3161
+ /* @__PURE__ */ y(Y.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
3162
+ /* @__PURE__ */ n(xt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3286
3163
  /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3287
3164
  ] })
3288
3165
  ]
3289
3166
  }
3290
3167
  )
3291
3168
  ] }));
3292
- le.displayName = Z.Content.displayName;
3293
- function co({ className: e, ...t }) {
3169
+ se.displayName = Y.Content.displayName;
3170
+ function eo({ className: e, ...t }) {
3294
3171
  return /* @__PURE__ */ n(
3295
3172
  "div",
3296
3173
  {
3297
- className: E(
3174
+ className: P(
3298
3175
  "richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
3299
3176
  e
3300
3177
  ),
@@ -3302,12 +3179,12 @@ function co({ className: e, ...t }) {
3302
3179
  }
3303
3180
  );
3304
3181
  }
3305
- co.displayName = "DialogHeader";
3306
- function Ot({ className: e, ...t }) {
3182
+ eo.displayName = "DialogHeader";
3183
+ function Vt({ className: e, ...t }) {
3307
3184
  return /* @__PURE__ */ n(
3308
3185
  "div",
3309
3186
  {
3310
- className: E(
3187
+ className: P(
3311
3188
  "richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
3312
3189
  e
3313
3190
  ),
@@ -3315,29 +3192,29 @@ function Ot({ className: e, ...t }) {
3315
3192
  }
3316
3193
  );
3317
3194
  }
3318
- Ot.displayName = "DialogFooter";
3319
- const ce = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3320
- Z.Title,
3195
+ Vt.displayName = "DialogFooter";
3196
+ const le = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3197
+ Y.Title,
3321
3198
  {
3322
3199
  ref: r,
3323
- className: E(
3200
+ className: P(
3324
3201
  "richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
3325
3202
  e
3326
3203
  ),
3327
3204
  ...t
3328
3205
  }
3329
3206
  ));
3330
- ce.displayName = Z.Title.displayName;
3331
- const uo = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3332
- Z.Description,
3207
+ le.displayName = Y.Title.displayName;
3208
+ const to = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3209
+ Y.Description,
3333
3210
  {
3334
- className: E("richtext-text-sm richtext-text-muted-foreground", e),
3211
+ className: P("richtext-text-sm richtext-text-muted-foreground", e),
3335
3212
  ref: r,
3336
3213
  ...t
3337
3214
  }
3338
3215
  ));
3339
- uo.displayName = Z.Description.displayName;
3340
- const ho = {
3216
+ to.displayName = Y.Description.displayName;
3217
+ const ro = {
3341
3218
  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>',
3342
3219
  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>',
3343
3220
  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>',
@@ -3365,19 +3242,19 @@ const ho = {
3365
3242
  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>',
3366
3243
  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>'
3367
3244
  };
3368
- function fo(e) {
3245
+ function io(e) {
3369
3246
  return e.replace(/^.*\/|\..+$/g, "");
3370
3247
  }
3371
- function mo(e) {
3248
+ function no(e) {
3372
3249
  return e.split(".").pop();
3373
3250
  }
3374
- function Bt(e) {
3251
+ function _t(e) {
3375
3252
  return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
3376
3253
  }
3377
- function po(e) {
3254
+ function oo(e) {
3378
3255
  return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
3379
3256
  }
3380
- function go(e) {
3257
+ function ao(e) {
3381
3258
  return new Promise((t) => {
3382
3259
  const r = new FileReader();
3383
3260
  r.addEventListener(
@@ -3392,7 +3269,7 @@ function go(e) {
3392
3269
  ), r.readAsDataURL(e);
3393
3270
  });
3394
3271
  }
3395
- function xo(e, t) {
3272
+ function so(e, t) {
3396
3273
  const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
3397
3274
  let a = o.length;
3398
3275
  const l = new Uint8Array(a);
@@ -3400,8 +3277,8 @@ function xo(e, t) {
3400
3277
  l[a] = o.charCodeAt(a);
3401
3278
  return new File([l], t, { type: i });
3402
3279
  }
3403
- function bo(e) {
3404
- const t = ho[e], o = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, a = [
3280
+ function lo(e) {
3281
+ const t = ro[e], o = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, a = [
3405
3282
  "svg",
3406
3283
  {
3407
3284
  ...Array.from(o.attributes).reduce((l, s) => (l[s.name] = s.value, l), {})
@@ -3417,92 +3294,92 @@ function bo(e) {
3417
3294
  }
3418
3295
  }), a;
3419
3296
  }
3420
- const vo = {
3421
- audio: /* @__PURE__ */ n(Li, {}),
3422
- video: /* @__PURE__ */ n(Ai, {}),
3423
- file: /* @__PURE__ */ n(Ii, {}),
3424
- image: /* @__PURE__ */ n(zi, {}),
3425
- pdf: /* @__PURE__ */ n(Lt, {}),
3426
- word: /* @__PURE__ */ n(Et, {}),
3427
- excel: /* @__PURE__ */ n(Si, {}),
3428
- ppt: /* @__PURE__ */ n(Ti, {})
3297
+ const co = {
3298
+ audio: /* @__PURE__ */ n(Mi, {}),
3299
+ video: /* @__PURE__ */ n(ki, {}),
3300
+ file: /* @__PURE__ */ n(Ci, {}),
3301
+ image: /* @__PURE__ */ n(yi, {}),
3302
+ pdf: /* @__PURE__ */ n(Nt, {}),
3303
+ word: /* @__PURE__ */ n(It, {}),
3304
+ excel: /* @__PURE__ */ n(wi, {}),
3305
+ ppt: /* @__PURE__ */ n(bi, {})
3429
3306
  };
3430
- function Ut(e, t = !1) {
3431
- const r = po(e), i = vo[r] || /* @__PURE__ */ n(q, {});
3432
- return t ? bo(r) : i;
3307
+ function Ht(e, t = !1) {
3308
+ const r = oo(e), i = co[r] || /* @__PURE__ */ n(Z, {});
3309
+ return t ? lo(r) : i;
3433
3310
  }
3434
- const wo = "_card_1is0r_64", yo = "_downloadBtn_1is0r_82", Co = "_cardLeft_1is0r_88", ko = "_iconWrap_1is0r_97", Mo = "_fileInfo_1is0r_116", No = "_fileName_1is0r_123", To = "_fileSize_1is0r_133", So = "_cardPreview_1is0r_145", zo = "_actions_1is0r_221", Io = "_cardError_1is0r_236", Ao = "_errorText_1is0r_240", Y = {
3435
- card: wo,
3436
- downloadBtn: yo,
3437
- cardLeft: Co,
3438
- iconWrap: ko,
3439
- fileInfo: Mo,
3440
- fileName: No,
3441
- fileSize: To,
3442
- cardPreview: So,
3443
- actions: zo,
3444
- cardError: Io,
3445
- errorText: Ao
3311
+ const uo = "_card_1is0r_64", ho = "_downloadBtn_1is0r_82", fo = "_cardLeft_1is0r_88", mo = "_iconWrap_1is0r_97", go = "_fileInfo_1is0r_116", po = "_fileName_1is0r_123", xo = "_fileSize_1is0r_133", vo = "_cardPreview_1is0r_145", bo = "_actions_1is0r_221", wo = "_cardError_1is0r_236", yo = "_errorText_1is0r_240", X = {
3312
+ card: uo,
3313
+ downloadBtn: ho,
3314
+ cardLeft: fo,
3315
+ iconWrap: mo,
3316
+ fileInfo: go,
3317
+ fileName: po,
3318
+ fileSize: xo,
3319
+ cardPreview: vo,
3320
+ actions: bo,
3321
+ cardError: wo,
3322
+ errorText: yo
3446
3323
  };
3447
- function Lo({
3324
+ function Co({
3448
3325
  editor: e,
3449
3326
  node: t,
3450
3327
  deleteNode: r,
3451
3328
  extension: i
3452
3329
  }) {
3453
3330
  var k;
3454
- const o = (e == null ? void 0 : e.isEditable) ?? !1, { fileName: a, fileSize: l, fileExt: s, fileType: c, id: d, error: f } = t.attrs, { t: g } = ne(), u = (k = i == null ? void 0 : i.options) == null ? void 0 : k.onDownload, v = oe(() => r(), [r]), p = oe(() => {
3331
+ const o = (e == null ? void 0 : e.isEditable) ?? !1, { fileName: a, fileSize: l, fileExt: s, fileType: c, id: d, error: f } = t.attrs, { t: p } = ie(), u = (k = i == null ? void 0 : i.options) == null ? void 0 : k.onDownload, b = ne(() => r(), [r]), g = ne(() => {
3455
3332
  !d || !u || u({ id: d, fileName: a, fileExt: s, fileType: c, fileSize: l });
3456
3333
  }, [d, a, s, c, l, u]);
3457
- return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className: Ae(Y.card, Y.cardError, "render-wrapper"), children: /* @__PURE__ */ n("p", { className: Y.errorText, children: f }) }) }) : d ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(
3334
+ return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className: ze(X.card, X.cardError, "render-wrapper"), children: /* @__PURE__ */ n("p", { className: X.errorText, children: f }) }) }) : d ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(
3458
3335
  "div",
3459
3336
  {
3460
- className: Ae(Y.card, "render-wrapper", {
3461
- [Y.cardPreview]: !o
3337
+ className: ze(X.card, "render-wrapper", {
3338
+ [X.cardPreview]: !o
3462
3339
  }),
3463
3340
  children: [
3464
- /* @__PURE__ */ y("div", { className: Y.cardLeft, children: [
3465
- /* @__PURE__ */ n("div", { className: Y.iconWrap, children: Ut(c) }),
3466
- /* @__PURE__ */ y("div", { className: Y.fileInfo, children: [
3467
- /* @__PURE__ */ y("span", { className: Y.fileName, children: [
3341
+ /* @__PURE__ */ y("div", { className: X.cardLeft, children: [
3342
+ /* @__PURE__ */ n("div", { className: X.iconWrap, children: Ht(c) }),
3343
+ /* @__PURE__ */ y("div", { className: X.fileInfo, children: [
3344
+ /* @__PURE__ */ y("span", { className: X.fileName, children: [
3468
3345
  a,
3469
3346
  ".",
3470
3347
  s
3471
3348
  ] }),
3472
- /* @__PURE__ */ n("span", { className: Y.fileSize, children: Bt(l) })
3349
+ /* @__PURE__ */ n("span", { className: X.fileSize, children: _t(l) })
3473
3350
  ] })
3474
3351
  ] }),
3475
- /* @__PURE__ */ y("div", { className: Y.actions, children: [
3352
+ /* @__PURE__ */ y("div", { className: X.actions, children: [
3476
3353
  u && /* @__PURE__ */ n(
3477
- fe,
3354
+ he,
3478
3355
  {
3479
- action: p,
3356
+ action: g,
3480
3357
  icon: "AttachmentDownload",
3481
- tooltip: g("editor.attachment.download"),
3482
- customClass: o ? void 0 : Y.downloadBtn
3358
+ tooltip: p("editor.attachment.download"),
3359
+ customClass: o ? void 0 : X.downloadBtn
3483
3360
  }
3484
3361
  ),
3485
3362
  o && /* @__PURE__ */ n(
3486
- fe,
3363
+ he,
3487
3364
  {
3488
- action: v,
3365
+ action: b,
3489
3366
  icon: "Trash2",
3490
- tooltip: g("editor.delete")
3367
+ tooltip: p("editor.delete")
3491
3368
  }
3492
3369
  )
3493
3370
  ] })
3494
3371
  ]
3495
3372
  }
3496
- ) }) : /* @__PURE__ */ n(q, {});
3373
+ ) }) : /* @__PURE__ */ n(Z, {});
3497
3374
  }
3498
- function Eo(e) {
3375
+ function ko(e) {
3499
3376
  try {
3500
3377
  return JSON.stringify(e);
3501
3378
  } catch {
3502
3379
  return JSON.stringify({});
3503
3380
  }
3504
3381
  }
3505
- function ue(e, t = !1) {
3382
+ function de(e, t = !1) {
3506
3383
  return (r) => {
3507
3384
  const i = e.startsWith("data-") ? e : `data-${e}`;
3508
3385
  let o = decodeURIComponent(r.getAttribute(i));
@@ -3510,7 +3387,7 @@ function ue(e, t = !1) {
3510
3387
  try {
3511
3388
  const s = r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);
3512
3389
  s && s.length > 0 && (o = (s.map((d) => d.trim()).reduce((d, f) => {
3513
- const g = f.indexOf("="), u = [f.slice(0, g), f.slice(g + 1).slice(1, -1)];
3390
+ const p = f.indexOf("="), u = [f.slice(0, p), f.slice(p + 1).slice(1, -1)];
3514
3391
  return d[u[0]] = u[1], d;
3515
3392
  }, {})[e.toLowerCase()] || "").replaceAll("&quot;", '"'));
3516
3393
  } catch (l) {
@@ -3528,28 +3405,28 @@ function ue(e, t = !1) {
3528
3405
  return a !== a ? o : a;
3529
3406
  };
3530
3407
  }
3531
- function Pa(e) {
3408
+ function Ia(e) {
3532
3409
  const { attrs: t } = e;
3533
3410
  return Object.keys(t).reduce((r, i) => {
3534
3411
  const o = t[i];
3535
3412
  if (o == null)
3536
3413
  return r;
3537
3414
  let a = "";
3538
- return typeof o == "object" ? a = Eo(o) : a = o, r[i] = a, r;
3415
+ return typeof o == "object" ? a = ko(o) : a = o, r[i] = a, r;
3539
3416
  }, /* @__PURE__ */ Object.create(null));
3540
3417
  }
3541
- const He = {
3418
+ const _e = {
3542
3419
  UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
3543
3420
  UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
3544
3421
  UPLOAD_ATTACHMENT: (e) => `UPLOAD_ATTACHMENT-${e}`,
3545
3422
  EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
3546
3423
  };
3547
- function Ro(e) {
3548
- const { editor: t } = ir(), r = _.useMemo(
3424
+ function Mo(e) {
3425
+ const { editor: t } = Ti(), r = U.useMemo(
3549
3426
  () => t,
3550
3427
  [e, t]
3551
3428
  );
3552
- return nr({
3429
+ return Ai({
3553
3430
  editor: r,
3554
3431
  selector(o) {
3555
3432
  return o.editor ? {
@@ -3564,22 +3441,22 @@ function Ro(e) {
3564
3441
  }
3565
3442
  }) || { editor: null };
3566
3443
  }
3567
- function ee() {
3568
- return Ro().editor;
3444
+ function Q() {
3445
+ return Mo().editor;
3569
3446
  }
3570
- const $t = er(!1);
3571
- function Ft() {
3572
- return tr($t);
3447
+ const Dt = Yt(!1);
3448
+ function Ot() {
3449
+ return Zt(Dt);
3573
3450
  }
3574
- function Oa() {
3575
- return rr($t);
3451
+ function za() {
3452
+ return qt(Dt);
3576
3453
  }
3577
- const Wt = () => !1;
3578
- function Ba(e = Wt) {
3579
- const t = Ft(), [r, i] = I(() => {
3454
+ const Pt = () => !1;
3455
+ function La(e = Pt) {
3456
+ const t = Ot(), [r, i] = z(() => {
3580
3457
  const s = e();
3581
3458
  return typeof s == "boolean" ? !s : s;
3582
- }), o = ee();
3459
+ }), o = Q();
3583
3460
  Ie(() => {
3584
3461
  if (!o || !e) return;
3585
3462
  const s = () => {
@@ -3590,7 +3467,7 @@ function Ba(e = Wt) {
3590
3467
  o.off("selectionUpdate", s), o.off("transaction", s);
3591
3468
  };
3592
3469
  }, [o, e]);
3593
- const a = F(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = F(() => !t || !o, [t, o]);
3470
+ const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
3594
3471
  return {
3595
3472
  disabled: a,
3596
3473
  // can not action, opacity < 1
@@ -3599,8 +3476,8 @@ function Ba(e = Wt) {
3599
3476
  editorDisabled: l
3600
3477
  };
3601
3478
  }
3602
- function xe(e = Wt) {
3603
- const t = Ft(), [r, i] = I({}), [o, a] = I(e()), l = ee();
3479
+ function pe(e = Pt) {
3480
+ const t = Ot(), [r, i] = z({}), [o, a] = z(e()), l = Q();
3604
3481
  Ie(() => {
3605
3482
  if (!l || !e) return;
3606
3483
  const d = () => {
@@ -3610,7 +3487,7 @@ function xe(e = Wt) {
3610
3487
  l.off("selectionUpdate", d);
3611
3488
  };
3612
3489
  }, [r, l, e]);
3613
- const s = F(() => !t || !l, [t, l]), c = F(() => !t || !l, [t, l]);
3490
+ const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
3614
3491
  return {
3615
3492
  disabled: s,
3616
3493
  // can not action, opacity < 1
@@ -3621,56 +3498,56 @@ function xe(e = Wt) {
3621
3498
  // force update
3622
3499
  };
3623
3500
  }
3624
- function de(e) {
3625
- const t = ee();
3626
- return F(() => t ? t.extensionManager.extensions.find(
3501
+ function ce(e) {
3502
+ const t = Q();
3503
+ return $(() => t ? t.extensionManager.extensions.find(
3627
3504
  (i) => i.name === e
3628
3505
  ) : null, [t, e]);
3629
3506
  }
3630
- function Ua(e, t, r) {
3507
+ function Sa(e, t, r) {
3631
3508
  return e < t ? t : e > r ? r : e;
3632
3509
  }
3633
- const Vo = (e) => typeof e == "number", _o = (e) => typeof e == "string", Ho = (e) => typeof e == "function";
3634
- function Do(e, t = "px") {
3510
+ const To = (e) => typeof e == "number", Ao = (e) => typeof e == "string", No = (e) => typeof e == "function";
3511
+ function Io(e, t = "px") {
3635
3512
  if (!e) return e;
3636
- const r = Vo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3513
+ const r = To(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3637
3514
  return Number.isNaN(i) ? e : i + a;
3638
3515
  }
3639
- function $a(e, t) {
3516
+ function Ea(e, t) {
3640
3517
  if (!e)
3641
3518
  return !1;
3642
3519
  const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3643
3520
  return !!r.find((o) => o.name === t);
3644
3521
  }
3645
- function Fa(e) {
3646
- return e.map((t) => _o(t) ? { value: t, name: t } : t);
3522
+ function Ra(e) {
3523
+ return e.map((t) => Ao(t) ? { value: t, name: t } : t);
3647
3524
  }
3648
- function it(e) {
3649
- const t = ee(), r = de(e), { t: i } = ne();
3650
- return F(() => {
3525
+ function tt(e) {
3526
+ const t = Q(), r = ce(e), { t: i } = ie();
3527
+ return $(() => {
3651
3528
  if (!t || !r || !i)
3652
3529
  return null;
3653
3530
  const { button: o } = r.options;
3654
- return !o || !Ho(o) ? null : o({
3531
+ return !o || !No(o) ? null : o({
3655
3532
  editor: t,
3656
3533
  extension: r,
3657
3534
  t: i
3658
3535
  });
3659
3536
  }, [t, r, i]);
3660
3537
  }
3661
- function Wa() {
3662
- const e = it(Gt.name), {
3538
+ function Va() {
3539
+ const e = tt(jt.name), {
3663
3540
  icon: t = void 0,
3664
3541
  tooltip: r = void 0,
3665
3542
  shortcutKeys: i = void 0,
3666
3543
  tooltipOptions: o = {},
3667
3544
  action: a = void 0,
3668
3545
  isActive: l = void 0
3669
- } = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } = xe(l), d = () => {
3546
+ } = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } = pe(l), d = () => {
3670
3547
  s || a && (a(), c());
3671
3548
  };
3672
3549
  return e ? /* @__PURE__ */ n(
3673
- fe,
3550
+ he,
3674
3551
  {
3675
3552
  action: d,
3676
3553
  disabled: s,
@@ -3679,9 +3556,9 @@ function Wa() {
3679
3556
  tooltip: r,
3680
3557
  tooltipOptions: o
3681
3558
  }
3682
- ) : /* @__PURE__ */ n(q, {});
3559
+ ) : /* @__PURE__ */ n(Z, {});
3683
3560
  }
3684
- const Gt = /* @__PURE__ */ Xe.create({
3561
+ const jt = /* @__PURE__ */ Ge.create({
3685
3562
  name: "attachment",
3686
3563
  content: "",
3687
3564
  marks: "",
@@ -3698,7 +3575,7 @@ const Gt = /* @__PURE__ */ Xe.create({
3698
3575
  class: "attachment"
3699
3576
  },
3700
3577
  button: ({ editor: t, t: r }) => ({
3701
- component: fe,
3578
+ component: he,
3702
3579
  componentProps: {
3703
3580
  /**
3704
3581
  * Instead of immediately inserting an empty node, we emit an event
@@ -3706,8 +3583,8 @@ const Gt = /* @__PURE__ */ Xe.create({
3706
3583
  * the upload callback has returned an id.
3707
3584
  */
3708
3585
  action: () => {
3709
- const i = He.UPLOAD_ATTACHMENT(t.id);
3710
- so(i, !0);
3586
+ const i = _e.UPLOAD_ATTACHMENT(t.id);
3587
+ Kn(i, !0);
3711
3588
  },
3712
3589
  isActive: () => !1,
3713
3590
  disabled: !1,
@@ -3730,7 +3607,7 @@ const Gt = /* @__PURE__ */ Xe.create({
3730
3607
  } = e || {};
3731
3608
  return [
3732
3609
  "div",
3733
- Ye(
3610
+ Xe(
3734
3611
  // @ts-expect-error
3735
3612
  this.options.HTMLAttributes || {},
3736
3613
  e || {}
@@ -3741,12 +3618,12 @@ const Gt = /* @__PURE__ */ Xe.create({
3741
3618
  [
3742
3619
  "span",
3743
3620
  { class: "attachment__icon" },
3744
- Ut(o, !0)
3621
+ Ht(o, !0)
3745
3622
  ],
3746
3623
  [
3747
3624
  "span",
3748
3625
  { class: "attachment__text" },
3749
- `${r}.${a} (${Bt(i)})`
3626
+ `${r}.${a} (${_t(i)})`
3750
3627
  ]
3751
3628
  ] : ["div", { class: "attachment__placeholder" }]
3752
3629
  ];
@@ -3759,27 +3636,27 @@ const Gt = /* @__PURE__ */ Xe.create({
3759
3636
  */
3760
3637
  id: {
3761
3638
  default: null,
3762
- parseHTML: ue("id")
3639
+ parseHTML: de("id")
3763
3640
  },
3764
3641
  fileName: {
3765
3642
  default: null,
3766
- parseHTML: ue("filename")
3643
+ parseHTML: de("filename")
3767
3644
  },
3768
3645
  fileSize: {
3769
3646
  default: null,
3770
- parseHTML: ue("filesize")
3647
+ parseHTML: de("filesize")
3771
3648
  },
3772
3649
  fileType: {
3773
3650
  default: null,
3774
- parseHTML: ue("filetype")
3651
+ parseHTML: de("filetype")
3775
3652
  },
3776
3653
  fileExt: {
3777
3654
  default: null,
3778
- parseHTML: ue("fileext")
3655
+ parseHTML: de("fileext")
3779
3656
  },
3780
3657
  error: {
3781
3658
  default: null,
3782
- parseHTML: ue("error")
3659
+ parseHTML: de("error")
3783
3660
  }
3784
3661
  };
3785
3662
  },
@@ -3789,23 +3666,23 @@ const Gt = /* @__PURE__ */ Xe.create({
3789
3666
  };
3790
3667
  },
3791
3668
  addNodeView() {
3792
- return wt(Lo);
3669
+ return vt(Co);
3793
3670
  }
3794
3671
  });
3795
- function jo() {
3672
+ function zo() {
3796
3673
  var h;
3797
- const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(!1), [a, l] = I(!1), [s, c] = I(null), d = me(null), f = de(Gt.name), g = He.UPLOAD_ATTACHMENT(t.id);
3798
- tt((x) => {
3674
+ const { t: e } = ie(), t = Q(), { editorDisabled: r } = pe(), [i, o] = z(!1), [a, l] = z(!1), [s, c] = z(null), d = fe(null), f = ce(jt.name), p = _e.UPLOAD_ATTACHMENT(t.id);
3675
+ Qe((x) => {
3799
3676
  x && (c(null), l(!1), o(!0));
3800
- }, [g]);
3677
+ }, [p]);
3801
3678
  const u = (h = f == null ? void 0 : f.options) == null ? void 0 : h.upload;
3802
- function v(x) {
3679
+ function b(x) {
3803
3680
  var m;
3804
3681
  x.preventDefault(), (m = d.current) == null || m.click();
3805
3682
  }
3806
- async function p(x) {
3807
- var T;
3808
- const m = (T = x.target.files) == null ? void 0 : T[0];
3683
+ async function g(x) {
3684
+ var A;
3685
+ const m = (A = x.target.files) == null ? void 0 : A[0];
3809
3686
  if (!m || !t || t.isDestroyed) {
3810
3687
  x.target.value = "";
3811
3688
  return;
@@ -3816,17 +3693,17 @@ function jo() {
3816
3693
  }
3817
3694
  c(null), l(!0);
3818
3695
  try {
3819
- const b = await u(m);
3696
+ const v = await u(m);
3820
3697
  t.chain().focus().setAttachment({
3821
- id: b,
3822
- fileName: fo(m.name),
3698
+ id: v,
3699
+ fileName: io(m.name),
3823
3700
  fileSize: m.size,
3824
3701
  fileType: m.type,
3825
- fileExt: mo(m.name)
3702
+ fileExt: no(m.name)
3826
3703
  }).run(), o(!1);
3827
- } catch (b) {
3704
+ } catch (v) {
3828
3705
  c(
3829
- b != null && b.message ? `${e("editor.attachment.error.upload_failed")}: ${b.message}` : e("editor.attachment.error.upload_failed")
3706
+ v != null && v.message ? `${e("editor.attachment.error.upload_failed")}: ${v.message}` : e("editor.attachment.error.upload_failed")
3830
3707
  );
3831
3708
  } finally {
3832
3709
  l(!1), x.target.value = "";
@@ -3835,16 +3712,16 @@ function jo() {
3835
3712
  function k(x) {
3836
3713
  a || (o(x), x || c(null));
3837
3714
  }
3838
- return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: k, open: i, children: /* @__PURE__ */ y(le, { children: [
3839
- /* @__PURE__ */ n(ce, { children: e("editor.attachment.dialog.title") }),
3715
+ return r ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: k, open: i, children: /* @__PURE__ */ y(se, { children: [
3716
+ /* @__PURE__ */ n(le, { children: e("editor.attachment.dialog.title") }),
3840
3717
  /* @__PURE__ */ y("div", { className: "richtext-flex richtext-flex-col richtext-gap-3", children: [
3841
3718
  /* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-muted-foreground", children: e("editor.attachment.dialog.description") }),
3842
3719
  /* @__PURE__ */ n(
3843
- X,
3720
+ G,
3844
3721
  {
3845
3722
  className: "richtext-w-full",
3846
3723
  disabled: a,
3847
- onClick: v,
3724
+ onClick: b,
3848
3725
  size: "sm",
3849
3726
  children: e(a ? "editor.attachment.uploading" : "editor.attachment.dialog.button.choose")
3850
3727
  }
@@ -3855,14 +3732,14 @@ function jo() {
3855
3732
  "input",
3856
3733
  {
3857
3734
  hidden: !0,
3858
- onChange: p,
3735
+ onChange: g,
3859
3736
  ref: d,
3860
3737
  type: "file"
3861
3738
  }
3862
3739
  )
3863
3740
  ] }) });
3864
3741
  }
3865
- var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.create({
3742
+ var Lo = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, So = Ge.create({
3866
3743
  name: "image",
3867
3744
  addOptions() {
3868
3745
  return {
@@ -3906,7 +3783,7 @@ var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.cre
3906
3783
  ];
3907
3784
  },
3908
3785
  renderHTML({ HTMLAttributes: e }) {
3909
- return ["img", Ye(this.options.HTMLAttributes, e)];
3786
+ return ["img", Xe(this.options.HTMLAttributes, e)];
3910
3787
  },
3911
3788
  parseMarkdown: (e, t) => t.createNode("image", {
3912
3789
  src: e.href,
@@ -3924,33 +3801,33 @@ var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.cre
3924
3801
  const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
3925
3802
  return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
3926
3803
  const c = document.createElement("img");
3927
- Object.entries(l).forEach(([g, u]) => {
3804
+ Object.entries(l).forEach(([p, u]) => {
3928
3805
  if (u != null)
3929
- switch (g) {
3806
+ switch (p) {
3930
3807
  case "width":
3931
3808
  case "height":
3932
3809
  break;
3933
3810
  default:
3934
- c.setAttribute(g, u);
3811
+ c.setAttribute(p, u);
3935
3812
  break;
3936
3813
  }
3937
3814
  }), c.src = l.src;
3938
- const d = new ar({
3815
+ const d = new Ii({
3939
3816
  element: c,
3940
3817
  editor: s,
3941
3818
  node: o,
3942
3819
  getPos: a,
3943
- onResize: (g, u) => {
3944
- c.style.width = `${g}px`, c.style.height = `${u}px`;
3820
+ onResize: (p, u) => {
3821
+ c.style.width = `${p}px`, c.style.height = `${u}px`;
3945
3822
  },
3946
- onCommit: (g, u) => {
3947
- const v = a();
3948
- v !== void 0 && this.editor.chain().setNodeSelection(v).updateAttributes(this.name, {
3949
- width: g,
3823
+ onCommit: (p, u) => {
3824
+ const b = a();
3825
+ b !== void 0 && this.editor.chain().setNodeSelection(b).updateAttributes(this.name, {
3826
+ width: p,
3950
3827
  height: u
3951
3828
  }).run();
3952
3829
  },
3953
- onUpdate: (g, u, v) => g.type === o.type,
3830
+ onUpdate: (p, u, b) => p.type === o.type,
3954
3831
  options: {
3955
3832
  directions: e,
3956
3833
  min: {
@@ -3975,8 +3852,8 @@ var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.cre
3975
3852
  },
3976
3853
  addInputRules() {
3977
3854
  return [
3978
- or({
3979
- find: Po,
3855
+ Ni({
3856
+ find: Lo,
3980
3857
  type: this.type,
3981
3858
  getAttributes: (e) => {
3982
3859
  const [, , t, r, i] = e;
@@ -3985,128 +3862,128 @@ var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.cre
3985
3862
  })
3986
3863
  ];
3987
3864
  }
3988
- }), Bo = Oo, Uo = typeof global == "object" && global && global.Object === Object && global, $o = typeof self == "object" && self && self.Object === Object && self, Xt = Uo || $o || Function("return this")(), Ee = Xt.Symbol, Yt = Object.prototype, Fo = Yt.hasOwnProperty, Wo = Yt.toString, we = Ee ? Ee.toStringTag : void 0;
3989
- function Go(e) {
3990
- var t = Fo.call(e, we), r = e[we];
3865
+ }), Eo = So, Ro = typeof global == "object" && global && global.Object === Object && global, Vo = typeof self == "object" && self && self.Object === Object && self, Bt = Ro || Vo || Function("return this")(), Se = Bt.Symbol, Ut = Object.prototype, _o = Ut.hasOwnProperty, Ho = Ut.toString, be = Se ? Se.toStringTag : void 0;
3866
+ function Do(e) {
3867
+ var t = _o.call(e, be), r = e[be];
3991
3868
  try {
3992
- e[we] = void 0;
3869
+ e[be] = void 0;
3993
3870
  var i = !0;
3994
3871
  } catch {
3995
3872
  }
3996
- var o = Wo.call(e);
3997
- return i && (t ? e[we] = r : delete e[we]), o;
3873
+ var o = Ho.call(e);
3874
+ return i && (t ? e[be] = r : delete e[be]), o;
3998
3875
  }
3999
- var Xo = Object.prototype, Yo = Xo.toString;
4000
- function Zo(e) {
4001
- return Yo.call(e);
3876
+ var Oo = Object.prototype, Po = Oo.toString;
3877
+ function jo(e) {
3878
+ return Po.call(e);
4002
3879
  }
4003
- var qo = "[object Null]", Jo = "[object Undefined]", pt = Ee ? Ee.toStringTag : void 0;
4004
- function Zt(e) {
4005
- return e == null ? e === void 0 ? Jo : qo : pt && pt in Object(e) ? Go(e) : Zo(e);
3880
+ var Bo = "[object Null]", Uo = "[object Undefined]", ft = Se ? Se.toStringTag : void 0;
3881
+ function $t(e) {
3882
+ return e == null ? e === void 0 ? Uo : Bo : ft && ft in Object(e) ? Do(e) : jo(e);
4006
3883
  }
4007
- function qt(e) {
3884
+ function Ft(e) {
4008
3885
  return e != null && typeof e == "object";
4009
3886
  }
4010
- var Ko = "[object Symbol]";
4011
- function Qo(e) {
4012
- return typeof e == "symbol" || qt(e) && Zt(e) == Ko;
3887
+ var $o = "[object Symbol]";
3888
+ function Fo(e) {
3889
+ return typeof e == "symbol" || Ft(e) && $t(e) == $o;
4013
3890
  }
4014
- var ea = /\s/;
4015
- function ta(e) {
4016
- for (var t = e.length; t-- && ea.test(e.charAt(t)); )
3891
+ var Wo = /\s/;
3892
+ function Go(e) {
3893
+ for (var t = e.length; t-- && Wo.test(e.charAt(t)); )
4017
3894
  ;
4018
3895
  return t;
4019
3896
  }
4020
- var ra = /^\s+/;
4021
- function ia(e) {
4022
- return e && e.slice(0, ta(e) + 1).replace(ra, "");
3897
+ var Xo = /^\s+/;
3898
+ function Yo(e) {
3899
+ return e && e.slice(0, Go(e) + 1).replace(Xo, "");
4023
3900
  }
4024
- function Re(e) {
3901
+ function Ee(e) {
4025
3902
  var t = typeof e;
4026
3903
  return e != null && (t == "object" || t == "function");
4027
3904
  }
4028
- var gt = NaN, na = /^[-+]0x[0-9a-f]+$/i, oa = /^0b[01]+$/i, aa = /^0o[0-7]+$/i, sa = parseInt;
4029
- function Ce(e) {
3905
+ var mt = NaN, Zo = /^[-+]0x[0-9a-f]+$/i, qo = /^0b[01]+$/i, Jo = /^0o[0-7]+$/i, Ko = parseInt;
3906
+ function ye(e) {
4030
3907
  if (typeof e == "number")
4031
3908
  return e;
4032
- if (Qo(e))
4033
- return gt;
4034
- if (Re(e)) {
3909
+ if (Fo(e))
3910
+ return mt;
3911
+ if (Ee(e)) {
4035
3912
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
4036
- e = Re(t) ? t + "" : t;
3913
+ e = Ee(t) ? t + "" : t;
4037
3914
  }
4038
3915
  if (typeof e != "string")
4039
3916
  return e === 0 ? e : +e;
4040
- e = ia(e);
4041
- var r = oa.test(e);
4042
- return r || aa.test(e) ? sa(e.slice(2), r ? 2 : 8) : na.test(e) ? gt : +e;
3917
+ e = Yo(e);
3918
+ var r = qo.test(e);
3919
+ return r || Jo.test(e) ? Ko(e.slice(2), r ? 2 : 8) : Zo.test(e) ? mt : +e;
4043
3920
  }
4044
- function la(e, t, r) {
3921
+ function Qo(e, t, r) {
4045
3922
  return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
4046
3923
  }
4047
- function ca(e, t, r) {
4048
- return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = Ce(r), r = r === r ? r : 0), t !== void 0 && (t = Ce(t), t = t === t ? t : 0), la(Ce(e), t, r);
3924
+ function ea(e, t, r) {
3925
+ return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = ye(r), r = r === r ? r : 0), t !== void 0 && (t = ye(t), t = t === t ? t : 0), Qo(ye(e), t, r);
4049
3926
  }
4050
- var $e = function() {
4051
- return Xt.Date.now();
4052
- }, da = "Expected a function", ua = Math.max, ha = Math.min;
4053
- function fa(e, t, r) {
4054
- var i, o, a, l, s, c, d = 0, f = !1, g = !1, u = !0;
3927
+ var Ue = function() {
3928
+ return Bt.Date.now();
3929
+ }, ta = "Expected a function", ra = Math.max, ia = Math.min;
3930
+ function na(e, t, r) {
3931
+ var i, o, a, l, s, c, d = 0, f = !1, p = !1, u = !0;
4055
3932
  if (typeof e != "function")
4056
- throw new TypeError(da);
4057
- t = Ce(t) || 0, Re(r) && (f = !!r.leading, g = "maxWait" in r, a = g ? ua(Ce(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
4058
- function v(C) {
4059
- var L = i, H = o;
4060
- return i = o = void 0, d = C, l = e.apply(H, L), l;
3933
+ throw new TypeError(ta);
3934
+ t = ye(t) || 0, Ee(r) && (f = !!r.leading, p = "maxWait" in r, a = p ? ra(ye(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
3935
+ function b(C) {
3936
+ var S = i, V = o;
3937
+ return i = o = void 0, d = C, l = e.apply(V, S), l;
4061
3938
  }
4062
- function p(C) {
4063
- return d = C, s = setTimeout(x, t), f ? v(C) : l;
3939
+ function g(C) {
3940
+ return d = C, s = setTimeout(x, t), f ? b(C) : l;
4064
3941
  }
4065
3942
  function k(C) {
4066
- var L = C - c, H = C - d, P = t - L;
4067
- return g ? ha(P, a - H) : P;
3943
+ var S = C - c, V = C - d, H = t - S;
3944
+ return p ? ia(H, a - V) : H;
4068
3945
  }
4069
3946
  function h(C) {
4070
- var L = C - c, H = C - d;
4071
- return c === void 0 || L >= t || L < 0 || g && H >= a;
3947
+ var S = C - c, V = C - d;
3948
+ return c === void 0 || S >= t || S < 0 || p && V >= a;
4072
3949
  }
4073
3950
  function x() {
4074
- var C = $e();
3951
+ var C = Ue();
4075
3952
  if (h(C))
4076
3953
  return m(C);
4077
3954
  s = setTimeout(x, k(C));
4078
3955
  }
4079
3956
  function m(C) {
4080
- return s = void 0, u && i ? v(C) : (i = o = void 0, l);
3957
+ return s = void 0, u && i ? b(C) : (i = o = void 0, l);
4081
3958
  }
4082
- function T() {
3959
+ function A() {
4083
3960
  s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
4084
3961
  }
4085
- function b() {
4086
- return s === void 0 ? l : m($e());
3962
+ function v() {
3963
+ return s === void 0 ? l : m(Ue());
4087
3964
  }
4088
- function A() {
4089
- var C = $e(), L = h(C);
4090
- if (i = arguments, o = this, c = C, L) {
3965
+ function L() {
3966
+ var C = Ue(), S = h(C);
3967
+ if (i = arguments, o = this, c = C, S) {
4091
3968
  if (s === void 0)
4092
- return p(c);
4093
- if (g)
4094
- return clearTimeout(s), s = setTimeout(x, t), v(c);
3969
+ return g(c);
3970
+ if (p)
3971
+ return clearTimeout(s), s = setTimeout(x, t), b(c);
4095
3972
  }
4096
3973
  return s === void 0 && (s = setTimeout(x, t)), l;
4097
3974
  }
4098
- return A.cancel = T, A.flush = b, A;
3975
+ return L.cancel = A, L.flush = v, L;
4099
3976
  }
4100
- var ma = "[object Number]";
4101
- function xt(e) {
4102
- return typeof e == "number" || qt(e) && Zt(e) == ma;
3977
+ var oa = "[object Number]";
3978
+ function gt(e) {
3979
+ return typeof e == "number" || Ft(e) && $t(e) == oa;
4103
3980
  }
4104
- var pa = "Expected a function";
4105
- function bt(e, t, r) {
3981
+ var aa = "Expected a function";
3982
+ function pt(e, t, r) {
4106
3983
  var i = !0, o = !0;
4107
3984
  if (typeof e != "function")
4108
- throw new TypeError(pa);
4109
- return Re(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), fa(e, t, {
3985
+ throw new TypeError(aa);
3986
+ return Ee(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), na(e, t, {
4110
3987
  leading: i,
4111
3988
  maxWait: t,
4112
3989
  trailing: o
@@ -4118,7 +3995,7 @@ const Te = {
4118
3995
  BOTTOM_LEFT: "bl",
4119
3996
  BOTTOM_RIGHT: "br"
4120
3997
  };
4121
- function ga({
3998
+ function sa({
4122
3999
  src: e,
4123
4000
  style: t
4124
4001
  }) {
@@ -4225,46 +4102,46 @@ function ga({
4225
4102
  }
4226
4103
  );
4227
4104
  }
4228
- function xa(e) {
4229
- var P, O, U, S;
4230
- const [t, r] = I({
4231
- width: lt,
4232
- height: lt
4233
- }), [i, o] = I({
4105
+ function la(e) {
4106
+ var H, D, j, N;
4107
+ const [t, r] = z({
4108
+ width: at,
4109
+ height: at
4110
+ }), [i, o] = z({
4234
4111
  width: 0,
4235
4112
  height: 0
4236
- }), [a] = I([
4113
+ }), [a] = z([
4237
4114
  Te.TOP_LEFT,
4238
4115
  Te.TOP_RIGHT,
4239
4116
  Te.BOTTOM_LEFT,
4240
4117
  Te.BOTTOM_RIGHT
4241
- ]), [l, s] = I(!1), [c, d] = I({
4118
+ ]), [l, s] = z(!1), [c, d] = z({
4242
4119
  x: 0,
4243
4120
  y: 0,
4244
4121
  w: 0,
4245
4122
  h: 0,
4246
4123
  dir: ""
4247
- }), { align: f, inline: g, uploading: u } = (P = e == null ? void 0 : e.node) == null ? void 0 : P.attrs, v = g && (f === "left" || f === "right"), p = F(() => {
4248
- var ot;
4249
- const { src: w, alt: N, width: V, height: j, flipX: B, flipY: z } = (ot = e == null ? void 0 : e.node) == null ? void 0 : ot.attrs, $ = xt(V) ? `${V}px` : V, W = xt(j) ? `${j}px` : j, G = [];
4250
- B && G.push("rotateX(180deg)"), z && G.push("rotateY(180deg)");
4251
- const Qt = G.join(" ");
4124
+ }), { align: f, inline: p, uploading: u } = (H = e == null ? void 0 : e.node) == null ? void 0 : H.attrs, b = p && (f === "left" || f === "right"), g = $(() => {
4125
+ var it;
4126
+ const { src: w, alt: T, width: R, height: _, flipX: O, flipY: I } = (it = e == null ? void 0 : e.node) == null ? void 0 : it.attrs, B = gt(R) ? `${R}px` : R, F = gt(_) ? `${_}px` : _, W = [];
4127
+ O && W.push("rotateX(180deg)"), I && W.push("rotateY(180deg)");
4128
+ const Xt = W.join(" ");
4252
4129
  return {
4253
4130
  src: w || void 0,
4254
- alt: N || void 0,
4131
+ alt: T || void 0,
4255
4132
  style: {
4256
- width: $ || void 0,
4257
- height: W || void 0,
4258
- transform: Qt || "none",
4259
- ...v ? { float: f } : {}
4133
+ width: B || void 0,
4134
+ height: F || void 0,
4135
+ transform: Xt || "none",
4136
+ ...b ? { float: f } : {}
4260
4137
  }
4261
4138
  };
4262
- }, [(O = e == null ? void 0 : e.node) == null ? void 0 : O.attrs]), k = F(() => {
4139
+ }, [(D = e == null ? void 0 : e.node) == null ? void 0 : D.attrs]), k = $(() => {
4263
4140
  const {
4264
4141
  style: { width: w }
4265
- } = p;
4142
+ } = g;
4266
4143
  return { width: w === "100%" ? w : void 0 };
4267
- }, [p]);
4144
+ }, [g]);
4268
4145
  function h(w) {
4269
4146
  o({
4270
4147
  width: w.target.width,
@@ -4272,44 +4149,44 @@ function xa(e) {
4272
4149
  });
4273
4150
  }
4274
4151
  function x() {
4275
- const { editor: w, getPos: N } = e;
4276
- w.commands.setNodeSelection(N());
4152
+ const { editor: w, getPos: T } = e;
4153
+ w.commands.setNodeSelection(T());
4277
4154
  }
4278
- const m = oe(
4279
- bt(() => {
4280
- const { editor: w } = e, { width: N } = getComputedStyle(w.view.dom);
4281
- r((V) => ({
4282
- ...V,
4283
- width: Number.parseInt(N, 10)
4155
+ const m = ne(
4156
+ pt(() => {
4157
+ const { editor: w } = e, { width: T } = getComputedStyle(w.view.dom);
4158
+ r((R) => ({
4159
+ ...R,
4160
+ width: Number.parseInt(T, 10)
4284
4161
  }));
4285
- }, ct),
4162
+ }, st),
4286
4163
  [e == null ? void 0 : e.editor]
4287
4164
  );
4288
- function T(w, N) {
4165
+ function A(w, T) {
4289
4166
  w.preventDefault(), w.stopPropagation();
4290
- const V = i.width, j = i.height, B = V / j;
4291
- let z = Number(e.node.attrs.width), $ = Number(e.node.attrs.height);
4292
- const W = t.width;
4293
- z && !$ ? (z = z > W ? W : z, $ = Math.round(z / B)) : $ && !z ? (z = Math.round($ * B), z = z > W ? W : z) : !z && !$ ? (z = V > W ? W : V, $ = Math.round(z / B)) : z = z > W ? W : z, s(!0), d({
4167
+ const R = i.width, _ = i.height, O = R / _;
4168
+ let I = Number(e.node.attrs.width), B = Number(e.node.attrs.height);
4169
+ const F = t.width;
4170
+ I && !B ? (I = I > F ? F : I, B = Math.round(I / O)) : B && !I ? (I = Math.round(B * O), I = I > F ? F : I) : !I && !B ? (I = R > F ? F : R, B = Math.round(I / O)) : I = I > F ? F : I, s(!0), d({
4294
4171
  x: w.clientX,
4295
4172
  y: w.clientY,
4296
- w: z,
4297
- h: $,
4298
- dir: N
4173
+ w: I,
4174
+ h: B,
4175
+ dir: T
4299
4176
  });
4300
4177
  }
4301
- const b = oe(
4302
- bt((w) => {
4178
+ const v = ne(
4179
+ pt((w) => {
4303
4180
  if (w.preventDefault(), w.stopPropagation(), !l)
4304
4181
  return;
4305
- const { x: N, w: V, dir: j } = c, B = (w.clientX - N) * (/l/.test(j) ? -1 : 1), z = ca(V + B, Ri, t.width);
4182
+ const { x: T, w: R, dir: _ } = c, O = (w.clientX - T) * (/l/.test(_) ? -1 : 1), I = ea(R + O, Li, t.width);
4306
4183
  e.updateAttributes({
4307
- width: z,
4184
+ width: I,
4308
4185
  height: null
4309
4186
  });
4310
- }, ct),
4187
+ }, st),
4311
4188
  [l, c, t, e.updateAttributes]
4312
- ), A = oe(
4189
+ ), L = ne(
4313
4190
  (w) => {
4314
4191
  w.preventDefault(), w.stopPropagation(), l && (d({
4315
4192
  x: 0,
@@ -4320,44 +4197,44 @@ function xa(e) {
4320
4197
  }), s(!1), x());
4321
4198
  },
4322
4199
  [l, x]
4323
- ), C = oe(() => {
4324
- document == null || document.addEventListener("mousemove", b, !0), document == null || document.addEventListener("mouseup", A, !0);
4325
- }, [b, A]), L = oe(() => {
4326
- document == null || document.removeEventListener("mousemove", b, !0), document == null || document.removeEventListener("mouseup", A, !0);
4327
- }, [b, A]);
4328
- Ie(() => (l ? C() : L(), () => {
4329
- L();
4330
- }), [l, C, L]);
4331
- const H = F(() => new ResizeObserver(() => m()), [m]);
4332
- return Ie(() => (H.observe(e.editor.view.dom), () => {
4333
- H.disconnect();
4334
- }), [e.editor.view.dom, H]), u ? /* @__PURE__ */ n(
4200
+ ), C = ne(() => {
4201
+ document == null || document.addEventListener("mousemove", v, !0), document == null || document.addEventListener("mouseup", L, !0);
4202
+ }, [v, L]), S = ne(() => {
4203
+ document == null || document.removeEventListener("mousemove", v, !0), document == null || document.removeEventListener("mouseup", L, !0);
4204
+ }, [v, L]);
4205
+ Ie(() => (l ? C() : S(), () => {
4206
+ S();
4207
+ }), [l, C, S]);
4208
+ const V = $(() => new ResizeObserver(() => m()), [m]);
4209
+ return Ie(() => (V.observe(e.editor.view.dom), () => {
4210
+ V.disconnect();
4211
+ }), [e.editor.view.dom, V]), u ? /* @__PURE__ */ n(
4335
4212
  Le,
4336
4213
  {
4337
- as: g ? "span" : "div",
4214
+ as: p ? "span" : "div",
4338
4215
  className: "image-view",
4339
4216
  style: {
4340
- float: v ? f : void 0,
4341
- margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4342
- display: g ? "inline" : "block",
4343
- textAlign: v ? void 0 : f,
4344
- width: ((U = p.style) == null ? void 0 : U.width) ?? "auto",
4345
- ...v ? {} : k
4217
+ float: b ? f : void 0,
4218
+ margin: b ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4219
+ display: p ? "inline" : "block",
4220
+ textAlign: b ? void 0 : f,
4221
+ width: ((j = g.style) == null ? void 0 : j.width) ?? "auto",
4222
+ ...b ? {} : k
4346
4223
  },
4347
- children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(ga, { src: p.src, style: p.style }) })
4224
+ children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(sa, { src: g.src, style: g.style }) })
4348
4225
  }
4349
4226
  ) : /* @__PURE__ */ n(
4350
4227
  Le,
4351
4228
  {
4352
- as: g ? "span" : "div",
4229
+ as: p ? "span" : "div",
4353
4230
  className: "image-view",
4354
4231
  style: {
4355
- float: v ? f : void 0,
4356
- margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4357
- display: g ? "inline" : "block",
4358
- textAlign: v ? void 0 : f,
4359
- width: ((S = p.style) == null ? void 0 : S.width) ?? "auto",
4360
- ...v ? {} : k
4232
+ float: b ? f : void 0,
4233
+ margin: b ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4234
+ display: p ? "inline" : "block",
4235
+ textAlign: b ? void 0 : f,
4236
+ width: ((N = g.style) == null ? void 0 : N.width) ?? "auto",
4237
+ ...b ? {} : k
4361
4238
  },
4362
4239
  children: /* @__PURE__ */ y(
4363
4240
  "div",
@@ -4370,20 +4247,20 @@ function xa(e) {
4370
4247
  /* @__PURE__ */ n(
4371
4248
  "img",
4372
4249
  {
4373
- alt: p.alt,
4250
+ alt: g.alt,
4374
4251
  className: "image-view__body__image block",
4375
4252
  height: "auto",
4376
4253
  onClick: x,
4377
4254
  onLoad: h,
4378
- src: p.src,
4379
- style: p.style
4255
+ src: g.src,
4256
+ style: g.style
4380
4257
  }
4381
4258
  ),
4382
4259
  (e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((w) => /* @__PURE__ */ n(
4383
4260
  "span",
4384
4261
  {
4385
4262
  className: `image-resizer__handler image-resizer__handler--${w}`,
4386
- onMouseDown: (N) => T(N, w)
4263
+ onMouseDown: (T) => A(T, w)
4387
4264
  },
4388
4265
  `image-dir-${w}`
4389
4266
  )) })
@@ -4393,7 +4270,7 @@ function xa(e) {
4393
4270
  }
4394
4271
  );
4395
4272
  }
4396
- function ba(e, t) {
4273
+ function ca(e, t) {
4397
4274
  const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
4398
4275
  if (!o) return !1;
4399
4276
  const l = r || {
@@ -4416,10 +4293,10 @@ function ba(e, t) {
4416
4293
  return l === s;
4417
4294
  });
4418
4295
  }
4419
- function nt(e, t) {
4296
+ function rt(e, t) {
4420
4297
  const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
4421
4298
  return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
4422
- if (!ba(c, r)) {
4299
+ if (!ca(c, r)) {
4423
4300
  t.onError ? t.onError({
4424
4301
  type: "type",
4425
4302
  message: o("editor.upload.fileTypeNotSupported", {
@@ -4455,55 +4332,55 @@ function nt(e, t) {
4455
4332
  l.push(c);
4456
4333
  }), l;
4457
4334
  }
4458
- function Ga() {
4459
- const { t: e } = ne(), { toast: t } = Ke(), r = ee(), i = it(Ve.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = xe(), [s, c] = I(!1), d = de(Ve.name), [f, g] = I(""), [u, v] = I(""), p = me(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [h, x] = I(k), m = F(() => d == null ? void 0 : d.options, [d]);
4460
- function T(C) {
4461
- var U;
4462
- const L = (U = C == null ? void 0 : C.target) == null ? void 0 : U.files;
4463
- if (!r || r.isDestroyed || L.length === 0) {
4335
+ function _a() {
4336
+ const { t: e } = ie(), { toast: t } = qe(), r = Q(), i = tt(Re.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = pe(), [s, c] = z(!1), d = ce(Re.name), [f, p] = z(""), [u, b] = z(""), g = fe(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [h, x] = z(k), m = $(() => d == null ? void 0 : d.options, [d]);
4337
+ function A(C) {
4338
+ var j;
4339
+ const S = (j = C == null ? void 0 : C.target) == null ? void 0 : j.files;
4340
+ if (!r || r.isDestroyed || S.length === 0) {
4464
4341
  C.target.value = "";
4465
4342
  return;
4466
4343
  }
4467
- const H = nt(L, {
4344
+ const V = rt(S, {
4468
4345
  acceptMimes: m == null ? void 0 : m.acceptMimes,
4469
4346
  maxSize: m == null ? void 0 : m.maxSize,
4470
4347
  t: e,
4471
4348
  toast: t,
4472
4349
  onError: m.onError
4473
4350
  });
4474
- if (H.length <= 0) {
4351
+ if (V.length <= 0) {
4475
4352
  C.target.value = "";
4476
4353
  return;
4477
4354
  }
4478
4355
  c(!1);
4479
- const P = u, O = h;
4480
- if (v(""), x(k), m.upload) {
4481
- const S = m != null && m.multiple ? H : [H[0]];
4482
- for (const w of S)
4356
+ const H = u, D = h;
4357
+ if (b(""), x(k), m.upload) {
4358
+ const N = m != null && m.multiple ? V : [V[0]];
4359
+ for (const w of N)
4483
4360
  r.chain().focus().insertImagePlaceholder({
4484
4361
  file: w,
4485
- inline: O,
4486
- alt: P
4362
+ inline: D,
4363
+ alt: H
4487
4364
  }).run();
4488
4365
  } else {
4489
- const S = m != null && m.multiple ? H : [H[0]];
4490
- for (const w of S) {
4491
- const N = URL.createObjectURL(w);
4492
- r.chain().focus().setImageInline({ src: N, inline: O, alt: P }).run();
4366
+ const N = m != null && m.multiple ? V : [V[0]];
4367
+ for (const w of N) {
4368
+ const T = URL.createObjectURL(w);
4369
+ r.chain().focus().setImageInline({ src: T, inline: D, alt: H }).run();
4493
4370
  }
4494
4371
  }
4495
4372
  C.target.value = "";
4496
4373
  }
4497
- function b(C) {
4498
- C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k), g(""), v("");
4374
+ function v(C) {
4375
+ C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k), p(""), b("");
4499
4376
  }
4500
- function A(C) {
4501
- var L;
4502
- C.preventDefault(), (L = p.current) == null || L.click();
4377
+ function L(C) {
4378
+ var S;
4379
+ C.preventDefault(), (S = g.current) == null || S.click();
4503
4380
  }
4504
4381
  return i ? /* @__PURE__ */ y(ge, { onOpenChange: c, open: s, children: [
4505
- /* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
4506
- fe,
4382
+ /* @__PURE__ */ n(et, { asChild: !0, children: /* @__PURE__ */ n(
4383
+ he,
4507
4384
  {
4508
4385
  disabled: l,
4509
4386
  icon: o,
@@ -4513,21 +4390,21 @@ function Ga() {
4513
4390
  }
4514
4391
  }
4515
4392
  ) }),
4516
- /* @__PURE__ */ y(le, { children: [
4517
- /* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
4393
+ /* @__PURE__ */ y(se, { children: [
4394
+ /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
4518
4395
  /* @__PURE__ */ y(
4519
- _e,
4396
+ Ve,
4520
4397
  {
4521
4398
  activationMode: "manual",
4522
4399
  defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
4523
4400
  children: [
4524
- m.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4525
- /* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4526
- /* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
4401
+ m.resourceImage === "both" && /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4402
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4403
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
4527
4404
  ] }),
4528
4405
  /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4529
4406
  /* @__PURE__ */ n(
4530
- Qe,
4407
+ Je,
4531
4408
  {
4532
4409
  checked: h,
4533
4410
  onCheckedChange: (C) => {
@@ -4535,40 +4412,40 @@ function Ga() {
4535
4412
  }
4536
4413
  }
4537
4414
  ),
4538
- /* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
4415
+ /* @__PURE__ */ n(Ce, { children: e("editor.link.dialog.inline") })
4539
4416
  ] }),
4540
4417
  m.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
4541
- /* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4418
+ /* @__PURE__ */ n(Ce, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4542
4419
  /* @__PURE__ */ n(
4543
- ae,
4420
+ oe,
4544
4421
  {
4545
- onChange: (C) => v(C.target.value),
4422
+ onChange: (C) => b(C.target.value),
4546
4423
  required: !0,
4547
4424
  type: "text",
4548
4425
  value: u
4549
4426
  }
4550
4427
  )
4551
4428
  ] }),
4552
- /* @__PURE__ */ y(Q, { value: "upload", children: [
4429
+ /* @__PURE__ */ y(K, { value: "upload", children: [
4553
4430
  /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4554
4431
  /* @__PURE__ */ n(
4555
- X,
4432
+ G,
4556
4433
  {
4557
4434
  className: "richtext-mt-1 richtext-w-full",
4558
- onClick: A,
4435
+ onClick: L,
4559
4436
  size: "sm",
4560
4437
  children: e("editor.image.dialog.tab.upload")
4561
4438
  }
4562
4439
  ),
4563
4440
  /* @__PURE__ */ n(
4564
- Jt,
4441
+ Wt,
4565
4442
  {
4566
4443
  alt: u,
4567
4444
  disabled: !1,
4568
4445
  editor: r,
4569
4446
  imageInline: h,
4570
4447
  onClose: () => {
4571
- v("");
4448
+ b("");
4572
4449
  }
4573
4450
  }
4574
4451
  )
@@ -4578,34 +4455,34 @@ function Ga() {
4578
4455
  {
4579
4456
  accept: m.acceptMimes.join(",") || "image/*",
4580
4457
  multiple: m.multiple,
4581
- onChange: T,
4582
- ref: p,
4458
+ onChange: A,
4459
+ ref: g,
4583
4460
  style: { display: "none" },
4584
4461
  type: "file"
4585
4462
  }
4586
4463
  )
4587
4464
  ] }),
4588
- /* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: b, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4465
+ /* @__PURE__ */ n(K, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4589
4466
  /* @__PURE__ */ n(
4590
- ae,
4467
+ oe,
4591
4468
  {
4592
4469
  autoFocus: !0,
4593
- onChange: (C) => g(C.target.value),
4470
+ onChange: (C) => p(C.target.value),
4594
4471
  placeholder: e("editor.image.dialog.placeholder"),
4595
4472
  required: !0,
4596
4473
  type: "url",
4597
4474
  value: f
4598
4475
  }
4599
4476
  ),
4600
- /* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
4477
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
4601
4478
  ] }) }) })
4602
4479
  ]
4603
4480
  }
4604
4481
  )
4605
4482
  ] })
4606
- ] }) : /* @__PURE__ */ n(q, {});
4483
+ ] }) : /* @__PURE__ */ n(Z, {});
4607
4484
  }
4608
- const va = {
4485
+ const da = {
4609
4486
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
4610
4487
  maxSize: 1024 * 1024 * 5,
4611
4488
  // 5MB
@@ -4613,7 +4490,7 @@ const va = {
4613
4490
  resourceImage: "both",
4614
4491
  defaultInline: !1,
4615
4492
  enableAlt: !0
4616
- }, Ve = /* @__PURE__ */ Bo.extend({
4493
+ }, Re = /* @__PURE__ */ Eo.extend({
4617
4494
  group: "inline",
4618
4495
  inline: !0,
4619
4496
  defining: !0,
@@ -4622,7 +4499,7 @@ const va = {
4622
4499
  addOptions() {
4623
4500
  var e;
4624
4501
  return {
4625
- ...va,
4502
+ ...da,
4626
4503
  ...(e = this.parent) == null ? void 0 : e.call(this),
4627
4504
  upload: () => Promise.reject("Image Upload Function"),
4628
4505
  button: ({
@@ -4699,7 +4576,7 @@ const va = {
4699
4576
  };
4700
4577
  },
4701
4578
  addNodeView() {
4702
- return wt(xa);
4579
+ return vt(la);
4703
4580
  },
4704
4581
  addCommands() {
4705
4582
  var r;
@@ -4731,33 +4608,33 @@ const va = {
4731
4608
  }
4732
4609
  })) return !1;
4733
4610
  const f = t.upload;
4734
- return f && f(i).then((g) => {
4611
+ return f && f(i).then((p) => {
4735
4612
  const { doc: u } = l.state;
4736
- let v = null;
4737
- u.descendants((p, k) => {
4738
- if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
4739
- return v = k, !1;
4740
- }), v !== null && l.view.dispatch(
4741
- l.state.tr.setNodeMarkup(v, void 0, {
4742
- ...l.state.doc.nodeAt(v).attrs,
4743
- src: g.cdnUrl,
4744
- imageId: g.imageId,
4613
+ let b = null;
4614
+ u.descendants((g, k) => {
4615
+ if (g.type.name === e && g.attrs.uploading === !0 && g.attrs.src === c)
4616
+ return b = k, !1;
4617
+ }), b !== null && l.view.dispatch(
4618
+ l.state.tr.setNodeMarkup(b, void 0, {
4619
+ ...l.state.doc.nodeAt(b).attrs,
4620
+ src: p.cdnUrl,
4621
+ imageId: p.imageId,
4745
4622
  uploading: !1
4746
4623
  })
4747
4624
  ), URL.revokeObjectURL(c);
4748
- }).catch((g) => {
4749
- console.error("Image upload failed", g);
4625
+ }).catch((p) => {
4626
+ console.error("Image upload failed", p);
4750
4627
  const { doc: u } = l.state;
4751
- let v = null;
4752
- if (u.descendants((p, k) => {
4753
- if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
4754
- return v = k, !1;
4755
- }), v !== null) {
4756
- const p = l.state.doc.nodeAt(v);
4757
- p && l.view.dispatch(
4628
+ let b = null;
4629
+ if (u.descendants((g, k) => {
4630
+ if (g.type.name === e && g.attrs.uploading === !0 && g.attrs.src === c)
4631
+ return b = k, !1;
4632
+ }), b !== null) {
4633
+ const g = l.state.doc.nodeAt(b);
4634
+ g && l.view.dispatch(
4758
4635
  l.state.tr.delete(
4759
- v,
4760
- v + p.nodeSize
4636
+ b,
4637
+ b + g.nodeSize
4761
4638
  )
4762
4639
  );
4763
4640
  }
@@ -4778,7 +4655,7 @@ const va = {
4778
4655
  },
4779
4656
  [
4780
4657
  "img",
4781
- Ye(
4658
+ Xe(
4782
4659
  {
4783
4660
  height: "auto",
4784
4661
  style: f
@@ -4885,107 +4762,107 @@ const va = {
4885
4762
  // ];
4886
4763
  // },
4887
4764
  });
4888
- function Jt({
4765
+ function Wt({
4889
4766
  editor: e,
4890
4767
  imageInline: t,
4891
4768
  onClose: r,
4892
4769
  disabled: i,
4893
4770
  alt: o
4894
4771
  }) {
4895
- var U, S;
4896
- const { t: a } = ne(), { toast: l } = Ke(), [s, c] = I(!1), [d, f] = I(!1), g = ie.useRef(null), [u, v] = ie.useState(), [p, k] = ie.useState(""), h = me(null), [x, m] = I({
4772
+ var j, N;
4773
+ const { t: a } = ie(), { toast: l } = qe(), [s, c] = z(!1), [d, f] = z(!1), p = re.useRef(null), [u, b] = re.useState(), [g, k] = re.useState(""), h = fe(null), [x, m] = z({
4897
4774
  src: "",
4898
4775
  file: null
4899
- }), T = de(Ve.name), b = F(() => (T == null ? void 0 : T.options) ?? {}, [T]);
4900
- function A(w) {
4901
- if (g.current && w.width && w.height) {
4902
- const N = C(g.current, w);
4903
- k(N);
4776
+ }), A = ce(Re.name), v = $(() => (A == null ? void 0 : A.options) ?? {}, [A]);
4777
+ function L(w) {
4778
+ if (p.current && w.width && w.height) {
4779
+ const T = C(p.current, w);
4780
+ k(T);
4904
4781
  }
4905
4782
  }
4906
- function C(w, N) {
4907
- const V = document.createElement("canvas"), j = w.naturalWidth / w.width, B = w.naturalHeight / w.height;
4908
- V.width = N.width * j, V.height = N.height * B;
4909
- const z = V.getContext("2d");
4910
- return z && (z.imageSmoothingEnabled = !1, z.drawImage(
4783
+ function C(w, T) {
4784
+ const R = document.createElement("canvas"), _ = w.naturalWidth / w.width, O = w.naturalHeight / w.height;
4785
+ R.width = T.width * _, R.height = T.height * O;
4786
+ const I = R.getContext("2d");
4787
+ return I && (I.imageSmoothingEnabled = !1, I.drawImage(
4911
4788
  w,
4912
- N.x * j,
4913
- N.y * B,
4914
- N.width * j,
4915
- N.height * B,
4789
+ T.x * _,
4790
+ T.y * O,
4791
+ T.width * _,
4792
+ T.height * O,
4916
4793
  0,
4917
4794
  0,
4918
- N.width * j,
4919
- N.height * B
4920
- )), V.toDataURL("image/png", 1);
4795
+ T.width * _,
4796
+ T.height * O
4797
+ )), R.toDataURL("image/png", 1);
4921
4798
  }
4922
- const L = ie.useCallback(() => {
4923
- var N;
4799
+ const S = re.useCallback(() => {
4800
+ var T;
4924
4801
  if (d) return;
4925
- const w = xo(
4926
- p,
4927
- ((N = x == null ? void 0 : x.file) == null ? void 0 : N.name) || "image.png"
4802
+ const w = so(
4803
+ g,
4804
+ ((T = x == null ? void 0 : x.file) == null ? void 0 : T.name) || "image.png"
4928
4805
  );
4929
4806
  if (c(!1), m({
4930
4807
  src: "",
4931
4808
  file: null
4932
- }), O(), r(), b.upload)
4809
+ }), D(), r(), v.upload)
4933
4810
  e.chain().focus().insertImagePlaceholder({
4934
4811
  file: w,
4935
4812
  inline: t,
4936
4813
  alt: o
4937
4814
  }).run();
4938
4815
  else {
4939
- const V = URL.createObjectURL(w);
4940
- e.chain().focus().setImageInline({ src: V, inline: t, alt: o }).run();
4816
+ const R = URL.createObjectURL(w);
4817
+ e.chain().focus().setImageInline({ src: R, inline: t, alt: o }).run();
4941
4818
  }
4942
4819
  }, [
4943
- p,
4820
+ g,
4944
4821
  e,
4945
4822
  t,
4946
4823
  d,
4947
4824
  r,
4948
- (U = x == null ? void 0 : x.file) == null ? void 0 : U.name,
4949
- b,
4825
+ (j = x == null ? void 0 : x.file) == null ? void 0 : j.name,
4826
+ v,
4950
4827
  o
4951
4828
  ]);
4952
- function H(w) {
4953
- var N;
4954
- w.preventDefault(), (N = h.current) == null || N.click();
4829
+ function V(w) {
4830
+ var T;
4831
+ w.preventDefault(), (T = h.current) == null || T.click();
4955
4832
  }
4956
- const P = async (w) => {
4957
- var z;
4958
- const N = (z = w == null ? void 0 : w.target) == null ? void 0 : z.files;
4959
- if (!e || e.isDestroyed || N.length === 0) {
4833
+ const H = async (w) => {
4834
+ var I;
4835
+ const T = (I = w == null ? void 0 : w.target) == null ? void 0 : I.files;
4836
+ if (!e || e.isDestroyed || T.length === 0) {
4960
4837
  w.target.value = "";
4961
4838
  return;
4962
4839
  }
4963
- const V = nt(N, {
4964
- acceptMimes: b == null ? void 0 : b.acceptMimes,
4965
- maxSize: b == null ? void 0 : b.maxSize,
4840
+ const R = rt(T, {
4841
+ acceptMimes: v == null ? void 0 : v.acceptMimes,
4842
+ maxSize: v == null ? void 0 : v.maxSize,
4966
4843
  t: a,
4967
4844
  toast: l,
4968
- onError: b.onError
4845
+ onError: v.onError
4969
4846
  });
4970
- if (V.length <= 0) {
4847
+ if (R.length <= 0) {
4971
4848
  w.target.value = "";
4972
4849
  return;
4973
4850
  }
4974
- const j = V[0], B = await go(j);
4851
+ const _ = R[0], O = await ao(_);
4975
4852
  c(!0), m({
4976
- src: B.src,
4977
- file: j
4853
+ src: O.src,
4854
+ file: _
4978
4855
  });
4979
- }, O = () => {
4856
+ }, D = () => {
4980
4857
  h.current && (h.current.value = "");
4981
4858
  };
4982
- return /* @__PURE__ */ y(q, { children: [
4859
+ return /* @__PURE__ */ y(Z, { children: [
4983
4860
  /* @__PURE__ */ n(
4984
- X,
4861
+ G,
4985
4862
  {
4986
4863
  className: "richtext-mt-1 richtext-w-full",
4987
4864
  disabled: i,
4988
- onClick: H,
4865
+ onClick: V,
4989
4866
  size: "sm",
4990
4867
  children: a("editor.image.dialog.tab.uploadCrop")
4991
4868
  }
@@ -4995,57 +4872,57 @@ function Jt({
4995
4872
  {
4996
4873
  open: s,
4997
4874
  onOpenChange: (w) => {
4998
- c(w), w || (m({ src: "", file: null }), O());
4875
+ c(w), w || (m({ src: "", file: null }), D());
4999
4876
  },
5000
4877
  children: [
5001
- /* @__PURE__ */ n(rt, {}),
5002
- /* @__PURE__ */ y(le, { children: [
5003
- /* @__PURE__ */ n(ce, { children: a("editor.image.dialog.tab.uploadCrop") }),
4878
+ /* @__PURE__ */ n(et, {}),
4879
+ /* @__PURE__ */ y(se, { children: [
4880
+ /* @__PURE__ */ n(le, { children: a("editor.image.dialog.tab.uploadCrop") }),
5004
4881
  /* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
5005
- Ei,
4882
+ zi,
5006
4883
  {
5007
4884
  className: "richtext-w-full",
5008
4885
  crop: u,
5009
- onChange: (w) => v(w),
5010
- onComplete: (w) => A(w),
5011
- children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: g, src: x.src })
4886
+ onChange: (w) => b(w),
4887
+ onComplete: (w) => L(w),
4888
+ children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: x.src })
5012
4889
  }
5013
4890
  ) }),
5014
- /* @__PURE__ */ y(Ot, { children: [
4891
+ /* @__PURE__ */ y(Vt, { children: [
5015
4892
  /* @__PURE__ */ y(
5016
- X,
4893
+ G,
5017
4894
  {
5018
4895
  disabled: d,
5019
4896
  onClick: () => {
5020
4897
  c(!1), m({
5021
4898
  src: "",
5022
4899
  file: null
5023
- }), O();
4900
+ }), D();
5024
4901
  },
5025
4902
  children: [
5026
4903
  a("editor.imageUpload.cancel"),
5027
- /* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Trash2" })
4904
+ /* @__PURE__ */ n(Pe, { className: "richtext-ml-1", name: "Trash2" })
5028
4905
  ]
5029
4906
  }
5030
4907
  ),
5031
4908
  /* @__PURE__ */ n(
5032
- X,
4909
+ G,
5033
4910
  {
5034
4911
  className: "richtext-w-fit",
5035
4912
  disabled: d || !u,
5036
- onClick: L,
5037
- children: d ? /* @__PURE__ */ y(q, { children: [
4913
+ onClick: S,
4914
+ children: d ? /* @__PURE__ */ y(Z, { children: [
5038
4915
  a("editor.imageUpload.uploading"),
5039
4916
  /* @__PURE__ */ n(
5040
- Oe,
4917
+ Pe,
5041
4918
  {
5042
4919
  className: "richtext-ml-1 richtext-animate-spin",
5043
4920
  name: "Loader"
5044
4921
  }
5045
4922
  )
5046
- ] }) : /* @__PURE__ */ y(q, { children: [
4923
+ ] }) : /* @__PURE__ */ y(Z, { children: [
5047
4924
  a("editor.imageUpload.crop"),
5048
- /* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Crop" })
4925
+ /* @__PURE__ */ n(Pe, { className: "richtext-ml-1", name: "Crop" })
5049
4926
  ] })
5050
4927
  }
5051
4928
  )
@@ -5057,9 +4934,9 @@ function Jt({
5057
4934
  /* @__PURE__ */ n(
5058
4935
  "input",
5059
4936
  {
5060
- accept: ((S = b == null ? void 0 : b.acceptMimes) == null ? void 0 : S.join(",")) || "image/*",
4937
+ accept: ((N = v == null ? void 0 : v.acceptMimes) == null ? void 0 : N.join(",")) || "image/*",
5061
4938
  multiple: !1,
5062
- onChange: P,
4939
+ onChange: H,
5063
4940
  ref: h,
5064
4941
  style: { display: "none" },
5065
4942
  type: "file"
@@ -5067,18 +4944,18 @@ function Jt({
5067
4944
  )
5068
4945
  ] });
5069
4946
  }
5070
- function wa() {
5071
- const { t: e } = ne(), { toast: t } = Ke(), r = ee(), { editorDisabled: i } = xe(), [o, a] = I(!1), l = He.UPLOAD_IMAGE(r.id);
5072
- tt(a, [l]);
5073
- const s = de(Ve.name), [c, d] = I(""), [f, g] = I(""), u = me(null), v = (s == null ? void 0 : s.options.defaultInline) || !1, [p, k] = I(v), h = F(() => s == null ? void 0 : s.options, [s]);
5074
- function x(b) {
5075
- var P;
5076
- const A = (P = b == null ? void 0 : b.target) == null ? void 0 : P.files;
5077
- if (!r || r.isDestroyed || A.length === 0) {
5078
- b.target.value = "";
4947
+ function ua() {
4948
+ const { t: e } = ie(), { toast: t } = qe(), r = Q(), { editorDisabled: i } = pe(), [o, a] = z(!1), l = _e.UPLOAD_IMAGE(r.id);
4949
+ Qe(a, [l]);
4950
+ const s = ce(Re.name), [c, d] = z(""), [f, p] = z(""), u = fe(null), b = (s == null ? void 0 : s.options.defaultInline) || !1, [g, k] = z(b), h = $(() => s == null ? void 0 : s.options, [s]);
4951
+ function x(v) {
4952
+ var H;
4953
+ const L = (H = v == null ? void 0 : v.target) == null ? void 0 : H.files;
4954
+ if (!r || r.isDestroyed || L.length === 0) {
4955
+ v.target.value = "";
5079
4956
  return;
5080
4957
  }
5081
- const C = nt(A, {
4958
+ const C = rt(L, {
5082
4959
  acceptMimes: h == null ? void 0 : h.acceptMimes,
5083
4960
  maxSize: h == null ? void 0 : h.maxSize,
5084
4961
  t: e,
@@ -5086,91 +4963,91 @@ function wa() {
5086
4963
  onError: h.onError
5087
4964
  });
5088
4965
  if (C.length <= 0) {
5089
- b.target.value = "";
4966
+ v.target.value = "";
5090
4967
  return;
5091
4968
  }
5092
4969
  a(!1);
5093
- const L = f, H = p;
5094
- if (g(""), k(v), h.upload) {
5095
- const O = h != null && h.multiple ? C : [C[0]];
5096
- for (const U of O)
4970
+ const S = f, V = g;
4971
+ if (p(""), k(b), h.upload) {
4972
+ const D = h != null && h.multiple ? C : [C[0]];
4973
+ for (const j of D)
5097
4974
  r.chain().focus().insertImagePlaceholder({
5098
- file: U,
5099
- inline: H,
5100
- alt: L
4975
+ file: j,
4976
+ inline: V,
4977
+ alt: S
5101
4978
  }).run();
5102
4979
  } else {
5103
- const O = h != null && h.multiple ? C : [C[0]];
5104
- for (const U of O) {
5105
- const S = URL.createObjectURL(U);
5106
- r.chain().focus().setImageInline({ src: S, inline: H, alt: L }).run();
4980
+ const D = h != null && h.multiple ? C : [C[0]];
4981
+ for (const j of D) {
4982
+ const N = URL.createObjectURL(j);
4983
+ r.chain().focus().setImageInline({ src: N, inline: V, alt: S }).run();
5107
4984
  }
5108
4985
  }
5109
- b.target.value = "";
4986
+ v.target.value = "";
5110
4987
  }
5111
- function m(b) {
5112
- b.preventDefault(), b.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: p, alt: f }).run(), a(!1), k(v), d(""), g("");
4988
+ function m(v) {
4989
+ v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: g, alt: f }).run(), a(!1), k(b), d(""), p("");
5113
4990
  }
5114
- function T(b) {
5115
- var A;
5116
- b.preventDefault(), (A = u.current) == null || A.click();
4991
+ function A(v) {
4992
+ var L;
4993
+ v.preventDefault(), (L = u.current) == null || L.click();
5117
4994
  }
5118
- return i ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(le, { children: [
5119
- /* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
4995
+ return i ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(se, { children: [
4996
+ /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
5120
4997
  /* @__PURE__ */ y(
5121
- _e,
4998
+ Ve,
5122
4999
  {
5123
5000
  activationMode: "manual",
5124
5001
  defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
5125
5002
  children: [
5126
- h.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5127
- /* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
5128
- /* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
5003
+ h.resourceImage === "both" && /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5004
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
5005
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
5129
5006
  ] }),
5130
5007
  /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
5131
5008
  /* @__PURE__ */ n(
5132
- Qe,
5009
+ Je,
5133
5010
  {
5134
- checked: p,
5135
- onCheckedChange: (b) => {
5136
- k(b);
5011
+ checked: g,
5012
+ onCheckedChange: (v) => {
5013
+ k(v);
5137
5014
  }
5138
5015
  }
5139
5016
  ),
5140
- /* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
5017
+ /* @__PURE__ */ n(Ce, { children: e("editor.link.dialog.inline") })
5141
5018
  ] }),
5142
5019
  h.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
5143
- /* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
5020
+ /* @__PURE__ */ n(Ce, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
5144
5021
  /* @__PURE__ */ n(
5145
- ae,
5022
+ oe,
5146
5023
  {
5147
- onChange: (b) => g(b.target.value),
5024
+ onChange: (v) => p(v.target.value),
5148
5025
  required: !0,
5149
5026
  type: "text",
5150
5027
  value: f
5151
5028
  }
5152
5029
  )
5153
5030
  ] }),
5154
- /* @__PURE__ */ y(Q, { value: "upload", children: [
5031
+ /* @__PURE__ */ y(K, { value: "upload", children: [
5155
5032
  /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
5156
5033
  /* @__PURE__ */ n(
5157
- X,
5034
+ G,
5158
5035
  {
5159
5036
  className: "richtext-mt-1 richtext-w-full",
5160
- onClick: T,
5037
+ onClick: A,
5161
5038
  size: "sm",
5162
5039
  children: e("editor.image.dialog.tab.upload")
5163
5040
  }
5164
5041
  ),
5165
5042
  /* @__PURE__ */ n(
5166
- Jt,
5043
+ Wt,
5167
5044
  {
5168
5045
  alt: f,
5169
5046
  disabled: !1,
5170
5047
  editor: r,
5171
- imageInline: p,
5048
+ imageInline: g,
5172
5049
  onClose: () => {
5173
- g("");
5050
+ p("");
5174
5051
  }
5175
5052
  }
5176
5053
  )
@@ -5187,26 +5064,26 @@ function wa() {
5187
5064
  }
5188
5065
  )
5189
5066
  ] }),
5190
- /* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5067
+ /* @__PURE__ */ n(K, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5191
5068
  /* @__PURE__ */ n(
5192
- ae,
5069
+ oe,
5193
5070
  {
5194
5071
  autoFocus: !0,
5195
- onChange: (b) => d(b.target.value),
5072
+ onChange: (v) => d(v.target.value),
5196
5073
  placeholder: e("editor.image.dialog.placeholder"),
5197
5074
  required: !0,
5198
5075
  type: "url",
5199
5076
  value: c
5200
5077
  }
5201
5078
  ),
5202
- /* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
5079
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
5203
5080
  ] }) }) })
5204
5081
  ]
5205
5082
  }
5206
5083
  )
5207
5084
  ] }) });
5208
5085
  }
5209
- function Kt(e, t) {
5086
+ function Gt(e, t) {
5210
5087
  let r;
5211
5088
  try {
5212
5089
  r = new URL(e);
@@ -5221,17 +5098,17 @@ function Kt(e, t) {
5221
5098
  return r.hostname.includes(i);
5222
5099
  });
5223
5100
  }
5224
- function Xa() {
5225
- const { t: e } = ne(), t = ee(), r = it(Ge.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = xe(), [l, s] = I(""), c = me(null), [d, f] = I(""), [g, u] = I(!1), v = de(Ge.name), p = F(() => (v == null ? void 0 : v.options) ?? {}, [v]);
5101
+ function Ha() {
5102
+ const { t: e } = ie(), t = Q(), r = tt(We.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = pe(), [l, s] = z(""), c = fe(null), [d, f] = z(""), [p, u] = z(!1), b = ce(We.name), g = $(() => (b == null ? void 0 : b.options) ?? {}, [b]);
5226
5103
  async function k(m) {
5227
5104
  var C;
5228
- const T = (C = m == null ? void 0 : m.target) == null ? void 0 : C.files;
5229
- if (!t || t.isDestroyed || T.length === 0)
5105
+ const A = (C = m == null ? void 0 : m.target) == null ? void 0 : C.files;
5106
+ if (!t || t.isDestroyed || A.length === 0)
5230
5107
  return;
5231
- const b = T[0];
5232
- let A = "";
5233
- p.upload ? A = await p.upload(b) : A = URL.createObjectURL(b), t.chain().focus().setVideo({
5234
- src: A,
5108
+ const v = A[0];
5109
+ let L = "";
5110
+ g.upload ? L = await g.upload(v) : L = URL.createObjectURL(v), t.chain().focus().setVideo({
5111
+ src: L,
5235
5112
  width: "100%"
5236
5113
  }).run(), u(!1);
5237
5114
  }
@@ -5242,12 +5119,12 @@ function Xa() {
5242
5119
  }).run(), u(!1), s(""));
5243
5120
  }
5244
5121
  function x(m) {
5245
- var T;
5246
- m.preventDefault(), (T = c.current) == null || T.click();
5122
+ var A;
5123
+ m.preventDefault(), (A = c.current) == null || A.click();
5247
5124
  }
5248
- return /* @__PURE__ */ y(ge, { onOpenChange: u, open: g, children: [
5249
- /* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
5250
- fe,
5125
+ return /* @__PURE__ */ y(ge, { onOpenChange: u, open: p, children: [
5126
+ /* @__PURE__ */ n(et, { asChild: !0, children: /* @__PURE__ */ n(
5127
+ he,
5251
5128
  {
5252
5129
  disabled: a,
5253
5130
  icon: i,
@@ -5257,20 +5134,20 @@ function Xa() {
5257
5134
  }
5258
5135
  }
5259
5136
  ) }),
5260
- /* @__PURE__ */ y(le, { children: [
5261
- /* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
5137
+ /* @__PURE__ */ y(se, { children: [
5138
+ /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
5262
5139
  /* @__PURE__ */ y(
5263
- _e,
5140
+ Ve,
5264
5141
  {
5265
5142
  activationMode: "manual",
5266
- defaultValue: (p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload" ? "upload" : "link",
5143
+ defaultValue: (g == null ? void 0 : g.resourceVideo) === "both" || (g == null ? void 0 : g.resourceVideo) === "upload" ? "upload" : "link",
5267
5144
  children: [
5268
- /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5269
- ((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
5270
- ((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
5145
+ /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5146
+ ((g == null ? void 0 : g.resourceVideo) === "both" || (g == null ? void 0 : g.resourceVideo) === "upload") && /* @__PURE__ */ n(J, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
5147
+ ((g == null ? void 0 : g.resourceVideo) === "both" || (g == null ? void 0 : g.resourceVideo) === "link") && /* @__PURE__ */ n(J, { value: "link", children: e("editor.video.dialog.link") })
5271
5148
  ] }),
5272
- /* @__PURE__ */ y(Q, { value: "upload", children: [
5273
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
5149
+ /* @__PURE__ */ y(K, { value: "upload", children: [
5150
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
5274
5151
  /* @__PURE__ */ n(
5275
5152
  "input",
5276
5153
  {
@@ -5285,10 +5162,10 @@ function Xa() {
5285
5162
  }
5286
5163
  )
5287
5164
  ] }),
5288
- /* @__PURE__ */ y(Q, { value: "link", children: [
5165
+ /* @__PURE__ */ y(K, { value: "link", children: [
5289
5166
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5290
5167
  /* @__PURE__ */ n(
5291
- ae,
5168
+ oe,
5292
5169
  {
5293
5170
  autoFocus: !0,
5294
5171
  placeholder: e("editor.video.dialog.placeholder"),
@@ -5296,15 +5173,15 @@ function Xa() {
5296
5173
  type: "url",
5297
5174
  value: l,
5298
5175
  onBlur: (m) => {
5299
- const T = m.target.value, b = p.videoProviders || ["."];
5300
- T && !Kt(T, b) ? f("Invalid video URL") : f("");
5176
+ const A = m.target.value, v = g.videoProviders || ["."];
5177
+ A && !Gt(A, v) ? f("Invalid video URL") : f("");
5301
5178
  },
5302
5179
  onChange: (m) => {
5303
5180
  s(m.target.value);
5304
5181
  }
5305
5182
  }
5306
5183
  ),
5307
- /* @__PURE__ */ n(X, { onClick: h, type: "button", children: e("editor.video.dialog.button.apply") })
5184
+ /* @__PURE__ */ n(G, { onClick: h, type: "button", children: e("editor.video.dialog.button.apply") })
5308
5185
  ] }) }),
5309
5186
  d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
5310
5187
  ] })
@@ -5314,7 +5191,7 @@ function Xa() {
5314
5191
  ] })
5315
5192
  ] });
5316
5193
  }
5317
- function ya(e) {
5194
+ function ha(e) {
5318
5195
  e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
5319
5196
  const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
5320
5197
  t && (e = `https://www.youtube.com/embed/${t[1]}`);
@@ -5325,7 +5202,7 @@ function ya(e) {
5325
5202
  }
5326
5203
  return /^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;
5327
5204
  }
5328
- const Ge = /* @__PURE__ */ Xe.create({
5205
+ const We = /* @__PURE__ */ Ge.create({
5329
5206
  name: "video",
5330
5207
  group: "block",
5331
5208
  atom: !0,
@@ -5339,7 +5216,7 @@ const Ge = /* @__PURE__ */ Xe.create({
5339
5216
  upload: void 0,
5340
5217
  frameborder: !1,
5341
5218
  resourceVideo: "both",
5342
- width: Vi["size-medium"],
5219
+ width: Si["size-medium"],
5343
5220
  HTMLAttributes: {
5344
5221
  class: "iframe-wrapper"
5345
5222
  // style: 'display: flex;justify-content: center;',
@@ -5367,13 +5244,13 @@ const Ge = /* @__PURE__ */ Xe.create({
5367
5244
  src: {
5368
5245
  default: null,
5369
5246
  renderHTML: ({ src: e }) => ({
5370
- src: e ? ya(e) : null
5247
+ src: e ? ha(e) : null
5371
5248
  })
5372
5249
  },
5373
5250
  width: {
5374
5251
  default: this.options.width,
5375
5252
  renderHTML: ({ width: e }) => ({
5376
- width: Do(e)
5253
+ width: Io(e)
5377
5254
  })
5378
5255
  },
5379
5256
  frameborder: {
@@ -5422,23 +5299,23 @@ const Ge = /* @__PURE__ */ Xe.create({
5422
5299
  };
5423
5300
  }
5424
5301
  });
5425
- function Ca() {
5426
- const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(""), a = me(null), [l, s] = I(""), [c, d] = I(!1), f = de(Ge.name), g = He.UPLOAD_VIDEO(t.id);
5427
- tt(d, [g]);
5428
- const u = F(() => (f == null ? void 0 : f.options) ?? {}, [f]);
5429
- async function v(h) {
5430
- var b;
5431
- const x = (b = h == null ? void 0 : h.target) == null ? void 0 : b.files;
5302
+ function fa() {
5303
+ const { t: e } = ie(), t = Q(), { editorDisabled: r } = pe(), [i, o] = z(""), a = fe(null), [l, s] = z(""), [c, d] = z(!1), f = ce(We.name), p = _e.UPLOAD_VIDEO(t.id);
5304
+ Qe(d, [p]);
5305
+ const u = $(() => (f == null ? void 0 : f.options) ?? {}, [f]);
5306
+ async function b(h) {
5307
+ var v;
5308
+ const x = (v = h == null ? void 0 : h.target) == null ? void 0 : v.files;
5432
5309
  if (!t || t.isDestroyed || x.length === 0)
5433
5310
  return;
5434
5311
  const m = x[0];
5435
- let T = "";
5436
- u.upload ? T = await u.upload(m) : T = URL.createObjectURL(m), t.chain().focus().setVideo({
5437
- src: T,
5312
+ let A = "";
5313
+ u.upload ? A = await u.upload(m) : A = URL.createObjectURL(m), t.chain().focus().setVideo({
5314
+ src: A,
5438
5315
  width: "100%"
5439
5316
  }).run(), d(!1);
5440
5317
  }
5441
- function p(h) {
5318
+ function g(h) {
5442
5319
  h.preventDefault(), h.stopPropagation(), i && (t.chain().focus().setVideo({
5443
5320
  src: i,
5444
5321
  width: "100%"
@@ -5448,26 +5325,26 @@ function Ca() {
5448
5325
  var x;
5449
5326
  h.preventDefault(), (x = a.current) == null || x.click();
5450
5327
  }
5451
- return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(le, { children: [
5452
- /* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
5328
+ return r ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(se, { children: [
5329
+ /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
5453
5330
  /* @__PURE__ */ y(
5454
- _e,
5331
+ Ve,
5455
5332
  {
5456
5333
  activationMode: "manual",
5457
5334
  defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
5458
5335
  children: [
5459
- /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5460
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
5461
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
5336
+ /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5337
+ ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(J, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
5338
+ ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(J, { value: "link", children: e("editor.video.dialog.link") })
5462
5339
  ] }),
5463
- /* @__PURE__ */ y(Q, { value: "upload", children: [
5464
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: k, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
5340
+ /* @__PURE__ */ y(K, { value: "upload", children: [
5341
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: k, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
5465
5342
  /* @__PURE__ */ n(
5466
5343
  "input",
5467
5344
  {
5468
5345
  accept: "video/*",
5469
5346
  multiple: !0,
5470
- onChange: v,
5347
+ onChange: b,
5471
5348
  ref: a,
5472
5349
  type: "file",
5473
5350
  style: {
@@ -5476,10 +5353,10 @@ function Ca() {
5476
5353
  }
5477
5354
  )
5478
5355
  ] }),
5479
- /* @__PURE__ */ y(Q, { value: "link", children: [
5356
+ /* @__PURE__ */ y(K, { value: "link", children: [
5480
5357
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5481
5358
  /* @__PURE__ */ n(
5482
- ae,
5359
+ oe,
5483
5360
  {
5484
5361
  autoFocus: !0,
5485
5362
  placeholder: e("editor.video.dialog.placeholder"),
@@ -5488,14 +5365,14 @@ function Ca() {
5488
5365
  value: i,
5489
5366
  onBlur: (h) => {
5490
5367
  const x = h.target.value, m = u.videoProviders || ["."];
5491
- x && !Kt(x, m) ? s("Invalid video URL") : s("");
5368
+ x && !Gt(x, m) ? s("Invalid video URL") : s("");
5492
5369
  },
5493
5370
  onChange: (h) => {
5494
5371
  o(h.target.value);
5495
5372
  }
5496
5373
  }
5497
5374
  ),
5498
- /* @__PURE__ */ n(X, { onClick: p, type: "button", children: e("editor.video.dialog.button.apply") })
5375
+ /* @__PURE__ */ n(G, { onClick: g, type: "button", children: e("editor.video.dialog.button.apply") })
5499
5376
  ] }) }),
5500
5377
  l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
5501
5378
  ] })
@@ -5504,73 +5381,67 @@ function Ca() {
5504
5381
  )
5505
5382
  ] }) });
5506
5383
  }
5507
- function ka() {
5508
- return /* @__PURE__ */ y(q, { children: [
5509
- /* @__PURE__ */ n(wa, {}),
5510
- /* @__PURE__ */ n(Ca, {}),
5511
- /* @__PURE__ */ n(jo, {})
5384
+ function ma() {
5385
+ return /* @__PURE__ */ y(Z, { children: [
5386
+ /* @__PURE__ */ n(ua, {}),
5387
+ /* @__PURE__ */ n(fa, {}),
5388
+ /* @__PURE__ */ n(zo, {})
5512
5389
  ] });
5513
5390
  }
5514
- process.env.NODE_ENV !== "production" && (ka.displayName = "SlashDialogTrigger");
5391
+ process.env.NODE_ENV !== "production" && (ma.displayName = "SlashDialogTrigger");
5515
5392
  export {
5516
- xo as $,
5517
- fe as A,
5518
- X as B,
5519
- Qe as C,
5393
+ Ha as $,
5394
+ he as A,
5395
+ G as B,
5396
+ Je as C,
5520
5397
  ge as D,
5521
- He as E,
5522
- no as F,
5523
- Ft as G,
5524
- Ua as H,
5525
- Oe as I,
5526
- tt as J,
5527
- Pa as K,
5528
- ke as L,
5529
- ue as M,
5530
- xt as N,
5531
- bt as O,
5532
- ca as P,
5533
- fa as Q,
5534
- Bo as R,
5535
- Ha as S,
5536
- Xn as T,
5537
- Wn as U,
5538
- Tn as V,
5539
- Je as W,
5540
- Oa as X,
5541
- ja as Y,
5542
- _a as Z,
5543
- ka as _,
5544
- Yn as a,
5545
- co as a0,
5546
- Ge as a1,
5547
- Gt as a2,
5548
- Wa as a3,
5549
- Ga as a4,
5550
- Xa as a5,
5551
- _t as b,
5552
- E as c,
5553
- xe as d,
5554
- Ba as e,
5555
- Fa as f,
5556
- vn as g,
5557
- ee as h,
5558
- Rt as i,
5559
- ae as j,
5560
- Vt as k,
5561
- bn as l,
5562
- rt as m,
5563
- le as n,
5564
- ce as o,
5565
- Zn as p,
5566
- Da as q,
5567
- qn as r,
5568
- Kn as s,
5569
- Ot as t,
5570
- it as u,
5571
- de as v,
5572
- Ke as w,
5573
- $a as x,
5574
- Ve as y,
5575
- so as z
5398
+ _e as E,
5399
+ Ia as F,
5400
+ de as G,
5401
+ gt as H,
5402
+ Pe as I,
5403
+ pt as J,
5404
+ ea as K,
5405
+ Ce as L,
5406
+ na as M,
5407
+ Eo as N,
5408
+ kn as O,
5409
+ Ze as P,
5410
+ za as Q,
5411
+ Na as R,
5412
+ Aa as S,
5413
+ $n as T,
5414
+ ma as U,
5415
+ so as V,
5416
+ eo as W,
5417
+ We as X,
5418
+ jt as Y,
5419
+ Va as Z,
5420
+ _a as _,
5421
+ Fn as a,
5422
+ St as b,
5423
+ P as c,
5424
+ pe as d,
5425
+ La as e,
5426
+ Ra as f,
5427
+ pn as g,
5428
+ Q as h,
5429
+ zt as i,
5430
+ oe as j,
5431
+ Lt as k,
5432
+ gn as l,
5433
+ et as m,
5434
+ se as n,
5435
+ le as o,
5436
+ Vt as p,
5437
+ ce as q,
5438
+ qe as r,
5439
+ Ea as s,
5440
+ Re as t,
5441
+ tt as u,
5442
+ Kn as v,
5443
+ Zn as w,
5444
+ Ot as x,
5445
+ Sa as y,
5446
+ Qe as z
5576
5447
  };