zs_library 0.4.15 → 0.4.17

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/dist/index.js CHANGED
@@ -1,57 +1,57 @@
1
- var qt = Object.defineProperty;
2
- var Yt = (r, e, o) => e in r ? qt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o;
3
- var Se = (r, e, o) => Yt(r, typeof e != "symbol" ? e + "" : e, o);
1
+ var Yt = Object.defineProperty;
2
+ var Vt = (r, e, o) => e in r ? Yt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o;
3
+ var Se = (r, e, o) => Vt(r, typeof e != "symbol" ? e + "" : e, o);
4
4
  import "./index.css";
5
- import Vt from "i18next";
6
- import { initReactI18next as Wt } from "react-i18next";
7
- import { jsx as t, jsxs as m, Fragment as me } from "react/jsx-runtime";
8
- import { cx as y, css as g } from "@emotion/css";
5
+ import Wt from "i18next";
6
+ import { initReactI18next as Kt } from "react-i18next";
7
+ import { jsx as t, jsxs as m, Fragment as ue } from "react/jsx-runtime";
9
8
  import * as G from "react";
10
- import { createContext as ot, useMemo as fe, useContext as rt, useState as H, useRef as he, useEffect as ie, Fragment as Kt, forwardRef as Jt } from "react";
11
- import Zt from "react-slick";
9
+ import Jt, { createContext as ot, useMemo as he, useContext as rt, useState as H, useRef as be, useEffect as ae, forwardRef as nt, Fragment as Zt } from "react";
10
+ import { cx as k, css as h } from "@emotion/css";
11
+ import Qt from "react-slick";
12
12
  import { ReactSortable as $e } from "react-sortablejs";
13
- import { AnimatePresence as He, motion as D, useMotionValue as nt, useTransform as xe, useSpring as Te } from "framer-motion";
14
- import { useMotionValue as Ms } from "framer-motion";
15
- import { useLocalStorageState as Qt, useDebounceEffect as eo } from "ahooks";
13
+ import { AnimatePresence as He, motion as R, useMotionValue as at, useTransform as xe, useSpring as Te } from "framer-motion";
14
+ import { useMotionValue as Ls } from "framer-motion";
15
+ import { useLocalStorageState as eo, useDebounceEffect as to } from "ahooks";
16
16
  import { v4 as Je } from "uuid";
17
- import at from "rc-tooltip";
18
- import { RiPencilRuler2Line as to, RiShareLine as oo, RiInformationLine as ro, RiCloseCircleLine as no, RiArrowUpDownLine as ao, RiArrowLeftRightLine as so, RiArrowRightLine as io, RiArrowLeftLine as lo, RiCloseLine as co, RiZoomOutLine as mo, RiZoomInLine as uo, RiClockwise2Line as po, RiAnticlockwise2Line as go, RiMoreLine as fo, RiArrowDropDownLine as st, RiCheckLine as ye, RiLink as ho, RiDeleteBinLine as it, RiText as lt, RiH1 as ct, RiH2 as dt, RiH3 as mt, RiListCheck as ut, RiListUnordered as pt, RiListOrdered as gt, RiQuoteText as ft, RiCodeLine as ht, RiSparklingFill as Oe, RiImageLine as bo, RiArrowRightSLine as xo, RiRepeatLine as yo, RiFileCopyLine as vo, RiAddLine as ko, RiDraggable as Co } from "@remixicon/react";
19
- import bt from "rc-dialog";
20
- import wo from "react-json-view";
21
- import { AdmonitionDirectiveDescriptor as No, MDXEditor as Io, toolbarPlugin as So, diffSourcePlugin as To, listsPlugin as Mo, quotePlugin as Lo, headingsPlugin as Ao, linkPlugin as Do, linkDialogPlugin as Ro, imagePlugin as Po, tablePlugin as Bo, thematicBreakPlugin as zo, frontmatterPlugin as Eo, codeBlockPlugin as $o, codeMirrorPlugin as Ho, markdownShortcutPlugin as Oo, directivesPlugin as Fo, DiffSourceToggleWrapper as _o, UndoRedo as jo, Separator as le, BoldItalicUnderlineToggles as Xo, CodeToggle as Uo, StrikeThroughSupSubToggles as Go, ListsToggle as qo, CreateLink as Yo, InsertImage as Vo, InsertTable as Wo, InsertThematicBreak as Ko, InsertCodeBlock as Jo, InsertFrontmatter as Zo } from "@mdxeditor/editor";
22
- import xt from "react-markdown";
23
- import Qo from "remark-gfm";
24
- import er from "remark-emoji";
25
- import tr from "rehype-raw";
26
- import { Prism as or } from "react-syntax-highlighter";
27
- import { oneLight as rr } from "react-syntax-highlighter/dist/esm/styles/prism";
28
- import nr from "rc-image";
29
- import { clsx as ar } from "clsx";
30
- import { twMerge as sr } from "tailwind-merge";
31
- import { Placeholder as ir, TiptapLink as lr, TiptapImage as cr, UploadImagesPlugin as dr, UpdatedImage as mr, TaskList as ur, TaskItem as pr, HorizontalRule as gr, StarterKit as fr, CodeBlockLowlight as hr, Mathematics as br, CharacterCount as xr, AIHighlight as yr, TiptapUnderline as vr, HighlightExtension as kr, TextStyle as Cr, Color as wr, CustomKeymap as Nr, useEditor as Q, EditorBubbleItem as Ae, getPrevText as Ir, addAIHighlight as Sr, removeAIHighlight as Tr, EditorBubble as Mr, createImageUpload as yt, Command as Lr, createSuggestionItems as Ar, renderItems as Dr, EditorRoot as Rr, EditorContent as Pr, handleImageDrop as Br, handleImagePaste as zr, handleCommandNavigation as Er, EditorCommand as $r, EditorCommandEmpty as Hr, EditorCommandList as Or, EditorCommandItem as Fr, ImageResizer as _r } from "novel";
32
- import { useDebouncedCallback as jr } from "use-debounce";
33
- import { Markdown as Xr } from "tiptap-markdown";
34
- import { cx as q, cva as Ur } from "class-variance-authority";
35
- import { createLowlight as Gr, common as qr } from "lowlight";
36
- import { Extension as Yr } from "@tiptap/core";
37
- import { Plugin as Vr, PluginKey as Wr, NodeSelection as K, TextSelection as Kr } from "prosemirror-state";
38
- import { Slice as Jr, Fragment as Zr } from "prosemirror-model";
39
- import * as Qr from "prosemirror-view";
17
+ import st from "rc-tooltip";
18
+ import { RiPencilRuler2Line as oo, RiShareLine as ro, RiInformationLine as no, RiCloseCircleLine as ao, RiArrowUpDownLine as so, RiArrowLeftRightLine as io, RiArrowRightLine as lo, RiArrowLeftLine as co, RiCloseLine as mo, RiZoomOutLine as uo, RiZoomInLine as po, RiClockwise2Line as go, RiAnticlockwise2Line as fo, RiMoreLine as ho, RiArrowDropDownLine as it, RiCheckLine as ye, RiLink as bo, RiDeleteBinLine as lt, RiText as ct, RiH1 as dt, RiH2 as mt, RiH3 as ut, RiListCheck as pt, RiListUnordered as gt, RiListOrdered as ft, RiQuoteText as ht, RiCodeLine as bt, RiSparklingFill as Oe, RiImageLine as xo, RiArrowRightSLine as yo, RiRepeatLine as vo, RiFileCopyLine as ko, RiAddLine as Co, RiDraggable as wo } from "@remixicon/react";
19
+ import xt from "rc-dialog";
20
+ import No from "react-json-view";
21
+ import { AdmonitionDirectiveDescriptor as Io, MDXEditor as So, toolbarPlugin as To, diffSourcePlugin as Mo, listsPlugin as Lo, quotePlugin as Ao, headingsPlugin as Do, linkPlugin as Ro, linkDialogPlugin as Po, imagePlugin as Bo, tablePlugin as zo, thematicBreakPlugin as Eo, frontmatterPlugin as $o, codeBlockPlugin as Ho, codeMirrorPlugin as Oo, markdownShortcutPlugin as Fo, directivesPlugin as _o, DiffSourceToggleWrapper as jo, UndoRedo as Xo, Separator as ce, BoldItalicUnderlineToggles as Uo, CodeToggle as Go, StrikeThroughSupSubToggles as qo, ListsToggle as Yo, CreateLink as Vo, InsertImage as Wo, InsertTable as Ko, InsertThematicBreak as Jo, InsertCodeBlock as Zo, InsertFrontmatter as Qo } from "@mdxeditor/editor";
22
+ import yt from "react-markdown";
23
+ import er from "remark-gfm";
24
+ import tr from "remark-emoji";
25
+ import or from "rehype-raw";
26
+ import { Prism as rr } from "react-syntax-highlighter";
27
+ import { oneLight as nr } from "react-syntax-highlighter/dist/esm/styles/prism";
28
+ import ar from "rc-image";
29
+ import { clsx as sr } from "clsx";
30
+ import { twMerge as ir } from "tailwind-merge";
31
+ import { Placeholder as lr, TiptapLink as cr, TiptapImage as dr, UploadImagesPlugin as mr, UpdatedImage as ur, TaskList as pr, TaskItem as gr, HorizontalRule as fr, StarterKit as hr, CodeBlockLowlight as br, Mathematics as xr, CharacterCount as yr, AIHighlight as vr, TiptapUnderline as kr, HighlightExtension as Cr, TextStyle as wr, Color as Nr, CustomKeymap as Ir, useEditor as Q, EditorBubbleItem as Ae, getPrevText as Sr, addAIHighlight as Tr, removeAIHighlight as Mr, EditorBubble as Lr, createImageUpload as vt, Command as Ar, createSuggestionItems as Dr, renderItems as Rr, EditorRoot as Pr, EditorContent as Br, handleImageDrop as zr, handleImagePaste as Er, handleCommandNavigation as $r, EditorCommand as Hr, EditorCommandEmpty as Or, EditorCommandList as Fr, EditorCommandItem as _r, ImageResizer as jr } from "novel";
32
+ import { useDebouncedCallback as Xr } from "use-debounce";
33
+ import { Markdown as Ur } from "tiptap-markdown";
34
+ import { cx as q, cva as Gr } from "class-variance-authority";
35
+ import { createLowlight as qr, common as Yr } from "lowlight";
36
+ import { Extension as Vr } from "@tiptap/core";
37
+ import { Plugin as Wr, PluginKey as Kr, NodeSelection as J, TextSelection as Jr } from "prosemirror-state";
38
+ import { Slice as Zr, Fragment as Qr } from "prosemirror-model";
39
+ import * as en from "prosemirror-view";
40
40
  import * as ve from "@radix-ui/react-popover";
41
- import { Popover as vt, PopoverTrigger as en } from "@radix-ui/react-popover";
42
- import { Slot as tn } from "@radix-ui/react-slot";
43
- import { SigmaIcon as on, X as rn, Check as nn, TextQuote as an, TrashIcon as sn, RefreshCcwDot as ln, CheckCheck as cn, ArrowDownWideNarrow as dn, WrapText as mn, StepForward as un, ArrowUp as pn, BoldIcon as gn, ItalicIcon as fn, UnderlineIcon as hn, StrikethroughIcon as bn, CodeIcon as xn } from "lucide-react";
44
- import * as kt from "@radix-ui/react-separator";
45
- import { useCompletion as yn } from "@ai-sdk/react";
41
+ import { Popover as kt, PopoverTrigger as tn } from "@radix-ui/react-popover";
42
+ import { Slot as on } from "@radix-ui/react-slot";
43
+ import { SigmaIcon as rn, X as nn, Check as an, TextQuote as sn, TrashIcon as ln, RefreshCcwDot as cn, CheckCheck as dn, ArrowDownWideNarrow as mn, WrapText as un, StepForward as pn, ArrowUp as gn, BoldIcon as fn, ItalicIcon as hn, UnderlineIcon as bn, StrikethroughIcon as xn, CodeIcon as yn } from "lucide-react";
44
+ import * as Ct from "@radix-ui/react-separator";
45
+ import { useCompletion as vn } from "@ai-sdk/react";
46
46
  import { toast as ke } from "sonner";
47
- import * as ce from "@radix-ui/react-scroll-area";
47
+ import * as de from "@radix-ui/react-scroll-area";
48
48
  import { Command as V } from "cmdk";
49
49
  import * as te from "@radix-ui/react-dialog";
50
- import vn from "highlight.js";
51
- import kn from "rc-dropdown";
50
+ import kn from "highlight.js";
51
+ import Cn from "rc-dropdown";
52
52
  import Me from "rc-menu";
53
- import { generateHTML as Cn } from "@tiptap/html";
54
- function wn(r, e) {
53
+ import { generateHTML as wn } from "@tiptap/html";
54
+ function Nn(r, e) {
55
55
  for (var o = 0; o < e.length; o++) {
56
56
  const a = e[o];
57
57
  if (typeof a != "string" && !Array.isArray(a)) {
@@ -67,7 +67,7 @@ function wn(r, e) {
67
67
  }
68
68
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
69
69
  }
70
- const Nn = {
70
+ const In = {
71
71
  common: {
72
72
  ok: "确定",
73
73
  cancel: "取消",
@@ -92,7 +92,7 @@ const Nn = {
92
92
  link: "链接",
93
93
  image: "图片"
94
94
  }
95
- }, In = {
95
+ }, Sn = {
96
96
  common: {
97
97
  ok: "OK",
98
98
  cancel: "Cancel",
@@ -117,15 +117,15 @@ const Nn = {
117
117
  link: "Link",
118
118
  image: "Image"
119
119
  }
120
- }, Sn = "common";
121
- Vt.use(Wt).init({
120
+ }, Tn = "common";
121
+ Wt.use(Kt).init({
122
122
  resources: {
123
- "zh-CN": Nn,
124
- "en-US": In
123
+ "zh-CN": In,
124
+ "en-US": Sn
125
125
  },
126
126
  lng: "zh-CN",
127
127
  fallbackLng: "zh-CN",
128
- defaultNS: Sn,
128
+ defaultNS: Tn,
129
129
  interpolation: {
130
130
  escapeValue: !1
131
131
  }
@@ -156,19 +156,19 @@ const Fe = {
156
156
  contextMenuBackgroundColor: "#1a1a1a",
157
157
  contextMenuShadowColor: "rgba(255, 255, 255, 0.1)"
158
158
  }
159
- }, Ct = ot(
159
+ }, wt = ot(
160
160
  {}
161
- ), wt = (r) => {
162
- const { children: e, theme: o, ...a } = r, n = fe(() => o === "light" ? Fe : o === "dark" ? _e : o, [o]);
163
- return /* @__PURE__ */ t(Ct.Provider, { value: { theme: n, ...a }, children: e });
164
- }, ue = () => rt(Ct), je = {
161
+ ), Nt = (r) => {
162
+ const { children: e, theme: o, ...a } = r, n = he(() => o === "light" ? Fe : o === "dark" ? _e : o, [o]);
163
+ return /* @__PURE__ */ t(wt.Provider, { value: { theme: n, ...a }, children: e });
164
+ }, le = () => rt(wt), je = {
165
165
  maxRow: 2,
166
166
  maxCol: 2
167
- }, Nt = {
167
+ }, It = {
168
168
  ...je
169
169
  }, Xe = {
170
170
  app: je,
171
- group: Nt
171
+ group: It
172
172
  };
173
173
  class Y {
174
174
  }
@@ -186,7 +186,7 @@ Se(Y, "uniqueArray", (e) => e.reduce((o, a) => o.find((s) => s.id === a.id) ? o
186
186
  return !1;
187
187
  }
188
188
  });
189
- const It = ot({
189
+ const St = ot({
190
190
  list: [],
191
191
  setList: () => {
192
192
  },
@@ -221,181 +221,181 @@ const It = ot({
221
221
  moveTargetId: null,
222
222
  setMoveTargetId: () => {
223
223
  }
224
- }), St = (r) => {
224
+ }), Tt = (r) => {
225
225
  const {
226
226
  children: e,
227
227
  list: o = [],
228
228
  onChange: a,
229
229
  storageKey: n = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
230
230
  enableCaching: s = !0
231
- } = r, [i, c] = H(), [p, k] = H(), [l, d] = H(null), b = he(l), [x, A] = H(null), [f, h] = H([]), [w, v] = H(
231
+ } = r, [i, d] = H(), [p, x] = H(), [l, c] = H(null), b = be(l), [v, D] = H(null), [f, g] = H([]), [I, y] = H(
232
232
  null
233
- ), [I, u] = H(
233
+ ), [w, u] = H(
234
234
  null
235
- ), [T, R] = H(!1), [N, C] = H(null), [X, Z] = H(
235
+ ), [S, T] = H(!1), [C, N] = H(null), [O, W] = H(
236
236
  null
237
- ), [_, ae] = H(!1), [oe, S] = Qt(n, {
237
+ ), [_, se] = H(!1), [oe, M] = eo(n, {
238
238
  defaultValue: [],
239
239
  listenStorageChange: !0
240
- }), O = () => {
241
- A(null), clearTimeout(i), c(void 0), b.current = null;
242
- }, B = (M, U) => {
243
- A({ ...M, pageX: M.pageX, pageY: M.pageY, data: U }), clearTimeout(i);
244
- }, W = (M, U = !0) => {
245
- const { config: F = {} } = M;
246
- return F.allowContextMenu === !1 ? {} : {
240
+ }), F = () => {
241
+ D(null), clearTimeout(i), d(void 0), b.current = null;
242
+ }, B = (L, U) => {
243
+ D({ ...L, pageX: L.pageX, pageY: L.pageY, data: U }), clearTimeout(i);
244
+ }, K = (L, U = !0) => {
245
+ const { config: j = {} } = L;
246
+ return j.allowContextMenu === !1 ? {} : {
247
247
  onMouseDown: (E) => {
248
- c(
248
+ d(
249
249
  setTimeout(() => {
250
- U && b.current === null && B(E, M);
250
+ U && b.current === null && B(E, L);
251
251
  }, 800)
252
- ), R(!1), k(
252
+ ), T(!1), x(
253
253
  setTimeout(() => {
254
- R(!0);
254
+ T(!0);
255
255
  }, 800)
256
256
  );
257
257
  },
258
258
  onMouseUp: () => {
259
- clearTimeout(p), k(void 0), clearTimeout(i), c(void 0);
259
+ clearTimeout(p), x(void 0), clearTimeout(i), d(void 0);
260
260
  },
261
261
  onContextMenu: (E) => {
262
- U && (E.preventDefault(), B(E, M));
262
+ U && (E.preventDefault(), B(E, L));
263
263
  }
264
264
  };
265
- }, re = (M, U) => {
266
- const F = [...U || []];
267
- if (F.length > 0)
268
- h((E) => {
269
- const P = [...E], z = (L) => {
265
+ }, re = (L, U) => {
266
+ const j = [...U || []];
267
+ if (j.length > 0)
268
+ g((E) => {
269
+ const P = [...E], z = (A) => {
270
270
  var We, Ke;
271
- const $ = F.shift(), j = L.find((ne) => ne.id === $), ee = L.findIndex((ne) => ne.id === $);
272
- if (F.length && j) {
273
- if (((We = j.children) == null ? void 0 : We.filter(
274
- (ne) => !M.some((Gt) => Gt.id === ne.id)
275
- ).length) === 1 && M.length === 1) {
276
- const ne = { ...M[0] };
277
- return L.splice(ee, 1, ne), a == null || a(L), L;
271
+ const $ = j.shift(), X = A.find((ne) => ne.id === $), ee = A.findIndex((ne) => ne.id === $);
272
+ if (j.length && X) {
273
+ if (((We = X.children) == null ? void 0 : We.filter(
274
+ (ne) => !L.some((qt) => qt.id === ne.id)
275
+ ).length) === 1 && L.length === 1) {
276
+ const ne = { ...L[0] };
277
+ return A.splice(ee, 1, ne), a == null || a(A), A;
278
278
  }
279
- return j.children = z(j.children || []), L.splice(ee, 1, j), a == null || a(L), L;
279
+ return X.children = z(X.children || []), A.splice(ee, 1, X), a == null || a(A), A;
280
280
  }
281
- if (j) {
282
- if (!((Ke = j.children) != null && Ke.length) && M.length) {
283
- const ne = { ...j };
284
- return j.data = { name: "文件夹" }, j.type = "group", j.children = [ne, ...M], j.id = Je(), L.splice(ee, 1, j), a == null || a(L), L;
281
+ if (X) {
282
+ if (!((Ke = X.children) != null && Ke.length) && L.length) {
283
+ const ne = { ...X };
284
+ return X.data = { name: "文件夹" }, X.type = "group", X.children = [ne, ...L], X.id = Je(), A.splice(ee, 1, X), a == null || a(A), A;
285
285
  }
286
- return j.children = Y.uniqueArray(M), L.splice(ee, 1, j), a == null || a(L), L;
286
+ return X.children = Y.uniqueArray(L), A.splice(ee, 1, X), a == null || a(A), A;
287
287
  }
288
- return Y.uniqueArray(M);
288
+ return Y.uniqueArray(L);
289
289
  };
290
290
  return Y.uniqueArray(z(P));
291
291
  });
292
292
  else {
293
- const E = Y.uniqueArray(M);
294
- a == null || a(E), h(E);
293
+ const E = Y.uniqueArray(L);
294
+ a == null || a(E), g(E);
295
295
  }
296
- }, Pe = (M, U) => {
297
- h((F) => {
298
- const E = [...F], P = (z) => {
299
- var L;
296
+ }, Pe = (L, U) => {
297
+ g((j) => {
298
+ const E = [...j], P = (z) => {
299
+ var A;
300
300
  for (let $ = 0; $ < z.length; $++)
301
- if (z[$].id === M) {
301
+ if (z[$].id === L) {
302
302
  z[$].config = U;
303
303
  break;
304
- } else ((L = z[$].children) == null ? void 0 : L.length) !== void 0 && P(z[$].children);
304
+ } else ((A = z[$].children) == null ? void 0 : A.length) !== void 0 && P(z[$].children);
305
305
  };
306
306
  return P(E), a == null || a(E), E;
307
307
  });
308
- }, Ne = (M, U) => {
309
- h((F) => {
310
- const E = [...F], P = (z) => {
311
- var L;
308
+ }, Ne = (L, U) => {
309
+ g((j) => {
310
+ const E = [...j], P = (z) => {
311
+ var A;
312
312
  for (let $ = 0; $ < z.length; $++)
313
- if (z[$].id === M) {
313
+ if (z[$].id === L) {
314
314
  z[$].data = U;
315
315
  break;
316
- } else ((L = z[$].children) == null ? void 0 : L.length) !== void 0 && P(z[$].children);
316
+ } else ((A = z[$].children) == null ? void 0 : A.length) !== void 0 && P(z[$].children);
317
317
  };
318
318
  return P(E), a == null || a(E), E;
319
319
  });
320
- }, Ie = (M) => {
321
- h((U) => {
322
- const F = [...U], E = (P) => {
320
+ }, Ie = (L) => {
321
+ g((U) => {
322
+ const j = [...U], E = (P) => {
323
323
  var z;
324
- for (let L = 0; L < P.length; L++)
325
- if (P[L].id === M) {
326
- P.splice(L, 1);
324
+ for (let A = 0; A < P.length; A++)
325
+ if (P[A].id === L) {
326
+ P.splice(A, 1);
327
327
  break;
328
- } else ((z = P[L].children) == null ? void 0 : z.length) !== void 0 && E(P[L].children);
328
+ } else ((z = P[A].children) == null ? void 0 : z.length) !== void 0 && E(P[A].children);
329
329
  };
330
- return E(F), a == null || a(F), F;
330
+ return E(j), a == null || a(j), j;
331
331
  });
332
- }, se = (M, U) => {
333
- const F = [...f], E = (P, z) => {
334
- const L = z.shift(), $ = P.find((ee) => ee.id === L), j = P.findIndex((ee) => ee.id === L);
332
+ }, ie = (L, U) => {
333
+ const j = [...f], E = (P, z) => {
334
+ const A = z.shift(), $ = P.find((ee) => ee.id === A), X = P.findIndex((ee) => ee.id === A);
335
335
  if ($) {
336
336
  if (z.length)
337
337
  $.children = E($.children || [], z);
338
338
  else {
339
- const ee = (M == null ? void 0 : M.type) ?? "app";
339
+ const ee = (L == null ? void 0 : L.type) ?? "app";
340
340
  $.children = [
341
341
  ...$.children ?? [],
342
342
  {
343
- ...M,
343
+ ...L,
344
344
  id: Je(),
345
- config: (M == null ? void 0 : M.config) ?? Xe[ee]
345
+ config: (L == null ? void 0 : L.config) ?? Xe[ee]
346
346
  }
347
347
  ];
348
348
  }
349
- return P.splice(j, 1, $), P;
349
+ return P.splice(X, 1, $), P;
350
350
  } else
351
351
  return P;
352
352
  };
353
- h(E(F, U));
353
+ g(E(j, U));
354
354
  };
355
- return ie(() => {
355
+ return ae(() => {
356
356
  (o == null ? void 0 : o.length) > 0 && f.length === 0 && re(o);
357
- }, [o]), ie(() => {
358
- b.current = l, l !== null && O();
359
- }, [l]), ie(() => {
360
- s && oe != null && oe.length && !_ && (re(oe), ae(!0));
361
- }, [oe, _, s]), eo(
357
+ }, [o]), ae(() => {
358
+ b.current = l, l !== null && F();
359
+ }, [l]), ae(() => {
360
+ s && oe != null && oe.length && !_ && (re(oe), se(!0));
361
+ }, [oe, _, s]), to(
362
362
  () => {
363
- s && S(f);
363
+ s && M(f);
364
364
  },
365
365
  [f, s],
366
366
  {
367
367
  wait: 1e3
368
368
  }
369
369
  ), /* @__PURE__ */ t(
370
- It.Provider,
370
+ St.Provider,
371
371
  {
372
372
  value: {
373
373
  list: f,
374
374
  setList: re,
375
- contextMenu: x,
376
- setContextMenu: A,
375
+ contextMenu: v,
376
+ setContextMenu: D,
377
377
  listStatus: l,
378
- setListStatus: d,
379
- contextMenuFuns: W,
380
- hideContextMenu: O,
381
- showInfoItemData: w,
382
- setShowInfoItemData: v,
383
- openGroupItemData: I,
378
+ setListStatus: c,
379
+ contextMenuFuns: K,
380
+ hideContextMenu: F,
381
+ showInfoItemData: I,
382
+ setShowInfoItemData: y,
383
+ openGroupItemData: w,
384
384
  setOpenGroupItemData: u,
385
- longPressTriggered: T,
385
+ longPressTriggered: S,
386
386
  updateItemConfig: Pe,
387
387
  updateItem: Ne,
388
388
  removeItem: Ie,
389
- addItem: se,
390
- moveItemId: N,
391
- setMoveItemId: C,
392
- moveTargetId: X,
393
- setMoveTargetId: Z
389
+ addItem: ie,
390
+ moveItemId: C,
391
+ setMoveItemId: N,
392
+ moveTargetId: O,
393
+ setMoveTargetId: W
394
394
  },
395
395
  children: e
396
396
  }
397
397
  );
398
- }, be = () => rt(It), Tn = {
398
+ }, pe = () => rt(St), Mn = {
399
399
  menuShow: {
400
400
  opacity: 1,
401
401
  y: 0,
@@ -403,11 +403,11 @@ const It = ot({
403
403
  },
404
404
  menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
405
405
  }, Be = (r) => {
406
- const { icon: e, title: o, onClick: a } = r, { theme: n } = ue(), { light: s, dark: i } = Y.getTheme(n);
406
+ const { icon: e, title: o, onClick: a } = r, { theme: n } = le(), { light: s, dark: i } = Y.getTheme(n);
407
407
  return /* @__PURE__ */ t(
408
- D.div,
408
+ R.div,
409
409
  {
410
- className: g`
410
+ className: h`
411
411
  &:hover {
412
412
  background-color: ${s.contextMenuActiveColor};
413
413
  @media (prefers-color-scheme: dark) {
@@ -424,16 +424,16 @@ const It = ot({
424
424
  user-select: none;
425
425
  border-radius: 0.5rem;
426
426
  `,
427
- onClick: (c) => {
428
- c.stopPropagation(), a == null || a();
427
+ onClick: (d) => {
428
+ d.stopPropagation(), a == null || a();
429
429
  },
430
- variants: Tn,
430
+ variants: Mn,
431
431
  children: /* @__PURE__ */ m(
432
- D.div,
432
+ R.div,
433
433
  {
434
- className: y(
434
+ className: k(
435
435
  "py-1.5 px-3 rounded-lg",
436
- g`
436
+ h`
437
437
  padding-top: 0.375rem;
438
438
  padding-bottom: 0.375rem;
439
439
  padding-left: 0.75rem;
@@ -444,10 +444,10 @@ const It = ot({
444
444
  whileTap: { scale: 0.9 },
445
445
  children: [
446
446
  /* @__PURE__ */ t(
447
- D.div,
447
+ R.div,
448
448
  {
449
- className: y(
450
- g`
449
+ className: k(
450
+ h`
451
451
  margin-bottom: 0.375rem;
452
452
  display: flex;
453
453
  justify-content: center;
@@ -456,13 +456,13 @@ const It = ot({
456
456
  children: e
457
457
  }
458
458
  ),
459
- /* @__PURE__ */ t(D.div, { children: o })
459
+ /* @__PURE__ */ t(R.div, { children: o })
460
460
  ]
461
461
  }
462
462
  )
463
463
  }
464
464
  );
465
- }, Mn = (r) => {
465
+ }, Ln = (r) => {
466
466
  const {
467
467
  showInfoButton: e = !0,
468
468
  showRemoveButton: o = !0,
@@ -470,24 +470,24 @@ const It = ot({
470
470
  showSizeButton: n = !0,
471
471
  onInfoClick: s,
472
472
  onShareClick: i,
473
- onRemoveClick: c
473
+ onRemoveClick: d
474
474
  } = r, {
475
475
  contextMenu: p,
476
- setContextMenu: k,
476
+ setContextMenu: x,
477
477
  hideContextMenu: l,
478
- setShowInfoItemData: d,
478
+ setShowInfoItemData: c,
479
479
  removeItem: b,
480
- updateItemConfig: x
481
- } = be(), { theme: A } = ue(), { light: f, dark: h } = Y.getTheme(A), { data: w } = p ?? {}, { config: v = {} } = w ?? {}, I = () => {
482
- var R;
483
- const u = Xe[(R = p == null ? void 0 : p.data) == null ? void 0 : R.type], T = [];
484
- for (let N = 1; N <= ((u == null ? void 0 : u.maxRow) ?? 2); N++)
485
- for (let C = 1; C <= ((u == null ? void 0 : u.maxCol) ?? 2); C++)
486
- T.push(`${N}x${C}`);
487
- return T;
480
+ updateItemConfig: v
481
+ } = pe(), { theme: D } = le(), { light: f, dark: g } = Y.getTheme(D), { data: I } = p ?? {}, { config: y = {} } = I ?? {}, w = () => {
482
+ var T;
483
+ const u = Xe[(T = p == null ? void 0 : p.data) == null ? void 0 : T.type], S = [];
484
+ for (let C = 1; C <= ((u == null ? void 0 : u.maxRow) ?? 2); C++)
485
+ for (let N = 1; N <= ((u == null ? void 0 : u.maxCol) ?? 2); N++)
486
+ S.push(`${C}x${N}`);
487
+ return S;
488
488
  };
489
489
  return /* @__PURE__ */ t(He, { children: p && /* @__PURE__ */ m(
490
- D.div,
490
+ R.div,
491
491
  {
492
492
  initial: { opacity: 0 },
493
493
  animate: { opacity: 1 },
@@ -497,24 +497,24 @@ const It = ot({
497
497
  },
498
498
  children: [
499
499
  /* @__PURE__ */ t(
500
- D.div,
500
+ R.div,
501
501
  {
502
- className: y(
503
- g`
502
+ className: k(
503
+ h`
504
504
  border-radius: 0.5rem;
505
505
  overflow: hidden;
506
506
  background-color: ${f.contextMenuBackgroundColor};
507
507
  box-shadow: 0 0 0.5rem ${f.contextMenuShadowColor};
508
508
  @media (prefers-color-scheme: dark) {
509
- background-color: ${h.contextMenuBackgroundColor};
510
- box-shadow: 0 0 0.5rem ${h.contextMenuShadowColor};
509
+ background-color: ${g.contextMenuBackgroundColor};
510
+ box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
511
511
  }
512
512
  `
513
513
  ),
514
- children: n && v.allowResize !== !1 && /* @__PURE__ */ t(
515
- D.ul,
514
+ children: n && y.allowResize !== !1 && /* @__PURE__ */ t(
515
+ R.ul,
516
516
  {
517
- className: g`
517
+ className: h`
518
518
  background-color: white;
519
519
  padding: 0.25rem;
520
520
  margin: 0;
@@ -523,23 +523,23 @@ const It = ot({
523
523
  {
524
524
  label: "修改大小",
525
525
  key: "size",
526
- icon: /* @__PURE__ */ t(to, { size: 14 }),
527
- items: I().map((u) => ({
526
+ icon: /* @__PURE__ */ t(oo, { size: 14 }),
527
+ items: w().map((u) => ({
528
528
  label: u,
529
529
  key: u,
530
530
  onClick: () => {
531
- const [T, R] = u.split("x").map(Number);
532
- x(p.data.id, {
533
- row: T,
534
- col: R
531
+ const [S, T] = u.split("x").map(Number);
532
+ v(p.data.id, {
533
+ row: S,
534
+ col: T
535
535
  });
536
536
  }
537
537
  }))
538
538
  }
539
539
  ].map((u) => /* @__PURE__ */ m(
540
- D.li,
540
+ R.li,
541
541
  {
542
- className: g`
542
+ className: h`
543
543
  padding-top: 0.5rem;
544
544
  padding-bottom: 0.5rem;
545
545
  padding-left: 0.75rem;
@@ -547,9 +547,9 @@ const It = ot({
547
547
  `,
548
548
  children: [
549
549
  /* @__PURE__ */ m(
550
- D.p,
550
+ R.p,
551
551
  {
552
- className: g`
552
+ className: h`
553
553
  display: flex;
554
554
  align-items: center;
555
555
  font-size: 0.875rem;
@@ -557,6 +557,10 @@ const It = ot({
557
557
  gap: 0.5rem;
558
558
  padding-bottom: 0.5rem;
559
559
  margin: 0;
560
+ color: ${f.contextMenuTextColor};
561
+ @media (prefers-color-scheme: dark) {
562
+ color: ${g.contextMenuTextColor};
563
+ }
560
564
  `,
561
565
  children: [
562
566
  u.icon,
@@ -566,19 +570,19 @@ const It = ot({
566
570
  }
567
571
  ),
568
572
  /* @__PURE__ */ t(
569
- D.div,
573
+ R.div,
570
574
  {
571
- className: g`
575
+ className: h`
572
576
  display: grid;
573
577
  grid-template-columns: repeat(2, minmax(0, 1fr));
574
578
  gap: 0.25rem;
575
579
  `,
576
- children: u.items.map((T) => /* @__PURE__ */ t(
577
- D.div,
580
+ children: u.items.map((S) => /* @__PURE__ */ t(
581
+ R.div,
578
582
  {
579
- className: y(
583
+ className: k(
580
584
  "py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
581
- g`
585
+ h`
582
586
  padding-top: 0.25rem;
583
587
  padding-bottom: 0.25rem;
584
588
  padding-left: 0.5rem;
@@ -591,26 +595,26 @@ const It = ot({
591
595
  text-align: center;
592
596
  color: ${f.contextMenuTextColor};
593
597
  @media (prefers-color-scheme: dark) {
594
- color: ${h.contextMenuTextColor};
598
+ color: ${g.contextMenuTextColor};
595
599
  }
596
600
  &:hover {
597
601
  background-color: ${f.contextMenuActiveColor};
598
602
  @media (prefers-color-scheme: dark) {
599
- background-color: ${h.contextMenuActiveColor};
603
+ background-color: ${g.contextMenuActiveColor};
600
604
  }
601
605
  }
602
606
  `,
603
- `${v.row}x${v.col}` === T.key && g`
607
+ `${y.row}x${y.col}` === S.key && h`
604
608
  background-color: ${f.contextMenuActiveColor};
605
609
  @media (prefers-color-scheme: dark) {
606
- background-color: ${h.contextMenuActiveColor};
610
+ background-color: ${g.contextMenuActiveColor};
607
611
  }
608
612
  `
609
613
  ),
610
- onClick: T.onClick,
611
- children: T.label
614
+ onClick: S.onClick,
615
+ children: S.label
612
616
  },
613
- T.key
617
+ S.key
614
618
  ))
615
619
  }
616
620
  )
@@ -623,15 +627,15 @@ const It = ot({
623
627
  }
624
628
  ),
625
629
  /* @__PURE__ */ m(
626
- D.div,
630
+ R.div,
627
631
  {
628
- className: y(
629
- g`
632
+ className: k(
633
+ h`
630
634
  background-color: ${f.contextMenuBackgroundColor};
631
635
  box-shadow: 0 0 0.5rem ${f.contextMenuShadowColor};
632
636
  @media (prefers-color-scheme: dark) {
633
- background-color: ${h.contextMenuBackgroundColor};
634
- box-shadow: 0 0 0.5rem ${h.contextMenuShadowColor};
637
+ background-color: ${g.contextMenuBackgroundColor};
638
+ box-shadow: 0 0 0.5rem ${g.contextMenuShadowColor};
635
639
  }
636
640
  display: flex;
637
641
  justify-content: space-around;
@@ -646,7 +650,7 @@ const It = ot({
646
650
  a && /* @__PURE__ */ t(
647
651
  Be,
648
652
  {
649
- icon: /* @__PURE__ */ t(oo, { size: 20 }),
653
+ icon: /* @__PURE__ */ t(ro, { size: 20 }),
650
654
  title: "分享",
651
655
  onClick: () => {
652
656
  if (i) {
@@ -659,14 +663,14 @@ const It = ot({
659
663
  e && /* @__PURE__ */ t(
660
664
  Be,
661
665
  {
662
- icon: /* @__PURE__ */ t(ro, { size: 20 }),
666
+ icon: /* @__PURE__ */ t(no, { size: 20 }),
663
667
  title: "信息",
664
668
  onClick: () => {
665
669
  if (s) {
666
670
  s(p.data);
667
671
  return;
668
672
  }
669
- d({
673
+ c({
670
674
  ...p.data,
671
675
  pageX: p.pageX,
672
676
  pageY: p.pageY
@@ -677,14 +681,14 @@ const It = ot({
677
681
  o && /* @__PURE__ */ t(
678
682
  Be,
679
683
  {
680
- icon: /* @__PURE__ */ t(no, { size: 20 }),
684
+ icon: /* @__PURE__ */ t(ao, { size: 20 }),
681
685
  title: "移除",
682
686
  onClick: () => {
683
- if (c) {
684
- c(p.data, b);
687
+ if (d) {
688
+ d(p.data, b);
685
689
  return;
686
690
  }
687
- k(null), b(p.data.id);
691
+ x(null), b(p.data.id);
688
692
  }
689
693
  }
690
694
  )
@@ -694,18 +698,18 @@ const It = ot({
694
698
  ]
695
699
  }
696
700
  ) });
697
- }, Ln = (r) => {
698
- const { data: e, noLetters: o = !1 } = r, { contextMenuFuns: a } = be(), { itemIconBuilder: n, theme: s, contextMenu: i } = ue(), { light: c, dark: p } = Y.getTheme(s), { data: k = {} } = e, { name: l } = k;
699
- return /* @__PURE__ */ m(me, { children: [
701
+ }, An = (r) => {
702
+ const { data: e, noLetters: o = !1 } = r, { contextMenuFuns: a } = pe(), { itemIconBuilder: n, theme: s, contextMenu: i } = le(), { light: d, dark: p } = Y.getTheme(s), { data: x = {} } = e, { name: l } = x;
703
+ return /* @__PURE__ */ m(ue, { children: [
700
704
  /* @__PURE__ */ t(
701
- D.div,
705
+ R.div,
702
706
  {
703
- className: g`
707
+ className: h`
704
708
  width: 4rem;
705
709
  height: 4rem;
706
- background-color: ${c.itemIconBackgroundColor};
710
+ background-color: ${d.itemIconBackgroundColor};
707
711
  border-radius: 0.75rem;
708
- box-shadow: 0 0 0.5rem ${c.itemIconShadowColor};
712
+ box-shadow: 0 0 0.5rem ${d.itemIconShadowColor};
709
713
  cursor: pointer;
710
714
  position: relative;
711
715
  overflow: hidden;
@@ -718,13 +722,13 @@ const It = ot({
718
722
  children: /* @__PURE__ */ t(
719
723
  "div",
720
724
  {
721
- className: g`
725
+ className: h`
722
726
  position: absolute;
723
727
  left: 0;
724
728
  top: 0;
725
729
  width: 100%;
726
730
  height: 100%;
727
- color: ${c.itemNameColor};
731
+ color: ${d.itemNameColor};
728
732
  @media (prefers-color-scheme: dark) {
729
733
  color: ${p.itemNameColor};
730
734
  }
@@ -736,19 +740,17 @@ const It = ot({
736
740
  }
737
741
  ),
738
742
  /* @__PURE__ */ t(
739
- D.p,
743
+ R.p,
740
744
  {
741
- className: y(
742
- g`
743
- text-align: center;
744
- margin-top: 0.25rem;
745
- margin-bottom: 0;
746
- color: ${c.itemNameColor};
745
+ className: k(
746
+ "whitespace-nowrap text-ellipsis overflow-hidden text-center mt-1 mb-0 max-w-16",
747
+ h`
748
+ color: ${d.itemNameColor};
747
749
  @media (prefers-color-scheme: dark) {
748
750
  color: ${p.itemNameColor};
749
751
  }
750
752
  `,
751
- o && g`
753
+ o && h`
752
754
  color: transparent;
753
755
  `
754
756
  ),
@@ -764,14 +766,14 @@ const It = ot({
764
766
  onClick: n,
765
767
  disabledDrag: s = !1,
766
768
  children: i,
767
- parentIds: c,
769
+ parentIds: d,
768
770
  childrenLength: p
769
- } = r, { contextMenu: k, setContextMenu: l } = be(), { contextMenu: d } = ue();
771
+ } = r, { contextMenu: x, setContextMenu: l } = pe(), { contextMenu: c } = le();
770
772
  return /* @__PURE__ */ t(
771
- at,
773
+ st,
772
774
  {
773
775
  placement: "bottom",
774
- overlayClassName: g`
776
+ overlayClassName: h`
775
777
  background-color: transparent;
776
778
  .rc-tooltip-inner {
777
779
  background-color: transparent;
@@ -779,27 +781,27 @@ const It = ot({
779
781
  border: none;
780
782
  }
781
783
  `,
782
- overlay: /* @__PURE__ */ t(Mn, { ...d }),
783
- visible: (k == null ? void 0 : k.data.id) === e.id,
784
+ overlay: /* @__PURE__ */ t(Ln, { ...c }),
785
+ visible: (x == null ? void 0 : x.data.id) === e.id,
784
786
  onVisibleChange: (b) => {
785
787
  b || l(null);
786
788
  },
787
789
  destroyTooltipOnHide: !0,
788
790
  children: /* @__PURE__ */ t(
789
- D.div,
791
+ R.div,
790
792
  {
791
793
  "data-id": e.id,
792
794
  "data-index": a,
793
- "data-parent-ids": c == null ? void 0 : c.join(","),
795
+ "data-parent-ids": d == null ? void 0 : d.join(","),
794
796
  "data-children-length": p,
795
797
  onClick: () => n == null ? void 0 : n(e),
796
- className: y(s && "drag-disabled", o),
797
- children: i ?? /* @__PURE__ */ t(Ln, { ...r })
798
+ className: k(s && "drag-disabled", o),
799
+ children: i ?? /* @__PURE__ */ t(An, { ...r })
798
800
  }
799
801
  )
800
802
  }
801
803
  );
802
- }, An = (r) => {
804
+ }, Dn = (r) => {
803
805
  const {
804
806
  data: e,
805
807
  className: o,
@@ -808,45 +810,45 @@ const It = ot({
808
810
  onClick: s,
809
811
  noLetters: i = !1
810
812
  } = r, {
811
- contextMenuFuns: c,
813
+ contextMenuFuns: d,
812
814
  setList: p,
813
- setOpenGroupItemData: k,
815
+ setOpenGroupItemData: x,
814
816
  longPressTriggered: l,
815
- moveItemId: d,
817
+ moveItemId: c,
816
818
  moveTargetId: b,
817
- setMoveTargetId: x,
818
- listStatus: A
819
- } = be(), { itemIconBuilder: f, theme: h, contextMenu: w } = ue(), { light: v, dark: I } = Y.getTheme(h), { children: u, data: T, config: R } = e, { row: N = 1, col: C = 1 } = R ?? {}, X = {
819
+ setMoveTargetId: v,
820
+ listStatus: D
821
+ } = pe(), { itemIconBuilder: f, theme: g, contextMenu: I } = le(), { light: y, dark: w } = Y.getTheme(g), { children: u, data: S, config: T } = e, { row: C = 1, col: N = 1 } = T ?? {}, O = {
820
822
  visible: { opacity: 1, scale: 1 },
821
823
  hidden: { opacity: 0, scale: 0.95 }
822
- }, Z = ((u == null ? void 0 : u.length) ?? 0) === 0, _ = Z ? [e] : [...u ?? []].slice(0, 9), ae = fe(() => d === e.id.toString(), [e.id, d]), oe = fe(() => b === e.id, [e.id, b]), S = g`
824
+ }, W = ((u == null ? void 0 : u.length) ?? 0) === 0, _ = W ? [e] : [...u ?? []].slice(0, 9), se = he(() => c === e.id.toString(), [e.id, c]), oe = he(() => b === e.id, [e.id, b]), M = h`
823
825
  overflow: hidden;
824
826
  cursor: pointer;
825
- background-color: ${v.itemIconBackgroundColor};
826
- box-shadow: 0 0 0.5rem ${v.itemIconShadowColor};
827
+ background-color: ${y.itemIconBackgroundColor};
828
+ box-shadow: 0 0 0.5rem ${y.itemIconShadowColor};
827
829
  @media (prefers-color-scheme: dark) {
828
- background-color: ${I.itemIconBackgroundColor};
829
- box-shadow: 0 0 0.5rem ${I.itemIconShadowColor};
830
+ background-color: ${w.itemIconBackgroundColor};
831
+ box-shadow: 0 0 0.5rem ${w.itemIconShadowColor};
830
832
  }
831
- `, O = () => {
832
- if (Z)
833
+ `, F = () => {
834
+ if (W)
833
835
  return /* @__PURE__ */ t(
834
- D.div,
836
+ R.div,
835
837
  {
836
- className: y(
838
+ className: k(
837
839
  "sortable-group-item",
838
- g`
840
+ h`
839
841
  overflow: hidden;
840
842
  cursor: pointer;
841
843
  width: 100%;
842
844
  height: 100%;
843
- background-color: ${v.itemIconBackgroundColor};
845
+ background-color: ${y.itemIconBackgroundColor};
844
846
  position: absolute;
845
847
  left: 0;
846
848
  top: 0;
847
849
  border-radius: 0.75rem;
848
850
  @media (prefers-color-scheme: dark) {
849
- background-color: ${I.itemIconBackgroundColor};
851
+ background-color: ${w.itemIconBackgroundColor};
850
852
  }
851
853
  `
852
854
  ),
@@ -856,33 +858,33 @@ const It = ot({
856
858
  children: f == null ? void 0 : f(e)
857
859
  }
858
860
  );
859
- if (N === 1 && C === 1 || N === 2 && C === 2)
861
+ if (C === 1 && N === 1 || C === 2 && N === 2)
860
862
  return /* @__PURE__ */ t(
861
- D.div,
863
+ R.div,
862
864
  {
863
- className: g`
865
+ className: h`
864
866
  display: grid;
865
867
  width: 100%;
866
868
  height: 100%;
867
869
  grid-template-columns: repeat(3, minmax(0, 1fr));
868
870
  grid-template-rows: repeat(3, minmax(0, 1fr));
869
- padding: ${C === 1 ? "0.125rem" : "0.25rem"};
870
- gap: ${C === 1 ? "0.125rem" : "0.5rem"};
871
+ padding: ${N === 1 ? "0.125rem" : "0.25rem"};
872
+ gap: ${N === 1 ? "0.125rem" : "0.5rem"};
871
873
  place-items: center;
872
874
  `,
873
875
  children: _ == null ? void 0 : _.slice(0, 9).map((B) => /* @__PURE__ */ t(
874
- D.div,
876
+ R.div,
875
877
  {
876
- className: y(
877
- S,
878
- g`
879
- border-radius: ${C === 1 ? "0.25rem" : "0.5rem"};
878
+ className: k(
879
+ M,
880
+ h`
881
+ border-radius: ${N === 1 ? "0.25rem" : "0.5rem"};
880
882
  width: 100%;
881
883
  height: 100%;
882
884
  `
883
885
  ),
884
- onClick: (W) => {
885
- W.stopPropagation(), s == null || s(B);
886
+ onClick: (K) => {
887
+ K.stopPropagation(), s == null || s(B);
886
888
  },
887
889
  children: f == null ? void 0 : f(B)
888
890
  },
@@ -890,11 +892,11 @@ const It = ot({
890
892
  ))
891
893
  }
892
894
  );
893
- if (N === 1 && C === 2)
895
+ if (C === 1 && N === 2)
894
896
  return /* @__PURE__ */ t(
895
- D.div,
897
+ R.div,
896
898
  {
897
- className: g`
899
+ className: h`
898
900
  display: grid;
899
901
  grid-template-columns: repeat(10, minmax(0, 1fr));
900
902
  grid-template-rows: repeat(4, minmax(0, 1fr));
@@ -904,18 +906,18 @@ const It = ot({
904
906
  height: 52px;
905
907
  place-items: center;
906
908
  `,
907
- children: _ == null ? void 0 : _.slice(0, 4).map((B, W) => /* @__PURE__ */ t(
908
- D.div,
909
+ children: _ == null ? void 0 : _.slice(0, 4).map((B, K) => /* @__PURE__ */ t(
910
+ R.div,
909
911
  {
910
- className: y(
911
- S,
912
- W < 2 ? g`
912
+ className: k(
913
+ M,
914
+ K < 2 ? h`
913
915
  width: 52px;
914
916
  height: 52px;
915
917
  border-radius: 0.5rem;
916
918
  grid-column: span 4 / span 4;
917
919
  grid-row: span 4 / span 4;
918
- ` : g`
920
+ ` : h`
919
921
  width: 1.5rem;
920
922
  height: 1.5rem;
921
923
  border-radius: 0.375rem;
@@ -924,7 +926,7 @@ const It = ot({
924
926
  `
925
927
  ),
926
928
  onClick: (re) => {
927
- W > 2 || (re.stopPropagation(), s == null || s(B));
929
+ K > 2 || (re.stopPropagation(), s == null || s(B));
928
930
  },
929
931
  children: f == null ? void 0 : f(B)
930
932
  },
@@ -932,11 +934,11 @@ const It = ot({
932
934
  ))
933
935
  }
934
936
  );
935
- if (N === 2 && C === 1)
937
+ if (C === 2 && N === 1)
936
938
  return /* @__PURE__ */ t(
937
- D.div,
939
+ R.div,
938
940
  {
939
- className: g`
941
+ className: h`
940
942
  display: grid;
941
943
  grid-template-columns: repeat(4, minmax(0, 1fr));
942
944
  grid-template-rows: repeat(10, minmax(0, 1fr));
@@ -946,18 +948,18 @@ const It = ot({
946
948
  height: 144px;
947
949
  place-items: center;
948
950
  `,
949
- children: _ == null ? void 0 : _.slice(0, 4).map((B, W) => /* @__PURE__ */ t(
950
- D.div,
951
+ children: _ == null ? void 0 : _.slice(0, 4).map((B, K) => /* @__PURE__ */ t(
952
+ R.div,
951
953
  {
952
- className: y(
953
- S,
954
- W < 2 ? g`
954
+ className: k(
955
+ M,
956
+ K < 2 ? h`
955
957
  width: 52px;
956
958
  height: 52px;
957
959
  border-radius: 0.5rem;
958
960
  grid-column: span 4 / span 4;
959
961
  grid-row: span 4 / span 4;
960
- ` : g`
962
+ ` : h`
961
963
  width: 1.5rem;
962
964
  height: 1.5rem;
963
965
  grid-column: span 2 / span 2;
@@ -965,7 +967,7 @@ const It = ot({
965
967
  `
966
968
  ),
967
969
  onClick: (re) => {
968
- W > 2 || (re.stopPropagation(), s == null || s(B));
970
+ K > 2 || (re.stopPropagation(), s == null || s(B));
969
971
  },
970
972
  children: f == null ? void 0 : f(B)
971
973
  },
@@ -981,45 +983,45 @@ const It = ot({
981
983
  itemIndex: n,
982
984
  parentIds: a,
983
985
  childrenLength: u == null ? void 0 : u.length,
984
- className: y(
985
- g`
986
- grid-row: span ${N};
987
- grid-column: span ${C};
986
+ className: k(
987
+ h`
988
+ grid-row: span ${C};
989
+ grid-column: span ${N};
988
990
  `,
989
991
  o
990
992
  ),
991
993
  children: [
992
994
  /* @__PURE__ */ t(
993
- D.div,
995
+ R.div,
994
996
  {
995
997
  whileTap: { scale: 0.9 },
996
- className: y(
998
+ className: k(
997
999
  oe ? "!scale-110" : "",
998
- g`
1000
+ h`
999
1001
  cursor: pointer;
1000
1002
  position: relative;
1001
1003
  border-radius: 0.75rem;
1002
- background-color: ${v.groupItemIconBackgroundColor};
1003
- box-shadow: 0 0 0.5rem ${v.groupItemIconShadowColor};
1004
+ background-color: ${y.groupItemIconBackgroundColor};
1005
+ box-shadow: 0 0 0.5rem ${y.groupItemIconShadowColor};
1004
1006
  @media (prefers-color-scheme: dark) {
1005
- background-color: ${I.groupItemIconBackgroundColor};
1006
- box-shadow: 0 0 0.5rem ${I.groupItemIconShadowColor};
1007
+ background-color: ${w.groupItemIconBackgroundColor};
1008
+ box-shadow: 0 0 0.5rem ${w.groupItemIconShadowColor};
1007
1009
  }
1008
1010
  /* overflow: hidden; */
1009
1011
  transition: all 0.3s;
1010
1012
  margin: 0 auto;
1011
- width: ${C * 64 + 32 * (C - 1)}px;
1012
- height: ${N * 64 + 32 * (N - 1)}px;
1013
+ width: ${N * 64 + 32 * (N - 1)}px;
1014
+ height: ${C * 64 + 32 * (C - 1)}px;
1013
1015
  `
1014
1016
  ),
1015
1017
  onClick: (B) => {
1016
- !Z && !l && (e.parentIds = a, e.pageX = B.pageX, e.pageY = B.pageY, k(e));
1018
+ !W && !l && (e.parentIds = a, e.pageX = B.pageX, e.pageY = B.pageY, x(e));
1017
1019
  },
1018
- ...c(e, w !== !1),
1020
+ ...d(e, I !== !1),
1019
1021
  children: /* @__PURE__ */ m(
1020
- D.div,
1022
+ R.div,
1021
1023
  {
1022
- className: g`
1024
+ className: h`
1023
1025
  position: relative;
1024
1026
  width: 100%;
1025
1027
  height: 100%;
@@ -1029,20 +1031,20 @@ const It = ot({
1029
1031
  padding: 0.375rem;
1030
1032
  `,
1031
1033
  children: [
1032
- O(),
1034
+ F(),
1033
1035
  /* @__PURE__ */ t(
1034
1036
  $e,
1035
1037
  {
1036
- className: y(
1038
+ className: k(
1037
1039
  "sortable-group-item",
1038
- g`
1040
+ h`
1039
1041
  position: absolute;
1040
1042
  cursor: pointer;
1041
1043
  left: 0.375rem;
1042
1044
  top: 0.375rem;
1043
1045
  width: calc(100% - 0.75rem);
1044
1046
  height: calc(100% - 0.75rem);
1045
- pointer-events: ${A === null ? "none" : "auto"};
1047
+ pointer-events: ${D === null ? "none" : "auto"};
1046
1048
  > * {
1047
1049
  opacity: 0;
1048
1050
  }
@@ -1056,7 +1058,7 @@ const It = ot({
1056
1058
  filter: () => !0,
1057
1059
  "data-id": e.id,
1058
1060
  onChange: () => {
1059
- x(e.id);
1061
+ v(e.id);
1060
1062
  }
1061
1063
  }
1062
1064
  )
@@ -1066,31 +1068,29 @@ const It = ot({
1066
1068
  }
1067
1069
  ),
1068
1070
  /* @__PURE__ */ t(
1069
- D.p,
1071
+ R.p,
1070
1072
  {
1071
- className: y(
1072
- g`
1073
- text-align: center;
1074
- margin-top: 0.25rem;
1075
- margin-bottom: 0;
1076
- color: ${v.itemNameColor};
1073
+ className: k(
1074
+ "whitespace-nowrap text-ellipsis overflow-hidden text-center mt-1 mb-0 max-w-16",
1075
+ h`
1076
+ color: ${y.itemNameColor};
1077
1077
  @media (prefers-color-scheme: dark) {
1078
- color: ${I.itemNameColor};
1078
+ color: ${w.itemNameColor};
1079
1079
  }
1080
1080
  `,
1081
- i && g`
1081
+ i && h`
1082
1082
  color: transparent;
1083
1083
  `
1084
1084
  ),
1085
- variants: X,
1086
- animate: ae ? "hidden" : "visible",
1087
- children: (T == null ? void 0 : T.name) ?? "文件夹"
1085
+ variants: O,
1086
+ animate: se ? "hidden" : "visible",
1087
+ children: (S == null ? void 0 : S.name) ?? "文件夹"
1088
1088
  }
1089
1089
  )
1090
1090
  ]
1091
1091
  }
1092
1092
  );
1093
- }, Tt = g`
1093
+ }, Mt = h`
1094
1094
  padding: 8px;
1095
1095
  transition: all 0.2s;
1096
1096
  > div {
@@ -1102,20 +1102,20 @@ const It = ot({
1102
1102
  transition: all 0.2s;
1103
1103
  }
1104
1104
  }
1105
- `, Dn = (r) => {
1105
+ `, Rn = (r) => {
1106
1106
  const { data: e, onClose: o, onItemClick: a } = r, {
1107
1107
  list: n,
1108
1108
  setList: s,
1109
1109
  setListStatus: i,
1110
- setMoveItemId: c,
1110
+ setMoveItemId: d,
1111
1111
  setMoveTargetId: p,
1112
- updateItem: k
1113
- } = be(), { theme: l } = ue(), { light: d, dark: b } = Y.getTheme(l), [x, A] = H("文件夹"), f = [...(e == null ? void 0 : e.children) ?? []];
1114
- return ie(() => {
1115
- var h;
1116
- e && A((h = e.data) == null ? void 0 : h.name);
1112
+ updateItem: x
1113
+ } = pe(), { theme: l } = le(), { light: c, dark: b } = Y.getTheme(l), [v, D] = H("文件夹"), f = [...(e == null ? void 0 : e.children) ?? []];
1114
+ return ae(() => {
1115
+ var g;
1116
+ e && D((g = e.data) == null ? void 0 : g.name);
1117
1117
  }, [e]), /* @__PURE__ */ t(
1118
- bt,
1118
+ xt,
1119
1119
  {
1120
1120
  visible: !!e,
1121
1121
  onClose: () => {
@@ -1130,7 +1130,7 @@ const It = ot({
1130
1130
  title: /* @__PURE__ */ t(
1131
1131
  "input",
1132
1132
  {
1133
- className: g`
1133
+ className: h`
1134
1134
  background-color: transparent;
1135
1135
  border-style: none;
1136
1136
  text-align: center;
@@ -1144,23 +1144,23 @@ const It = ot({
1144
1144
  outline: none;
1145
1145
  }
1146
1146
  `,
1147
- value: x,
1148
- onChange: (h) => {
1149
- A(h.target.value);
1147
+ value: v,
1148
+ onChange: (g) => {
1149
+ D(g.target.value);
1150
1150
  },
1151
1151
  onBlur: () => {
1152
- e && k(e.id, {
1152
+ e && x(e.id, {
1153
1153
  ...e.data,
1154
- name: x
1154
+ name: v
1155
1155
  });
1156
1156
  }
1157
1157
  }
1158
1158
  ),
1159
1159
  footer: null,
1160
1160
  closable: !1,
1161
- className: y(
1161
+ className: k(
1162
1162
  "group-item-modal",
1163
- g`
1163
+ h`
1164
1164
  .rc-dialog-content {
1165
1165
  background-color: transparent;
1166
1166
  box-shadow: none;
@@ -1175,7 +1175,7 @@ const It = ot({
1175
1175
  }
1176
1176
  }
1177
1177
  .rc-dialog-body {
1178
- background-color: ${d.groupItemModalBackgroundColor};
1178
+ background-color: ${c.groupItemModalBackgroundColor};
1179
1179
  @media (prefers-color-scheme: dark) {
1180
1180
  background-color: ${b.groupItemModalBackgroundColor};
1181
1181
  }
@@ -1190,21 +1190,21 @@ const It = ot({
1190
1190
  children: /* @__PURE__ */ t(
1191
1191
  "div",
1192
1192
  {
1193
- className: g`
1193
+ className: h`
1194
1194
  overflow-y: auto;
1195
1195
  max-height: 60vh;
1196
1196
  padding: 1.25rem 0;
1197
1197
  `,
1198
- onDragLeave: (h) => {
1199
- const w = h.relatedTarget;
1200
- w && (h.currentTarget.contains(w) || setTimeout(() => {
1198
+ onDragLeave: (g) => {
1199
+ const I = g.relatedTarget;
1200
+ I && (g.currentTarget.contains(I) || setTimeout(() => {
1201
1201
  o();
1202
1202
  }, 500));
1203
1203
  },
1204
1204
  children: /* @__PURE__ */ t(
1205
1205
  $e,
1206
1206
  {
1207
- className: g`
1207
+ className: h`
1208
1208
  display: grid;
1209
1209
  gap: 1rem;
1210
1210
  place-items: center;
@@ -1216,28 +1216,28 @@ const It = ot({
1216
1216
  animation: 150,
1217
1217
  fallbackOnBody: !0,
1218
1218
  list: (e == null ? void 0 : e.children) ?? [],
1219
- setList: (h) => {
1220
- var I, u;
1221
- const w = h.map((T) => T.id), v = (u = (I = n.find((T) => T.id === (e == null ? void 0 : e.id))) == null ? void 0 : I.children) == null ? void 0 : u.map((T) => T.id);
1222
- w.length === (v == null ? void 0 : v.length) && w.every((T, R) => T === v[R]) || w.length < ((v == null ? void 0 : v.length) ?? 0) || s(h, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
1219
+ setList: (g) => {
1220
+ var w, u;
1221
+ const I = g.map((S) => S.id), y = (u = (w = n.find((S) => S.id === (e == null ? void 0 : e.id))) == null ? void 0 : w.children) == null ? void 0 : u.map((S) => S.id);
1222
+ I.length === (y == null ? void 0 : y.length) && I.every((S, T) => S === y[T]) || I.length < ((y == null ? void 0 : y.length) ?? 0) || s(g, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
1223
1223
  },
1224
1224
  onMove: () => (p(null), i("onMove"), !0),
1225
- onStart: (h) => {
1226
- const w = h.item.dataset;
1227
- w != null && w.id && c(w.id), i("onMove");
1225
+ onStart: (g) => {
1226
+ const I = g.item.dataset;
1227
+ I != null && I.id && d(I.id), i("onMove");
1228
1228
  },
1229
1229
  onEnd: () => {
1230
- c(null), p(null), i(null);
1230
+ d(null), p(null), i(null);
1231
1231
  },
1232
- ghostClass: Tt,
1233
- children: f.map((h, w) => /* @__PURE__ */ t(
1232
+ ghostClass: Mt,
1233
+ children: f.map((g, I) => /* @__PURE__ */ t(
1234
1234
  Ue,
1235
1235
  {
1236
- data: h,
1237
- itemIndex: w,
1236
+ data: g,
1237
+ itemIndex: I,
1238
1238
  onClick: a
1239
1239
  },
1240
- h.id
1240
+ g.id
1241
1241
  ))
1242
1242
  }
1243
1243
  )
@@ -1245,11 +1245,11 @@ const It = ot({
1245
1245
  )
1246
1246
  }
1247
1247
  );
1248
- }, Rn = (r) => {
1248
+ }, Pn = (r) => {
1249
1249
  var a;
1250
1250
  const { data: e, onClose: o } = r;
1251
1251
  return /* @__PURE__ */ t(
1252
- bt,
1252
+ xt,
1253
1253
  {
1254
1254
  visible: !!e,
1255
1255
  onClose: () => {
@@ -1265,30 +1265,30 @@ const It = ot({
1265
1265
  title: ((a = e == null ? void 0 : e.data) == null ? void 0 : a.name) ?? "信息",
1266
1266
  children: e && /* @__PURE__ */ m("div", { children: [
1267
1267
  /* @__PURE__ */ t("div", { className: "mb-2", children: "开发者信息" }),
1268
- /* @__PURE__ */ t("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ t(wo, { src: e, theme: "monokai" }) })
1268
+ /* @__PURE__ */ t("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ t(No, { src: e, theme: "monokai" }) })
1269
1269
  ] })
1270
1270
  }
1271
1271
  );
1272
- }, Mt = (r) => {
1272
+ }, Lt = (r) => {
1273
1273
  const {
1274
1274
  pagination: e = { position: "bottom" },
1275
1275
  className: o,
1276
1276
  sliderProps: a,
1277
1277
  sliderRef: n,
1278
1278
  onItemClick: s
1279
- } = r, i = he(null), c = he(null), {
1279
+ } = r, i = be(null), d = be(null), {
1280
1280
  list: p,
1281
- setList: k,
1281
+ setList: x,
1282
1282
  setListStatus: l,
1283
- showInfoItemData: d,
1283
+ showInfoItemData: c,
1284
1284
  setShowInfoItemData: b,
1285
- openGroupItemData: x,
1286
- setOpenGroupItemData: A,
1285
+ openGroupItemData: v,
1286
+ setOpenGroupItemData: D,
1287
1287
  setMoveItemId: f,
1288
- setMoveTargetId: h,
1289
- addItem: w
1290
- } = be(), { pagingDotBuilder: v, pagingDotsBuilder: I, itemBuilder: u } = ue(), T = fe(() => e === !1 ? {} : {
1291
- top: g`
1288
+ setMoveTargetId: g,
1289
+ addItem: I
1290
+ } = pe(), { pagingDotBuilder: y, pagingDotsBuilder: w, itemBuilder: u } = le(), S = he(() => e === !1 ? {} : {
1291
+ top: h`
1292
1292
  display: flex;
1293
1293
  flex-direction: column;
1294
1294
  .slick-list {
@@ -1298,12 +1298,12 @@ const It = ot({
1298
1298
  position: static;
1299
1299
  }
1300
1300
  `,
1301
- bottom: g`
1301
+ bottom: h`
1302
1302
  .slick-dots {
1303
1303
  position: static;
1304
1304
  }
1305
1305
  `,
1306
- left: g`
1306
+ left: h`
1307
1307
  .slick-dots {
1308
1308
  position: absolute;
1309
1309
  width: auto;
@@ -1319,7 +1319,7 @@ const It = ot({
1319
1319
  }
1320
1320
  }
1321
1321
  `,
1322
- right: g`
1322
+ right: h`
1323
1323
  .slick-dots {
1324
1324
  position: absolute;
1325
1325
  width: auto;
@@ -1336,9 +1336,9 @@ const It = ot({
1336
1336
  }
1337
1337
  `
1338
1338
  }[e.position ?? "bottom"], [e]);
1339
- return /* @__PURE__ */ m(me, { children: [
1339
+ return /* @__PURE__ */ m(ue, { children: [
1340
1340
  /* @__PURE__ */ t(
1341
- Zt,
1341
+ Qt,
1342
1342
  {
1343
1343
  useCSS: !0,
1344
1344
  useTransform: !0,
@@ -1348,9 +1348,9 @@ const It = ot({
1348
1348
  dots: !0,
1349
1349
  touchMove: !1,
1350
1350
  lazyLoad: "anticipated",
1351
- className: y(
1352
- T,
1353
- g`
1351
+ className: k(
1352
+ S,
1353
+ h`
1354
1354
  .slick-track {
1355
1355
  display: flex;
1356
1356
  align-items: stretch;
@@ -1368,26 +1368,35 @@ const It = ot({
1368
1368
  `,
1369
1369
  o
1370
1370
  ),
1371
- customPaging: (R) => {
1372
- var N, C;
1373
- return v ? v(p[R], R) : /* @__PURE__ */ t(
1371
+ customPaging: (T) => {
1372
+ var C, N;
1373
+ if (y) {
1374
+ const O = y(p[T], T);
1375
+ return Jt.cloneElement(O, {
1376
+ onDragEnter: (W) => {
1377
+ var _;
1378
+ (_ = (n ?? i).current) == null || _.slickGoTo(T), O.props && O.props.onDragEnter && O.props.onDragEnter(W);
1379
+ }
1380
+ });
1381
+ }
1382
+ return /* @__PURE__ */ t(
1374
1383
  "div",
1375
1384
  {
1376
1385
  onDragEnter: () => {
1377
- var X;
1378
- (X = (n ?? i).current) == null || X.slickGoTo(R);
1386
+ var O;
1387
+ (O = (n ?? i).current) == null || O.slickGoTo(T);
1379
1388
  },
1380
- children: (C = (N = p[R]) == null ? void 0 : N.data) == null ? void 0 : C.name
1389
+ children: (N = (C = p[T]) == null ? void 0 : C.data) == null ? void 0 : N.name
1381
1390
  }
1382
1391
  );
1383
1392
  },
1384
- appendDots: (R) => I ? I(R) : e === !1 ? /* @__PURE__ */ t("div", {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
1393
+ appendDots: (T) => w ? w(T) : e === !1 ? /* @__PURE__ */ t("div", {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
1385
1394
  "ul",
1386
1395
  {
1387
- ref: c,
1388
- className: y(
1396
+ ref: d,
1397
+ className: k(
1389
1398
  "slick-dots-default",
1390
- g`
1399
+ h`
1391
1400
  padding: 0.5rem;
1392
1401
  display: inline-flex;
1393
1402
  justify-content: center;
@@ -1408,31 +1417,31 @@ const It = ot({
1408
1417
  }
1409
1418
  `
1410
1419
  ),
1411
- children: R
1420
+ children: T
1412
1421
  }
1413
1422
  ) }),
1414
1423
  ...a,
1415
- children: p.map((R) => /* @__PURE__ */ t(
1424
+ children: p.map((T) => /* @__PURE__ */ t(
1416
1425
  "div",
1417
1426
  {
1418
- onDrop: (N) => {
1419
- N.preventDefault();
1420
- const C = N.dataTransfer.getData("text/plain");
1421
- if (Y.quickJSONCheck(C))
1427
+ onDrop: (C) => {
1428
+ C.preventDefault();
1429
+ const N = C.dataTransfer.getData("text/plain");
1430
+ if (Y.quickJSONCheck(N))
1422
1431
  try {
1423
- w(JSON.parse(C), [R.id]);
1424
- } catch (Z) {
1425
- console.log("drag error", Z);
1432
+ I(JSON.parse(N), [T.id]);
1433
+ } catch (W) {
1434
+ console.log("drag error", W);
1426
1435
  }
1427
1436
  },
1428
- onDragOver: (N) => {
1429
- N.preventDefault();
1437
+ onDragOver: (C) => {
1438
+ C.preventDefault();
1430
1439
  },
1431
1440
  children: /* @__PURE__ */ t(
1432
1441
  $e,
1433
1442
  {
1434
- className: y(
1435
- g`
1443
+ className: k(
1444
+ h`
1436
1445
  display: grid;
1437
1446
  transition: all 0.3s;
1438
1447
  grid-template-columns: repeat(auto-fill, 96px);
@@ -1447,113 +1456,123 @@ const It = ot({
1447
1456
  fallbackOnBody: !0,
1448
1457
  swapThreshold: 0.65,
1449
1458
  group: "nested",
1450
- list: R.children ?? [],
1451
- setList: (N) => k(N, [R.id]),
1459
+ list: T.children ?? [],
1460
+ setList: (C) => x(C, [T.id]),
1452
1461
  filter: ".drag-disabled",
1453
- onMove: (N) => {
1462
+ onMove: (C) => {
1454
1463
  l("onMove");
1455
- const { dragged: C, related: X } = N, Z = C.dataset, _ = X.dataset;
1456
- return h(null), !((Object.keys(_).length === 0 || _.parentIds) && Number(Z.childrenLength) > 0 && X.classList.contains("sortable-group-item"));
1464
+ const { dragged: N, related: O } = C, W = N.dataset, _ = O.dataset;
1465
+ return g(null), !((Object.keys(_).length === 0 || _.parentIds) && Number(W.childrenLength) > 0 && O.classList.contains("sortable-group-item"));
1457
1466
  },
1458
- onStart: (N) => {
1459
- const C = N.item.dataset;
1460
- C != null && C.id && f(C.id), l("onMove");
1467
+ onStart: (C) => {
1468
+ const N = C.item.dataset;
1469
+ N != null && N.id && f(N.id), l("onMove");
1461
1470
  },
1462
1471
  onEnd: () => {
1463
- f(null), h(null), l(null);
1472
+ f(null), g(null), l(null);
1464
1473
  },
1465
- ghostClass: Tt,
1466
- children: (R.children ?? []).map((N, C) => {
1467
- let X;
1474
+ ghostClass: Mt,
1475
+ children: (T.children ?? []).map((C, N) => {
1476
+ let O;
1468
1477
  if (u)
1469
- return u(N);
1470
- switch (N.type) {
1478
+ return u(C);
1479
+ switch (C.type) {
1471
1480
  case "group":
1472
1481
  case "app":
1473
- X = /* @__PURE__ */ t(
1474
- An,
1482
+ O = /* @__PURE__ */ t(
1483
+ Dn,
1475
1484
  {
1476
- data: N,
1477
- itemIndex: C,
1478
- parentIds: [R.id, N.id],
1485
+ data: C,
1486
+ itemIndex: N,
1487
+ parentIds: [T.id, C.id],
1479
1488
  onClick: s
1480
1489
  },
1481
- N.id
1490
+ C.id
1482
1491
  );
1483
1492
  break;
1484
1493
  default:
1485
- X = /* @__PURE__ */ t(
1494
+ O = /* @__PURE__ */ t(
1486
1495
  Ue,
1487
1496
  {
1488
- data: N,
1489
- itemIndex: C,
1497
+ data: C,
1498
+ itemIndex: N,
1490
1499
  onClick: s
1491
1500
  },
1492
- N.id
1501
+ C.id
1493
1502
  );
1494
1503
  break;
1495
1504
  }
1496
- return X;
1505
+ return O;
1497
1506
  })
1498
1507
  }
1499
1508
  )
1500
1509
  },
1501
- R.id
1510
+ T.id
1502
1511
  ))
1503
1512
  }
1504
1513
  ),
1505
1514
  /* @__PURE__ */ t(
1506
- Rn,
1515
+ Pn,
1507
1516
  {
1508
- data: d,
1517
+ data: c,
1509
1518
  onClose: () => {
1510
1519
  b(null);
1511
1520
  }
1512
1521
  }
1513
1522
  ),
1514
1523
  /* @__PURE__ */ t(
1515
- Dn,
1524
+ Rn,
1516
1525
  {
1517
- data: x,
1526
+ data: v,
1518
1527
  onClose: () => {
1519
- A(null);
1528
+ D(null);
1520
1529
  },
1521
1530
  onItemClick: s
1522
1531
  }
1523
1532
  )
1524
1533
  ] });
1525
- }, Pn = (r) => {
1526
- const {
1527
- list: e,
1528
- onChange: o,
1529
- storageKey: a,
1530
- enableCaching: n,
1531
- theme: s,
1532
- noLetters: i,
1533
- contextMenu: c,
1534
- contextMenuBuilder: p,
1535
- itemBuilder: k,
1536
- itemIconBuilder: l,
1537
- pagingDotBuilder: d,
1538
- pagingDotsBuilder: b,
1539
- ...x
1540
- } = r;
1541
- return /* @__PURE__ */ t(St, { ...{
1542
- list: e,
1543
- onChange: o,
1544
- storageKey: a,
1545
- enableCaching: n
1546
- }, children: /* @__PURE__ */ t(wt, { ...{
1547
- theme: s,
1548
- noLetters: i,
1549
- contextMenu: c,
1550
- pagingDotsBuilder: b,
1551
- pagingDotBuilder: d,
1552
- itemBuilder: k,
1553
- itemIconBuilder: l,
1554
- contextMenuBuilder: p
1555
- }, children: /* @__PURE__ */ t(Mt, { ...x }) }) });
1556
- }, Bn = {
1534
+ }, Bn = nt(
1535
+ (r, e) => {
1536
+ const {
1537
+ list: o,
1538
+ onChange: a,
1539
+ storageKey: n,
1540
+ enableCaching: s,
1541
+ theme: i,
1542
+ noLetters: d,
1543
+ contextMenu: p,
1544
+ contextMenuBuilder: x,
1545
+ itemBuilder: l,
1546
+ itemIconBuilder: c,
1547
+ pagingDotBuilder: b,
1548
+ pagingDotsBuilder: v,
1549
+ ...D
1550
+ } = r;
1551
+ return /* @__PURE__ */ t(Tt, { ...{
1552
+ list: o,
1553
+ onChange: a,
1554
+ storageKey: n,
1555
+ enableCaching: s
1556
+ }, children: /* @__PURE__ */ m(Nt, { ...{
1557
+ theme: i,
1558
+ noLetters: d,
1559
+ contextMenu: p,
1560
+ pagingDotsBuilder: v,
1561
+ pagingDotBuilder: b,
1562
+ itemBuilder: l,
1563
+ itemIconBuilder: c,
1564
+ contextMenuBuilder: x
1565
+ }, children: [
1566
+ /* @__PURE__ */ t(() => {
1567
+ const y = pe(), w = le();
1568
+ return ae(() => {
1569
+ e && (typeof e == "function" ? e({ state: y, config: w }) : e.current = { state: y, config: w });
1570
+ }, [y, w]), null;
1571
+ }, {}),
1572
+ /* @__PURE__ */ t(Lt, { ...D })
1573
+ ] }) });
1574
+ }
1575
+ ), zn = {
1557
1576
  frontmatterEditor: {
1558
1577
  title: "编辑前置元数据",
1559
1578
  key: "键",
@@ -1670,13 +1689,13 @@ const It = ot({
1670
1689
  image: {
1671
1690
  delete: "删除图片"
1672
1691
  }
1673
- }, zn = (r, e, o) => {
1692
+ }, En = (r, e, o) => {
1674
1693
  const n = r.split(".").reduce(
1675
1694
  (s, i) => typeof s == "string" ? s : s[i],
1676
- Bn
1695
+ zn
1677
1696
  );
1678
1697
  return typeof n != "string" ? e : o ? n.replace(/{{(.*?)}}/g, (s, i) => o[i]) : n;
1679
- }, En = g`
1698
+ }, $n = h`
1680
1699
  --accentBase: var(--tomato-1);
1681
1700
  --accentBgSubtle: var(--tomato-2);
1682
1701
  --accentBg: var(--tomato-3);
@@ -1730,7 +1749,7 @@ const It = ot({
1730
1749
  rgba(255, 255, 255, 0.05),
1731
1750
  rgba(255, 255, 255, 0.05)
1732
1751
  );
1733
- `, $n = g`
1752
+ `, Hn = h`
1734
1753
  [class*="_toolbarRoot"] {
1735
1754
  flex-wrap: wrap;
1736
1755
  transition: all 0.3s;
@@ -1800,9 +1819,9 @@ const It = ot({
1800
1819
  margin-bottom: 0;
1801
1820
  }
1802
1821
  }
1803
- `, Lt = y(
1822
+ `, At = k(
1804
1823
  "markdown-body",
1805
- g`
1824
+ h`
1806
1825
  p {
1807
1826
  margin-bottom: 8px;
1808
1827
  }
@@ -1823,7 +1842,7 @@ const It = ot({
1823
1842
  }
1824
1843
  }
1825
1844
  `
1826
- ), At = g`
1845
+ ), Dt = h`
1827
1846
  .markdown-body {
1828
1847
  /* light */
1829
1848
  color-scheme: light;
@@ -1878,7 +1897,7 @@ const It = ot({
1878
1897
  --color-prettylights-syntax-meta-diff-range: #8250df;
1879
1898
  --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
1880
1899
  }
1881
- `, Dt = g`
1900
+ `, Rt = h`
1882
1901
  .markdown-body {
1883
1902
  /* dark */
1884
1903
  color-scheme: dark;
@@ -1936,7 +1955,7 @@ const It = ot({
1936
1955
  `, ze = (r) => {
1937
1956
  var e, o;
1938
1957
  return r === "dark" ? !0 : r === "light" ? !1 : (e = document.documentElement.getAttribute("style")) != null && e.includes("color-scheme: dark;") ? !0 : (o = document.documentElement.getAttribute("style")) != null && o.includes("color-scheme: light;") ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
1939
- }, Hn = (r) => {
1958
+ }, On = (r) => {
1940
1959
  const {
1941
1960
  value: e,
1942
1961
  onChange: o,
@@ -1944,16 +1963,16 @@ const It = ot({
1944
1963
  pluginConfig: n,
1945
1964
  className: s,
1946
1965
  theme: i = "auto",
1947
- ...c
1948
- } = r, p = he(null), {
1949
- image: k,
1966
+ ...d
1967
+ } = r, p = be(null), {
1968
+ image: x,
1950
1969
  diffSource: l = {
1951
1970
  viewMode: "rich-text"
1952
1971
  },
1953
- headings: d,
1972
+ headings: c,
1954
1973
  link: b,
1955
- codeBlock: x,
1956
- codeMirror: A = {
1974
+ codeBlock: v,
1975
+ codeMirror: D = {
1957
1976
  codeBlockLanguages: {
1958
1977
  js: "JavaScript",
1959
1978
  css: "CSS",
@@ -1963,121 +1982,121 @@ const It = ot({
1963
1982
  }
1964
1983
  },
1965
1984
  directives: f = {
1966
- directiveDescriptors: [No]
1985
+ directiveDescriptors: [Io]
1967
1986
  }
1968
- } = n ?? {}, [h, w] = H("");
1969
- return ie(() => {
1970
- var v;
1971
- e !== void 0 && p.current && ((v = p.current) == null || v.setMarkdown(e), w(e));
1987
+ } = n ?? {}, [g, I] = H("");
1988
+ return ae(() => {
1989
+ var y;
1990
+ e !== void 0 && p.current && ((y = p.current) == null || y.setMarkdown(e), I(e));
1972
1991
  }, [e, p]), /* @__PURE__ */ t(
1973
- Io,
1992
+ So,
1974
1993
  {
1975
1994
  ref: p,
1976
- className: y(
1977
- $n,
1978
- ze(i) ? En : "",
1979
- ze(i) ? Dt : At,
1995
+ className: k(
1996
+ Hn,
1997
+ ze(i) ? $n : "",
1998
+ ze(i) ? Rt : Dt,
1980
1999
  s
1981
2000
  ),
1982
- contentEditableClassName: Lt,
1983
- markdown: h,
1984
- onChange: (v) => {
1985
- !e && !o && w(v), o && o(v);
2001
+ contentEditableClassName: At,
2002
+ markdown: g,
2003
+ onChange: (y) => {
2004
+ !e && !o && I(y), o && o(y);
1986
2005
  },
1987
- translation: a ?? zn,
2006
+ translation: a ?? En,
1988
2007
  plugins: [
1989
- So({
1990
- toolbarContents: () => /* @__PURE__ */ m(_o, { options: ["rich-text", "source"], children: [
1991
- /* @__PURE__ */ t(jo, {}),
1992
- /* @__PURE__ */ t(le, {}),
2008
+ To({
2009
+ toolbarContents: () => /* @__PURE__ */ m(jo, { options: ["rich-text", "source"], children: [
1993
2010
  /* @__PURE__ */ t(Xo, {}),
2011
+ /* @__PURE__ */ t(ce, {}),
1994
2012
  /* @__PURE__ */ t(Uo, {}),
1995
- /* @__PURE__ */ t(le, {}),
1996
2013
  /* @__PURE__ */ t(Go, {}),
1997
- /* @__PURE__ */ t(le, {}),
2014
+ /* @__PURE__ */ t(ce, {}),
1998
2015
  /* @__PURE__ */ t(qo, {}),
1999
- /* @__PURE__ */ t(le, {}),
2016
+ /* @__PURE__ */ t(ce, {}),
2000
2017
  /* @__PURE__ */ t(Yo, {}),
2018
+ /* @__PURE__ */ t(ce, {}),
2001
2019
  /* @__PURE__ */ t(Vo, {}),
2002
- /* @__PURE__ */ t(le, {}),
2003
2020
  /* @__PURE__ */ t(Wo, {}),
2021
+ /* @__PURE__ */ t(ce, {}),
2004
2022
  /* @__PURE__ */ t(Ko, {}),
2005
- /* @__PURE__ */ t(le, {}),
2006
2023
  /* @__PURE__ */ t(Jo, {}),
2007
- /* @__PURE__ */ t(le, {}),
2008
- /* @__PURE__ */ t(Zo, {})
2024
+ /* @__PURE__ */ t(ce, {}),
2025
+ /* @__PURE__ */ t(Zo, {}),
2026
+ /* @__PURE__ */ t(ce, {}),
2027
+ /* @__PURE__ */ t(Qo, {})
2009
2028
  ] })
2010
2029
  }),
2011
- To(l),
2012
- Mo(),
2030
+ Mo(l),
2013
2031
  Lo(),
2014
- Ao(d),
2015
- Do(b),
2016
- Ro(),
2017
- Po(k),
2018
- Bo(),
2032
+ Ao(),
2033
+ Do(c),
2034
+ Ro(b),
2035
+ Po(),
2036
+ Bo(x),
2019
2037
  zo(),
2020
2038
  Eo(),
2021
- $o(x),
2022
- Ho(A),
2023
- Oo(),
2024
- Fo(f)
2039
+ $o(),
2040
+ Ho(v),
2041
+ Oo(D),
2042
+ Fo(),
2043
+ _o(f)
2025
2044
  ],
2026
- ...c
2045
+ ...d
2027
2046
  }
2028
2047
  );
2029
- }, Rt = (r) => {
2048
+ }, Pt = (r) => {
2030
2049
  const { children: e = "", className: o, theme: a = "auto", imageProps: n } = r;
2031
2050
  return /* @__PURE__ */ t(
2032
2051
  "div",
2033
2052
  {
2034
- className: ze(a) ? Dt : At,
2053
+ className: ze(a) ? Rt : Dt,
2035
2054
  children: /* @__PURE__ */ t(
2036
- xt,
2055
+ yt,
2037
2056
  {
2038
- className: y(Lt, o),
2039
- remarkPlugins: [Qo, er],
2040
- rehypePlugins: [tr],
2057
+ className: k(At, o),
2058
+ remarkPlugins: [er, tr],
2059
+ rehypePlugins: [or],
2041
2060
  components: {
2042
2061
  code(s) {
2043
- const { children: i, className: c, node: p, ref: k, ...l } = s, d = /language-(\w+)/.exec(c || "");
2044
- return d ? /* @__PURE__ */ t(
2045
- or,
2062
+ const { children: i, className: d, node: p, ref: x, ...l } = s, c = /language-(\w+)/.exec(d || "");
2063
+ return c ? /* @__PURE__ */ t(
2064
+ rr,
2046
2065
  {
2047
2066
  ...l,
2048
2067
  PreTag: "div",
2049
2068
  children: String(i).replace(/\n$/, ""),
2050
- language: d[1],
2051
- style: rr
2069
+ language: c[1],
2070
+ style: nr
2052
2071
  }
2053
- ) : /* @__PURE__ */ t("code", { ...l, className: c, children: i });
2072
+ ) : /* @__PURE__ */ t("code", { ...l, className: d, children: i });
2054
2073
  },
2055
2074
  img(s) {
2056
- const { preview: i, ...c } = n ?? {};
2075
+ const { preview: i, ...d } = n ?? {};
2057
2076
  return /* @__PURE__ */ t(
2058
- nr,
2077
+ ar,
2059
2078
  {
2060
2079
  ...s,
2061
2080
  preview: i instanceof Boolean ? i : {
2062
2081
  icons: {
2063
- rotateLeft: /* @__PURE__ */ t(go, {}),
2064
- rotateRight: /* @__PURE__ */ t(po, {}),
2065
- zoomIn: /* @__PURE__ */ t(uo, {}),
2066
- zoomOut: /* @__PURE__ */ t(mo, {}),
2067
- close: /* @__PURE__ */ t(co, {}),
2068
- left: /* @__PURE__ */ t(lo, {}),
2069
- right: /* @__PURE__ */ t(io, {}),
2070
- flipX: /* @__PURE__ */ t(so, {}),
2071
- flipY: /* @__PURE__ */ t(ao, {})
2082
+ rotateLeft: /* @__PURE__ */ t(fo, {}),
2083
+ rotateRight: /* @__PURE__ */ t(go, {}),
2084
+ zoomIn: /* @__PURE__ */ t(po, {}),
2085
+ zoomOut: /* @__PURE__ */ t(uo, {}),
2086
+ close: /* @__PURE__ */ t(mo, {}),
2087
+ left: /* @__PURE__ */ t(co, {}),
2088
+ right: /* @__PURE__ */ t(lo, {}),
2089
+ flipX: /* @__PURE__ */ t(io, {}),
2090
+ flipY: /* @__PURE__ */ t(so, {})
2072
2091
  },
2073
2092
  zIndex: 9999,
2074
2093
  mask: " ",
2075
2094
  ...i
2076
2095
  },
2077
- className: g`
2096
+ className: h`
2078
2097
  cursor: zoom-in;
2079
2098
  `,
2080
- ...c
2099
+ ...d
2081
2100
  }
2082
2101
  );
2083
2102
  }
@@ -2087,52 +2106,60 @@ const It = ot({
2087
2106
  )
2088
2107
  }
2089
2108
  );
2090
- }, Pt = Hn;
2091
- Pt.Preview = Rt;
2092
- function Bt(...r) {
2093
- return sr(ar(r));
2109
+ }, Bt = On;
2110
+ Bt.Preview = Pt;
2111
+ function zt(...r) {
2112
+ return ir(sr(r));
2094
2113
  }
2095
2114
  const Ge = (r) => {
2096
- const { mouseX: e, title: o, icon: a, href: n, children: s } = r, i = he(null), c = xe(e, (v) => {
2097
- var u;
2098
- const I = ((u = i.current) == null ? void 0 : u.getBoundingClientRect()) ?? { x: 0, width: 0 };
2099
- return v - I.x - I.width / 2;
2100
- }), p = xe(c, [-150, 0, 150], [40, 80, 40]), k = xe(c, [-150, 0, 150], [40, 80, 40]), l = xe(
2101
- c,
2115
+ const {
2116
+ mouseX: e,
2117
+ title: o,
2118
+ icon: a,
2119
+ href: n,
2120
+ children: s,
2121
+ as: i = R.div,
2122
+ ...d
2123
+ } = r, p = be(null), x = xe(e, (S) => {
2124
+ var C;
2125
+ const T = ((C = p.current) == null ? void 0 : C.getBoundingClientRect()) ?? { x: 0, width: 0 };
2126
+ return S - T.x - T.width / 2;
2127
+ }), l = xe(x, [-150, 0, 150], [40, 80, 40]), c = xe(x, [-150, 0, 150], [40, 80, 40]), b = xe(
2128
+ x,
2102
2129
  [-150, 0, 150],
2103
2130
  [20, 40, 20]
2104
- ), d = xe(
2105
- c,
2131
+ ), v = xe(
2132
+ x,
2106
2133
  [-150, 0, 150],
2107
2134
  [20, 40, 20]
2108
- ), b = Te(p, {
2135
+ ), D = Te(l, {
2109
2136
  mass: 0.1,
2110
2137
  stiffness: 150,
2111
2138
  damping: 12
2112
- }), x = Te(k, {
2139
+ }), f = Te(c, {
2113
2140
  mass: 0.1,
2114
2141
  stiffness: 150,
2115
2142
  damping: 12
2116
- }), A = Te(l, {
2143
+ }), g = Te(b, {
2117
2144
  mass: 0.1,
2118
2145
  stiffness: 150,
2119
2146
  damping: 12
2120
- }), f = Te(d, {
2147
+ }), I = Te(v, {
2121
2148
  mass: 0.1,
2122
2149
  stiffness: 150,
2123
2150
  damping: 12
2124
- }), [h, w] = H(!1);
2125
- return /* @__PURE__ */ t("a", { href: n, children: /* @__PURE__ */ m(
2126
- D.div,
2151
+ }), [y, w] = H(!1), u = /* @__PURE__ */ m(
2152
+ i,
2127
2153
  {
2128
- ref: i,
2129
- style: { width: b, height: x },
2154
+ ref: p,
2155
+ style: { width: D, height: f },
2130
2156
  onMouseEnter: () => w(!0),
2131
2157
  onMouseLeave: () => w(!1),
2132
2158
  className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
2159
+ ...d,
2133
2160
  children: [
2134
- /* @__PURE__ */ t(He, { children: h && /* @__PURE__ */ t(
2135
- D.div,
2161
+ o && /* @__PURE__ */ t(He, { children: y && /* @__PURE__ */ t(
2162
+ R.div,
2136
2163
  {
2137
2164
  initial: { opacity: 0, y: 10, x: "-50%" },
2138
2165
  animate: { opacity: 1, y: 0, x: "-50%" },
@@ -2141,44 +2168,45 @@ const Ge = (r) => {
2141
2168
  children: o
2142
2169
  }
2143
2170
  ) }),
2144
- " ",
2145
2171
  /* @__PURE__ */ t(
2146
- D.div,
2172
+ R.div,
2147
2173
  {
2148
- style: { width: A, height: f },
2174
+ style: { width: g, height: I },
2149
2175
  className: "flex items-center justify-center",
2150
2176
  children: s || a
2151
2177
  }
2152
2178
  )
2153
2179
  ]
2154
2180
  }
2155
- ) });
2181
+ );
2182
+ return n ? /* @__PURE__ */ t("a", { href: n }) : u;
2156
2183
  }, qe = (r) => {
2157
2184
  const {
2158
2185
  items: e = [],
2159
2186
  className: o,
2160
2187
  itemBuilder: a,
2161
2188
  children: n,
2162
- mouseX: s
2163
- } = r, i = nt(1 / 0), c = s ?? i;
2189
+ mouseX: s,
2190
+ as: i = R.div
2191
+ } = r, d = at(1 / 0), p = s ?? d;
2164
2192
  return /* @__PURE__ */ t(
2165
- D.div,
2193
+ i,
2166
2194
  {
2167
- onMouseMove: (p) => c.set(p.pageX),
2168
- onMouseLeave: () => c.set(1 / 0),
2169
- className: Bt(
2195
+ onMouseMove: (x) => p.set(x.pageX),
2196
+ onMouseLeave: () => p.set(1 / 0),
2197
+ className: zt(
2170
2198
  "mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",
2171
2199
  o
2172
2200
  ),
2173
2201
  children: n || e.map(
2174
- (p) => a ? a(p, c) : /* @__PURE__ */ t(Ge, { mouseX: c, ...p }, p.title)
2202
+ (x) => a ? a(x, p) : /* @__PURE__ */ t(Ge, { mouseX: p, ...x }, x.title)
2175
2203
  )
2176
2204
  }
2177
2205
  );
2178
2206
  }, De = (r) => {
2179
- const { title: e, icon: o, href: a, index: n, totalItems: s, children: i } = r;
2207
+ const { title: e, icon: o, href: a, index: n, totalItems: s, children: i, ...d } = r;
2180
2208
  return /* @__PURE__ */ t(
2181
- D.div,
2209
+ R.div,
2182
2210
  {
2183
2211
  initial: { opacity: 0, y: 10 },
2184
2212
  animate: {
@@ -2193,6 +2221,7 @@ const Ge = (r) => {
2193
2221
  }
2194
2222
  },
2195
2223
  transition: { delay: (s - 1 - n) * 0.05 },
2224
+ ...d,
2196
2225
  children: i || /* @__PURE__ */ t(
2197
2226
  "a",
2198
2227
  {
@@ -2212,34 +2241,34 @@ const Ge = (r) => {
2212
2241
  autoHidden: n = !1,
2213
2242
  itemBuilder: s,
2214
2243
  children: i
2215
- } = r, [c, p] = H(!1), k = () => {
2216
- p(!c);
2244
+ } = r, [d, p] = H(!1), x = () => {
2245
+ p(!d);
2217
2246
  };
2218
2247
  return /* @__PURE__ */ m(
2219
2248
  "div",
2220
2249
  {
2221
- className: Bt("relative block", n ? "md:hidden" : "", o),
2250
+ className: zt("relative block", n ? "md:hidden" : "", o),
2222
2251
  children: [
2223
- /* @__PURE__ */ t(He, { children: c && /* @__PURE__ */ t(
2224
- D.div,
2252
+ /* @__PURE__ */ t(He, { children: d && /* @__PURE__ */ t(
2253
+ R.div,
2225
2254
  {
2226
2255
  layoutId: "nav",
2227
2256
  className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
2228
2257
  children: i || e.map(
2229
- (l, d) => s ? /* @__PURE__ */ t(
2258
+ (l, c) => s ? /* @__PURE__ */ t(
2230
2259
  De,
2231
2260
  {
2232
2261
  ...l,
2233
- index: d,
2262
+ index: c,
2234
2263
  totalItems: e.length,
2235
- children: s(l, d, e)
2264
+ children: s(l, c, e)
2236
2265
  },
2237
2266
  l.title
2238
2267
  ) : /* @__PURE__ */ t(
2239
2268
  De,
2240
2269
  {
2241
2270
  ...l,
2242
- index: d,
2271
+ index: c,
2243
2272
  totalItems: e.length
2244
2273
  },
2245
2274
  l.title
@@ -2250,15 +2279,15 @@ const Ge = (r) => {
2250
2279
  /* @__PURE__ */ t(
2251
2280
  "button",
2252
2281
  {
2253
- onClick: k,
2282
+ onClick: x,
2254
2283
  className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
2255
- children: a || /* @__PURE__ */ t(fo, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
2284
+ children: a || /* @__PURE__ */ t(ho, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
2256
2285
  }
2257
2286
  )
2258
2287
  ]
2259
2288
  }
2260
2289
  );
2261
- }, On = (r) => {
2290
+ }, Fn = (r) => {
2262
2291
  const {
2263
2292
  items: e,
2264
2293
  desktopClassName: o,
@@ -2266,11 +2295,11 @@ const Ge = (r) => {
2266
2295
  desktopItemBuilder: n,
2267
2296
  mobileItemBuilder: s,
2268
2297
  desktopChildren: i,
2269
- mobileChildren: c,
2298
+ mobileChildren: d,
2270
2299
  desktopMouseX: p,
2271
- ...k
2300
+ ...x
2272
2301
  } = r;
2273
- return /* @__PURE__ */ m(me, { children: [
2302
+ return /* @__PURE__ */ m(ue, { children: [
2274
2303
  /* @__PURE__ */ t(
2275
2304
  qe,
2276
2305
  {
@@ -2279,7 +2308,7 @@ const Ge = (r) => {
2279
2308
  itemBuilder: n,
2280
2309
  children: i,
2281
2310
  mouseX: p,
2282
- ...k
2311
+ ...x
2283
2312
  }
2284
2313
  ),
2285
2314
  /* @__PURE__ */ t(
@@ -2288,42 +2317,42 @@ const Ge = (r) => {
2288
2317
  items: e,
2289
2318
  className: a,
2290
2319
  itemBuilder: s,
2291
- children: c,
2320
+ children: d,
2292
2321
  autoHidden: !0,
2293
- ...k
2322
+ ...x
2294
2323
  }
2295
2324
  )
2296
2325
  ] });
2297
- }, we = On;
2326
+ }, we = Fn;
2298
2327
  we.Desktop = qe;
2299
2328
  we.DesktopItem = Ge;
2300
2329
  we.Mobile = Ye;
2301
2330
  we.MobileItem = De;
2302
- const Fn = /* @__PURE__ */ wn({
2331
+ const _n = /* @__PURE__ */ Nn({
2303
2332
  __proto__: null
2304
- }, [Qr]);
2305
- function _n() {
2333
+ }, [en]);
2334
+ function jn() {
2306
2335
  try {
2307
- return Fn;
2336
+ return _n;
2308
2337
  } catch {
2309
2338
  return null;
2310
2339
  }
2311
2340
  }
2312
- function jn(r, e) {
2341
+ function Xn(r, e) {
2313
2342
  if (r && typeof r.serializeForClipboard == "function")
2314
2343
  return r.serializeForClipboard(e);
2315
- const o = _n();
2344
+ const o = jn();
2316
2345
  if (o && typeof (o == null ? void 0 : o.__serializeForClipboard) == "function")
2317
2346
  return o.__serializeForClipboard(r, e);
2318
2347
  throw new Error("No supported clipboard serialization method found.");
2319
2348
  }
2320
- function Xn(r) {
2349
+ function Un(r) {
2321
2350
  const e = r.getBoundingClientRect(), o = r.closest('[role="dialog"]'), a = r.closest(".ProseMirror"), n = a == null ? void 0 : a.getBoundingClientRect(), s = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop;
2322
2351
  if (o && window.getComputedStyle(o).transform !== "none") {
2323
- const c = o.getBoundingClientRect();
2352
+ const d = o.getBoundingClientRect();
2324
2353
  return {
2325
- top: e.top - c.top + i,
2326
- left: e.left - c.left + s,
2354
+ top: e.top - d.top + i,
2355
+ left: e.left - d.left + s,
2327
2356
  width: e.width
2328
2357
  };
2329
2358
  }
@@ -2366,10 +2395,10 @@ function Le(r, e) {
2366
2395
  const o = e.state.doc.resolve(r);
2367
2396
  return o.depth > 1 ? o.before(o.depth) : r;
2368
2397
  }
2369
- function Un(r) {
2398
+ function Gn(r) {
2370
2399
  let e = "", o = !1;
2371
- function a(l, d) {
2372
- if (d.focus(), !l.dataTransfer) return;
2400
+ function a(l, c) {
2401
+ if (c.focus(), !l.dataTransfer) return;
2373
2402
  const b = Ze(
2374
2403
  {
2375
2404
  x: l.clientX + 50 + r.dragHandleWidth,
@@ -2378,35 +2407,35 @@ function Un(r) {
2378
2407
  r
2379
2408
  );
2380
2409
  if (!(b instanceof Element)) return;
2381
- let x = Qe(b, d, r);
2382
- if (x == null || x < 0) return;
2383
- x = Le(x, d);
2384
- const { from: A, to: f } = d.state.selection, h = A - f, w = Le(A, d);
2385
- let v = !1;
2386
- const I = d.state.doc.resolve(w);
2387
- if (I.node().type.name === "doc") v = !0;
2410
+ let v = Qe(b, c, r);
2411
+ if (v == null || v < 0) return;
2412
+ v = Le(v, c);
2413
+ const { from: D, to: f } = c.state.selection, g = D - f, I = Le(D, c);
2414
+ let y = !1;
2415
+ const w = c.state.doc.resolve(I);
2416
+ if (w.node().type.name === "doc") y = !0;
2388
2417
  else {
2389
- const C = K.create(
2390
- d.state.doc,
2391
- I.before()
2418
+ const N = J.create(
2419
+ c.state.doc,
2420
+ w.before()
2392
2421
  );
2393
- v = !(x + 1 >= C.$from.pos && x <= C.$to.pos);
2422
+ y = !(v + 1 >= N.$from.pos && v <= N.$to.pos);
2394
2423
  }
2395
- let u = d.state.selection;
2396
- if (!v && h !== 0 && !(d.state.selection instanceof K)) {
2397
- const C = K.create(d.state.doc, f - 1);
2398
- u = Kr.create(
2399
- d.state.doc,
2400
- x,
2401
- C.$to.pos
2424
+ let u = c.state.selection;
2425
+ if (!y && g !== 0 && !(c.state.selection instanceof J)) {
2426
+ const N = J.create(c.state.doc, f - 1);
2427
+ u = Jr.create(
2428
+ c.state.doc,
2429
+ v,
2430
+ N.$to.pos
2402
2431
  );
2403
- } else if (u = K.create(d.state.doc, x), u.node.type.isInline || u.node.type.name === "tableRow") {
2404
- const C = d.state.doc.resolve(u.from);
2405
- u = K.create(d.state.doc, C.before());
2432
+ } else if (u = J.create(c.state.doc, v), u.node.type.isInline || u.node.type.name === "tableRow") {
2433
+ const N = c.state.doc.resolve(u.from);
2434
+ u = J.create(c.state.doc, N.before());
2406
2435
  }
2407
- d.dispatch(d.state.tr.setSelection(u)), d.state.selection instanceof K && d.state.selection.node.type.name === "listItem" && (e = b.parentElement.tagName);
2408
- const T = d.state.selection.content(), { dom: R, text: N } = jn(d, T);
2409
- l.dataTransfer.clearData(), l.dataTransfer.setData("text/html", R.innerHTML), l.dataTransfer.setData("text/plain", N), l.dataTransfer.effectAllowed = "copyMove", l.dataTransfer.setDragImage(b, 0, 0), d.dragging = { slice: T, move: l.ctrlKey };
2436
+ c.dispatch(c.state.tr.setSelection(u)), c.state.selection instanceof J && c.state.selection.node.type.name === "listItem" && (e = b.parentElement.tagName);
2437
+ const S = c.state.selection.content(), { dom: T, text: C } = Xn(c, S);
2438
+ l.dataTransfer.clearData(), l.dataTransfer.setData("text/html", T.innerHTML), l.dataTransfer.setData("text/plain", C), l.dataTransfer.effectAllowed = "copyMove", l.dataTransfer.setDragImage(b, 0, 0), c.dragging = { slice: S, move: l.ctrlKey };
2410
2439
  }
2411
2440
  let n = null;
2412
2441
  function s() {
@@ -2415,82 +2444,82 @@ function Un(r) {
2415
2444
  function i() {
2416
2445
  n && n.classList.remove("hide");
2417
2446
  }
2418
- function c(l, d) {
2419
- const b = Le(d, l), x = K.create(l.state.doc, b);
2420
- l.dispatch(l.state.tr.setSelection(x)), l.focus(), o = !0;
2447
+ function d(l, c) {
2448
+ const b = Le(c, l), v = J.create(l.state.doc, b);
2449
+ l.dispatch(l.state.tr.setSelection(v)), l.focus(), o = !0;
2421
2450
  }
2422
2451
  function p(l) {
2423
- if (o = l.state.selection instanceof K, o && (n != null && n.dataset.nodePos)) {
2452
+ if (o = l.state.selection instanceof J, o && (n != null && n.dataset.nodePos)) {
2424
2453
  const b = parseInt(n.dataset.nodePos, 10);
2425
2454
  try {
2426
- const x = l.state.doc.resolve(b);
2427
- x && x.parent && x.parent.type.name !== "doc" || (o = !1, s());
2455
+ const v = l.state.doc.resolve(b);
2456
+ v && v.parent && v.parent.type.name !== "doc" || (o = !1, s());
2428
2457
  } catch {
2429
2458
  o = !1, s();
2430
2459
  }
2431
2460
  }
2432
2461
  o && n && !n.classList.contains("hide") ? i() : o || s();
2433
2462
  }
2434
- function k(l) {
2463
+ function x(l) {
2435
2464
  if (!(l.target instanceof Element)) return;
2436
- const d = l.relatedTarget;
2437
- if (!d) {
2465
+ const c = l.relatedTarget;
2466
+ if (!c) {
2438
2467
  o || s();
2439
2468
  return;
2440
2469
  }
2441
- const b = d.closest(".drag-handle") || d.classList.contains("drag-handle"), x = d.closest(".tiptap") || d.classList.contains("tiptap");
2442
- !b && !x && !o && s();
2470
+ const b = c.closest(".drag-handle") || c.classList.contains("drag-handle"), v = c.closest(".tiptap") || c.classList.contains("tiptap");
2471
+ !b && !v && !o && s();
2443
2472
  }
2444
- return new Vr({
2445
- key: new Wr(r.pluginKey),
2473
+ return new Wr({
2474
+ key: new Kr(r.pluginKey),
2446
2475
  view: (l) => {
2447
- var f, h, w, v;
2448
- const d = r.dragHandleSelector ? document.querySelector(r.dragHandleSelector) : null;
2449
- n = d ?? document.createElement("div"), n.draggable = !0, n.dataset.dragHandle = "", n.classList.add("drag-handle");
2450
- function b(I) {
2451
- a(I, l);
2476
+ var f, g, I, y;
2477
+ const c = r.dragHandleSelector ? document.querySelector(r.dragHandleSelector) : null;
2478
+ n = c ?? document.createElement("div"), n.draggable = !0, n.dataset.dragHandle = "", n.classList.add("drag-handle");
2479
+ function b(w) {
2480
+ a(w, l);
2452
2481
  }
2453
2482
  n.addEventListener("dragstart", b);
2454
- function x(I) {
2455
- d || (I.preventDefault(), I.stopPropagation());
2483
+ function v(w) {
2484
+ c || (w.preventDefault(), w.stopPropagation());
2456
2485
  const u = n == null ? void 0 : n.dataset.nodePos;
2457
- u && c(l, parseInt(u, 10));
2486
+ u && d(l, parseInt(u, 10));
2458
2487
  }
2459
- n.addEventListener("click", x);
2460
- function A(I) {
2488
+ n.addEventListener("click", v);
2489
+ function D(w) {
2461
2490
  s();
2462
2491
  const u = window.scrollY;
2463
- I.clientY < r.scrollTreshold ? window.scrollTo({ top: u - 30, behavior: "smooth" }) : window.innerHeight - I.clientY < r.scrollTreshold && window.scrollTo({ top: u + 30, behavior: "smooth" });
2492
+ w.clientY < r.scrollTreshold ? window.scrollTo({ top: u - 30, behavior: "smooth" }) : window.innerHeight - w.clientY < r.scrollTreshold && window.scrollTo({ top: u + 30, behavior: "smooth" });
2464
2493
  }
2465
- return n.addEventListener("drag", A), s(), d || (h = (f = l == null ? void 0 : l.dom) == null ? void 0 : f.parentElement) == null || h.appendChild(n), (v = (w = l == null ? void 0 : l.dom) == null ? void 0 : w.parentElement) == null || v.addEventListener(
2494
+ return n.addEventListener("drag", D), s(), c || (g = (f = l == null ? void 0 : l.dom) == null ? void 0 : f.parentElement) == null || g.appendChild(n), (y = (I = l == null ? void 0 : l.dom) == null ? void 0 : I.parentElement) == null || y.addEventListener(
2466
2495
  "mouseout",
2467
- k
2496
+ x
2468
2497
  ), {
2469
2498
  destroy: () => {
2470
- var I, u, T;
2471
- d || (I = n == null ? void 0 : n.remove) == null || I.call(n), n == null || n.removeEventListener("drag", A), n == null || n.removeEventListener(
2499
+ var w, u, S;
2500
+ c || (w = n == null ? void 0 : n.remove) == null || w.call(n), n == null || n.removeEventListener("drag", D), n == null || n.removeEventListener(
2472
2501
  "dragstart",
2473
2502
  b
2474
- ), n == null || n.removeEventListener("click", x), n = null, (T = (u = l == null ? void 0 : l.dom) == null ? void 0 : u.parentElement) == null || T.removeEventListener(
2503
+ ), n == null || n.removeEventListener("click", v), n = null, (S = (u = l == null ? void 0 : l.dom) == null ? void 0 : u.parentElement) == null || S.removeEventListener(
2475
2504
  "mouseout",
2476
- k
2505
+ x
2477
2506
  );
2478
2507
  }
2479
2508
  };
2480
2509
  },
2481
2510
  props: {
2482
2511
  handleDOMEvents: {
2483
- mousemove: (l, d) => {
2512
+ mousemove: (l, c) => {
2484
2513
  if (!l.editable)
2485
2514
  return;
2486
2515
  const b = Ze(
2487
2516
  {
2488
- x: d.clientX + 50 + r.dragHandleWidth,
2489
- y: d.clientY
2517
+ x: c.clientX + 50 + r.dragHandleWidth,
2518
+ y: c.clientY
2490
2519
  },
2491
2520
  r
2492
- ), x = b == null ? void 0 : b.closest(".not-draggable"), A = r.excludedTags.concat(["ol", "ul"]).join(", ");
2493
- if (!(b instanceof Element) || b.matches(A) || x) {
2521
+ ), v = b == null ? void 0 : b.closest(".not-draggable"), D = r.excludedTags.concat(["ol", "ul"]).join(", ");
2522
+ if (!(b instanceof Element) || b.matches(D) || v) {
2494
2523
  o || s();
2495
2524
  return;
2496
2525
  }
@@ -2498,8 +2527,8 @@ function Un(r) {
2498
2527
  f != null && f >= 0 && (n.dataset.nodePos = String(
2499
2528
  Le(f, l)
2500
2529
  ));
2501
- const h = window.getComputedStyle(b), w = parseInt(h.lineHeight, 10), v = isNaN(w) ? parseInt(h.fontSize) * 1.2 : w, I = parseInt(h.paddingTop, 10), u = Xn(b);
2502
- u.top += (v - 24) / 2, u.top += I, b.matches("ul:not([data-type=taskList]) li, ol li") && (u.left -= r.dragHandleWidth - 28), u.width = r.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${u.left - u.width}px`, n.style.top = `${u.top}px`, i());
2530
+ const g = window.getComputedStyle(b), I = parseInt(g.lineHeight, 10), y = isNaN(I) ? parseInt(g.fontSize) * 1.2 : I, w = parseInt(g.paddingTop, 10), u = Un(b);
2531
+ u.top += (y - 24) / 2, u.top += w, b.matches("ul:not([data-type=taskList]) li, ol li") && (u.left -= r.dragHandleWidth - 28), u.width = r.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${u.left - u.width}px`, n.style.top = `${u.top}px`, i());
2503
2532
  },
2504
2533
  keydown: () => {
2505
2534
  o || s();
@@ -2515,22 +2544,22 @@ function Un(r) {
2515
2544
  dragstart: (l) => {
2516
2545
  l.dom.classList.add("dragging");
2517
2546
  },
2518
- drop: (l, d) => {
2519
- var h;
2547
+ drop: (l, c) => {
2548
+ var g;
2520
2549
  l.dom.classList.remove("dragging"), s();
2521
2550
  let b = null;
2522
- const x = l.posAtCoords({
2523
- left: d.clientX,
2524
- top: d.clientY
2551
+ const v = l.posAtCoords({
2552
+ left: c.clientX,
2553
+ top: c.clientY
2525
2554
  });
2526
- if (!x || (l.state.selection instanceof K && (b = l.state.selection.node), !b)) return;
2527
- const f = l.state.doc.resolve(x.pos).parent.type.name === "listItem";
2528
- if (l.state.selection instanceof K && l.state.selection.node.type.name === "listItem" && !f && e == "OL") {
2529
- const w = (h = l.state.schema.nodes.orderedList) == null ? void 0 : h.createAndFill(
2555
+ if (!v || (l.state.selection instanceof J && (b = l.state.selection.node), !b)) return;
2556
+ const f = l.state.doc.resolve(v.pos).parent.type.name === "listItem";
2557
+ if (l.state.selection instanceof J && l.state.selection.node.type.name === "listItem" && !f && e == "OL") {
2558
+ const I = (g = l.state.schema.nodes.orderedList) == null ? void 0 : g.createAndFill(
2530
2559
  null,
2531
2560
  b
2532
- ), v = new Jr(Zr.from(w), 0, 0);
2533
- l.dragging = { slice: v, move: d.ctrlKey };
2561
+ ), y = new Zr(Qr.from(I), 0, 0);
2562
+ l.dragging = { slice: y, move: c.ctrlKey };
2534
2563
  }
2535
2564
  },
2536
2565
  dragend: (l) => {
@@ -2543,22 +2572,22 @@ function Un(r) {
2543
2572
  init() {
2544
2573
  return {};
2545
2574
  },
2546
- apply(l, d, b, x) {
2575
+ apply(l, c, b, v) {
2547
2576
  if (l.docChanged && n && n.dataset.nodePos) {
2548
- const A = parseInt(n.dataset.nodePos, 10);
2577
+ const D = parseInt(n.dataset.nodePos, 10);
2549
2578
  try {
2550
- const f = x.doc.resolve(A);
2579
+ const f = v.doc.resolve(D);
2551
2580
  (!f || f.parent.type.name === "doc") && (o = !1, s());
2552
2581
  } catch {
2553
2582
  o = !1, s();
2554
2583
  }
2555
2584
  }
2556
- return d;
2585
+ return c;
2557
2586
  }
2558
2587
  }
2559
2588
  });
2560
2589
  }
2561
- const Gn = Yr.create({
2590
+ const qn = Vr.create({
2562
2591
  name: "globalDragHandle",
2563
2592
  addOptions() {
2564
2593
  return {
@@ -2570,7 +2599,7 @@ const Gn = Yr.create({
2570
2599
  },
2571
2600
  addProseMirrorPlugins() {
2572
2601
  return [
2573
- Un({
2602
+ Gn({
2574
2603
  pluginKey: "globalDragHandle",
2575
2604
  dragHandleWidth: this.options.dragHandleWidth,
2576
2605
  scrollTreshold: this.options.scrollTreshold,
@@ -2580,18 +2609,18 @@ const Gn = Yr.create({
2580
2609
  })
2581
2610
  ];
2582
2611
  }
2583
- }), qn = yr, Yn = ir.configure({
2612
+ }), Yn = vr, Vn = lr.configure({
2584
2613
  placeholder: "撰写任何内容,或者按“/”输入命令..."
2585
- }), Vn = lr.configure({
2614
+ }), Wn = cr.configure({
2586
2615
  HTMLAttributes: {
2587
2616
  class: q(
2588
2617
  "text-muted-foreground underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer"
2589
2618
  )
2590
2619
  }
2591
- }), Wn = cr.extend({
2620
+ }), Kn = dr.extend({
2592
2621
  addProseMirrorPlugins() {
2593
2622
  return [
2594
- dr({
2623
+ mr({
2595
2624
  imageClass: q("opacity-40 rounded-lg border border-stone-200")
2596
2625
  })
2597
2626
  ];
@@ -2601,24 +2630,24 @@ const Gn = Yr.create({
2601
2630
  HTMLAttributes: {
2602
2631
  class: q("rounded-lg border border-muted")
2603
2632
  }
2604
- }), Kn = mr.configure({
2633
+ }), Jn = ur.configure({
2605
2634
  HTMLAttributes: {
2606
2635
  class: q("rounded-lg border border-muted")
2607
2636
  }
2608
- }), Jn = ur.configure({
2637
+ }), Zn = pr.configure({
2609
2638
  HTMLAttributes: {
2610
2639
  class: q("not-prose pl-2 ")
2611
2640
  }
2612
- }), Zn = pr.configure({
2641
+ }), Qn = gr.configure({
2613
2642
  HTMLAttributes: {
2614
2643
  class: q("flex gap-2 items-start my-4")
2615
2644
  },
2616
2645
  nested: !0
2617
- }), Qn = gr.configure({
2646
+ }), ea = fr.configure({
2618
2647
  HTMLAttributes: {
2619
2648
  class: q("mt-4 mb-6 border-t border-muted-foreground")
2620
2649
  }
2621
- }), ea = fr.configure({
2650
+ }), ta = hr.configure({
2622
2651
  bulletList: {
2623
2652
  HTMLAttributes: {
2624
2653
  class: q("list-disc list-outside leading-3 -mt-2")
@@ -2658,18 +2687,18 @@ const Gn = Yr.create({
2658
2687
  width: 4
2659
2688
  },
2660
2689
  gapcursor: !1
2661
- }), ta = hr.configure({
2690
+ }), oa = br.configure({
2662
2691
  // configure lowlight: common / all / use highlightJS in case there is a need to specify certain language grammars only
2663
2692
  // common: covers 37 language grammars which should be good enough in most cases
2664
- lowlight: Gr(qr)
2665
- }), oa = br.configure({
2693
+ lowlight: qr(Yr)
2694
+ }), ra = xr.configure({
2666
2695
  HTMLAttributes: {
2667
2696
  class: q("text-foreground rounded p-1 hover:bg-accent cursor-pointer")
2668
2697
  },
2669
2698
  katexOptions: {
2670
2699
  throwOnError: !1
2671
2700
  }
2672
- }), ra = xr.configure(), na = Xr.configure({
2701
+ }), na = yr.configure(), aa = Ur.configure({
2673
2702
  html: !0,
2674
2703
  tightLists: !0,
2675
2704
  tightListClass: "tight",
@@ -2678,36 +2707,36 @@ const Gn = Yr.create({
2678
2707
  breaks: !1,
2679
2708
  transformPastedText: !1,
2680
2709
  transformCopiedText: !1
2681
- }), aa = Gn.configure({
2710
+ }), sa = qn.configure({
2682
2711
  dragHandleWidth: 56,
2683
2712
  dragHandleSelector: ".custom-drag-handle"
2684
- }), zt = [
2685
- ea,
2686
- Yn,
2713
+ }), Et = [
2714
+ ta,
2687
2715
  Vn,
2688
2716
  Wn,
2689
2717
  Kn,
2690
2718
  Jn,
2691
2719
  Zn,
2692
2720
  Qn,
2693
- qn,
2694
- ta,
2721
+ ea,
2722
+ Yn,
2695
2723
  oa,
2696
2724
  ra,
2697
- vr,
2698
2725
  na,
2699
2726
  kr,
2727
+ aa,
2700
2728
  Cr,
2701
2729
  wr,
2702
2730
  Nr,
2703
- aa
2704
- ], sa = ve.Root, Et = ve.Trigger, Re = G.forwardRef(({ className: r, align: e = "center", sideOffset: o = 4, ...a }, n) => /* @__PURE__ */ t(ve.Portal, { children: /* @__PURE__ */ t(
2731
+ Ir,
2732
+ sa
2733
+ ], ia = ve.Root, $t = ve.Trigger, Re = G.forwardRef(({ className: r, align: e = "center", sideOffset: o = 4, ...a }, n) => /* @__PURE__ */ t(ve.Portal, { children: /* @__PURE__ */ t(
2705
2734
  ve.Content,
2706
2735
  {
2707
2736
  ref: n,
2708
2737
  align: e,
2709
2738
  sideOffset: o,
2710
- className: y(
2739
+ className: k(
2711
2740
  "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2712
2741
  r
2713
2742
  ),
@@ -2715,7 +2744,7 @@ const Gn = Yr.create({
2715
2744
  }
2716
2745
  ) }));
2717
2746
  Re.displayName = ve.Content.displayName;
2718
- const ia = Ur(
2747
+ const la = Gr(
2719
2748
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
2720
2749
  {
2721
2750
  variants: {
@@ -2739,17 +2768,17 @@ const ia = Ur(
2739
2768
  size: "default"
2740
2769
  }
2741
2770
  }
2742
- ), J = G.forwardRef(
2771
+ ), Z = G.forwardRef(
2743
2772
  ({ className: r, variant: e, size: o, asChild: a = !1, ...n }, s) => /* @__PURE__ */ t(
2744
- a ? tn : "button",
2773
+ a ? on : "button",
2745
2774
  {
2746
- className: y(ia({ variant: e, size: o, className: r })),
2775
+ className: k(la({ variant: e, size: o, className: r })),
2747
2776
  ref: s,
2748
2777
  ...n
2749
2778
  }
2750
2779
  )
2751
2780
  );
2752
- J.displayName = "Button";
2781
+ Z.displayName = "Button";
2753
2782
  const et = [
2754
2783
  {
2755
2784
  name: "默认",
@@ -2842,11 +2871,11 @@ const et = [
2842
2871
  // Gray
2843
2872
  color: "var(--novel-highlight-gray)"
2844
2873
  }
2845
- ], de = (r) => /* @__PURE__ */ t(
2846
- at,
2874
+ ], me = (r) => /* @__PURE__ */ t(
2875
+ st,
2847
2876
  {
2848
2877
  classNames: {
2849
- root: g`
2878
+ root: h`
2850
2879
  background-color: transparent;
2851
2880
  padding: 0;
2852
2881
  .rc-tooltip-content {
@@ -2858,7 +2887,7 @@ const et = [
2858
2887
  showArrow: !1,
2859
2888
  ...r
2860
2889
  }
2861
- ), la = ({ open: r, onOpenChange: e }) => {
2890
+ ), ca = ({ open: r, onOpenChange: e }) => {
2862
2891
  const { editor: o } = Q();
2863
2892
  if (!o) return null;
2864
2893
  const a = et.find(
@@ -2866,8 +2895,8 @@ const et = [
2866
2895
  ), n = tt.find(
2867
2896
  ({ color: s }) => o.isActive("highlight", { color: s })
2868
2897
  );
2869
- return /* @__PURE__ */ m(sa, { modal: !0, open: r, onOpenChange: e, children: [
2870
- /* @__PURE__ */ t(de, { overlay: "文本颜色", placement: "top", children: /* @__PURE__ */ t(Et, { asChild: !0, children: /* @__PURE__ */ m(J, { size: "sm", className: "gap-1 rounded-md pr-0", variant: "ghost", children: [
2898
+ return /* @__PURE__ */ m(ia, { modal: !0, open: r, onOpenChange: e, children: [
2899
+ /* @__PURE__ */ t(me, { overlay: "文本颜色", placement: "top", children: /* @__PURE__ */ t($t, { asChild: !0, children: /* @__PURE__ */ m(Z, { size: "sm", className: "gap-1 rounded-md pr-0", variant: "ghost", children: [
2871
2900
  /* @__PURE__ */ t(
2872
2901
  "span",
2873
2902
  {
@@ -2879,7 +2908,7 @@ const et = [
2879
2908
  children: "A"
2880
2909
  }
2881
2910
  ),
2882
- /* @__PURE__ */ t(st, {})
2911
+ /* @__PURE__ */ t(it, {})
2883
2912
  ] }) }) }),
2884
2913
  /* @__PURE__ */ m(
2885
2914
  Re,
@@ -2947,15 +2976,15 @@ const et = [
2947
2976
  )
2948
2977
  ] });
2949
2978
  };
2950
- function ca(r) {
2979
+ function da(r) {
2951
2980
  try {
2952
2981
  return new URL(r), !0;
2953
2982
  } catch {
2954
2983
  return !1;
2955
2984
  }
2956
2985
  }
2957
- function da(r) {
2958
- if (ca(r)) return r;
2986
+ function ma(r) {
2987
+ if (da(r)) return r;
2959
2988
  try {
2960
2989
  if (r.includes(".") && !r.includes(" "))
2961
2990
  return new URL(`https://${r}`).toString();
@@ -2963,24 +2992,24 @@ function da(r) {
2963
2992
  return null;
2964
2993
  }
2965
2994
  }
2966
- const ma = ({ open: r, onOpenChange: e }) => {
2967
- const o = he(null), { editor: a } = Q();
2968
- return ie(() => {
2995
+ const ua = ({ open: r, onOpenChange: e }) => {
2996
+ const o = be(null), { editor: a } = Q();
2997
+ return ae(() => {
2969
2998
  var n;
2970
2999
  (n = o.current) == null || n.focus();
2971
- }), a ? /* @__PURE__ */ m(vt, { modal: !0, open: r, onOpenChange: e, children: [
2972
- /* @__PURE__ */ t(de, { overlay: "添加链接", placement: "top", children: /* @__PURE__ */ t(en, { asChild: !0, children: /* @__PURE__ */ m(
2973
- J,
3000
+ }), a ? /* @__PURE__ */ m(kt, { modal: !0, open: r, onOpenChange: e, children: [
3001
+ /* @__PURE__ */ t(me, { overlay: "添加链接", placement: "top", children: /* @__PURE__ */ t(tn, { asChild: !0, children: /* @__PURE__ */ m(
3002
+ Z,
2974
3003
  {
2975
3004
  size: "sm",
2976
3005
  variant: "ghost",
2977
3006
  className: "gap-2 rounded-md border-none",
2978
3007
  children: [
2979
- /* @__PURE__ */ t("p", { className: "text-base", children: /* @__PURE__ */ t(ho, { size: 16 }) }),
3008
+ /* @__PURE__ */ t("p", { className: "text-base", children: /* @__PURE__ */ t(bo, { size: 16 }) }),
2980
3009
  /* @__PURE__ */ t(
2981
3010
  "p",
2982
3011
  {
2983
- className: y(
3012
+ className: k(
2984
3013
  "underline decoration-stone-400 underline-offset-4",
2985
3014
  {
2986
3015
  "text-blue-500": a.isActive("link")
@@ -2998,8 +3027,8 @@ const ma = ({ open: r, onOpenChange: e }) => {
2998
3027
  onSubmit: (n) => {
2999
3028
  const s = n.currentTarget;
3000
3029
  n.preventDefault();
3001
- const i = s[0], c = da(i.value);
3002
- c && (a.chain().focus().setLink({ href: c }).run(), e(!1));
3030
+ const i = s[0], d = ma(i.value);
3031
+ d && (a.chain().focus().setLink({ href: d }).run(), e(!1));
3003
3032
  },
3004
3033
  className: "flex p-1 ",
3005
3034
  children: [
@@ -3014,7 +3043,7 @@ const ma = ({ open: r, onOpenChange: e }) => {
3014
3043
  }
3015
3044
  ),
3016
3045
  a.getAttributes("link").href ? /* @__PURE__ */ t(
3017
- J,
3046
+ Z,
3018
3047
  {
3019
3048
  size: "icon",
3020
3049
  variant: "outline",
@@ -3023,17 +3052,17 @@ const ma = ({ open: r, onOpenChange: e }) => {
3023
3052
  onClick: () => {
3024
3053
  a.chain().focus().unsetLink().run(), o.current.value = "", e(!1);
3025
3054
  },
3026
- children: /* @__PURE__ */ t(it, { className: "h-4 w-4" })
3055
+ children: /* @__PURE__ */ t(lt, { className: "h-4 w-4" })
3027
3056
  }
3028
- ) : /* @__PURE__ */ t(J, { size: "icon", className: "h-8", children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" }) })
3057
+ ) : /* @__PURE__ */ t(Z, { size: "icon", className: "h-8", children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" }) })
3029
3058
  ]
3030
3059
  }
3031
3060
  ) })
3032
3061
  ] }) : null;
3033
- }, ua = () => {
3062
+ }, pa = () => {
3034
3063
  const { editor: r } = Q();
3035
- return r ? /* @__PURE__ */ t(de, { overlay: "标记为公式", placement: "top", children: /* @__PURE__ */ t(
3036
- J,
3064
+ return r ? /* @__PURE__ */ t(me, { overlay: "标记为公式", placement: "top", children: /* @__PURE__ */ t(
3065
+ Z,
3037
3066
  {
3038
3067
  variant: "ghost",
3039
3068
  size: "sm",
@@ -3048,9 +3077,9 @@ const ma = ({ open: r, onOpenChange: e }) => {
3048
3077
  }
3049
3078
  },
3050
3079
  children: /* @__PURE__ */ t(
3051
- on,
3080
+ rn,
3052
3081
  {
3053
- className: y("size-4", { "text-blue-500": r.isActive("math") }),
3082
+ className: k("size-4", { "text-blue-500": r.isActive("math") }),
3054
3083
  strokeWidth: 2.3
3055
3084
  }
3056
3085
  )
@@ -3060,67 +3089,67 @@ const ma = ({ open: r, onOpenChange: e }) => {
3060
3089
  {
3061
3090
  name: "正文",
3062
3091
  // Text
3063
- icon: lt,
3092
+ icon: ct,
3064
3093
  command: (r) => r.chain().focus().clearNodes().run(),
3065
3094
  isActive: (r) => r.isActive("paragraph") && !r.isActive("bulletList") && !r.isActive("orderedList")
3066
3095
  },
3067
3096
  {
3068
3097
  name: "标题 1",
3069
3098
  // Heading 1
3070
- icon: ct,
3099
+ icon: dt,
3071
3100
  command: (r) => r.chain().focus().clearNodes().toggleHeading({ level: 1 }).run(),
3072
3101
  isActive: (r) => r.isActive("heading", { level: 1 })
3073
3102
  },
3074
3103
  {
3075
3104
  name: "标题 2",
3076
3105
  // Heading 2
3077
- icon: dt,
3106
+ icon: mt,
3078
3107
  command: (r) => r.chain().focus().clearNodes().toggleHeading({ level: 2 }).run(),
3079
3108
  isActive: (r) => r.isActive("heading", { level: 2 })
3080
3109
  },
3081
3110
  {
3082
3111
  name: "标题 3",
3083
3112
  // Heading 3
3084
- icon: mt,
3113
+ icon: ut,
3085
3114
  command: (r) => r.chain().focus().clearNodes().toggleHeading({ level: 3 }).run(),
3086
3115
  isActive: (r) => r.isActive("heading", { level: 3 })
3087
3116
  },
3088
3117
  {
3089
3118
  name: "待办列表",
3090
3119
  // To-do List
3091
- icon: ut,
3120
+ icon: pt,
3092
3121
  command: (r) => r.chain().focus().clearNodes().toggleTaskList().run(),
3093
3122
  isActive: (r) => r.isActive("taskItem")
3094
3123
  },
3095
3124
  {
3096
3125
  name: "无序列表",
3097
3126
  // Bullet List
3098
- icon: pt,
3127
+ icon: gt,
3099
3128
  command: (r) => r.chain().focus().clearNodes().toggleBulletList().run(),
3100
3129
  isActive: (r) => r.isActive("bulletList")
3101
3130
  },
3102
3131
  {
3103
3132
  name: "有序列表",
3104
3133
  // Numbered List
3105
- icon: gt,
3134
+ icon: ft,
3106
3135
  command: (r) => r.chain().focus().clearNodes().toggleOrderedList().run(),
3107
3136
  isActive: (r) => r.isActive("orderedList")
3108
3137
  },
3109
3138
  {
3110
3139
  name: "引用",
3111
3140
  // Quote
3112
- icon: ft,
3141
+ icon: ht,
3113
3142
  command: (r) => r.chain().focus().clearNodes().toggleBlockquote().run(),
3114
3143
  isActive: (r) => r.isActive("blockquote")
3115
3144
  },
3116
3145
  {
3117
3146
  name: "代码块",
3118
3147
  // Code
3119
- icon: ht,
3148
+ icon: bt,
3120
3149
  command: (r) => r.chain().focus().clearNodes().toggleCodeBlock().run(),
3121
3150
  isActive: (r) => r.isActive("codeBlock")
3122
3151
  }
3123
- ], pa = ({ open: r, onOpenChange: e }) => {
3152
+ ], ga = ({ open: r, onOpenChange: e }) => {
3124
3153
  const { editor: o } = Q();
3125
3154
  if (!o) return null;
3126
3155
  const a = Ee.filter(
@@ -3129,15 +3158,15 @@ const ma = ({ open: r, onOpenChange: e }) => {
3129
3158
  name: "多个选中"
3130
3159
  // Multiple
3131
3160
  };
3132
- return /* @__PURE__ */ m(vt, { modal: !0, open: r, onOpenChange: e, children: [
3133
- /* @__PURE__ */ t(de, { overlay: "转换成", placement: "top", children: /* @__PURE__ */ t(
3134
- Et,
3161
+ return /* @__PURE__ */ m(kt, { modal: !0, open: r, onOpenChange: e, children: [
3162
+ /* @__PURE__ */ t(me, { overlay: "转换成", placement: "top", children: /* @__PURE__ */ t(
3163
+ $t,
3135
3164
  {
3136
3165
  asChild: !0,
3137
3166
  className: "rounded-md border-none hover:bg-accent focus:ring-0 pr-0",
3138
- children: /* @__PURE__ */ m(J, { size: "sm", variant: "ghost", children: [
3167
+ children: /* @__PURE__ */ m(Z, { size: "sm", variant: "ghost", children: [
3139
3168
  /* @__PURE__ */ t("span", { className: "whitespace-nowrap text-sm", children: a.name }),
3140
- /* @__PURE__ */ t(st, {})
3169
+ /* @__PURE__ */ t(it, {})
3141
3170
  ] })
3142
3171
  }
3143
3172
  ) }),
@@ -3163,14 +3192,14 @@ const ma = ({ open: r, onOpenChange: e }) => {
3163
3192
  ))
3164
3193
  ] })
3165
3194
  ] });
3166
- }, pe = G.forwardRef(
3195
+ }, ge = G.forwardRef(
3167
3196
  ({ className: r, orientation: e = "horizontal", decorative: o = !0, ...a }, n) => /* @__PURE__ */ t(
3168
- kt.Root,
3197
+ Ct.Root,
3169
3198
  {
3170
3199
  ref: n,
3171
3200
  decorative: o,
3172
3201
  orientation: e,
3173
- className: y(
3202
+ className: k(
3174
3203
  "shrink-0 bg-border",
3175
3204
  e === "horizontal" ? "h-[1px] w-full" : " w-[1px]",
3176
3205
  r
@@ -3179,60 +3208,60 @@ const ma = ({ open: r, onOpenChange: e }) => {
3179
3208
  }
3180
3209
  )
3181
3210
  );
3182
- pe.displayName = kt.Root.displayName;
3183
- const ga = () => /* @__PURE__ */ m("div", { className: "flex items-center justify-center gap-0.5", children: [
3211
+ ge.displayName = Ct.Root.displayName;
3212
+ const fa = () => /* @__PURE__ */ m("div", { className: "flex items-center justify-center gap-0.5", children: [
3184
3213
  /* @__PURE__ */ t("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.3s]" }),
3185
3214
  /* @__PURE__ */ t("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500 [animation-delay:-0.15s]" }),
3186
3215
  /* @__PURE__ */ t("div", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-purple-500" })
3187
- ] }), $t = G.forwardRef(({ className: r, children: e, ...o }, a) => /* @__PURE__ */ m(
3188
- ce.Root,
3216
+ ] }), Ht = G.forwardRef(({ className: r, children: e, ...o }, a) => /* @__PURE__ */ m(
3217
+ de.Root,
3189
3218
  {
3190
3219
  ref: a,
3191
- className: y("relative overflow-hidden", r),
3220
+ className: k("relative overflow-hidden", r),
3192
3221
  ...o,
3193
3222
  children: [
3194
- /* @__PURE__ */ t(ce.Viewport, { className: "h-full w-full rounded-[inherit]", children: e }),
3195
- /* @__PURE__ */ t(Ht, {}),
3196
- /* @__PURE__ */ t(ce.Corner, {})
3223
+ /* @__PURE__ */ t(de.Viewport, { className: "h-full w-full rounded-[inherit]", children: e }),
3224
+ /* @__PURE__ */ t(Ot, {}),
3225
+ /* @__PURE__ */ t(de.Corner, {})
3197
3226
  ]
3198
3227
  }
3199
3228
  ));
3200
- $t.displayName = ce.Root.displayName;
3201
- const Ht = G.forwardRef(({ className: r, orientation: e = "vertical", ...o }, a) => /* @__PURE__ */ t(
3202
- ce.ScrollAreaScrollbar,
3229
+ Ht.displayName = de.Root.displayName;
3230
+ const Ot = G.forwardRef(({ className: r, orientation: e = "vertical", ...o }, a) => /* @__PURE__ */ t(
3231
+ de.ScrollAreaScrollbar,
3203
3232
  {
3204
3233
  ref: a,
3205
3234
  orientation: e,
3206
- className: y(
3235
+ className: k(
3207
3236
  "flex touch-none select-none transition-colors",
3208
3237
  e === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
3209
3238
  e === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
3210
3239
  r
3211
3240
  ),
3212
3241
  ...o,
3213
- children: /* @__PURE__ */ t(ce.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
3242
+ children: /* @__PURE__ */ t(de.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
3214
3243
  }
3215
3244
  ));
3216
- Ht.displayName = ce.ScrollAreaScrollbar.displayName;
3217
- const fa = te.Portal, Ot = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3245
+ Ot.displayName = de.ScrollAreaScrollbar.displayName;
3246
+ const ha = te.Portal, Ft = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3218
3247
  te.Overlay,
3219
3248
  {
3220
3249
  ref: o,
3221
- className: y(
3250
+ className: k(
3222
3251
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3223
3252
  r
3224
3253
  ),
3225
3254
  ...e
3226
3255
  }
3227
3256
  ));
3228
- Ot.displayName = te.Overlay.displayName;
3229
- const ha = G.forwardRef(({ className: r, children: e, ...o }, a) => /* @__PURE__ */ m(fa, { children: [
3230
- /* @__PURE__ */ t(Ot, {}),
3257
+ Ft.displayName = te.Overlay.displayName;
3258
+ const ba = G.forwardRef(({ className: r, children: e, ...o }, a) => /* @__PURE__ */ m(ha, { children: [
3259
+ /* @__PURE__ */ t(Ft, {}),
3231
3260
  /* @__PURE__ */ m(
3232
3261
  te.Content,
3233
3262
  {
3234
3263
  ref: a,
3235
- className: y(
3264
+ className: k(
3236
3265
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
3237
3266
  r
3238
3267
  ),
@@ -3240,54 +3269,54 @@ const ha = G.forwardRef(({ className: r, children: e, ...o }, a) => /* @__PURE__
3240
3269
  children: [
3241
3270
  e,
3242
3271
  /* @__PURE__ */ m(te.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
3243
- /* @__PURE__ */ t(rn, { className: "h-4 w-4" }),
3272
+ /* @__PURE__ */ t(nn, { className: "h-4 w-4" }),
3244
3273
  /* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
3245
3274
  ] })
3246
3275
  ]
3247
3276
  }
3248
3277
  )
3249
3278
  ] }));
3250
- ha.displayName = te.Content.displayName;
3251
- const ba = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3279
+ ba.displayName = te.Content.displayName;
3280
+ const xa = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3252
3281
  te.Title,
3253
3282
  {
3254
3283
  ref: o,
3255
- className: y(
3284
+ className: k(
3256
3285
  "text-lg font-semibold leading-none tracking-tight",
3257
3286
  r
3258
3287
  ),
3259
3288
  ...e
3260
3289
  }
3261
3290
  ));
3262
- ba.displayName = te.Title.displayName;
3263
- const xa = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3291
+ xa.displayName = te.Title.displayName;
3292
+ const ya = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3264
3293
  te.Description,
3265
3294
  {
3266
3295
  ref: o,
3267
- className: y("text-sm text-muted-foreground", r),
3296
+ className: k("text-sm text-muted-foreground", r),
3268
3297
  ...e
3269
3298
  }
3270
3299
  ));
3271
- xa.displayName = te.Description.displayName;
3272
- const Ft = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3300
+ ya.displayName = te.Description.displayName;
3301
+ const _t = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3273
3302
  V,
3274
3303
  {
3275
3304
  ref: o,
3276
- className: y(
3305
+ className: k(
3277
3306
  "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
3278
3307
  r
3279
3308
  ),
3280
3309
  ...e
3281
3310
  }
3282
3311
  ));
3283
- Ft.displayName = V.displayName;
3284
- const _t = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ m("div", { className: "flex items-center border-b px-4", "cmdk-input-wrapper": "", children: [
3312
+ _t.displayName = V.displayName;
3313
+ const jt = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ m("div", { className: "flex items-center border-b px-4", "cmdk-input-wrapper": "", children: [
3285
3314
  /* @__PURE__ */ t(Oe, { size: 14, className: "mr-2 shrink-0 text-purple-500 " }),
3286
3315
  /* @__PURE__ */ t(
3287
3316
  V.Input,
3288
3317
  {
3289
3318
  ref: o,
3290
- className: y(
3319
+ className: k(
3291
3320
  "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
3292
3321
  r
3293
3322
  ),
@@ -3295,17 +3324,17 @@ const _t = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ m("div",
3295
3324
  }
3296
3325
  )
3297
3326
  ] }));
3298
- _t.displayName = V.Input.displayName;
3299
- const ya = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3327
+ jt.displayName = V.Input.displayName;
3328
+ const va = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3300
3329
  V.List,
3301
3330
  {
3302
3331
  ref: o,
3303
- className: y("max-h-[300px] overflow-y-auto overflow-x-hidden", r),
3332
+ className: k("max-h-[300px] overflow-y-auto overflow-x-hidden", r),
3304
3333
  ...e
3305
3334
  }
3306
3335
  ));
3307
- ya.displayName = V.List.displayName;
3308
- const va = G.forwardRef((r, e) => /* @__PURE__ */ t(
3336
+ va.displayName = V.List.displayName;
3337
+ const ka = G.forwardRef((r, e) => /* @__PURE__ */ t(
3309
3338
  V.Empty,
3310
3339
  {
3311
3340
  ref: e,
@@ -3313,12 +3342,12 @@ const va = G.forwardRef((r, e) => /* @__PURE__ */ t(
3313
3342
  ...r
3314
3343
  }
3315
3344
  ));
3316
- va.displayName = V.Empty.displayName;
3345
+ ka.displayName = V.Empty.displayName;
3317
3346
  const Ce = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3318
3347
  V.Group,
3319
3348
  {
3320
3349
  ref: o,
3321
- className: y(
3350
+ className: k(
3322
3351
  "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
3323
3352
  r
3324
3353
  ),
@@ -3330,32 +3359,32 @@ const Ve = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3330
3359
  V.Separator,
3331
3360
  {
3332
3361
  ref: o,
3333
- className: y("-mx-1 h-px bg-border", r),
3362
+ className: k("-mx-1 h-px bg-border", r),
3334
3363
  ...e
3335
3364
  }
3336
3365
  ));
3337
3366
  Ve.displayName = V.Separator.displayName;
3338
- const ge = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3367
+ const fe = G.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ t(
3339
3368
  V.Item,
3340
3369
  {
3341
3370
  ref: o,
3342
- className: y(
3371
+ className: k(
3343
3372
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
3344
3373
  r
3345
3374
  ),
3346
3375
  ...e
3347
3376
  }
3348
3377
  ));
3349
- ge.displayName = V.Item.displayName;
3350
- const ka = ({
3378
+ fe.displayName = V.Item.displayName;
3379
+ const Ca = ({
3351
3380
  completion: r,
3352
3381
  onDiscard: e
3353
3382
  }) => {
3354
3383
  const { editor: o } = Q();
3355
- return /* @__PURE__ */ m(me, { children: [
3384
+ return /* @__PURE__ */ m(ue, { children: [
3356
3385
  /* @__PURE__ */ m(Ce, { children: [
3357
3386
  /* @__PURE__ */ m(
3358
- ge,
3387
+ fe,
3359
3388
  {
3360
3389
  className: "gap-2 px-4",
3361
3390
  value: "replace",
@@ -3370,13 +3399,13 @@ const ka = ({
3370
3399
  ).run();
3371
3400
  },
3372
3401
  children: [
3373
- /* @__PURE__ */ t(nn, { className: "h-4 w-4 text-muted-foreground" }),
3402
+ /* @__PURE__ */ t(an, { className: "h-4 w-4 text-muted-foreground" }),
3374
3403
  "替换选择"
3375
3404
  ]
3376
3405
  }
3377
3406
  ),
3378
3407
  /* @__PURE__ */ m(
3379
- ge,
3408
+ fe,
3380
3409
  {
3381
3410
  className: "gap-2 px-4",
3382
3411
  value: "insert",
@@ -3385,50 +3414,50 @@ const ka = ({
3385
3414
  o.chain().focus().insertContentAt(a.to + 1, r).run();
3386
3415
  },
3387
3416
  children: [
3388
- /* @__PURE__ */ t(an, { className: "h-4 w-4 text-muted-foreground" }),
3417
+ /* @__PURE__ */ t(sn, { className: "h-4 w-4 text-muted-foreground" }),
3389
3418
  "在下面插入"
3390
3419
  ]
3391
3420
  }
3392
3421
  )
3393
3422
  ] }),
3394
3423
  /* @__PURE__ */ t(Ve, {}),
3395
- /* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ m(ge, { onSelect: e, value: "thrash", className: "gap-2 px-4", children: [
3396
- /* @__PURE__ */ t(sn, { className: "h-4 w-4 text-muted-foreground" }),
3424
+ /* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ m(fe, { onSelect: e, value: "thrash", className: "gap-2 px-4", children: [
3425
+ /* @__PURE__ */ t(ln, { className: "h-4 w-4 text-muted-foreground" }),
3397
3426
  "丢弃"
3398
3427
  ] }) })
3399
3428
  ] });
3400
- }, Ca = [
3429
+ }, wa = [
3401
3430
  {
3402
3431
  value: "improve",
3403
3432
  label: "改进写作",
3404
3433
  // Improve writing
3405
- icon: ln
3434
+ icon: cn
3406
3435
  },
3407
3436
  {
3408
3437
  value: "fix",
3409
3438
  label: "修正语法",
3410
3439
  // Fix grammar
3411
- icon: cn
3440
+ icon: dn
3412
3441
  },
3413
3442
  {
3414
3443
  value: "shorter",
3415
3444
  label: "缩短文本",
3416
3445
  // Make shorter
3417
- icon: dn
3446
+ icon: mn
3418
3447
  },
3419
3448
  {
3420
3449
  value: "longer",
3421
3450
  label: "扩展文本",
3422
3451
  // Make longer
3423
- icon: mn
3452
+ icon: un
3424
3453
  }
3425
- ], wa = ({ onSelect: r }) => {
3454
+ ], Na = ({ onSelect: r }) => {
3426
3455
  const { editor: e } = Q();
3427
- return /* @__PURE__ */ m(me, { children: [
3456
+ return /* @__PURE__ */ m(ue, { children: [
3428
3457
  /* @__PURE__ */ m(Ce, { heading: "编辑或校对选中文本", children: [
3429
3458
  " ",
3430
- Ca.map((o) => /* @__PURE__ */ m(
3431
- ge,
3459
+ wa.map((o) => /* @__PURE__ */ m(
3460
+ fe,
3432
3461
  {
3433
3462
  onSelect: (a) => {
3434
3463
  const n = e.state.selection.content(), s = e.storage.markdown.serializer.serialize(
@@ -3450,16 +3479,16 @@ const ka = ({
3450
3479
  /* @__PURE__ */ m(Ce, { heading: "使用 AI 完成更多", children: [
3451
3480
  " ",
3452
3481
  /* @__PURE__ */ m(
3453
- ge,
3482
+ fe,
3454
3483
  {
3455
3484
  onSelect: () => {
3456
- const o = e.state.selection.from, a = Ir(e, o);
3485
+ const o = e.state.selection.from, a = Sr(e, o);
3457
3486
  r(a, "continue");
3458
3487
  },
3459
3488
  value: "continue",
3460
3489
  className: "gap-2 px-4",
3461
3490
  children: [
3462
- /* @__PURE__ */ t(un, { className: "h-4 w-4 text-purple-500" }),
3491
+ /* @__PURE__ */ t(pn, { className: "h-4 w-4 text-purple-500" }),
3463
3492
  "继续写作"
3464
3493
  ]
3465
3494
  }
@@ -3467,42 +3496,42 @@ const ka = ({
3467
3496
  ] })
3468
3497
  ] });
3469
3498
  };
3470
- function Na({ onOpenChange: r, options: e }) {
3471
- const { editor: o } = Q(), [a, n] = H(""), { completion: s, complete: i, isLoading: c } = yn({
3499
+ function Ia({ onOpenChange: r, options: e }) {
3500
+ const { editor: o } = Q(), [a, n] = H(""), { completion: s, complete: i, isLoading: d } = vn({
3472
3501
  // id: "novel",
3473
3502
  api: "/api/generate",
3474
- onResponse: (k) => {
3475
- if (k.status === 429) {
3503
+ onResponse: (x) => {
3504
+ if (x.status === 429) {
3476
3505
  ke.error("You have reached your request limit for the day.");
3477
3506
  return;
3478
3507
  }
3479
3508
  },
3480
- onError: (k) => {
3481
- ke.error(k.message);
3509
+ onError: (x) => {
3510
+ ke.error(x.message);
3482
3511
  },
3483
3512
  ...e
3484
3513
  }), p = s.length > 0;
3485
- return /* @__PURE__ */ m(Ft, { className: "w-[350px]", children: [
3486
- p && /* @__PURE__ */ t("div", { className: "flex max-h-[400px]", children: /* @__PURE__ */ t($t, { children: /* @__PURE__ */ t("div", { className: "prose p-2 px-4 prose-sm", children: /* @__PURE__ */ t(xt, { children: s }) }) }) }),
3487
- c && /* @__PURE__ */ m("div", { className: "flex h-12 w-full items-center px-4 text-sm font-medium text-muted-foreground text-purple-500", children: [
3514
+ return /* @__PURE__ */ m(_t, { className: "w-[350px]", children: [
3515
+ p && /* @__PURE__ */ t("div", { className: "flex max-h-[400px]", children: /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ t("div", { className: "prose p-2 px-4 prose-sm", children: /* @__PURE__ */ t(yt, { children: s }) }) }) }),
3516
+ d && /* @__PURE__ */ m("div", { className: "flex h-12 w-full items-center px-4 text-sm font-medium text-muted-foreground text-purple-500", children: [
3488
3517
  /* @__PURE__ */ t(Oe, { size: 14, className: "mr-2 shrink-0" }),
3489
3518
  "AI正在思考",
3490
- /* @__PURE__ */ t("div", { className: "ml-2 mt-1", children: /* @__PURE__ */ t(ga, {}) })
3519
+ /* @__PURE__ */ t("div", { className: "ml-2 mt-1", children: /* @__PURE__ */ t(fa, {}) })
3491
3520
  ] }),
3492
- !c && /* @__PURE__ */ m(me, { children: [
3521
+ !d && /* @__PURE__ */ m(ue, { children: [
3493
3522
  /* @__PURE__ */ m("div", { className: "relative", children: [
3494
3523
  /* @__PURE__ */ t(
3495
- _t,
3524
+ jt,
3496
3525
  {
3497
3526
  value: a,
3498
3527
  onValueChange: n,
3499
3528
  autoFocus: !0,
3500
3529
  placeholder: p ? "告诉AI下一步该怎么做" : "要求AI编辑或生成……",
3501
- onFocus: () => Sr(o)
3530
+ onFocus: () => Tr(o)
3502
3531
  }
3503
3532
  ),
3504
3533
  /* @__PURE__ */ t(
3505
- J,
3534
+ Z,
3506
3535
  {
3507
3536
  size: "icon",
3508
3537
  className: "absolute right-2 top-1/2 h-6 w-6 -translate-y-1/2 rounded-full bg-purple-500 hover:bg-purple-900",
@@ -3511,19 +3540,19 @@ function Na({ onOpenChange: r, options: e }) {
3511
3540
  return i(s, {
3512
3541
  body: { option: "zap", command: a }
3513
3542
  }).then(() => n(""));
3514
- const k = o.state.selection.content(), l = o.storage.markdown.serializer.serialize(
3515
- k.content
3543
+ const x = o.state.selection.content(), l = o.storage.markdown.serializer.serialize(
3544
+ x.content
3516
3545
  );
3517
3546
  i(l, {
3518
3547
  body: { option: "zap", command: a }
3519
3548
  }).then(() => n(""));
3520
3549
  },
3521
- children: /* @__PURE__ */ t(pn, { className: "h-4 w-4" })
3550
+ children: /* @__PURE__ */ t(gn, { className: "h-4 w-4" })
3522
3551
  }
3523
3552
  )
3524
3553
  ] }),
3525
3554
  p ? /* @__PURE__ */ t(
3526
- ka,
3555
+ Ca,
3527
3556
  {
3528
3557
  onDiscard: () => {
3529
3558
  o.chain().unsetHighlight().focus().run(), r(!1);
@@ -3531,15 +3560,15 @@ function Na({ onOpenChange: r, options: e }) {
3531
3560
  completion: s
3532
3561
  }
3533
3562
  ) : /* @__PURE__ */ t(
3534
- wa,
3563
+ Na,
3535
3564
  {
3536
- onSelect: (k, l) => i(k, { body: { option: l } })
3565
+ onSelect: (x, l) => i(x, { body: { option: l } })
3537
3566
  }
3538
3567
  )
3539
3568
  ] })
3540
3569
  ] });
3541
3570
  }
3542
- const Ia = ({
3571
+ const Sa = ({
3543
3572
  children: r,
3544
3573
  open: e,
3545
3574
  onOpenChange: o,
@@ -3547,10 +3576,10 @@ const Ia = ({
3547
3576
  aiOptions: n
3548
3577
  }) => {
3549
3578
  const { editor: s } = Q();
3550
- return ie(() => {
3551
- e || Tr(s);
3579
+ return ae(() => {
3580
+ e || Mr(s);
3552
3581
  }, [e]), /* @__PURE__ */ m(
3553
- Mr,
3582
+ Lr,
3554
3583
  {
3555
3584
  tippyOptions: {
3556
3585
  placement: e ? "bottom-start" : "top",
@@ -3561,16 +3590,16 @@ const Ia = ({
3561
3590
  className: "flex w-fit max-w-[90vw] overflow-hidden rounded-lg border border-muted bg-background shadow-xl p-1 gap-1",
3562
3591
  children: [
3563
3592
  e && a && /* @__PURE__ */ t(
3564
- Na,
3593
+ Ia,
3565
3594
  {
3566
3595
  open: e,
3567
3596
  onOpenChange: o,
3568
3597
  options: n
3569
3598
  }
3570
3599
  ),
3571
- !e && /* @__PURE__ */ m(Kt, { children: [
3600
+ !e && /* @__PURE__ */ m(Zt, { children: [
3572
3601
  a && /* @__PURE__ */ m(
3573
- J,
3602
+ Z,
3574
3603
  {
3575
3604
  className: "gap-1 text-purple-500",
3576
3605
  variant: "ghost",
@@ -3587,7 +3616,7 @@ const Ia = ({
3587
3616
  ]
3588
3617
  }
3589
3618
  );
3590
- }, Sa = (r) => {
3619
+ }, Ta = (r) => {
3591
3620
  const e = fetch("/api/upload", {
3592
3621
  method: "POST",
3593
3622
  headers: {
@@ -3613,10 +3642,10 @@ const Ia = ({
3613
3642
  }
3614
3643
  );
3615
3644
  });
3616
- }, Ta = yt({
3617
- onUpload: Sa,
3645
+ }, Ma = vt({
3646
+ onUpload: Ta,
3618
3647
  validateFn: (r) => r.type.includes("image/") ? r.size / 1024 / 1024 > 20 ? (ke.error("File size too big (max 20MB)."), !1) : !0 : (ke.error("File type not supported."), !1)
3619
- }), Ma = () => {
3648
+ }), La = () => {
3620
3649
  const { editor: r } = Q();
3621
3650
  return r ? /* @__PURE__ */ t("div", { className: "flex", children: [
3622
3651
  {
@@ -3624,35 +3653,35 @@ const Ia = ({
3624
3653
  // bold
3625
3654
  isActive: (o) => o.isActive("bold"),
3626
3655
  command: (o) => o.chain().focus().toggleBold().run(),
3627
- icon: gn
3656
+ icon: fn
3628
3657
  },
3629
3658
  {
3630
3659
  name: "斜体",
3631
3660
  // italic
3632
3661
  isActive: (o) => o.isActive("italic"),
3633
3662
  command: (o) => o.chain().focus().toggleItalic().run(),
3634
- icon: fn
3663
+ icon: hn
3635
3664
  },
3636
3665
  {
3637
3666
  name: "下划线",
3638
3667
  // underline
3639
3668
  isActive: (o) => o.isActive("underline"),
3640
3669
  command: (o) => o.chain().focus().toggleUnderline().run(),
3641
- icon: hn
3670
+ icon: bn
3642
3671
  },
3643
3672
  {
3644
3673
  name: "删除线",
3645
3674
  // strike
3646
3675
  isActive: (o) => o.isActive("strike"),
3647
3676
  command: (o) => o.chain().focus().toggleStrike().run(),
3648
- icon: bn
3677
+ icon: xn
3649
3678
  },
3650
3679
  {
3651
3680
  name: "代码",
3652
3681
  // code
3653
3682
  isActive: (o) => o.isActive("code"),
3654
3683
  command: (o) => o.chain().focus().toggleCode().run(),
3655
- icon: xn
3684
+ icon: yn
3656
3685
  }
3657
3686
  ].map((o) => /* @__PURE__ */ t(
3658
3687
  Ae,
@@ -3660,8 +3689,8 @@ const Ia = ({
3660
3689
  onSelect: (a) => {
3661
3690
  o.command(a);
3662
3691
  },
3663
- children: /* @__PURE__ */ t(de, { overlay: o.name, placement: "top", children: /* @__PURE__ */ t(
3664
- J,
3692
+ children: /* @__PURE__ */ t(me, { overlay: o.name, placement: "top", children: /* @__PURE__ */ t(
3693
+ Z,
3665
3694
  {
3666
3695
  size: "sm",
3667
3696
  className: "rounded-md",
@@ -3670,7 +3699,7 @@ const Ia = ({
3670
3699
  children: /* @__PURE__ */ t(
3671
3700
  o.icon,
3672
3701
  {
3673
- className: y("h-4 w-4", {
3702
+ className: k("h-4 w-4", {
3674
3703
  "text-blue-500": o.isActive(r)
3675
3704
  })
3676
3705
  }
@@ -3680,14 +3709,14 @@ const Ia = ({
3680
3709
  },
3681
3710
  o.name
3682
3711
  )) }) : null;
3683
- }, jt = ({ uploadFn: r }) => Ar([
3712
+ }, Xt = ({ uploadFn: r }) => Dr([
3684
3713
  {
3685
3714
  title: "文本",
3686
3715
  // "Text",
3687
3716
  description: "从纯文本开始编写。",
3688
3717
  // "Just start typing with plain text.",
3689
3718
  searchTerms: ["p", "paragraph"],
3690
- icon: /* @__PURE__ */ t(lt, { size: 18 }),
3719
+ icon: /* @__PURE__ */ t(ct, { size: 18 }),
3691
3720
  command: ({ editor: e, range: o }) => {
3692
3721
  e.chain().focus().deleteRange(o).toggleNode("paragraph", "paragraph").run();
3693
3722
  }
@@ -3698,7 +3727,7 @@ const Ia = ({
3698
3727
  description: "大标题。",
3699
3728
  // "Big section heading.",
3700
3729
  searchTerms: ["title", "big", "large"],
3701
- icon: /* @__PURE__ */ t(ct, { size: 18 }),
3730
+ icon: /* @__PURE__ */ t(dt, { size: 18 }),
3702
3731
  command: ({ editor: e, range: o }) => {
3703
3732
  e.chain().focus().deleteRange(o).setNode("heading", { level: 1 }).run();
3704
3733
  }
@@ -3709,7 +3738,7 @@ const Ia = ({
3709
3738
  description: "中标题。",
3710
3739
  // "Medium section heading.",
3711
3740
  searchTerms: ["subtitle", "medium"],
3712
- icon: /* @__PURE__ */ t(dt, { size: 18 }),
3741
+ icon: /* @__PURE__ */ t(mt, { size: 18 }),
3713
3742
  command: ({ editor: e, range: o }) => {
3714
3743
  e.chain().focus().deleteRange(o).setNode("heading", { level: 2 }).run();
3715
3744
  }
@@ -3720,7 +3749,7 @@ const Ia = ({
3720
3749
  description: "小标题。",
3721
3750
  // "Small section heading.",
3722
3751
  searchTerms: ["subtitle", "small"],
3723
- icon: /* @__PURE__ */ t(mt, { size: 18 }),
3752
+ icon: /* @__PURE__ */ t(ut, { size: 18 }),
3724
3753
  command: ({ editor: e, range: o }) => {
3725
3754
  e.chain().focus().deleteRange(o).setNode("heading", { level: 3 }).run();
3726
3755
  }
@@ -3731,7 +3760,7 @@ const Ia = ({
3731
3760
  description: "使用待办清单追踪任务。",
3732
3761
  // "Track tasks with a to-do list.",
3733
3762
  searchTerms: ["todo", "task", "list", "check", "checkbox"],
3734
- icon: /* @__PURE__ */ t(ut, { size: 18 }),
3763
+ icon: /* @__PURE__ */ t(pt, { size: 18 }),
3735
3764
  command: ({ editor: e, range: o }) => {
3736
3765
  e.chain().focus().deleteRange(o).toggleTaskList().run();
3737
3766
  }
@@ -3742,7 +3771,7 @@ const Ia = ({
3742
3771
  description: "创建一个简单的项目符号列表。",
3743
3772
  // "Create a simple bullet list.",
3744
3773
  searchTerms: ["unordered", "point"],
3745
- icon: /* @__PURE__ */ t(pt, { size: 18 }),
3774
+ icon: /* @__PURE__ */ t(gt, { size: 18 }),
3746
3775
  command: ({ editor: e, range: o }) => {
3747
3776
  e.chain().focus().deleteRange(o).toggleBulletList().run();
3748
3777
  }
@@ -3753,7 +3782,7 @@ const Ia = ({
3753
3782
  description: "创建一个带有序号的列表。",
3754
3783
  // "Create a list with numbering.",
3755
3784
  searchTerms: ["ordered"],
3756
- icon: /* @__PURE__ */ t(gt, { size: 18 }),
3785
+ icon: /* @__PURE__ */ t(ft, { size: 18 }),
3757
3786
  command: ({ editor: e, range: o }) => {
3758
3787
  e.chain().focus().deleteRange(o).toggleOrderedList().run();
3759
3788
  }
@@ -3764,7 +3793,7 @@ const Ia = ({
3764
3793
  description: "摘取引用。",
3765
3794
  // "Capture a quote.",
3766
3795
  searchTerms: ["blockquote"],
3767
- icon: /* @__PURE__ */ t(ft, { size: 18 }),
3796
+ icon: /* @__PURE__ */ t(ht, { size: 18 }),
3768
3797
  command: ({ editor: e, range: o }) => e.chain().focus().deleteRange(o).toggleNode("paragraph", "paragraph").toggleBlockquote().run()
3769
3798
  },
3770
3799
  {
@@ -3773,7 +3802,7 @@ const Ia = ({
3773
3802
  description: "捕获代码段。",
3774
3803
  // "Capture a code snippet.",
3775
3804
  searchTerms: ["codeblock"],
3776
- icon: /* @__PURE__ */ t(ht, { size: 18 }),
3805
+ icon: /* @__PURE__ */ t(bt, { size: 18 }),
3777
3806
  command: ({ editor: e, range: o }) => e.chain().focus().deleteRange(o).toggleCodeBlock().run()
3778
3807
  },
3779
3808
  {
@@ -3782,7 +3811,7 @@ const Ia = ({
3782
3811
  description: "从您的计算机上传图像。",
3783
3812
  // "Upload an image from your computer.",
3784
3813
  searchTerms: ["photo", "picture", "media"],
3785
- icon: /* @__PURE__ */ t(bo, { size: 18 }),
3814
+ icon: /* @__PURE__ */ t(xo, { size: 18 }),
3786
3815
  command: ({ editor: e, range: o }) => {
3787
3816
  e.chain().focus().deleteRange(o).run();
3788
3817
  const a = document.createElement("input");
@@ -3795,20 +3824,20 @@ const Ia = ({
3795
3824
  }, a.click();
3796
3825
  }
3797
3826
  }
3798
- ]), La = (r) => Lr.configure({
3827
+ ]), Aa = (r) => Ar.configure({
3799
3828
  suggestion: {
3800
- items: () => jt(r),
3801
- render: Dr
3829
+ items: () => Xt(r),
3830
+ render: Rr
3802
3831
  }
3803
- }), Aa = {
3832
+ }), Da = {
3804
3833
  type: "doc",
3805
3834
  content: []
3806
- }, Xt = Jt(({ children: r, items: e, ...o }, a) => {
3835
+ }, Ut = nt(({ children: r, items: e, ...o }, a) => {
3807
3836
  const n = (i) => /* @__PURE__ */ m(
3808
3837
  Me.Item,
3809
3838
  {
3810
3839
  onClick: i.onClick,
3811
- className: y(
3840
+ className: k(
3812
3841
  "gap-2 !p-1.5 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
3813
3842
  i.className
3814
3843
  ),
@@ -3821,14 +3850,14 @@ const Ia = ({
3821
3850
  },
3822
3851
  i.key
3823
3852
  ), s = (i) => {
3824
- var c;
3853
+ var d;
3825
3854
  return /* @__PURE__ */ t(
3826
3855
  Me.SubMenu,
3827
3856
  {
3828
- expandIcon: /* @__PURE__ */ t(xo, { size: 16 }),
3829
- popupClassName: y(
3857
+ expandIcon: /* @__PURE__ */ t(yo, { size: 16 }),
3858
+ popupClassName: k(
3830
3859
  "!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0 z-[1080]",
3831
- g`
3860
+ h`
3832
3861
  .rc-menu {
3833
3862
  border: none !important;
3834
3863
  box-shadow: none !important;
@@ -3836,9 +3865,9 @@ const Ia = ({
3836
3865
  `
3837
3866
  ),
3838
3867
  popupOffset: [4, 0],
3839
- className: y(
3868
+ className: k(
3840
3869
  "gap-2 !p-0 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
3841
- g`
3870
+ h`
3842
3871
  .rc-menu-submenu-title {
3843
3872
  display: flex;
3844
3873
  align-items: center;
@@ -3852,27 +3881,27 @@ const Ia = ({
3852
3881
  }
3853
3882
  `
3854
3883
  ),
3855
- title: /* @__PURE__ */ m(me, { children: [
3884
+ title: /* @__PURE__ */ m(ue, { children: [
3856
3885
  i.icon,
3857
3886
  i.label,
3858
3887
  /* @__PURE__ */ t("div", { className: "flex-1" })
3859
3888
  ] }),
3860
- children: (c = i.children) == null ? void 0 : c.map(n)
3889
+ children: (d = i.children) == null ? void 0 : d.map(n)
3861
3890
  },
3862
3891
  i.key
3863
3892
  );
3864
3893
  };
3865
3894
  return /* @__PURE__ */ t(
3866
- kn,
3895
+ Cn,
3867
3896
  {
3868
3897
  ref: a,
3869
3898
  trigger: "click",
3870
3899
  overlay: /* @__PURE__ */ t(
3871
3900
  Me,
3872
3901
  {
3873
- className: y(
3902
+ className: k(
3874
3903
  "!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0",
3875
- g`
3904
+ h`
3876
3905
  .rc-menu-submenu-active {
3877
3906
  .rc-menu-submenu-title {
3878
3907
  background-color: hsl(var(--accent)) !important;
@@ -3889,52 +3918,52 @@ const Ia = ({
3889
3918
  }
3890
3919
  );
3891
3920
  });
3892
- Xt.displayName = "DropdownMenu";
3893
- const Da = ({ children: r, ...e }) => {
3921
+ Ut.displayName = "DropdownMenu";
3922
+ const Ra = ({ children: r, ...e }) => {
3894
3923
  const { editor: o } = Q(), a = () => {
3895
- o && o.state.selection instanceof K && (o.commands.deleteSelection(), o.commands.focus());
3924
+ o && o.state.selection instanceof J && (o.commands.deleteSelection(), o.commands.focus());
3896
3925
  }, n = () => {
3897
- if (o && o.state.selection instanceof K) {
3898
- const c = o.state.selection.node, p = o.state.selection.to;
3926
+ if (o && o.state.selection instanceof J) {
3927
+ const d = o.state.selection.node, p = o.state.selection.to;
3899
3928
  o.chain().insertContentAt(p, {
3900
- type: c.type.name,
3901
- attrs: { ...c.attrs },
3902
- content: c.content.toJSON()
3929
+ type: d.type.name,
3930
+ attrs: { ...d.attrs },
3931
+ content: d.content.toJSON()
3903
3932
  }).focus().run();
3904
3933
  }
3905
- }, s = Ee.map((c) => ({
3906
- key: `transform-${c.name}`,
3907
- icon: /* @__PURE__ */ t(c.icon, { size: 16 }),
3908
- label: c.name,
3934
+ }, s = Ee.map((d) => ({
3935
+ key: `transform-${d.name}`,
3936
+ icon: /* @__PURE__ */ t(d.icon, { size: 16 }),
3937
+ label: d.name,
3909
3938
  onClick: () => {
3910
- o && o.state.selection instanceof K && c.command(o);
3939
+ o && o.state.selection instanceof J && d.command(o);
3911
3940
  },
3912
- isActive: c.isActive(o)
3941
+ isActive: d.isActive(o)
3913
3942
  }));
3914
- return /* @__PURE__ */ t(Xt, { items: [
3943
+ return /* @__PURE__ */ t(Ut, { items: [
3915
3944
  {
3916
3945
  key: "transform",
3917
3946
  type: "submenu",
3918
- icon: /* @__PURE__ */ t(yo, { size: 16 }),
3947
+ icon: /* @__PURE__ */ t(vo, { size: 16 }),
3919
3948
  label: "转换成",
3920
3949
  children: s
3921
3950
  },
3922
3951
  {
3923
3952
  key: "duplicate",
3924
- icon: /* @__PURE__ */ t(vo, { size: 16 }),
3953
+ icon: /* @__PURE__ */ t(ko, { size: 16 }),
3925
3954
  label: "创建副本",
3926
3955
  onClick: n
3927
3956
  },
3928
3957
  { key: "divider", type: "divider" },
3929
3958
  {
3930
3959
  key: "delete",
3931
- icon: /* @__PURE__ */ t(it, { size: 16 }),
3960
+ icon: /* @__PURE__ */ t(lt, { size: 16 }),
3932
3961
  label: "删除",
3933
3962
  className: "text-red-500",
3934
3963
  onClick: a
3935
3964
  }
3936
3965
  ], ...e, children: r });
3937
- }, Ra = () => {
3966
+ }, Pa = () => {
3938
3967
  const { editor: r } = Q(), e = (o) => {
3939
3968
  if (!r) return;
3940
3969
  const a = o.target.closest(".custom-drag-handle");
@@ -3948,9 +3977,9 @@ const Da = ({ children: r, ...e }) => {
3948
3977
  return /* @__PURE__ */ m(
3949
3978
  "div",
3950
3979
  {
3951
- className: y(
3980
+ className: k(
3952
3981
  "custom-drag-handle",
3953
- g`
3982
+ h`
3954
3983
  width: auto;
3955
3984
  background: none;
3956
3985
  display: flex;
@@ -3959,7 +3988,7 @@ const Da = ({ children: r, ...e }) => {
3959
3988
  ),
3960
3989
  children: [
3961
3990
  /* @__PURE__ */ t(
3962
- de,
3991
+ me,
3963
3992
  {
3964
3993
  placement: "bottom",
3965
3994
  overlay: /* @__PURE__ */ m("div", { children: [
@@ -3967,32 +3996,32 @@ const Da = ({ children: r, ...e }) => {
3967
3996
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "以在下方添加快" })
3968
3997
  ] }),
3969
3998
  children: /* @__PURE__ */ t(
3970
- J,
3999
+ Z,
3971
4000
  {
3972
4001
  size: "icon",
3973
4002
  variant: "ghost",
3974
4003
  className: "w-auto h-auto p-0.5",
3975
4004
  onClick: e,
3976
- children: /* @__PURE__ */ t(ko, { className: "cursor-pointer", size: 22 })
4005
+ children: /* @__PURE__ */ t(Co, { className: "cursor-pointer", size: 22 })
3977
4006
  }
3978
4007
  )
3979
4008
  }
3980
4009
  ),
3981
- /* @__PURE__ */ t(Da, { children: /* @__PURE__ */ t(
3982
- de,
4010
+ /* @__PURE__ */ t(Ra, { children: /* @__PURE__ */ t(
4011
+ me,
3983
4012
  {
3984
4013
  placement: "bottom",
3985
4014
  overlay: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ m("div", { children: [
3986
4015
  "拖动",
3987
4016
  /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "以移动" })
3988
4017
  ] }) }),
3989
- children: /* @__PURE__ */ t(J, { size: "icon", variant: "ghost", className: "w-auto h-auto p-0.5", children: /* @__PURE__ */ t(Co, { size: 22 }) })
4018
+ children: /* @__PURE__ */ t(Z, { size: "icon", variant: "ghost", className: "w-auto h-auto p-0.5", children: /* @__PURE__ */ t(wo, { size: 22 }) })
3990
4019
  }
3991
4020
  ) })
3992
4021
  ]
3993
4022
  }
3994
4023
  );
3995
- }, Pa = (r) => {
4024
+ }, Ba = (r) => {
3996
4025
  const {
3997
4026
  className: e,
3998
4027
  initialContent: o = {},
@@ -4000,66 +4029,66 @@ const Da = ({ children: r, ...e }) => {
4000
4029
  cacheKey: n = "novel-content",
4001
4030
  enableCache: s = !1,
4002
4031
  showSaveStatus: i = !0,
4003
- showWordCount: c = !0,
4032
+ showWordCount: d = !0,
4004
4033
  uploadImageProps: p,
4005
- editorRef: k,
4034
+ editorRef: x,
4006
4035
  enableAI: l = !1,
4007
- aiOptions: d
4008
- } = r, [b, x] = H(
4036
+ aiOptions: c
4037
+ } = r, [b, v] = H(
4009
4038
  o
4010
- ), [A, f] = H("Saved"), [h, w] = H(), [v, I] = H(!1), [u, T] = H(!1), [R, N] = H(!1), [C, X] = H(!1), Z = (S) => {
4011
- const O = new DOMParser().parseFromString(S, "text/html");
4012
- return O.querySelectorAll("pre code").forEach((B) => {
4013
- vn.highlightElement(B);
4014
- }), new XMLSerializer().serializeToString(O);
4015
- }, _ = jr(
4016
- async (S) => {
4017
- const O = S.getJSON();
4018
- w(S.storage.characterCount.words()), a == null || a(O), s && (window.localStorage.setItem(
4039
+ ), [D, f] = H("Saved"), [g, I] = H(), [y, w] = H(!1), [u, S] = H(!1), [T, C] = H(!1), [N, O] = H(!1), W = (M) => {
4040
+ const F = new DOMParser().parseFromString(M, "text/html");
4041
+ return F.querySelectorAll("pre code").forEach((B) => {
4042
+ kn.highlightElement(B);
4043
+ }), new XMLSerializer().serializeToString(F);
4044
+ }, _ = Xr(
4045
+ async (M) => {
4046
+ const F = M.getJSON();
4047
+ I(M.storage.characterCount.words()), a == null || a(F), s && (window.localStorage.setItem(
4019
4048
  "html-content",
4020
- Z(S.getHTML())
4021
- ), window.localStorage.setItem(n, JSON.stringify(O)), window.localStorage.setItem(
4049
+ W(M.getHTML())
4050
+ ), window.localStorage.setItem(n, JSON.stringify(F)), window.localStorage.setItem(
4022
4051
  "markdown",
4023
- S.storage.markdown.getMarkdown()
4052
+ M.storage.markdown.getMarkdown()
4024
4053
  ), f("Saved"));
4025
4054
  },
4026
4055
  500
4027
- ), ae = fe(() => {
4028
- if (!p) return Ta;
4056
+ ), se = he(() => {
4057
+ if (!p) return Ma;
4029
4058
  const {
4030
- beforeUpload: S,
4031
- maxSize: O,
4059
+ beforeUpload: M,
4060
+ maxSize: F,
4032
4061
  action: B,
4033
- headers: W,
4062
+ headers: K,
4034
4063
  method: re,
4035
4064
  name: Pe,
4036
4065
  onSuccess: Ne,
4037
4066
  onError: Ie
4038
4067
  } = p;
4039
- return yt({
4040
- onUpload: (se) => {
4041
- const M = new FormData();
4042
- M.append(Pe || "file", se);
4068
+ return vt({
4069
+ onUpload: (ie) => {
4070
+ const L = new FormData();
4071
+ L.append(Pe || "file", ie);
4043
4072
  const U = fetch(B, {
4044
4073
  method: re || "POST",
4045
4074
  headers: {
4046
- ...W
4075
+ ...K
4047
4076
  },
4048
- body: M
4077
+ body: L
4049
4078
  });
4050
- return new Promise((F, E) => {
4079
+ return new Promise((j, E) => {
4051
4080
  U.then(async (P) => {
4052
4081
  if (Ne) {
4053
4082
  const z = await P.json();
4054
- F(Ne(z));
4083
+ j(Ne(z));
4055
4084
  return;
4056
4085
  }
4057
4086
  if (P.status === 200) {
4058
- const { url: z } = await P.json(), L = new Image();
4059
- L.src = z, L.onload = () => {
4060
- F(z);
4087
+ const { url: z } = await P.json(), A = new Image();
4088
+ A.src = z, A.onload = () => {
4089
+ j(z);
4061
4090
  };
4062
- } else throw P.status === 401 ? (F(se), new Error(
4091
+ } else throw P.status === 401 ? (j(ie), new Error(
4063
4092
  "`BLOB_READ_WRITE_TOKEN` environment variable not found, reading image locally instead."
4064
4093
  )) : new Error("Error uploading image. Please try again.");
4065
4094
  }).catch((P) => {
@@ -4067,151 +4096,151 @@ const Da = ({ children: r, ...e }) => {
4067
4096
  });
4068
4097
  });
4069
4098
  },
4070
- validateFn: (se) => S ? S(se) : se.type.includes("image/") ? O && se.size > O ? (console.error("File size too big (max 20MB)."), !1) : !0 : (console.error("File type not supported."), !1)
4099
+ validateFn: (ie) => M ? M(ie) : ie.type.includes("image/") ? F && ie.size > F ? (console.error("File size too big (max 20MB)."), !1) : !0 : (console.error("File type not supported."), !1)
4071
4100
  });
4072
4101
  }, [p]);
4073
- if (ie(() => {
4102
+ if (ae(() => {
4074
4103
  if (!s) return;
4075
- const S = window.localStorage.getItem(n);
4076
- x(S ? JSON.parse(S) : Aa);
4104
+ const M = window.localStorage.getItem(n);
4105
+ v(M ? JSON.parse(M) : Da);
4077
4106
  }, [n, s]), !b) return null;
4078
4107
  const oe = [
4079
- ...zt,
4080
- La({
4081
- uploadFn: ae
4108
+ ...Et,
4109
+ Aa({
4110
+ uploadFn: se
4082
4111
  })
4083
4112
  ];
4084
- return /* @__PURE__ */ m("div", { className: y("relative w-full max-w-screen-lg", e), children: [
4085
- (s && i || c) && /* @__PURE__ */ m("div", { className: "flex absolute right-5 top-5 z-10 mb-5 gap-2", children: [
4086
- s && i && /* @__PURE__ */ t("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: A }),
4087
- c && /* @__PURE__ */ m(
4113
+ return /* @__PURE__ */ m("div", { className: k("relative w-full max-w-screen-lg", e), children: [
4114
+ (s && i || d) && /* @__PURE__ */ m("div", { className: "flex absolute right-5 top-5 z-10 mb-5 gap-2", children: [
4115
+ s && i && /* @__PURE__ */ t("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: D }),
4116
+ d && /* @__PURE__ */ m(
4088
4117
  "div",
4089
4118
  {
4090
- className: h ? "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground" : "hidden",
4119
+ className: g ? "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground" : "hidden",
4091
4120
  children: [
4092
- h,
4121
+ g,
4093
4122
  " Words"
4094
4123
  ]
4095
4124
  }
4096
4125
  )
4097
4126
  ] }),
4098
- /* @__PURE__ */ t(Rr, { children: /* @__PURE__ */ m(
4099
- Pr,
4127
+ /* @__PURE__ */ t(Pr, { children: /* @__PURE__ */ m(
4128
+ Br,
4100
4129
  {
4101
- onCreate: ({ editor: S }) => {
4102
- k && (k.current = S);
4130
+ onCreate: ({ editor: M }) => {
4131
+ x && (x.current = M);
4103
4132
  },
4104
4133
  initialContent: b,
4105
4134
  extensions: oe,
4106
4135
  className: "relative min-h-[500px] w-full max-w-screen-lg border-muted bg-background sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:shadow-lg editor-content",
4107
4136
  editorProps: {
4108
4137
  handleDOMEvents: {
4109
- keydown: (S, O) => Er(O)
4138
+ keydown: (M, F) => $r(F)
4110
4139
  },
4111
- handlePaste: (S, O) => zr(S, O, ae),
4112
- handleDrop: (S, O, B, W) => Br(S, O, W, ae),
4140
+ handlePaste: (M, F) => Er(M, F, se),
4141
+ handleDrop: (M, F, B, K) => zr(M, F, K, se),
4113
4142
  attributes: {
4114
4143
  class: "prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full"
4115
4144
  }
4116
4145
  },
4117
- onUpdate: ({ editor: S }) => {
4118
- _(S), f("Unsaved");
4146
+ onUpdate: ({ editor: M }) => {
4147
+ _(M), f("Unsaved");
4119
4148
  },
4120
- slotAfter: /* @__PURE__ */ t(_r, {}),
4149
+ slotAfter: /* @__PURE__ */ t(jr, {}),
4121
4150
  children: [
4122
- /* @__PURE__ */ m($r, { className: "z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 shadow-md transition-all", children: [
4123
- /* @__PURE__ */ t(Hr, { className: "px-2 text-muted-foreground", children: "没有结果" }),
4124
- /* @__PURE__ */ t(Or, { children: jt({
4125
- uploadFn: ae
4126
- }).map((S) => /* @__PURE__ */ m(
4127
- Fr,
4151
+ /* @__PURE__ */ m(Hr, { className: "z-50 h-auto max-h-[330px] overflow-y-auto rounded-md border border-muted bg-background px-1 py-2 shadow-md transition-all", children: [
4152
+ /* @__PURE__ */ t(Or, { className: "px-2 text-muted-foreground", children: "没有结果" }),
4153
+ /* @__PURE__ */ t(Fr, { children: Xt({
4154
+ uploadFn: se
4155
+ }).map((M) => /* @__PURE__ */ m(
4156
+ _r,
4128
4157
  {
4129
- value: S.title,
4130
- onCommand: (O) => S.command(O),
4158
+ value: M.title,
4159
+ onCommand: (F) => M.command(F),
4131
4160
  className: "flex w-full items-center space-x-2 rounded-md px-2 py-1 text-left text-sm hover:bg-accent aria-selected:bg-accent",
4132
4161
  children: [
4133
- /* @__PURE__ */ t("div", { className: "flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-background", children: S.icon }),
4162
+ /* @__PURE__ */ t("div", { className: "flex h-10 w-10 items-center justify-center rounded-md border border-muted bg-background", children: M.icon }),
4134
4163
  /* @__PURE__ */ m("div", { children: [
4135
- /* @__PURE__ */ t("p", { className: "font-medium", children: S.title }),
4136
- /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: S.description })
4164
+ /* @__PURE__ */ t("p", { className: "font-medium", children: M.title }),
4165
+ /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: M.description })
4137
4166
  ] })
4138
4167
  ]
4139
4168
  },
4140
- S.title
4169
+ M.title
4141
4170
  )) })
4142
4171
  ] }),
4143
4172
  /* @__PURE__ */ m(
4144
- Ia,
4173
+ Sa,
4145
4174
  {
4146
- open: C,
4147
- onOpenChange: X,
4175
+ open: N,
4176
+ onOpenChange: O,
4148
4177
  enableAI: l,
4149
- aiOptions: d,
4178
+ aiOptions: c,
4150
4179
  children: [
4151
- l && /* @__PURE__ */ t(pe, { orientation: "vertical" }),
4152
- /* @__PURE__ */ t(pa, { open: v, onOpenChange: I }),
4153
- /* @__PURE__ */ t(pe, { orientation: "vertical" }),
4154
- /* @__PURE__ */ t(ma, { open: R, onOpenChange: N }),
4155
- /* @__PURE__ */ t(pe, { orientation: "vertical" }),
4156
- /* @__PURE__ */ t(ua, {}),
4157
- /* @__PURE__ */ t(pe, { orientation: "vertical" }),
4158
- /* @__PURE__ */ t(Ma, {}),
4159
- /* @__PURE__ */ t(pe, { orientation: "vertical" }),
4160
- /* @__PURE__ */ t(la, { open: u, onOpenChange: T })
4180
+ l && /* @__PURE__ */ t(ge, { orientation: "vertical" }),
4181
+ /* @__PURE__ */ t(ga, { open: y, onOpenChange: w }),
4182
+ /* @__PURE__ */ t(ge, { orientation: "vertical" }),
4183
+ /* @__PURE__ */ t(ua, { open: T, onOpenChange: C }),
4184
+ /* @__PURE__ */ t(ge, { orientation: "vertical" }),
4185
+ /* @__PURE__ */ t(pa, {}),
4186
+ /* @__PURE__ */ t(ge, { orientation: "vertical" }),
4187
+ /* @__PURE__ */ t(La, {}),
4188
+ /* @__PURE__ */ t(ge, { orientation: "vertical" }),
4189
+ /* @__PURE__ */ t(ca, { open: u, onOpenChange: S })
4161
4190
  ]
4162
4191
  }
4163
4192
  ),
4164
- /* @__PURE__ */ t(Ra, {})
4193
+ /* @__PURE__ */ t(Pa, {})
4165
4194
  ]
4166
4195
  }
4167
4196
  ) })
4168
4197
  ] });
4169
- }, Ba = ({ json: r }) => {
4170
- const e = fe(() => Cn(r ?? {}, zt), [r]);
4198
+ }, za = ({ json: r }) => {
4199
+ const e = he(() => wn(r ?? {}, Et), [r]);
4171
4200
  return /* @__PURE__ */ t("div", { className: "tiptap ProseMirror prose prose-lg dark:prose-invert prose-headings:font-title font-default focus:outline-none max-w-full", children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: e } }) });
4172
- }, Ut = Pa;
4173
- Ut.Preview = Ba;
4174
- const Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4201
+ }, Gt = Ba;
4202
+ Gt.Preview = za;
4203
+ const Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4175
4204
  __proto__: null,
4176
- Desktop: Pn,
4177
- DesktopSortable: Mt,
4178
- DesktopSortableConfigProvider: wt,
4179
- DesktopSortableStateProvider: St,
4205
+ Desktop: Bn,
4206
+ DesktopSortable: Lt,
4207
+ DesktopSortableConfigProvider: Nt,
4208
+ DesktopSortableStateProvider: Tt,
4180
4209
  Dock: we,
4181
4210
  DockDesktop: qe,
4182
4211
  DockDesktopItem: Ge,
4183
4212
  DockMobile: Ye,
4184
4213
  DockMobileItem: De,
4185
- Editor: Ut,
4186
- Markdown: Rt,
4187
- MdEditor: Pt,
4214
+ Editor: Gt,
4215
+ Markdown: Pt,
4216
+ MdEditor: Bt,
4188
4217
  SortableUtils: Y,
4189
4218
  desktopAppConfig: je,
4190
4219
  desktopConfigMap: Xe,
4191
- desktopGroupConfig: Nt,
4220
+ desktopGroupConfig: It,
4192
4221
  desktopThemeDark: _e,
4193
4222
  desktopThemeLight: Fe,
4194
- useDockDesktopMouseX: nt
4223
+ useDockDesktopMouseX: at
4195
4224
  }, Symbol.toStringTag, { value: "Module" }));
4196
4225
  export {
4197
- Pn as Desktop,
4198
- Mt as DesktopSortable,
4199
- wt as DesktopSortableConfigProvider,
4200
- St as DesktopSortableStateProvider,
4226
+ Bn as Desktop,
4227
+ Lt as DesktopSortable,
4228
+ Nt as DesktopSortableConfigProvider,
4229
+ Tt as DesktopSortableStateProvider,
4201
4230
  we as Dock,
4202
4231
  qe as DockDesktop,
4203
4232
  Ge as DockDesktopItem,
4204
4233
  Ye as DockMobile,
4205
4234
  De as DockMobileItem,
4206
- Ut as Editor,
4207
- Rt as Markdown,
4208
- Pt as MdEditor,
4235
+ Gt as Editor,
4236
+ Pt as Markdown,
4237
+ Bt as MdEditor,
4209
4238
  Y as SortableUtils,
4210
- Is as default,
4239
+ Ss as default,
4211
4240
  je as desktopAppConfig,
4212
4241
  Xe as desktopConfigMap,
4213
- Nt as desktopGroupConfig,
4242
+ It as desktopGroupConfig,
4214
4243
  _e as desktopThemeDark,
4215
4244
  Fe as desktopThemeLight,
4216
- Ms as useDockDesktopMouseX
4245
+ Ls as useDockDesktopMouseX
4217
4246
  };