@remarkablejames/editor 0.0.1 → 0.0.3

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 (131) hide show
  1. package/lib/{ActionMenuButton-B0EHT9CC.js → ActionMenuButton-D5HLfRzv.js} +1 -1
  2. package/lib/{ActionMenuButton-J1el_e6Z.cjs → ActionMenuButton-DN6VHLkp.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +5 -5
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +1 -1
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +1 -1
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +1 -1
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +2 -2
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +1 -1
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +1 -1
  17. package/lib/CodeBlock.cjs +1 -44
  18. package/lib/CodeBlock.js +181 -3857
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +1 -1
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +2 -2
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +1 -1
  25. package/lib/{Drawer-BCWVN-4l.js → Drawer-B9l1SoRJ.js} +21 -21
  26. package/lib/{Drawer-BTouEroZ.cjs → Drawer-BN0lYcnJ.cjs} +1 -1
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +2 -2
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +2 -2
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +12 -12
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +1 -1
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +1 -1
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +3 -3
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +3 -3
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +3 -3
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +2 -2
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +1 -1
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +1 -1
  49. package/lib/{Iframe-BfBLILDA.cjs → Iframe-CXFk3GEq.cjs} +1 -1
  50. package/lib/{Iframe-BdgiWGml.js → Iframe-MjeJ2OOI.js} +9 -9
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +1 -1
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +1 -1
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +22 -22
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +1 -1
  59. package/lib/{Indent-Dvqz_WEn.cjs → Indent-BPX9XRos.cjs} +1 -1
  60. package/lib/{Indent-BpMcZKok.js → Indent-CgwDItIf.js} +1 -1
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +1 -1
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +1 -1
  65. package/lib/{Katex-B8_uprkO.js → Katex-CZ4g3vA9.js} +2 -2
  66. package/lib/{Katex-BQyeCeQ0.cjs → Katex-DIgsR_dS.cjs} +1 -1
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +1 -1
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +2 -2
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +1 -1
  73. package/lib/{LinkEditBlock-CIshn_8F.cjs → LinkEditBlock-B2bU0Mcr.cjs} +1 -1
  74. package/lib/{LinkEditBlock-BX0fXXpF.js → LinkEditBlock-CaDV3Vq5.js} +2 -2
  75. package/lib/{Mermaid-0GiGVxn0.cjs → Mermaid-B9h7XKFo.cjs} +1 -1
  76. package/lib/{Mermaid-D8bbIgAl.js → Mermaid-EhYj_ICn.js} +2 -2
  77. package/lib/Mermaid.cjs +1 -1
  78. package/lib/Mermaid.js +1 -1
  79. package/lib/MoreMark.cjs +1 -1
  80. package/lib/MoreMark.js +2 -2
  81. package/lib/OrderedList.cjs +1 -1
  82. package/lib/OrderedList.js +1 -1
  83. package/lib/SearchAndReplace.cjs +1 -1
  84. package/lib/SearchAndReplace.js +2 -2
  85. package/lib/SlashCommand.cjs +1 -1
  86. package/lib/SlashCommand.js +2 -2
  87. package/lib/{SlashCommandNodeView-rDJ7OjRd.cjs → SlashCommandNodeView-COlWSlnE.cjs} +1 -1
  88. package/lib/{SlashCommandNodeView-BcmtKbEE.js → SlashCommandNodeView-CY3peX5x.js} +1 -1
  89. package/lib/Strike.cjs +1 -1
  90. package/lib/Strike.js +1 -1
  91. package/lib/{Table-DbxuP5xh.js → Table-Bw7rLue7.js} +2 -2
  92. package/lib/{Table-BEhNBeuA.cjs → Table-DLrtX6T7.cjs} +1 -1
  93. package/lib/Table.cjs +1 -1
  94. package/lib/Table.js +1 -1
  95. package/lib/TaskList.cjs +1 -1
  96. package/lib/TaskList.js +1 -1
  97. package/lib/TextAlign.cjs +1 -1
  98. package/lib/TextAlign.js +2 -2
  99. package/lib/TextDirection.cjs +1 -1
  100. package/lib/TextDirection.js +2 -2
  101. package/lib/TextUnderline.cjs +1 -1
  102. package/lib/TextUnderline.js +1 -1
  103. package/lib/{Twitter-BuEBgpi9.cjs → Twitter-Ck6vGefg.cjs} +1 -1
  104. package/lib/{Twitter-9I6BLNmg.js → Twitter-pM0y5Z-L.js} +2 -2
  105. package/lib/Twitter.cjs +1 -1
  106. package/lib/Twitter.js +1 -1
  107. package/lib/Video.cjs +1 -1
  108. package/lib/Video.js +1 -1
  109. package/lib/bubble.cjs +1 -1
  110. package/lib/bubble.js +103 -103
  111. package/lib/{dropdown-menu-DjWlG2-J.cjs → dropdown-menu-DwR8tTs9.cjs} +1 -1
  112. package/lib/{dropdown-menu-Bs69ZBbO.js → dropdown-menu-nX-u8e2w.js} +1 -1
  113. package/lib/extensions/CodeBlock/CodeBlock.d.ts +1 -1
  114. package/lib/extensions/Image/Image.d.ts +11 -0
  115. package/lib/extensions/Image/components/ImageCropper.d.ts +1 -1
  116. package/lib/index-Dib4cXXf.cjs +10 -0
  117. package/lib/{index-lj3VWExo.js → index-_WrFM-Fk.js} +1289 -1118
  118. package/lib/index.cjs +1 -1
  119. package/lib/index.js +1 -1
  120. package/lib/{popover-D-hUKDYu.cjs → popover-BY7j9SiD.cjs} +1 -1
  121. package/lib/{popover-CPr9bHYn.js → popover-CSvY4C-l.js} +1 -1
  122. package/lib/{select-CuE_HaQJ.js → select-BelNLNvT.js} +1 -1
  123. package/lib/{select-C2KF4RNg.cjs → select-Bu-5iIA9.cjs} +1 -1
  124. package/lib/{separator-CHzYNMVt.js → separator-Br5kcIJa.js} +2 -2
  125. package/lib/{separator-_gvUNba_.cjs → separator-Cp9Lg3HU.cjs} +1 -1
  126. package/lib/style.css +1 -1
  127. package/lib/{textarea-gEoNp9CA.js → textarea-Ceev4t42.js} +1 -1
  128. package/lib/{textarea-DZj6EY-N.cjs → textarea-DfqvYaA6.cjs} +1 -1
  129. package/lib/theme/theme.d.ts +1 -1
  130. package/package.json +1 -1
  131. package/lib/index-D9oM__YW.cjs +0 -1
@@ -1,40 +1,40 @@
1
- import { jsxs as y, jsx as n, Fragment as Y } from "react/jsx-runtime";
2
- import * as U from "react";
3
- import Q, { useState as E, useMemo as B, useCallback as ce, useEffect as Ie, useRef as xe } from "react";
4
- import { y as jt, b as Pt, S as _t } from "./index-BG0kQamI.js";
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";
5
5
  import "./theme.js";
6
- import * as F from "@radix-ui/react-dialog";
7
- import { NotebookPen as Ut, ExternalLink as Bt, X as st, Loader2 as $t, WrapText as Ft, PencilRuler as Wt, FlipHorizontal as Gt, FlipVertical as Xt, CropIcon as Yt, ChevronUp as qt, Paperclip as Zt, Eye as Kt, Settings as Jt, ZoomOut as Qt, ZoomIn as er, BookMarked as tr, Sigma as rr, SmilePlusIcon as ir, Replace as Ye, SmilePlus as nr, Frame as or, Columns2 as qe, PanelRight as ar, PanelLeft as sr, Clipboard as lr, Copy as cr, GripVertical as dr, Plus as ur, Columns4 as hr, Columns3 as fr, Heading6 as mr, Heading5 as gr, Heading4 as pr, Heading3 as xr, Heading2 as br, Heading1 as vr, Pilcrow as wr, ChevronsUpDown as yr, Trash as Cr, Trash2 as kr, TableCellsSplit as Mr, TableCellsMerge as Ir, BetweenVerticalEnd as zr, BetweenVerticalStart as Tr, BetweenHorizonalStart as Sr, BetweenHorizonalEnd as Nr, Unlink as Lr, Pencil as Ar, Sparkles as Er, Table as Rr, Minimize as Vr, Maximize as Hr, Video as Dr, ImageUp as Or, Link as jr, ListTodo as Pr, ListOrdered as _r, List as Ur, IndentDecrease as Br, IndentIncrease as $r, Type as Fr, CodeXml as Wr, Code as Gr, Superscript as Xr, Subscript as Yr, ChevronDown as qr, Undo2 as Zr, Redo2 as Kr, PaintRoller as Jr, Eraser as Qr, Minus as ei, Strikethrough as ti, Quote as ri, Underline as ii, Italic as ni, LoaderCircle as oi, Bold as ai, Check as si } from "lucide-react";
8
- import { j as lt, N as ct, n as li, aa as ci, m as dt, h as di, a3 as ui, ab as hi, k as fi } from "./clsx-CDyrfCnw.js";
9
- import { I as Ze, i as Ke, j as mi, u as ne, V as gi } from "./index-4Q5IhypJ.js";
10
- import { Slot as ut } from "@radix-ui/react-slot";
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
11
  import * as be from "@radix-ui/react-tooltip";
12
- import * as ht from "@radix-ui/react-toggle";
13
- import { TextAlignRightIcon as pi, TextAlignLeftIcon as xi, TextAlignJustifyIcon as bi, TextAlignCenterIcon as vi } from "@radix-ui/react-icons";
14
- import * as re from "@radix-ui/react-tabs";
15
- import wi from "react-image-crop";
16
- import * as Oe from "@radix-ui/react-checkbox";
17
- import * as ft from "@radix-ui/react-label";
18
- const _e = "-", yi = (e) => {
19
- const t = ki(e), {
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), {
20
20
  conflictingClassGroups: r,
21
21
  conflictingClassGroupModifiers: i
22
22
  } = e;
23
23
  return {
24
24
  getClassGroupId: (l) => {
25
25
  const s = l.split(_e);
26
- return s[0] === "" && s.length !== 1 && s.shift(), mt(s, t) || Ci(l);
26
+ return s[0] === "" && s.length !== 1 && s.shift(), gt(s, t) || ki(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
- }, mt = (e, t) => {
33
+ }, gt = (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 ? mt(e.slice(1), i) : void 0;
37
+ const r = e[0], i = t.nextPart.get(r), o = i ? gt(e.slice(1), i) : void 0;
38
38
  if (o)
39
39
  return o;
40
40
  if (t.validators.length === 0)
@@ -43,13 +43,13 @@ const _e = "-", yi = (e) => {
43
43
  return (l = t.validators.find(({
44
44
  validator: s
45
45
  }) => s(a))) == null ? void 0 : l.classGroupId;
46
- }, Je = /^\[(.+)\]$/, Ci = (e) => {
47
- if (Je.test(e)) {
48
- const t = Je.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
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(":"));
49
49
  if (r)
50
50
  return "arbitrary.." + r;
51
51
  }
52
- }, ki = (e) => {
52
+ }, Mi = (e) => {
53
53
  const {
54
54
  theme: t,
55
55
  prefix: r
@@ -57,19 +57,19 @@ const _e = "-", yi = (e) => {
57
57
  nextPart: /* @__PURE__ */ new Map(),
58
58
  validators: []
59
59
  };
60
- return Ii(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
- je(l, i, a, t);
60
+ return Ti(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
+ Pe(l, i, a, t);
62
62
  }), i;
63
- }, je = (e, t, r, i) => {
63
+ }, Pe = (e, t, r, i) => {
64
64
  e.forEach((o) => {
65
65
  if (typeof o == "string") {
66
- const a = o === "" ? t : Qe(t, o);
66
+ const a = o === "" ? t : et(t, o);
67
67
  a.classGroupId = r;
68
68
  return;
69
69
  }
70
70
  if (typeof o == "function") {
71
- if (Mi(o)) {
72
- je(o(i), t, r, i);
71
+ if (Ii(o)) {
72
+ Pe(o(i), t, r, i);
73
73
  return;
74
74
  }
75
75
  t.validators.push({
@@ -79,10 +79,10 @@ const _e = "-", yi = (e) => {
79
79
  return;
80
80
  }
81
81
  Object.entries(o).forEach(([a, l]) => {
82
- je(l, Qe(t, a), r, i);
82
+ Pe(l, et(t, a), r, i);
83
83
  });
84
84
  });
85
- }, Qe = (e, t) => {
85
+ }, et = (e, t) => {
86
86
  let r = e;
87
87
  return t.split(_e).forEach((i) => {
88
88
  r.nextPart.has(i) || r.nextPart.set(i, {
@@ -90,7 +90,7 @@ const _e = "-", yi = (e) => {
90
90
  validators: []
91
91
  }), r = r.nextPart.get(i);
92
92
  }), r;
93
- }, Mi = (e) => e.isThemeGetter, Ii = (e, t) => t ? e.map(([r, i]) => {
93
+ }, Ii = (e) => e.isThemeGetter, Ti = (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
96
  }) : e, zi = (e) => {
@@ -117,40 +117,40 @@ const _e = "-", yi = (e) => {
117
117
  r.has(a) ? r.set(a, l) : o(a, l);
118
118
  }
119
119
  };
120
- }, gt = "!", Ti = (e) => {
120
+ }, pt = "!", Si = (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
126
  let d = 0, g = 0, p;
127
- for (let f = 0; f < s.length; f++) {
128
- let x = s[f];
127
+ for (let u = 0; u < s.length; u++) {
128
+ let y = s[u];
129
129
  if (d === 0) {
130
- if (x === o && (i || s.slice(f, f + a) === t)) {
131
- c.push(s.slice(g, f)), g = f + a;
130
+ if (y === o && (i || s.slice(u, u + a) === t)) {
131
+ c.push(s.slice(g, u)), g = u + a;
132
132
  continue;
133
133
  }
134
- if (x === "/") {
135
- p = f;
134
+ if (y === "/") {
135
+ p = u;
136
136
  continue;
137
137
  }
138
138
  }
139
- x === "[" ? d++ : x === "]" && d--;
139
+ y === "[" ? d++ : y === "]" && d--;
140
140
  }
141
- const u = c.length === 0 ? s : s.substring(g), k = u.startsWith(gt), b = k ? u.substring(1) : u, z = p && p > g ? p - g : void 0;
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;
142
142
  return {
143
143
  modifiers: c,
144
- hasImportantModifier: k,
145
- baseClassName: b,
146
- maybePostfixModifierPosition: z
144
+ hasImportantModifier: b,
145
+ baseClassName: f,
146
+ maybePostfixModifierPosition: k
147
147
  };
148
148
  };
149
149
  return r ? (s) => r({
150
150
  className: s,
151
151
  parseClassName: l
152
152
  }) : l;
153
- }, Si = (e) => {
153
+ }, Ai = (e) => {
154
154
  if (e.length <= 1)
155
155
  return e;
156
156
  const t = [];
@@ -158,122 +158,122 @@ const _e = "-", yi = (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
- }, Ni = (e) => ({
161
+ }, Li = (e) => ({
162
162
  cache: zi(e.cacheSize),
163
- parseClassName: Ti(e),
164
- ...yi(e)
165
- }), Li = /\s+/, Ai = (e, t) => {
163
+ parseClassName: Si(e),
164
+ ...Ci(e)
165
+ }), Ni = /\s+/, Ei = (e, t) => {
166
166
  const {
167
167
  parseClassName: r,
168
168
  getClassGroupId: i,
169
169
  getConflictingClassGroupIds: o
170
- } = t, a = [], l = e.trim().split(Li);
170
+ } = t, a = [], l = e.trim().split(Ni);
171
171
  let s = "";
172
172
  for (let c = l.length - 1; c >= 0; c -= 1) {
173
173
  const d = l[c], {
174
174
  modifiers: g,
175
175
  hasImportantModifier: p,
176
- baseClassName: u,
177
- maybePostfixModifierPosition: k
176
+ baseClassName: h,
177
+ maybePostfixModifierPosition: b
178
178
  } = r(d);
179
- let b = !!k, z = i(b ? u.substring(0, k) : u);
180
- if (!z) {
181
- if (!b) {
179
+ let f = !!b, k = i(f ? h.substring(0, b) : h);
180
+ if (!k) {
181
+ if (!f) {
182
182
  s = d + (s.length > 0 ? " " + s : s);
183
183
  continue;
184
184
  }
185
- if (z = i(u), !z) {
185
+ if (k = i(h), !k) {
186
186
  s = d + (s.length > 0 ? " " + s : s);
187
187
  continue;
188
188
  }
189
- b = !1;
189
+ f = !1;
190
190
  }
191
- const f = Si(g).join(":"), x = p ? f + gt : f, h = x + z;
192
- if (a.includes(h))
191
+ const u = Ai(g).join(":"), y = p ? u + pt : u, m = y + k;
192
+ if (a.includes(m))
193
193
  continue;
194
- a.push(h);
195
- const S = o(z, b);
196
- for (let m = 0; m < S.length; ++m) {
197
- const H = S[m];
198
- a.push(x + H);
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);
199
199
  }
200
200
  s = d + (s.length > 0 ? " " + s : s);
201
201
  }
202
202
  return s;
203
203
  };
204
- function Ei() {
204
+ function Ri() {
205
205
  let e = 0, t, r, i = "";
206
206
  for (; e < arguments.length; )
207
- (t = arguments[e++]) && (r = pt(t)) && (i && (i += " "), i += r);
207
+ (t = arguments[e++]) && (r = xt(t)) && (i && (i += " "), i += r);
208
208
  return i;
209
209
  }
210
- const pt = (e) => {
210
+ const xt = (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 = pt(e[i])) && (r && (r += " "), r += t);
215
+ e[i] && (t = xt(e[i])) && (r && (r += " "), r += t);
216
216
  return r;
217
217
  };
218
- function Ri(e, ...t) {
218
+ function Vi(e, ...t) {
219
219
  let r, i, o, a = l;
220
220
  function l(c) {
221
221
  const d = t.reduce((g, p) => p(g), e());
222
- return r = Ni(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
222
+ return r = Li(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 = Ai(c, r);
228
+ const g = Ei(c, r);
229
229
  return o(c, g), g;
230
230
  }
231
231
  return function() {
232
- return a(Ei.apply(null, arguments));
232
+ return a(Ri.apply(null, arguments));
233
233
  };
234
234
  }
235
- const V = (e) => {
235
+ const N = (e) => {
236
236
  const t = (r) => r[e] || [];
237
237
  return t.isThemeGetter = !0, t;
238
- }, xt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Vi = /^\d+\/\d+$/, Hi = /* @__PURE__ */ new Set(["px", "full", "screen"]), Di = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Oi = /\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$/, ji = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Pi = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _i = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => ie(e) || Hi.has(e) || Vi.test(e), K = (e) => oe(e, "length", Yi), ie = (e) => !!e && !Number.isNaN(Number(e)), Ae = (e) => oe(e, "number", ie), de = (e) => !!e && Number.isInteger(Number(e)), Ui = (e) => e.endsWith("%") && ie(e.slice(0, -1)), T = (e) => xt.test(e), J = (e) => Di.test(e), Bi = /* @__PURE__ */ new Set(["length", "size", "percentage"]), $i = (e) => oe(e, Bi, bt), Fi = (e) => oe(e, "position", bt), Wi = /* @__PURE__ */ new Set(["image", "url"]), Gi = (e) => oe(e, Wi, Zi), Xi = (e) => oe(e, "", qi), ue = () => !0, oe = (e, t, r) => {
239
- const i = xt.exec(e);
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);
240
240
  return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
241
- }, Yi = (e) => (
241
+ }, qi = (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
- Oi.test(e) && !ji.test(e)
246
- ), bt = () => !1, qi = (e) => Pi.test(e), Zi = (e) => _i.test(e), Ki = () => {
247
- const e = V("colors"), t = V("spacing"), r = V("blur"), i = V("brightness"), o = V("borderColor"), a = V("borderRadius"), l = V("borderSpacing"), s = V("borderWidth"), c = V("contrast"), d = V("grayscale"), g = V("hueRotate"), p = V("invert"), u = V("gap"), k = V("gradientColorStops"), b = V("gradientColorStopPositions"), z = V("inset"), f = V("margin"), x = V("opacity"), h = V("padding"), S = V("saturate"), m = V("scale"), H = V("sepia"), v = V("skew"), R = V("space"), N = V("translate"), j = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], I = () => ["auto", T, t], w = () => [T, t], C = () => ["", X, K], M = () => ["auto", ie, T], A = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], L = () => ["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"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], G = () => ["", "0", T], ye = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ie, T];
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];
248
248
  return {
249
249
  cacheSize: 500,
250
250
  separator: ":",
251
251
  theme: {
252
- colors: [ue],
253
- spacing: [X, K],
254
- blur: ["none", "", J, T],
252
+ colors: [he],
253
+ spacing: [Y, K],
254
+ blur: ["none", "", J, M],
255
255
  brightness: W(),
256
256
  borderColor: [e],
257
- borderRadius: ["none", "", "full", J, T],
258
- borderSpacing: w(),
259
- borderWidth: C(),
257
+ borderRadius: ["none", "", "full", J, M],
258
+ borderSpacing: T(),
259
+ borderWidth: x(),
260
260
  contrast: W(),
261
- grayscale: G(),
261
+ grayscale: U(),
262
262
  hueRotate: W(),
263
- invert: G(),
264
- gap: w(),
263
+ invert: U(),
264
+ gap: T(),
265
265
  gradientColorStops: [e],
266
- gradientColorStopPositions: [Ui, K],
267
- inset: I(),
268
- margin: I(),
266
+ gradientColorStopPositions: [Bi, K],
267
+ inset: _(),
268
+ margin: _(),
269
269
  opacity: W(),
270
- padding: w(),
270
+ padding: T(),
271
271
  saturate: W(),
272
272
  scale: W(),
273
- sepia: G(),
273
+ sepia: U(),
274
274
  skew: W(),
275
- space: w(),
276
- translate: w()
275
+ space: T(),
276
+ translate: T()
277
277
  },
278
278
  classGroups: {
279
279
  // Layout
@@ -282,7 +282,7 @@ const V = (e) => {
282
282
  * @see https://tailwindcss.com/docs/aspect-ratio
283
283
  */
284
284
  aspect: [{
285
- aspect: ["auto", "square", "video", T]
285
+ aspect: ["auto", "square", "video", M]
286
286
  }],
287
287
  /**
288
288
  * Container
@@ -301,14 +301,14 @@ const V = (e) => {
301
301
  * @see https://tailwindcss.com/docs/break-after
302
302
  */
303
303
  "break-after": [{
304
- "break-after": ye()
304
+ "break-after": F()
305
305
  }],
306
306
  /**
307
307
  * Break Before
308
308
  * @see https://tailwindcss.com/docs/break-before
309
309
  */
310
310
  "break-before": [{
311
- "break-before": ye()
311
+ "break-before": F()
312
312
  }],
313
313
  /**
314
314
  * Break Inside
@@ -367,49 +367,49 @@ const V = (e) => {
367
367
  * @see https://tailwindcss.com/docs/object-position
368
368
  */
369
369
  "object-position": [{
370
- object: [...A(), T]
370
+ object: [...R(), M]
371
371
  }],
372
372
  /**
373
373
  * Overflow
374
374
  * @see https://tailwindcss.com/docs/overflow
375
375
  */
376
376
  overflow: [{
377
- overflow: D()
377
+ overflow: j()
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": D()
384
+ "overflow-x": j()
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": D()
391
+ "overflow-y": j()
392
392
  }],
393
393
  /**
394
394
  * Overscroll Behavior
395
395
  * @see https://tailwindcss.com/docs/overscroll-behavior
396
396
  */
397
397
  overscroll: [{
398
- overscroll: j()
398
+ overscroll: D()
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": j()
405
+ "overscroll-x": D()
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": j()
412
+ "overscroll-y": D()
413
413
  }],
414
414
  /**
415
415
  * Position
@@ -421,63 +421,63 @@ const V = (e) => {
421
421
  * @see https://tailwindcss.com/docs/top-right-bottom-left
422
422
  */
423
423
  inset: [{
424
- inset: [z]
424
+ inset: [k]
425
425
  }],
426
426
  /**
427
427
  * Right / Left
428
428
  * @see https://tailwindcss.com/docs/top-right-bottom-left
429
429
  */
430
430
  "inset-x": [{
431
- "inset-x": [z]
431
+ "inset-x": [k]
432
432
  }],
433
433
  /**
434
434
  * Top / Bottom
435
435
  * @see https://tailwindcss.com/docs/top-right-bottom-left
436
436
  */
437
437
  "inset-y": [{
438
- "inset-y": [z]
438
+ "inset-y": [k]
439
439
  }],
440
440
  /**
441
441
  * Start
442
442
  * @see https://tailwindcss.com/docs/top-right-bottom-left
443
443
  */
444
444
  start: [{
445
- start: [z]
445
+ start: [k]
446
446
  }],
447
447
  /**
448
448
  * End
449
449
  * @see https://tailwindcss.com/docs/top-right-bottom-left
450
450
  */
451
451
  end: [{
452
- end: [z]
452
+ end: [k]
453
453
  }],
454
454
  /**
455
455
  * Top
456
456
  * @see https://tailwindcss.com/docs/top-right-bottom-left
457
457
  */
458
458
  top: [{
459
- top: [z]
459
+ top: [k]
460
460
  }],
461
461
  /**
462
462
  * Right
463
463
  * @see https://tailwindcss.com/docs/top-right-bottom-left
464
464
  */
465
465
  right: [{
466
- right: [z]
466
+ right: [k]
467
467
  }],
468
468
  /**
469
469
  * Bottom
470
470
  * @see https://tailwindcss.com/docs/top-right-bottom-left
471
471
  */
472
472
  bottom: [{
473
- bottom: [z]
473
+ bottom: [k]
474
474
  }],
475
475
  /**
476
476
  * Left
477
477
  * @see https://tailwindcss.com/docs/top-right-bottom-left
478
478
  */
479
479
  left: [{
480
- left: [z]
480
+ left: [k]
481
481
  }],
482
482
  /**
483
483
  * Visibility
@@ -489,7 +489,7 @@ const V = (e) => {
489
489
  * @see https://tailwindcss.com/docs/z-index
490
490
  */
491
491
  z: [{
492
- z: ["auto", de, T]
492
+ z: ["auto", ue, M]
493
493
  }],
494
494
  // Flexbox and Grid
495
495
  /**
@@ -497,7 +497,7 @@ const V = (e) => {
497
497
  * @see https://tailwindcss.com/docs/flex-basis
498
498
  */
499
499
  basis: [{
500
- basis: I()
500
+ basis: _()
501
501
  }],
502
502
  /**
503
503
  * Flex Direction
@@ -518,35 +518,35 @@ const V = (e) => {
518
518
  * @see https://tailwindcss.com/docs/flex
519
519
  */
520
520
  flex: [{
521
- flex: ["1", "auto", "initial", "none", T]
521
+ flex: ["1", "auto", "initial", "none", M]
522
522
  }],
523
523
  /**
524
524
  * Flex Grow
525
525
  * @see https://tailwindcss.com/docs/flex-grow
526
526
  */
527
527
  grow: [{
528
- grow: G()
528
+ grow: U()
529
529
  }],
530
530
  /**
531
531
  * Flex Shrink
532
532
  * @see https://tailwindcss.com/docs/flex-shrink
533
533
  */
534
534
  shrink: [{
535
- shrink: G()
535
+ shrink: U()
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", de, T]
542
+ order: ["first", "last", "none", ue, 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": [ue]
549
+ "grid-cols": [he]
550
550
  }],
551
551
  /**
552
552
  * Grid Column Start / End
@@ -554,29 +554,29 @@ const V = (e) => {
554
554
  */
555
555
  "col-start-end": [{
556
556
  col: ["auto", {
557
- span: ["full", de, T]
558
- }, T]
557
+ span: ["full", ue, M]
558
+ }, M]
559
559
  }],
560
560
  /**
561
561
  * Grid Column Start
562
562
  * @see https://tailwindcss.com/docs/grid-column
563
563
  */
564
564
  "col-start": [{
565
- "col-start": M()
565
+ "col-start": I()
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": M()
572
+ "col-end": I()
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": [ue]
579
+ "grid-rows": [he]
580
580
  }],
581
581
  /**
582
582
  * Grid Row Start / End
@@ -584,22 +584,22 @@ const V = (e) => {
584
584
  */
585
585
  "row-start-end": [{
586
586
  row: ["auto", {
587
- span: [de, T]
588
- }, T]
587
+ span: [ue, M]
588
+ }, M]
589
589
  }],
590
590
  /**
591
591
  * Grid Row Start
592
592
  * @see https://tailwindcss.com/docs/grid-row
593
593
  */
594
594
  "row-start": [{
595
- "row-start": M()
595
+ "row-start": I()
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": M()
602
+ "row-end": I()
603
603
  }],
604
604
  /**
605
605
  * Grid Auto Flow
@@ -613,42 +613,42 @@ const V = (e) => {
613
613
  * @see https://tailwindcss.com/docs/grid-auto-columns
614
614
  */
615
615
  "auto-cols": [{
616
- "auto-cols": ["auto", "min", "max", "fr", T]
616
+ "auto-cols": ["auto", "min", "max", "fr", M]
617
617
  }],
618
618
  /**
619
619
  * Grid Auto Rows
620
620
  * @see https://tailwindcss.com/docs/grid-auto-rows
621
621
  */
622
622
  "auto-rows": [{
623
- "auto-rows": ["auto", "min", "max", "fr", T]
623
+ "auto-rows": ["auto", "min", "max", "fr", M]
624
624
  }],
625
625
  /**
626
626
  * Gap
627
627
  * @see https://tailwindcss.com/docs/gap
628
628
  */
629
629
  gap: [{
630
- gap: [u]
630
+ gap: [h]
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": [u]
637
+ "gap-x": [h]
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": [u]
644
+ "gap-y": [h]
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", ...O()]
651
+ justify: ["normal", ...S()]
652
652
  }],
653
653
  /**
654
654
  * Justify Items
@@ -669,7 +669,7 @@ const V = (e) => {
669
669
  * @see https://tailwindcss.com/docs/align-content
670
670
  */
671
671
  "align-content": [{
672
- content: ["normal", ...O(), "baseline"]
672
+ content: ["normal", ...S(), "baseline"]
673
673
  }],
674
674
  /**
675
675
  * Align Items
@@ -690,7 +690,7 @@ const V = (e) => {
690
690
  * @see https://tailwindcss.com/docs/place-content
691
691
  */
692
692
  "place-content": [{
693
- "place-content": [...O(), "baseline"]
693
+ "place-content": [...S(), "baseline"]
694
694
  }],
695
695
  /**
696
696
  * Place Items
@@ -712,133 +712,133 @@ const V = (e) => {
712
712
  * @see https://tailwindcss.com/docs/padding
713
713
  */
714
714
  p: [{
715
- p: [h]
715
+ p: [m]
716
716
  }],
717
717
  /**
718
718
  * Padding X
719
719
  * @see https://tailwindcss.com/docs/padding
720
720
  */
721
721
  px: [{
722
- px: [h]
722
+ px: [m]
723
723
  }],
724
724
  /**
725
725
  * Padding Y
726
726
  * @see https://tailwindcss.com/docs/padding
727
727
  */
728
728
  py: [{
729
- py: [h]
729
+ py: [m]
730
730
  }],
731
731
  /**
732
732
  * Padding Start
733
733
  * @see https://tailwindcss.com/docs/padding
734
734
  */
735
735
  ps: [{
736
- ps: [h]
736
+ ps: [m]
737
737
  }],
738
738
  /**
739
739
  * Padding End
740
740
  * @see https://tailwindcss.com/docs/padding
741
741
  */
742
742
  pe: [{
743
- pe: [h]
743
+ pe: [m]
744
744
  }],
745
745
  /**
746
746
  * Padding Top
747
747
  * @see https://tailwindcss.com/docs/padding
748
748
  */
749
749
  pt: [{
750
- pt: [h]
750
+ pt: [m]
751
751
  }],
752
752
  /**
753
753
  * Padding Right
754
754
  * @see https://tailwindcss.com/docs/padding
755
755
  */
756
756
  pr: [{
757
- pr: [h]
757
+ pr: [m]
758
758
  }],
759
759
  /**
760
760
  * Padding Bottom
761
761
  * @see https://tailwindcss.com/docs/padding
762
762
  */
763
763
  pb: [{
764
- pb: [h]
764
+ pb: [m]
765
765
  }],
766
766
  /**
767
767
  * Padding Left
768
768
  * @see https://tailwindcss.com/docs/padding
769
769
  */
770
770
  pl: [{
771
- pl: [h]
771
+ pl: [m]
772
772
  }],
773
773
  /**
774
774
  * Margin
775
775
  * @see https://tailwindcss.com/docs/margin
776
776
  */
777
777
  m: [{
778
- m: [f]
778
+ m: [u]
779
779
  }],
780
780
  /**
781
781
  * Margin X
782
782
  * @see https://tailwindcss.com/docs/margin
783
783
  */
784
784
  mx: [{
785
- mx: [f]
785
+ mx: [u]
786
786
  }],
787
787
  /**
788
788
  * Margin Y
789
789
  * @see https://tailwindcss.com/docs/margin
790
790
  */
791
791
  my: [{
792
- my: [f]
792
+ my: [u]
793
793
  }],
794
794
  /**
795
795
  * Margin Start
796
796
  * @see https://tailwindcss.com/docs/margin
797
797
  */
798
798
  ms: [{
799
- ms: [f]
799
+ ms: [u]
800
800
  }],
801
801
  /**
802
802
  * Margin End
803
803
  * @see https://tailwindcss.com/docs/margin
804
804
  */
805
805
  me: [{
806
- me: [f]
806
+ me: [u]
807
807
  }],
808
808
  /**
809
809
  * Margin Top
810
810
  * @see https://tailwindcss.com/docs/margin
811
811
  */
812
812
  mt: [{
813
- mt: [f]
813
+ mt: [u]
814
814
  }],
815
815
  /**
816
816
  * Margin Right
817
817
  * @see https://tailwindcss.com/docs/margin
818
818
  */
819
819
  mr: [{
820
- mr: [f]
820
+ mr: [u]
821
821
  }],
822
822
  /**
823
823
  * Margin Bottom
824
824
  * @see https://tailwindcss.com/docs/margin
825
825
  */
826
826
  mb: [{
827
- mb: [f]
827
+ mb: [u]
828
828
  }],
829
829
  /**
830
830
  * Margin Left
831
831
  * @see https://tailwindcss.com/docs/margin
832
832
  */
833
833
  ml: [{
834
- ml: [f]
834
+ ml: [u]
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": [R]
841
+ "space-x": [L]
842
842
  }],
843
843
  /**
844
844
  * Space Between X Reverse
@@ -850,7 +850,7 @@ const V = (e) => {
850
850
  * @see https://tailwindcss.com/docs/space
851
851
  */
852
852
  "space-y": [{
853
- "space-y": [R]
853
+ "space-y": [L]
854
854
  }],
855
855
  /**
856
856
  * Space Between Y Reverse
@@ -863,21 +863,21 @@ const V = (e) => {
863
863
  * @see https://tailwindcss.com/docs/width
864
864
  */
865
865
  w: [{
866
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", T, t]
866
+ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", M, t]
867
867
  }],
868
868
  /**
869
869
  * Min-Width
870
870
  * @see https://tailwindcss.com/docs/min-width
871
871
  */
872
872
  "min-w": [{
873
- "min-w": [T, t, "min", "max", "fit"]
873
+ "min-w": [M, t, "min", "max", "fit"]
874
874
  }],
875
875
  /**
876
876
  * Max-Width
877
877
  * @see https://tailwindcss.com/docs/max-width
878
878
  */
879
879
  "max-w": [{
880
- "max-w": [T, t, "none", "full", "min", "max", "fit", "prose", {
880
+ "max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
881
881
  screen: [J]
882
882
  }, J]
883
883
  }],
@@ -886,28 +886,28 @@ const V = (e) => {
886
886
  * @see https://tailwindcss.com/docs/height
887
887
  */
888
888
  h: [{
889
- h: [T, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
889
+ h: [M, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
890
890
  }],
891
891
  /**
892
892
  * Min-Height
893
893
  * @see https://tailwindcss.com/docs/min-height
894
894
  */
895
895
  "min-h": [{
896
- "min-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"]
896
+ "min-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
897
897
  }],
898
898
  /**
899
899
  * Max-Height
900
900
  * @see https://tailwindcss.com/docs/max-height
901
901
  */
902
902
  "max-h": [{
903
- "max-h": [T, t, "min", "max", "fit", "svh", "lvh", "dvh"]
903
+ "max-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
904
904
  }],
905
905
  /**
906
906
  * Size
907
907
  * @see https://tailwindcss.com/docs/size
908
908
  */
909
909
  size: [{
910
- size: [T, t, "auto", "min", "max", "fit"]
910
+ size: [M, t, "auto", "min", "max", "fit"]
911
911
  }],
912
912
  // Typography
913
913
  /**
@@ -932,14 +932,14 @@ const V = (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", Ae]
935
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Le]
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: [ue]
942
+ font: [he]
943
943
  }],
944
944
  /**
945
945
  * Font Variant Numeric
@@ -976,35 +976,35 @@ const V = (e) => {
976
976
  * @see https://tailwindcss.com/docs/letter-spacing
977
977
  */
978
978
  tracking: [{
979
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", T]
979
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", M]
980
980
  }],
981
981
  /**
982
982
  * Line Clamp
983
983
  * @see https://tailwindcss.com/docs/line-clamp
984
984
  */
985
985
  "line-clamp": [{
986
- "line-clamp": ["none", ie, Ae]
986
+ "line-clamp": ["none", ne, Le]
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", X, T]
993
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Y, M]
994
994
  }],
995
995
  /**
996
996
  * List Style Image
997
997
  * @see https://tailwindcss.com/docs/list-style-image
998
998
  */
999
999
  "list-image": [{
1000
- "list-image": ["none", T]
1000
+ "list-image": ["none", M]
1001
1001
  }],
1002
1002
  /**
1003
1003
  * List Style Type
1004
1004
  * @see https://tailwindcss.com/docs/list-style-type
1005
1005
  */
1006
1006
  "list-style-type": [{
1007
- list: ["none", "disc", "decimal", T]
1007
+ list: ["none", "disc", "decimal", M]
1008
1008
  }],
1009
1009
  /**
1010
1010
  * List Style Position
@@ -1026,7 +1026,7 @@ const V = (e) => {
1026
1026
  * @see https://tailwindcss.com/docs/placeholder-opacity
1027
1027
  */
1028
1028
  "placeholder-opacity": [{
1029
- "placeholder-opacity": [x]
1029
+ "placeholder-opacity": [y]
1030
1030
  }],
1031
1031
  /**
1032
1032
  * Text Alignment
@@ -1047,7 +1047,7 @@ const V = (e) => {
1047
1047
  * @see https://tailwindcss.com/docs/text-opacity
1048
1048
  */
1049
1049
  "text-opacity": [{
1050
- "text-opacity": [x]
1050
+ "text-opacity": [y]
1051
1051
  }],
1052
1052
  /**
1053
1053
  * Text Decoration
@@ -1059,21 +1059,21 @@ const V = (e) => {
1059
1059
  * @see https://tailwindcss.com/docs/text-decoration-style
1060
1060
  */
1061
1061
  "text-decoration-style": [{
1062
- decoration: [...L(), "wavy"]
1062
+ decoration: [...H(), "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", X, K]
1069
+ decoration: ["auto", "from-font", Y, K]
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", X, T]
1076
+ "underline-offset": ["auto", Y, M]
1077
1077
  }],
1078
1078
  /**
1079
1079
  * Text Decoration Color
@@ -1104,14 +1104,14 @@ const V = (e) => {
1104
1104
  * @see https://tailwindcss.com/docs/text-indent
1105
1105
  */
1106
1106
  indent: [{
1107
- indent: w()
1107
+ indent: T()
1108
1108
  }],
1109
1109
  /**
1110
1110
  * Vertical Alignment
1111
1111
  * @see https://tailwindcss.com/docs/vertical-align
1112
1112
  */
1113
1113
  "vertical-align": [{
1114
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", T]
1114
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", M]
1115
1115
  }],
1116
1116
  /**
1117
1117
  * Whitespace
@@ -1139,7 +1139,7 @@ const V = (e) => {
1139
1139
  * @see https://tailwindcss.com/docs/content
1140
1140
  */
1141
1141
  content: [{
1142
- content: ["none", T]
1142
+ content: ["none", M]
1143
1143
  }],
1144
1144
  // Backgrounds
1145
1145
  /**
@@ -1162,7 +1162,7 @@ const V = (e) => {
1162
1162
  * @see https://tailwindcss.com/docs/background-opacity
1163
1163
  */
1164
1164
  "bg-opacity": [{
1165
- "bg-opacity": [x]
1165
+ "bg-opacity": [y]
1166
1166
  }],
1167
1167
  /**
1168
1168
  * Background Origin
@@ -1176,7 +1176,7 @@ const V = (e) => {
1176
1176
  * @see https://tailwindcss.com/docs/background-position
1177
1177
  */
1178
1178
  "bg-position": [{
1179
- bg: [...A(), Fi]
1179
+ bg: [...R(), Wi]
1180
1180
  }],
1181
1181
  /**
1182
1182
  * Background Repeat
@@ -1192,7 +1192,7 @@ const V = (e) => {
1192
1192
  * @see https://tailwindcss.com/docs/background-size
1193
1193
  */
1194
1194
  "bg-size": [{
1195
- bg: ["auto", "cover", "contain", $i]
1195
+ bg: ["auto", "cover", "contain", Fi]
1196
1196
  }],
1197
1197
  /**
1198
1198
  * Background Image
@@ -1201,7 +1201,7 @@ const V = (e) => {
1201
1201
  "bg-image": [{
1202
1202
  bg: ["none", {
1203
1203
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1204
- }, Gi]
1204
+ }, Xi]
1205
1205
  }],
1206
1206
  /**
1207
1207
  * Background Color
@@ -1215,42 +1215,42 @@ const V = (e) => {
1215
1215
  * @see https://tailwindcss.com/docs/gradient-color-stops
1216
1216
  */
1217
1217
  "gradient-from-pos": [{
1218
- from: [b]
1218
+ from: [f]
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: [b]
1225
+ via: [f]
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: [b]
1232
+ to: [f]
1233
1233
  }],
1234
1234
  /**
1235
1235
  * Gradient Color Stops From
1236
1236
  * @see https://tailwindcss.com/docs/gradient-color-stops
1237
1237
  */
1238
1238
  "gradient-from": [{
1239
- from: [k]
1239
+ from: [b]
1240
1240
  }],
1241
1241
  /**
1242
1242
  * Gradient Color Stops Via
1243
1243
  * @see https://tailwindcss.com/docs/gradient-color-stops
1244
1244
  */
1245
1245
  "gradient-via": [{
1246
- via: [k]
1246
+ via: [b]
1247
1247
  }],
1248
1248
  /**
1249
1249
  * Gradient Color Stops To
1250
1250
  * @see https://tailwindcss.com/docs/gradient-color-stops
1251
1251
  */
1252
1252
  "gradient-to": [{
1253
- to: [k]
1253
+ to: [b]
1254
1254
  }],
1255
1255
  // Borders
1256
1256
  /**
@@ -1426,14 +1426,14 @@ const V = (e) => {
1426
1426
  * @see https://tailwindcss.com/docs/border-opacity
1427
1427
  */
1428
1428
  "border-opacity": [{
1429
- "border-opacity": [x]
1429
+ "border-opacity": [y]
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: [...L(), "hidden"]
1436
+ border: [...H(), "hidden"]
1437
1437
  }],
1438
1438
  /**
1439
1439
  * Divide Width X
@@ -1464,14 +1464,14 @@ const V = (e) => {
1464
1464
  * @see https://tailwindcss.com/docs/divide-opacity
1465
1465
  */
1466
1466
  "divide-opacity": [{
1467
- "divide-opacity": [x]
1467
+ "divide-opacity": [y]
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: L()
1474
+ divide: H()
1475
1475
  }],
1476
1476
  /**
1477
1477
  * Border Color
@@ -1548,21 +1548,21 @@ const V = (e) => {
1548
1548
  * @see https://tailwindcss.com/docs/outline-style
1549
1549
  */
1550
1550
  "outline-style": [{
1551
- outline: ["", ...L()]
1551
+ outline: ["", ...H()]
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": [X, T]
1558
+ "outline-offset": [Y, 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: [X, K]
1565
+ outline: [Y, K]
1566
1566
  }],
1567
1567
  /**
1568
1568
  * Outline Color
@@ -1576,7 +1576,7 @@ const V = (e) => {
1576
1576
  * @see https://tailwindcss.com/docs/ring-width
1577
1577
  */
1578
1578
  "ring-w": [{
1579
- ring: C()
1579
+ ring: x()
1580
1580
  }],
1581
1581
  /**
1582
1582
  * Ring Width Inset
@@ -1595,14 +1595,14 @@ const V = (e) => {
1595
1595
  * @see https://tailwindcss.com/docs/ring-opacity
1596
1596
  */
1597
1597
  "ring-opacity": [{
1598
- "ring-opacity": [x]
1598
+ "ring-opacity": [y]
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": [X, K]
1605
+ "ring-offset": [Y, K]
1606
1606
  }],
1607
1607
  /**
1608
1608
  * Ring Offset Color
@@ -1617,21 +1617,21 @@ const V = (e) => {
1617
1617
  * @see https://tailwindcss.com/docs/box-shadow
1618
1618
  */
1619
1619
  shadow: [{
1620
- shadow: ["", "inner", "none", J, Xi]
1620
+ shadow: ["", "inner", "none", J, Yi]
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: [ue]
1627
+ shadow: [he]
1628
1628
  }],
1629
1629
  /**
1630
1630
  * Opacity
1631
1631
  * @see https://tailwindcss.com/docs/opacity
1632
1632
  */
1633
1633
  opacity: [{
1634
- opacity: [x]
1634
+ opacity: [y]
1635
1635
  }],
1636
1636
  /**
1637
1637
  * Mix Blend Mode
@@ -1682,7 +1682,7 @@ const V = (e) => {
1682
1682
  * @see https://tailwindcss.com/docs/drop-shadow
1683
1683
  */
1684
1684
  "drop-shadow": [{
1685
- "drop-shadow": ["", "none", J, T]
1685
+ "drop-shadow": ["", "none", J, M]
1686
1686
  }],
1687
1687
  /**
1688
1688
  * Grayscale
@@ -1710,14 +1710,14 @@ const V = (e) => {
1710
1710
  * @see https://tailwindcss.com/docs/saturate
1711
1711
  */
1712
1712
  saturate: [{
1713
- saturate: [S]
1713
+ saturate: [z]
1714
1714
  }],
1715
1715
  /**
1716
1716
  * Sepia
1717
1717
  * @see https://tailwindcss.com/docs/sepia
1718
1718
  */
1719
1719
  sepia: [{
1720
- sepia: [H]
1720
+ sepia: [A]
1721
1721
  }],
1722
1722
  /**
1723
1723
  * Backdrop Filter
@@ -1774,21 +1774,21 @@ const V = (e) => {
1774
1774
  * @see https://tailwindcss.com/docs/backdrop-opacity
1775
1775
  */
1776
1776
  "backdrop-opacity": [{
1777
- "backdrop-opacity": [x]
1777
+ "backdrop-opacity": [y]
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": [S]
1784
+ "backdrop-saturate": [z]
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": [H]
1791
+ "backdrop-sepia": [A]
1792
1792
  }],
1793
1793
  // Tables
1794
1794
  /**
@@ -1839,7 +1839,7 @@ const V = (e) => {
1839
1839
  * @see https://tailwindcss.com/docs/transition-property
1840
1840
  */
1841
1841
  transition: [{
1842
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", T]
1842
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", M]
1843
1843
  }],
1844
1844
  /**
1845
1845
  * Transition Duration
@@ -1853,7 +1853,7 @@ const V = (e) => {
1853
1853
  * @see https://tailwindcss.com/docs/transition-timing-function
1854
1854
  */
1855
1855
  ease: [{
1856
- ease: ["linear", "in", "out", "in-out", T]
1856
+ ease: ["linear", "in", "out", "in-out", M]
1857
1857
  }],
1858
1858
  /**
1859
1859
  * Transition Delay
@@ -1867,7 +1867,7 @@ const V = (e) => {
1867
1867
  * @see https://tailwindcss.com/docs/animation
1868
1868
  */
1869
1869
  animate: [{
1870
- animate: ["none", "spin", "ping", "pulse", "bounce", T]
1870
+ animate: ["none", "spin", "ping", "pulse", "bounce", M]
1871
1871
  }],
1872
1872
  // Transforms
1873
1873
  /**
@@ -1882,63 +1882,63 @@ const V = (e) => {
1882
1882
  * @see https://tailwindcss.com/docs/scale
1883
1883
  */
1884
1884
  scale: [{
1885
- scale: [m]
1885
+ scale: [v]
1886
1886
  }],
1887
1887
  /**
1888
1888
  * Scale X
1889
1889
  * @see https://tailwindcss.com/docs/scale
1890
1890
  */
1891
1891
  "scale-x": [{
1892
- "scale-x": [m]
1892
+ "scale-x": [v]
1893
1893
  }],
1894
1894
  /**
1895
1895
  * Scale Y
1896
1896
  * @see https://tailwindcss.com/docs/scale
1897
1897
  */
1898
1898
  "scale-y": [{
1899
- "scale-y": [m]
1899
+ "scale-y": [v]
1900
1900
  }],
1901
1901
  /**
1902
1902
  * Rotate
1903
1903
  * @see https://tailwindcss.com/docs/rotate
1904
1904
  */
1905
1905
  rotate: [{
1906
- rotate: [de, T]
1906
+ rotate: [ue, M]
1907
1907
  }],
1908
1908
  /**
1909
1909
  * Translate X
1910
1910
  * @see https://tailwindcss.com/docs/translate
1911
1911
  */
1912
1912
  "translate-x": [{
1913
- "translate-x": [N]
1913
+ "translate-x": [V]
1914
1914
  }],
1915
1915
  /**
1916
1916
  * Translate Y
1917
1917
  * @see https://tailwindcss.com/docs/translate
1918
1918
  */
1919
1919
  "translate-y": [{
1920
- "translate-y": [N]
1920
+ "translate-y": [V]
1921
1921
  }],
1922
1922
  /**
1923
1923
  * Skew X
1924
1924
  * @see https://tailwindcss.com/docs/skew
1925
1925
  */
1926
1926
  "skew-x": [{
1927
- "skew-x": [v]
1927
+ "skew-x": [w]
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": [v]
1934
+ "skew-y": [w]
1935
1935
  }],
1936
1936
  /**
1937
1937
  * Transform Origin
1938
1938
  * @see https://tailwindcss.com/docs/transform-origin
1939
1939
  */
1940
1940
  "transform-origin": [{
1941
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", T]
1941
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", M]
1942
1942
  }],
1943
1943
  // Interactivity
1944
1944
  /**
@@ -1960,7 +1960,7 @@ const V = (e) => {
1960
1960
  * @see https://tailwindcss.com/docs/cursor
1961
1961
  */
1962
1962
  cursor: [{
1963
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", T]
1963
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", M]
1964
1964
  }],
1965
1965
  /**
1966
1966
  * Caret Color
@@ -1995,126 +1995,126 @@ const V = (e) => {
1995
1995
  * @see https://tailwindcss.com/docs/scroll-margin
1996
1996
  */
1997
1997
  "scroll-m": [{
1998
- "scroll-m": w()
1998
+ "scroll-m": T()
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": w()
2005
+ "scroll-mx": T()
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": w()
2012
+ "scroll-my": T()
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": w()
2019
+ "scroll-ms": T()
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": w()
2026
+ "scroll-me": T()
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": w()
2033
+ "scroll-mt": T()
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": w()
2040
+ "scroll-mr": T()
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": w()
2047
+ "scroll-mb": T()
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": w()
2054
+ "scroll-ml": T()
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": w()
2061
+ "scroll-p": T()
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": w()
2068
+ "scroll-px": T()
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": w()
2075
+ "scroll-py": T()
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": w()
2082
+ "scroll-ps": T()
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": w()
2089
+ "scroll-pe": T()
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": w()
2096
+ "scroll-pt": T()
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": w()
2103
+ "scroll-pr": T()
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": w()
2110
+ "scroll-pb": T()
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": w()
2117
+ "scroll-pl": T()
2118
2118
  }],
2119
2119
  /**
2120
2120
  * Scroll Snap Align
@@ -2182,7 +2182,7 @@ const V = (e) => {
2182
2182
  * @see https://tailwindcss.com/docs/will-change
2183
2183
  */
2184
2184
  "will-change": [{
2185
- "will-change": ["auto", "scroll", "contents", "transform", T]
2185
+ "will-change": ["auto", "scroll", "contents", "transform", M]
2186
2186
  }],
2187
2187
  // SVG
2188
2188
  /**
@@ -2197,7 +2197,7 @@ const V = (e) => {
2197
2197
  * @see https://tailwindcss.com/docs/stroke-width
2198
2198
  */
2199
2199
  "stroke-w": [{
2200
- stroke: [X, K, Ae]
2200
+ stroke: [Y, K, Le]
2201
2201
  }],
2202
2202
  /**
2203
2203
  * Stroke
@@ -2272,21 +2272,21 @@ const V = (e) => {
2272
2272
  "font-size": ["leading"]
2273
2273
  }
2274
2274
  };
2275
- }, Ji = /* @__PURE__ */ Ri(Ki);
2276
- function _(...e) {
2277
- return Ji(lt(e));
2275
+ }, Qi = /* @__PURE__ */ Vi(Ji);
2276
+ function O(...e) {
2277
+ return Qi(ct(e));
2278
2278
  }
2279
- let Ee;
2280
- function Re() {
2281
- return Ee === void 0 && (Ee = navigator.platform.includes("Mac")), Ee;
2282
- }
2283
- function Qi(e) {
2284
- return `${e}`.toLowerCase() === "mod" ? Re() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Re() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Re() ? "⇧" : "Shift" : e;
2279
+ let Ne;
2280
+ function Ee() {
2281
+ return Ne === void 0 && (Ne = navigator.platform.includes("Mac")), Ne;
2285
2282
  }
2286
2283
  function en(e) {
2287
- return e.map(Qi).join(" ");
2284
+ return `${e}`.toLowerCase() === "mod" ? Ee() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Ee() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Ee() ? "⇧" : "Shift" : e;
2288
2285
  }
2289
- const vt = Q.forwardRef(
2286
+ function tn(e) {
2287
+ return e.map(en).join(" ");
2288
+ }
2289
+ const wt = Q.forwardRef(
2290
2290
  (e, t) => {
2291
2291
  const {
2292
2292
  icon: r = void 0,
@@ -2301,43 +2301,43 @@ const vt = Q.forwardRef(
2301
2301
  action: d = void 0,
2302
2302
  isActive: g = void 0,
2303
2303
  children: p,
2304
- asChild: u = !1,
2305
- upload: k = !1,
2306
- initialDisplayedColor: b = void 0,
2307
- dataState: z = !1,
2308
- ...f
2309
- } = e, x = wt[r], h = u ? ut : yt, S = (m) => {
2304
+ asChild: h = !1,
2305
+ upload: b = !1,
2306
+ initialDisplayedColor: f = void 0,
2307
+ dataState: k = !1,
2308
+ ...u
2309
+ } = e, y = yt[r], m = h ? ht : Ct, z = (v) => {
2310
2310
  if (o) {
2311
- m.preventDefault();
2311
+ v.preventDefault();
2312
2312
  return;
2313
2313
  }
2314
- d == null || d(m);
2314
+ d == null || d(v);
2315
2315
  };
2316
- return /* @__PURE__ */ y(Nn, { children: [
2317
- /* @__PURE__ */ n(Ln, { asChild: !0, children: /* @__PURE__ */ y(
2318
- h,
2316
+ return /* @__PURE__ */ C(Ln, { children: [
2317
+ /* @__PURE__ */ n(Nn, { asChild: !0, children: /* @__PURE__ */ C(
2318
+ m,
2319
2319
  {
2320
- className: _("richtext-h-[32px] richtext-w-[32px]", a),
2321
- "data-state": z ? "on" : "off",
2320
+ className: O("richtext-h-[32px] richtext-w-[32px]", a),
2321
+ "data-state": k ? "on" : "off",
2322
2322
  disabled: o,
2323
- onClick: S,
2323
+ onClick: z,
2324
2324
  ref: t,
2325
2325
  size: "sm",
2326
- ...f,
2326
+ ...u,
2327
2327
  children: [
2328
- x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
2328
+ y && /* @__PURE__ */ n(y, { className: "richtext-size-4" }),
2329
2329
  p
2330
2330
  ]
2331
2331
  }
2332
2332
  ) }),
2333
- i && /* @__PURE__ */ n(Ct, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2333
+ i && /* @__PURE__ */ n(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: [
2334
2334
  /* @__PURE__ */ n("div", { children: i }),
2335
- !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: en(s) })
2335
+ !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: tn(s) })
2336
2336
  ] }) })
2337
2337
  ] });
2338
2338
  }
2339
2339
  );
2340
- function tn(e) {
2340
+ function rn(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 tn(e) {
2346
2346
  }
2347
2347
  ) });
2348
2348
  }
2349
- function rn(e) {
2349
+ function nn(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 rn(e) {
2359
2359
  }
2360
2360
  ) });
2361
2361
  }
2362
- function nn() {
2362
+ function on() {
2363
2363
  return /* @__PURE__ */ n(
2364
2364
  "svg",
2365
2365
  {
@@ -2386,7 +2386,7 @@ function nn() {
2386
2386
  }
2387
2387
  );
2388
2388
  }
2389
- function on() {
2389
+ function an() {
2390
2390
  return /* @__PURE__ */ n(
2391
2391
  "svg",
2392
2392
  {
@@ -2413,7 +2413,7 @@ function on() {
2413
2413
  }
2414
2414
  );
2415
2415
  }
2416
- function an(e) {
2416
+ function sn(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 an(e) {
2422
2422
  }
2423
2423
  ) });
2424
2424
  }
2425
- function fe(e) {
2426
- const t = wt[e.name];
2425
+ function Re(e) {
2426
+ const t = yt[e.name];
2427
2427
  return t ? /* @__PURE__ */ n(
2428
2428
  t,
2429
2429
  {
@@ -2432,7 +2432,7 @@ function fe(e) {
2432
2432
  }
2433
2433
  ) : null;
2434
2434
  }
2435
- function sn(e) {
2435
+ function ln(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 sn(e) {
2441
2441
  }
2442
2442
  ) });
2443
2443
  }
2444
- function ln(e) {
2444
+ function cn(e) {
2445
2445
  return /* @__PURE__ */ n(
2446
2446
  "svg",
2447
2447
  {
@@ -2466,10 +2466,10 @@ function ln(e) {
2466
2466
  }
2467
2467
  );
2468
2468
  }
2469
- function cn(e) {
2469
+ function dn(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 dn(e) {
2472
+ function un(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 dn(e) {
2478
2478
  }
2479
2479
  ) });
2480
2480
  }
2481
- function un(e) {
2481
+ function hn(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 un(e) {
2487
2487
  }
2488
2488
  ) });
2489
2489
  }
2490
- function hn() {
2490
+ function fn() {
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 hn() {
2496
2496
  }
2497
2497
  ) });
2498
2498
  }
2499
- function fn() {
2499
+ function mn() {
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 fn() {
2509
2509
  }
2510
2510
  ) });
2511
2511
  }
2512
- function mn() {
2512
+ function gn() {
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 mn() {
2522
2522
  }
2523
2523
  ) });
2524
2524
  }
2525
- function gn() {
2525
+ function pn() {
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 gn() {
2535
2535
  }
2536
2536
  ) });
2537
2537
  }
2538
- function pn() {
2538
+ function xn() {
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 pn() {
2544
2544
  }
2545
2545
  ) });
2546
2546
  }
2547
- function xn() {
2548
- return /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
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: [
2549
2549
  /* @__PURE__ */ n(
2550
2550
  "path",
2551
2551
  {
@@ -2562,8 +2562,8 @@ function xn() {
2562
2562
  )
2563
2563
  ] });
2564
2564
  }
2565
- function bn() {
2566
- return /* @__PURE__ */ y(
2565
+ function vn() {
2566
+ return /* @__PURE__ */ C(
2567
2567
  "svg",
2568
2568
  {
2569
2569
  xmlns: "http://www.w3.org/2000/svg",
@@ -2590,7 +2590,7 @@ function bn() {
2590
2590
  }
2591
2591
  );
2592
2592
  }
2593
- function vn() {
2593
+ function wn() {
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 vn() {
2599
2599
  }
2600
2600
  ) });
2601
2601
  }
2602
- function wn() {
2603
- return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ y(
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(
2604
2604
  "g",
2605
2605
  {
2606
2606
  fill: "none",
@@ -2615,7 +2615,7 @@ function wn() {
2615
2615
  }
2616
2616
  ) });
2617
2617
  }
2618
- function yn() {
2618
+ function Cn() {
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 yn() {
2624
2624
  }
2625
2625
  ) });
2626
2626
  }
2627
- function Cn() {
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: [
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: [
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 Cn() {
2633
2633
  /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
2634
2634
  ] }) });
2635
2635
  }
2636
- function kn() {
2636
+ function Mn() {
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 kn() {
2642
2642
  }
2643
2643
  ) });
2644
2644
  }
2645
- function Mn() {
2645
+ function In() {
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 Mn() {
2656
2656
  }
2657
2657
  ) });
2658
2658
  }
2659
- function In() {
2659
+ function Tn() {
2660
2660
  return /* @__PURE__ */ n(
2661
2661
  "svg",
2662
2662
  {
@@ -2677,143 +2677,143 @@ function In() {
2677
2677
  }
2678
2678
  );
2679
2679
  }
2680
- const wt = {
2681
- Bold: ai,
2682
- LoaderCircle: oi,
2683
- Italic: ni,
2684
- Underline: ii,
2685
- Quote: ri,
2686
- TextQuote: rn,
2687
- Strikethrough: ti,
2688
- Minus: ei,
2689
- Eraser: Qr,
2690
- PaintRoller: Jr,
2691
- Redo2: Kr,
2692
- Undo2: Zr,
2693
- AlignCenter: vi,
2694
- AlignJustify: bi,
2695
- AlignLeft: xi,
2696
- AlignRight: pi,
2697
- ChevronDown: qr,
2698
- Subscript: Yr,
2699
- Superscript: Xr,
2700
- Code: Gr,
2701
- Code2: Wr,
2702
- Type: Fr,
2703
- IndentIncrease: $r,
2704
- IndentDecrease: Br,
2705
- List: Ur,
2706
- ListOrdered: _r,
2707
- ListTodo: Pr,
2708
- Link: jr,
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
2709
  ImageUp: Or,
2710
- Video: Dr,
2711
- Maximize: Hr,
2712
- Minimize: Vr,
2713
- Table: Rr,
2714
- Sparkles: Er,
2715
- Pencil: Ar,
2716
- Unlink: Lr,
2710
+ Video: Pr,
2711
+ Maximize: jr,
2712
+ Minimize: Dr,
2713
+ Table: Hr,
2714
+ Sparkles: Vr,
2715
+ Pencil: Rr,
2716
+ Unlink: Er,
2717
2717
  BetweenHorizonalEnd: Nr,
2718
- BetweenHorizonalStart: Sr,
2719
- BetweenVerticalStart: Tr,
2720
- BetweenVerticalEnd: zr,
2721
- TableCellsMerge: Ir,
2722
- TableCellsSplit: Mr,
2723
- Trash2: kr,
2724
- Trash: Cr,
2718
+ BetweenHorizonalStart: Lr,
2719
+ BetweenVerticalStart: Ar,
2720
+ BetweenVerticalEnd: Sr,
2721
+ TableCellsMerge: zr,
2722
+ TableCellsSplit: Tr,
2723
+ Trash2: Ir,
2724
+ Trash: Mr,
2725
2725
  Replace: Ye,
2726
- ChevronsUpDown: yr,
2727
- LineHeight: sn,
2728
- Word: an,
2729
- HeadingParagraph: wr,
2730
- Heading1: vr,
2731
- Heading2: br,
2732
- Heading3: xr,
2733
- Heading4: pr,
2734
- Heading5: gr,
2735
- Heading6: mr,
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
2736
  Columns2: qe,
2737
- Columns3: fr,
2738
- Columns4: hr,
2739
- Plus: ur,
2740
- Grip: dr,
2741
- Copy: cr,
2742
- Clipboard: lr,
2743
- PanelLeft: sr,
2744
- PanelRight: ar,
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
2745
  Columns: qe,
2746
- Iframe: or,
2747
- MenuDown: ln,
2748
- SizeS: un,
2749
- SizeM: dn,
2750
- SizeL: cn,
2751
- AspectRatio: tn,
2752
- Emoji: nr,
2753
- DeleteColumn: nn,
2754
- DeleteRow: on,
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
2755
  SearchAndReplace: Ye,
2756
- EmojiIcon: ir,
2757
- KatexIcon: rr,
2758
- ExportPdf: xn,
2759
- ExportWord: bn,
2760
- ImportWord: In,
2761
- ColumnAddLeft: fn,
2762
- ColumnAddRight: mn,
2763
- BookMarked: tr,
2764
- Excalidraw: pn,
2765
- ZoomIn: er,
2766
- ZoomOut: Qt,
2767
- Settings: Jt,
2768
- Eye: Kt,
2769
- TextDirection: gn,
2770
- LeftToRight: yn,
2771
- RightToLeft: kn,
2772
- Attachment: Zt,
2773
- GifIcon: vn,
2774
- ChevronUp: qt,
2775
- Crop: Yt,
2776
- Mermaid: Cn,
2777
- Twitter: Mn,
2778
- CodeView: hn,
2779
- FlipX: Xt,
2780
- FlipY: Gt,
2781
- PencilRuler: Wt,
2782
- WrapText: Ft,
2783
- Loader: $t,
2784
- X: st,
2785
- Html: wn,
2786
- ExternalLink: Bt,
2787
- Callout: Ut
2788
- }, et = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, tt = lt, Ue = (e, t) => (r) => {
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) => {
2789
2789
  var i;
2790
- if ((t == null ? void 0 : t.variants) == null) return tt(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
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
2791
  const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
2792
2792
  const g = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
2793
2793
  if (g === null) return null;
2794
- const u = et(g) || et(p);
2795
- return o[d][u];
2794
+ const h = tt(g) || tt(p);
2795
+ return o[d][h];
2796
2796
  }), s = r && Object.entries(r).reduce((d, g) => {
2797
- let [p, u] = g;
2798
- return u === void 0 || (d[p] = u), d;
2797
+ let [p, h] = g;
2798
+ return h === void 0 || (d[p] = h), d;
2799
2799
  }, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, g) => {
2800
- let { class: p, className: u, ...k } = g;
2801
- return Object.entries(k).every((b) => {
2802
- let [z, f] = b;
2803
- return Array.isArray(f) ? f.includes({
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({
2804
2804
  ...a,
2805
2805
  ...s
2806
- }[z]) : {
2806
+ }[k]) : {
2807
2807
  ...a,
2808
2808
  ...s
2809
- }[z] === f;
2809
+ }[k] === u;
2810
2810
  }) ? [
2811
2811
  ...d,
2812
2812
  p,
2813
- u
2813
+ h
2814
2814
  ] : d;
2815
2815
  }, []);
2816
- return tt(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2816
+ return rt(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2817
2817
  }, zn = Ue(
2818
2818
  "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
2819
  {
@@ -2838,17 +2838,17 @@ const wt = {
2838
2838
  size: "default"
2839
2839
  }
2840
2840
  }
2841
- ), $ = U.forwardRef(
2842
- ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ut : "button", { className: _(zn({ variant: t, size: r, className: e })), ref: a, ...o })
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 })
2843
2843
  );
2844
- $.displayName = "Button";
2845
- const te = U.forwardRef(
2844
+ G.displayName = "Button";
2845
+ const re = B.forwardRef(
2846
2846
  ({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
2847
2847
  "input",
2848
2848
  {
2849
2849
  ref: i,
2850
2850
  type: t,
2851
- className: _(
2851
+ className: O(
2852
2852
  "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
2853
  e
2854
2854
  ),
@@ -2856,48 +2856,48 @@ const te = U.forwardRef(
2856
2856
  }
2857
2857
  )
2858
2858
  );
2859
- te.displayName = "Input";
2860
- const Tn = Ue(
2859
+ re.displayName = "Input";
2860
+ const Sn = Ue(
2861
2861
  "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 = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(ft.Root, { className: _(Tn(), e), ref: r, ...t }));
2863
- pe.displayName = ft.Root.displayName;
2864
- const Ne = re.Root, ve = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2865
- re.List,
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,
2866
2866
  {
2867
2867
  ref: r,
2868
- className: _(
2868
+ className: O(
2869
2869
  "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
2870
  e
2871
2871
  ),
2872
2872
  ...t
2873
2873
  }
2874
2874
  ));
2875
- ve.displayName = re.List.displayName;
2876
- const q = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2877
- re.Trigger,
2875
+ ve.displayName = ie.List.displayName;
2876
+ const q = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2877
+ ie.Trigger,
2878
2878
  {
2879
2879
  ref: r,
2880
- className: _(
2880
+ className: O(
2881
2881
  "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
2882
  e
2883
2883
  ),
2884
2884
  ...t
2885
2885
  }
2886
2886
  ));
2887
- q.displayName = re.Trigger.displayName;
2888
- const Z = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2889
- re.Content,
2887
+ q.displayName = ie.Trigger.displayName;
2888
+ const Z = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2889
+ ie.Content,
2890
2890
  {
2891
2891
  ref: r,
2892
- className: _(
2892
+ className: O(
2893
2893
  "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
2894
  e
2895
2895
  ),
2896
2896
  ...t
2897
2897
  }
2898
2898
  ));
2899
- Z.displayName = re.Content.displayName;
2900
- const Sn = Ue(
2899
+ Z.displayName = ie.Content.displayName;
2900
+ const An = Ue(
2901
2901
  "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
2902
  {
2903
2903
  variants: {
@@ -2916,36 +2916,36 @@ const Sn = Ue(
2916
2916
  size: "default"
2917
2917
  }
2918
2918
  }
2919
- ), yt = U.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2920
- ht.Root,
2919
+ ), Ct = B.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
2920
+ ft.Root,
2921
2921
  {
2922
2922
  ref: o,
2923
- className: _(Sn({ variant: t, size: r, className: e })),
2923
+ className: O(An({ variant: t, size: r, className: e })),
2924
2924
  ...i
2925
2925
  }
2926
2926
  ));
2927
- yt.displayName = ht.Root.displayName;
2928
- const $o = be.Provider, Nn = be.Root, Ln = be.Trigger, Ct = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
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
2929
  be.Content,
2930
2930
  {
2931
2931
  "data-richtext-portal": !0,
2932
2932
  ref: i,
2933
2933
  sideOffset: t,
2934
- className: _(
2934
+ className: O(
2935
2935
  "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
2936
  e
2937
2937
  ),
2938
2938
  ...r
2939
2939
  }
2940
2940
  ));
2941
- Ct.displayName = be.Content.displayName;
2942
- const An = 1, En = 1e6;
2941
+ kt.displayName = be.Content.displayName;
2942
+ const En = 1, Rn = 1e6;
2943
2943
  let Ve = 0;
2944
- function Rn() {
2944
+ function Vn() {
2945
2945
  return Ve = (Ve + 1) % Number.MAX_SAFE_INTEGER, Ve.toString();
2946
2946
  }
2947
2947
  const He = /* @__PURE__ */ new Map();
2948
- function rt(e) {
2948
+ function it(e) {
2949
2949
  if (He.has(e))
2950
2950
  return;
2951
2951
  const t = setTimeout(() => {
@@ -2953,15 +2953,15 @@ function rt(e) {
2953
2953
  type: "REMOVE_TOAST",
2954
2954
  toastId: e
2955
2955
  });
2956
- }, En);
2956
+ }, Rn);
2957
2957
  He.set(e, t);
2958
2958
  }
2959
- function Vn(e, t) {
2959
+ function Hn(e, t) {
2960
2960
  switch (t.type) {
2961
2961
  case "ADD_TOAST":
2962
2962
  return {
2963
2963
  ...e,
2964
- toasts: [t.toast, ...e.toasts].slice(0, An)
2964
+ toasts: [t.toast, ...e.toasts].slice(0, En)
2965
2965
  };
2966
2966
  case "UPDATE_TOAST":
2967
2967
  return {
@@ -2970,8 +2970,8 @@ function Vn(e, t) {
2970
2970
  };
2971
2971
  case "DISMISS_TOAST": {
2972
2972
  const { toastId: r } = t;
2973
- return r ? rt(r) : e.toasts.forEach((i) => {
2974
- rt(i.id);
2973
+ return r ? it(r) : e.toasts.forEach((i) => {
2974
+ it(i.id);
2975
2975
  }), {
2976
2976
  ...e,
2977
2977
  toasts: e.toasts.map(
@@ -2992,15 +2992,15 @@ function Vn(e, t) {
2992
2992
  };
2993
2993
  }
2994
2994
  }
2995
- const ke = [];
2996
- let Me = { toasts: [] };
2995
+ const Ce = [];
2996
+ let ke = { toasts: [] };
2997
2997
  function me(e) {
2998
- Me = Vn(Me, e), ke.forEach((t) => {
2999
- t(Me);
2998
+ ke = Hn(ke, e), Ce.forEach((t) => {
2999
+ t(ke);
3000
3000
  });
3001
3001
  }
3002
- function Hn({ ...e }) {
3003
- const t = Rn(), r = (o) => me({
3002
+ function Dn({ ...e }) {
3003
+ const t = Vn(), r = (o) => me({
3004
3004
  type: "UPDATE_TOAST",
3005
3005
  toast: { ...o, id: t }
3006
3006
  }), i = () => me({ type: "DISMISS_TOAST", toastId: t });
@@ -3021,38 +3021,38 @@ function Hn({ ...e }) {
3021
3021
  };
3022
3022
  }
3023
3023
  function Be() {
3024
- const [e, t] = U.useState(Me);
3025
- return U.useEffect(() => (ke.push(t), () => {
3026
- const r = ke.indexOf(t);
3027
- r > -1 && ke.splice(r, 1);
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);
3028
3028
  }), [e]), {
3029
3029
  ...e,
3030
- toast: Hn,
3030
+ toast: Dn,
3031
3031
  dismiss: (r) => me({ type: "DISMISS_TOAST", toastId: r })
3032
3032
  };
3033
3033
  }
3034
- const $e = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3035
- Oe.Root,
3034
+ const $e = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3035
+ je.Root,
3036
3036
  {
3037
3037
  ref: r,
3038
- className: _(
3038
+ className: O(
3039
3039
  "!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
3040
  e
3041
3041
  ),
3042
3042
  ...t,
3043
3043
  children: /* @__PURE__ */ n(
3044
- Oe.Indicator,
3044
+ je.Indicator,
3045
3045
  {
3046
- className: _(
3046
+ className: O(
3047
3047
  "!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
3048
3048
  ),
3049
- children: /* @__PURE__ */ n(si, { className: "!richtext-h-4 !richtext-w-4" })
3049
+ children: /* @__PURE__ */ n(ci, { className: "!richtext-h-4 !richtext-w-4" })
3050
3050
  }
3051
3051
  )
3052
3052
  }
3053
3053
  ));
3054
- $e.displayName = Oe.Root.displayName;
3055
- function Dn(e) {
3054
+ $e.displayName = je.Root.displayName;
3055
+ function jn(e) {
3056
3056
  return e = e || /* @__PURE__ */ new Map(), {
3057
3057
  /**
3058
3058
  * A Map of event names to registered handler functions.
@@ -3099,57 +3099,57 @@ function Dn(e) {
3099
3099
  }
3100
3100
  };
3101
3101
  }
3102
- const Fe = Dn(), kt = Q.createContext(Fe), On = () => Q.useContext(kt);
3103
- function Mt(e, t) {
3104
- const r = On();
3102
+ const Fe = jn(), Mt = Q.createContext(Fe), Pn = () => Q.useContext(Mt);
3103
+ function It(e, t) {
3104
+ const r = Pn();
3105
3105
  Q.useEffect(() => (t.map((i) => r.on(i, e)), () => {
3106
3106
  t.map((i) => r.off(i, e));
3107
3107
  }), [r, t, e]);
3108
3108
  }
3109
- const Fo = Fe.emit;
3110
- function Wo({ children: e }) {
3111
- return /* @__PURE__ */ n(kt.Provider, { value: Fe, children: e });
3109
+ const Xo = Fe.emit;
3110
+ function Yo({ children: e }) {
3111
+ return /* @__PURE__ */ n(Mt.Provider, { value: Fe, children: e });
3112
3112
  }
3113
- const we = F.Root, We = F.Trigger, jn = F.Portal, It = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3114
- F.Overlay,
3113
+ const we = X.Root, We = X.Trigger, On = X.Portal, Tt = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3114
+ X.Overlay,
3115
3115
  {
3116
3116
  ref: r,
3117
- className: _(
3117
+ className: O(
3118
3118
  "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
3119
  e
3120
3120
  ),
3121
3121
  ...t
3122
3122
  }
3123
3123
  ));
3124
- It.displayName = F.Overlay.displayName;
3125
- const ae = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(jn, { "data-richtext-portal": !0, children: [
3126
- /* @__PURE__ */ n(It, {}),
3127
- /* @__PURE__ */ y(
3128
- F.Content,
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,
3129
3129
  {
3130
3130
  "data-richtext-portal": !0,
3131
3131
  ref: i,
3132
- className: _(
3132
+ className: O(
3133
3133
  "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
3134
  e
3135
3135
  ),
3136
3136
  ...r,
3137
3137
  children: [
3138
3138
  t,
3139
- /* @__PURE__ */ y(F.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(st, { className: "richtext-size-4 richtext-text-accent-foreground" }),
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" }),
3141
3141
  /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3142
3142
  ] })
3143
3143
  ]
3144
3144
  }
3145
3145
  )
3146
3146
  ] }));
3147
- ae.displayName = F.Content.displayName;
3148
- function Pn({ className: e, ...t }) {
3147
+ se.displayName = X.Content.displayName;
3148
+ function _n({ className: e, ...t }) {
3149
3149
  return /* @__PURE__ */ n(
3150
3150
  "div",
3151
3151
  {
3152
- className: _(
3152
+ className: O(
3153
3153
  "richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
3154
3154
  e
3155
3155
  ),
@@ -3157,12 +3157,12 @@ function Pn({ className: e, ...t }) {
3157
3157
  }
3158
3158
  );
3159
3159
  }
3160
- Pn.displayName = "DialogHeader";
3160
+ _n.displayName = "DialogHeader";
3161
3161
  function zt({ className: e, ...t }) {
3162
3162
  return /* @__PURE__ */ n(
3163
3163
  "div",
3164
3164
  {
3165
- className: _(
3165
+ className: O(
3166
3166
  "richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
3167
3167
  e
3168
3168
  ),
@@ -3171,28 +3171,28 @@ function zt({ className: e, ...t }) {
3171
3171
  );
3172
3172
  }
3173
3173
  zt.displayName = "DialogFooter";
3174
- const se = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3175
- F.Title,
3174
+ const le = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3175
+ X.Title,
3176
3176
  {
3177
3177
  ref: r,
3178
- className: _(
3178
+ className: O(
3179
3179
  "richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
3180
3180
  e
3181
3181
  ),
3182
3182
  ...t
3183
3183
  }
3184
3184
  ));
3185
- se.displayName = F.Title.displayName;
3186
- const _n = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3187
- F.Description,
3185
+ le.displayName = X.Title.displayName;
3186
+ const Un = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3187
+ X.Description,
3188
3188
  {
3189
- className: _("richtext-text-sm richtext-text-muted-foreground", e),
3189
+ className: O("richtext-text-sm richtext-text-muted-foreground", e),
3190
3190
  ref: r,
3191
3191
  ...t
3192
3192
  }
3193
3193
  ));
3194
- _n.displayName = F.Description.displayName;
3195
- var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.create({
3194
+ Un.displayName = X.Description.displayName;
3195
+ var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.create({
3196
3196
  name: "image",
3197
3197
  addOptions() {
3198
3198
  return {
@@ -3236,7 +3236,7 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
3236
3236
  ];
3237
3237
  },
3238
3238
  renderHTML({ HTMLAttributes: e }) {
3239
- return ["img", dt(this.options.HTMLAttributes, e)];
3239
+ return ["img", ut(this.options.HTMLAttributes, e)];
3240
3240
  },
3241
3241
  parseMarkdown: (e, t) => t.createNode("image", {
3242
3242
  src: e.href,
@@ -3254,33 +3254,33 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
3254
3254
  const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
3255
3255
  return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
3256
3256
  const c = document.createElement("img");
3257
- Object.entries(l).forEach(([p, u]) => {
3258
- if (u != null)
3257
+ Object.entries(l).forEach(([p, h]) => {
3258
+ if (h != null)
3259
3259
  switch (p) {
3260
3260
  case "width":
3261
3261
  case "height":
3262
3262
  break;
3263
3263
  default:
3264
- c.setAttribute(p, u);
3264
+ c.setAttribute(p, h);
3265
3265
  break;
3266
3266
  }
3267
3267
  }), c.src = l.src;
3268
- const d = new ci({
3268
+ const d = new ui({
3269
3269
  element: c,
3270
3270
  editor: s,
3271
3271
  node: o,
3272
3272
  getPos: a,
3273
- onResize: (p, u) => {
3274
- c.style.width = `${p}px`, c.style.height = `${u}px`;
3273
+ onResize: (p, h) => {
3274
+ c.style.width = `${p}px`, c.style.height = `${h}px`;
3275
3275
  },
3276
- onCommit: (p, u) => {
3277
- const k = a();
3278
- k !== void 0 && this.editor.chain().setNodeSelection(k).updateAttributes(this.name, {
3276
+ onCommit: (p, h) => {
3277
+ const b = a();
3278
+ b !== void 0 && this.editor.chain().setNodeSelection(b).updateAttributes(this.name, {
3279
3279
  width: p,
3280
- height: u
3280
+ height: h
3281
3281
  }).run();
3282
3282
  },
3283
- onUpdate: (p, u, k) => p.type === o.type,
3283
+ onUpdate: (p, h, b) => p.type === o.type,
3284
3284
  options: {
3285
3285
  directions: e,
3286
3286
  min: {
@@ -3305,8 +3305,8 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
3305
3305
  },
3306
3306
  addInputRules() {
3307
3307
  return [
3308
- li({
3309
- find: Un,
3308
+ di({
3309
+ find: Bn,
3310
3310
  type: this.type,
3311
3311
  getAttributes: (e) => {
3312
3312
  const [, , t, r, i] = e;
@@ -3315,285 +3315,407 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
3315
3315
  })
3316
3316
  ];
3317
3317
  }
3318
- }), $n = Bn, Fn = typeof global == "object" && global && global.Object === Object && global, Wn = typeof self == "object" && self && self.Object === Object && self, Tt = Fn || Wn || Function("return this")(), ze = Tt.Symbol, St = Object.prototype, Gn = St.hasOwnProperty, Xn = St.toString, he = ze ? ze.toStringTag : void 0;
3319
- function Yn(e) {
3320
- var t = Gn.call(e, he), r = e[he];
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];
3321
3321
  try {
3322
- e[he] = void 0;
3322
+ e[fe] = void 0;
3323
3323
  var i = !0;
3324
3324
  } catch {
3325
3325
  }
3326
- var o = Xn.call(e);
3327
- return i && (t ? e[he] = r : delete e[he]), o;
3328
- }
3329
- var qn = Object.prototype, Zn = qn.toString;
3330
- function Kn(e) {
3331
- return Zn.call(e);
3326
+ var o = Yn.call(e);
3327
+ return i && (t ? e[fe] = r : delete e[fe]), o;
3332
3328
  }
3333
- var Jn = "[object Null]", Qn = "[object Undefined]", it = ze ? ze.toStringTag : void 0;
3334
- function Nt(e) {
3335
- return e == null ? e === void 0 ? Qn : Jn : it && it in Object(e) ? Yn(e) : Kn(e);
3329
+ var Zn = Object.prototype, Kn = Zn.toString;
3330
+ function Jn(e) {
3331
+ return Kn.call(e);
3336
3332
  }
3333
+ var Qn = "[object Null]", eo = "[object Undefined]", nt = Ie ? Ie.toStringTag : void 0;
3337
3334
  function Lt(e) {
3335
+ return e == null ? e === void 0 ? eo : Qn : nt && nt in Object(e) ? qn(e) : Jn(e);
3336
+ }
3337
+ function Nt(e) {
3338
3338
  return e != null && typeof e == "object";
3339
3339
  }
3340
- var eo = "[object Symbol]";
3341
- function to(e) {
3342
- return typeof e == "symbol" || Lt(e) && Nt(e) == eo;
3340
+ var to = "[object Symbol]";
3341
+ function ro(e) {
3342
+ return typeof e == "symbol" || Nt(e) && Lt(e) == to;
3343
3343
  }
3344
- var ro = /\s/;
3345
- function io(e) {
3346
- for (var t = e.length; t-- && ro.test(e.charAt(t)); )
3344
+ var io = /\s/;
3345
+ function no(e) {
3346
+ for (var t = e.length; t-- && io.test(e.charAt(t)); )
3347
3347
  ;
3348
3348
  return t;
3349
3349
  }
3350
- var no = /^\s+/;
3351
- function oo(e) {
3352
- return e && e.slice(0, io(e) + 1).replace(no, "");
3350
+ var oo = /^\s+/;
3351
+ function ao(e) {
3352
+ return e && e.slice(0, no(e) + 1).replace(oo, "");
3353
3353
  }
3354
3354
  function Te(e) {
3355
3355
  var t = typeof e;
3356
3356
  return e != null && (t == "object" || t == "function");
3357
3357
  }
3358
- var nt = NaN, ao = /^[-+]0x[0-9a-f]+$/i, so = /^0b[01]+$/i, lo = /^0o[0-7]+$/i, co = parseInt;
3358
+ var ot = NaN, so = /^[-+]0x[0-9a-f]+$/i, lo = /^0b[01]+$/i, co = /^0o[0-7]+$/i, uo = parseInt;
3359
3359
  function ge(e) {
3360
3360
  if (typeof e == "number")
3361
3361
  return e;
3362
- if (to(e))
3363
- return nt;
3362
+ if (ro(e))
3363
+ return ot;
3364
3364
  if (Te(e)) {
3365
3365
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
3366
3366
  e = Te(t) ? t + "" : t;
3367
3367
  }
3368
3368
  if (typeof e != "string")
3369
3369
  return e === 0 ? e : +e;
3370
- e = oo(e);
3371
- var r = so.test(e);
3372
- return r || lo.test(e) ? co(e.slice(2), r ? 2 : 8) : ao.test(e) ? nt : +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;
3373
3373
  }
3374
- function uo(e, t, r) {
3374
+ function ho(e, t, r) {
3375
3375
  return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
3376
3376
  }
3377
- function ho(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), uo(ge(e), t, r);
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);
3379
3379
  }
3380
3380
  var De = function() {
3381
- return Tt.Date.now();
3382
- }, fo = "Expected a function", mo = Math.max, go = Math.min;
3383
- function po(e, t, r) {
3384
- var i, o, a, l, s, c, d = 0, g = !1, p = !1, u = !0;
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;
3385
3385
  if (typeof e != "function")
3386
- throw new TypeError(fo);
3387
- t = ge(t) || 0, Te(r) && (g = !!r.leading, p = "maxWait" in r, a = p ? mo(ge(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
3388
- function k(v) {
3389
- var R = i, N = o;
3390
- return i = o = void 0, d = v, l = e.apply(N, R), l;
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;
3391
3391
  }
3392
- function b(v) {
3393
- return d = v, s = setTimeout(x, t), g ? k(v) : l;
3392
+ function f(w) {
3393
+ return d = w, s = setTimeout(y, t), g ? b(w) : l;
3394
3394
  }
3395
- function z(v) {
3396
- var R = v - c, N = v - d, j = t - R;
3397
- return p ? go(j, a - N) : j;
3395
+ function k(w) {
3396
+ var L = w - c, V = w - d, D = t - L;
3397
+ return p ? po(D, a - V) : D;
3398
3398
  }
3399
- function f(v) {
3400
- var R = v - c, N = v - d;
3401
- return c === void 0 || R >= t || R < 0 || p && N >= a;
3399
+ function u(w) {
3400
+ var L = w - c, V = w - d;
3401
+ return c === void 0 || L >= t || L < 0 || p && V >= a;
3402
3402
  }
3403
- function x() {
3404
- var v = De();
3405
- if (f(v))
3406
- return h(v);
3407
- s = setTimeout(x, z(v));
3403
+ function y() {
3404
+ var w = De();
3405
+ if (u(w))
3406
+ return m(w);
3407
+ s = setTimeout(y, k(w));
3408
3408
  }
3409
- function h(v) {
3410
- return s = void 0, u && i ? k(v) : (i = o = void 0, l);
3409
+ function m(w) {
3410
+ return s = void 0, h && i ? b(w) : (i = o = void 0, l);
3411
3411
  }
3412
- function S() {
3412
+ function z() {
3413
3413
  s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
3414
3414
  }
3415
- function m() {
3416
- return s === void 0 ? l : h(De());
3415
+ function v() {
3416
+ return s === void 0 ? l : m(De());
3417
3417
  }
3418
- function H() {
3419
- var v = De(), R = f(v);
3420
- if (i = arguments, o = this, c = v, R) {
3418
+ function A() {
3419
+ var w = De(), L = u(w);
3420
+ if (i = arguments, o = this, c = w, L) {
3421
3421
  if (s === void 0)
3422
- return b(c);
3422
+ return f(c);
3423
3423
  if (p)
3424
- return clearTimeout(s), s = setTimeout(x, t), k(c);
3424
+ return clearTimeout(s), s = setTimeout(y, t), b(c);
3425
3425
  }
3426
- return s === void 0 && (s = setTimeout(x, t)), l;
3426
+ return s === void 0 && (s = setTimeout(y, t)), l;
3427
3427
  }
3428
- return H.cancel = S, H.flush = m, H;
3428
+ return A.cancel = z, A.flush = v, A;
3429
3429
  }
3430
- var xo = "[object Number]";
3431
- function ot(e) {
3432
- return typeof e == "number" || Lt(e) && Nt(e) == xo;
3430
+ var bo = "[object Number]";
3431
+ function at(e) {
3432
+ return typeof e == "number" || Nt(e) && Lt(e) == bo;
3433
3433
  }
3434
- var bo = "Expected a function";
3435
- function at(e, t, r) {
3434
+ var vo = "Expected a function";
3435
+ function st(e, t, r) {
3436
3436
  var i = !0, o = !0;
3437
3437
  if (typeof e != "function")
3438
- throw new TypeError(bo);
3439
- return Te(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), po(e, t, {
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, {
3440
3440
  leading: i,
3441
3441
  maxWait: t,
3442
3442
  trailing: o
3443
3443
  });
3444
3444
  }
3445
- const Ce = {
3445
+ const ye = {
3446
3446
  TOP_LEFT: "tl",
3447
3447
  TOP_RIGHT: "tr",
3448
3448
  BOTTOM_LEFT: "bl",
3449
3449
  BOTTOM_RIGHT: "br"
3450
3450
  };
3451
- function vo(e) {
3452
- var N, j, D;
3451
+ function wo({
3452
+ src: e,
3453
+ style: t
3454
+ }) {
3455
+ return /* @__PURE__ */ C(
3456
+ "div",
3457
+ {
3458
+ style: {
3459
+ position: "relative",
3460
+ display: "inline-block",
3461
+ overflow: "hidden",
3462
+ borderRadius: 8,
3463
+ background: "hsl(var(--muted, 220 14% 96%))",
3464
+ minHeight: 120,
3465
+ minWidth: 180,
3466
+ ...t
3467
+ },
3468
+ children: [
3469
+ e && /* @__PURE__ */ n(
3470
+ "img",
3471
+ {
3472
+ src: e,
3473
+ alt: "",
3474
+ "aria-hidden": !0,
3475
+ style: {
3476
+ display: "block",
3477
+ width: "100%",
3478
+ height: "100%",
3479
+ objectFit: "cover",
3480
+ filter: "blur(20px) saturate(0.5)",
3481
+ transform: "scale(1.1)",
3482
+ opacity: 0.5
3483
+ }
3484
+ }
3485
+ ),
3486
+ /* @__PURE__ */ n(
3487
+ "div",
3488
+ {
3489
+ style: {
3490
+ position: "absolute",
3491
+ inset: 0,
3492
+ background: "linear-gradient(110deg, transparent 30%, hsl(var(--muted-foreground, 220 9% 46%) / 0.08) 50%, transparent 70%)",
3493
+ animation: "richtext-skeleton-shimmer 1.8s ease-in-out infinite"
3494
+ }
3495
+ }
3496
+ ),
3497
+ /* @__PURE__ */ C(
3498
+ "div",
3499
+ {
3500
+ style: {
3501
+ position: "absolute",
3502
+ inset: 0,
3503
+ display: "flex",
3504
+ flexDirection: "column",
3505
+ alignItems: "center",
3506
+ justifyContent: "center",
3507
+ gap: 8,
3508
+ pointerEvents: "none"
3509
+ },
3510
+ children: [
3511
+ /* @__PURE__ */ n(
3512
+ "svg",
3513
+ {
3514
+ width: "28",
3515
+ height: "28",
3516
+ viewBox: "0 0 24 24",
3517
+ fill: "none",
3518
+ stroke: "currentColor",
3519
+ strokeWidth: "2",
3520
+ strokeLinecap: "round",
3521
+ strokeLinejoin: "round",
3522
+ style: {
3523
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
3524
+ animation: "richtext-skeleton-spin 1s linear infinite"
3525
+ },
3526
+ children: /* @__PURE__ */ n("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
3527
+ }
3528
+ ),
3529
+ /* @__PURE__ */ n(
3530
+ "span",
3531
+ {
3532
+ style: {
3533
+ fontSize: 12,
3534
+ fontWeight: 500,
3535
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
3536
+ userSelect: "none"
3537
+ },
3538
+ children: "Uploading…"
3539
+ }
3540
+ )
3541
+ ]
3542
+ }
3543
+ ),
3544
+ /* @__PURE__ */ n("style", { children: `
3545
+ @keyframes richtext-skeleton-shimmer {
3546
+ 0% { transform: translateX(-100%); }
3547
+ 100% { transform: translateX(100%); }
3548
+ }
3549
+ @keyframes richtext-skeleton-spin {
3550
+ from { transform: rotate(0deg); }
3551
+ to { transform: rotate(360deg); }
3552
+ }
3553
+ ` })
3554
+ ]
3555
+ }
3556
+ );
3557
+ }
3558
+ function yo(e) {
3559
+ var D, j, _, T;
3453
3560
  const [t, r] = E({
3454
- width: Ze,
3455
- height: Ze
3561
+ width: Ke,
3562
+ height: Ke
3456
3563
  }), [i, o] = E({
3457
3564
  width: 0,
3458
3565
  height: 0
3459
3566
  }), [a] = E([
3460
- Ce.TOP_LEFT,
3461
- Ce.TOP_RIGHT,
3462
- Ce.BOTTOM_LEFT,
3463
- Ce.BOTTOM_RIGHT
3567
+ ye.TOP_LEFT,
3568
+ ye.TOP_RIGHT,
3569
+ ye.BOTTOM_LEFT,
3570
+ ye.BOTTOM_RIGHT
3464
3571
  ]), [l, s] = E(!1), [c, d] = E({
3465
3572
  x: 0,
3466
3573
  y: 0,
3467
3574
  w: 0,
3468
3575
  h: 0,
3469
3576
  dir: ""
3470
- }), { align: g, inline: p } = (N = e == null ? void 0 : e.node) == null ? void 0 : N.attrs, u = p && (g === "left" || g === "right"), k = B(() => {
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 = $(() => {
3471
3578
  var Xe;
3472
- const { src: I, alt: w, width: C, height: M, flipX: A, flipY: L } = (Xe = e == null ? void 0 : e.node) == null ? void 0 : Xe.attrs, P = ot(C) ? `${C}px` : C, O = ot(M) ? `${M}px` : M, G = [];
3473
- A && G.push("rotateX(180deg)"), L && G.push("rotateY(180deg)");
3474
- const ye = G.join(" ");
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(" ");
3475
3582
  return {
3476
- src: I || void 0,
3477
- alt: w || void 0,
3583
+ src: x || void 0,
3584
+ alt: I || void 0,
3478
3585
  style: {
3479
- width: P || void 0,
3480
- height: O || void 0,
3481
- transform: ye || "none",
3482
- ...u ? { float: g } : {}
3586
+ width: U || void 0,
3587
+ height: F || void 0,
3588
+ transform: Ot || "none",
3589
+ ...b ? { float: g } : {}
3483
3590
  }
3484
3591
  };
3485
- }, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]), b = B(() => {
3592
+ }, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]), k = $(() => {
3486
3593
  const {
3487
- style: { width: I }
3488
- } = k;
3489
- return { width: I === "100%" ? I : void 0 };
3490
- }, [k]);
3491
- function z(I) {
3594
+ style: { width: x }
3595
+ } = f;
3596
+ return { width: x === "100%" ? x : void 0 };
3597
+ }, [f]);
3598
+ function u(x) {
3492
3599
  o({
3493
- width: I.target.width,
3494
- height: I.target.height
3600
+ width: x.target.width,
3601
+ height: x.target.height
3495
3602
  });
3496
3603
  }
3497
- function f() {
3498
- const { editor: I, getPos: w } = e;
3499
- I.commands.setNodeSelection(w());
3604
+ function y() {
3605
+ const { editor: x, getPos: I } = e;
3606
+ x.commands.setNodeSelection(I());
3500
3607
  }
3501
- const x = ce(
3502
- at(() => {
3503
- const { editor: I } = e, { width: w } = getComputedStyle(I.view.dom);
3504
- r((C) => ({
3505
- ...C,
3506
- width: Number.parseInt(w, 10)
3608
+ const m = de(
3609
+ st(() => {
3610
+ const { editor: x } = e, { width: I } = getComputedStyle(x.view.dom);
3611
+ r((R) => ({
3612
+ ...R,
3613
+ width: Number.parseInt(I, 10)
3507
3614
  }));
3508
- }, Ke),
3615
+ }, Je),
3509
3616
  [e == null ? void 0 : e.editor]
3510
3617
  );
3511
- function h(I, w) {
3512
- I.preventDefault(), I.stopPropagation();
3513
- const C = i.width, M = i.height, A = C / M;
3514
- let L = Number(e.node.attrs.width), P = Number(e.node.attrs.height);
3515
- const O = t.width;
3516
- L && !P ? (L = L > O ? O : L, P = Math.round(L / A)) : P && !L ? (L = Math.round(P * A), L = L > O ? O : L) : !L && !P ? (L = C > O ? O : C, P = Math.round(L / A)) : L = L > O ? O : L, s(!0), d({
3517
- x: I.clientX,
3518
- y: I.clientY,
3519
- w: L,
3520
- h: P,
3521
- dir: w
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);
3622
+ 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
3522
3629
  });
3523
3630
  }
3524
- const S = ce(
3525
- at((I) => {
3526
- if (I.preventDefault(), I.stopPropagation(), !l)
3631
+ const v = de(
3632
+ st((x) => {
3633
+ if (x.preventDefault(), x.stopPropagation(), !l)
3527
3634
  return;
3528
- const { x: w, w: C, dir: M } = c, A = (I.clientX - w) * (/l/.test(M) ? -1 : 1), L = ho(C + A, mi, t.width);
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);
3529
3636
  e.updateAttributes({
3530
- width: L,
3637
+ width: S,
3531
3638
  height: null
3532
3639
  });
3533
- }, Ke),
3640
+ }, Je),
3534
3641
  [l, c, t, e.updateAttributes]
3535
- ), m = ce(
3536
- (I) => {
3537
- I.preventDefault(), I.stopPropagation(), l && (d({
3642
+ ), A = de(
3643
+ (x) => {
3644
+ x.preventDefault(), x.stopPropagation(), l && (d({
3538
3645
  x: 0,
3539
3646
  y: 0,
3540
3647
  w: 0,
3541
3648
  h: 0,
3542
3649
  dir: ""
3543
- }), s(!1), f());
3650
+ }), s(!1), y());
3544
3651
  },
3545
- [l, f]
3546
- ), H = ce(() => {
3547
- document == null || document.addEventListener("mousemove", S, !0), document == null || document.addEventListener("mouseup", m, !0);
3548
- }, [S, m]), v = ce(() => {
3549
- document == null || document.removeEventListener("mousemove", S, !0), document == null || document.removeEventListener("mouseup", m, !0);
3550
- }, [S, m]);
3551
- Ie(() => (l ? H() : v(), () => {
3552
- v();
3553
- }), [l, H, v]);
3554
- const R = B(() => new ResizeObserver(() => x()), [x]);
3555
- return Ie(() => (R.observe(e.editor.view.dom), () => {
3556
- R.disconnect();
3557
- }), [e.editor.view.dom, R]), /* @__PURE__ */ n(
3558
- di,
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]);
3661
+ const V = $(() => new ResizeObserver(() => m()), [m]);
3662
+ return Me(() => (V.observe(e.editor.view.dom), () => {
3663
+ V.disconnect();
3664
+ }), [e.editor.view.dom, V]), h ? /* @__PURE__ */ n(
3665
+ Ze,
3666
+ {
3667
+ as: p ? "span" : "div",
3668
+ className: "image-view",
3669
+ style: {
3670
+ float: b ? g : void 0,
3671
+ margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3672
+ display: p ? "inline" : "block",
3673
+ textAlign: b ? void 0 : g,
3674
+ width: ((_ = f.style) == null ? void 0 : _.width) ?? "auto",
3675
+ ...b ? {} : k
3676
+ },
3677
+ children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(wo, { src: f.src, style: f.style }) })
3678
+ }
3679
+ ) : /* @__PURE__ */ n(
3680
+ Ze,
3559
3681
  {
3560
3682
  as: p ? "span" : "div",
3561
3683
  className: "image-view",
3562
3684
  style: {
3563
- float: u ? g : void 0,
3564
- margin: u ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3685
+ float: b ? g : void 0,
3686
+ margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
3565
3687
  display: p ? "inline" : "block",
3566
- textAlign: u ? void 0 : g,
3567
- width: ((D = k.style) == null ? void 0 : D.width) ?? "auto",
3568
- ...u ? {} : b
3688
+ textAlign: b ? void 0 : g,
3689
+ width: ((T = f.style) == null ? void 0 : T.width) ?? "auto",
3690
+ ...b ? {} : k
3569
3691
  },
3570
- children: /* @__PURE__ */ y(
3692
+ children: /* @__PURE__ */ C(
3571
3693
  "div",
3572
3694
  {
3573
3695
  "data-drag-handle": !0,
3574
3696
  draggable: "true",
3575
- style: b,
3697
+ style: k,
3576
3698
  className: `image-view__body ${e != null && e.selected ? "image-view__body--focused" : ""} ${l ? "image-view__body--resizing" : ""}`,
3577
3699
  children: [
3578
3700
  /* @__PURE__ */ n(
3579
3701
  "img",
3580
3702
  {
3581
- alt: k.alt,
3703
+ alt: f.alt,
3582
3704
  className: "image-view__body__image block",
3583
3705
  height: "auto",
3584
- onClick: f,
3585
- onLoad: z,
3586
- src: k.src,
3587
- style: k.style
3706
+ onClick: y,
3707
+ onLoad: u,
3708
+ src: f.src,
3709
+ style: f.style
3588
3710
  }
3589
3711
  ),
3590
- (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((I) => /* @__PURE__ */ n(
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(
3591
3713
  "span",
3592
3714
  {
3593
- className: `image-resizer__handler image-resizer__handler--${I}`,
3594
- onMouseDown: (w) => h(w, I)
3715
+ className: `image-resizer__handler image-resizer__handler--${x}`,
3716
+ onMouseDown: (I) => z(I, x)
3595
3717
  },
3596
- `image-dir-${I}`
3718
+ `image-dir-${x}`
3597
3719
  )) })
3598
3720
  ]
3599
3721
  }
@@ -3601,12 +3723,12 @@ function vo(e) {
3601
3723
  }
3602
3724
  );
3603
3725
  }
3604
- function wo(e) {
3605
- const { editor: t } = ui(), r = U.useMemo(
3726
+ function Co(e) {
3727
+ const { editor: t } = hi(), r = B.useMemo(
3606
3728
  () => t,
3607
3729
  [e, t]
3608
3730
  );
3609
- return hi({
3731
+ return fi({
3610
3732
  editor: r,
3611
3733
  selector(o) {
3612
3734
  return o.editor ? {
@@ -3622,22 +3744,22 @@ function wo(e) {
3622
3744
  }) || { editor: null };
3623
3745
  }
3624
3746
  function ee() {
3625
- return wo().editor;
3747
+ return Co().editor;
3626
3748
  }
3627
- const At = jt(!1);
3628
- function Et() {
3629
- return Pt(At);
3749
+ const Et = _t(!1);
3750
+ function Rt() {
3751
+ return Ut(Et);
3630
3752
  }
3631
- function Go() {
3632
- return _t(At);
3753
+ function qo() {
3754
+ return Bt(Et);
3633
3755
  }
3634
- const Rt = () => !1;
3635
- function Xo(e = Rt) {
3636
- const t = Et(), [r, i] = E(() => {
3756
+ const Vt = () => !1;
3757
+ function Zo(e = Vt) {
3758
+ const t = Rt(), [r, i] = E(() => {
3637
3759
  const s = e();
3638
3760
  return typeof s == "boolean" ? !s : s;
3639
3761
  }), o = ee();
3640
- Ie(() => {
3762
+ Me(() => {
3641
3763
  if (!o || !e) return;
3642
3764
  const s = () => {
3643
3765
  const c = e();
@@ -3647,7 +3769,7 @@ function Xo(e = Rt) {
3647
3769
  o.off("selectionUpdate", s), o.off("transaction", s);
3648
3770
  };
3649
3771
  }, [o, e]);
3650
- const a = B(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = B(() => !t || !o, [t, o]);
3772
+ const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
3651
3773
  return {
3652
3774
  disabled: a,
3653
3775
  // can not action, opacity < 1
@@ -3656,9 +3778,9 @@ function Xo(e = Rt) {
3656
3778
  editorDisabled: l
3657
3779
  };
3658
3780
  }
3659
- function Le(e = Rt) {
3660
- const t = Et(), [r, i] = E({}), [o, a] = E(e()), l = ee();
3661
- Ie(() => {
3781
+ function Ae(e = Vt) {
3782
+ const t = Rt(), [r, i] = E({}), [o, a] = E(e()), l = ee();
3783
+ Me(() => {
3662
3784
  if (!l || !e) return;
3663
3785
  const d = () => {
3664
3786
  a(e());
@@ -3667,7 +3789,7 @@ function Le(e = Rt) {
3667
3789
  l.off("selectionUpdate", d);
3668
3790
  };
3669
3791
  }, [r, l, e]);
3670
- const s = B(() => !t || !l, [t, l]), c = B(() => !t || !l, [t, l]);
3792
+ const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
3671
3793
  return {
3672
3794
  disabled: s,
3673
3795
  // can not action, opacity < 1
@@ -3678,44 +3800,44 @@ function Le(e = Rt) {
3678
3800
  // force update
3679
3801
  };
3680
3802
  }
3681
- function le(e) {
3803
+ function ce(e) {
3682
3804
  const t = ee();
3683
- return B(() => t ? t.extensionManager.extensions.find(
3805
+ return $(() => t ? t.extensionManager.extensions.find(
3684
3806
  (i) => i.name === e
3685
3807
  ) : null, [t, e]);
3686
3808
  }
3687
- function Yo(e, t, r) {
3809
+ function Ko(e, t, r) {
3688
3810
  return e < t ? t : e > r ? r : e;
3689
3811
  }
3690
- const yo = (e) => typeof e == "number", Co = (e) => typeof e == "string", ko = (e) => typeof e == "function";
3691
- function Mo(e, t = "px") {
3812
+ const ko = (e) => typeof e == "number", Mo = (e) => typeof e == "string", Io = (e) => typeof e == "function";
3813
+ function To(e, t = "px") {
3692
3814
  if (!e) return e;
3693
- const r = yo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3815
+ const r = ko(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3694
3816
  return Number.isNaN(i) ? e : i + a;
3695
3817
  }
3696
- function qo(e, t) {
3818
+ function Jo(e, t) {
3697
3819
  if (!e)
3698
3820
  return !1;
3699
3821
  const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3700
3822
  return !!r.find((o) => o.name === t);
3701
3823
  }
3702
- function Zo(e) {
3703
- return e.map((t) => Co(t) ? { value: t, name: t } : t);
3824
+ function Qo(e) {
3825
+ return e.map((t) => Mo(t) ? { value: t, name: t } : t);
3704
3826
  }
3705
- function Vt(e) {
3706
- const t = ee(), r = le(e), { t: i } = ne();
3707
- return B(() => {
3827
+ function Ht(e) {
3828
+ const t = ee(), r = ce(e), { t: i } = oe();
3829
+ return $(() => {
3708
3830
  if (!t || !r || !i)
3709
3831
  return null;
3710
3832
  const { button: o } = r.options;
3711
- return !o || !ko(o) ? null : o({
3833
+ return !o || !Io(o) ? null : o({
3712
3834
  editor: t,
3713
3835
  extension: r,
3714
3836
  t: i
3715
3837
  });
3716
3838
  }, [t, r, i]);
3717
3839
  }
3718
- function Io(e, t) {
3840
+ function zo(e, t) {
3719
3841
  const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
3720
3842
  if (!o) return !1;
3721
3843
  const l = r || {
@@ -3741,7 +3863,7 @@ function Io(e, t) {
3741
3863
  function Ge(e, t) {
3742
3864
  const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
3743
3865
  return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
3744
- if (!Io(c, r)) {
3866
+ if (!zo(c, r)) {
3745
3867
  t.onError ? t.onError({
3746
3868
  type: "type",
3747
3869
  message: o("editor.upload.fileTypeNotSupported", {
@@ -3777,72 +3899,55 @@ function Ge(e, t) {
3777
3899
  l.push(c);
3778
3900
  }), l;
3779
3901
  }
3780
- function Ko() {
3781
- const { t: e } = ne(), { toast: t } = Be(), r = ee(), i = Vt(Se.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Le(), [s, c] = E(!1), [d, g] = E(!1), p = le(Se.name), [u, k] = E(""), [b, z] = E(""), f = xe(null), x = (p == null ? void 0 : p.options.defaultInline) || !1, [h, S] = E(x), m = B(() => p == null ? void 0 : p.options, [p]);
3782
- async function H(N) {
3783
- var I;
3784
- const j = (I = N == null ? void 0 : N.target) == null ? void 0 : I.files;
3785
- if (!r || r.isDestroyed || j.length === 0 || d) {
3786
- N.target.value = "";
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 = "";
3787
3909
  return;
3788
3910
  }
3789
- const D = Ge(j, {
3911
+ const V = Ge(L, {
3790
3912
  acceptMimes: m == null ? void 0 : m.acceptMimes,
3791
3913
  maxSize: m == null ? void 0 : m.maxSize,
3792
3914
  t: e,
3793
3915
  toast: t,
3794
3916
  onError: m.onError
3795
3917
  });
3796
- if (D.length <= 0) {
3797
- N.target.value = "";
3918
+ if (V.length <= 0) {
3919
+ w.target.value = "";
3798
3920
  return;
3799
3921
  }
3800
- g(!0);
3801
- try {
3802
- if (m != null && m.multiple) {
3803
- const w = D.map(async (M) => {
3804
- if (m.upload) {
3805
- const A = await m.upload(M);
3806
- return { imageId: A.imageId, src: A.cdnUrl };
3807
- } else
3808
- return { imageId: void 0, src: URL.createObjectURL(M) };
3809
- });
3810
- (await Promise.all(w)).forEach(({ imageId: M, src: A }) => {
3811
- r.chain().focus().setImageInline({ imageId: M, src: A, inline: h, alt: b }).run();
3812
- });
3813
- } else {
3814
- const w = D[0];
3815
- let C, M = "";
3816
- if (m.upload) {
3817
- const A = await m.upload(w);
3818
- C = A.imageId, M = A.cdnUrl;
3819
- } else
3820
- M = URL.createObjectURL(w);
3821
- r.chain().focus().setImageInline({ imageId: C, src: M, inline: h, alt: b }).run();
3922
+ 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)
3927
+ r.chain().focus().insertImagePlaceholder({
3928
+ file: x,
3929
+ inline: j,
3930
+ alt: D
3931
+ }).run();
3932
+ } 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();
3822
3937
  }
3823
- c(!1), z(""), S(x);
3824
- } catch (w) {
3825
- console.error("Error uploading image", w), m.onError ? m.onError({
3826
- type: "upload",
3827
- message: e("editor.upload.error")
3828
- }) : t({
3829
- variant: "destructive",
3830
- title: e("editor.upload.error")
3831
- });
3832
- } finally {
3833
- g(!1), N.target.value = "";
3834
3938
  }
3939
+ w.target.value = "";
3835
3940
  }
3836
- function v(N) {
3837
- N.preventDefault(), N.stopPropagation(), r.chain().focus().setImageInline({ src: u, inline: h, alt: b }).run(), c(!1), S(x), k(""), z("");
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("");
3838
3943
  }
3839
- function R(N) {
3840
- var j;
3841
- N.preventDefault(), (j = f.current) == null || j.click();
3944
+ function A(w) {
3945
+ var L;
3946
+ w.preventDefault(), (L = f.current) == null || L.click();
3842
3947
  }
3843
- return i ? /* @__PURE__ */ y(we, { onOpenChange: c, open: s, children: [
3948
+ return i ? /* @__PURE__ */ C(we, { onOpenChange: c, open: s, children: [
3844
3949
  /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
3845
- vt,
3950
+ wt,
3846
3951
  {
3847
3952
  disabled: l,
3848
3953
  icon: o,
@@ -3852,72 +3957,62 @@ function Ko() {
3852
3957
  }
3853
3958
  }
3854
3959
  ) }),
3855
- /* @__PURE__ */ y(ae, { children: [
3856
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
3857
- /* @__PURE__ */ y(
3858
- Ne,
3960
+ /* @__PURE__ */ C(se, { children: [
3961
+ /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
3962
+ /* @__PURE__ */ C(
3963
+ Se,
3859
3964
  {
3860
3965
  activationMode: "manual",
3861
3966
  defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
3862
3967
  children: [
3863
- m.resourceImage === "both" && /* @__PURE__ */ y(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3968
+ m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3864
3969
  /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3865
3970
  /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
3866
3971
  ] }),
3867
- /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3972
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3868
3973
  /* @__PURE__ */ n(
3869
3974
  $e,
3870
3975
  {
3871
- checked: h,
3872
- onCheckedChange: (N) => {
3873
- S(N);
3976
+ checked: u,
3977
+ onCheckedChange: (w) => {
3978
+ y(w);
3874
3979
  }
3875
3980
  }
3876
3981
  ),
3877
3982
  /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
3878
3983
  ] }),
3879
- m.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
3984
+ m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
3880
3985
  /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
3881
3986
  /* @__PURE__ */ n(
3882
- te,
3987
+ re,
3883
3988
  {
3884
- onChange: (N) => z(N.target.value),
3989
+ onChange: (w) => b(w.target.value),
3885
3990
  required: !0,
3886
3991
  type: "text",
3887
- value: b
3992
+ value: h
3888
3993
  }
3889
3994
  )
3890
3995
  ] }),
3891
- /* @__PURE__ */ y(Z, { value: "upload", children: [
3892
- /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3996
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
3997
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3893
3998
  /* @__PURE__ */ n(
3894
- $,
3999
+ G,
3895
4000
  {
3896
4001
  className: "richtext-mt-1 richtext-w-full",
3897
- disabled: d,
3898
- onClick: R,
4002
+ onClick: A,
3899
4003
  size: "sm",
3900
- children: d ? /* @__PURE__ */ y(Y, { children: [
3901
- e("editor.imageUpload.uploading"),
3902
- /* @__PURE__ */ n(
3903
- fe,
3904
- {
3905
- className: "richtext-ml-1 richtext-animate-spin",
3906
- name: "Loader"
3907
- }
3908
- )
3909
- ] }) : e("editor.image.dialog.tab.upload")
4004
+ children: e("editor.image.dialog.tab.upload")
3910
4005
  }
3911
4006
  ),
3912
4007
  /* @__PURE__ */ n(
3913
- Ht,
4008
+ Dt,
3914
4009
  {
3915
- alt: b,
3916
- disabled: d,
4010
+ alt: h,
4011
+ disabled: !1,
3917
4012
  editor: r,
3918
- imageInline: h,
4013
+ imageInline: u,
3919
4014
  onClose: () => {
3920
- z("");
4015
+ b("");
3921
4016
  }
3922
4017
  }
3923
4018
  )
@@ -3927,34 +4022,34 @@ function Ko() {
3927
4022
  {
3928
4023
  accept: m.acceptMimes.join(",") || "image/*",
3929
4024
  multiple: m.multiple,
3930
- onChange: H,
4025
+ onChange: z,
3931
4026
  ref: f,
3932
4027
  style: { display: "none" },
3933
4028
  type: "file"
3934
4029
  }
3935
4030
  )
3936
4031
  ] }),
3937
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
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: [
3938
4033
  /* @__PURE__ */ n(
3939
- te,
4034
+ re,
3940
4035
  {
3941
4036
  autoFocus: !0,
3942
- onChange: (N) => k(N.target.value),
4037
+ onChange: (w) => p(w.target.value),
3943
4038
  placeholder: e("editor.image.dialog.placeholder"),
3944
4039
  required: !0,
3945
4040
  type: "url",
3946
- value: u
4041
+ value: g
3947
4042
  }
3948
4043
  ),
3949
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
4044
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
3950
4045
  ] }) }) })
3951
4046
  ]
3952
4047
  }
3953
4048
  )
3954
4049
  ] })
3955
- ] }) : /* @__PURE__ */ n(Y, {});
4050
+ ] }) : /* @__PURE__ */ n(te, {});
3956
4051
  }
3957
- const zo = {
4052
+ const So = {
3958
4053
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
3959
4054
  maxSize: 1024 * 1024 * 5,
3960
4055
  // 5MB
@@ -3962,7 +4057,7 @@ const zo = {
3962
4057
  resourceImage: "both",
3963
4058
  defaultInline: !1,
3964
4059
  enableAlt: !0
3965
- }, Se = /* @__PURE__ */ $n.extend({
4060
+ }, ze = /* @__PURE__ */ Fn.extend({
3966
4061
  group: "inline",
3967
4062
  inline: !0,
3968
4063
  defining: !0,
@@ -3971,7 +4066,7 @@ const zo = {
3971
4066
  addOptions() {
3972
4067
  var e;
3973
4068
  return {
3974
- ...zo,
4069
+ ...So,
3975
4070
  ...(e = this.parent) == null ? void 0 : e.call(this),
3976
4071
  upload: () => Promise.reject("Image Upload Function"),
3977
4072
  button: ({
@@ -3997,6 +4092,12 @@ const zo = {
3997
4092
  var e;
3998
4093
  return {
3999
4094
  ...(e = this.parent) == null ? void 0 : e.call(this),
4095
+ uploading: {
4096
+ default: !1,
4097
+ // Transient attribute — never written to or read from HTML
4098
+ parseHTML: () => !1,
4099
+ renderHTML: () => ({})
4100
+ },
4000
4101
  imageId: {
4001
4102
  default: null,
4002
4103
  parseHTML: (t) => t.getAttribute("data-image-id"),
@@ -4042,22 +4143,73 @@ const zo = {
4042
4143
  };
4043
4144
  },
4044
4145
  addNodeView() {
4045
- return fi(vo);
4146
+ return mi(yo);
4046
4147
  },
4047
4148
  addCommands() {
4048
- var e;
4149
+ var r;
4150
+ const e = this.name, t = this.options;
4049
4151
  return {
4050
- ...(e = this.parent) == null ? void 0 : e.call(this),
4051
- setImageInline: (t) => ({ commands: r }) => r.insertContent({
4052
- type: this.name,
4152
+ ...(r = this.parent) == null ? void 0 : r.call(this),
4153
+ setImageInline: (i) => ({ commands: o }) => o.insertContent({
4154
+ type: e,
4053
4155
  attrs: {
4054
- ...t,
4055
- imageId: t.imageId ?? null,
4056
- inline: t.inline ?? this.options.defaultInline
4156
+ ...i,
4157
+ imageId: i.imageId ?? null,
4158
+ inline: i.inline ?? t.defaultInline
4057
4159
  }
4058
4160
  }),
4059
- updateImage: (t) => ({ commands: r }) => r.updateAttributes(this.name, t),
4060
- setAlignImage: (t) => ({ commands: r }) => r.updateAttributes(this.name, { align: t })
4161
+ insertImagePlaceholder: ({
4162
+ file: i,
4163
+ inline: o,
4164
+ alt: a
4165
+ }) => ({ editor: l, commands: s }) => {
4166
+ const c = URL.createObjectURL(i);
4167
+ if (!s.insertContent({
4168
+ type: e,
4169
+ attrs: {
4170
+ src: c,
4171
+ alt: a ?? "",
4172
+ inline: o ?? t.defaultInline,
4173
+ uploading: !0,
4174
+ imageId: null
4175
+ }
4176
+ })) return !1;
4177
+ const g = t.upload;
4178
+ return g && g(i).then((p) => {
4179
+ const { doc: h } = l.state;
4180
+ let b = null;
4181
+ h.descendants((f, k) => {
4182
+ if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
4183
+ return b = k, !1;
4184
+ }), b !== null && l.view.dispatch(
4185
+ l.state.tr.setNodeMarkup(b, void 0, {
4186
+ ...l.state.doc.nodeAt(b).attrs,
4187
+ src: p.cdnUrl,
4188
+ imageId: p.imageId,
4189
+ uploading: !1
4190
+ })
4191
+ ), URL.revokeObjectURL(c);
4192
+ }).catch((p) => {
4193
+ console.error("Image upload failed", p);
4194
+ const { doc: h } = l.state;
4195
+ let b = null;
4196
+ if (h.descendants((f, k) => {
4197
+ if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
4198
+ return b = k, !1;
4199
+ }), b !== null) {
4200
+ const f = l.state.doc.nodeAt(b);
4201
+ f && l.view.dispatch(
4202
+ l.state.tr.delete(
4203
+ b,
4204
+ b + f.nodeSize
4205
+ )
4206
+ );
4207
+ }
4208
+ URL.revokeObjectURL(c);
4209
+ }), !0;
4210
+ },
4211
+ updateImage: (i) => ({ commands: o }) => o.updateAttributes(this.name, i),
4212
+ setAlignImage: (i) => ({ commands: o }) => o.updateAttributes(this.name, { align: i })
4061
4213
  };
4062
4214
  },
4063
4215
  renderHTML({ HTMLAttributes: e }) {
@@ -4070,7 +4222,7 @@ const zo = {
4070
4222
  },
4071
4223
  [
4072
4224
  "img",
4073
- dt(
4225
+ ut(
4074
4226
  {
4075
4227
  height: "auto",
4076
4228
  style: g
@@ -4177,19 +4329,19 @@ const zo = {
4177
4329
  // ];
4178
4330
  // },
4179
4331
  });
4180
- function Jo(e) {
4332
+ function ta(e) {
4181
4333
  return e.replace(/^.*\/|\..+$/g, "");
4182
4334
  }
4183
- function Qo(e) {
4335
+ function ra(e) {
4184
4336
  return e.split(".").pop();
4185
4337
  }
4186
- function ea(e) {
4338
+ function ia(e) {
4187
4339
  return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
4188
4340
  }
4189
- function ta(e) {
4341
+ function na(e) {
4190
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";
4191
4343
  }
4192
- function To(e) {
4344
+ function Ao(e) {
4193
4345
  return new Promise((t) => {
4194
4346
  const r = new FileReader();
4195
4347
  r.addEventListener(
@@ -4204,7 +4356,7 @@ function To(e) {
4204
4356
  ), r.readAsDataURL(e);
4205
4357
  });
4206
4358
  }
4207
- function So(e, t) {
4359
+ function Lo(e, t) {
4208
4360
  const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
4209
4361
  let a = o.length;
4210
4362
  const l = new Uint8Array(a);
@@ -4212,146 +4364,170 @@ function So(e, t) {
4212
4364
  l[a] = o.charCodeAt(a);
4213
4365
  return new File([l], t, { type: i });
4214
4366
  }
4215
- function Ht({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4216
- var I, w;
4217
- const { t: a } = ne(), { toast: l } = Be(), [s, c] = E(!1), [d, g] = E(!1), p = Q.useRef(null), [u, k] = Q.useState(), [b, z] = Q.useState(""), f = xe(null), [x, h] = E({
4367
+ function Dt({
4368
+ editor: e,
4369
+ imageInline: t,
4370
+ onClose: r,
4371
+ disabled: i,
4372
+ alt: o
4373
+ }) {
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({
4218
4376
  src: "",
4219
4377
  file: null
4220
- }), S = le(Se.name), m = B(() => (S == null ? void 0 : S.options) ?? {}, [S]);
4221
- function H(C) {
4222
- if (p.current && C.width && C.height) {
4223
- const M = v(p.current, C);
4224
- z(M);
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);
4225
4383
  }
4226
4384
  }
4227
- function v(C, M) {
4228
- const A = document.createElement("canvas"), L = C.naturalWidth / C.width, P = C.naturalHeight / C.height;
4229
- A.width = M.width * L, A.height = M.height * P;
4230
- const O = A.getContext("2d");
4231
- return O && (O.imageSmoothingEnabled = !1, O.drawImage(
4232
- C,
4233
- M.x * L,
4234
- M.y * P,
4235
- M.width * L,
4236
- M.height * P,
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,
4237
4395
  0,
4238
4396
  0,
4239
- M.width * L,
4240
- M.height * P
4241
- )), A.toDataURL("image/png", 1);
4397
+ I.width * H,
4398
+ I.height * P
4399
+ )), R.toDataURL("image/png", 1);
4242
4400
  }
4243
- const R = Q.useCallback(async () => {
4244
- var C;
4245
- if (!d) {
4246
- g(!0);
4247
- try {
4248
- const M = So(b, ((C = x == null ? void 0 : x.file) == null ? void 0 : C.name) || "image.png");
4249
- let A = "";
4250
- m.upload ? A = await m.upload(M) : A = URL.createObjectURL(M), e.chain().focus().setImageInline({ src: A, inline: t, alt: o }).run(), c(!1), h({
4251
- src: "",
4252
- file: null
4253
- }), D(), r();
4254
- } catch (M) {
4255
- console.error("Error cropping image", M);
4256
- } finally {
4257
- g(!1);
4258
- }
4401
+ const L = Q.useCallback(() => {
4402
+ var I;
4403
+ if (d) return;
4404
+ const x = Lo(
4405
+ f,
4406
+ ((I = y == null ? void 0 : y.file) == null ? void 0 : I.name) || "image.png"
4407
+ );
4408
+ if (c(!1), m({
4409
+ src: "",
4410
+ file: null
4411
+ }), j(), r(), v.upload)
4412
+ e.chain().focus().insertImagePlaceholder({
4413
+ file: x,
4414
+ inline: t,
4415
+ alt: o
4416
+ }).run();
4417
+ else {
4418
+ const R = URL.createObjectURL(x);
4419
+ e.chain().focus().setImageInline({ src: R, inline: t, alt: o }).run();
4259
4420
  }
4260
4421
  }, [
4261
- b,
4422
+ f,
4262
4423
  e,
4263
4424
  t,
4264
4425
  d,
4265
4426
  r,
4266
- (I = x == null ? void 0 : x.file) == null ? void 0 : I.name,
4267
- m
4427
+ (_ = y == null ? void 0 : y.file) == null ? void 0 : _.name,
4428
+ v,
4429
+ o
4268
4430
  ]);
4269
- function N(C) {
4270
- var M;
4271
- C.preventDefault(), (M = f.current) == null || M.click();
4431
+ function V(x) {
4432
+ var I;
4433
+ x.preventDefault(), (I = u.current) == null || I.click();
4272
4434
  }
4273
- const j = async (C) => {
4274
- var O;
4275
- const M = (O = C == null ? void 0 : C.target) == null ? void 0 : O.files;
4276
- if (!e || e.isDestroyed || M.length === 0) {
4277
- C.target.value = "";
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 = "";
4278
4440
  return;
4279
4441
  }
4280
- const A = Ge(M, {
4281
- acceptMimes: m == null ? void 0 : m.acceptMimes,
4282
- maxSize: m == null ? void 0 : m.maxSize,
4442
+ const R = Ge(I, {
4443
+ acceptMimes: v == null ? void 0 : v.acceptMimes,
4444
+ maxSize: v == null ? void 0 : v.maxSize,
4283
4445
  t: a,
4284
4446
  toast: l,
4285
- onError: m.onError
4447
+ onError: v.onError
4286
4448
  });
4287
- if (A.length <= 0) {
4288
- C.target.value = "";
4449
+ if (R.length <= 0) {
4450
+ x.target.value = "";
4289
4451
  return;
4290
4452
  }
4291
- const L = A[0], P = await To(L);
4292
- c(!0), h({
4453
+ const H = R[0], P = await Ao(H);
4454
+ c(!0), m({
4293
4455
  src: P.src,
4294
- file: L
4456
+ file: H
4295
4457
  });
4296
- }, D = () => {
4297
- f.current && (f.current.value = "");
4458
+ }, j = () => {
4459
+ u.current && (u.current.value = "");
4298
4460
  };
4299
- return /* @__PURE__ */ y(Y, { children: [
4461
+ return /* @__PURE__ */ C(te, { children: [
4300
4462
  /* @__PURE__ */ n(
4301
- $,
4463
+ G,
4302
4464
  {
4303
4465
  className: "richtext-mt-1 richtext-w-full",
4304
4466
  disabled: i,
4305
- onClick: N,
4467
+ onClick: V,
4306
4468
  size: "sm",
4307
4469
  children: a("editor.image.dialog.tab.uploadCrop")
4308
4470
  }
4309
4471
  ),
4310
- /* @__PURE__ */ y(
4472
+ /* @__PURE__ */ C(
4311
4473
  we,
4312
4474
  {
4313
4475
  open: s,
4314
- onOpenChange: (C) => {
4315
- c(C), C || (h({ src: "", file: null }), D());
4476
+ onOpenChange: (x) => {
4477
+ c(x), x || (m({ src: "", file: null }), j());
4316
4478
  },
4317
4479
  children: [
4318
4480
  /* @__PURE__ */ n(We, {}),
4319
- /* @__PURE__ */ y(ae, { children: [
4320
- /* @__PURE__ */ n(se, { children: a("editor.image.dialog.tab.uploadCrop") }),
4321
- /* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
4322
- wi,
4481
+ /* @__PURE__ */ C(se, { children: [
4482
+ /* @__PURE__ */ n(le, { children: a("editor.image.dialog.tab.uploadCrop") }),
4483
+ /* @__PURE__ */ n("div", { children: y.src && /* @__PURE__ */ n(
4484
+ yi,
4323
4485
  {
4324
4486
  className: "richtext-w-full",
4325
- crop: u,
4326
- onChange: (C) => k(C),
4327
- onComplete: (C) => H(C),
4328
- children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: x.src })
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 })
4329
4491
  }
4330
4492
  ) }),
4331
- /* @__PURE__ */ y(zt, { children: [
4332
- /* @__PURE__ */ y(
4333
- $,
4493
+ /* @__PURE__ */ C(zt, { children: [
4494
+ /* @__PURE__ */ C(
4495
+ G,
4334
4496
  {
4335
4497
  disabled: d,
4336
4498
  onClick: () => {
4337
- c(!1), h({
4499
+ c(!1), m({
4338
4500
  src: "",
4339
4501
  file: null
4340
- }), D();
4502
+ }), j();
4341
4503
  },
4342
4504
  children: [
4343
4505
  a("editor.imageUpload.cancel"),
4344
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Trash2" })
4506
+ /* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Trash2" })
4345
4507
  ]
4346
4508
  }
4347
4509
  ),
4348
- /* @__PURE__ */ n($, { className: "richtext-w-fit", disabled: d || !u, onClick: R, children: d ? /* @__PURE__ */ y(Y, { children: [
4349
- a("editor.imageUpload.uploading"),
4350
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4351
- ] }) : /* @__PURE__ */ y(Y, { children: [
4352
- a("editor.imageUpload.crop"),
4353
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Crop" })
4354
- ] }) })
4510
+ /* @__PURE__ */ n(
4511
+ G,
4512
+ {
4513
+ className: "richtext-w-fit",
4514
+ disabled: d || !h,
4515
+ onClick: L,
4516
+ children: d ? /* @__PURE__ */ C(te, { children: [
4517
+ a("editor.imageUpload.uploading"),
4518
+ /* @__PURE__ */ n(
4519
+ Re,
4520
+ {
4521
+ className: "richtext-ml-1 richtext-animate-spin",
4522
+ name: "Loader"
4523
+ }
4524
+ )
4525
+ ] }) : /* @__PURE__ */ C(te, { children: [
4526
+ a("editor.imageUpload.crop"),
4527
+ /* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Crop" })
4528
+ ] })
4529
+ }
4530
+ )
4355
4531
  ] })
4356
4532
  ] })
4357
4533
  ]
@@ -4360,130 +4536,125 @@ function Ht({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4360
4536
  /* @__PURE__ */ n(
4361
4537
  "input",
4362
4538
  {
4363
- accept: ((w = m == null ? void 0 : m.acceptMimes) == null ? void 0 : w.join(",")) || "image/*",
4539
+ accept: ((T = v == null ? void 0 : v.acceptMimes) == null ? void 0 : T.join(",")) || "image/*",
4364
4540
  multiple: !1,
4365
- onChange: j,
4366
- ref: f,
4541
+ onChange: D,
4542
+ ref: u,
4367
4543
  style: { display: "none" },
4368
4544
  type: "file"
4369
4545
  }
4370
4546
  )
4371
4547
  ] });
4372
4548
  }
4373
- const Dt = {
4549
+ const jt = {
4374
4550
  UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
4375
4551
  UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
4376
4552
  EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
4377
4553
  };
4378
4554
  function No() {
4379
- const { t: e } = ne(), { toast: t } = Be(), r = ee(), { editorDisabled: i } = Le(), [o, a] = E(!1), l = Dt.UPLOAD_IMAGE(r.id);
4380
- Mt(a, [l]);
4381
- const [s, c] = E(!1), d = le(Se.name), [g, p] = E(""), [u, k] = E(""), b = xe(null), z = (d == null ? void 0 : d.options.defaultInline) || !1, [f, x] = E(z), h = B(() => d == null ? void 0 : d.options, [d]);
4382
- async function S(v) {
4383
- var j;
4384
- const R = (j = v == null ? void 0 : v.target) == null ? void 0 : j.files;
4385
- if (!r || r.isDestroyed || R.length === 0 || s) {
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) {
4386
4562
  v.target.value = "";
4387
4563
  return;
4388
4564
  }
4389
- const N = Ge(R, {
4390
- acceptMimes: h == null ? void 0 : h.acceptMimes,
4391
- maxSize: h == null ? void 0 : h.maxSize,
4565
+ const w = Ge(A, {
4566
+ acceptMimes: u == null ? void 0 : u.acceptMimes,
4567
+ maxSize: u == null ? void 0 : u.maxSize,
4392
4568
  t: e,
4393
4569
  toast: t,
4394
- onError: h.onError
4570
+ onError: u.onError
4395
4571
  });
4396
- if (N.length <= 0) {
4572
+ if (w.length <= 0) {
4397
4573
  v.target.value = "";
4398
4574
  return;
4399
4575
  }
4400
- c(!0);
4401
- try {
4402
- if (h != null && h.multiple) {
4403
- const D = N.map(async (w) => {
4404
- let C = "";
4405
- return h.upload ? C = await h.upload(w) : C = URL.createObjectURL(w), C;
4406
- });
4407
- (await Promise.all(D)).forEach((w) => {
4408
- r.chain().focus().setImageInline({ src: w, inline: f, alt: u }).run();
4409
- });
4410
- } else {
4411
- const D = N[0];
4412
- let I = "";
4413
- h.upload ? I = await h.upload(D) : I = URL.createObjectURL(D), r.chain().focus().setImageInline({ src: I, inline: f, alt: u }).run();
4576
+ 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)
4581
+ r.chain().focus().insertImagePlaceholder({
4582
+ file: _,
4583
+ inline: V,
4584
+ alt: L
4585
+ }).run();
4586
+ } 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();
4414
4591
  }
4415
- a(!1), k(""), x(z);
4416
- } catch (D) {
4417
- console.error("Error uploading image", D), h.onError ? h.onError({
4418
- type: "upload",
4419
- message: e("editor.upload.error")
4420
- }) : t({
4421
- variant: "destructive",
4422
- title: e("editor.upload.error")
4423
- });
4424
- } finally {
4425
- c(!1), v.target.value = "";
4426
4592
  }
4593
+ v.target.value = "";
4427
4594
  }
4428
4595
  function m(v) {
4429
- v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: g, inline: f, alt: u }).run(), a(!1), x(z), p(""), k("");
4596
+ v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: f, alt: g }).run(), a(!1), k(b), d(""), p("");
4430
4597
  }
4431
- function H(v) {
4432
- var R;
4433
- v.preventDefault(), (R = b.current) == null || R.click();
4598
+ function z(v) {
4599
+ var A;
4600
+ v.preventDefault(), (A = h.current) == null || A.click();
4434
4601
  }
4435
- return i ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(ae, { children: [
4436
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
4437
- /* @__PURE__ */ y(
4438
- Ne,
4602
+ return i ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ C(se, { children: [
4603
+ /* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
4604
+ /* @__PURE__ */ C(
4605
+ Se,
4439
4606
  {
4440
4607
  activationMode: "manual",
4441
- defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
4608
+ defaultValue: u.resourceImage === "both" || u.resourceImage === "upload" ? "upload" : "link",
4442
4609
  children: [
4443
- h.resourceImage === "both" && /* @__PURE__ */ y(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4610
+ u.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4444
4611
  /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4445
4612
  /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4446
4613
  ] }),
4447
- /* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4614
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4448
4615
  /* @__PURE__ */ n(
4449
4616
  $e,
4450
4617
  {
4451
4618
  checked: f,
4452
4619
  onCheckedChange: (v) => {
4453
- x(v);
4620
+ k(v);
4454
4621
  }
4455
4622
  }
4456
4623
  ),
4457
4624
  /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4458
4625
  ] }),
4459
- h.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
4626
+ u.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4460
4627
  /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4461
- /* @__PURE__ */ n(te, { onChange: (v) => k(v.target.value), required: !0, type: "text", value: u })
4628
+ /* @__PURE__ */ n(
4629
+ re,
4630
+ {
4631
+ onChange: (v) => p(v.target.value),
4632
+ required: !0,
4633
+ type: "text",
4634
+ value: g
4635
+ }
4636
+ )
4462
4637
  ] }),
4463
- /* @__PURE__ */ y(Z, { value: "upload", children: [
4464
- /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4638
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
4639
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4465
4640
  /* @__PURE__ */ n(
4466
- $,
4641
+ G,
4467
4642
  {
4468
4643
  className: "richtext-mt-1 richtext-w-full",
4469
- disabled: s,
4470
- onClick: H,
4644
+ onClick: z,
4471
4645
  size: "sm",
4472
- children: s ? /* @__PURE__ */ y(Y, { children: [
4473
- e("editor.imageUpload.uploading"),
4474
- /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4475
- ] }) : e("editor.image.dialog.tab.upload")
4646
+ children: e("editor.image.dialog.tab.upload")
4476
4647
  }
4477
4648
  ),
4478
4649
  /* @__PURE__ */ n(
4479
- Ht,
4650
+ Dt,
4480
4651
  {
4481
- alt: u,
4482
- disabled: s,
4652
+ alt: g,
4653
+ disabled: !1,
4483
4654
  editor: r,
4484
4655
  imageInline: f,
4485
4656
  onClose: () => {
4486
- k("");
4657
+ p("");
4487
4658
  }
4488
4659
  }
4489
4660
  )
@@ -4491,35 +4662,35 @@ function No() {
4491
4662
  /* @__PURE__ */ n(
4492
4663
  "input",
4493
4664
  {
4494
- accept: h.acceptMimes.join(",") || "image/*",
4495
- multiple: h.multiple,
4496
- onChange: S,
4497
- ref: b,
4665
+ accept: u.acceptMimes.join(",") || "image/*",
4666
+ multiple: u.multiple,
4667
+ onChange: y,
4668
+ ref: h,
4498
4669
  style: { display: "none" },
4499
4670
  type: "file"
4500
4671
  }
4501
4672
  )
4502
4673
  ] }),
4503
- /* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
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: [
4504
4675
  /* @__PURE__ */ n(
4505
- te,
4676
+ re,
4506
4677
  {
4507
4678
  autoFocus: !0,
4508
- onChange: (v) => p(v.target.value),
4679
+ onChange: (v) => d(v.target.value),
4509
4680
  placeholder: e("editor.image.dialog.placeholder"),
4510
4681
  required: !0,
4511
4682
  type: "url",
4512
- value: g
4683
+ value: c
4513
4684
  }
4514
4685
  ),
4515
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
4686
+ /* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
4516
4687
  ] }) }) })
4517
4688
  ]
4518
4689
  }
4519
4690
  )
4520
4691
  ] }) });
4521
4692
  }
4522
- function Ot(e, t) {
4693
+ function Pt(e, t) {
4523
4694
  let r;
4524
4695
  try {
4525
4696
  r = new URL(e);
@@ -4534,62 +4705,62 @@ function Ot(e, t) {
4534
4705
  return r.hostname.includes(i);
4535
4706
  });
4536
4707
  }
4537
- function ra() {
4538
- const { t: e } = ne(), t = ee(), r = Vt(Pe.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Le(), [l, s] = E(""), c = xe(null), [d, g] = E(""), [p, u] = E(!1), k = le(Pe.name), b = B(() => (k == null ? void 0 : k.options) ?? {}, [k]);
4539
- async function z(h) {
4540
- var v;
4541
- const S = (v = h == null ? void 0 : h.target) == null ? void 0 : v.files;
4542
- if (!t || t.isDestroyed || S.length === 0)
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]);
4710
+ 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)
4543
4714
  return;
4544
- const m = S[0];
4545
- let H = "";
4546
- b.upload ? H = await b.upload(m) : H = URL.createObjectURL(m), t.chain().focus().setVideo({
4547
- src: H,
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,
4548
4719
  width: "100%"
4549
- }).run(), u(!1);
4720
+ }).run(), h(!1);
4550
4721
  }
4551
- function f(h) {
4552
- h.preventDefault(), h.stopPropagation(), l && (t.chain().focus().setVideo({
4722
+ function u(m) {
4723
+ m.preventDefault(), m.stopPropagation(), l && (t.chain().focus().setVideo({
4553
4724
  src: l,
4554
4725
  width: "100%"
4555
- }).run(), u(!1), s(""));
4726
+ }).run(), h(!1), s(""));
4556
4727
  }
4557
- function x(h) {
4558
- var S;
4559
- h.preventDefault(), (S = c.current) == null || S.click();
4728
+ function y(m) {
4729
+ var z;
4730
+ m.preventDefault(), (z = c.current) == null || z.click();
4560
4731
  }
4561
- return /* @__PURE__ */ y(we, { onOpenChange: u, open: p, children: [
4732
+ return /* @__PURE__ */ C(we, { onOpenChange: h, open: p, children: [
4562
4733
  /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
4563
- vt,
4734
+ wt,
4564
4735
  {
4565
4736
  disabled: a,
4566
4737
  icon: i,
4567
4738
  tooltip: o,
4568
4739
  action: () => {
4569
- a || u(!0);
4740
+ a || h(!0);
4570
4741
  }
4571
4742
  }
4572
4743
  ) }),
4573
- /* @__PURE__ */ y(ae, { children: [
4574
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4575
- /* @__PURE__ */ y(
4576
- Ne,
4744
+ /* @__PURE__ */ C(se, { children: [
4745
+ /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
4746
+ /* @__PURE__ */ C(
4747
+ Se,
4577
4748
  {
4578
4749
  activationMode: "manual",
4579
- defaultValue: (b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload" ? "upload" : "link",
4750
+ defaultValue: (f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "upload" ? "upload" : "link",
4580
4751
  children: [
4581
- /* @__PURE__ */ y(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4582
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4583
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
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") })
4584
4755
  ] }),
4585
- /* @__PURE__ */ y(Z, { value: "upload", children: [
4586
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
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") }) }),
4587
4758
  /* @__PURE__ */ n(
4588
4759
  "input",
4589
4760
  {
4590
4761
  accept: "video/*",
4591
4762
  multiple: !0,
4592
- onChange: z,
4763
+ onChange: k,
4593
4764
  ref: c,
4594
4765
  type: "file",
4595
4766
  style: {
@@ -4598,26 +4769,26 @@ function ra() {
4598
4769
  }
4599
4770
  )
4600
4771
  ] }),
4601
- /* @__PURE__ */ y(Z, { value: "link", children: [
4602
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
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: [
4603
4774
  /* @__PURE__ */ n(
4604
- te,
4775
+ re,
4605
4776
  {
4606
4777
  autoFocus: !0,
4607
4778
  placeholder: e("editor.video.dialog.placeholder"),
4608
4779
  required: !0,
4609
4780
  type: "url",
4610
4781
  value: l,
4611
- onBlur: (h) => {
4612
- const S = h.target.value, m = b.videoProviders || ["."];
4613
- S && !Ot(S, m) ? g("Invalid video URL") : g("");
4782
+ onBlur: (m) => {
4783
+ const z = m.target.value, v = f.videoProviders || ["."];
4784
+ z && !Pt(z, v) ? g("Invalid video URL") : g("");
4614
4785
  },
4615
- onChange: (h) => {
4616
- s(h.target.value);
4786
+ onChange: (m) => {
4787
+ s(m.target.value);
4617
4788
  }
4618
4789
  }
4619
4790
  ),
4620
- /* @__PURE__ */ n($, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
4791
+ /* @__PURE__ */ n(G, { onClick: u, type: "button", children: e("editor.video.dialog.button.apply") })
4621
4792
  ] }) }),
4622
4793
  d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
4623
4794
  ] })
@@ -4627,7 +4798,7 @@ function ra() {
4627
4798
  ] })
4628
4799
  ] });
4629
4800
  }
4630
- function Lo(e) {
4801
+ function Eo(e) {
4631
4802
  e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
4632
4803
  const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
4633
4804
  t && (e = `https://www.youtube.com/embed/${t[1]}`);
@@ -4638,7 +4809,7 @@ function Lo(e) {
4638
4809
  }
4639
4810
  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;
4640
4811
  }
4641
- const Pe = /* @__PURE__ */ ct.create({
4812
+ const Oe = /* @__PURE__ */ dt.create({
4642
4813
  name: "video",
4643
4814
  group: "block",
4644
4815
  atom: !0,
@@ -4652,7 +4823,7 @@ const Pe = /* @__PURE__ */ ct.create({
4652
4823
  upload: void 0,
4653
4824
  frameborder: !1,
4654
4825
  resourceVideo: "both",
4655
- width: gi["size-medium"],
4826
+ width: pi["size-medium"],
4656
4827
  HTMLAttributes: {
4657
4828
  class: "iframe-wrapper"
4658
4829
  // style: 'display: flex;justify-content: center;',
@@ -4680,13 +4851,13 @@ const Pe = /* @__PURE__ */ ct.create({
4680
4851
  src: {
4681
4852
  default: null,
4682
4853
  renderHTML: ({ src: e }) => ({
4683
- src: e ? Lo(e) : null
4854
+ src: e ? Eo(e) : null
4684
4855
  })
4685
4856
  },
4686
4857
  width: {
4687
4858
  default: this.options.width,
4688
4859
  renderHTML: ({ width: e }) => ({
4689
- width: Mo(e)
4860
+ width: To(e)
4690
4861
  })
4691
4862
  },
4692
4863
  frameborder: {
@@ -4735,52 +4906,52 @@ const Pe = /* @__PURE__ */ ct.create({
4735
4906
  };
4736
4907
  }
4737
4908
  });
4738
- function Ao() {
4739
- const { t: e } = ne(), t = ee(), { editorDisabled: r } = Le(), [i, o] = E(""), a = xe(null), [l, s] = E(""), [c, d] = E(!1), g = le(Pe.name), p = Dt.UPLOAD_VIDEO(t.id);
4740
- Mt(d, [p]);
4741
- const u = B(() => (g == null ? void 0 : g.options) ?? {}, [g]);
4742
- async function k(f) {
4743
- var m;
4744
- const x = (m = f == null ? void 0 : f.target) == null ? void 0 : m.files;
4745
- if (!t || t.isDestroyed || x.length === 0)
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) {
4914
+ 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)
4746
4917
  return;
4747
- const h = x[0];
4748
- let S = "";
4749
- u.upload ? S = await u.upload(h) : S = URL.createObjectURL(h), t.chain().focus().setVideo({
4750
- src: S,
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,
4751
4922
  width: "100%"
4752
4923
  }).run(), d(!1);
4753
4924
  }
4754
- function b(f) {
4755
- f.preventDefault(), f.stopPropagation(), i && (t.chain().focus().setVideo({
4925
+ function f(u) {
4926
+ u.preventDefault(), u.stopPropagation(), i && (t.chain().focus().setVideo({
4756
4927
  src: i,
4757
4928
  width: "100%"
4758
4929
  }).run(), d(!1), o(""));
4759
4930
  }
4760
- function z(f) {
4761
- var x;
4762
- f.preventDefault(), (x = a.current) == null || x.click();
4931
+ function k(u) {
4932
+ var y;
4933
+ u.preventDefault(), (y = a.current) == null || y.click();
4763
4934
  }
4764
- return r ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(ae, { children: [
4765
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4766
- /* @__PURE__ */ y(
4767
- Ne,
4935
+ return r ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ C(se, { children: [
4936
+ /* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
4937
+ /* @__PURE__ */ C(
4938
+ Se,
4768
4939
  {
4769
4940
  activationMode: "manual",
4770
- defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
4941
+ defaultValue: (h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "upload" ? "upload" : "link",
4771
4942
  children: [
4772
- /* @__PURE__ */ y(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4773
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4774
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
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") })
4775
4946
  ] }),
4776
- /* @__PURE__ */ y(Z, { value: "upload", children: [
4777
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: z, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4947
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
4948
+ /* @__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") }) }),
4778
4949
  /* @__PURE__ */ n(
4779
4950
  "input",
4780
4951
  {
4781
4952
  accept: "video/*",
4782
4953
  multiple: !0,
4783
- onChange: k,
4954
+ onChange: b,
4784
4955
  ref: a,
4785
4956
  type: "file",
4786
4957
  style: {
@@ -4789,26 +4960,26 @@ function Ao() {
4789
4960
  }
4790
4961
  )
4791
4962
  ] }),
4792
- /* @__PURE__ */ y(Z, { value: "link", children: [
4793
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
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: [
4794
4965
  /* @__PURE__ */ n(
4795
- te,
4966
+ re,
4796
4967
  {
4797
4968
  autoFocus: !0,
4798
4969
  placeholder: e("editor.video.dialog.placeholder"),
4799
4970
  required: !0,
4800
4971
  type: "url",
4801
4972
  value: i,
4802
- onBlur: (f) => {
4803
- const x = f.target.value, h = u.videoProviders || ["."];
4804
- x && !Ot(x, h) ? s("Invalid video URL") : s("");
4973
+ onBlur: (u) => {
4974
+ const y = u.target.value, m = h.videoProviders || ["."];
4975
+ y && !Pt(y, m) ? s("Invalid video URL") : s("");
4805
4976
  },
4806
- onChange: (f) => {
4807
- o(f.target.value);
4977
+ onChange: (u) => {
4978
+ o(u.target.value);
4808
4979
  }
4809
4980
  }
4810
4981
  ),
4811
- /* @__PURE__ */ n($, { onClick: b, type: "button", children: e("editor.video.dialog.button.apply") })
4982
+ /* @__PURE__ */ n(G, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
4812
4983
  ] }) }),
4813
4984
  l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
4814
4985
  ] })
@@ -4817,67 +4988,67 @@ function Ao() {
4817
4988
  )
4818
4989
  ] }) });
4819
4990
  }
4820
- function Eo() {
4821
- return /* @__PURE__ */ y(Y, { children: [
4991
+ function Vo() {
4992
+ return /* @__PURE__ */ C(te, { children: [
4822
4993
  /* @__PURE__ */ n(No, {}),
4823
- /* @__PURE__ */ n(Ao, {})
4994
+ /* @__PURE__ */ n(Ro, {})
4824
4995
  ] });
4825
4996
  }
4826
- process.env.NODE_ENV !== "production" && (Eo.displayName = "SlashDialogTrigger");
4997
+ process.env.NODE_ENV !== "production" && (Vo.displayName = "SlashDialogTrigger");
4827
4998
  export {
4828
- Ko as $,
4829
- vt as A,
4830
- $ as B,
4999
+ ea as $,
5000
+ wt as A,
5001
+ G as B,
4831
5002
  $e as C,
4832
5003
  we as D,
4833
- Dt as E,
4834
- ho as F,
4835
- po as G,
4836
- $n as H,
4837
- fe as I,
4838
- Et as J,
4839
- ta as K,
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,
4840
5011
  pe as L,
4841
- ln as M,
4842
- bn as N,
4843
- xn as O,
4844
- Qo as P,
4845
- Jo as Q,
4846
- ea as R,
5012
+ cn as M,
5013
+ vn as N,
5014
+ bn as O,
5015
+ ra as P,
5016
+ ta as Q,
5017
+ ia as R,
4847
5018
  Ue as S,
4848
- Nn as T,
4849
- Go as U,
4850
- Wo as V,
4851
- $o as W,
4852
- Eo as X,
4853
- So as Y,
4854
- Pn as Z,
4855
- Pe as _,
4856
- Ln as a,
4857
- ra as a0,
4858
- Ct as b,
4859
- _ as c,
4860
- Le as d,
4861
- Xo as e,
4862
- Zo as f,
4863
- en as g,
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,
4864
5035
  ee as h,
4865
- wt as i,
4866
- te as j,
4867
- yt as k,
4868
- Qi as l,
5036
+ yt as i,
5037
+ re as j,
5038
+ Ct as k,
5039
+ en as l,
4869
5040
  We as m,
4870
- ae as n,
4871
- se as o,
5041
+ se as n,
5042
+ le as o,
4872
5043
  zt as p,
4873
- le as q,
5044
+ ce as q,
4874
5045
  Be as r,
4875
- qo as s,
4876
- Se as t,
4877
- Vt as u,
4878
- Fo as v,
4879
- Yo as w,
4880
- Mt as x,
4881
- ot as y,
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,
4882
5053
  at as z
4883
5054
  };