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