@remarkablejames/editor 0.0.3 → 0.0.5

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 (156) hide show
  1. package/lib/{ActionMenuButton-DN6VHLkp.cjs → ActionMenuButton-C6jGtl3k.cjs} +1 -1
  2. package/lib/{ActionMenuButton-D5HLfRzv.js → ActionMenuButton-DBZjUu-F.js} +1 -1
  3. package/lib/Attachment.cjs +1 -19
  4. package/lib/Attachment.js +6 -270
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +2 -2
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +2 -2
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +4 -4
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -2
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +2 -2
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +3 -3
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +2 -2
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +3 -3
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +2 -2
  25. package/lib/{Drawer-BN0lYcnJ.cjs → Drawer-B031ezmA.cjs} +2 -2
  26. package/lib/{Drawer-B9l1SoRJ.js → Drawer-DTCwtJEs.js} +27 -27
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +3 -3
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +6 -6
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +11 -12
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +2 -2
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +2 -2
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +5 -5
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +5 -5
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +5 -5
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +3 -3
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +3 -3
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +2 -2
  49. package/lib/Iframe-BUK2pkOL.cjs +1 -0
  50. package/lib/{Iframe-MjeJ2OOI.js → Iframe-D-UYBxiv.js} +8 -9
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +3 -3
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +2 -2
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +15 -15
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +3 -3
  59. package/lib/{Indent-CgwDItIf.js → Indent-Bvt-Qwar.js} +2 -2
  60. package/lib/{Indent-BPX9XRos.cjs → Indent-_y6N8MIQ.cjs} +1 -1
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +2 -2
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +2 -2
  65. package/lib/{Katex-CZ4g3vA9.js → Katex-CJDtvu-v.js} +63 -63
  66. package/lib/Katex-bJXkt-VP.cjs +4 -0
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +2 -2
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +4 -4
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/{LinkEditBlock-CaDV3Vq5.js → LinkEditBlock-Cdqwj_NU.js} +4 -4
  74. package/lib/{LinkEditBlock-B2bU0Mcr.cjs → LinkEditBlock-ewTApx0K.cjs} +1 -1
  75. package/lib/Mention.js +3 -3
  76. package/lib/{Mermaid-EhYj_ICn.js → Mermaid-CnMYVX1P.js} +3 -3
  77. package/lib/{Mermaid-B9h7XKFo.cjs → Mermaid-Dwz9o-yM.cjs} +1 -1
  78. package/lib/Mermaid.cjs +1 -1
  79. package/lib/Mermaid.js +2 -2
  80. package/lib/MoreMark.cjs +1 -1
  81. package/lib/MoreMark.js +3 -3
  82. package/lib/OrderedList.cjs +1 -1
  83. package/lib/OrderedList.js +2 -2
  84. package/lib/SearchAndReplace.cjs +1 -1
  85. package/lib/SearchAndReplace.js +4 -4
  86. package/lib/SlashCommand.cjs +1 -1
  87. package/lib/SlashCommand.js +6 -6
  88. package/lib/SlashCommandNodeView-BMgQJ4xT.cjs +1 -0
  89. package/lib/{SlashCommandNodeView-CY3peX5x.js → SlashCommandNodeView-DcoLvt_6.js} +78 -88
  90. package/lib/Strike.cjs +1 -1
  91. package/lib/Strike.js +2 -2
  92. package/lib/{Table-DLrtX6T7.cjs → Table-B8CHl8jK.cjs} +1 -1
  93. package/lib/{Table-Bw7rLue7.js → Table-Cu12PvQ_.js} +5 -5
  94. package/lib/Table.cjs +1 -1
  95. package/lib/Table.js +1 -1
  96. package/lib/TaskList.cjs +1 -1
  97. package/lib/TaskList.js +2 -2
  98. package/lib/TextAlign.cjs +1 -1
  99. package/lib/TextAlign.js +3 -3
  100. package/lib/TextDirection.cjs +1 -1
  101. package/lib/TextDirection.js +3 -3
  102. package/lib/TextUnderline.cjs +1 -1
  103. package/lib/TextUnderline.js +2 -2
  104. package/lib/{Twitter-Ck6vGefg.cjs → Twitter-6HYP_upt.cjs} +1 -1
  105. package/lib/{Twitter-pM0y5Z-L.js → Twitter-CrX4XY1j.js} +4 -4
  106. package/lib/Twitter.cjs +1 -1
  107. package/lib/Twitter.js +2 -2
  108. package/lib/Video.cjs +1 -1
  109. package/lib/Video.js +4 -4
  110. package/lib/bubble.cjs +1 -1
  111. package/lib/bubble.js +19 -19
  112. package/lib/{clsx-CDyrfCnw.js → clsx-BUPZHhq3.js} +2 -2
  113. package/lib/components/SlashDialogTrigger/RenderDialogUploadAttachment.d.ts +1 -0
  114. package/lib/{dropdown-menu-nX-u8e2w.js → dropdown-menu-CVwXaR3Z.js} +1 -1
  115. package/lib/{dropdown-menu-DwR8tTs9.cjs → dropdown-menu-XIrQk3jr.cjs} +1 -1
  116. package/lib/extensions/Attachment/Attachment.d.ts +34 -3
  117. package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -1
  118. package/lib/{index-_WrFM-Fk.js → index-B0d-u29p.js} +1529 -1158
  119. package/lib/{index-4Q5IhypJ.js → index-BGd2HiwP.js} +48 -12
  120. package/lib/{index-CsSfYR30.js → index-D4M4hrH4.js} +1 -1
  121. package/lib/{index-DjDf4BK8.js → index-DZj2z9_1.js} +1 -1
  122. package/lib/index-De9MZVWQ.cjs +28 -0
  123. package/lib/index-DgOXAdKt.cjs +1 -0
  124. package/lib/{index-C1WCZhyA.js → index-Dl3OjzmR.js} +1 -1
  125. package/lib/{index-C-tDsIKJ.js → index-RkKGy5oa.js} +1 -1
  126. package/lib/index.cjs +3 -3
  127. package/lib/index.js +13 -13
  128. package/lib/locale-bundle.cjs +1 -1
  129. package/lib/locale-bundle.js +1 -1
  130. package/lib/locales/en.d.ts +194 -188
  131. package/lib/locales/fi.d.ts +194 -188
  132. package/lib/locales/hu.d.ts +194 -188
  133. package/lib/locales/index.d.ts +1164 -1128
  134. package/lib/locales/pt-br.d.ts +194 -188
  135. package/lib/locales/vi.d.ts +194 -188
  136. package/lib/locales/zh-cn.d.ts +194 -188
  137. package/lib/{popover-BY7j9SiD.cjs → popover-0syCfWYi.cjs} +1 -1
  138. package/lib/{popover-CSvY4C-l.js → popover-DDT8YRht.js} +1 -1
  139. package/lib/{renderNodeView-BJSrgyGj.js → renderNodeView-dj6AaFSX.js} +2 -2
  140. package/lib/{select-BelNLNvT.js → select-D9wQw2qB.js} +1 -1
  141. package/lib/{select-Bu-5iIA9.cjs → select-DTNz0ZeE.cjs} +1 -1
  142. package/lib/{separator-Cp9Lg3HU.cjs → separator-D8lOAf8f.cjs} +1 -1
  143. package/lib/{separator-Br5kcIJa.js → separator-DRGTEiX4.js} +3 -3
  144. package/lib/style.css +1 -1
  145. package/lib/{textarea-Ceev4t42.js → textarea-DfVzbMr5.js} +1 -1
  146. package/lib/{textarea-DfqvYaA6.cjs → textarea-DpkwluT0.cjs} +1 -1
  147. package/lib/{updatePosition-e90ZrFWW.js → updatePosition-C294Pixi.js} +2 -2
  148. package/lib/utils/customEvents/events.constant.d.ts +1 -0
  149. package/package.json +1 -1
  150. package/lib/Iframe-CXFk3GEq.cjs +0 -1
  151. package/lib/Katex-DIgsR_dS.cjs +0 -4
  152. package/lib/SlashCommandNodeView-COlWSlnE.cjs +0 -1
  153. package/lib/dom-dataset-BqoJhJXt.cjs +0 -1
  154. package/lib/dom-dataset-CIEeltF6.js +0 -47
  155. package/lib/index-Dib4cXXf.cjs +0 -10
  156. package/lib/index-bVGIXhRg.cjs +0 -1
@@ -1,55 +1,55 @@
1
- import { jsxs as C, jsx as n, Fragment as te } from "react/jsx-runtime";
2
- import * as B from "react";
3
- import Q, { useState as E, useMemo as $, useCallback as de, useEffect as Me, useRef as xe } from "react";
4
- import { y as _t, b as Ut, S as Bt } 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 I, useEffect as ze, useMemo as $, useRef as fe } from "react";
4
+ import { y as Yt, b as Zt, S as qt } from "./index-BG0kQamI.js";
5
5
  import "./theme.js";
6
- import * as X from "@radix-ui/react-dialog";
7
- import { NotebookPen as $t, ExternalLink as Ft, X as lt, Loader2 as Wt, WrapText as Gt, PencilRuler as Xt, FlipHorizontal as Yt, FlipVertical as qt, CropIcon as Zt, ChevronUp as Kt, Paperclip as Jt, Eye as Qt, Settings as er, ZoomOut as tr, ZoomIn as rr, BookMarked as ir, Sigma as nr, SmilePlusIcon as or, Replace as Ye, SmilePlus as ar, Frame as sr, Columns2 as qe, PanelRight as lr, PanelLeft as cr, Clipboard as dr, Copy as ur, GripVertical as hr, Plus as fr, Columns4 as mr, Columns3 as gr, Heading6 as pr, Heading5 as xr, Heading4 as br, Heading3 as vr, Heading2 as wr, Heading1 as yr, Pilcrow as Cr, ChevronsUpDown as kr, Trash as Mr, Trash2 as Ir, TableCellsSplit as Tr, TableCellsMerge as zr, BetweenVerticalEnd as Sr, BetweenVerticalStart as Ar, BetweenHorizonalStart as Lr, BetweenHorizonalEnd as Nr, Unlink as Er, Pencil as Rr, Sparkles as Vr, Table as Hr, Minimize as Dr, Maximize as jr, Video as Pr, ImageUp as Or, Link as _r, ListTodo as Ur, ListOrdered as Br, List as $r, IndentDecrease as Fr, IndentIncrease as Wr, Type as Gr, CodeXml as Xr, Code as Yr, Superscript as qr, Subscript as Zr, ChevronDown as Kr, Undo2 as Jr, Redo2 as Qr, PaintRoller as ei, Eraser as ti, Minus as ri, Strikethrough as ii, Quote as ni, Underline as oi, Italic as ai, LoaderCircle as si, Bold as li, Check as ci } from "lucide-react";
8
- import { j as ct, N as dt, n as di, aa as ui, m as ut, h as Ze, a3 as hi, ab as fi, k as mi } from "./clsx-CDyrfCnw.js";
9
- import { I as Ke, i as Je, j as gi, u as oe, V as pi } from "./index-4Q5IhypJ.js";
10
- import { Slot as ht } from "@radix-ui/react-slot";
11
- import * as be from "@radix-ui/react-tooltip";
12
- import * as ft from "@radix-ui/react-toggle";
13
- import { TextAlignRightIcon as xi, TextAlignLeftIcon as bi, TextAlignJustifyIcon as vi, TextAlignCenterIcon as wi } from "@radix-ui/react-icons";
14
- import * as ie from "@radix-ui/react-tabs";
15
- import yi from "react-image-crop";
16
- import * as je from "@radix-ui/react-checkbox";
17
- import * as mt from "@radix-ui/react-label";
18
- const _e = "-", Ci = (e) => {
19
- const t = Mi(e), {
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 zr, Heading2 as Ir, 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 Ie, h as Le, a3 as Ti, aa as Ai, N as Ge, k as vt, m as Xe, n as Ni, ab as zi } from "./clsx-BUPZHhq3.js";
9
+ import Ii 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";
17
+ import * as yt from "@radix-ui/react-label";
18
+ const Ye = "-", Hi = (e) => {
19
+ const t = Oi(e), {
20
20
  conflictingClassGroups: r,
21
21
  conflictingClassGroupModifiers: i
22
22
  } = e;
23
23
  return {
24
24
  getClassGroupId: (l) => {
25
- const s = l.split(_e);
26
- return s[0] === "" && s.length !== 1 && s.shift(), gt(s, t) || ki(l);
25
+ const s = l.split(Ye);
26
+ return s[0] === "" && s.length !== 1 && s.shift(), Ct(s, t) || Di(l);
27
27
  },
28
28
  getConflictingClassGroupIds: (l, s) => {
29
29
  const c = r[l] || [];
30
30
  return s && i[l] ? [...c, ...i[l]] : c;
31
31
  }
32
32
  };
33
- }, gt = (e, t) => {
33
+ }, Ct = (e, t) => {
34
34
  var l;
35
35
  if (e.length === 0)
36
36
  return t.classGroupId;
37
- const r = e[0], i = t.nextPart.get(r), o = i ? gt(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;
38
38
  if (o)
39
39
  return o;
40
40
  if (t.validators.length === 0)
41
41
  return;
42
- const a = e.join(_e);
42
+ const a = e.join(Ye);
43
43
  return (l = t.validators.find(({
44
44
  validator: s
45
45
  }) => s(a))) == null ? void 0 : l.classGroupId;
46
- }, Qe = /^\[(.+)\]$/, ki = (e) => {
47
- if (Qe.test(e)) {
48
- const t = Qe.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(":"));
49
49
  if (r)
50
50
  return "arbitrary.." + r;
51
51
  }
52
- }, Mi = (e) => {
52
+ }, Oi = (e) => {
53
53
  const {
54
54
  theme: t,
55
55
  prefix: r
@@ -57,19 +57,19 @@ const _e = "-", Ci = (e) => {
57
57
  nextPart: /* @__PURE__ */ new Map(),
58
58
  validators: []
59
59
  };
60
- return Ti(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
- Pe(l, i, a, t);
60
+ return ji(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
+ Fe(l, i, a, t);
62
62
  }), i;
63
- }, Pe = (e, t, r, i) => {
63
+ }, Fe = (e, t, r, i) => {
64
64
  e.forEach((o) => {
65
65
  if (typeof o == "string") {
66
- const a = o === "" ? t : et(t, o);
66
+ const a = o === "" ? t : ct(t, o);
67
67
  a.classGroupId = r;
68
68
  return;
69
69
  }
70
70
  if (typeof o == "function") {
71
- if (Ii(o)) {
72
- Pe(o(i), t, r, i);
71
+ if (Pi(o)) {
72
+ Fe(o(i), t, r, i);
73
73
  return;
74
74
  }
75
75
  t.validators.push({
@@ -79,21 +79,21 @@ const _e = "-", Ci = (e) => {
79
79
  return;
80
80
  }
81
81
  Object.entries(o).forEach(([a, l]) => {
82
- Pe(l, et(t, a), r, i);
82
+ Fe(l, ct(t, a), r, i);
83
83
  });
84
84
  });
85
- }, et = (e, t) => {
85
+ }, ct = (e, t) => {
86
86
  let r = e;
87
- return t.split(_e).forEach((i) => {
87
+ return t.split(Ye).forEach((i) => {
88
88
  r.nextPart.has(i) || r.nextPart.set(i, {
89
89
  nextPart: /* @__PURE__ */ new Map(),
90
90
  validators: []
91
91
  }), r = r.nextPart.get(i);
92
92
  }), r;
93
- }, Ii = (e) => e.isThemeGetter, Ti = (e, t) => t ? e.map(([r, i]) => {
93
+ }, Pi = (e) => e.isThemeGetter, ji = (e, t) => t ? e.map(([r, i]) => {
94
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);
95
95
  return [r, o];
96
- }) : e, zi = (e) => {
96
+ }) : e, Bi = (e) => {
97
97
  if (e < 1)
98
98
  return {
99
99
  get: () => {
@@ -117,32 +117,32 @@ const _e = "-", Ci = (e) => {
117
117
  r.has(a) ? r.set(a, l) : o(a, l);
118
118
  }
119
119
  };
120
- }, pt = "!", Si = (e) => {
120
+ }, kt = "!", Ui = (e) => {
121
121
  const {
122
122
  separator: t,
123
123
  experimentalParseClassName: r
124
124
  } = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
125
125
  const c = [];
126
- let d = 0, g = 0, p;
127
- for (let u = 0; u < s.length; u++) {
128
- let y = s[u];
126
+ let d = 0, f = 0, p;
127
+ for (let h = 0; h < s.length; h++) {
128
+ let x = s[h];
129
129
  if (d === 0) {
130
- if (y === o && (i || s.slice(u, u + a) === t)) {
131
- c.push(s.slice(g, u)), g = u + a;
130
+ if (x === o && (i || s.slice(h, h + a) === t)) {
131
+ c.push(s.slice(f, h)), f = h + a;
132
132
  continue;
133
133
  }
134
- if (y === "/") {
135
- p = u;
134
+ if (x === "/") {
135
+ p = h;
136
136
  continue;
137
137
  }
138
138
  }
139
- y === "[" ? d++ : y === "]" && d--;
139
+ x === "[" ? d++ : x === "]" && d--;
140
140
  }
141
- const h = c.length === 0 ? s : s.substring(g), b = h.startsWith(pt), f = b ? h.substring(1) : h, k = p && p > g ? p - g : 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;
142
142
  return {
143
143
  modifiers: c,
144
144
  hasImportantModifier: b,
145
- baseClassName: f,
145
+ baseClassName: g,
146
146
  maybePostfixModifierPosition: k
147
147
  };
148
148
  };
@@ -150,7 +150,7 @@ const _e = "-", Ci = (e) => {
150
150
  className: s,
151
151
  parseClassName: l
152
152
  }) : l;
153
- }, Ai = (e) => {
153
+ }, $i = (e) => {
154
154
  if (e.length <= 1)
155
155
  return e;
156
156
  const t = [];
@@ -158,122 +158,122 @@ const _e = "-", Ci = (e) => {
158
158
  return e.forEach((i) => {
159
159
  i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
160
160
  }), t.push(...r.sort()), t;
161
- }, Li = (e) => ({
162
- cache: zi(e.cacheSize),
163
- parseClassName: Si(e),
164
- ...Ci(e)
165
- }), Ni = /\s+/, Ei = (e, t) => {
161
+ }, Fi = (e) => ({
162
+ cache: Bi(e.cacheSize),
163
+ parseClassName: Ui(e),
164
+ ...Hi(e)
165
+ }), Wi = /\s+/, Gi = (e, t) => {
166
166
  const {
167
167
  parseClassName: r,
168
168
  getClassGroupId: i,
169
169
  getConflictingClassGroupIds: o
170
- } = t, a = [], l = e.trim().split(Ni);
170
+ } = t, a = [], l = e.trim().split(Wi);
171
171
  let s = "";
172
172
  for (let c = l.length - 1; c >= 0; c -= 1) {
173
173
  const d = l[c], {
174
- modifiers: g,
174
+ modifiers: f,
175
175
  hasImportantModifier: p,
176
- baseClassName: h,
176
+ baseClassName: u,
177
177
  maybePostfixModifierPosition: b
178
178
  } = r(d);
179
- let f = !!b, k = i(f ? h.substring(0, b) : h);
179
+ let g = !!b, k = i(g ? u.substring(0, b) : u);
180
180
  if (!k) {
181
- if (!f) {
181
+ if (!g) {
182
182
  s = d + (s.length > 0 ? " " + s : s);
183
183
  continue;
184
184
  }
185
- if (k = i(h), !k) {
185
+ if (k = i(u), !k) {
186
186
  s = d + (s.length > 0 ? " " + s : s);
187
187
  continue;
188
188
  }
189
- f = !1;
189
+ g = !1;
190
190
  }
191
- const u = Ai(g).join(":"), y = p ? u + pt : u, m = y + k;
191
+ const h = $i(f).join(":"), x = p ? h + kt : h, m = x + k;
192
192
  if (a.includes(m))
193
193
  continue;
194
194
  a.push(m);
195
- const z = o(k, f);
196
- for (let v = 0; v < z.length; ++v) {
197
- const A = z[v];
198
- a.push(y + 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);
199
199
  }
200
200
  s = d + (s.length > 0 ? " " + s : s);
201
201
  }
202
202
  return s;
203
203
  };
204
- function Ri() {
204
+ function Xi() {
205
205
  let e = 0, t, r, i = "";
206
206
  for (; e < arguments.length; )
207
- (t = arguments[e++]) && (r = xt(t)) && (i && (i += " "), i += r);
207
+ (t = arguments[e++]) && (r = Mt(t)) && (i && (i += " "), i += r);
208
208
  return i;
209
209
  }
210
- const xt = (e) => {
210
+ const Mt = (e) => {
211
211
  if (typeof e == "string")
212
212
  return e;
213
213
  let t, r = "";
214
214
  for (let i = 0; i < e.length; i++)
215
- e[i] && (t = xt(e[i])) && (r && (r += " "), r += t);
215
+ e[i] && (t = Mt(e[i])) && (r && (r += " "), r += t);
216
216
  return r;
217
217
  };
218
- function Vi(e, ...t) {
218
+ function Yi(e, ...t) {
219
219
  let r, i, o, a = l;
220
220
  function l(c) {
221
- const d = t.reduce((g, p) => p(g), e());
222
- return r = Li(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);
223
223
  }
224
224
  function s(c) {
225
225
  const d = i(c);
226
226
  if (d)
227
227
  return d;
228
- const g = Ei(c, r);
229
- return o(c, g), g;
228
+ const f = Gi(c, r);
229
+ return o(c, f), f;
230
230
  }
231
231
  return function() {
232
- return a(Ri.apply(null, arguments));
232
+ return a(Xi.apply(null, arguments));
233
233
  };
234
234
  }
235
- const N = (e) => {
235
+ const E = (e) => {
236
236
  const t = (r) => r[e] || [];
237
237
  return t.isThemeGetter = !0, t;
238
- }, bt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Hi = /^\d+\/\d+$/, Di = /* @__PURE__ */ new Set(["px", "full", "screen"]), ji = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Pi = /\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$/, Oi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, _i = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ui = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Y = (e) => ne(e) || Di.has(e) || Hi.test(e), K = (e) => ae(e, "length", qi), ne = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => ae(e, "number", ne), ue = (e) => !!e && Number.isInteger(Number(e)), Bi = (e) => e.endsWith("%") && ne(e.slice(0, -1)), M = (e) => bt.test(e), J = (e) => ji.test(e), $i = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Fi = (e) => ae(e, $i, vt), Wi = (e) => ae(e, "position", vt), Gi = /* @__PURE__ */ new Set(["image", "url"]), Xi = (e) => ae(e, Gi, Ki), Yi = (e) => ae(e, "", Zi), he = () => !0, ae = (e, t, r) => {
239
- const i = bt.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);
240
240
  return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
241
- }, qi = (e) => (
241
+ }, dn = (e) => (
242
242
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
243
243
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
244
244
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
245
- Pi.test(e) && !Oi.test(e)
246
- ), vt = () => !1, Zi = (e) => _i.test(e), Ki = (e) => Ui.test(e), Ji = () => {
247
- const e = N("colors"), t = N("spacing"), r = N("blur"), i = N("brightness"), o = N("borderColor"), a = N("borderRadius"), l = N("borderSpacing"), s = N("borderWidth"), c = N("contrast"), d = N("grayscale"), g = N("hueRotate"), p = N("invert"), h = N("gap"), b = N("gradientColorStops"), f = N("gradientColorStopPositions"), k = N("inset"), u = N("margin"), y = N("opacity"), m = N("padding"), z = N("saturate"), v = N("scale"), A = N("sepia"), w = N("skew"), L = N("space"), V = N("translate"), D = () => ["auto", "contain", "none"], j = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", M, t], T = () => [M, t], x = () => ["", Y, K], I = () => ["auto", ne, M], R = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], P = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", M], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ne, 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"], z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], B = () => ["", "0", M], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ue, M];
248
248
  return {
249
249
  cacheSize: 500,
250
250
  separator: ":",
251
251
  theme: {
252
- colors: [he],
253
- spacing: [Y, K],
254
- blur: ["none", "", J, M],
252
+ colors: [ve],
253
+ spacing: [q, ee],
254
+ blur: ["none", "", te, M],
255
255
  brightness: W(),
256
256
  borderColor: [e],
257
- borderRadius: ["none", "", "full", J, M],
258
- borderSpacing: T(),
259
- borderWidth: x(),
257
+ borderRadius: ["none", "", "full", te, M],
258
+ borderSpacing: N(),
259
+ borderWidth: w(),
260
260
  contrast: W(),
261
- grayscale: U(),
261
+ grayscale: B(),
262
262
  hueRotate: W(),
263
- invert: U(),
264
- gap: T(),
263
+ invert: B(),
264
+ gap: N(),
265
265
  gradientColorStops: [e],
266
- gradientColorStopPositions: [Bi, K],
267
- inset: _(),
268
- margin: _(),
266
+ gradientColorStopPositions: [rn, ee],
267
+ inset: j(),
268
+ margin: j(),
269
269
  opacity: W(),
270
- padding: T(),
270
+ padding: N(),
271
271
  saturate: W(),
272
272
  scale: W(),
273
- sepia: U(),
273
+ sepia: B(),
274
274
  skew: W(),
275
- space: T(),
276
- translate: T()
275
+ space: N(),
276
+ translate: N()
277
277
  },
278
278
  classGroups: {
279
279
  // Layout
@@ -294,7 +294,7 @@ const N = (e) => {
294
294
  * @see https://tailwindcss.com/docs/columns
295
295
  */
296
296
  columns: [{
297
- columns: [J]
297
+ columns: [te]
298
298
  }],
299
299
  /**
300
300
  * Break After
@@ -374,42 +374,42 @@ const N = (e) => {
374
374
  * @see https://tailwindcss.com/docs/overflow
375
375
  */
376
376
  overflow: [{
377
- overflow: j()
377
+ overflow: D()
378
378
  }],
379
379
  /**
380
380
  * Overflow X
381
381
  * @see https://tailwindcss.com/docs/overflow
382
382
  */
383
383
  "overflow-x": [{
384
- "overflow-x": j()
384
+ "overflow-x": D()
385
385
  }],
386
386
  /**
387
387
  * Overflow Y
388
388
  * @see https://tailwindcss.com/docs/overflow
389
389
  */
390
390
  "overflow-y": [{
391
- "overflow-y": j()
391
+ "overflow-y": D()
392
392
  }],
393
393
  /**
394
394
  * Overscroll Behavior
395
395
  * @see https://tailwindcss.com/docs/overscroll-behavior
396
396
  */
397
397
  overscroll: [{
398
- overscroll: D()
398
+ overscroll: H()
399
399
  }],
400
400
  /**
401
401
  * Overscroll Behavior X
402
402
  * @see https://tailwindcss.com/docs/overscroll-behavior
403
403
  */
404
404
  "overscroll-x": [{
405
- "overscroll-x": D()
405
+ "overscroll-x": H()
406
406
  }],
407
407
  /**
408
408
  * Overscroll Behavior Y
409
409
  * @see https://tailwindcss.com/docs/overscroll-behavior
410
410
  */
411
411
  "overscroll-y": [{
412
- "overscroll-y": D()
412
+ "overscroll-y": H()
413
413
  }],
414
414
  /**
415
415
  * Position
@@ -489,7 +489,7 @@ const N = (e) => {
489
489
  * @see https://tailwindcss.com/docs/z-index
490
490
  */
491
491
  z: [{
492
- z: ["auto", ue, M]
492
+ z: ["auto", xe, M]
493
493
  }],
494
494
  // Flexbox and Grid
495
495
  /**
@@ -497,7 +497,7 @@ const N = (e) => {
497
497
  * @see https://tailwindcss.com/docs/flex-basis
498
498
  */
499
499
  basis: [{
500
- basis: _()
500
+ basis: j()
501
501
  }],
502
502
  /**
503
503
  * Flex Direction
@@ -525,28 +525,28 @@ const N = (e) => {
525
525
  * @see https://tailwindcss.com/docs/flex-grow
526
526
  */
527
527
  grow: [{
528
- grow: U()
528
+ grow: B()
529
529
  }],
530
530
  /**
531
531
  * Flex Shrink
532
532
  * @see https://tailwindcss.com/docs/flex-shrink
533
533
  */
534
534
  shrink: [{
535
- shrink: U()
535
+ shrink: B()
536
536
  }],
537
537
  /**
538
538
  * Order
539
539
  * @see https://tailwindcss.com/docs/order
540
540
  */
541
541
  order: [{
542
- order: ["first", "last", "none", ue, M]
542
+ order: ["first", "last", "none", xe, M]
543
543
  }],
544
544
  /**
545
545
  * Grid Template Columns
546
546
  * @see https://tailwindcss.com/docs/grid-template-columns
547
547
  */
548
548
  "grid-cols": [{
549
- "grid-cols": [he]
549
+ "grid-cols": [ve]
550
550
  }],
551
551
  /**
552
552
  * Grid Column Start / End
@@ -554,7 +554,7 @@ const N = (e) => {
554
554
  */
555
555
  "col-start-end": [{
556
556
  col: ["auto", {
557
- span: ["full", ue, M]
557
+ span: ["full", xe, M]
558
558
  }, M]
559
559
  }],
560
560
  /**
@@ -562,21 +562,21 @@ const N = (e) => {
562
562
  * @see https://tailwindcss.com/docs/grid-column
563
563
  */
564
564
  "col-start": [{
565
- "col-start": I()
565
+ "col-start": T()
566
566
  }],
567
567
  /**
568
568
  * Grid Column End
569
569
  * @see https://tailwindcss.com/docs/grid-column
570
570
  */
571
571
  "col-end": [{
572
- "col-end": I()
572
+ "col-end": T()
573
573
  }],
574
574
  /**
575
575
  * Grid Template Rows
576
576
  * @see https://tailwindcss.com/docs/grid-template-rows
577
577
  */
578
578
  "grid-rows": [{
579
- "grid-rows": [he]
579
+ "grid-rows": [ve]
580
580
  }],
581
581
  /**
582
582
  * Grid Row Start / End
@@ -584,7 +584,7 @@ const N = (e) => {
584
584
  */
585
585
  "row-start-end": [{
586
586
  row: ["auto", {
587
- span: [ue, M]
587
+ span: [xe, M]
588
588
  }, M]
589
589
  }],
590
590
  /**
@@ -592,14 +592,14 @@ const N = (e) => {
592
592
  * @see https://tailwindcss.com/docs/grid-row
593
593
  */
594
594
  "row-start": [{
595
- "row-start": I()
595
+ "row-start": T()
596
596
  }],
597
597
  /**
598
598
  * Grid Row End
599
599
  * @see https://tailwindcss.com/docs/grid-row
600
600
  */
601
601
  "row-end": [{
602
- "row-end": I()
602
+ "row-end": T()
603
603
  }],
604
604
  /**
605
605
  * Grid Auto Flow
@@ -627,28 +627,28 @@ const N = (e) => {
627
627
  * @see https://tailwindcss.com/docs/gap
628
628
  */
629
629
  gap: [{
630
- gap: [h]
630
+ gap: [u]
631
631
  }],
632
632
  /**
633
633
  * Gap X
634
634
  * @see https://tailwindcss.com/docs/gap
635
635
  */
636
636
  "gap-x": [{
637
- "gap-x": [h]
637
+ "gap-x": [u]
638
638
  }],
639
639
  /**
640
640
  * Gap Y
641
641
  * @see https://tailwindcss.com/docs/gap
642
642
  */
643
643
  "gap-y": [{
644
- "gap-y": [h]
644
+ "gap-y": [u]
645
645
  }],
646
646
  /**
647
647
  * Justify Content
648
648
  * @see https://tailwindcss.com/docs/justify-content
649
649
  */
650
650
  "justify-content": [{
651
- justify: ["normal", ...S()]
651
+ justify: ["normal", ...z()]
652
652
  }],
653
653
  /**
654
654
  * Justify Items
@@ -669,7 +669,7 @@ const N = (e) => {
669
669
  * @see https://tailwindcss.com/docs/align-content
670
670
  */
671
671
  "align-content": [{
672
- content: ["normal", ...S(), "baseline"]
672
+ content: ["normal", ...z(), "baseline"]
673
673
  }],
674
674
  /**
675
675
  * Align Items
@@ -690,7 +690,7 @@ const N = (e) => {
690
690
  * @see https://tailwindcss.com/docs/place-content
691
691
  */
692
692
  "place-content": [{
693
- "place-content": [...S(), "baseline"]
693
+ "place-content": [...z(), "baseline"]
694
694
  }],
695
695
  /**
696
696
  * Place Items
@@ -775,70 +775,70 @@ const N = (e) => {
775
775
  * @see https://tailwindcss.com/docs/margin
776
776
  */
777
777
  m: [{
778
- m: [u]
778
+ m: [h]
779
779
  }],
780
780
  /**
781
781
  * Margin X
782
782
  * @see https://tailwindcss.com/docs/margin
783
783
  */
784
784
  mx: [{
785
- mx: [u]
785
+ mx: [h]
786
786
  }],
787
787
  /**
788
788
  * Margin Y
789
789
  * @see https://tailwindcss.com/docs/margin
790
790
  */
791
791
  my: [{
792
- my: [u]
792
+ my: [h]
793
793
  }],
794
794
  /**
795
795
  * Margin Start
796
796
  * @see https://tailwindcss.com/docs/margin
797
797
  */
798
798
  ms: [{
799
- ms: [u]
799
+ ms: [h]
800
800
  }],
801
801
  /**
802
802
  * Margin End
803
803
  * @see https://tailwindcss.com/docs/margin
804
804
  */
805
805
  me: [{
806
- me: [u]
806
+ me: [h]
807
807
  }],
808
808
  /**
809
809
  * Margin Top
810
810
  * @see https://tailwindcss.com/docs/margin
811
811
  */
812
812
  mt: [{
813
- mt: [u]
813
+ mt: [h]
814
814
  }],
815
815
  /**
816
816
  * Margin Right
817
817
  * @see https://tailwindcss.com/docs/margin
818
818
  */
819
819
  mr: [{
820
- mr: [u]
820
+ mr: [h]
821
821
  }],
822
822
  /**
823
823
  * Margin Bottom
824
824
  * @see https://tailwindcss.com/docs/margin
825
825
  */
826
826
  mb: [{
827
- mb: [u]
827
+ mb: [h]
828
828
  }],
829
829
  /**
830
830
  * Margin Left
831
831
  * @see https://tailwindcss.com/docs/margin
832
832
  */
833
833
  ml: [{
834
- ml: [u]
834
+ ml: [h]
835
835
  }],
836
836
  /**
837
837
  * Space Between X
838
838
  * @see https://tailwindcss.com/docs/space
839
839
  */
840
840
  "space-x": [{
841
- "space-x": [L]
841
+ "space-x": [S]
842
842
  }],
843
843
  /**
844
844
  * Space Between X Reverse
@@ -850,7 +850,7 @@ const N = (e) => {
850
850
  * @see https://tailwindcss.com/docs/space
851
851
  */
852
852
  "space-y": [{
853
- "space-y": [L]
853
+ "space-y": [S]
854
854
  }],
855
855
  /**
856
856
  * Space Between Y Reverse
@@ -878,8 +878,8 @@ const N = (e) => {
878
878
  */
879
879
  "max-w": [{
880
880
  "max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
881
- screen: [J]
882
- }, J]
881
+ screen: [te]
882
+ }, te]
883
883
  }],
884
884
  /**
885
885
  * Height
@@ -915,7 +915,7 @@ const N = (e) => {
915
915
  * @see https://tailwindcss.com/docs/font-size
916
916
  */
917
917
  "font-size": [{
918
- text: ["base", J, K]
918
+ text: ["base", te, ee]
919
919
  }],
920
920
  /**
921
921
  * Font Smoothing
@@ -932,14 +932,14 @@ const N = (e) => {
932
932
  * @see https://tailwindcss.com/docs/font-weight
933
933
  */
934
934
  "font-weight": [{
935
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Le]
935
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", He]
936
936
  }],
937
937
  /**
938
938
  * Font Family
939
939
  * @see https://tailwindcss.com/docs/font-family
940
940
  */
941
941
  "font-family": [{
942
- font: [he]
942
+ font: [ve]
943
943
  }],
944
944
  /**
945
945
  * Font Variant Numeric
@@ -983,14 +983,14 @@ const N = (e) => {
983
983
  * @see https://tailwindcss.com/docs/line-clamp
984
984
  */
985
985
  "line-clamp": [{
986
- "line-clamp": ["none", ne, Le]
986
+ "line-clamp": ["none", ue, He]
987
987
  }],
988
988
  /**
989
989
  * Line Height
990
990
  * @see https://tailwindcss.com/docs/line-height
991
991
  */
992
992
  leading: [{
993
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Y, M]
993
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", q, M]
994
994
  }],
995
995
  /**
996
996
  * List Style Image
@@ -1026,7 +1026,7 @@ const N = (e) => {
1026
1026
  * @see https://tailwindcss.com/docs/placeholder-opacity
1027
1027
  */
1028
1028
  "placeholder-opacity": [{
1029
- "placeholder-opacity": [y]
1029
+ "placeholder-opacity": [x]
1030
1030
  }],
1031
1031
  /**
1032
1032
  * Text Alignment
@@ -1047,7 +1047,7 @@ const N = (e) => {
1047
1047
  * @see https://tailwindcss.com/docs/text-opacity
1048
1048
  */
1049
1049
  "text-opacity": [{
1050
- "text-opacity": [y]
1050
+ "text-opacity": [x]
1051
1051
  }],
1052
1052
  /**
1053
1053
  * Text Decoration
@@ -1059,21 +1059,21 @@ const N = (e) => {
1059
1059
  * @see https://tailwindcss.com/docs/text-decoration-style
1060
1060
  */
1061
1061
  "text-decoration-style": [{
1062
- decoration: [...H(), "wavy"]
1062
+ decoration: [..._(), "wavy"]
1063
1063
  }],
1064
1064
  /**
1065
1065
  * Text Decoration Thickness
1066
1066
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1067
1067
  */
1068
1068
  "text-decoration-thickness": [{
1069
- decoration: ["auto", "from-font", Y, K]
1069
+ decoration: ["auto", "from-font", q, ee]
1070
1070
  }],
1071
1071
  /**
1072
1072
  * Text Underline Offset
1073
1073
  * @see https://tailwindcss.com/docs/text-underline-offset
1074
1074
  */
1075
1075
  "underline-offset": [{
1076
- "underline-offset": ["auto", Y, M]
1076
+ "underline-offset": ["auto", q, M]
1077
1077
  }],
1078
1078
  /**
1079
1079
  * Text Decoration Color
@@ -1104,7 +1104,7 @@ const N = (e) => {
1104
1104
  * @see https://tailwindcss.com/docs/text-indent
1105
1105
  */
1106
1106
  indent: [{
1107
- indent: T()
1107
+ indent: N()
1108
1108
  }],
1109
1109
  /**
1110
1110
  * Vertical Alignment
@@ -1162,7 +1162,7 @@ const N = (e) => {
1162
1162
  * @see https://tailwindcss.com/docs/background-opacity
1163
1163
  */
1164
1164
  "bg-opacity": [{
1165
- "bg-opacity": [y]
1165
+ "bg-opacity": [x]
1166
1166
  }],
1167
1167
  /**
1168
1168
  * Background Origin
@@ -1176,7 +1176,7 @@ const N = (e) => {
1176
1176
  * @see https://tailwindcss.com/docs/background-position
1177
1177
  */
1178
1178
  "bg-position": [{
1179
- bg: [...R(), Wi]
1179
+ bg: [...R(), an]
1180
1180
  }],
1181
1181
  /**
1182
1182
  * Background Repeat
@@ -1192,7 +1192,7 @@ const N = (e) => {
1192
1192
  * @see https://tailwindcss.com/docs/background-size
1193
1193
  */
1194
1194
  "bg-size": [{
1195
- bg: ["auto", "cover", "contain", Fi]
1195
+ bg: ["auto", "cover", "contain", on]
1196
1196
  }],
1197
1197
  /**
1198
1198
  * Background Image
@@ -1201,7 +1201,7 @@ const N = (e) => {
1201
1201
  "bg-image": [{
1202
1202
  bg: ["none", {
1203
1203
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1204
- }, Xi]
1204
+ }, ln]
1205
1205
  }],
1206
1206
  /**
1207
1207
  * Background Color
@@ -1215,21 +1215,21 @@ const N = (e) => {
1215
1215
  * @see https://tailwindcss.com/docs/gradient-color-stops
1216
1216
  */
1217
1217
  "gradient-from-pos": [{
1218
- from: [f]
1218
+ from: [g]
1219
1219
  }],
1220
1220
  /**
1221
1221
  * Gradient Color Stops Via Position
1222
1222
  * @see https://tailwindcss.com/docs/gradient-color-stops
1223
1223
  */
1224
1224
  "gradient-via-pos": [{
1225
- via: [f]
1225
+ via: [g]
1226
1226
  }],
1227
1227
  /**
1228
1228
  * Gradient Color Stops To Position
1229
1229
  * @see https://tailwindcss.com/docs/gradient-color-stops
1230
1230
  */
1231
1231
  "gradient-to-pos": [{
1232
- to: [f]
1232
+ to: [g]
1233
1233
  }],
1234
1234
  /**
1235
1235
  * Gradient Color Stops From
@@ -1426,14 +1426,14 @@ const N = (e) => {
1426
1426
  * @see https://tailwindcss.com/docs/border-opacity
1427
1427
  */
1428
1428
  "border-opacity": [{
1429
- "border-opacity": [y]
1429
+ "border-opacity": [x]
1430
1430
  }],
1431
1431
  /**
1432
1432
  * Border Style
1433
1433
  * @see https://tailwindcss.com/docs/border-style
1434
1434
  */
1435
1435
  "border-style": [{
1436
- border: [...H(), "hidden"]
1436
+ border: [..._(), "hidden"]
1437
1437
  }],
1438
1438
  /**
1439
1439
  * Divide Width X
@@ -1464,14 +1464,14 @@ const N = (e) => {
1464
1464
  * @see https://tailwindcss.com/docs/divide-opacity
1465
1465
  */
1466
1466
  "divide-opacity": [{
1467
- "divide-opacity": [y]
1467
+ "divide-opacity": [x]
1468
1468
  }],
1469
1469
  /**
1470
1470
  * Divide Style
1471
1471
  * @see https://tailwindcss.com/docs/divide-style
1472
1472
  */
1473
1473
  "divide-style": [{
1474
- divide: H()
1474
+ divide: _()
1475
1475
  }],
1476
1476
  /**
1477
1477
  * Border Color
@@ -1548,21 +1548,21 @@ const N = (e) => {
1548
1548
  * @see https://tailwindcss.com/docs/outline-style
1549
1549
  */
1550
1550
  "outline-style": [{
1551
- outline: ["", ...H()]
1551
+ outline: ["", ..._()]
1552
1552
  }],
1553
1553
  /**
1554
1554
  * Outline Offset
1555
1555
  * @see https://tailwindcss.com/docs/outline-offset
1556
1556
  */
1557
1557
  "outline-offset": [{
1558
- "outline-offset": [Y, M]
1558
+ "outline-offset": [q, M]
1559
1559
  }],
1560
1560
  /**
1561
1561
  * Outline Width
1562
1562
  * @see https://tailwindcss.com/docs/outline-width
1563
1563
  */
1564
1564
  "outline-w": [{
1565
- outline: [Y, K]
1565
+ outline: [q, ee]
1566
1566
  }],
1567
1567
  /**
1568
1568
  * Outline Color
@@ -1576,7 +1576,7 @@ const N = (e) => {
1576
1576
  * @see https://tailwindcss.com/docs/ring-width
1577
1577
  */
1578
1578
  "ring-w": [{
1579
- ring: x()
1579
+ ring: w()
1580
1580
  }],
1581
1581
  /**
1582
1582
  * Ring Width Inset
@@ -1595,14 +1595,14 @@ const N = (e) => {
1595
1595
  * @see https://tailwindcss.com/docs/ring-opacity
1596
1596
  */
1597
1597
  "ring-opacity": [{
1598
- "ring-opacity": [y]
1598
+ "ring-opacity": [x]
1599
1599
  }],
1600
1600
  /**
1601
1601
  * Ring Offset Width
1602
1602
  * @see https://tailwindcss.com/docs/ring-offset-width
1603
1603
  */
1604
1604
  "ring-offset-w": [{
1605
- "ring-offset": [Y, K]
1605
+ "ring-offset": [q, ee]
1606
1606
  }],
1607
1607
  /**
1608
1608
  * Ring Offset Color
@@ -1617,35 +1617,35 @@ const N = (e) => {
1617
1617
  * @see https://tailwindcss.com/docs/box-shadow
1618
1618
  */
1619
1619
  shadow: [{
1620
- shadow: ["", "inner", "none", J, Yi]
1620
+ shadow: ["", "inner", "none", te, cn]
1621
1621
  }],
1622
1622
  /**
1623
1623
  * Box Shadow Color
1624
1624
  * @see https://tailwindcss.com/docs/box-shadow-color
1625
1625
  */
1626
1626
  "shadow-color": [{
1627
- shadow: [he]
1627
+ shadow: [ve]
1628
1628
  }],
1629
1629
  /**
1630
1630
  * Opacity
1631
1631
  * @see https://tailwindcss.com/docs/opacity
1632
1632
  */
1633
1633
  opacity: [{
1634
- opacity: [y]
1634
+ opacity: [x]
1635
1635
  }],
1636
1636
  /**
1637
1637
  * Mix Blend Mode
1638
1638
  * @see https://tailwindcss.com/docs/mix-blend-mode
1639
1639
  */
1640
1640
  "mix-blend": [{
1641
- "mix-blend": [...P(), "plus-lighter", "plus-darker"]
1641
+ "mix-blend": [...O(), "plus-lighter", "plus-darker"]
1642
1642
  }],
1643
1643
  /**
1644
1644
  * Background Blend Mode
1645
1645
  * @see https://tailwindcss.com/docs/background-blend-mode
1646
1646
  */
1647
1647
  "bg-blend": [{
1648
- "bg-blend": P()
1648
+ "bg-blend": O()
1649
1649
  }],
1650
1650
  // Filters
1651
1651
  /**
@@ -1682,7 +1682,7 @@ const N = (e) => {
1682
1682
  * @see https://tailwindcss.com/docs/drop-shadow
1683
1683
  */
1684
1684
  "drop-shadow": [{
1685
- "drop-shadow": ["", "none", J, M]
1685
+ "drop-shadow": ["", "none", te, M]
1686
1686
  }],
1687
1687
  /**
1688
1688
  * Grayscale
@@ -1696,7 +1696,7 @@ const N = (e) => {
1696
1696
  * @see https://tailwindcss.com/docs/hue-rotate
1697
1697
  */
1698
1698
  "hue-rotate": [{
1699
- "hue-rotate": [g]
1699
+ "hue-rotate": [f]
1700
1700
  }],
1701
1701
  /**
1702
1702
  * Invert
@@ -1710,14 +1710,14 @@ const N = (e) => {
1710
1710
  * @see https://tailwindcss.com/docs/saturate
1711
1711
  */
1712
1712
  saturate: [{
1713
- saturate: [z]
1713
+ saturate: [A]
1714
1714
  }],
1715
1715
  /**
1716
1716
  * Sepia
1717
1717
  * @see https://tailwindcss.com/docs/sepia
1718
1718
  */
1719
1719
  sepia: [{
1720
- sepia: [A]
1720
+ sepia: [L]
1721
1721
  }],
1722
1722
  /**
1723
1723
  * Backdrop Filter
@@ -1760,7 +1760,7 @@ const N = (e) => {
1760
1760
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1761
1761
  */
1762
1762
  "backdrop-hue-rotate": [{
1763
- "backdrop-hue-rotate": [g]
1763
+ "backdrop-hue-rotate": [f]
1764
1764
  }],
1765
1765
  /**
1766
1766
  * Backdrop Invert
@@ -1774,21 +1774,21 @@ const N = (e) => {
1774
1774
  * @see https://tailwindcss.com/docs/backdrop-opacity
1775
1775
  */
1776
1776
  "backdrop-opacity": [{
1777
- "backdrop-opacity": [y]
1777
+ "backdrop-opacity": [x]
1778
1778
  }],
1779
1779
  /**
1780
1780
  * Backdrop Saturate
1781
1781
  * @see https://tailwindcss.com/docs/backdrop-saturate
1782
1782
  */
1783
1783
  "backdrop-saturate": [{
1784
- "backdrop-saturate": [z]
1784
+ "backdrop-saturate": [A]
1785
1785
  }],
1786
1786
  /**
1787
1787
  * Backdrop Sepia
1788
1788
  * @see https://tailwindcss.com/docs/backdrop-sepia
1789
1789
  */
1790
1790
  "backdrop-sepia": [{
1791
- "backdrop-sepia": [A]
1791
+ "backdrop-sepia": [L]
1792
1792
  }],
1793
1793
  // Tables
1794
1794
  /**
@@ -1903,7 +1903,7 @@ const N = (e) => {
1903
1903
  * @see https://tailwindcss.com/docs/rotate
1904
1904
  */
1905
1905
  rotate: [{
1906
- rotate: [ue, M]
1906
+ rotate: [xe, M]
1907
1907
  }],
1908
1908
  /**
1909
1909
  * Translate X
@@ -1924,14 +1924,14 @@ const N = (e) => {
1924
1924
  * @see https://tailwindcss.com/docs/skew
1925
1925
  */
1926
1926
  "skew-x": [{
1927
- "skew-x": [w]
1927
+ "skew-x": [C]
1928
1928
  }],
1929
1929
  /**
1930
1930
  * Skew Y
1931
1931
  * @see https://tailwindcss.com/docs/skew
1932
1932
  */
1933
1933
  "skew-y": [{
1934
- "skew-y": [w]
1934
+ "skew-y": [C]
1935
1935
  }],
1936
1936
  /**
1937
1937
  * Transform Origin
@@ -1995,126 +1995,126 @@ const N = (e) => {
1995
1995
  * @see https://tailwindcss.com/docs/scroll-margin
1996
1996
  */
1997
1997
  "scroll-m": [{
1998
- "scroll-m": T()
1998
+ "scroll-m": N()
1999
1999
  }],
2000
2000
  /**
2001
2001
  * Scroll Margin X
2002
2002
  * @see https://tailwindcss.com/docs/scroll-margin
2003
2003
  */
2004
2004
  "scroll-mx": [{
2005
- "scroll-mx": T()
2005
+ "scroll-mx": N()
2006
2006
  }],
2007
2007
  /**
2008
2008
  * Scroll Margin Y
2009
2009
  * @see https://tailwindcss.com/docs/scroll-margin
2010
2010
  */
2011
2011
  "scroll-my": [{
2012
- "scroll-my": T()
2012
+ "scroll-my": N()
2013
2013
  }],
2014
2014
  /**
2015
2015
  * Scroll Margin Start
2016
2016
  * @see https://tailwindcss.com/docs/scroll-margin
2017
2017
  */
2018
2018
  "scroll-ms": [{
2019
- "scroll-ms": T()
2019
+ "scroll-ms": N()
2020
2020
  }],
2021
2021
  /**
2022
2022
  * Scroll Margin End
2023
2023
  * @see https://tailwindcss.com/docs/scroll-margin
2024
2024
  */
2025
2025
  "scroll-me": [{
2026
- "scroll-me": T()
2026
+ "scroll-me": N()
2027
2027
  }],
2028
2028
  /**
2029
2029
  * Scroll Margin Top
2030
2030
  * @see https://tailwindcss.com/docs/scroll-margin
2031
2031
  */
2032
2032
  "scroll-mt": [{
2033
- "scroll-mt": T()
2033
+ "scroll-mt": N()
2034
2034
  }],
2035
2035
  /**
2036
2036
  * Scroll Margin Right
2037
2037
  * @see https://tailwindcss.com/docs/scroll-margin
2038
2038
  */
2039
2039
  "scroll-mr": [{
2040
- "scroll-mr": T()
2040
+ "scroll-mr": N()
2041
2041
  }],
2042
2042
  /**
2043
2043
  * Scroll Margin Bottom
2044
2044
  * @see https://tailwindcss.com/docs/scroll-margin
2045
2045
  */
2046
2046
  "scroll-mb": [{
2047
- "scroll-mb": T()
2047
+ "scroll-mb": N()
2048
2048
  }],
2049
2049
  /**
2050
2050
  * Scroll Margin Left
2051
2051
  * @see https://tailwindcss.com/docs/scroll-margin
2052
2052
  */
2053
2053
  "scroll-ml": [{
2054
- "scroll-ml": T()
2054
+ "scroll-ml": N()
2055
2055
  }],
2056
2056
  /**
2057
2057
  * Scroll Padding
2058
2058
  * @see https://tailwindcss.com/docs/scroll-padding
2059
2059
  */
2060
2060
  "scroll-p": [{
2061
- "scroll-p": T()
2061
+ "scroll-p": N()
2062
2062
  }],
2063
2063
  /**
2064
2064
  * Scroll Padding X
2065
2065
  * @see https://tailwindcss.com/docs/scroll-padding
2066
2066
  */
2067
2067
  "scroll-px": [{
2068
- "scroll-px": T()
2068
+ "scroll-px": N()
2069
2069
  }],
2070
2070
  /**
2071
2071
  * Scroll Padding Y
2072
2072
  * @see https://tailwindcss.com/docs/scroll-padding
2073
2073
  */
2074
2074
  "scroll-py": [{
2075
- "scroll-py": T()
2075
+ "scroll-py": N()
2076
2076
  }],
2077
2077
  /**
2078
2078
  * Scroll Padding Start
2079
2079
  * @see https://tailwindcss.com/docs/scroll-padding
2080
2080
  */
2081
2081
  "scroll-ps": [{
2082
- "scroll-ps": T()
2082
+ "scroll-ps": N()
2083
2083
  }],
2084
2084
  /**
2085
2085
  * Scroll Padding End
2086
2086
  * @see https://tailwindcss.com/docs/scroll-padding
2087
2087
  */
2088
2088
  "scroll-pe": [{
2089
- "scroll-pe": T()
2089
+ "scroll-pe": N()
2090
2090
  }],
2091
2091
  /**
2092
2092
  * Scroll Padding Top
2093
2093
  * @see https://tailwindcss.com/docs/scroll-padding
2094
2094
  */
2095
2095
  "scroll-pt": [{
2096
- "scroll-pt": T()
2096
+ "scroll-pt": N()
2097
2097
  }],
2098
2098
  /**
2099
2099
  * Scroll Padding Right
2100
2100
  * @see https://tailwindcss.com/docs/scroll-padding
2101
2101
  */
2102
2102
  "scroll-pr": [{
2103
- "scroll-pr": T()
2103
+ "scroll-pr": N()
2104
2104
  }],
2105
2105
  /**
2106
2106
  * Scroll Padding Bottom
2107
2107
  * @see https://tailwindcss.com/docs/scroll-padding
2108
2108
  */
2109
2109
  "scroll-pb": [{
2110
- "scroll-pb": T()
2110
+ "scroll-pb": N()
2111
2111
  }],
2112
2112
  /**
2113
2113
  * Scroll Padding Left
2114
2114
  * @see https://tailwindcss.com/docs/scroll-padding
2115
2115
  */
2116
2116
  "scroll-pl": [{
2117
- "scroll-pl": T()
2117
+ "scroll-pl": N()
2118
2118
  }],
2119
2119
  /**
2120
2120
  * Scroll Snap Align
@@ -2197,7 +2197,7 @@ const N = (e) => {
2197
2197
  * @see https://tailwindcss.com/docs/stroke-width
2198
2198
  */
2199
2199
  "stroke-w": [{
2200
- stroke: [Y, K, Le]
2200
+ stroke: [q, ee, He]
2201
2201
  }],
2202
2202
  /**
2203
2203
  * Stroke
@@ -2272,21 +2272,21 @@ const N = (e) => {
2272
2272
  "font-size": ["leading"]
2273
2273
  }
2274
2274
  };
2275
- }, Qi = /* @__PURE__ */ Vi(Ji);
2276
- function O(...e) {
2277
- return Qi(ct(e));
2275
+ }, mn = /* @__PURE__ */ Yi(fn);
2276
+ function P(...e) {
2277
+ return mn(Ie(e));
2278
2278
  }
2279
- let Ne;
2280
- function Ee() {
2281
- return Ne === void 0 && (Ne = navigator.platform.includes("Mac")), Ne;
2279
+ let De;
2280
+ function Oe() {
2281
+ return De === void 0 && (De = navigator.platform.includes("Mac")), De;
2282
2282
  }
2283
- function en(e) {
2284
- return `${e}`.toLowerCase() === "mod" ? Ee() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Ee() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Ee() ? "⇧" : "Shift" : e;
2283
+ function gn(e) {
2284
+ return `${e}`.toLowerCase() === "mod" ? Oe() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Oe() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Oe() ? "⇧" : "Shift" : e;
2285
2285
  }
2286
- function tn(e) {
2287
- return e.map(en).join(" ");
2286
+ function pn(e) {
2287
+ return e.map(gn).join(" ");
2288
2288
  }
2289
- const wt = Q.forwardRef(
2289
+ const he = re.forwardRef(
2290
2290
  (e, t) => {
2291
2291
  const {
2292
2292
  icon: r = void 0,
@@ -2299,45 +2299,45 @@ const wt = Q.forwardRef(
2299
2299
  shortcutKeys: s = void 0,
2300
2300
  tooltipOptions: c = {},
2301
2301
  action: d = void 0,
2302
- isActive: g = void 0,
2302
+ isActive: f = void 0,
2303
2303
  children: p,
2304
- asChild: h = !1,
2304
+ asChild: u = !1,
2305
2305
  upload: b = !1,
2306
- initialDisplayedColor: f = void 0,
2306
+ initialDisplayedColor: g = void 0,
2307
2307
  dataState: k = !1,
2308
- ...u
2309
- } = e, y = yt[r], m = h ? ht : Ct, z = (v) => {
2308
+ ...h
2309
+ } = e, x = It[r], m = u ? bt : Lt, A = (v) => {
2310
2310
  if (o) {
2311
2311
  v.preventDefault();
2312
2312
  return;
2313
2313
  }
2314
2314
  d == null || d(v);
2315
2315
  };
2316
- return /* @__PURE__ */ C(Ln, { children: [
2317
- /* @__PURE__ */ n(Nn, { asChild: !0, children: /* @__PURE__ */ C(
2316
+ return /* @__PURE__ */ y(Un, { children: [
2317
+ /* @__PURE__ */ n($n, { asChild: !0, children: /* @__PURE__ */ y(
2318
2318
  m,
2319
2319
  {
2320
- className: O("richtext-h-[32px] richtext-w-[32px]", a),
2320
+ className: P("richtext-h-[32px] richtext-w-[32px]", a),
2321
2321
  "data-state": k ? "on" : "off",
2322
2322
  disabled: o,
2323
- onClick: z,
2323
+ onClick: A,
2324
2324
  ref: t,
2325
2325
  size: "sm",
2326
- ...u,
2326
+ ...h,
2327
2327
  children: [
2328
- y && /* @__PURE__ */ n(y, { className: "richtext-size-4" }),
2328
+ x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
2329
2329
  p
2330
2330
  ]
2331
2331
  }
2332
2332
  ) }),
2333
- i && /* @__PURE__ */ n(kt, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ C("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: [
2334
2334
  /* @__PURE__ */ n("div", { children: i }),
2335
- !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: tn(s) })
2335
+ !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: pn(s) })
2336
2336
  ] }) })
2337
2337
  ] });
2338
2338
  }
2339
2339
  );
2340
- function rn(e) {
2340
+ function xn(e) {
2341
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(
2342
2342
  "path",
2343
2343
  {
@@ -2346,7 +2346,7 @@ function rn(e) {
2346
2346
  }
2347
2347
  ) });
2348
2348
  }
2349
- function nn(e) {
2349
+ function vn(e) {
2350
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(
2351
2351
  "path",
2352
2352
  {
@@ -2359,7 +2359,7 @@ function nn(e) {
2359
2359
  }
2360
2360
  ) });
2361
2361
  }
2362
- function on() {
2362
+ function bn() {
2363
2363
  return /* @__PURE__ */ n(
2364
2364
  "svg",
2365
2365
  {
@@ -2386,7 +2386,7 @@ function on() {
2386
2386
  }
2387
2387
  );
2388
2388
  }
2389
- function an() {
2389
+ function wn() {
2390
2390
  return /* @__PURE__ */ n(
2391
2391
  "svg",
2392
2392
  {
@@ -2413,7 +2413,7 @@ function an() {
2413
2413
  }
2414
2414
  );
2415
2415
  }
2416
- function sn(e) {
2416
+ function yn(e) {
2417
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(
2418
2418
  "path",
2419
2419
  {
@@ -2422,8 +2422,8 @@ function sn(e) {
2422
2422
  }
2423
2423
  ) });
2424
2424
  }
2425
- function Re(e) {
2426
- const t = yt[e.name];
2425
+ function Pe(e) {
2426
+ const t = It[e.name];
2427
2427
  return t ? /* @__PURE__ */ n(
2428
2428
  t,
2429
2429
  {
@@ -2432,7 +2432,7 @@ function Re(e) {
2432
2432
  }
2433
2433
  ) : null;
2434
2434
  }
2435
- function ln(e) {
2435
+ function Cn(e) {
2436
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(
2437
2437
  "path",
2438
2438
  {
@@ -2441,7 +2441,7 @@ function ln(e) {
2441
2441
  }
2442
2442
  ) });
2443
2443
  }
2444
- function cn(e) {
2444
+ function kn(e) {
2445
2445
  return /* @__PURE__ */ n(
2446
2446
  "svg",
2447
2447
  {
@@ -2466,10 +2466,10 @@ function cn(e) {
2466
2466
  }
2467
2467
  );
2468
2468
  }
2469
- function dn(e) {
2469
+ function Mn(e) {
2470
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" }) });
2471
2471
  }
2472
- function un(e) {
2472
+ function Tn(e) {
2473
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(
2474
2474
  "path",
2475
2475
  {
@@ -2478,7 +2478,7 @@ function un(e) {
2478
2478
  }
2479
2479
  ) });
2480
2480
  }
2481
- function hn(e) {
2481
+ function An(e) {
2482
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(
2483
2483
  "path",
2484
2484
  {
@@ -2487,7 +2487,7 @@ function hn(e) {
2487
2487
  }
2488
2488
  ) });
2489
2489
  }
2490
- function fn() {
2490
+ function Nn() {
2491
2491
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2492
2492
  "path",
2493
2493
  {
@@ -2496,7 +2496,7 @@ function fn() {
2496
2496
  }
2497
2497
  ) });
2498
2498
  }
2499
- function mn() {
2499
+ function zn() {
2500
2500
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2501
2501
  "path",
2502
2502
  {
@@ -2509,7 +2509,7 @@ function mn() {
2509
2509
  }
2510
2510
  ) });
2511
2511
  }
2512
- function gn() {
2512
+ function In() {
2513
2513
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2514
2514
  "path",
2515
2515
  {
@@ -2522,7 +2522,7 @@ function gn() {
2522
2522
  }
2523
2523
  ) });
2524
2524
  }
2525
- function pn() {
2525
+ function Ln() {
2526
2526
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2527
2527
  "path",
2528
2528
  {
@@ -2535,7 +2535,7 @@ function pn() {
2535
2535
  }
2536
2536
  ) });
2537
2537
  }
2538
- function xn() {
2538
+ function Sn() {
2539
2539
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2540
2540
  "path",
2541
2541
  {
@@ -2544,8 +2544,8 @@ function xn() {
2544
2544
  }
2545
2545
  ) });
2546
2546
  }
2547
- function bn() {
2548
- return /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2547
+ function Nt() {
2548
+ return /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2549
2549
  /* @__PURE__ */ n(
2550
2550
  "path",
2551
2551
  {
@@ -2562,8 +2562,8 @@ function bn() {
2562
2562
  )
2563
2563
  ] });
2564
2564
  }
2565
- function vn() {
2566
- return /* @__PURE__ */ C(
2565
+ function zt() {
2566
+ return /* @__PURE__ */ y(
2567
2567
  "svg",
2568
2568
  {
2569
2569
  xmlns: "http://www.w3.org/2000/svg",
@@ -2590,7 +2590,7 @@ function vn() {
2590
2590
  }
2591
2591
  );
2592
2592
  }
2593
- function wn() {
2593
+ function En() {
2594
2594
  return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
2595
2595
  "path",
2596
2596
  {
@@ -2599,8 +2599,8 @@ function wn() {
2599
2599
  }
2600
2600
  ) });
2601
2601
  }
2602
- function yn() {
2603
- return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
2602
+ function Rn() {
2603
+ return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ y(
2604
2604
  "g",
2605
2605
  {
2606
2606
  fill: "none",
@@ -2615,7 +2615,7 @@ function yn() {
2615
2615
  }
2616
2616
  ) });
2617
2617
  }
2618
- function Cn() {
2618
+ function Vn() {
2619
2619
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2620
2620
  "path",
2621
2621
  {
@@ -2624,8 +2624,8 @@ function Cn() {
2624
2624
  }
2625
2625
  ) });
2626
2626
  }
2627
- function kn() {
2628
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ C("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
2627
+ function _n() {
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: [
2629
2629
  /* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
2630
2630
  /* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
2631
2631
  /* @__PURE__ */ n("circle", { cx: "38", cy: "24", r: "4" }),
@@ -2633,7 +2633,7 @@ function kn() {
2633
2633
  /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
2634
2634
  ] }) });
2635
2635
  }
2636
- function Mn() {
2636
+ function Hn() {
2637
2637
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2638
2638
  "path",
2639
2639
  {
@@ -2642,7 +2642,7 @@ function Mn() {
2642
2642
  }
2643
2643
  ) });
2644
2644
  }
2645
- function In() {
2645
+ function Dn() {
2646
2646
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2647
2647
  "path",
2648
2648
  {
@@ -2656,7 +2656,7 @@ function In() {
2656
2656
  }
2657
2657
  ) });
2658
2658
  }
2659
- function Tn() {
2659
+ function On() {
2660
2660
  return /* @__PURE__ */ n(
2661
2661
  "svg",
2662
2662
  {
@@ -2677,144 +2677,145 @@ function Tn() {
2677
2677
  }
2678
2678
  );
2679
2679
  }
2680
- const yt = {
2681
- Bold: li,
2682
- LoaderCircle: si,
2683
- Italic: ai,
2684
- Underline: oi,
2685
- Quote: ni,
2686
- TextQuote: nn,
2687
- Strikethrough: ii,
2688
- Minus: ri,
2689
- Eraser: ti,
2690
- PaintRoller: ei,
2691
- Redo2: Qr,
2692
- Undo2: Jr,
2693
- AlignCenter: wi,
2694
- AlignJustify: vi,
2695
- AlignLeft: bi,
2696
- AlignRight: xi,
2697
- ChevronDown: Kr,
2698
- Subscript: Zr,
2699
- Superscript: qr,
2700
- Code: Yr,
2701
- Code2: Xr,
2702
- Type: Gr,
2703
- IndentIncrease: Wr,
2704
- IndentDecrease: Fr,
2705
- List: $r,
2706
- ListOrdered: Br,
2707
- ListTodo: Ur,
2708
- Link: _r,
2709
- ImageUp: Or,
2710
- Video: Pr,
2711
- Maximize: jr,
2712
- Minimize: Dr,
2713
- Table: Hr,
2714
- Sparkles: Vr,
2715
- Pencil: Rr,
2716
- Unlink: Er,
2717
- BetweenHorizonalEnd: Nr,
2718
- BetweenHorizonalStart: Lr,
2719
- BetweenVerticalStart: Ar,
2720
- BetweenVerticalEnd: Sr,
2721
- TableCellsMerge: zr,
2722
- TableCellsSplit: Tr,
2723
- Trash2: Ir,
2724
- Trash: Mr,
2725
- Replace: Ye,
2726
- ChevronsUpDown: kr,
2727
- LineHeight: ln,
2728
- Word: sn,
2729
- HeadingParagraph: Cr,
2730
- Heading1: yr,
2731
- Heading2: wr,
2732
- Heading3: vr,
2733
- Heading4: br,
2734
- Heading5: xr,
2735
- Heading6: pr,
2736
- Columns2: qe,
2737
- Columns3: gr,
2738
- Columns4: mr,
2739
- Plus: fr,
2740
- Grip: hr,
2741
- Copy: ur,
2742
- Clipboard: dr,
2743
- PanelLeft: cr,
2744
- PanelRight: lr,
2745
- Columns: qe,
2746
- Iframe: sr,
2747
- MenuDown: cn,
2748
- SizeS: hn,
2749
- SizeM: un,
2750
- SizeL: dn,
2751
- AspectRatio: rn,
2752
- Emoji: ar,
2753
- DeleteColumn: on,
2754
- DeleteRow: an,
2755
- SearchAndReplace: Ye,
2756
- EmojiIcon: or,
2757
- KatexIcon: nr,
2758
- ExportPdf: bn,
2759
- ExportWord: vn,
2760
- ImportWord: Tn,
2761
- ColumnAddLeft: mn,
2762
- ColumnAddRight: gn,
2763
- BookMarked: ir,
2764
- Excalidraw: xn,
2765
- ZoomIn: rr,
2766
- ZoomOut: tr,
2767
- Settings: er,
2768
- Eye: Qt,
2769
- TextDirection: pn,
2770
- LeftToRight: Cn,
2771
- RightToLeft: Mn,
2772
- Attachment: Jt,
2773
- GifIcon: wn,
2774
- ChevronUp: Kt,
2775
- Crop: Zt,
2776
- Mermaid: kn,
2777
- Twitter: In,
2778
- CodeView: fn,
2779
- FlipX: qt,
2780
- FlipY: Yt,
2781
- PencilRuler: Xt,
2782
- WrapText: Gt,
2783
- Loader: Wt,
2784
- X: lt,
2785
- Html: yn,
2786
- ExternalLink: Ft,
2787
- Callout: $t
2788
- }, tt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, rt = ct, Ue = (e, t) => (r) => {
2680
+ const It = {
2681
+ Bold: xi,
2682
+ LoaderCircle: pi,
2683
+ Italic: gi,
2684
+ Underline: mi,
2685
+ Quote: fi,
2686
+ TextQuote: vn,
2687
+ Strikethrough: hi,
2688
+ Minus: ui,
2689
+ Eraser: di,
2690
+ PaintRoller: ci,
2691
+ Redo2: li,
2692
+ Undo2: si,
2693
+ AlignCenter: _i,
2694
+ AlignJustify: Vi,
2695
+ AlignLeft: Ri,
2696
+ AlignRight: Ei,
2697
+ ChevronDown: ai,
2698
+ Subscript: oi,
2699
+ Superscript: ni,
2700
+ Code: ii,
2701
+ Code2: ri,
2702
+ Type: ti,
2703
+ IndentIncrease: ei,
2704
+ IndentDecrease: Qr,
2705
+ List: Kr,
2706
+ ListOrdered: Jr,
2707
+ ListTodo: qr,
2708
+ Link: Zr,
2709
+ ImageUp: Yr,
2710
+ Video: Xr,
2711
+ Maximize: Gr,
2712
+ Minimize: Wr,
2713
+ Table: Fr,
2714
+ Sparkles: $r,
2715
+ Pencil: Ur,
2716
+ Unlink: Br,
2717
+ BetweenHorizonalEnd: jr,
2718
+ BetweenHorizonalStart: Pr,
2719
+ BetweenVerticalStart: Or,
2720
+ BetweenVerticalEnd: Dr,
2721
+ TableCellsMerge: Hr,
2722
+ TableCellsSplit: _r,
2723
+ Trash2: Vr,
2724
+ Trash: Rr,
2725
+ Replace: nt,
2726
+ ChevronsUpDown: Er,
2727
+ LineHeight: Cn,
2728
+ Word: yn,
2729
+ HeadingParagraph: Sr,
2730
+ Heading1: Lr,
2731
+ Heading2: Ir,
2732
+ Heading3: zr,
2733
+ Heading4: Nr,
2734
+ Heading5: Ar,
2735
+ Heading6: Tr,
2736
+ Columns2: ot,
2737
+ Columns3: Mr,
2738
+ Columns4: kr,
2739
+ Plus: Cr,
2740
+ Grip: yr,
2741
+ Copy: wr,
2742
+ Clipboard: br,
2743
+ PanelLeft: vr,
2744
+ PanelRight: xr,
2745
+ Columns: ot,
2746
+ Iframe: pr,
2747
+ MenuDown: kn,
2748
+ SizeS: An,
2749
+ SizeM: Tn,
2750
+ SizeL: Mn,
2751
+ AspectRatio: xn,
2752
+ Emoji: gr,
2753
+ DeleteColumn: bn,
2754
+ DeleteRow: wn,
2755
+ SearchAndReplace: nt,
2756
+ EmojiIcon: mr,
2757
+ KatexIcon: fr,
2758
+ ExportPdf: Nt,
2759
+ ExportWord: zt,
2760
+ ImportWord: On,
2761
+ ColumnAddLeft: zn,
2762
+ ColumnAddRight: In,
2763
+ BookMarked: hr,
2764
+ Excalidraw: Sn,
2765
+ ZoomIn: ur,
2766
+ ZoomOut: dr,
2767
+ Settings: cr,
2768
+ Eye: lr,
2769
+ TextDirection: Ln,
2770
+ LeftToRight: Vn,
2771
+ RightToLeft: Hn,
2772
+ Attachment: sr,
2773
+ AttachmentDownload: ar,
2774
+ GifIcon: En,
2775
+ ChevronUp: or,
2776
+ Crop: nr,
2777
+ Mermaid: _n,
2778
+ Twitter: Dn,
2779
+ CodeView: Nn,
2780
+ FlipX: ir,
2781
+ FlipY: rr,
2782
+ PencilRuler: tr,
2783
+ WrapText: er,
2784
+ Loader: Qt,
2785
+ X: xt,
2786
+ Html: Rn,
2787
+ ExternalLink: Kt,
2788
+ Callout: Jt
2789
+ }, dt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ut = Ie, Ze = (e, t) => (r) => {
2789
2790
  var i;
2790
- if ((t == null ? void 0 : t.variants) == null) return rt(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2791
+ if ((t == null ? void 0 : t.variants) == null) return ut(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2791
2792
  const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
2792
- const g = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
2793
- if (g === null) return null;
2794
- const h = tt(g) || tt(p);
2795
- return o[d][h];
2796
- }), s = r && Object.entries(r).reduce((d, g) => {
2797
- let [p, h] = g;
2798
- return h === void 0 || (d[p] = h), d;
2799
- }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, g) => {
2800
- let { class: p, className: h, ...b } = g;
2801
- return Object.entries(b).every((f) => {
2802
- let [k, u] = f;
2803
- return Array.isArray(u) ? u.includes({
2793
+ const f = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
2794
+ if (f === null) return null;
2795
+ const u = dt(f) || dt(p);
2796
+ return o[d][u];
2797
+ }), s = r && Object.entries(r).reduce((d, f) => {
2798
+ let [p, u] = f;
2799
+ return u === void 0 || (d[p] = u), d;
2800
+ }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, f) => {
2801
+ let { class: p, className: u, ...b } = f;
2802
+ return Object.entries(b).every((g) => {
2803
+ let [k, h] = g;
2804
+ return Array.isArray(h) ? h.includes({
2804
2805
  ...a,
2805
2806
  ...s
2806
2807
  }[k]) : {
2807
2808
  ...a,
2808
2809
  ...s
2809
- }[k] === u;
2810
+ }[k] === h;
2810
2811
  }) ? [
2811
2812
  ...d,
2812
2813
  p,
2813
- h
2814
+ u
2814
2815
  ] : d;
2815
2816
  }, []);
2816
- return rt(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2817
- }, zn = Ue(
2817
+ return ut(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2818
+ }, Pn = Ze(
2818
2819
  "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",
2819
2820
  {
2820
2821
  variants: {
@@ -2838,17 +2839,17 @@ const yt = {
2838
2839
  size: "default"
2839
2840
  }
2840
2841
  }
2841
- ), G = B.forwardRef(
2842
- ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ht : "button", { className: O(zn({ variant: t, size: r, className: e })), ref: a, ...o })
2842
+ ), G = U.forwardRef(
2843
+ ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? bt : "button", { className: P(Pn({ variant: t, size: r, className: e })), ref: a, ...o })
2843
2844
  );
2844
2845
  G.displayName = "Button";
2845
- const re = B.forwardRef(
2846
+ const oe = U.forwardRef(
2846
2847
  ({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
2847
2848
  "input",
2848
2849
  {
2849
2850
  ref: i,
2850
2851
  type: t,
2851
- className: O(
2852
+ className: P(
2852
2853
  "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",
2853
2854
  e
2854
2855
  ),
@@ -2856,48 +2857,48 @@ const re = B.forwardRef(
2856
2857
  }
2857
2858
  )
2858
2859
  );
2859
- re.displayName = "Input";
2860
- const Sn = Ue(
2860
+ oe.displayName = "Input";
2861
+ const jn = Ze(
2861
2862
  "richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
2862
- ), pe = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(mt.Root, { className: O(Sn(), e), ref: r, ...t }));
2863
- pe.displayName = mt.Root.displayName;
2864
- const Se = ie.Root, ve = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2865
- ie.List,
2863
+ ), Ce = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(yt.Root, { className: P(jn(), e), ref: r, ...t }));
2864
+ Ce.displayName = yt.Root.displayName;
2865
+ const Ve = ae.Root, Me = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2866
+ ae.List,
2866
2867
  {
2867
2868
  ref: r,
2868
- className: O(
2869
+ className: P(
2869
2870
  "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",
2870
2871
  e
2871
2872
  ),
2872
2873
  ...t
2873
2874
  }
2874
2875
  ));
2875
- ve.displayName = ie.List.displayName;
2876
- const q = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2877
- ie.Trigger,
2876
+ Me.displayName = ae.List.displayName;
2877
+ const J = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2878
+ ae.Trigger,
2878
2879
  {
2879
2880
  ref: r,
2880
- className: O(
2881
+ className: P(
2881
2882
  "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",
2882
2883
  e
2883
2884
  ),
2884
2885
  ...t
2885
2886
  }
2886
2887
  ));
2887
- q.displayName = ie.Trigger.displayName;
2888
- const Z = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2889
- ie.Content,
2888
+ J.displayName = ae.Trigger.displayName;
2889
+ const K = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2890
+ ae.Content,
2890
2891
  {
2891
2892
  ref: r,
2892
- className: O(
2893
+ className: P(
2893
2894
  "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",
2894
2895
  e
2895
2896
  ),
2896
2897
  ...t
2897
2898
  }
2898
2899
  ));
2899
- Z.displayName = ie.Content.displayName;
2900
- const An = Ue(
2900
+ K.displayName = ae.Content.displayName;
2901
+ const Bn = Ze(
2901
2902
  "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",
2902
2903
  {
2903
2904
  variants: {
@@ -2916,52 +2917,52 @@ const An = Ue(
2916
2917
  size: "default"
2917
2918
  }
2918
2919
  }
2919
- ), Ct = B.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2920
- ft.Root,
2920
+ ), Lt = U.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2921
+ wt.Root,
2921
2922
  {
2922
2923
  ref: o,
2923
- className: O(An({ variant: t, size: r, className: e })),
2924
+ className: P(Bn({ variant: t, size: r, className: e })),
2924
2925
  ...i
2925
2926
  }
2926
2927
  ));
2927
- Ct.displayName = ft.Root.displayName;
2928
- const Go = be.Provider, Ln = be.Root, Nn = be.Trigger, kt = B.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2929
- be.Content,
2928
+ Lt.displayName = wt.Root.displayName;
2929
+ const Ta = ke.Provider, Un = ke.Root, $n = ke.Trigger, St = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2930
+ ke.Content,
2930
2931
  {
2931
2932
  "data-richtext-portal": !0,
2932
2933
  ref: i,
2933
2934
  sideOffset: t,
2934
- className: O(
2935
+ className: P(
2935
2936
  "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",
2936
2937
  e
2937
2938
  ),
2938
2939
  ...r
2939
2940
  }
2940
2941
  ));
2941
- kt.displayName = be.Content.displayName;
2942
- const En = 1, Rn = 1e6;
2943
- let Ve = 0;
2944
- function Vn() {
2945
- return Ve = (Ve + 1) % Number.MAX_SAFE_INTEGER, Ve.toString();
2942
+ St.displayName = ke.Content.displayName;
2943
+ const Fn = 1, Wn = 1e6;
2944
+ let je = 0;
2945
+ function Gn() {
2946
+ return je = (je + 1) % Number.MAX_SAFE_INTEGER, je.toString();
2946
2947
  }
2947
- const He = /* @__PURE__ */ new Map();
2948
- function it(e) {
2949
- if (He.has(e))
2948
+ const Be = /* @__PURE__ */ new Map();
2949
+ function ht(e) {
2950
+ if (Be.has(e))
2950
2951
  return;
2951
2952
  const t = setTimeout(() => {
2952
- He.delete(e), me({
2953
+ Be.delete(e), we({
2953
2954
  type: "REMOVE_TOAST",
2954
2955
  toastId: e
2955
2956
  });
2956
- }, Rn);
2957
- He.set(e, t);
2957
+ }, Wn);
2958
+ Be.set(e, t);
2958
2959
  }
2959
- function Hn(e, t) {
2960
+ function Xn(e, t) {
2960
2961
  switch (t.type) {
2961
2962
  case "ADD_TOAST":
2962
2963
  return {
2963
2964
  ...e,
2964
- toasts: [t.toast, ...e.toasts].slice(0, En)
2965
+ toasts: [t.toast, ...e.toasts].slice(0, Fn)
2965
2966
  };
2966
2967
  case "UPDATE_TOAST":
2967
2968
  return {
@@ -2970,8 +2971,8 @@ function Hn(e, t) {
2970
2971
  };
2971
2972
  case "DISMISS_TOAST": {
2972
2973
  const { toastId: r } = t;
2973
- return r ? it(r) : e.toasts.forEach((i) => {
2974
- it(i.id);
2974
+ return r ? ht(r) : e.toasts.forEach((i) => {
2975
+ ht(i.id);
2975
2976
  }), {
2976
2977
  ...e,
2977
2978
  toasts: e.toasts.map(
@@ -2992,19 +2993,19 @@ function Hn(e, t) {
2992
2993
  };
2993
2994
  }
2994
2995
  }
2995
- const Ce = [];
2996
- let ke = { toasts: [] };
2997
- function me(e) {
2998
- ke = Hn(ke, e), Ce.forEach((t) => {
2999
- t(ke);
2996
+ const Ae = [];
2997
+ let Ne = { toasts: [] };
2998
+ function we(e) {
2999
+ Ne = Xn(Ne, e), Ae.forEach((t) => {
3000
+ t(Ne);
3000
3001
  });
3001
3002
  }
3002
- function Dn({ ...e }) {
3003
- const t = Vn(), r = (o) => me({
3003
+ function Yn({ ...e }) {
3004
+ const t = Gn(), r = (o) => we({
3004
3005
  type: "UPDATE_TOAST",
3005
3006
  toast: { ...o, id: t }
3006
- }), i = () => me({ type: "DISMISS_TOAST", toastId: t });
3007
- return me({
3007
+ }), i = () => we({ type: "DISMISS_TOAST", toastId: t });
3008
+ return we({
3008
3009
  type: "ADD_TOAST",
3009
3010
  toast: {
3010
3011
  ...e,
@@ -3020,39 +3021,39 @@ function Dn({ ...e }) {
3020
3021
  update: r
3021
3022
  };
3022
3023
  }
3023
- function Be() {
3024
- const [e, t] = B.useState(ke);
3025
- return B.useEffect(() => (Ce.push(t), () => {
3026
- const r = Ce.indexOf(t);
3027
- r > -1 && Ce.splice(r, 1);
3024
+ function qe() {
3025
+ const [e, t] = U.useState(Ne);
3026
+ return U.useEffect(() => (Ae.push(t), () => {
3027
+ const r = Ae.indexOf(t);
3028
+ r > -1 && Ae.splice(r, 1);
3028
3029
  }), [e]), {
3029
3030
  ...e,
3030
- toast: Dn,
3031
- dismiss: (r) => me({ type: "DISMISS_TOAST", toastId: r })
3031
+ toast: Yn,
3032
+ dismiss: (r) => we({ type: "DISMISS_TOAST", toastId: r })
3032
3033
  };
3033
3034
  }
3034
- const $e = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3035
- je.Root,
3035
+ const Je = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3036
+ $e.Root,
3036
3037
  {
3037
3038
  ref: r,
3038
- className: O(
3039
+ className: P(
3039
3040
  "!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",
3040
3041
  e
3041
3042
  ),
3042
3043
  ...t,
3043
3044
  children: /* @__PURE__ */ n(
3044
- je.Indicator,
3045
+ $e.Indicator,
3045
3046
  {
3046
- className: O(
3047
+ className: P(
3047
3048
  "!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
3048
3049
  ),
3049
- children: /* @__PURE__ */ n(ci, { className: "!richtext-h-4 !richtext-w-4" })
3050
+ children: /* @__PURE__ */ n(vi, { className: "!richtext-h-4 !richtext-w-4" })
3050
3051
  }
3051
3052
  )
3052
3053
  }
3053
3054
  ));
3054
- $e.displayName = je.Root.displayName;
3055
- function jn(e) {
3055
+ Je.displayName = $e.Root.displayName;
3056
+ function Zn(e) {
3056
3057
  return e = e || /* @__PURE__ */ new Map(), {
3057
3058
  /**
3058
3059
  * A Map of event names to registered handler functions.
@@ -3099,57 +3100,57 @@ function jn(e) {
3099
3100
  }
3100
3101
  };
3101
3102
  }
3102
- const Fe = jn(), Mt = Q.createContext(Fe), Pn = () => Q.useContext(Mt);
3103
- function It(e, t) {
3104
- const r = Pn();
3105
- Q.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3103
+ const Ke = Zn(), Et = re.createContext(Ke), qn = () => re.useContext(Et);
3104
+ function Qe(e, t) {
3105
+ const r = qn();
3106
+ re.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3106
3107
  t.map((i) => r.off(i, e));
3107
3108
  }), [r, t, e]);
3108
3109
  }
3109
- const Xo = Fe.emit;
3110
- function Yo({ children: e }) {
3111
- return /* @__PURE__ */ n(Mt.Provider, { value: Fe, children: e });
3110
+ const Jn = Ke.emit;
3111
+ function Aa({ children: e }) {
3112
+ return /* @__PURE__ */ n(Et.Provider, { value: Ke, children: e });
3112
3113
  }
3113
- const we = X.Root, We = X.Trigger, On = X.Portal, Tt = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3114
- X.Overlay,
3114
+ const ge = Y.Root, et = Y.Trigger, Kn = Y.Portal, Rt = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3115
+ Y.Overlay,
3115
3116
  {
3116
3117
  ref: r,
3117
- className: O(
3118
+ className: P(
3118
3119
  "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",
3119
3120
  e
3120
3121
  ),
3121
3122
  ...t
3122
3123
  }
3123
3124
  ));
3124
- Tt.displayName = X.Overlay.displayName;
3125
- const se = B.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(On, { "data-richtext-portal": !0, children: [
3126
- /* @__PURE__ */ n(Tt, {}),
3127
- /* @__PURE__ */ C(
3128
- X.Content,
3125
+ Rt.displayName = Y.Overlay.displayName;
3126
+ const se = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(Kn, { "data-richtext-portal": !0, children: [
3127
+ /* @__PURE__ */ n(Rt, {}),
3128
+ /* @__PURE__ */ y(
3129
+ Y.Content,
3129
3130
  {
3130
3131
  "data-richtext-portal": !0,
3131
3132
  ref: i,
3132
- className: O(
3133
+ className: P(
3133
3134
  "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",
3134
3135
  e
3135
3136
  ),
3136
3137
  ...r,
3137
3138
  children: [
3138
3139
  t,
3139
- /* @__PURE__ */ C(X.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: [
3140
- /* @__PURE__ */ n(lt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3140
+ /* @__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: [
3141
+ /* @__PURE__ */ n(xt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3141
3142
  /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3142
3143
  ] })
3143
3144
  ]
3144
3145
  }
3145
3146
  )
3146
3147
  ] }));
3147
- se.displayName = X.Content.displayName;
3148
- function _n({ className: e, ...t }) {
3148
+ se.displayName = Y.Content.displayName;
3149
+ function Qn({ className: e, ...t }) {
3149
3150
  return /* @__PURE__ */ n(
3150
3151
  "div",
3151
3152
  {
3152
- className: O(
3153
+ className: P(
3153
3154
  "richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
3154
3155
  e
3155
3156
  ),
@@ -3157,12 +3158,12 @@ function _n({ className: e, ...t }) {
3157
3158
  }
3158
3159
  );
3159
3160
  }
3160
- _n.displayName = "DialogHeader";
3161
- function zt({ className: e, ...t }) {
3161
+ Qn.displayName = "DialogHeader";
3162
+ function Vt({ className: e, ...t }) {
3162
3163
  return /* @__PURE__ */ n(
3163
3164
  "div",
3164
3165
  {
3165
- className: O(
3166
+ className: P(
3166
3167
  "richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
3167
3168
  e
3168
3169
  ),
@@ -3170,29 +3171,554 @@ function zt({ className: e, ...t }) {
3170
3171
  }
3171
3172
  );
3172
3173
  }
3173
- zt.displayName = "DialogFooter";
3174
- const le = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3175
- X.Title,
3174
+ Vt.displayName = "DialogFooter";
3175
+ const le = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3176
+ Y.Title,
3176
3177
  {
3177
3178
  ref: r,
3178
- className: O(
3179
+ className: P(
3179
3180
  "richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
3180
3181
  e
3181
3182
  ),
3182
3183
  ...t
3183
3184
  }
3184
3185
  ));
3185
- le.displayName = X.Title.displayName;
3186
- const Un = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3187
- X.Description,
3186
+ le.displayName = Y.Title.displayName;
3187
+ const eo = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3188
+ Y.Description,
3188
3189
  {
3189
- className: O("richtext-text-sm richtext-text-muted-foreground", e),
3190
+ className: P("richtext-text-sm richtext-text-muted-foreground", e),
3190
3191
  ref: r,
3191
3192
  ...t
3192
3193
  }
3193
3194
  ));
3194
- Un.displayName = X.Description.displayName;
3195
- var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.create({
3195
+ eo.displayName = Y.Description.displayName;
3196
+ const to = {
3197
+ 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>',
3198
+ 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>',
3199
+ 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>',
3200
+ image: '<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-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',
3201
+ pdf: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
3202
+ <path fill="currentColor" d="M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"></path>
3203
+ <path fill="currentColor" d="M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"></path>
3204
+ </svg>`,
3205
+ word: `<svg
3206
+ xmlns="http://www.w3.org/2000/svg"
3207
+ width="1em"
3208
+ height="1em"
3209
+ className="icon"
3210
+ viewBox="0 0 1024 1024"
3211
+ >
3212
+ <path
3213
+ fill="currentColor"
3214
+ d="M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"
3215
+ />
3216
+ <path
3217
+ fill="currentColor"
3218
+ d="m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"
3219
+ />
3220
+ </svg>`,
3221
+ 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>',
3222
+ 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>'
3223
+ };
3224
+ function ro(e) {
3225
+ return e.replace(/^.*\/|\..+$/g, "");
3226
+ }
3227
+ function io(e) {
3228
+ return e.split(".").pop();
3229
+ }
3230
+ function _t(e) {
3231
+ return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
3232
+ }
3233
+ function no(e) {
3234
+ 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";
3235
+ }
3236
+ function oo(e) {
3237
+ return new Promise((t) => {
3238
+ const r = new FileReader();
3239
+ r.addEventListener(
3240
+ "load",
3241
+ () => {
3242
+ t({
3243
+ alt: e.name,
3244
+ src: r.result
3245
+ });
3246
+ },
3247
+ !1
3248
+ ), r.readAsDataURL(e);
3249
+ });
3250
+ }
3251
+ function ao(e, t) {
3252
+ const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
3253
+ let a = o.length;
3254
+ const l = new Uint8Array(a);
3255
+ for (; a--; )
3256
+ l[a] = o.charCodeAt(a);
3257
+ return new File([l], t, { type: i });
3258
+ }
3259
+ function so(e) {
3260
+ const t = to[e], o = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, a = [
3261
+ "svg",
3262
+ {
3263
+ ...Array.from(o.attributes).reduce((l, s) => (l[s.name] = s.value, l), {})
3264
+ }
3265
+ ];
3266
+ return Array.from(o.childNodes).forEach((l) => {
3267
+ if (l.nodeType === 1) {
3268
+ const s = [
3269
+ l.tagName.toLowerCase(),
3270
+ Array.from(l.attributes).reduce((c, d) => (c[d.name] = d.value, c), {})
3271
+ ];
3272
+ l.textContent && s.push(l.textContent), a.push(s);
3273
+ }
3274
+ }), a;
3275
+ }
3276
+ const lo = {
3277
+ audio: /* @__PURE__ */ n(Mi, {}),
3278
+ video: /* @__PURE__ */ n(ki, {}),
3279
+ file: /* @__PURE__ */ n(Ci, {}),
3280
+ image: /* @__PURE__ */ n(yi, {}),
3281
+ pdf: /* @__PURE__ */ n(Nt, {}),
3282
+ word: /* @__PURE__ */ n(zt, {}),
3283
+ excel: /* @__PURE__ */ n(wi, {}),
3284
+ ppt: /* @__PURE__ */ n(bi, {})
3285
+ };
3286
+ function Ht(e, t = !1) {
3287
+ const r = no(e), i = lo[r] || /* @__PURE__ */ n(Z, {});
3288
+ return t ? so(r) : i;
3289
+ }
3290
+ const co = "_card_1is0r_64", uo = "_downloadBtn_1is0r_82", ho = "_cardLeft_1is0r_88", fo = "_iconWrap_1is0r_97", mo = "_fileInfo_1is0r_116", go = "_fileName_1is0r_123", po = "_fileSize_1is0r_133", xo = "_cardPreview_1is0r_145", vo = "_actions_1is0r_221", bo = "_cardError_1is0r_236", wo = "_errorText_1is0r_240", X = {
3291
+ card: co,
3292
+ downloadBtn: uo,
3293
+ cardLeft: ho,
3294
+ iconWrap: fo,
3295
+ fileInfo: mo,
3296
+ fileName: go,
3297
+ fileSize: po,
3298
+ cardPreview: xo,
3299
+ actions: vo,
3300
+ cardError: bo,
3301
+ errorText: wo
3302
+ };
3303
+ function yo({
3304
+ editor: e,
3305
+ node: t,
3306
+ deleteNode: r,
3307
+ extension: i
3308
+ }) {
3309
+ var k;
3310
+ 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(() => {
3311
+ !d || !u || u({ id: d, fileName: a, fileExt: s, fileType: c, fileSize: l });
3312
+ }, [d, a, s, c, l, u]);
3313
+ return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className: Ie(X.card, X.cardError, "render-wrapper"), children: /* @__PURE__ */ n("p", { className: X.errorText, children: f }) }) }) : d ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(
3314
+ "div",
3315
+ {
3316
+ className: Ie(X.card, "render-wrapper", {
3317
+ [X.cardPreview]: !o
3318
+ }),
3319
+ children: [
3320
+ /* @__PURE__ */ y("div", { className: X.cardLeft, children: [
3321
+ /* @__PURE__ */ n("div", { className: X.iconWrap, children: Ht(c) }),
3322
+ /* @__PURE__ */ y("div", { className: X.fileInfo, children: [
3323
+ /* @__PURE__ */ y("span", { className: X.fileName, children: [
3324
+ a,
3325
+ ".",
3326
+ s
3327
+ ] }),
3328
+ /* @__PURE__ */ n("span", { className: X.fileSize, children: _t(l) })
3329
+ ] })
3330
+ ] }),
3331
+ /* @__PURE__ */ y("div", { className: X.actions, children: [
3332
+ u && /* @__PURE__ */ n(
3333
+ he,
3334
+ {
3335
+ action: g,
3336
+ icon: "AttachmentDownload",
3337
+ tooltip: p("editor.attachment.download"),
3338
+ customClass: o ? void 0 : X.downloadBtn
3339
+ }
3340
+ ),
3341
+ o && /* @__PURE__ */ n(
3342
+ he,
3343
+ {
3344
+ action: b,
3345
+ icon: "Trash2",
3346
+ tooltip: p("editor.delete")
3347
+ }
3348
+ )
3349
+ ] })
3350
+ ]
3351
+ }
3352
+ ) }) : /* @__PURE__ */ n(Z, {});
3353
+ }
3354
+ function Co(e) {
3355
+ try {
3356
+ return JSON.stringify(e);
3357
+ } catch {
3358
+ return JSON.stringify({});
3359
+ }
3360
+ }
3361
+ function de(e, t = !1) {
3362
+ return (r) => {
3363
+ const i = e.startsWith("data-") ? e : `data-${e}`;
3364
+ let o = decodeURIComponent(r.getAttribute(i));
3365
+ if (o == null || typeof o == "string" && o === "null")
3366
+ try {
3367
+ const s = r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);
3368
+ s && s.length > 0 && (o = (s.map((d) => d.trim()).reduce((d, f) => {
3369
+ const p = f.indexOf("="), u = [f.slice(0, p), f.slice(p + 1).slice(1, -1)];
3370
+ return d[u[0]] = u[1], d;
3371
+ }, {})[e.toLowerCase()] || "").replaceAll("&quot;", '"'));
3372
+ } catch (l) {
3373
+ console.error("Error getDatasetAttribute ", l.message, r);
3374
+ }
3375
+ if (t)
3376
+ try {
3377
+ return JSON.parse(o);
3378
+ } catch {
3379
+ return {};
3380
+ }
3381
+ if (o.includes("%") || o.includes("auto"))
3382
+ return o;
3383
+ const a = Number.parseInt(o);
3384
+ return a !== a ? o : a;
3385
+ };
3386
+ }
3387
+ function Na(e) {
3388
+ const { attrs: t } = e;
3389
+ return Object.keys(t).reduce((r, i) => {
3390
+ const o = t[i];
3391
+ if (o == null)
3392
+ return r;
3393
+ let a = "";
3394
+ return typeof o == "object" ? a = Co(o) : a = o, r[i] = a, r;
3395
+ }, /* @__PURE__ */ Object.create(null));
3396
+ }
3397
+ const _e = {
3398
+ UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
3399
+ UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
3400
+ UPLOAD_ATTACHMENT: (e) => `UPLOAD_ATTACHMENT-${e}`,
3401
+ EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
3402
+ };
3403
+ function ko(e) {
3404
+ const { editor: t } = Ti(), r = U.useMemo(
3405
+ () => t,
3406
+ [e, t]
3407
+ );
3408
+ return Ai({
3409
+ editor: r,
3410
+ selector(o) {
3411
+ return o.editor ? {
3412
+ editor: o.editor,
3413
+ editorState: o.editor.state,
3414
+ canCommand: o.editor.can
3415
+ } : {
3416
+ editor: null,
3417
+ editorState: void 0,
3418
+ canCommand: void 0
3419
+ };
3420
+ }
3421
+ }) || { editor: null };
3422
+ }
3423
+ function Q() {
3424
+ return ko().editor;
3425
+ }
3426
+ const Dt = Yt(!1);
3427
+ function Ot() {
3428
+ return Zt(Dt);
3429
+ }
3430
+ function za() {
3431
+ return qt(Dt);
3432
+ }
3433
+ const Pt = () => !1;
3434
+ function Ia(e = Pt) {
3435
+ const t = Ot(), [r, i] = I(() => {
3436
+ const s = e();
3437
+ return typeof s == "boolean" ? !s : s;
3438
+ }), o = Q();
3439
+ ze(() => {
3440
+ if (!o || !e) return;
3441
+ const s = () => {
3442
+ const c = e();
3443
+ i(typeof c == "boolean" ? !c : c);
3444
+ };
3445
+ return s(), o.on("selectionUpdate", s), o.on("transaction", s), () => {
3446
+ o.off("selectionUpdate", s), o.off("transaction", s);
3447
+ };
3448
+ }, [o, e]);
3449
+ const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
3450
+ return {
3451
+ disabled: a,
3452
+ // can not action, opacity < 1
3453
+ dataState: r,
3454
+ // true => show background, false => no background
3455
+ editorDisabled: l
3456
+ };
3457
+ }
3458
+ function pe(e = Pt) {
3459
+ const t = Ot(), [r, i] = I({}), [o, a] = I(e()), l = Q();
3460
+ ze(() => {
3461
+ if (!l || !e) return;
3462
+ const d = () => {
3463
+ a(e());
3464
+ };
3465
+ return d(), l.on("selectionUpdate", d), () => {
3466
+ l.off("selectionUpdate", d);
3467
+ };
3468
+ }, [r, l, e]);
3469
+ const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
3470
+ return {
3471
+ disabled: s,
3472
+ // can not action, opacity < 1
3473
+ dataState: o,
3474
+ // true => show background, false => no background
3475
+ editorDisabled: c,
3476
+ update: () => i({})
3477
+ // force update
3478
+ };
3479
+ }
3480
+ function ce(e) {
3481
+ const t = Q();
3482
+ return $(() => t ? t.extensionManager.extensions.find(
3483
+ (i) => i.name === e
3484
+ ) : null, [t, e]);
3485
+ }
3486
+ function La(e, t, r) {
3487
+ return e < t ? t : e > r ? r : e;
3488
+ }
3489
+ const Mo = (e) => typeof e == "number", To = (e) => typeof e == "string", Ao = (e) => typeof e == "function";
3490
+ function No(e, t = "px") {
3491
+ if (!e) return e;
3492
+ const r = Mo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3493
+ return Number.isNaN(i) ? e : i + a;
3494
+ }
3495
+ function Sa(e, t) {
3496
+ if (!e)
3497
+ return !1;
3498
+ const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3499
+ return !!r.find((o) => o.name === t);
3500
+ }
3501
+ function Ea(e) {
3502
+ return e.map((t) => To(t) ? { value: t, name: t } : t);
3503
+ }
3504
+ function tt(e) {
3505
+ const t = Q(), r = ce(e), { t: i } = ie();
3506
+ return $(() => {
3507
+ if (!t || !r || !i)
3508
+ return null;
3509
+ const { button: o } = r.options;
3510
+ return !o || !Ao(o) ? null : o({
3511
+ editor: t,
3512
+ extension: r,
3513
+ t: i
3514
+ });
3515
+ }, [t, r, i]);
3516
+ }
3517
+ function Ra() {
3518
+ const e = tt(jt.name), {
3519
+ icon: t = void 0,
3520
+ tooltip: r = void 0,
3521
+ shortcutKeys: i = void 0,
3522
+ tooltipOptions: o = {},
3523
+ action: a = void 0,
3524
+ isActive: l = void 0
3525
+ } = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } = pe(l), d = () => {
3526
+ s || a && (a(), c());
3527
+ };
3528
+ return e ? /* @__PURE__ */ n(
3529
+ he,
3530
+ {
3531
+ action: d,
3532
+ disabled: s,
3533
+ icon: t,
3534
+ shortcutKeys: i,
3535
+ tooltip: r,
3536
+ tooltipOptions: o
3537
+ }
3538
+ ) : /* @__PURE__ */ n(Z, {});
3539
+ }
3540
+ const jt = /* @__PURE__ */ Ge.create({
3541
+ name: "attachment",
3542
+ content: "",
3543
+ marks: "",
3544
+ group: "block",
3545
+ selectable: !0,
3546
+ atom: !0,
3547
+ draggable: !0,
3548
+ //@ts-expect-error
3549
+ addOptions() {
3550
+ var e;
3551
+ return {
3552
+ ...(e = this.parent) == null ? void 0 : e.call(this),
3553
+ HTMLAttributes: {
3554
+ class: "attachment"
3555
+ },
3556
+ button: ({ editor: t, t: r }) => ({
3557
+ component: he,
3558
+ componentProps: {
3559
+ /**
3560
+ * Instead of immediately inserting an empty node, we emit an event
3561
+ * that opens the attachment dialog. The node is only inserted once
3562
+ * the upload callback has returned an id.
3563
+ */
3564
+ action: () => {
3565
+ const i = _e.UPLOAD_ATTACHMENT(t.id);
3566
+ Jn(i, !0);
3567
+ },
3568
+ isActive: () => !1,
3569
+ disabled: !1,
3570
+ icon: "Attachment",
3571
+ tooltip: r("editor.attachment.tooltip")
3572
+ }
3573
+ })
3574
+ };
3575
+ },
3576
+ parseHTML() {
3577
+ return [{ tag: "div[class=attachment]" }];
3578
+ },
3579
+ renderHTML({ HTMLAttributes: e }) {
3580
+ const {
3581
+ id: t = "",
3582
+ fileName: r = "",
3583
+ fileSize: i = "",
3584
+ fileType: o = "",
3585
+ fileExt: a = ""
3586
+ } = e || {};
3587
+ return [
3588
+ "div",
3589
+ Xe(
3590
+ // @ts-expect-error
3591
+ this.options.HTMLAttributes || {},
3592
+ e || {}
3593
+ ),
3594
+ t ? [
3595
+ "span",
3596
+ { class: "attachment__body" },
3597
+ [
3598
+ "span",
3599
+ { class: "attachment__icon" },
3600
+ Ht(o, !0)
3601
+ ],
3602
+ [
3603
+ "span",
3604
+ { class: "attachment__text" },
3605
+ `${r}.${a} (${_t(i)})`
3606
+ ]
3607
+ ] : ["div", { class: "attachment__placeholder" }]
3608
+ ];
3609
+ },
3610
+ addAttributes() {
3611
+ return {
3612
+ /**
3613
+ * The UUID / primary key your backend assigned to this asset.
3614
+ * This is the only persistent reference stored in the document.
3615
+ */
3616
+ id: {
3617
+ default: null,
3618
+ parseHTML: de("id")
3619
+ },
3620
+ fileName: {
3621
+ default: null,
3622
+ parseHTML: de("filename")
3623
+ },
3624
+ fileSize: {
3625
+ default: null,
3626
+ parseHTML: de("filesize")
3627
+ },
3628
+ fileType: {
3629
+ default: null,
3630
+ parseHTML: de("filetype")
3631
+ },
3632
+ fileExt: {
3633
+ default: null,
3634
+ parseHTML: de("fileext")
3635
+ },
3636
+ error: {
3637
+ default: null,
3638
+ parseHTML: de("error")
3639
+ }
3640
+ };
3641
+ },
3642
+ addCommands() {
3643
+ return {
3644
+ setAttachment: (e) => ({ chain: t }) => t().insertContent({ type: this.name, attrs: e }).run()
3645
+ };
3646
+ },
3647
+ addNodeView() {
3648
+ return vt(yo);
3649
+ }
3650
+ });
3651
+ function zo() {
3652
+ var h;
3653
+ const { t: e } = ie(), t = Q(), { editorDisabled: r } = pe(), [i, o] = I(!1), [a, l] = I(!1), [s, c] = I(null), d = fe(null), f = ce(jt.name), p = _e.UPLOAD_ATTACHMENT(t.id);
3654
+ Qe((x) => {
3655
+ x && (c(null), l(!1), o(!0));
3656
+ }, [p]);
3657
+ const u = (h = f == null ? void 0 : f.options) == null ? void 0 : h.upload;
3658
+ function b(x) {
3659
+ var m;
3660
+ x.preventDefault(), (m = d.current) == null || m.click();
3661
+ }
3662
+ async function g(x) {
3663
+ var A;
3664
+ const m = (A = x.target.files) == null ? void 0 : A[0];
3665
+ if (!m || !t || t.isDestroyed) {
3666
+ x.target.value = "";
3667
+ return;
3668
+ }
3669
+ if (!u) {
3670
+ c(e("editor.attachment.error.no_upload_fn")), x.target.value = "";
3671
+ return;
3672
+ }
3673
+ c(null), l(!0);
3674
+ try {
3675
+ const v = await u(m);
3676
+ t.chain().focus().setAttachment({
3677
+ id: v,
3678
+ fileName: ro(m.name),
3679
+ fileSize: m.size,
3680
+ fileType: m.type,
3681
+ fileExt: io(m.name)
3682
+ }).run(), o(!1);
3683
+ } catch (v) {
3684
+ c(
3685
+ v != null && v.message ? `${e("editor.attachment.error.upload_failed")}: ${v.message}` : e("editor.attachment.error.upload_failed")
3686
+ );
3687
+ } finally {
3688
+ l(!1), x.target.value = "";
3689
+ }
3690
+ }
3691
+ function k(x) {
3692
+ a || (o(x), x || c(null));
3693
+ }
3694
+ return r ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: k, open: i, children: /* @__PURE__ */ y(se, { children: [
3695
+ /* @__PURE__ */ n(le, { children: e("editor.attachment.dialog.title") }),
3696
+ /* @__PURE__ */ y("div", { className: "richtext-flex richtext-flex-col richtext-gap-3", children: [
3697
+ /* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-muted-foreground", children: e("editor.attachment.dialog.description") }),
3698
+ /* @__PURE__ */ n(
3699
+ G,
3700
+ {
3701
+ className: "richtext-w-full",
3702
+ disabled: a,
3703
+ onClick: b,
3704
+ size: "sm",
3705
+ children: e(a ? "editor.attachment.uploading" : "editor.attachment.dialog.button.choose")
3706
+ }
3707
+ ),
3708
+ s && /* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-destructive", children: s })
3709
+ ] }),
3710
+ /* @__PURE__ */ n(
3711
+ "input",
3712
+ {
3713
+ hidden: !0,
3714
+ onChange: g,
3715
+ ref: d,
3716
+ type: "file"
3717
+ }
3718
+ )
3719
+ ] }) });
3720
+ }
3721
+ var Io = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Lo = Ge.create({
3196
3722
  name: "image",
3197
3723
  addOptions() {
3198
3724
  return {
@@ -3236,7 +3762,7 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3236
3762
  ];
3237
3763
  },
3238
3764
  renderHTML({ HTMLAttributes: e }) {
3239
- return ["img", ut(this.options.HTMLAttributes, e)];
3765
+ return ["img", Xe(this.options.HTMLAttributes, e)];
3240
3766
  },
3241
3767
  parseMarkdown: (e, t) => t.createNode("image", {
3242
3768
  src: e.href,
@@ -3254,33 +3780,33 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3254
3780
  const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
3255
3781
  return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
3256
3782
  const c = document.createElement("img");
3257
- Object.entries(l).forEach(([p, h]) => {
3258
- if (h != null)
3783
+ Object.entries(l).forEach(([p, u]) => {
3784
+ if (u != null)
3259
3785
  switch (p) {
3260
3786
  case "width":
3261
3787
  case "height":
3262
3788
  break;
3263
3789
  default:
3264
- c.setAttribute(p, h);
3790
+ c.setAttribute(p, u);
3265
3791
  break;
3266
3792
  }
3267
3793
  }), c.src = l.src;
3268
- const d = new ui({
3794
+ const d = new zi({
3269
3795
  element: c,
3270
3796
  editor: s,
3271
3797
  node: o,
3272
3798
  getPos: a,
3273
- onResize: (p, h) => {
3274
- c.style.width = `${p}px`, c.style.height = `${h}px`;
3799
+ onResize: (p, u) => {
3800
+ c.style.width = `${p}px`, c.style.height = `${u}px`;
3275
3801
  },
3276
- onCommit: (p, h) => {
3802
+ onCommit: (p, u) => {
3277
3803
  const b = a();
3278
3804
  b !== void 0 && this.editor.chain().setNodeSelection(b).updateAttributes(this.name, {
3279
3805
  width: p,
3280
- height: h
3806
+ height: u
3281
3807
  }).run();
3282
3808
  },
3283
- onUpdate: (p, h, b) => p.type === o.type,
3809
+ onUpdate: (p, u, b) => p.type === o.type,
3284
3810
  options: {
3285
3811
  directions: e,
3286
3812
  min: {
@@ -3289,9 +3815,9 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3289
3815
  },
3290
3816
  preserveAspectRatio: i === !0
3291
3817
  }
3292
- }), g = d.dom;
3293
- return g.style.visibility = "hidden", g.style.pointerEvents = "none", c.onload = () => {
3294
- g.style.visibility = "", g.style.pointerEvents = "";
3818
+ }), f = d.dom;
3819
+ return f.style.visibility = "hidden", f.style.pointerEvents = "none", c.onload = () => {
3820
+ f.style.visibility = "", f.style.pointerEvents = "";
3295
3821
  }, d;
3296
3822
  };
3297
3823
  },
@@ -3305,8 +3831,8 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3305
3831
  },
3306
3832
  addInputRules() {
3307
3833
  return [
3308
- di({
3309
- find: Bn,
3834
+ Ni({
3835
+ find: Io,
3310
3836
  type: this.type,
3311
3837
  getAttributes: (e) => {
3312
3838
  const [, , t, r, i] = e;
@@ -3315,144 +3841,144 @@ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.cre
3315
3841
  })
3316
3842
  ];
3317
3843
  }
3318
- }), Fn = $n, Wn = typeof global == "object" && global && global.Object === Object && global, Gn = typeof self == "object" && self && self.Object === Object && self, St = Wn || Gn || Function("return this")(), Ie = St.Symbol, At = Object.prototype, Xn = At.hasOwnProperty, Yn = At.toString, fe = Ie ? Ie.toStringTag : void 0;
3319
- function qn(e) {
3320
- var t = Xn.call(e, fe), r = e[fe];
3844
+ }), So = Lo, Eo = typeof global == "object" && global && global.Object === Object && global, Ro = typeof self == "object" && self && self.Object === Object && self, Bt = Eo || Ro || Function("return this")(), Se = Bt.Symbol, Ut = Object.prototype, Vo = Ut.hasOwnProperty, _o = Ut.toString, be = Se ? Se.toStringTag : void 0;
3845
+ function Ho(e) {
3846
+ var t = Vo.call(e, be), r = e[be];
3321
3847
  try {
3322
- e[fe] = void 0;
3848
+ e[be] = void 0;
3323
3849
  var i = !0;
3324
3850
  } catch {
3325
3851
  }
3326
- var o = Yn.call(e);
3327
- return i && (t ? e[fe] = r : delete e[fe]), o;
3852
+ var o = _o.call(e);
3853
+ return i && (t ? e[be] = r : delete e[be]), o;
3328
3854
  }
3329
- var Zn = Object.prototype, Kn = Zn.toString;
3330
- function Jn(e) {
3331
- return Kn.call(e);
3855
+ var Do = Object.prototype, Oo = Do.toString;
3856
+ function Po(e) {
3857
+ return Oo.call(e);
3332
3858
  }
3333
- var Qn = "[object Null]", eo = "[object Undefined]", nt = Ie ? Ie.toStringTag : void 0;
3334
- function Lt(e) {
3335
- return e == null ? e === void 0 ? eo : Qn : nt && nt in Object(e) ? qn(e) : Jn(e);
3859
+ var jo = "[object Null]", Bo = "[object Undefined]", ft = Se ? Se.toStringTag : void 0;
3860
+ function $t(e) {
3861
+ return e == null ? e === void 0 ? Bo : jo : ft && ft in Object(e) ? Ho(e) : Po(e);
3336
3862
  }
3337
- function Nt(e) {
3863
+ function Ft(e) {
3338
3864
  return e != null && typeof e == "object";
3339
3865
  }
3340
- var to = "[object Symbol]";
3341
- function ro(e) {
3342
- return typeof e == "symbol" || Nt(e) && Lt(e) == to;
3866
+ var Uo = "[object Symbol]";
3867
+ function $o(e) {
3868
+ return typeof e == "symbol" || Ft(e) && $t(e) == Uo;
3343
3869
  }
3344
- var io = /\s/;
3345
- function no(e) {
3346
- for (var t = e.length; t-- && io.test(e.charAt(t)); )
3870
+ var Fo = /\s/;
3871
+ function Wo(e) {
3872
+ for (var t = e.length; t-- && Fo.test(e.charAt(t)); )
3347
3873
  ;
3348
3874
  return t;
3349
3875
  }
3350
- var oo = /^\s+/;
3351
- function ao(e) {
3352
- return e && e.slice(0, no(e) + 1).replace(oo, "");
3876
+ var Go = /^\s+/;
3877
+ function Xo(e) {
3878
+ return e && e.slice(0, Wo(e) + 1).replace(Go, "");
3353
3879
  }
3354
- function Te(e) {
3880
+ function Ee(e) {
3355
3881
  var t = typeof e;
3356
3882
  return e != null && (t == "object" || t == "function");
3357
3883
  }
3358
- var ot = NaN, so = /^[-+]0x[0-9a-f]+$/i, lo = /^0b[01]+$/i, co = /^0o[0-7]+$/i, uo = parseInt;
3359
- function ge(e) {
3884
+ var mt = NaN, Yo = /^[-+]0x[0-9a-f]+$/i, Zo = /^0b[01]+$/i, qo = /^0o[0-7]+$/i, Jo = parseInt;
3885
+ function ye(e) {
3360
3886
  if (typeof e == "number")
3361
3887
  return e;
3362
- if (ro(e))
3363
- return ot;
3364
- if (Te(e)) {
3888
+ if ($o(e))
3889
+ return mt;
3890
+ if (Ee(e)) {
3365
3891
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
3366
- e = Te(t) ? t + "" : t;
3892
+ e = Ee(t) ? t + "" : t;
3367
3893
  }
3368
3894
  if (typeof e != "string")
3369
3895
  return e === 0 ? e : +e;
3370
- e = ao(e);
3371
- var r = lo.test(e);
3372
- return r || co.test(e) ? uo(e.slice(2), r ? 2 : 8) : so.test(e) ? ot : +e;
3896
+ e = Xo(e);
3897
+ var r = Zo.test(e);
3898
+ return r || qo.test(e) ? Jo(e.slice(2), r ? 2 : 8) : Yo.test(e) ? mt : +e;
3373
3899
  }
3374
- function ho(e, t, r) {
3900
+ function Ko(e, t, r) {
3375
3901
  return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
3376
3902
  }
3377
- function fo(e, t, r) {
3378
- return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = ge(r), r = r === r ? r : 0), t !== void 0 && (t = ge(t), t = t === t ? t : 0), ho(ge(e), t, r);
3903
+ function Qo(e, t, r) {
3904
+ 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), Ko(ye(e), t, r);
3379
3905
  }
3380
- var De = function() {
3381
- return St.Date.now();
3382
- }, mo = "Expected a function", go = Math.max, po = Math.min;
3383
- function xo(e, t, r) {
3384
- var i, o, a, l, s, c, d = 0, g = !1, p = !1, h = !0;
3906
+ var Ue = function() {
3907
+ return Bt.Date.now();
3908
+ }, ea = "Expected a function", ta = Math.max, ra = Math.min;
3909
+ function ia(e, t, r) {
3910
+ var i, o, a, l, s, c, d = 0, f = !1, p = !1, u = !0;
3385
3911
  if (typeof e != "function")
3386
- throw new TypeError(mo);
3387
- t = ge(t) || 0, Te(r) && (g = !!r.leading, p = "maxWait" in r, a = p ? go(ge(r.maxWait) || 0, t) : a, h = "trailing" in r ? !!r.trailing : h);
3388
- function b(w) {
3389
- var L = i, V = o;
3390
- return i = o = void 0, d = w, l = e.apply(V, L), l;
3912
+ throw new TypeError(ea);
3913
+ t = ye(t) || 0, Ee(r) && (f = !!r.leading, p = "maxWait" in r, a = p ? ta(ye(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
3914
+ function b(C) {
3915
+ var S = i, V = o;
3916
+ return i = o = void 0, d = C, l = e.apply(V, S), l;
3391
3917
  }
3392
- function f(w) {
3393
- return d = w, s = setTimeout(y, t), g ? b(w) : l;
3918
+ function g(C) {
3919
+ return d = C, s = setTimeout(x, t), f ? b(C) : l;
3394
3920
  }
3395
- function k(w) {
3396
- var L = w - c, V = w - d, D = t - L;
3397
- return p ? po(D, a - V) : D;
3921
+ function k(C) {
3922
+ var S = C - c, V = C - d, H = t - S;
3923
+ return p ? ra(H, a - V) : H;
3398
3924
  }
3399
- function u(w) {
3400
- var L = w - c, V = w - d;
3401
- return c === void 0 || L >= t || L < 0 || p && V >= a;
3925
+ function h(C) {
3926
+ var S = C - c, V = C - d;
3927
+ return c === void 0 || S >= t || S < 0 || p && V >= a;
3402
3928
  }
3403
- function y() {
3404
- var w = De();
3405
- if (u(w))
3406
- return m(w);
3407
- s = setTimeout(y, k(w));
3929
+ function x() {
3930
+ var C = Ue();
3931
+ if (h(C))
3932
+ return m(C);
3933
+ s = setTimeout(x, k(C));
3408
3934
  }
3409
- function m(w) {
3410
- return s = void 0, h && i ? b(w) : (i = o = void 0, l);
3935
+ function m(C) {
3936
+ return s = void 0, u && i ? b(C) : (i = o = void 0, l);
3411
3937
  }
3412
- function z() {
3938
+ function A() {
3413
3939
  s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
3414
3940
  }
3415
3941
  function v() {
3416
- return s === void 0 ? l : m(De());
3942
+ return s === void 0 ? l : m(Ue());
3417
3943
  }
3418
- function A() {
3419
- var w = De(), L = u(w);
3420
- if (i = arguments, o = this, c = w, L) {
3944
+ function L() {
3945
+ var C = Ue(), S = h(C);
3946
+ if (i = arguments, o = this, c = C, S) {
3421
3947
  if (s === void 0)
3422
- return f(c);
3948
+ return g(c);
3423
3949
  if (p)
3424
- return clearTimeout(s), s = setTimeout(y, t), b(c);
3950
+ return clearTimeout(s), s = setTimeout(x, t), b(c);
3425
3951
  }
3426
- return s === void 0 && (s = setTimeout(y, t)), l;
3952
+ return s === void 0 && (s = setTimeout(x, t)), l;
3427
3953
  }
3428
- return A.cancel = z, A.flush = v, A;
3954
+ return L.cancel = A, L.flush = v, L;
3429
3955
  }
3430
- var bo = "[object Number]";
3431
- function at(e) {
3432
- return typeof e == "number" || Nt(e) && Lt(e) == bo;
3956
+ var na = "[object Number]";
3957
+ function gt(e) {
3958
+ return typeof e == "number" || Ft(e) && $t(e) == na;
3433
3959
  }
3434
- var vo = "Expected a function";
3435
- function st(e, t, r) {
3960
+ var oa = "Expected a function";
3961
+ function pt(e, t, r) {
3436
3962
  var i = !0, o = !0;
3437
3963
  if (typeof e != "function")
3438
- throw new TypeError(vo);
3439
- return Te(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), xo(e, t, {
3964
+ throw new TypeError(oa);
3965
+ return Ee(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), ia(e, t, {
3440
3966
  leading: i,
3441
3967
  maxWait: t,
3442
3968
  trailing: o
3443
3969
  });
3444
3970
  }
3445
- const ye = {
3971
+ const Te = {
3446
3972
  TOP_LEFT: "tl",
3447
3973
  TOP_RIGHT: "tr",
3448
3974
  BOTTOM_LEFT: "bl",
3449
3975
  BOTTOM_RIGHT: "br"
3450
3976
  };
3451
- function wo({
3977
+ function aa({
3452
3978
  src: e,
3453
3979
  style: t
3454
3980
  }) {
3455
- return /* @__PURE__ */ C(
3981
+ return /* @__PURE__ */ y(
3456
3982
  "div",
3457
3983
  {
3458
3984
  style: {
@@ -3494,7 +4020,7 @@ function wo({
3494
4020
  }
3495
4021
  }
3496
4022
  ),
3497
- /* @__PURE__ */ C(
4023
+ /* @__PURE__ */ y(
3498
4024
  "div",
3499
4025
  {
3500
4026
  style: {
@@ -3555,141 +4081,141 @@ function wo({
3555
4081
  }
3556
4082
  );
3557
4083
  }
3558
- function yo(e) {
3559
- var D, j, _, T;
3560
- const [t, r] = E({
3561
- width: Ke,
3562
- height: Ke
3563
- }), [i, o] = E({
4084
+ function sa(e) {
4085
+ var H, D, j, N;
4086
+ const [t, r] = I({
4087
+ width: at,
4088
+ height: at
4089
+ }), [i, o] = I({
3564
4090
  width: 0,
3565
4091
  height: 0
3566
- }), [a] = E([
3567
- ye.TOP_LEFT,
3568
- ye.TOP_RIGHT,
3569
- ye.BOTTOM_LEFT,
3570
- ye.BOTTOM_RIGHT
3571
- ]), [l, s] = E(!1), [c, d] = E({
4092
+ }), [a] = I([
4093
+ Te.TOP_LEFT,
4094
+ Te.TOP_RIGHT,
4095
+ Te.BOTTOM_LEFT,
4096
+ Te.BOTTOM_RIGHT
4097
+ ]), [l, s] = I(!1), [c, d] = I({
3572
4098
  x: 0,
3573
4099
  y: 0,
3574
4100
  w: 0,
3575
4101
  h: 0,
3576
4102
  dir: ""
3577
- }), { align: g, inline: p, uploading: h } = (D = e == null ? void 0 : e.node) == null ? void 0 : D.attrs, b = p && (g === "left" || g === "right"), f = $(() => {
3578
- var Xe;
3579
- const { src: x, alt: I, width: R, height: H, flipX: P, flipY: S } = (Xe = e == null ? void 0 : e.node) == null ? void 0 : Xe.attrs, U = at(R) ? `${R}px` : R, F = at(H) ? `${H}px` : H, W = [];
3580
- P && W.push("rotateX(180deg)"), S && W.push("rotateY(180deg)");
3581
- const Ot = W.join(" ");
4103
+ }), { 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 = $(() => {
4104
+ var it;
4105
+ const { src: w, alt: T, width: R, height: _, flipX: O, flipY: z } = (it = e == null ? void 0 : e.node) == null ? void 0 : it.attrs, B = gt(R) ? `${R}px` : R, F = gt(_) ? `${_}px` : _, W = [];
4106
+ O && W.push("rotateX(180deg)"), z && W.push("rotateY(180deg)");
4107
+ const Xt = W.join(" ");
3582
4108
  return {
3583
- src: x || void 0,
3584
- alt: I || void 0,
4109
+ src: w || void 0,
4110
+ alt: T || void 0,
3585
4111
  style: {
3586
- width: U || void 0,
4112
+ width: B || void 0,
3587
4113
  height: F || void 0,
3588
- transform: Ot || "none",
3589
- ...b ? { float: g } : {}
4114
+ transform: Xt || "none",
4115
+ ...b ? { float: f } : {}
3590
4116
  }
3591
4117
  };
3592
- }, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]), k = $(() => {
4118
+ }, [(D = e == null ? void 0 : e.node) == null ? void 0 : D.attrs]), k = $(() => {
3593
4119
  const {
3594
- style: { width: x }
3595
- } = f;
3596
- return { width: x === "100%" ? x : void 0 };
3597
- }, [f]);
3598
- function u(x) {
4120
+ style: { width: w }
4121
+ } = g;
4122
+ return { width: w === "100%" ? w : void 0 };
4123
+ }, [g]);
4124
+ function h(w) {
3599
4125
  o({
3600
- width: x.target.width,
3601
- height: x.target.height
4126
+ width: w.target.width,
4127
+ height: w.target.height
3602
4128
  });
3603
4129
  }
3604
- function y() {
3605
- const { editor: x, getPos: I } = e;
3606
- x.commands.setNodeSelection(I());
4130
+ function x() {
4131
+ const { editor: w, getPos: T } = e;
4132
+ w.commands.setNodeSelection(T());
3607
4133
  }
3608
- const m = de(
3609
- st(() => {
3610
- const { editor: x } = e, { width: I } = getComputedStyle(x.view.dom);
4134
+ const m = ne(
4135
+ pt(() => {
4136
+ const { editor: w } = e, { width: T } = getComputedStyle(w.view.dom);
3611
4137
  r((R) => ({
3612
4138
  ...R,
3613
- width: Number.parseInt(I, 10)
4139
+ width: Number.parseInt(T, 10)
3614
4140
  }));
3615
- }, Je),
4141
+ }, st),
3616
4142
  [e == null ? void 0 : e.editor]
3617
4143
  );
3618
- function z(x, I) {
3619
- x.preventDefault(), x.stopPropagation();
3620
- const R = i.width, H = i.height, P = R / H;
3621
- let S = Number(e.node.attrs.width), U = Number(e.node.attrs.height);
4144
+ function A(w, T) {
4145
+ w.preventDefault(), w.stopPropagation();
4146
+ const R = i.width, _ = i.height, O = R / _;
4147
+ let z = Number(e.node.attrs.width), B = Number(e.node.attrs.height);
3622
4148
  const F = t.width;
3623
- S && !U ? (S = S > F ? F : S, U = Math.round(S / P)) : U && !S ? (S = Math.round(U * P), S = S > F ? F : S) : !S && !U ? (S = R > F ? F : R, U = Math.round(S / P)) : S = S > F ? F : S, s(!0), d({
3624
- x: x.clientX,
3625
- y: x.clientY,
3626
- w: S,
3627
- h: U,
3628
- dir: I
4149
+ z && !B ? (z = z > F ? F : z, B = Math.round(z / O)) : B && !z ? (z = Math.round(B * O), z = z > F ? F : z) : !z && !B ? (z = R > F ? F : R, B = Math.round(z / O)) : z = z > F ? F : z, s(!0), d({
4150
+ x: w.clientX,
4151
+ y: w.clientY,
4152
+ w: z,
4153
+ h: B,
4154
+ dir: T
3629
4155
  });
3630
4156
  }
3631
- const v = de(
3632
- st((x) => {
3633
- if (x.preventDefault(), x.stopPropagation(), !l)
4157
+ const v = ne(
4158
+ pt((w) => {
4159
+ if (w.preventDefault(), w.stopPropagation(), !l)
3634
4160
  return;
3635
- const { x: I, w: R, dir: H } = c, P = (x.clientX - I) * (/l/.test(H) ? -1 : 1), S = fo(R + P, gi, t.width);
4161
+ const { x: T, w: R, dir: _ } = c, O = (w.clientX - T) * (/l/.test(_) ? -1 : 1), z = Qo(R + O, Li, t.width);
3636
4162
  e.updateAttributes({
3637
- width: S,
4163
+ width: z,
3638
4164
  height: null
3639
4165
  });
3640
- }, Je),
4166
+ }, st),
3641
4167
  [l, c, t, e.updateAttributes]
3642
- ), A = de(
3643
- (x) => {
3644
- x.preventDefault(), x.stopPropagation(), l && (d({
4168
+ ), L = ne(
4169
+ (w) => {
4170
+ w.preventDefault(), w.stopPropagation(), l && (d({
3645
4171
  x: 0,
3646
4172
  y: 0,
3647
4173
  w: 0,
3648
4174
  h: 0,
3649
4175
  dir: ""
3650
- }), s(!1), y());
4176
+ }), s(!1), x());
3651
4177
  },
3652
- [l, y]
3653
- ), w = de(() => {
3654
- document == null || document.addEventListener("mousemove", v, !0), document == null || document.addEventListener("mouseup", A, !0);
3655
- }, [v, A]), L = de(() => {
3656
- document == null || document.removeEventListener("mousemove", v, !0), document == null || document.removeEventListener("mouseup", A, !0);
3657
- }, [v, A]);
3658
- Me(() => (l ? w() : L(), () => {
3659
- L();
3660
- }), [l, w, L]);
4178
+ [l, x]
4179
+ ), C = ne(() => {
4180
+ document == null || document.addEventListener("mousemove", v, !0), document == null || document.addEventListener("mouseup", L, !0);
4181
+ }, [v, L]), S = ne(() => {
4182
+ document == null || document.removeEventListener("mousemove", v, !0), document == null || document.removeEventListener("mouseup", L, !0);
4183
+ }, [v, L]);
4184
+ ze(() => (l ? C() : S(), () => {
4185
+ S();
4186
+ }), [l, C, S]);
3661
4187
  const V = $(() => new ResizeObserver(() => m()), [m]);
3662
- return Me(() => (V.observe(e.editor.view.dom), () => {
4188
+ return ze(() => (V.observe(e.editor.view.dom), () => {
3663
4189
  V.disconnect();
3664
- }), [e.editor.view.dom, V]), h ? /* @__PURE__ */ n(
3665
- Ze,
4190
+ }), [e.editor.view.dom, V]), u ? /* @__PURE__ */ n(
4191
+ Le,
3666
4192
  {
3667
4193
  as: p ? "span" : "div",
3668
4194
  className: "image-view",
3669
4195
  style: {
3670
- float: b ? g : void 0,
3671
- margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4196
+ float: b ? f : void 0,
4197
+ margin: b ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3672
4198
  display: p ? "inline" : "block",
3673
- textAlign: b ? void 0 : g,
3674
- width: ((_ = f.style) == null ? void 0 : _.width) ?? "auto",
4199
+ textAlign: b ? void 0 : f,
4200
+ width: ((j = g.style) == null ? void 0 : j.width) ?? "auto",
3675
4201
  ...b ? {} : k
3676
4202
  },
3677
- children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(wo, { src: f.src, style: f.style }) })
4203
+ children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(aa, { src: g.src, style: g.style }) })
3678
4204
  }
3679
4205
  ) : /* @__PURE__ */ n(
3680
- Ze,
4206
+ Le,
3681
4207
  {
3682
4208
  as: p ? "span" : "div",
3683
4209
  className: "image-view",
3684
4210
  style: {
3685
- float: b ? g : void 0,
3686
- margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
4211
+ float: b ? f : void 0,
4212
+ margin: b ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3687
4213
  display: p ? "inline" : "block",
3688
- textAlign: b ? void 0 : g,
3689
- width: ((T = f.style) == null ? void 0 : T.width) ?? "auto",
4214
+ textAlign: b ? void 0 : f,
4215
+ width: ((N = g.style) == null ? void 0 : N.width) ?? "auto",
3690
4216
  ...b ? {} : k
3691
4217
  },
3692
- children: /* @__PURE__ */ C(
4218
+ children: /* @__PURE__ */ y(
3693
4219
  "div",
3694
4220
  {
3695
4221
  "data-drag-handle": !0,
@@ -3700,22 +4226,22 @@ function yo(e) {
3700
4226
  /* @__PURE__ */ n(
3701
4227
  "img",
3702
4228
  {
3703
- alt: f.alt,
4229
+ alt: g.alt,
3704
4230
  className: "image-view__body__image block",
3705
4231
  height: "auto",
3706
- onClick: y,
3707
- onLoad: u,
3708
- src: f.src,
3709
- style: f.style
4232
+ onClick: x,
4233
+ onLoad: h,
4234
+ src: g.src,
4235
+ style: g.style
3710
4236
  }
3711
4237
  ),
3712
- (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((x) => /* @__PURE__ */ n(
4238
+ (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(
3713
4239
  "span",
3714
4240
  {
3715
- className: `image-resizer__handler image-resizer__handler--${x}`,
3716
- onMouseDown: (I) => z(I, x)
4241
+ className: `image-resizer__handler image-resizer__handler--${w}`,
4242
+ onMouseDown: (T) => A(T, w)
3717
4243
  },
3718
- `image-dir-${x}`
4244
+ `image-dir-${w}`
3719
4245
  )) })
3720
4246
  ]
3721
4247
  }
@@ -3723,121 +4249,7 @@ function yo(e) {
3723
4249
  }
3724
4250
  );
3725
4251
  }
3726
- function Co(e) {
3727
- const { editor: t } = hi(), r = B.useMemo(
3728
- () => t,
3729
- [e, t]
3730
- );
3731
- return fi({
3732
- editor: r,
3733
- selector(o) {
3734
- return o.editor ? {
3735
- editor: o.editor,
3736
- editorState: o.editor.state,
3737
- canCommand: o.editor.can
3738
- } : {
3739
- editor: null,
3740
- editorState: void 0,
3741
- canCommand: void 0
3742
- };
3743
- }
3744
- }) || { editor: null };
3745
- }
3746
- function ee() {
3747
- return Co().editor;
3748
- }
3749
- const Et = _t(!1);
3750
- function Rt() {
3751
- return Ut(Et);
3752
- }
3753
- function qo() {
3754
- return Bt(Et);
3755
- }
3756
- const Vt = () => !1;
3757
- function Zo(e = Vt) {
3758
- const t = Rt(), [r, i] = E(() => {
3759
- const s = e();
3760
- return typeof s == "boolean" ? !s : s;
3761
- }), o = ee();
3762
- Me(() => {
3763
- if (!o || !e) return;
3764
- const s = () => {
3765
- const c = e();
3766
- i(typeof c == "boolean" ? !c : c);
3767
- };
3768
- return s(), o.on("selectionUpdate", s), o.on("transaction", s), () => {
3769
- o.off("selectionUpdate", s), o.off("transaction", s);
3770
- };
3771
- }, [o, e]);
3772
- const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
3773
- return {
3774
- disabled: a,
3775
- // can not action, opacity < 1
3776
- dataState: r,
3777
- // true => show background, false => no background
3778
- editorDisabled: l
3779
- };
3780
- }
3781
- function Ae(e = Vt) {
3782
- const t = Rt(), [r, i] = E({}), [o, a] = E(e()), l = ee();
3783
- Me(() => {
3784
- if (!l || !e) return;
3785
- const d = () => {
3786
- a(e());
3787
- };
3788
- return d(), l.on("selectionUpdate", d), () => {
3789
- l.off("selectionUpdate", d);
3790
- };
3791
- }, [r, l, e]);
3792
- const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
3793
- return {
3794
- disabled: s,
3795
- // can not action, opacity < 1
3796
- dataState: o,
3797
- // true => show background, false => no background
3798
- editorDisabled: c,
3799
- update: () => i({})
3800
- // force update
3801
- };
3802
- }
3803
- function ce(e) {
3804
- const t = ee();
3805
- return $(() => t ? t.extensionManager.extensions.find(
3806
- (i) => i.name === e
3807
- ) : null, [t, e]);
3808
- }
3809
- function Ko(e, t, r) {
3810
- return e < t ? t : e > r ? r : e;
3811
- }
3812
- const ko = (e) => typeof e == "number", Mo = (e) => typeof e == "string", Io = (e) => typeof e == "function";
3813
- function To(e, t = "px") {
3814
- if (!e) return e;
3815
- const r = ko(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3816
- return Number.isNaN(i) ? e : i + a;
3817
- }
3818
- function Jo(e, t) {
3819
- if (!e)
3820
- return !1;
3821
- const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3822
- return !!r.find((o) => o.name === t);
3823
- }
3824
- function Qo(e) {
3825
- return e.map((t) => Mo(t) ? { value: t, name: t } : t);
3826
- }
3827
- function Ht(e) {
3828
- const t = ee(), r = ce(e), { t: i } = oe();
3829
- return $(() => {
3830
- if (!t || !r || !i)
3831
- return null;
3832
- const { button: o } = r.options;
3833
- return !o || !Io(o) ? null : o({
3834
- editor: t,
3835
- extension: r,
3836
- t: i
3837
- });
3838
- }, [t, r, i]);
3839
- }
3840
- function zo(e, t) {
4252
+ function la(e, t) {
3841
4253
  const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
3842
4254
  if (!o) return !1;
3843
4255
  const l = r || {
@@ -3860,10 +4272,10 @@ function zo(e, t) {
3860
4272
  return l === s;
3861
4273
  });
3862
4274
  }
3863
- function Ge(e, t) {
4275
+ function rt(e, t) {
3864
4276
  const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
3865
4277
  return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
3866
- if (!zo(c, r)) {
4278
+ if (!la(c, r)) {
3867
4279
  t.onError ? t.onError({
3868
4280
  type: "type",
3869
4281
  message: o("editor.upload.fileTypeNotSupported", {
@@ -3899,16 +4311,16 @@ function Ge(e, t) {
3899
4311
  l.push(c);
3900
4312
  }), l;
3901
4313
  }
3902
- function ea() {
3903
- const { t: e } = oe(), { toast: t } = Be(), r = ee(), i = Ht(ze.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = E(!1), d = ce(ze.name), [g, p] = E(""), [h, b] = E(""), f = xe(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [u, y] = E(k), m = $(() => d == null ? void 0 : d.options, [d]);
3904
- function z(w) {
3905
- var _;
3906
- const L = (_ = w == null ? void 0 : w.target) == null ? void 0 : _.files;
3907
- if (!r || r.isDestroyed || L.length === 0) {
3908
- w.target.value = "";
4314
+ function Va() {
4315
+ 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] = I(!1), d = ce(Re.name), [f, p] = I(""), [u, b] = I(""), g = fe(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [h, x] = I(k), m = $(() => d == null ? void 0 : d.options, [d]);
4316
+ function A(C) {
4317
+ var j;
4318
+ const S = (j = C == null ? void 0 : C.target) == null ? void 0 : j.files;
4319
+ if (!r || r.isDestroyed || S.length === 0) {
4320
+ C.target.value = "";
3909
4321
  return;
3910
4322
  }
3911
- const V = Ge(L, {
4323
+ const V = rt(S, {
3912
4324
  acceptMimes: m == null ? void 0 : m.acceptMimes,
3913
4325
  maxSize: m == null ? void 0 : m.maxSize,
3914
4326
  t: e,
@@ -3916,38 +4328,38 @@ function ea() {
3916
4328
  onError: m.onError
3917
4329
  });
3918
4330
  if (V.length <= 0) {
3919
- w.target.value = "";
4331
+ C.target.value = "";
3920
4332
  return;
3921
4333
  }
3922
4334
  c(!1);
3923
- const D = h, j = u;
3924
- if (b(""), y(k), m.upload) {
3925
- const T = m != null && m.multiple ? V : [V[0]];
3926
- for (const x of T)
4335
+ const H = u, D = h;
4336
+ if (b(""), x(k), m.upload) {
4337
+ const N = m != null && m.multiple ? V : [V[0]];
4338
+ for (const w of N)
3927
4339
  r.chain().focus().insertImagePlaceholder({
3928
- file: x,
3929
- inline: j,
3930
- alt: D
4340
+ file: w,
4341
+ inline: D,
4342
+ alt: H
3931
4343
  }).run();
3932
4344
  } else {
3933
- const T = m != null && m.multiple ? V : [V[0]];
3934
- for (const x of T) {
3935
- const I = URL.createObjectURL(x);
3936
- r.chain().focus().setImageInline({ src: I, inline: j, alt: D }).run();
4345
+ const N = m != null && m.multiple ? V : [V[0]];
4346
+ for (const w of N) {
4347
+ const T = URL.createObjectURL(w);
4348
+ r.chain().focus().setImageInline({ src: T, inline: D, alt: H }).run();
3937
4349
  }
3938
4350
  }
3939
- w.target.value = "";
4351
+ C.target.value = "";
3940
4352
  }
3941
- function v(w) {
3942
- w.preventDefault(), w.stopPropagation(), r.chain().focus().setImageInline({ src: g, inline: u, alt: h }).run(), c(!1), y(k), p(""), b("");
4353
+ function v(C) {
4354
+ C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k), p(""), b("");
3943
4355
  }
3944
- function A(w) {
3945
- var L;
3946
- w.preventDefault(), (L = f.current) == null || L.click();
4356
+ function L(C) {
4357
+ var S;
4358
+ C.preventDefault(), (S = g.current) == null || S.click();
3947
4359
  }
3948
- return i ? /* @__PURE__ */ C(we, { onOpenChange: c, open: s, children: [
3949
- /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
3950
- wt,
4360
+ return i ? /* @__PURE__ */ y(ge, { onOpenChange: c, open: s, children: [
4361
+ /* @__PURE__ */ n(et, { asChild: !0, children: /* @__PURE__ */ n(
4362
+ he,
3951
4363
  {
3952
4364
  disabled: l,
3953
4365
  icon: o,
@@ -3957,60 +4369,60 @@ function ea() {
3957
4369
  }
3958
4370
  }
3959
4371
  ) }),
3960
- /* @__PURE__ */ C(se, { children: [
4372
+ /* @__PURE__ */ y(se, { children: [
3961
4373
  /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
3962
- /* @__PURE__ */ C(
3963
- Se,
4374
+ /* @__PURE__ */ y(
4375
+ Ve,
3964
4376
  {
3965
4377
  activationMode: "manual",
3966
4378
  defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
3967
4379
  children: [
3968
- m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3969
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3970
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4380
+ m.resourceImage === "both" && /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4381
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4382
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
3971
4383
  ] }),
3972
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4384
+ /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3973
4385
  /* @__PURE__ */ n(
3974
- $e,
4386
+ Je,
3975
4387
  {
3976
- checked: u,
3977
- onCheckedChange: (w) => {
3978
- y(w);
4388
+ checked: h,
4389
+ onCheckedChange: (C) => {
4390
+ x(C);
3979
4391
  }
3980
4392
  }
3981
4393
  ),
3982
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4394
+ /* @__PURE__ */ n(Ce, { children: e("editor.link.dialog.inline") })
3983
4395
  ] }),
3984
- m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
3985
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4396
+ m.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
4397
+ /* @__PURE__ */ n(Ce, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
3986
4398
  /* @__PURE__ */ n(
3987
- re,
4399
+ oe,
3988
4400
  {
3989
- onChange: (w) => b(w.target.value),
4401
+ onChange: (C) => b(C.target.value),
3990
4402
  required: !0,
3991
4403
  type: "text",
3992
- value: h
4404
+ value: u
3993
4405
  }
3994
4406
  )
3995
4407
  ] }),
3996
- /* @__PURE__ */ C(Z, { value: "upload", children: [
3997
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4408
+ /* @__PURE__ */ y(K, { value: "upload", children: [
4409
+ /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3998
4410
  /* @__PURE__ */ n(
3999
4411
  G,
4000
4412
  {
4001
4413
  className: "richtext-mt-1 richtext-w-full",
4002
- onClick: A,
4414
+ onClick: L,
4003
4415
  size: "sm",
4004
4416
  children: e("editor.image.dialog.tab.upload")
4005
4417
  }
4006
4418
  ),
4007
4419
  /* @__PURE__ */ n(
4008
- Dt,
4420
+ Wt,
4009
4421
  {
4010
- alt: h,
4422
+ alt: u,
4011
4423
  disabled: !1,
4012
4424
  editor: r,
4013
- imageInline: u,
4425
+ imageInline: h,
4014
4426
  onClose: () => {
4015
4427
  b("");
4016
4428
  }
@@ -4022,23 +4434,23 @@ function ea() {
4022
4434
  {
4023
4435
  accept: m.acceptMimes.join(",") || "image/*",
4024
4436
  multiple: m.multiple,
4025
- onChange: z,
4026
- ref: f,
4437
+ onChange: A,
4438
+ ref: g,
4027
4439
  style: { display: "none" },
4028
4440
  type: "file"
4029
4441
  }
4030
4442
  )
4031
4443
  ] }),
4032
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4444
+ /* @__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: [
4033
4445
  /* @__PURE__ */ n(
4034
- re,
4446
+ oe,
4035
4447
  {
4036
4448
  autoFocus: !0,
4037
- onChange: (w) => p(w.target.value),
4449
+ onChange: (C) => p(C.target.value),
4038
4450
  placeholder: e("editor.image.dialog.placeholder"),
4039
4451
  required: !0,
4040
4452
  type: "url",
4041
- value: g
4453
+ value: f
4042
4454
  }
4043
4455
  ),
4044
4456
  /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
@@ -4047,9 +4459,9 @@ function ea() {
4047
4459
  }
4048
4460
  )
4049
4461
  ] })
4050
- ] }) : /* @__PURE__ */ n(te, {});
4462
+ ] }) : /* @__PURE__ */ n(Z, {});
4051
4463
  }
4052
- const So = {
4464
+ const ca = {
4053
4465
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
4054
4466
  maxSize: 1024 * 1024 * 5,
4055
4467
  // 5MB
@@ -4057,7 +4469,7 @@ const So = {
4057
4469
  resourceImage: "both",
4058
4470
  defaultInline: !1,
4059
4471
  enableAlt: !0
4060
- }, ze = /* @__PURE__ */ Fn.extend({
4472
+ }, Re = /* @__PURE__ */ So.extend({
4061
4473
  group: "inline",
4062
4474
  inline: !0,
4063
4475
  defining: !0,
@@ -4066,7 +4478,7 @@ const So = {
4066
4478
  addOptions() {
4067
4479
  var e;
4068
4480
  return {
4069
- ...So,
4481
+ ...ca,
4070
4482
  ...(e = this.parent) == null ? void 0 : e.call(this),
4071
4483
  upload: () => Promise.reject("Image Upload Function"),
4072
4484
  button: ({
@@ -4143,7 +4555,7 @@ const So = {
4143
4555
  };
4144
4556
  },
4145
4557
  addNodeView() {
4146
- return mi(yo);
4558
+ return vt(sa);
4147
4559
  },
4148
4560
  addCommands() {
4149
4561
  var r;
@@ -4174,12 +4586,12 @@ const So = {
4174
4586
  imageId: null
4175
4587
  }
4176
4588
  })) return !1;
4177
- const g = t.upload;
4178
- return g && g(i).then((p) => {
4179
- const { doc: h } = l.state;
4589
+ const f = t.upload;
4590
+ return f && f(i).then((p) => {
4591
+ const { doc: u } = l.state;
4180
4592
  let b = null;
4181
- h.descendants((f, k) => {
4182
- if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
4593
+ u.descendants((g, k) => {
4594
+ if (g.type.name === e && g.attrs.uploading === !0 && g.attrs.src === c)
4183
4595
  return b = k, !1;
4184
4596
  }), b !== null && l.view.dispatch(
4185
4597
  l.state.tr.setNodeMarkup(b, void 0, {
@@ -4191,17 +4603,17 @@ const So = {
4191
4603
  ), URL.revokeObjectURL(c);
4192
4604
  }).catch((p) => {
4193
4605
  console.error("Image upload failed", p);
4194
- const { doc: h } = l.state;
4606
+ const { doc: u } = l.state;
4195
4607
  let b = null;
4196
- if (h.descendants((f, k) => {
4197
- if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
4608
+ if (u.descendants((g, k) => {
4609
+ if (g.type.name === e && g.attrs.uploading === !0 && g.attrs.src === c)
4198
4610
  return b = k, !1;
4199
4611
  }), b !== null) {
4200
- const f = l.state.doc.nodeAt(b);
4201
- f && l.view.dispatch(
4612
+ const g = l.state.doc.nodeAt(b);
4613
+ g && l.view.dispatch(
4202
4614
  l.state.tr.delete(
4203
4615
  b,
4204
- b + f.nodeSize
4616
+ b + g.nodeSize
4205
4617
  )
4206
4618
  );
4207
4619
  }
@@ -4213,7 +4625,7 @@ const So = {
4213
4625
  };
4214
4626
  },
4215
4627
  renderHTML({ HTMLAttributes: e }) {
4216
- const { flipX: t, flipY: r, align: i, inline: o } = e, a = o && (i === "left" || i === "right"), l = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", s = a ? "" : `text-align: ${i};`, g = `${a ? `float: ${i};` : ""}${a ? i === "left" ? "margin: 1em 1em 1em 0;" : "margin: 1em 0 1em 1em;" : ""}${l}`;
4628
+ const { flipX: t, flipY: r, align: i, inline: o } = e, a = o && (i === "left" || i === "right"), l = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", s = a ? "" : `text-align: ${i};`, f = `${a ? `float: ${i};` : ""}${a ? i === "left" ? "margin: 1em 1em 1em 0;" : "margin: 1em 0 1em 1em;" : ""}${l}`;
4217
4629
  return [
4218
4630
  o ? "span" : "div",
4219
4631
  {
@@ -4222,10 +4634,10 @@ const So = {
4222
4634
  },
4223
4635
  [
4224
4636
  "img",
4225
- ut(
4637
+ Xe(
4226
4638
  {
4227
4639
  height: "auto",
4228
- style: g
4640
+ style: f
4229
4641
  },
4230
4642
  this.options.HTMLAttributes,
4231
4643
  e
@@ -4329,117 +4741,82 @@ const So = {
4329
4741
  // ];
4330
4742
  // },
4331
4743
  });
4332
- function ta(e) {
4333
- return e.replace(/^.*\/|\..+$/g, "");
4334
- }
4335
- function ra(e) {
4336
- return e.split(".").pop();
4337
- }
4338
- function ia(e) {
4339
- return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
4340
- }
4341
- function na(e) {
4342
- 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";
4343
- }
4344
- function Ao(e) {
4345
- return new Promise((t) => {
4346
- const r = new FileReader();
4347
- r.addEventListener(
4348
- "load",
4349
- () => {
4350
- t({
4351
- alt: e.name,
4352
- src: r.result
4353
- });
4354
- },
4355
- !1
4356
- ), r.readAsDataURL(e);
4357
- });
4358
- }
4359
- function Lo(e, t) {
4360
- const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
4361
- let a = o.length;
4362
- const l = new Uint8Array(a);
4363
- for (; a--; )
4364
- l[a] = o.charCodeAt(a);
4365
- return new File([l], t, { type: i });
4366
- }
4367
- function Dt({
4744
+ function Wt({
4368
4745
  editor: e,
4369
4746
  imageInline: t,
4370
4747
  onClose: r,
4371
4748
  disabled: i,
4372
4749
  alt: o
4373
4750
  }) {
4374
- var _, T;
4375
- const { t: a } = oe(), { toast: l } = Be(), [s, c] = E(!1), [d, g] = E(!1), p = Q.useRef(null), [h, b] = Q.useState(), [f, k] = Q.useState(""), u = xe(null), [y, m] = E({
4751
+ var j, N;
4752
+ const { t: a } = ie(), { toast: l } = qe(), [s, c] = I(!1), [d, f] = I(!1), p = re.useRef(null), [u, b] = re.useState(), [g, k] = re.useState(""), h = fe(null), [x, m] = I({
4376
4753
  src: "",
4377
4754
  file: null
4378
- }), z = ce(ze.name), v = $(() => (z == null ? void 0 : z.options) ?? {}, [z]);
4379
- function A(x) {
4380
- if (p.current && x.width && x.height) {
4381
- const I = w(p.current, x);
4382
- k(I);
4755
+ }), A = ce(Re.name), v = $(() => (A == null ? void 0 : A.options) ?? {}, [A]);
4756
+ function L(w) {
4757
+ if (p.current && w.width && w.height) {
4758
+ const T = C(p.current, w);
4759
+ k(T);
4383
4760
  }
4384
4761
  }
4385
- function w(x, I) {
4386
- const R = document.createElement("canvas"), H = x.naturalWidth / x.width, P = x.naturalHeight / x.height;
4387
- R.width = I.width * H, R.height = I.height * P;
4388
- const S = R.getContext("2d");
4389
- return S && (S.imageSmoothingEnabled = !1, S.drawImage(
4390
- x,
4391
- I.x * H,
4392
- I.y * P,
4393
- I.width * H,
4394
- I.height * P,
4762
+ function C(w, T) {
4763
+ const R = document.createElement("canvas"), _ = w.naturalWidth / w.width, O = w.naturalHeight / w.height;
4764
+ R.width = T.width * _, R.height = T.height * O;
4765
+ const z = R.getContext("2d");
4766
+ return z && (z.imageSmoothingEnabled = !1, z.drawImage(
4767
+ w,
4768
+ T.x * _,
4769
+ T.y * O,
4770
+ T.width * _,
4771
+ T.height * O,
4395
4772
  0,
4396
4773
  0,
4397
- I.width * H,
4398
- I.height * P
4774
+ T.width * _,
4775
+ T.height * O
4399
4776
  )), R.toDataURL("image/png", 1);
4400
4777
  }
4401
- const L = Q.useCallback(() => {
4402
- var I;
4778
+ const S = re.useCallback(() => {
4779
+ var T;
4403
4780
  if (d) return;
4404
- const x = Lo(
4405
- f,
4406
- ((I = y == null ? void 0 : y.file) == null ? void 0 : I.name) || "image.png"
4781
+ const w = ao(
4782
+ g,
4783
+ ((T = x == null ? void 0 : x.file) == null ? void 0 : T.name) || "image.png"
4407
4784
  );
4408
4785
  if (c(!1), m({
4409
4786
  src: "",
4410
4787
  file: null
4411
- }), j(), r(), v.upload)
4788
+ }), D(), r(), v.upload)
4412
4789
  e.chain().focus().insertImagePlaceholder({
4413
- file: x,
4790
+ file: w,
4414
4791
  inline: t,
4415
4792
  alt: o
4416
4793
  }).run();
4417
4794
  else {
4418
- const R = URL.createObjectURL(x);
4795
+ const R = URL.createObjectURL(w);
4419
4796
  e.chain().focus().setImageInline({ src: R, inline: t, alt: o }).run();
4420
4797
  }
4421
4798
  }, [
4422
- f,
4799
+ g,
4423
4800
  e,
4424
4801
  t,
4425
4802
  d,
4426
4803
  r,
4427
- (_ = y == null ? void 0 : y.file) == null ? void 0 : _.name,
4804
+ (j = x == null ? void 0 : x.file) == null ? void 0 : j.name,
4428
4805
  v,
4429
4806
  o
4430
4807
  ]);
4431
- function V(x) {
4432
- var I;
4433
- x.preventDefault(), (I = u.current) == null || I.click();
4808
+ function V(w) {
4809
+ var T;
4810
+ w.preventDefault(), (T = h.current) == null || T.click();
4434
4811
  }
4435
- const D = async (x) => {
4436
- var S;
4437
- const I = (S = x == null ? void 0 : x.target) == null ? void 0 : S.files;
4438
- if (!e || e.isDestroyed || I.length === 0) {
4439
- x.target.value = "";
4812
+ const H = async (w) => {
4813
+ var z;
4814
+ const T = (z = w == null ? void 0 : w.target) == null ? void 0 : z.files;
4815
+ if (!e || e.isDestroyed || T.length === 0) {
4816
+ w.target.value = "";
4440
4817
  return;
4441
4818
  }
4442
- const R = Ge(I, {
4819
+ const R = rt(T, {
4443
4820
  acceptMimes: v == null ? void 0 : v.acceptMimes,
4444
4821
  maxSize: v == null ? void 0 : v.maxSize,
4445
4822
  t: a,
@@ -4447,18 +4824,18 @@ function Dt({
4447
4824
  onError: v.onError
4448
4825
  });
4449
4826
  if (R.length <= 0) {
4450
- x.target.value = "";
4827
+ w.target.value = "";
4451
4828
  return;
4452
4829
  }
4453
- const H = R[0], P = await Ao(H);
4830
+ const _ = R[0], O = await oo(_);
4454
4831
  c(!0), m({
4455
- src: P.src,
4456
- file: H
4832
+ src: O.src,
4833
+ file: _
4457
4834
  });
4458
- }, j = () => {
4459
- u.current && (u.current.value = "");
4835
+ }, D = () => {
4836
+ h.current && (h.current.value = "");
4460
4837
  };
4461
- return /* @__PURE__ */ C(te, { children: [
4838
+ return /* @__PURE__ */ y(Z, { children: [
4462
4839
  /* @__PURE__ */ n(
4463
4840
  G,
4464
4841
  {
@@ -4469,29 +4846,29 @@ function Dt({
4469
4846
  children: a("editor.image.dialog.tab.uploadCrop")
4470
4847
  }
4471
4848
  ),
4472
- /* @__PURE__ */ C(
4473
- we,
4849
+ /* @__PURE__ */ y(
4850
+ ge,
4474
4851
  {
4475
4852
  open: s,
4476
- onOpenChange: (x) => {
4477
- c(x), x || (m({ src: "", file: null }), j());
4853
+ onOpenChange: (w) => {
4854
+ c(w), w || (m({ src: "", file: null }), D());
4478
4855
  },
4479
4856
  children: [
4480
- /* @__PURE__ */ n(We, {}),
4481
- /* @__PURE__ */ C(se, { children: [
4857
+ /* @__PURE__ */ n(et, {}),
4858
+ /* @__PURE__ */ y(se, { children: [
4482
4859
  /* @__PURE__ */ n(le, { children: a("editor.image.dialog.tab.uploadCrop") }),
4483
- /* @__PURE__ */ n("div", { children: y.src && /* @__PURE__ */ n(
4484
- yi,
4860
+ /* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
4861
+ Ii,
4485
4862
  {
4486
4863
  className: "richtext-w-full",
4487
- crop: h,
4488
- onChange: (x) => b(x),
4489
- onComplete: (x) => A(x),
4490
- children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: y.src })
4864
+ crop: u,
4865
+ onChange: (w) => b(w),
4866
+ onComplete: (w) => L(w),
4867
+ children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: x.src })
4491
4868
  }
4492
4869
  ) }),
4493
- /* @__PURE__ */ C(zt, { children: [
4494
- /* @__PURE__ */ C(
4870
+ /* @__PURE__ */ y(Vt, { children: [
4871
+ /* @__PURE__ */ y(
4495
4872
  G,
4496
4873
  {
4497
4874
  disabled: d,
@@ -4499,11 +4876,11 @@ function Dt({
4499
4876
  c(!1), m({
4500
4877
  src: "",
4501
4878
  file: null
4502
- }), j();
4879
+ }), D();
4503
4880
  },
4504
4881
  children: [
4505
4882
  a("editor.imageUpload.cancel"),
4506
- /* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Trash2" })
4883
+ /* @__PURE__ */ n(Pe, { className: "richtext-ml-1", name: "Trash2" })
4507
4884
  ]
4508
4885
  }
4509
4886
  ),
@@ -4511,20 +4888,20 @@ function Dt({
4511
4888
  G,
4512
4889
  {
4513
4890
  className: "richtext-w-fit",
4514
- disabled: d || !h,
4515
- onClick: L,
4516
- children: d ? /* @__PURE__ */ C(te, { children: [
4891
+ disabled: d || !u,
4892
+ onClick: S,
4893
+ children: d ? /* @__PURE__ */ y(Z, { children: [
4517
4894
  a("editor.imageUpload.uploading"),
4518
4895
  /* @__PURE__ */ n(
4519
- Re,
4896
+ Pe,
4520
4897
  {
4521
4898
  className: "richtext-ml-1 richtext-animate-spin",
4522
4899
  name: "Loader"
4523
4900
  }
4524
4901
  )
4525
- ] }) : /* @__PURE__ */ C(te, { children: [
4902
+ ] }) : /* @__PURE__ */ y(Z, { children: [
4526
4903
  a("editor.imageUpload.crop"),
4527
- /* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Crop" })
4904
+ /* @__PURE__ */ n(Pe, { className: "richtext-ml-1", name: "Crop" })
4528
4905
  ] })
4529
4906
  }
4530
4907
  )
@@ -4536,123 +4913,118 @@ function Dt({
4536
4913
  /* @__PURE__ */ n(
4537
4914
  "input",
4538
4915
  {
4539
- accept: ((T = v == null ? void 0 : v.acceptMimes) == null ? void 0 : T.join(",")) || "image/*",
4916
+ accept: ((N = v == null ? void 0 : v.acceptMimes) == null ? void 0 : N.join(",")) || "image/*",
4540
4917
  multiple: !1,
4541
- onChange: D,
4542
- ref: u,
4918
+ onChange: H,
4919
+ ref: h,
4543
4920
  style: { display: "none" },
4544
4921
  type: "file"
4545
4922
  }
4546
4923
  )
4547
4924
  ] });
4548
4925
  }
4549
- const jt = {
4550
- UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
4551
- UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
4552
- EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
4553
- };
4554
- function No() {
4555
- const { t: e } = oe(), { toast: t } = Be(), r = ee(), { editorDisabled: i } = Ae(), [o, a] = E(!1), l = jt.UPLOAD_IMAGE(r.id);
4556
- It(a, [l]);
4557
- const s = ce(ze.name), [c, d] = E(""), [g, p] = E(""), h = xe(null), b = (s == null ? void 0 : s.options.defaultInline) || !1, [f, k] = E(b), u = $(() => s == null ? void 0 : s.options, [s]);
4558
- function y(v) {
4559
- var D;
4560
- const A = (D = v == null ? void 0 : v.target) == null ? void 0 : D.files;
4561
- if (!r || r.isDestroyed || A.length === 0) {
4926
+ function da() {
4927
+ const { t: e } = ie(), { toast: t } = qe(), r = Q(), { editorDisabled: i } = pe(), [o, a] = I(!1), l = _e.UPLOAD_IMAGE(r.id);
4928
+ Qe(a, [l]);
4929
+ const s = ce(Re.name), [c, d] = I(""), [f, p] = I(""), u = fe(null), b = (s == null ? void 0 : s.options.defaultInline) || !1, [g, k] = I(b), h = $(() => s == null ? void 0 : s.options, [s]);
4930
+ function x(v) {
4931
+ var H;
4932
+ const L = (H = v == null ? void 0 : v.target) == null ? void 0 : H.files;
4933
+ if (!r || r.isDestroyed || L.length === 0) {
4562
4934
  v.target.value = "";
4563
4935
  return;
4564
4936
  }
4565
- const w = Ge(A, {
4566
- acceptMimes: u == null ? void 0 : u.acceptMimes,
4567
- maxSize: u == null ? void 0 : u.maxSize,
4937
+ const C = rt(L, {
4938
+ acceptMimes: h == null ? void 0 : h.acceptMimes,
4939
+ maxSize: h == null ? void 0 : h.maxSize,
4568
4940
  t: e,
4569
4941
  toast: t,
4570
- onError: u.onError
4942
+ onError: h.onError
4571
4943
  });
4572
- if (w.length <= 0) {
4944
+ if (C.length <= 0) {
4573
4945
  v.target.value = "";
4574
4946
  return;
4575
4947
  }
4576
4948
  a(!1);
4577
- const L = g, V = f;
4578
- if (p(""), k(b), u.upload) {
4579
- const j = u != null && u.multiple ? w : [w[0]];
4580
- for (const _ of j)
4949
+ const S = f, V = g;
4950
+ if (p(""), k(b), h.upload) {
4951
+ const D = h != null && h.multiple ? C : [C[0]];
4952
+ for (const j of D)
4581
4953
  r.chain().focus().insertImagePlaceholder({
4582
- file: _,
4954
+ file: j,
4583
4955
  inline: V,
4584
- alt: L
4956
+ alt: S
4585
4957
  }).run();
4586
4958
  } else {
4587
- const j = u != null && u.multiple ? w : [w[0]];
4588
- for (const _ of j) {
4589
- const T = URL.createObjectURL(_);
4590
- r.chain().focus().setImageInline({ src: T, inline: V, alt: L }).run();
4959
+ const D = h != null && h.multiple ? C : [C[0]];
4960
+ for (const j of D) {
4961
+ const N = URL.createObjectURL(j);
4962
+ r.chain().focus().setImageInline({ src: N, inline: V, alt: S }).run();
4591
4963
  }
4592
4964
  }
4593
4965
  v.target.value = "";
4594
4966
  }
4595
4967
  function m(v) {
4596
- v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: f, alt: g }).run(), a(!1), k(b), d(""), p("");
4968
+ v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: g, alt: f }).run(), a(!1), k(b), d(""), p("");
4597
4969
  }
4598
- function z(v) {
4599
- var A;
4600
- v.preventDefault(), (A = h.current) == null || A.click();
4970
+ function A(v) {
4971
+ var L;
4972
+ v.preventDefault(), (L = u.current) == null || L.click();
4601
4973
  }
4602
- return i ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ C(se, { children: [
4974
+ return i ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(se, { children: [
4603
4975
  /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
4604
- /* @__PURE__ */ C(
4605
- Se,
4976
+ /* @__PURE__ */ y(
4977
+ Ve,
4606
4978
  {
4607
4979
  activationMode: "manual",
4608
- defaultValue: u.resourceImage === "both" || u.resourceImage === "upload" ? "upload" : "link",
4980
+ defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
4609
4981
  children: [
4610
- u.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4611
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4612
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4982
+ h.resourceImage === "both" && /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4983
+ /* @__PURE__ */ n(J, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4984
+ /* @__PURE__ */ n(J, { value: "link", children: e("editor.image.dialog.tab.url") })
4613
4985
  ] }),
4614
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4986
+ /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4615
4987
  /* @__PURE__ */ n(
4616
- $e,
4988
+ Je,
4617
4989
  {
4618
- checked: f,
4990
+ checked: g,
4619
4991
  onCheckedChange: (v) => {
4620
4992
  k(v);
4621
4993
  }
4622
4994
  }
4623
4995
  ),
4624
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4996
+ /* @__PURE__ */ n(Ce, { children: e("editor.link.dialog.inline") })
4625
4997
  ] }),
4626
- u.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4627
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4998
+ h.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
4999
+ /* @__PURE__ */ n(Ce, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4628
5000
  /* @__PURE__ */ n(
4629
- re,
5001
+ oe,
4630
5002
  {
4631
5003
  onChange: (v) => p(v.target.value),
4632
5004
  required: !0,
4633
5005
  type: "text",
4634
- value: g
5006
+ value: f
4635
5007
  }
4636
5008
  )
4637
5009
  ] }),
4638
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4639
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
5010
+ /* @__PURE__ */ y(K, { value: "upload", children: [
5011
+ /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4640
5012
  /* @__PURE__ */ n(
4641
5013
  G,
4642
5014
  {
4643
5015
  className: "richtext-mt-1 richtext-w-full",
4644
- onClick: z,
5016
+ onClick: A,
4645
5017
  size: "sm",
4646
5018
  children: e("editor.image.dialog.tab.upload")
4647
5019
  }
4648
5020
  ),
4649
5021
  /* @__PURE__ */ n(
4650
- Dt,
5022
+ Wt,
4651
5023
  {
4652
- alt: g,
5024
+ alt: f,
4653
5025
  disabled: !1,
4654
5026
  editor: r,
4655
- imageInline: f,
5027
+ imageInline: g,
4656
5028
  onClose: () => {
4657
5029
  p("");
4658
5030
  }
@@ -4662,18 +5034,18 @@ function No() {
4662
5034
  /* @__PURE__ */ n(
4663
5035
  "input",
4664
5036
  {
4665
- accept: u.acceptMimes.join(",") || "image/*",
4666
- multiple: u.multiple,
4667
- onChange: y,
4668
- ref: h,
5037
+ accept: h.acceptMimes.join(",") || "image/*",
5038
+ multiple: h.multiple,
5039
+ onChange: x,
5040
+ ref: u,
4669
5041
  style: { display: "none" },
4670
5042
  type: "file"
4671
5043
  }
4672
5044
  )
4673
5045
  ] }),
4674
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5046
+ /* @__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: [
4675
5047
  /* @__PURE__ */ n(
4676
- re,
5048
+ oe,
4677
5049
  {
4678
5050
  autoFocus: !0,
4679
5051
  onChange: (v) => d(v.target.value),
@@ -4690,7 +5062,7 @@ function No() {
4690
5062
  )
4691
5063
  ] }) });
4692
5064
  }
4693
- function Pt(e, t) {
5065
+ function Gt(e, t) {
4694
5066
  let r;
4695
5067
  try {
4696
5068
  r = new URL(e);
@@ -4705,56 +5077,56 @@ function Pt(e, t) {
4705
5077
  return r.hostname.includes(i);
4706
5078
  });
4707
5079
  }
4708
- function oa() {
4709
- const { t: e } = oe(), t = ee(), r = Ht(Oe.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = E(""), c = xe(null), [d, g] = E(""), [p, h] = E(!1), b = ce(Oe.name), f = $(() => (b == null ? void 0 : b.options) ?? {}, [b]);
5080
+ function _a() {
5081
+ 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] = I(""), c = fe(null), [d, f] = I(""), [p, u] = I(!1), b = ce(We.name), g = $(() => (b == null ? void 0 : b.options) ?? {}, [b]);
4710
5082
  async function k(m) {
4711
- var w;
4712
- const z = (w = m == null ? void 0 : m.target) == null ? void 0 : w.files;
4713
- if (!t || t.isDestroyed || z.length === 0)
5083
+ var C;
5084
+ const A = (C = m == null ? void 0 : m.target) == null ? void 0 : C.files;
5085
+ if (!t || t.isDestroyed || A.length === 0)
4714
5086
  return;
4715
- const v = z[0];
4716
- let A = "";
4717
- f.upload ? A = await f.upload(v) : A = URL.createObjectURL(v), t.chain().focus().setVideo({
4718
- src: A,
5087
+ const v = A[0];
5088
+ let L = "";
5089
+ g.upload ? L = await g.upload(v) : L = URL.createObjectURL(v), t.chain().focus().setVideo({
5090
+ src: L,
4719
5091
  width: "100%"
4720
- }).run(), h(!1);
5092
+ }).run(), u(!1);
4721
5093
  }
4722
- function u(m) {
5094
+ function h(m) {
4723
5095
  m.preventDefault(), m.stopPropagation(), l && (t.chain().focus().setVideo({
4724
5096
  src: l,
4725
5097
  width: "100%"
4726
- }).run(), h(!1), s(""));
5098
+ }).run(), u(!1), s(""));
4727
5099
  }
4728
- function y(m) {
4729
- var z;
4730
- m.preventDefault(), (z = c.current) == null || z.click();
5100
+ function x(m) {
5101
+ var A;
5102
+ m.preventDefault(), (A = c.current) == null || A.click();
4731
5103
  }
4732
- return /* @__PURE__ */ C(we, { onOpenChange: h, open: p, children: [
4733
- /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
4734
- wt,
5104
+ return /* @__PURE__ */ y(ge, { onOpenChange: u, open: p, children: [
5105
+ /* @__PURE__ */ n(et, { asChild: !0, children: /* @__PURE__ */ n(
5106
+ he,
4735
5107
  {
4736
5108
  disabled: a,
4737
5109
  icon: i,
4738
5110
  tooltip: o,
4739
5111
  action: () => {
4740
- a || h(!0);
5112
+ a || u(!0);
4741
5113
  }
4742
5114
  }
4743
5115
  ) }),
4744
- /* @__PURE__ */ C(se, { children: [
5116
+ /* @__PURE__ */ y(se, { children: [
4745
5117
  /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
4746
- /* @__PURE__ */ C(
4747
- Se,
5118
+ /* @__PURE__ */ y(
5119
+ Ve,
4748
5120
  {
4749
5121
  activationMode: "manual",
4750
- defaultValue: (f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "upload" ? "upload" : "link",
5122
+ defaultValue: (g == null ? void 0 : g.resourceVideo) === "both" || (g == null ? void 0 : g.resourceVideo) === "upload" ? "upload" : "link",
4751
5123
  children: [
4752
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4753
- ((f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4754
- ((f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
5124
+ /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5125
+ ((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") }),
5126
+ ((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") })
4755
5127
  ] }),
4756
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4757
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: y, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
5128
+ /* @__PURE__ */ y(K, { value: "upload", children: [
5129
+ /* @__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") }) }),
4758
5130
  /* @__PURE__ */ n(
4759
5131
  "input",
4760
5132
  {
@@ -4769,10 +5141,10 @@ function oa() {
4769
5141
  }
4770
5142
  )
4771
5143
  ] }),
4772
- /* @__PURE__ */ C(Z, { value: "link", children: [
4773
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5144
+ /* @__PURE__ */ y(K, { value: "link", children: [
5145
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4774
5146
  /* @__PURE__ */ n(
4775
- re,
5147
+ oe,
4776
5148
  {
4777
5149
  autoFocus: !0,
4778
5150
  placeholder: e("editor.video.dialog.placeholder"),
@@ -4780,15 +5152,15 @@ function oa() {
4780
5152
  type: "url",
4781
5153
  value: l,
4782
5154
  onBlur: (m) => {
4783
- const z = m.target.value, v = f.videoProviders || ["."];
4784
- z && !Pt(z, v) ? g("Invalid video URL") : g("");
5155
+ const A = m.target.value, v = g.videoProviders || ["."];
5156
+ A && !Gt(A, v) ? f("Invalid video URL") : f("");
4785
5157
  },
4786
5158
  onChange: (m) => {
4787
5159
  s(m.target.value);
4788
5160
  }
4789
5161
  }
4790
5162
  ),
4791
- /* @__PURE__ */ n(G, { onClick: u, type: "button", children: e("editor.video.dialog.button.apply") })
5163
+ /* @__PURE__ */ n(G, { onClick: h, type: "button", children: e("editor.video.dialog.button.apply") })
4792
5164
  ] }) }),
4793
5165
  d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
4794
5166
  ] })
@@ -4798,7 +5170,7 @@ function oa() {
4798
5170
  ] })
4799
5171
  ] });
4800
5172
  }
4801
- function Eo(e) {
5173
+ function ua(e) {
4802
5174
  e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
4803
5175
  const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
4804
5176
  t && (e = `https://www.youtube.com/embed/${t[1]}`);
@@ -4809,7 +5181,7 @@ function Eo(e) {
4809
5181
  }
4810
5182
  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;
4811
5183
  }
4812
- const Oe = /* @__PURE__ */ dt.create({
5184
+ const We = /* @__PURE__ */ Ge.create({
4813
5185
  name: "video",
4814
5186
  group: "block",
4815
5187
  atom: !0,
@@ -4823,7 +5195,7 @@ const Oe = /* @__PURE__ */ dt.create({
4823
5195
  upload: void 0,
4824
5196
  frameborder: !1,
4825
5197
  resourceVideo: "both",
4826
- width: pi["size-medium"],
5198
+ width: Si["size-medium"],
4827
5199
  HTMLAttributes: {
4828
5200
  class: "iframe-wrapper"
4829
5201
  // style: 'display: flex;justify-content: center;',
@@ -4851,13 +5223,13 @@ const Oe = /* @__PURE__ */ dt.create({
4851
5223
  src: {
4852
5224
  default: null,
4853
5225
  renderHTML: ({ src: e }) => ({
4854
- src: e ? Eo(e) : null
5226
+ src: e ? ua(e) : null
4855
5227
  })
4856
5228
  },
4857
5229
  width: {
4858
5230
  default: this.options.width,
4859
5231
  renderHTML: ({ width: e }) => ({
4860
- width: To(e)
5232
+ width: No(e)
4861
5233
  })
4862
5234
  },
4863
5235
  frameborder: {
@@ -4889,12 +5261,12 @@ const Oe = /* @__PURE__ */ dt.create({
4889
5261
  ...e,
4890
5262
  width: "100%",
4891
5263
  height: "100%"
4892
- }, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`, g = ["div", { style: `display: flex; justify-content: ${r};` }, ["div", { style: o }, ["div", { style: a }], ["iframe", i]]];
5264
+ }, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`, f = ["div", { style: `display: flex; justify-content: ${r};` }, ["div", { style: o }, ["div", { style: a }], ["iframe", i]]];
4893
5265
  return ["div", {
4894
5266
  ...this.options.HTMLAttributes,
4895
5267
  class: "iframe-wrapper",
4896
5268
  "data-video": ""
4897
- }, g];
5269
+ }, f];
4898
5270
  },
4899
5271
  addCommands() {
4900
5272
  return {
@@ -4906,45 +5278,45 @@ const Oe = /* @__PURE__ */ dt.create({
4906
5278
  };
4907
5279
  }
4908
5280
  });
4909
- function Ro() {
4910
- const { t: e } = oe(), t = ee(), { editorDisabled: r } = Ae(), [i, o] = E(""), a = xe(null), [l, s] = E(""), [c, d] = E(!1), g = ce(Oe.name), p = jt.UPLOAD_VIDEO(t.id);
4911
- It(d, [p]);
4912
- const h = $(() => (g == null ? void 0 : g.options) ?? {}, [g]);
4913
- async function b(u) {
5281
+ function ha() {
5282
+ const { t: e } = ie(), t = Q(), { editorDisabled: r } = pe(), [i, o] = I(""), a = fe(null), [l, s] = I(""), [c, d] = I(!1), f = ce(We.name), p = _e.UPLOAD_VIDEO(t.id);
5283
+ Qe(d, [p]);
5284
+ const u = $(() => (f == null ? void 0 : f.options) ?? {}, [f]);
5285
+ async function b(h) {
4914
5286
  var v;
4915
- const y = (v = u == null ? void 0 : u.target) == null ? void 0 : v.files;
4916
- if (!t || t.isDestroyed || y.length === 0)
5287
+ const x = (v = h == null ? void 0 : h.target) == null ? void 0 : v.files;
5288
+ if (!t || t.isDestroyed || x.length === 0)
4917
5289
  return;
4918
- const m = y[0];
4919
- let z = "";
4920
- h.upload ? z = await h.upload(m) : z = URL.createObjectURL(m), t.chain().focus().setVideo({
4921
- src: z,
5290
+ const m = x[0];
5291
+ let A = "";
5292
+ u.upload ? A = await u.upload(m) : A = URL.createObjectURL(m), t.chain().focus().setVideo({
5293
+ src: A,
4922
5294
  width: "100%"
4923
5295
  }).run(), d(!1);
4924
5296
  }
4925
- function f(u) {
4926
- u.preventDefault(), u.stopPropagation(), i && (t.chain().focus().setVideo({
5297
+ function g(h) {
5298
+ h.preventDefault(), h.stopPropagation(), i && (t.chain().focus().setVideo({
4927
5299
  src: i,
4928
5300
  width: "100%"
4929
5301
  }).run(), d(!1), o(""));
4930
5302
  }
4931
- function k(u) {
4932
- var y;
4933
- u.preventDefault(), (y = a.current) == null || y.click();
5303
+ function k(h) {
5304
+ var x;
5305
+ h.preventDefault(), (x = a.current) == null || x.click();
4934
5306
  }
4935
- return r ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ C(se, { children: [
5307
+ return r ? /* @__PURE__ */ n(Z, {}) : /* @__PURE__ */ n(ge, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(se, { children: [
4936
5308
  /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
4937
- /* @__PURE__ */ C(
4938
- Se,
5309
+ /* @__PURE__ */ y(
5310
+ Ve,
4939
5311
  {
4940
5312
  activationMode: "manual",
4941
- defaultValue: (h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "upload" ? "upload" : "link",
5313
+ defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
4942
5314
  children: [
4943
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4944
- ((h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4945
- ((h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
5315
+ /* @__PURE__ */ y(Me, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
5316
+ ((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") }),
5317
+ ((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") })
4946
5318
  ] }),
4947
- /* @__PURE__ */ C(Z, { value: "upload", children: [
5319
+ /* @__PURE__ */ y(K, { value: "upload", children: [
4948
5320
  /* @__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") }) }),
4949
5321
  /* @__PURE__ */ n(
4950
5322
  "input",
@@ -4960,26 +5332,26 @@ function Ro() {
4960
5332
  }
4961
5333
  )
4962
5334
  ] }),
4963
- /* @__PURE__ */ C(Z, { value: "link", children: [
4964
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
5335
+ /* @__PURE__ */ y(K, { value: "link", children: [
5336
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4965
5337
  /* @__PURE__ */ n(
4966
- re,
5338
+ oe,
4967
5339
  {
4968
5340
  autoFocus: !0,
4969
5341
  placeholder: e("editor.video.dialog.placeholder"),
4970
5342
  required: !0,
4971
5343
  type: "url",
4972
5344
  value: i,
4973
- onBlur: (u) => {
4974
- const y = u.target.value, m = h.videoProviders || ["."];
4975
- y && !Pt(y, m) ? s("Invalid video URL") : s("");
5345
+ onBlur: (h) => {
5346
+ const x = h.target.value, m = u.videoProviders || ["."];
5347
+ x && !Gt(x, m) ? s("Invalid video URL") : s("");
4976
5348
  },
4977
- onChange: (u) => {
4978
- o(u.target.value);
5349
+ onChange: (h) => {
5350
+ o(h.target.value);
4979
5351
  }
4980
5352
  }
4981
5353
  ),
4982
- /* @__PURE__ */ n(G, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
5354
+ /* @__PURE__ */ n(G, { onClick: g, type: "button", children: e("editor.video.dialog.button.apply") })
4983
5355
  ] }) }),
4984
5356
  l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
4985
5357
  ] })
@@ -4988,67 +5360,66 @@ function Ro() {
4988
5360
  )
4989
5361
  ] }) });
4990
5362
  }
4991
- function Vo() {
4992
- return /* @__PURE__ */ C(te, { children: [
4993
- /* @__PURE__ */ n(No, {}),
4994
- /* @__PURE__ */ n(Ro, {})
5363
+ function fa() {
5364
+ return /* @__PURE__ */ y(Z, { children: [
5365
+ /* @__PURE__ */ n(da, {}),
5366
+ /* @__PURE__ */ n(ha, {}),
5367
+ /* @__PURE__ */ n(zo, {})
4995
5368
  ] });
4996
5369
  }
4997
- process.env.NODE_ENV !== "production" && (Vo.displayName = "SlashDialogTrigger");
5370
+ process.env.NODE_ENV !== "production" && (fa.displayName = "SlashDialogTrigger");
4998
5371
  export {
4999
- ea as $,
5000
- wt as A,
5372
+ he as A,
5001
5373
  G as B,
5002
- $e as C,
5003
- we as D,
5004
- jt as E,
5005
- st as F,
5006
- fo as G,
5007
- xo as H,
5008
- Re as I,
5009
- Fn as J,
5010
- na as K,
5011
- pe as L,
5012
- cn as M,
5013
- vn as N,
5014
- bn as O,
5015
- ra as P,
5016
- ta as Q,
5017
- ia as R,
5018
- Ue as S,
5019
- Ln as T,
5020
- qo as U,
5021
- Yo as V,
5022
- Go as W,
5023
- Vo as X,
5024
- Lo as Y,
5025
- _n as Z,
5026
- Oe as _,
5027
- Nn as a,
5028
- oa as a0,
5029
- kt as b,
5030
- O as c,
5031
- Ae as d,
5032
- Zo as e,
5033
- Qo as f,
5034
- tn as g,
5035
- ee as h,
5036
- yt as i,
5037
- re as j,
5038
- Ct as k,
5039
- en as l,
5040
- We as m,
5374
+ Je as C,
5375
+ ge as D,
5376
+ _e as E,
5377
+ de as F,
5378
+ gt as G,
5379
+ pt as H,
5380
+ Pe as I,
5381
+ Qo as J,
5382
+ ia as K,
5383
+ Ce as L,
5384
+ So as M,
5385
+ kn as N,
5386
+ Ze as O,
5387
+ za as P,
5388
+ Ta as Q,
5389
+ Aa as R,
5390
+ fa as S,
5391
+ Un as T,
5392
+ ao as U,
5393
+ Qn as V,
5394
+ We as W,
5395
+ jt as X,
5396
+ Ra as Y,
5397
+ Va as Z,
5398
+ _a as _,
5399
+ $n as a,
5400
+ St as b,
5401
+ P as c,
5402
+ pe as d,
5403
+ Ia as e,
5404
+ Ea as f,
5405
+ pn as g,
5406
+ Q as h,
5407
+ It as i,
5408
+ oe as j,
5409
+ Lt as k,
5410
+ gn as l,
5411
+ et as m,
5041
5412
  se as n,
5042
5413
  le as o,
5043
- zt as p,
5414
+ Vt as p,
5044
5415
  ce as q,
5045
- Be as r,
5046
- Jo as s,
5047
- ze as t,
5048
- Ht as u,
5049
- Xo as v,
5050
- Rt as w,
5051
- Ko as x,
5052
- It as y,
5053
- at as z
5416
+ qe as r,
5417
+ Sa as s,
5418
+ Re as t,
5419
+ tt as u,
5420
+ Jn as v,
5421
+ Ot as w,
5422
+ La as x,
5423
+ Qe as y,
5424
+ Na as z
5054
5425
  };