zs_library 0.6.11 → 0.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +277 -272
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { initReactI18next as Ko } from "react-i18next";
7
7
  import { jsx as s, jsxs as T, Fragment as Ce } from "react/jsx-runtime";
8
8
  import * as ae from "react";
9
9
  import { createContext as zt, useMemo as te, useContext as Te, useState as R, useRef as oe, useCallback as le, useEffect as X, forwardRef as Ve, useImperativeHandle as et, memo as De, Fragment as Jo, useLayoutEffect as Qo, cloneElement as en } from "react";
10
- import { css as D, cx as M } from "@emotion/css";
10
+ import { css as D, cx as L } from "@emotion/css";
11
11
  import tn from "react-slick";
12
12
  import { ReactSortable as mt } from "react-sortablejs";
13
13
  import { useLocalStorageState as on, useDebounceEffect as nn, useRequest as rn } from "ahooks";
@@ -448,18 +448,18 @@ const fo = zt({
448
448
  onChange: r,
449
449
  storageKey: n = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
450
450
  enableCaching: a = !0
451
- } = t, [i, l] = R(), [m, p] = R(), [d, u] = R(null), f = oe(d), [c, L] = R(null), [v, z] = R([]), [y, I] = R(null), [g, b] = R(null), [x, k] = R(!1), [A, N] = R(null), [P, B] = R(null), [J, j] = R(null), [F, E] = R(0), [G, se] = R(!1), [Z, Y] = on(n, {
451
+ } = t, [i, l] = R(), [m, p] = R(), [d, u] = R(null), f = oe(d), [c, I] = R(null), [v, z] = R([]), [y, S] = R(null), [g, b] = R(null), [x, k] = R(!1), [A, N] = R(null), [P, B] = R(null), [J, j] = R(null), [F, E] = R(0), [G, se] = R(!1), [Z, Y] = on(n, {
452
452
  defaultValue: [],
453
453
  listenStorageChange: !0
454
454
  }), re = () => {
455
- L(null), clearTimeout(i), l(void 0), f.current = null;
455
+ I(null), clearTimeout(i), l(void 0), f.current = null;
456
456
  }, de = (O, q) => {
457
457
  let U = O.target;
458
458
  for (; U && !U.getAttribute("data-id"); )
459
459
  U = U.parentElement;
460
460
  U || (U = O.target);
461
461
  const _ = U.getBoundingClientRect();
462
- L({
462
+ I({
463
463
  rect: _,
464
464
  pageX: O.pageX,
465
465
  pageY: O.pageY,
@@ -492,10 +492,10 @@ const fo = zt({
492
492
  if (U.length > 0)
493
493
  z((_) => {
494
494
  const ee = [..._], K = (h) => {
495
- var S, H;
495
+ var M, H;
496
496
  const C = U.shift(), w = h.find(($) => $.id === C), W = h.findIndex(($) => $.id === C);
497
497
  if (U.length && w) {
498
- if (((S = w.children) == null ? void 0 : S.filter(($) => !O.some((ge) => ge.id === $.id)).length) === 1 && O.length === 1) {
498
+ if (((M = w.children) == null ? void 0 : M.filter(($) => !O.some((ge) => ge.id === $.id)).length) === 1 && O.length === 1) {
499
499
  const $ = { ...O[0] };
500
500
  return h.splice(W, 1, $), r == null || r(h), h;
501
501
  }
@@ -559,7 +559,7 @@ const fo = zt({
559
559
  if (_.length === 0)
560
560
  return;
561
561
  const ee = (K, h) => {
562
- const C = h.shift(), w = K.find((S) => S.id === C), W = K.findIndex((S) => S.id === C);
562
+ const C = h.shift(), w = K.find((M) => M.id === C), W = K.findIndex((M) => M.id === C);
563
563
  return w && (h.length ? w.children = ee(w.children || [], h) : w.children = [
564
564
  ...w.children ?? [],
565
565
  {
@@ -614,13 +614,13 @@ const fo = zt({
614
614
  list: v,
615
615
  setList: ie,
616
616
  contextMenu: c,
617
- setContextMenu: L,
617
+ setContextMenu: I,
618
618
  listStatus: d,
619
619
  setListStatus: u,
620
620
  contextMenuFuns: fe,
621
621
  hideContextMenu: re,
622
622
  showInfoItemData: y,
623
- setShowInfoItemData: I,
623
+ setShowInfoItemData: S,
624
624
  openGroupItemData: g,
625
625
  setOpenGroupItemData: b,
626
626
  longPressTriggered: x,
@@ -656,8 +656,8 @@ const fo = zt({
656
656
  containerRef: l,
657
657
  onCreateNewPage: m
658
658
  }, p) => {
659
- const d = oe(null), [u, f] = R(null), c = oe(0), L = oe(!1), v = le(() => {
660
- d.current && (clearTimeout(d.current), d.current = null), L.current = !1;
659
+ const d = oe(null), [u, f] = R(null), c = oe(0), I = oe(!1), v = le(() => {
660
+ d.current && (clearTimeout(d.current), d.current = null), I.current = !1;
661
661
  }, []), z = le(
662
662
  (x) => {
663
663
  if (!n) return;
@@ -665,14 +665,14 @@ const fo = zt({
665
665
  if (x === "right" && k && A)
666
666
  return;
667
667
  const N = Date.now();
668
- L.current || N - c.current < a + 200 || u !== x && (f(x), v(), d.current = setTimeout(() => {
668
+ I.current || N - c.current < a + 200 || u !== x && (f(x), v(), d.current = setTimeout(() => {
669
669
  const P = t.current;
670
670
  if (!P) {
671
671
  f(null);
672
672
  return;
673
673
  }
674
- L.current = !0, c.current = Date.now(), x === "left" && e > 0 ? P.slickGoTo(e - 1) : x === "right" && (e < o - 1 ? P.slickGoTo(e + 1) : A || m == null || m()), f(null), setTimeout(() => {
675
- L.current = !1;
674
+ I.current = !0, c.current = Date.now(), x === "left" && e > 0 ? P.slickGoTo(e - 1) : x === "right" && (e < o - 1 ? P.slickGoTo(e + 1) : A || m == null || m()), f(null), setTimeout(() => {
675
+ I.current = !1;
676
676
  }, 300);
677
677
  }, a));
678
678
  },
@@ -689,7 +689,7 @@ const fo = zt({
689
689
  ]
690
690
  ), y = le(() => {
691
691
  f(null), v();
692
- }, [v]), I = le(
692
+ }, [v]), S = le(
693
693
  (x) => {
694
694
  if (!n || !l.current)
695
695
  return;
@@ -719,13 +719,13 @@ const fo = zt({
719
719
  et(
720
720
  p,
721
721
  () => ({
722
- handleDragMove: I
722
+ handleDragMove: S
723
723
  }),
724
- [I]
724
+ [S]
725
725
  ), X(() => () => {
726
726
  v();
727
727
  }, [v]), X(() => {
728
- n || (v(), f(null), L.current = !1, c.current = 0);
728
+ n || (v(), f(null), I.current = !1, c.current = 0);
729
729
  }, [n, v]);
730
730
  const g = D`
731
731
  position: absolute;
@@ -794,7 +794,7 @@ const fo = zt({
794
794
  e > 0 && /* @__PURE__ */ s(
795
795
  "div",
796
796
  {
797
- className: M(g, "left", u === "left" && "active"),
797
+ className: L(g, "left", u === "left" && "active"),
798
798
  onMouseEnter: () => {
799
799
  n && z("left");
800
800
  },
@@ -806,7 +806,7 @@ const fo = zt({
806
806
  /* @__PURE__ */ s(
807
807
  "div",
808
808
  {
809
- className: M(g, "right", u === "right" && "active"),
809
+ className: L(g, "right", u === "right" && "active"),
810
810
  onMouseEnter: () => {
811
811
  const x = e >= o - 1, k = typeof r == "number" && o >= r;
812
812
  n && !(x && k) && z("right");
@@ -854,7 +854,6 @@ const js = D`
854
854
 
855
855
  /* 拖拽活动状态 */
856
856
  .sortable-drag {
857
- background: rgba(255, 255, 255, 0.05);
858
857
  backdrop-filter: blur(8px);
859
858
  -webkit-backdrop-filter: blur(8px);
860
859
  }
@@ -1027,7 +1026,7 @@ const Ys = De(({ src: t }) => {
1027
1026
  return /* @__PURE__ */ s(
1028
1027
  V.p,
1029
1028
  {
1030
- className: M(
1029
+ className: L(
1031
1030
  "zs-whitespace-nowrap zs-text-ellipsis zs-overflow-hidden zs-text-center zs-mt-1 zs-mb-0 zs-absolute zs-left-0 zs-right-0 zs-text-sm",
1032
1031
  D`
1033
1032
  color: ${(f = l.token.items) == null ? void 0 : f.textColor};
@@ -1043,16 +1042,16 @@ const Ys = De(({ src: t }) => {
1043
1042
  }
1044
1043
  );
1045
1044
  }, Vs = (t) => {
1046
- var L, v, z;
1045
+ var I, v, z;
1047
1046
  const { data: e, noLetters: o = !1, icon: r, from: n, iconSize: a = 64, contextMenuProps: i } = t, { contextMenuFuns: l } = Ae(), { itemIconBuilder: m, theme: p, contextMenu: d } = pe(), u = i != !1 ? i || d : i, { data: f = {} } = e, { name: c } = f;
1048
1047
  return /* @__PURE__ */ T(Ce, { children: [
1049
1048
  /* @__PURE__ */ s(
1050
1049
  V.div,
1051
1050
  {
1052
- className: M(
1051
+ className: L(
1053
1052
  "zs-cursor-pointer zs-relative zs-overflow-hidden",
1054
1053
  D`
1055
- background-color: ${(L = p.token.items) == null ? void 0 : L.iconBackgroundColor};
1054
+ background-color: ${(I = p.token.items) == null ? void 0 : I.iconBackgroundColor};
1056
1055
  border-radius: 0.75rem;
1057
1056
  box-shadow: 0 0 0.5rem ${(v = p.token.items) == null ? void 0 : v.iconShadowColor};
1058
1057
  width: ${a}px;
@@ -1063,7 +1062,7 @@ const Ys = De(({ src: t }) => {
1063
1062
  children: /* @__PURE__ */ s(
1064
1063
  "div",
1065
1064
  {
1066
- className: M(
1065
+ className: L(
1067
1066
  "zs-absolute zs-left-0 zs-top-0 zs-w-full zs-h-full",
1068
1067
  D`
1069
1068
  color: ${(z = p.token.items) == null ? void 0 : z.textColor};
@@ -1090,7 +1089,7 @@ const Ys = De(({ src: t }) => {
1090
1089
  "data-parent-ids": l == null ? void 0 : l.join(","),
1091
1090
  "data-children-length": m,
1092
1091
  onClick: () => n == null ? void 0 : n(e),
1093
- className: M(a && "drag-disabled", "zs-relative", o),
1092
+ className: L(a && "drag-disabled", "zs-relative", o),
1094
1093
  initial: { opacity: 0 },
1095
1094
  animate: { opacity: 1 },
1096
1095
  exit: { opacity: 0 },
@@ -1105,9 +1104,9 @@ const Ys = De(({ src: t }) => {
1105
1104
  setOpenGroupItemData: u,
1106
1105
  longPressTriggered: f,
1107
1106
  moveTargetId: c,
1108
- setMoveTargetId: L,
1107
+ setMoveTargetId: I,
1109
1108
  listStatus: v
1110
- } = Ae(), { itemIconBuilder: z, theme: y, contextMenu: I, typeConfigMap: g } = pe(), { children: b } = e, { row: x, col: k } = ko(e.type, (j = e.config) == null ? void 0 : j.sizeId, g), A = ((b == null ? void 0 : b.length) ?? 0) === 0, N = A ? [e] : [...b ?? []].slice(0, 9), P = te(() => c === e.id, [e.id, c]), B = D`
1109
+ } = Ae(), { itemIconBuilder: z, theme: y, contextMenu: S, typeConfigMap: g } = pe(), { children: b } = e, { row: x, col: k } = ko(e.type, (j = e.config) == null ? void 0 : j.sizeId, g), A = ((b == null ? void 0 : b.length) ?? 0) === 0, N = A ? [e] : [...b ?? []].slice(0, 9), P = te(() => c === e.id, [e.id, c]), B = D`
1111
1110
  overflow: hidden;
1112
1111
  cursor: pointer;
1113
1112
  background-color: ${(F = y.token.items) == null ? void 0 : F.iconBackgroundColor};
@@ -1118,7 +1117,7 @@ const Ys = De(({ src: t }) => {
1118
1117
  return /* @__PURE__ */ s(
1119
1118
  V.div,
1120
1119
  {
1121
- className: M(
1120
+ className: L(
1122
1121
  "sortable-group-item zs-cursor-pointer zs-w-full zs-h-full zs-absolute zs-left-0 zs-top-0 zs-bottom-0 zs-right-0 zs-overflow-hidden",
1123
1122
  D`
1124
1123
  background-color: ${(Z = y.token.items) == null ? void 0 : Z.iconBackgroundColor};
@@ -1135,7 +1134,7 @@ const Ys = De(({ src: t }) => {
1135
1134
  return /* @__PURE__ */ s(
1136
1135
  V.div,
1137
1136
  {
1138
- className: M(
1137
+ className: L(
1139
1138
  "zs-grid zs-w-full zs-h-full zs-grid-cols-3 zs-grid-rows-3 zs-place-items-center",
1140
1139
  D`
1141
1140
  padding: ${k === 1 ? "0.125rem" : "0.25rem"};
@@ -1145,7 +1144,7 @@ const Ys = De(({ src: t }) => {
1145
1144
  children: N == null ? void 0 : N.slice(0, 9).map((Y) => /* @__PURE__ */ s(
1146
1145
  V.div,
1147
1146
  {
1148
- className: M(
1147
+ className: L(
1149
1148
  B,
1150
1149
  "zs-w-full zs-h-full",
1151
1150
  D`
@@ -1165,7 +1164,7 @@ const Ys = De(({ src: t }) => {
1165
1164
  return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-10 zs-grid-rows-4 zs-gap-x-2 zs-gap-y-1 zs-place-items-center zs-w-36 h-[52px]", children: N == null ? void 0 : N.slice(0, 4).map((Y, re) => /* @__PURE__ */ s(
1166
1165
  V.div,
1167
1166
  {
1168
- className: M(
1167
+ className: L(
1169
1168
  B,
1170
1169
  re < 2 ? D`
1171
1170
  width: 52px;
@@ -1192,7 +1191,7 @@ const Ys = De(({ src: t }) => {
1192
1191
  return /* @__PURE__ */ s(V.div, { className: "zs-grid zs-grid-cols-4 zs-grid-rows-10 zs-gap-x-1 zs-gap-y-2 w-[52px] zs-h-36 zs-place-items-center", children: N == null ? void 0 : N.slice(0, 4).map((Y, re) => /* @__PURE__ */ s(
1193
1192
  V.div,
1194
1193
  {
1195
- className: M(
1194
+ className: L(
1196
1195
  B,
1197
1196
  re < 2 ? D`
1198
1197
  width: 52px;
@@ -1223,13 +1222,13 @@ const Ys = De(({ src: t }) => {
1223
1222
  itemIndex: n,
1224
1223
  parentIds: r,
1225
1224
  childrenLength: b == null ? void 0 : b.length,
1226
- className: M(o),
1225
+ className: L(o),
1227
1226
  children: [
1228
1227
  /* @__PURE__ */ s(
1229
1228
  V.div,
1230
1229
  {
1231
1230
  whileTap: { scale: 0.9 },
1232
- className: M(
1231
+ className: L(
1233
1232
  P ? "!scale-110" : "",
1234
1233
  "zs-cursor-pointer zs-relative my-0",
1235
1234
  D`
@@ -1246,11 +1245,11 @@ const Ys = De(({ src: t }) => {
1246
1245
  onClick: (Z) => {
1247
1246
  !A && !f && (e.parentIds = r, e.pageX = Z.pageX, e.pageY = Z.pageY, u(e));
1248
1247
  },
1249
- ...p(e, I !== !1),
1248
+ ...p(e, S !== !1),
1250
1249
  children: /* @__PURE__ */ T(
1251
1250
  V.div,
1252
1251
  {
1253
- className: M(
1252
+ className: L(
1254
1253
  "zs-relative zs-w-full zs-h-full flex zs-items-center zs-justify-center",
1255
1254
  D`
1256
1255
  padding: 0.375rem;
@@ -1261,7 +1260,7 @@ const Ys = De(({ src: t }) => {
1261
1260
  /* @__PURE__ */ s(
1262
1261
  mt,
1263
1262
  {
1264
- className: M(
1263
+ className: L(
1265
1264
  "sortable-group-item",
1266
1265
  "zs-absolute zs-cursor-pointer",
1267
1266
  D`
@@ -1284,7 +1283,7 @@ const Ys = De(({ src: t }) => {
1284
1283
  disabled: l,
1285
1284
  "data-id": e.id,
1286
1285
  onChange: () => {
1287
- l || L(e.id);
1286
+ l || I(e.id);
1288
1287
  }
1289
1288
  }
1290
1289
  )
@@ -1298,7 +1297,7 @@ const Ys = De(({ src: t }) => {
1298
1297
  }
1299
1298
  );
1300
1299
  }, wo = Ws, Xs = ({ value: t, onChange: e, onBlur: o, placeholder: r = "标题" }) => {
1301
- var p, d, u, f, c, L, v, z, y, I, g, b, x, k, A, N, P, B, J, j, F;
1300
+ var p, d, u, f, c, I, v, z, y, S, g, b, x, k, A, N, P, B, J, j, F;
1302
1301
  const [n, a] = R(t), { theme: i } = pe(), l = (E) => {
1303
1302
  const G = E.target.value;
1304
1303
  a(G), e(G);
@@ -1308,7 +1307,7 @@ const Ys = De(({ src: t }) => {
1308
1307
  return /* @__PURE__ */ s(
1309
1308
  "input",
1310
1309
  {
1311
- className: M(
1310
+ className: L(
1312
1311
  "zs-bg-transparent zs-text-center zs-text-xl zs-w-full zs-rounded-lg py-2 px-4",
1313
1312
  D`
1314
1313
  border-style: none;
@@ -1316,14 +1315,14 @@ const Ys = De(({ src: t }) => {
1316
1315
  font-weight: 600;
1317
1316
  letter-spacing: -0.5px;
1318
1317
  transition: all 0.2s ease-out;
1319
- background: ${(L = (c = (f = i.token.items) == null ? void 0 : f.groupModal) == null ? void 0 : c.title) == null ? void 0 : L.backgroundColor};
1318
+ background: ${(I = (c = (f = i.token.items) == null ? void 0 : f.groupModal) == null ? void 0 : c.title) == null ? void 0 : I.backgroundColor};
1320
1319
 
1321
1320
  &:focus {
1322
1321
  outline: none;
1323
1322
  background: ${(y = (z = (v = i.token.items) == null ? void 0 : v.groupModal) == null ? void 0 : z.title) == null ? void 0 : y.focusBackgroundColor};
1324
1323
  backdrop-filter: blur(8px);
1325
1324
  -webkit-backdrop-filter: blur(8px);
1326
- box-shadow: 0 0 0 2px ${(b = (g = (I = i.token.items) == null ? void 0 : I.groupModal) == null ? void 0 : g.title) == null ? void 0 : b.shadowColor};
1325
+ box-shadow: 0 0 0 2px ${(b = (g = (S = i.token.items) == null ? void 0 : S.groupModal) == null ? void 0 : g.title) == null ? void 0 : b.shadowColor};
1327
1326
  transform: scale(1.02);
1328
1327
  }
1329
1328
 
@@ -1360,13 +1359,13 @@ const Ys = De(({ src: t }) => {
1360
1359
  footer: p = null,
1361
1360
  className: d,
1362
1361
  contentClassName: u
1363
- } = t, { theme: f } = pe(), c = f.token.modal, [L, v] = R(!1), [z, y] = R(!1);
1362
+ } = t, { theme: f } = pe(), c = f.token.modal, [I, v] = R(!1), [z, y] = R(!1);
1364
1363
  return X(() => {
1365
1364
  v(!!e);
1366
1365
  }, [e]), /* @__PURE__ */ s(ze, { children: e && /* @__PURE__ */ s(
1367
1366
  sn,
1368
1367
  {
1369
- visible: L,
1368
+ visible: I,
1370
1369
  onClose: () => {
1371
1370
  y(!0), v(!1), setTimeout(() => {
1372
1371
  y(!1), o();
@@ -1378,7 +1377,7 @@ const Ys = De(({ src: t }) => {
1378
1377
  title: r,
1379
1378
  footer: p,
1380
1379
  closable: m,
1381
- className: M(
1380
+ className: L(
1382
1381
  "base-modal",
1383
1382
  { "modal-closing": z },
1384
1383
  D`
@@ -1518,7 +1517,7 @@ const Ys = De(({ src: t }) => {
1518
1517
  children: /* @__PURE__ */ s(
1519
1518
  "div",
1520
1519
  {
1521
- className: M(
1520
+ className: L(
1522
1521
  "zs-overflow-y-auto zs-relative",
1523
1522
  D`
1524
1523
  max-height: 60vh;
@@ -1550,7 +1549,7 @@ const Ys = De(({ src: t }) => {
1550
1549
  }
1551
1550
  ) });
1552
1551
  }, qs = (t) => {
1553
- const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: a, setListStatus: i, setMoveItemId: l, setMoveTargetId: m, updateItem: p } = Ae(), [d, u] = R("文件夹"), f = oe(null), c = oe(null), [L, v] = R(), [z, y] = R(), I = [...(e == null ? void 0 : e.children) ?? []];
1552
+ const { data: e, onClose: o, onItemClick: r } = t, { list: n, setList: a, setListStatus: i, setMoveItemId: l, setMoveTargetId: m, updateItem: p } = Ae(), [d, u] = R("文件夹"), f = oe(null), c = oe(null), [I, v] = R(), [z, y] = R(), S = [...(e == null ? void 0 : e.children) ?? []];
1554
1553
  X(() => {
1555
1554
  var N;
1556
1555
  e && u((N = e.data) == null ? void 0 : N.name);
@@ -1611,8 +1610,8 @@ const Ys = De(({ src: t }) => {
1611
1610
  children: /* @__PURE__ */ s("div", { ref: A, className: "zs-min-h-96 zs-px-4", onDragLeave: x, children: /* @__PURE__ */ s(
1612
1611
  mt,
1613
1612
  {
1614
- className: M("zs-grid zs-place-items-center zs-grid-flow-row-dense zs-mx-auto", js),
1615
- style: { width: L, marginLeft: z },
1613
+ className: L("zs-grid zs-place-items-center zs-grid-flow-row-dense zs-mx-auto", js),
1614
+ style: { width: I, marginLeft: z },
1616
1615
  ...Gs,
1617
1616
  list: (e == null ? void 0 : e.children) ?? [],
1618
1617
  setList: (N) => {
@@ -1629,7 +1628,7 @@ const Ys = De(({ src: t }) => {
1629
1628
  l(null), m(null), i(null);
1630
1629
  },
1631
1630
  ghostClass: wo,
1632
- children: /* @__PURE__ */ s(ze, { mode: "popLayout", children: I.map((N, P) => /* @__PURE__ */ s("div", { className: "zs-w-28 zs-h-28 zs-flex zs-items-center zs-justify-center", children: /* @__PURE__ */ s(Pe, { data: N, itemIndex: P, onClick: r }, N.id) }, N.id)) })
1631
+ children: /* @__PURE__ */ s(ze, { mode: "popLayout", children: S.map((N, P) => /* @__PURE__ */ s("div", { className: "zs-w-28 zs-h-28 zs-flex zs-items-center zs-justify-center", children: /* @__PURE__ */ s(Pe, { data: N, itemIndex: P, onClick: r }, N.id) }, N.id)) })
1633
1632
  }
1634
1633
  ) })
1635
1634
  }
@@ -1650,7 +1649,7 @@ const Ys = De(({ src: t }) => {
1650
1649
  children: e && /* @__PURE__ */ s(
1651
1650
  "div",
1652
1651
  {
1653
- className: M(
1652
+ className: L(
1654
1653
  "zs-p-2 zs-rounded-md",
1655
1654
  D`
1656
1655
  background-color: ${(a = r.token.items) == null ? void 0 : a.infoModalBackgroundColor};
@@ -1664,7 +1663,7 @@ const Ys = De(({ src: t }) => {
1664
1663
  }, Ks = ({ dots: t, className: e }) => /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
1665
1664
  "ul",
1666
1665
  {
1667
- className: M(
1666
+ className: L(
1668
1667
  "slick-dots-default",
1669
1668
  "!zs-flex zs-justify-center zs-items-center zs-gap-3",
1670
1669
  D`
@@ -1712,7 +1711,7 @@ const Ys = De(({ src: t }) => {
1712
1711
  "button",
1713
1712
  {
1714
1713
  type: "button",
1715
- className: M(
1714
+ className: L(
1716
1715
  "zs-w-2 zs-h-2 zs-rounded-full zs-border-none zs-cursor-pointer",
1717
1716
  D`
1718
1717
  background-color: ${n ? "rgba(0, 0, 0, 1)" : "rgba(0, 0, 0, 0.3)"};
@@ -1723,15 +1722,15 @@ const Ys = De(({ src: t }) => {
1723
1722
  }
1724
1723
  );
1725
1724
  }, ea = ({ onClick: t, className: e }) => {
1726
- var c, L, v;
1727
- const [o, r] = R(!1), { theme: n } = pe(), a = (v = (L = (c = n == null ? void 0 : n.token) == null ? void 0 : c.dock) == null ? void 0 : L.launchpad) == null ? void 0 : v.icon, i = a.textColor, l = a.backgroundColor, m = a.borderColor, p = a.shadowColor, d = a.hoverGlowColor, u = (z, y) => {
1725
+ var c, I, v;
1726
+ const [o, r] = R(!1), { theme: n } = pe(), a = (v = (I = (c = n == null ? void 0 : n.token) == null ? void 0 : c.dock) == null ? void 0 : I.launchpad) == null ? void 0 : v.icon, i = a.textColor, l = a.backgroundColor, m = a.borderColor, p = a.shadowColor, d = a.hoverGlowColor, u = (z, y) => {
1728
1727
  if (z.startsWith("#")) {
1729
1728
  const g = z.slice(1), b = parseInt(g.slice(0, 2), 16), x = parseInt(g.slice(2, 4), 16), k = parseInt(g.slice(4, 6), 16), A = y * 15, N = Math.max(0, b - A), P = Math.max(0, x - A), B = Math.max(0, k - A);
1730
1729
  return `rgb(${N}, ${P}, ${B})`;
1731
1730
  }
1732
- const I = z.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
1733
- if (I) {
1734
- const g = parseInt(I[1]), b = parseInt(I[2]), x = parseInt(I[3]), k = I[4] || "1", A = y * 15, N = Math.max(0, g - A), P = Math.max(0, b - A), B = Math.max(0, x - A);
1731
+ const S = z.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
1732
+ if (S) {
1733
+ const g = parseInt(S[1]), b = parseInt(S[2]), x = parseInt(S[3]), k = S[4] || "1", A = y * 15, N = Math.max(0, g - A), P = Math.max(0, b - A), B = Math.max(0, x - A);
1735
1734
  return `rgba(${N}, ${P}, ${B}, ${k})`;
1736
1735
  }
1737
1736
  return z;
@@ -1753,7 +1752,7 @@ const Ys = De(({ src: t }) => {
1753
1752
  return /* @__PURE__ */ T(
1754
1753
  V.div,
1755
1754
  {
1756
- className: M("zs-cursor-pointer zs-relative", e),
1755
+ className: L("zs-cursor-pointer zs-relative", e),
1757
1756
  style: {
1758
1757
  overflow: "visible",
1759
1758
  padding: "0 8px 0 0"
@@ -1778,11 +1777,11 @@ const Ys = De(({ src: t }) => {
1778
1777
  overflow: "visible"
1779
1778
  },
1780
1779
  children: f.map((z, y) => {
1781
- const I = y * 4, g = 0, b = o ? I + y * 2 : I, x = g, k = 0, A = 1 - y * 0.05, N = f.length - y, P = (B) => B === 0 ? l : u(l, B);
1780
+ const S = y * 4, g = 0, b = o ? S + y * 2 : S, x = g, k = 0, A = 1 - y * 0.05, N = f.length - y, P = (B) => B === 0 ? l : u(l, B);
1782
1781
  return /* @__PURE__ */ s(
1783
1782
  V.div,
1784
1783
  {
1785
- className: M(
1784
+ className: L(
1786
1785
  "zs-absolute zs-w-full zs-h-full zs-rounded-xl zs-flex zs-items-center zs-justify-center zs-shadow-lg",
1787
1786
  D`
1788
1787
  background: ${P(y)};
@@ -1818,7 +1817,7 @@ const Ys = De(({ src: t }) => {
1818
1817
  /* @__PURE__ */ s(
1819
1818
  V.div,
1820
1819
  {
1821
- className: M(
1820
+ className: L(
1822
1821
  "zs-absolute zs-inset-0 zs-rounded-xl zs-pointer-events-none",
1823
1822
  D`
1824
1823
  background: radial-gradient(circle, ${d} 0%, transparent 70%);
@@ -1832,7 +1831,7 @@ const Ys = De(({ src: t }) => {
1832
1831
  ]
1833
1832
  }
1834
1833
  );
1835
- }, No = ({ onClick: t, className: e }) => /* @__PURE__ */ s(ea, { onClick: t, className: M("zs-flex-shrink-0", e) }), Io = ({
1834
+ }, No = ({ onClick: t, className: e }) => /* @__PURE__ */ s(ea, { onClick: t, className: L("zs-flex-shrink-0", e) }), Io = ({
1836
1835
  items: t = [],
1837
1836
  fixedItems: e = [],
1838
1837
  position: o = "bottom",
@@ -1845,8 +1844,8 @@ const Ys = De(({ src: t }) => {
1845
1844
  onDockItemsChange: p,
1846
1845
  itemSize: d = 56
1847
1846
  }) => {
1848
- var I;
1849
- const { setListStatus: u } = Ae(), { theme: f } = pe(), c = f.token.dock, L = f.token.base, v = (g, b) => n ? n(g, b) : /* @__PURE__ */ s(Pe, { data: g, itemIndex: b, noLetters: !0, from: "dock", iconSize: d }, g.id), z = (g, b) => a ? a(g, b) : /* @__PURE__ */ s(
1847
+ var S;
1848
+ const { setListStatus: u } = Ae(), { theme: f } = pe(), c = f.token.dock, I = f.token.base, v = (g, b) => n ? n(g, b) : /* @__PURE__ */ s(Pe, { data: g, itemIndex: b, noLetters: !0, from: "dock", iconSize: d }, g.id), z = (g, b) => a ? a(g, b) : /* @__PURE__ */ s(
1850
1849
  Pe,
1851
1850
  {
1852
1851
  data: g,
@@ -1863,11 +1862,11 @@ const Ys = De(({ src: t }) => {
1863
1862
  const y = /* @__PURE__ */ s(
1864
1863
  "div",
1865
1864
  {
1866
- className: M(
1865
+ className: L(
1867
1866
  "zs-flex zs-transition-colors",
1868
1867
  o === "top" || o === "bottom" ? "zs-w-[1px] zs-h-8 zs-mx-1" : "zs-w-8 zs-h-[1px] zs-my-1",
1869
1868
  D`
1870
- background-color: ${((I = c == null ? void 0 : c.divider) == null ? void 0 : I.color) || "rgba(255, 255, 255, 0.3)"};
1869
+ background-color: ${((S = c == null ? void 0 : c.divider) == null ? void 0 : S.color) || "rgba(255, 255, 255, 0.3)"};
1871
1870
  `
1872
1871
  )
1873
1872
  }
@@ -1875,7 +1874,7 @@ const Ys = De(({ src: t }) => {
1875
1874
  return /* @__PURE__ */ T(
1876
1875
  "div",
1877
1876
  {
1878
- className: M(
1877
+ className: L(
1879
1878
  "zs-flex zs-justify-between zs-items-center zs-rounded-2xl zs-py-3 zs-px-4 zs-backdrop-blur-xl zs-gap-1 zs-border zs-transition-colors zs-max-w-full",
1880
1879
  o === "top" || o === "bottom" ? "zs-flex-row" : "zs-flex-col",
1881
1880
  o === "top" && "zs-mb-4",
@@ -1895,7 +1894,7 @@ const Ys = De(({ src: t }) => {
1895
1894
  e.length > 0 && /* @__PURE__ */ s(
1896
1895
  "div",
1897
1896
  {
1898
- className: M(
1897
+ className: L(
1899
1898
  "zs-flex zs-gap-3",
1900
1899
  D`
1901
1900
  ${o === "top" || o === "bottom" ? "flex-direction: row;" : "flex-direction: column;"}
@@ -1913,7 +1912,7 @@ const Ys = De(({ src: t }) => {
1913
1912
  p && p(g);
1914
1913
  },
1915
1914
  ...bo,
1916
- className: M(
1915
+ className: L(
1917
1916
  "desktop-dock-sortable zs-flex zs-gap-3 flex-1 zs-relative",
1918
1917
  D`
1919
1918
  min-height: ${d}px;
@@ -1951,12 +1950,12 @@ const Ys = De(({ src: t }) => {
1951
1950
  children: t.length > 0 ? t.map((g, b) => v(g, b)) : /* @__PURE__ */ s(
1952
1951
  V.div,
1953
1952
  {
1954
- className: M(
1953
+ className: L(
1955
1954
  "drag-disabled dock-items-empty zs-flex zs-items-center zs-justify-center zs-gap-2 zs-rounded-xl zs-border-2 zs-border-dashed zs-absolute zs-top-0 zs-left-0",
1956
1955
  D`
1957
1956
  min-height: ${d}px;
1958
1957
  ${o === "top" || o === "bottom" ? "width: 100%; padding: 8px 12px;" : `height: 100%; min-width: ${d}px; padding: 12px 8px;`};
1959
- color: ${(L == null ? void 0 : L.textColor) || "rgba(0, 0, 0, 0.6)"};
1958
+ color: ${(I == null ? void 0 : I.textColor) || "rgba(0, 0, 0, 0.6)"};
1960
1959
  border-color: ${(c == null ? void 0 : c.borderColor) || "rgba(0, 0, 0, 0.2)"};
1961
1960
  background-color: ${(c == null ? void 0 : c.backgroundColor) || "rgba(255, 255, 255, 0.25)"};
1962
1961
  opacity: 0.5 !important;
@@ -1975,7 +1974,7 @@ const Ys = De(({ src: t }) => {
1975
1974
  }, bt = D`
1976
1975
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
1977
1976
  `, ta = ({ value: t, onChange: e, placeholder: o = "搜索应用", className: r = "" }) => {
1978
- var c, L, v, z, y, I, g, b, x, k, A, N, P, B, J, j, F, E, G, se, Z, Y, re, de, fe, ie, ce, Q, ue, Ie, ne, xe, me, ve, we, O, q, U, _, ee, K, h, C;
1977
+ var c, I, v, z, y, S, g, b, x, k, A, N, P, B, J, j, F, E, G, se, Z, Y, re, de, fe, ie, ce, Q, ue, Ie, ne, xe, me, ve, we, O, q, U, _, ee, K, h, C;
1979
1978
  const { theme: n } = pe(), a = oe(null), i = oe(null), l = oe(null), [m, p] = R(!1), d = () => {
1980
1979
  p(!0), i.current && (i.current.style.transform = "translateY(-50%) translateX(-0.5rem)"), l.current && (l.current.style.transform = "translateY(-50%) translateX(0.5rem)");
1981
1980
  }, u = () => {
@@ -1989,10 +1988,10 @@ const Ys = De(({ src: t }) => {
1989
1988
  "div",
1990
1989
  {
1991
1990
  ref: i,
1992
- className: M(
1991
+ className: L(
1993
1992
  "zs-absolute zs-left-4 zs-top-1/2 zs-transform zs--translate-y-1/2 zs-pointer-events-none zs-transition-all zs-duration-300",
1994
1993
  D`
1995
- color: ${m ? (z = (v = (L = (c = n.token.dock) == null ? void 0 : c.launchpad) == null ? void 0 : L.modal) == null ? void 0 : v.searchBox) == null ? void 0 : z.iconFocusColor : (b = (g = (I = (y = n.token.dock) == null ? void 0 : y.launchpad) == null ? void 0 : I.modal) == null ? void 0 : g.searchBox) == null ? void 0 : b.iconColor};
1994
+ color: ${m ? (z = (v = (I = (c = n.token.dock) == null ? void 0 : c.launchpad) == null ? void 0 : I.modal) == null ? void 0 : v.searchBox) == null ? void 0 : z.iconFocusColor : (b = (g = (S = (y = n.token.dock) == null ? void 0 : y.launchpad) == null ? void 0 : S.modal) == null ? void 0 : g.searchBox) == null ? void 0 : b.iconColor};
1996
1995
  `,
1997
1996
  bt
1998
1997
  ),
@@ -2003,7 +2002,7 @@ const Ys = De(({ src: t }) => {
2003
2002
  "input",
2004
2003
  {
2005
2004
  ref: a,
2006
- className: M(
2005
+ className: L(
2007
2006
  "zs-w-full zs-h-11 zs-pl-12 zs-pr-12 zs-border-none zs-rounded-[22px] zs-text-base zs-outline-none zs-transition-all zs-duration-300 placeholder:zs-font-normal focus:zs-scale-[1.02]",
2008
2007
  D`
2009
2008
  background-color: ${(N = (A = (k = (x = n.token.dock) == null ? void 0 : x.launchpad) == null ? void 0 : k.modal) == null ? void 0 : A.searchBox) == null ? void 0 : N.backgroundColor};
@@ -2030,7 +2029,7 @@ const Ys = De(({ src: t }) => {
2030
2029
  "button",
2031
2030
  {
2032
2031
  ref: l,
2033
- className: M(
2032
+ className: L(
2034
2033
  "zs-absolute zs-right-3 zs-top-1/2 zs-transform zs--translate-y-1/2 zs-w-5 zs-h-5 zs-rounded-full zs-border-none zs-text-xs zs-cursor-pointer zs-flex zs-items-center zs-justify-center zs-transition-all zs-duration-300 hover:zs-scale-110 active:zs-scale-95",
2035
2034
  D`
2036
2035
  background-color: ${(me = (xe = (ne = (Ie = (ue = n.token.dock) == null ? void 0 : ue.launchpad) == null ? void 0 : Ie.modal) == null ? void 0 : ne.searchBox) == null ? void 0 : xe.clearButton) == null ? void 0 : me.backgroundColor};
@@ -2051,7 +2050,7 @@ const Ys = De(({ src: t }) => {
2051
2050
  const { list: r } = Ae(), [n, a] = R(""), { allApps: i, groupedData: l, groups: m, groupCounts: p } = te(() => {
2052
2051
  if (!r || r.length === 0)
2053
2052
  return { allApps: [], groupedData: [], groups: [], groupCounts: [] };
2054
- const u = (g) => g.flatMap((b) => b.type === "app" ? [{ ...b }] : b.type === "group" && b.children ? u(b.children) : []), f = r.flatMap((g) => g.children ? u(g.children) : []), L = (n.trim() ? f.filter((g) => {
2053
+ const u = (g) => g.flatMap((b) => b.type === "app" ? [{ ...b }] : b.type === "group" && b.children ? u(b.children) : []), f = r.flatMap((g) => g.children ? u(g.children) : []), I = (n.trim() ? f.filter((g) => {
2055
2054
  var x;
2056
2055
  return (((x = g.data) == null ? void 0 : x.name) || g.id || "").toString().toLowerCase().includes(n.toLowerCase());
2057
2056
  }) : f).sort((g, b) => {
@@ -2059,20 +2058,20 @@ const Ys = De(({ src: t }) => {
2059
2058
  const x = (((A = g.data) == null ? void 0 : A.name) || g.id || "").toString(), k = (((N = b.data) == null ? void 0 : N.name) || b.id || "").toString();
2060
2059
  return x.localeCompare(k);
2061
2060
  }), v = /* @__PURE__ */ new Map();
2062
- L.forEach((g) => {
2061
+ I.forEach((g) => {
2063
2062
  var A;
2064
2063
  const x = (((A = g.data) == null ? void 0 : A.name) || g.id || "").toString().charAt(0).toUpperCase(), k = /[A-Z]/.test(x) ? x : "#";
2065
2064
  v.has(k) || v.set(k, []), v.get(k).push(g);
2066
2065
  });
2067
- const z = Array.from(v.keys()).sort((g, b) => g === "#" ? 1 : b === "#" ? -1 : g.localeCompare(b)), y = [], I = [];
2066
+ const z = Array.from(v.keys()).sort((g, b) => g === "#" ? 1 : b === "#" ? -1 : g.localeCompare(b)), y = [], S = [];
2068
2067
  return z.forEach((g) => {
2069
2068
  const b = v.get(g) || [];
2070
- y.push(...b), I.push(b.length);
2069
+ y.push(...b), S.push(b.length);
2071
2070
  }), {
2072
- allApps: L,
2071
+ allApps: I,
2073
2072
  groupedData: y,
2074
2073
  groups: z,
2075
- groupCounts: I
2074
+ groupCounts: S
2076
2075
  };
2077
2076
  }, [r, n]), d = (u) => {
2078
2077
  const f = m[u], c = document.getElementById(`group-${f}`);
@@ -2086,11 +2085,11 @@ const Ys = De(({ src: t }) => {
2086
2085
  title: /* @__PURE__ */ s("div", { className: "zs-py-4", children: /* @__PURE__ */ s(ta, { value: n, onChange: a, placeholder: "搜索应用" }) }),
2087
2086
  width: 900,
2088
2087
  children: [
2089
- /* @__PURE__ */ s("div", { className: M("zs-relative zs-overflow-hidden zs-min-h-[60vh] zs-max-h-[600px]"), children: i.length === 0 ? /* @__PURE__ */ T("div", { className: "zs-flex-1 zs-flex zs-items-center zs-justify-center zs-flex-col zs-text-[#8e8e93] zs-text-xl zs-font-medium zs-text-center", children: [
2088
+ /* @__PURE__ */ s("div", { className: L("zs-relative zs-overflow-hidden zs-min-h-[60vh] zs-max-h-[600px]"), children: i.length === 0 ? /* @__PURE__ */ T("div", { className: "zs-flex-1 zs-flex zs-items-center zs-justify-center zs-flex-col zs-text-[#8e8e93] zs-text-xl zs-font-medium zs-text-center", children: [
2090
2089
  /* @__PURE__ */ s("div", { className: "zs-text-6xl zs-mb-4 zs-opacity-60", children: n.trim() ? "🔍" : "📱" }),
2091
2090
  /* @__PURE__ */ s("div", { className: "zs-mb-2", children: n.trim() ? "未找到相关应用" : "暂无应用" }),
2092
2091
  /* @__PURE__ */ s("div", { className: "zs-text-base zs-text-[#c7c7cc] zs-font-normal", children: n.trim() ? "尝试使用其他关键词搜索" : "请添加应用到启动台" })
2093
- ] }) : /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ s("div", { className: M("zs-overflow-y-auto zs-h-full zs-ml-14 zs-p-1"), children: /* @__PURE__ */ s("div", { className: "zs-flex zs-gap-8 zs-flex-wrap", children: /* @__PURE__ */ s(ze, { mode: "popLayout", children: n.trim() ? (
2092
+ ] }) : /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ s("div", { className: L("zs-overflow-y-auto zs-h-full zs-ml-14 zs-p-1"), children: /* @__PURE__ */ s("div", { className: "zs-flex zs-gap-8 zs-flex-wrap", children: /* @__PURE__ */ s(ze, { mode: "popLayout", children: n.trim() ? (
2094
2093
  // 搜索模式:简单网格布局
2095
2094
  i.map((u, f) => /* @__PURE__ */ s("div", { className: "zs-mb-6", children: /* @__PURE__ */ s(
2096
2095
  Pe,
@@ -2105,11 +2104,11 @@ const Ys = De(({ src: t }) => {
2105
2104
  ) : (
2106
2105
  // 正常模式:字母分组布局groups
2107
2106
  m.map((u, f) => {
2108
- const c = p.slice(0, f).reduce((v, z) => v + z, 0), L = l.slice(
2107
+ const c = p.slice(0, f).reduce((v, z) => v + z, 0), I = l.slice(
2109
2108
  c,
2110
2109
  c + p[f]
2111
2110
  );
2112
- return /* @__PURE__ */ s(Ce, { children: L.map((v, z) => /* @__PURE__ */ s(
2111
+ return /* @__PURE__ */ s(Ce, { children: I.map((v, z) => /* @__PURE__ */ s(
2113
2112
  "div",
2114
2113
  {
2115
2114
  id: z === 0 ? `group-${u}` : void 0,
@@ -2191,7 +2190,7 @@ const Ys = De(({ src: t }) => {
2191
2190
  position: "bottom",
2192
2191
  showLaunchpad: !0
2193
2192
  }
2194
- } = t, p = oe(null), d = oe(null), u = oe(null), [f, c] = R(0), [L, v] = R(!1), [z, y] = R(!1), [I, g] = R(!0), {
2193
+ } = t, p = oe(null), d = oe(null), u = oe(null), [f, c] = R(0), [I, v] = R(!1), [z, y] = R(!1), [S, g] = R(!0), {
2195
2194
  list: b,
2196
2195
  setList: x,
2197
2196
  setListStatus: k,
@@ -2347,11 +2346,11 @@ const Ys = De(({ src: t }) => {
2347
2346
  }
2348
2347
  if (h && C && h !== C && (w && (w.disconnect(), U.current = null), W && (globalThis.removeEventListener("resize", W), _.current = null), q.current = null), h)
2349
2348
  if (q.current = h, requestAnimationFrame(() => ee(h)), "ResizeObserver" in globalThis) {
2350
- const S = new ResizeObserver(() => ee(h));
2351
- U.current = S, S.observe(h);
2349
+ const M = new ResizeObserver(() => ee(h));
2350
+ U.current = M, M.observe(h);
2352
2351
  } else {
2353
- const S = () => ee(h);
2354
- _.current = S, globalThis.addEventListener("resize", S);
2352
+ const M = () => ee(h);
2353
+ _.current = M, globalThis.addEventListener("resize", M);
2355
2354
  }
2356
2355
  },
2357
2356
  [ee]
@@ -2361,7 +2360,7 @@ const Ys = De(({ src: t }) => {
2361
2360
  "div",
2362
2361
  {
2363
2362
  ref: d,
2364
- className: M("zs-relative zs-w-full zs-h-full", xe),
2363
+ className: L("zs-relative zs-w-full zs-h-full", xe),
2365
2364
  onDragOver: (h) => {
2366
2365
  h.preventDefault(), u.current && u.current.handleDragMove(h);
2367
2366
  },
@@ -2405,7 +2404,7 @@ const Ys = De(({ src: t }) => {
2405
2404
  po,
2406
2405
  {
2407
2406
  ref: u,
2408
- isDragging: L,
2407
+ isDragging: I,
2409
2408
  activeSlide: f,
2410
2409
  totalSlides: Q.length,
2411
2410
  maxSlides: a,
@@ -2424,8 +2423,8 @@ const Ys = De(({ src: t }) => {
2424
2423
  infinite: !1,
2425
2424
  dots: !0,
2426
2425
  lazyLoad: "anticipated",
2427
- touchMove: I,
2428
- className: M(
2426
+ touchMove: S,
2427
+ className: L(
2429
2428
  ne,
2430
2429
  D`
2431
2430
  height: 100%;
@@ -2466,7 +2465,7 @@ const Ys = De(({ src: t }) => {
2466
2465
  pagingDotsBuilder: de,
2467
2466
  slickDots: h,
2468
2467
  disabled: e === !1,
2469
- className: M(
2468
+ className: L(
2470
2469
  "slick-dots-default",
2471
2470
  D`
2472
2471
  .slick-dots-default {
@@ -2489,8 +2488,8 @@ const Ys = De(({ src: t }) => {
2489
2488
  if (Se.quickJSONCheck(w))
2490
2489
  try {
2491
2490
  F(JSON.parse(w), [h.id]);
2492
- } catch (S) {
2493
- console.log("drag error", S);
2491
+ } catch (M) {
2492
+ console.log("drag error", M);
2494
2493
  }
2495
2494
  },
2496
2495
  onDragOver: (C) => {
@@ -2499,7 +2498,7 @@ const Ys = De(({ src: t }) => {
2499
2498
  children: /* @__PURE__ */ T(
2500
2499
  mt,
2501
2500
  {
2502
- className: M("zs-grid zs-h-full", Us),
2501
+ className: L("zs-grid zs-h-full", Us),
2503
2502
  style: { width: me, marginLeft: we, transform: "translate(28px, 28px)" },
2504
2503
  ...bo,
2505
2504
  list: h.children ?? [],
@@ -2507,14 +2506,14 @@ const Ys = De(({ src: t }) => {
2507
2506
  onMove: (C) => {
2508
2507
  var $;
2509
2508
  k("onMove");
2510
- const { dragged: w, related: W } = C, S = w.dataset, H = W.dataset;
2511
- return j(null), !((Object.keys(H).length === 0 || H.parentIds) && Number(S.childrenLength) > 0 && W.classList.contains("sortable-group-item") || (W.classList.contains("desktop-dock-sortable") || ($ = W.parentElement) != null && $.classList.contains("desktop-dock-sortable")) && Number(S.childrenLength) > 0);
2509
+ const { dragged: w, related: W } = C, M = w.dataset, H = W.dataset;
2510
+ return j(null), !((Object.keys(H).length === 0 || H.parentIds) && Number(M.childrenLength) > 0 && W.classList.contains("sortable-group-item") || (W.classList.contains("desktop-dock-sortable") || ($ = W.parentElement) != null && $.classList.contains("desktop-dock-sortable")) && Number(M.childrenLength) > 0);
2512
2511
  },
2513
2512
  onStart: (C) => {
2514
- var S;
2513
+ var M;
2515
2514
  const w = C.item.dataset;
2516
2515
  w != null && w.id && J(w.id), k("onMove"), v(!0);
2517
- const W = (S = h.children) == null ? void 0 : S.find((H) => H.id === w.id);
2516
+ const W = (M = h.children) == null ? void 0 : M.find((H) => H.id === w.id);
2518
2517
  W && G(W);
2519
2518
  },
2520
2519
  onEnd: () => {
@@ -2529,20 +2528,23 @@ const Ys = De(({ src: t }) => {
2529
2528
  let W;
2530
2529
  if (fe)
2531
2530
  return fe(C);
2532
- const { row: S, col: H } = ko(C.type, ($ = C.config) == null ? void 0 : $.sizeId, ie);
2531
+ const { row: M, col: H } = ko(C.type, ($ = C.config) == null ? void 0 : $.sizeId, ie);
2533
2532
  switch (C.type) {
2534
2533
  case "group":
2535
2534
  case "app":
2536
2535
  W = /* @__PURE__ */ s(
2537
- "div",
2536
+ V.div,
2538
2537
  {
2539
- className: M(
2538
+ className: L(
2540
2539
  "zs-flex zs-justify-start zs-items-start",
2541
2540
  D`
2542
- grid-row: span ${S};
2541
+ grid-row: span ${M};
2543
2542
  grid-column: span ${H};
2544
2543
  `
2545
2544
  ),
2545
+ "data-id": C.id,
2546
+ layout: I ? !1 : "position",
2547
+ transition: I ? { duration: 0 } : { type: "spring", stiffness: 380, damping: 38 },
2546
2548
  onMouseEnter: () => g(!1),
2547
2549
  onMouseLeave: () => g(!0),
2548
2550
  children: /* @__PURE__ */ s(
@@ -2560,15 +2562,18 @@ const Ys = De(({ src: t }) => {
2560
2562
  break;
2561
2563
  default:
2562
2564
  W = /* @__PURE__ */ s(
2563
- "div",
2565
+ V.div,
2564
2566
  {
2565
- className: M(
2567
+ className: L(
2566
2568
  "zs-flex zs-justify-center zs-items-center",
2567
2569
  D`
2568
- grid-row: span ${S};
2570
+ grid-row: span ${M};
2569
2571
  grid-column: span ${H};
2570
2572
  `
2571
2573
  ),
2574
+ "data-id": C.id,
2575
+ layout: I ? !1 : "position",
2576
+ transition: I ? { duration: 0 } : { type: "spring", stiffness: 380, damping: 38 },
2572
2577
  onMouseEnter: () => g(!1),
2573
2578
  onMouseLeave: () => g(!0),
2574
2579
  children: /* @__PURE__ */ s(Pe, { data: C, itemIndex: w, onClick: i })
@@ -2619,7 +2624,7 @@ const Ys = De(({ src: t }) => {
2619
2624
  return /* @__PURE__ */ s(
2620
2625
  V.div,
2621
2626
  {
2622
- className: M(
2627
+ className: L(
2623
2628
  "zs-rounded-2xl py-2 zs-w-max zs-z-50",
2624
2629
  D`
2625
2630
  background-color: ${(a = n.token.contextMenu) == null ? void 0 : a.backgroundColor};
@@ -2657,7 +2662,7 @@ const Ys = De(({ src: t }) => {
2657
2662
  return /* @__PURE__ */ T(
2658
2663
  V.div,
2659
2664
  {
2660
- className: M(
2665
+ className: L(
2661
2666
  "zs-py-0 zs-px-5 zs-flex zs-items-center zs-gap-4 zs-cursor-pointer zs-relative zs-h-10 zs-outline-none",
2662
2667
  D`
2663
2668
  z-index: 1;
@@ -2672,7 +2677,7 @@ const Ys = De(({ src: t }) => {
2672
2677
  V.div,
2673
2678
  {
2674
2679
  layoutId: "menuHover",
2675
- className: M(
2680
+ className: L(
2676
2681
  "zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-bg-black zs-bg-opacity-5 zs-rounded-lg",
2677
2682
  D`
2678
2683
  z-index: -1;
@@ -2692,7 +2697,7 @@ const Ys = De(({ src: t }) => {
2692
2697
  /* @__PURE__ */ s(
2693
2698
  V.div,
2694
2699
  {
2695
- className: M(
2700
+ className: L(
2696
2701
  "zs-flex-1 zs-text-sm",
2697
2702
  D`
2698
2703
  font-weight: 400;
@@ -2707,7 +2712,7 @@ const Ys = De(({ src: t }) => {
2707
2712
  t && /* @__PURE__ */ s(
2708
2713
  V.div,
2709
2714
  {
2710
- className: M(
2715
+ className: L(
2711
2716
  "zs-flex zs-items-center zs-justify-center zs-shrink-0",
2712
2717
  D`
2713
2718
  color: ${c};
@@ -2724,8 +2729,8 @@ const Ys = De(({ src: t }) => {
2724
2729
  );
2725
2730
  }, na = ({ text: t, icon: e, index: o, children: r, color: n, textColor: a, ...i }) => {
2726
2731
  var A, N, P;
2727
- const [l, m] = R(!1), [p, d] = R({ x: 0, y: 0 }), u = oe(null), f = oe(null), { hoveredIndex: c, setHoveredIndex: L } = Te(St), { theme: v } = pe(), z = c === o, y = a || ((A = v.token.contextMenu) == null ? void 0 : A.textColor) || "#1d1d1f", I = n || ((N = v.token.contextMenu) == null ? void 0 : N.textColor) || "black", g = () => {
2728
- if (f.current && clearTimeout(f.current), L(o), m(!0), u.current) {
2732
+ const [l, m] = R(!1), [p, d] = R({ x: 0, y: 0 }), u = oe(null), f = oe(null), { hoveredIndex: c, setHoveredIndex: I } = Te(St), { theme: v } = pe(), z = c === o, y = a || ((A = v.token.contextMenu) == null ? void 0 : A.textColor) || "#1d1d1f", S = n || ((N = v.token.contextMenu) == null ? void 0 : N.textColor) || "black", g = () => {
2733
+ if (f.current && clearTimeout(f.current), I(o), m(!0), u.current) {
2729
2734
  const B = u.current.getBoundingClientRect();
2730
2735
  d({
2731
2736
  x: B.width - 4,
@@ -2747,7 +2752,7 @@ const Ys = De(({ src: t }) => {
2747
2752
  V.div,
2748
2753
  {
2749
2754
  ref: u,
2750
- className: M(
2755
+ className: L(
2751
2756
  "zs-py-0 zs-px-5 zs-flex zs-items-center zs-gap-4 zs-cursor-pointer zs-relative zs-h-10 zs-outline-none",
2752
2757
  D`
2753
2758
  z-index: 1;
@@ -2761,7 +2766,7 @@ const Ys = De(({ src: t }) => {
2761
2766
  V.div,
2762
2767
  {
2763
2768
  layoutId: "menuHover",
2764
- className: M(
2769
+ className: L(
2765
2770
  "zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-rounded-lg",
2766
2771
  D`
2767
2772
  z-index: -1;
@@ -2781,7 +2786,7 @@ const Ys = De(({ src: t }) => {
2781
2786
  /* @__PURE__ */ s(
2782
2787
  V.div,
2783
2788
  {
2784
- className: M(
2789
+ className: L(
2785
2790
  "zs-flex-1 zs-text-sm",
2786
2791
  D`
2787
2792
  font-weight: 400;
@@ -2796,10 +2801,10 @@ const Ys = De(({ src: t }) => {
2796
2801
  /* @__PURE__ */ s(
2797
2802
  V.div,
2798
2803
  {
2799
- className: M(
2804
+ className: L(
2800
2805
  "zs-flex zs-items-center zs-justify-center zs-shrink-0",
2801
2806
  D`
2802
- color: ${I};
2807
+ color: ${S};
2803
2808
  width: 18px;
2804
2809
  height: 18px;
2805
2810
  `
@@ -2810,7 +2815,7 @@ const Ys = De(({ src: t }) => {
2810
2815
  /* @__PURE__ */ s(ze, { children: l && /* @__PURE__ */ s(
2811
2816
  Lo,
2812
2817
  {
2813
- className: M(
2818
+ className: L(
2814
2819
  "zs-absolute zs-overflow-hidden zs-z-50",
2815
2820
  D`
2816
2821
  left: ${p.x}px;
@@ -2838,7 +2843,7 @@ const Ys = De(({ src: t }) => {
2838
2843
  return /* @__PURE__ */ T(
2839
2844
  V.div,
2840
2845
  {
2841
- className: M(
2846
+ className: L(
2842
2847
  "zs-h-10 zs-py-0 zs-px-5 zs-flex zs-items-center zs-gap-4 zs-cursor-pointer zs-relative zs-outline-none",
2843
2848
  D`
2844
2849
  z-index: 1;
@@ -2852,7 +2857,7 @@ const Ys = De(({ src: t }) => {
2852
2857
  /* @__PURE__ */ s(ze, { children: (l || m) && /* @__PURE__ */ s(
2853
2858
  V.div,
2854
2859
  {
2855
- className: M(
2860
+ className: L(
2856
2861
  "zs-absolute zs-top-0.5 zs-left-2 zs-right-2 zs-bottom-0.5 zs-rounded-lg",
2857
2862
  D`
2858
2863
  z-index: -1;
@@ -2872,7 +2877,7 @@ const Ys = De(({ src: t }) => {
2872
2877
  /* @__PURE__ */ s(
2873
2878
  V.div,
2874
2879
  {
2875
- className: M(
2880
+ className: L(
2876
2881
  "zs-flex-1 zs-text-sm",
2877
2882
  D`
2878
2883
  font-weight: 400;
@@ -2887,7 +2892,7 @@ const Ys = De(({ src: t }) => {
2887
2892
  m && /* @__PURE__ */ s(
2888
2893
  V.div,
2889
2894
  {
2890
- className: M(
2895
+ className: L(
2891
2896
  "zs-flex zs-items-center zs-justify-center zs-shrink-0",
2892
2897
  D`
2893
2898
  color: ${((u = a.token.contextMenu) == null ? void 0 : u.textColor) || "#1d1d1f"};
@@ -2915,7 +2920,7 @@ const Ys = De(({ src: t }) => {
2915
2920
  onInfoClick: l,
2916
2921
  onShareClick: m,
2917
2922
  onRemoveClick: p
2918
- } = t, { contextMenu: d, setContextMenu: u, hideContextMenu: f, setShowInfoItemData: c, removeItem: L, updateItemConfig: v } = Ae(), { typeConfigMap: z, dataTypeMenuConfigMap: y, theme: I } = pe(), [g, b] = R(null), { data: x } = d ?? {}, { config: k = {} } = x ?? {}, A = () => {
2923
+ } = t, { contextMenu: d, setContextMenu: u, hideContextMenu: f, setShowInfoItemData: c, removeItem: I, updateItemConfig: v } = Ae(), { typeConfigMap: z, dataTypeMenuConfigMap: y, theme: S } = pe(), [g, b] = R(null), { data: x } = d ?? {}, { config: k = {} } = x ?? {}, A = () => {
2919
2924
  var F;
2920
2925
  return ct(((F = d == null ? void 0 : d.data) == null ? void 0 : F.type) || "app", z).sizeConfigs.map((E) => E.name);
2921
2926
  }, N = () => {
@@ -2926,7 +2931,7 @@ const Ys = De(({ src: t }) => {
2926
2931
  setContextMenu: u,
2927
2932
  hideContextMenu: f,
2928
2933
  setShowInfoItemData: c,
2929
- removeItem: L,
2934
+ removeItem: I,
2930
2935
  updateItemConfig: v
2931
2936
  };
2932
2937
  return /* @__PURE__ */ s(ze, { children: d && i && /* @__PURE__ */ s(St.Provider, { value: { hoveredIndex: g, setHoveredIndex: b }, children: /* @__PURE__ */ T(
@@ -2941,15 +2946,15 @@ const Ys = De(({ src: t }) => {
2941
2946
  {
2942
2947
  text: "移除",
2943
2948
  icon: /* @__PURE__ */ s(un, {}),
2944
- color: ((B = I.token.contextMenu) == null ? void 0 : B.dangerColor) || "#ff3b30",
2945
- textColor: ((J = I.token.contextMenu) == null ? void 0 : J.dangerColor) || "#ff3b30",
2949
+ color: ((B = S.token.contextMenu) == null ? void 0 : B.dangerColor) || "#ff3b30",
2950
+ textColor: ((J = S.token.contextMenu) == null ? void 0 : J.dangerColor) || "#ff3b30",
2946
2951
  index: 0,
2947
2952
  onClick: () => {
2948
2953
  if (p) {
2949
- p(d.data, L);
2954
+ p(d.data, I);
2950
2955
  return;
2951
2956
  }
2952
- u(null), L(d.data.id);
2957
+ u(null), I(d.data.id);
2953
2958
  }
2954
2959
  }
2955
2960
  ),
@@ -3053,18 +3058,18 @@ const Ys = De(({ src: t }) => {
3053
3058
  height: y.height
3054
3059
  }),
3055
3060
  []
3056
- ), f = le((y, I, g, b) => {
3061
+ ), f = le((y, S, g, b) => {
3057
3062
  const x = aa(), k = Re.GAP;
3058
3063
  return {
3059
3064
  left: Math.max(x.left + k, Math.min(y, x.right - g - k)),
3060
- top: Math.max(x.top + k, Math.min(I, x.bottom - b - k))
3065
+ top: Math.max(x.top + k, Math.min(S, x.bottom - b - k))
3061
3066
  };
3062
3067
  }, []), c = le(
3063
- (y, I, g) => {
3068
+ (y, S, g) => {
3064
3069
  const b = Re.GAP;
3065
3070
  let x = y.right + b, k = y.top;
3066
- if (x + I > window.innerWidth) {
3067
- if (x = y.left - I - b, x < 0) {
3071
+ if (x + S > window.innerWidth) {
3072
+ if (x = y.left - S - b, x < 0) {
3068
3073
  x = y.left, k = y.bottom + b;
3069
3074
  const A = window.innerHeight + window.scrollY;
3070
3075
  k + g > A && (k = y.top - g - b);
@@ -3077,10 +3082,10 @@ const Ys = De(({ src: t }) => {
3077
3082
  k < N + b && (k = N + b);
3078
3083
  }
3079
3084
  }
3080
- return f(x, k, I, g);
3085
+ return f(x, k, S, g);
3081
3086
  },
3082
3087
  [f]
3083
- ), L = e ? {
3088
+ ), I = e ? {
3084
3089
  getBoundingClientRect() {
3085
3090
  return {
3086
3091
  width: 0,
@@ -3108,20 +3113,20 @@ const Ys = De(({ src: t }) => {
3108
3113
  ],
3109
3114
  whileElementsMounted: Dn,
3110
3115
  elements: {
3111
- reference: L
3116
+ reference: I
3112
3117
  }
3113
- }), z = (y, I, g) => {
3114
- const b = y < g.left, x = y > g.right, k = I < g.top, A = I > g.bottom;
3118
+ }), z = (y, S, g) => {
3119
+ const b = y < g.left, x = y > g.right, k = S < g.top, A = S > g.bottom;
3115
3120
  return x ? k ? "bottom left" : A ? "top left" : "center left" : b ? k ? "bottom right" : A ? "top right" : "center right" : A ? "top center" : k ? "bottom center" : "center";
3116
3121
  };
3117
3122
  return X(() => {
3118
3123
  if (e) {
3119
3124
  i(!0), n(!0);
3120
- const { rect: y } = e, I = u(y), { left: g, top: b } = c(
3121
- I,
3125
+ const { rect: y } = e, S = u(y), { left: g, top: b } = c(
3126
+ S,
3122
3127
  Re.ESTIMATED_MENU_WIDTH,
3123
3128
  Re.ESTIMATED_MENU_HEIGHT
3124
- ), x = z(g, b, I);
3129
+ ), x = z(g, b, S);
3125
3130
  d(x), m({ left: g, top: b });
3126
3131
  } else {
3127
3132
  n(!1);
@@ -3132,7 +3137,7 @@ const Ys = De(({ src: t }) => {
3132
3137
  }
3133
3138
  }, [e, u, c]), X(() => {
3134
3139
  r && v.floating.current && e && a && requestAnimationFrame(() => {
3135
- const { rect: y } = e, I = u(y), g = v.floating.current, b = (g == null ? void 0 : g.offsetWidth) || Re.ESTIMATED_MENU_WIDTH, x = (g == null ? void 0 : g.offsetHeight) || Re.ESTIMATED_MENU_HEIGHT, { left: k, top: A } = c(I, b, x), N = z(k, A, I);
3140
+ const { rect: y } = e, S = u(y), g = v.floating.current, b = (g == null ? void 0 : g.offsetWidth) || Re.ESTIMATED_MENU_WIDTH, x = (g == null ? void 0 : g.offsetHeight) || Re.ESTIMATED_MENU_HEIGHT, { left: k, top: A } = c(S, b, x), N = z(k, A, S);
3136
3141
  d(N), m({ left: k, top: A });
3137
3142
  });
3138
3143
  }, [r, e, v, a, u, c]), X(() => {
@@ -3140,13 +3145,13 @@ const Ys = De(({ src: t }) => {
3140
3145
  const y = (b) => {
3141
3146
  const x = b.target, k = v.floating.current;
3142
3147
  k && !k.contains(x) && o(null);
3143
- }, I = (b) => {
3148
+ }, S = (b) => {
3144
3149
  b.key === "Escape" && o(null);
3145
3150
  }, g = setTimeout(() => {
3146
- document.addEventListener("mousedown", y), document.addEventListener("keydown", I);
3151
+ document.addEventListener("mousedown", y), document.addEventListener("keydown", S);
3147
3152
  }, Re.EVENT_LISTENER_DELAY);
3148
3153
  return () => {
3149
- clearTimeout(g), document.removeEventListener("mousedown", y), document.removeEventListener("keydown", I);
3154
+ clearTimeout(g), document.removeEventListener("mousedown", y), document.removeEventListener("keydown", S);
3150
3155
  };
3151
3156
  }, [r, o, v.floating]), a ? /* @__PURE__ */ s(Pn, { children: /* @__PURE__ */ s(
3152
3157
  "div",
@@ -3180,7 +3185,7 @@ const Ys = De(({ src: t }) => {
3180
3185
  itemBuilder: u,
3181
3186
  itemIconBuilder: f,
3182
3187
  pagingDotBuilder: c,
3183
- pagingDotsBuilder: L,
3188
+ pagingDotsBuilder: I,
3184
3189
  ...v
3185
3190
  } = t, z = {
3186
3191
  list: o,
@@ -3193,7 +3198,7 @@ const Ys = De(({ src: t }) => {
3193
3198
  typeConfigMap: m,
3194
3199
  dataTypeMenuConfigMap: t.dataTypeMenuConfigMap,
3195
3200
  contextMenu: p,
3196
- pagingDotsBuilder: L,
3201
+ pagingDotsBuilder: I,
3197
3202
  pagingDotBuilder: c,
3198
3203
  itemBuilder: u,
3199
3204
  itemIconBuilder: f,
@@ -3456,7 +3461,7 @@ const Ys = De(({ src: t }) => {
3456
3461
  margin-bottom: 0;
3457
3462
  }
3458
3463
  }
3459
- `, To = M(
3464
+ `, To = L(
3460
3465
  "markdown-body",
3461
3466
  D`
3462
3467
  p {
@@ -3609,7 +3614,7 @@ const Ys = De(({ src: t }) => {
3609
3614
  headings: u,
3610
3615
  link: f,
3611
3616
  codeBlock: c,
3612
- codeMirror: L = {
3617
+ codeMirror: I = {
3613
3618
  codeBlockLanguages: {
3614
3619
  js: "JavaScript",
3615
3620
  css: "CSS",
@@ -3623,13 +3628,13 @@ const Ys = De(({ src: t }) => {
3623
3628
  }
3624
3629
  } = n ?? {}, [z, y] = R("");
3625
3630
  return X(() => {
3626
- var I;
3627
- e !== void 0 && m.current && ((I = m.current) == null || I.setMarkdown(e), y(e));
3631
+ var S;
3632
+ e !== void 0 && m.current && ((S = m.current) == null || S.setMarkdown(e), y(e));
3628
3633
  }, [e, m]), /* @__PURE__ */ s(
3629
3634
  $n,
3630
3635
  {
3631
3636
  ref: m,
3632
- className: M(
3637
+ className: L(
3633
3638
  ma,
3634
3639
  kt(i) ? ua : "",
3635
3640
  kt(i) ? Ao : Do,
@@ -3637,8 +3642,8 @@ const Ys = De(({ src: t }) => {
3637
3642
  ),
3638
3643
  contentEditableClassName: To,
3639
3644
  markdown: z,
3640
- onChange: (I) => {
3641
- !e && !o && y(I), o && o(I);
3645
+ onChange: (S) => {
3646
+ !e && !o && y(S), o && o(S);
3642
3647
  },
3643
3648
  translation: r ?? da,
3644
3649
  plugins: [
@@ -3675,7 +3680,7 @@ const Ys = De(({ src: t }) => {
3675
3680
  Vn(),
3676
3681
  Xn(),
3677
3682
  qn(c),
3678
- Zn(L),
3683
+ Zn(I),
3679
3684
  Kn(),
3680
3685
  Jn(v)
3681
3686
  ],
@@ -3691,7 +3696,7 @@ const Ys = De(({ src: t }) => {
3691
3696
  children: /* @__PURE__ */ s(
3692
3697
  so,
3693
3698
  {
3694
- className: M(To, o),
3699
+ className: L(To, o),
3695
3700
  remarkPlugins: [ur, mr],
3696
3701
  rehypePlugins: [fr],
3697
3702
  components: {
@@ -3764,11 +3769,11 @@ const Mt = (t) => {
3764
3769
  var J;
3765
3770
  const B = ((J = u.current) == null ? void 0 : J.getBoundingClientRect()) ?? { x: 0, width: 0 };
3766
3771
  return P - B.x - B.width / 2;
3767
- }), c = He(f, [-150, 0, 150], [40, 80, 40]), L = He(f, [-150, 0, 150], [40, 80, 40]), v = He(f, [-150, 0, 150], [20, 40, 20]), z = He(f, [-150, 0, 150], [20, 40, 20]), y = nt(c, {
3772
+ }), c = He(f, [-150, 0, 150], [40, 80, 40]), I = He(f, [-150, 0, 150], [40, 80, 40]), v = He(f, [-150, 0, 150], [20, 40, 20]), z = He(f, [-150, 0, 150], [20, 40, 20]), y = nt(c, {
3768
3773
  mass: 0.1,
3769
3774
  stiffness: 150,
3770
3775
  damping: 12
3771
- }), I = nt(L, {
3776
+ }), S = nt(I, {
3772
3777
  mass: 0.1,
3773
3778
  stiffness: 150,
3774
3779
  damping: 12
@@ -3784,7 +3789,7 @@ const Mt = (t) => {
3784
3789
  i,
3785
3790
  {
3786
3791
  ref: u,
3787
- style: { width: y, height: I },
3792
+ style: { width: y, height: S },
3788
3793
  onMouseEnter: () => A(!0),
3789
3794
  onMouseLeave: () => A(!1),
3790
3795
  className: Ze("zs-aspect-square zs-flex zs-items-center zs-justify-center zs-relative", l),
@@ -4016,19 +4021,19 @@ function xa(t) {
4016
4021
  let c = Et(f, u, t);
4017
4022
  if (c == null || c < 0) return;
4018
4023
  c = at(c, u);
4019
- const { from: L, to: v } = u.state.selection, z = L - v, y = at(L, u);
4020
- let I = !1;
4024
+ const { from: I, to: v } = u.state.selection, z = I - v, y = at(I, u);
4025
+ let S = !1;
4021
4026
  const g = u.state.doc.resolve(y);
4022
- if (g.node().type.name === "doc") I = !0;
4027
+ if (g.node().type.name === "doc") S = !0;
4023
4028
  else {
4024
4029
  const N = ke.create(
4025
4030
  u.state.doc,
4026
4031
  g.before()
4027
4032
  );
4028
- I = !(c + 1 >= N.$from.pos && c <= N.$to.pos);
4033
+ S = !(c + 1 >= N.$from.pos && c <= N.$to.pos);
4029
4034
  }
4030
4035
  let b = u.state.selection;
4031
- if (!I && z !== 0 && !(u.state.selection instanceof ke)) {
4036
+ if (!S && z !== 0 && !(u.state.selection instanceof ke)) {
4032
4037
  const N = ke.create(u.state.doc, v - 1);
4033
4038
  b = ls.create(
4034
4039
  u.state.doc,
@@ -4079,7 +4084,7 @@ function xa(t) {
4079
4084
  return new as({
4080
4085
  key: new is(t.pluginKey),
4081
4086
  view: (d) => {
4082
- var v, z, y, I;
4087
+ var v, z, y, S;
4083
4088
  const u = t.dragHandleSelector ? document.querySelector(t.dragHandleSelector) : null;
4084
4089
  n = u ?? document.createElement("div"), n.draggable = !0, n.dataset.dragHandle = "", n.classList.add("drag-handle");
4085
4090
  function f(g) {
@@ -4092,18 +4097,18 @@ function xa(t) {
4092
4097
  b && l(d, parseInt(b, 10));
4093
4098
  }
4094
4099
  n.addEventListener("click", c);
4095
- function L(g) {
4100
+ function I(g) {
4096
4101
  a();
4097
4102
  const b = window.scrollY;
4098
4103
  g.clientY < t.scrollTreshold ? window.scrollTo({ top: b - 30, behavior: "smooth" }) : window.innerHeight - g.clientY < t.scrollTreshold && window.scrollTo({ top: b + 30, behavior: "smooth" });
4099
4104
  }
4100
- return n.addEventListener("drag", L), a(), u || (z = (v = d == null ? void 0 : d.dom) == null ? void 0 : v.parentElement) == null || z.appendChild(n), (I = (y = d == null ? void 0 : d.dom) == null ? void 0 : y.parentElement) == null || I.addEventListener(
4105
+ return n.addEventListener("drag", I), a(), u || (z = (v = d == null ? void 0 : d.dom) == null ? void 0 : v.parentElement) == null || z.appendChild(n), (S = (y = d == null ? void 0 : d.dom) == null ? void 0 : y.parentElement) == null || S.addEventListener(
4101
4106
  "mouseout",
4102
4107
  p
4103
4108
  ), {
4104
4109
  destroy: () => {
4105
4110
  var g, b, x;
4106
- u || (g = n == null ? void 0 : n.remove) == null || g.call(n), n == null || n.removeEventListener("drag", L), n == null || n.removeEventListener(
4111
+ u || (g = n == null ? void 0 : n.remove) == null || g.call(n), n == null || n.removeEventListener("drag", I), n == null || n.removeEventListener(
4107
4112
  "dragstart",
4108
4113
  f
4109
4114
  ), n == null || n.removeEventListener("click", c), n = null, (x = (b = d == null ? void 0 : d.dom) == null ? void 0 : b.parentElement) == null || x.removeEventListener(
@@ -4124,8 +4129,8 @@ function xa(t) {
4124
4129
  y: u.clientY
4125
4130
  },
4126
4131
  t
4127
- ), c = f == null ? void 0 : f.closest(".not-draggable"), L = t.excludedTags.concat(["ol", "ul"]).join(", ");
4128
- if (!(f instanceof Element) || f.matches(L) || c) {
4132
+ ), c = f == null ? void 0 : f.closest(".not-draggable"), I = t.excludedTags.concat(["ol", "ul"]).join(", ");
4133
+ if (!(f instanceof Element) || f.matches(I) || c) {
4129
4134
  o || a();
4130
4135
  return;
4131
4136
  }
@@ -4133,8 +4138,8 @@ function xa(t) {
4133
4138
  v != null && v >= 0 && (n.dataset.nodePos = String(
4134
4139
  at(v, d)
4135
4140
  ));
4136
- const z = window.getComputedStyle(f), y = parseInt(z.lineHeight, 10), I = isNaN(y) ? parseInt(z.fontSize) * 1.2 : y, g = parseInt(z.paddingTop, 10), b = ya(f);
4137
- b.top += (I - 24) / 2, b.top += g, f.matches("ul:not([data-type=taskList]) li, ol li") && (b.left -= t.dragHandleWidth - 28), b.width = t.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${b.left - b.width}px`, n.style.top = `${b.top}px`, i());
4141
+ const z = window.getComputedStyle(f), y = parseInt(z.lineHeight, 10), S = isNaN(y) ? parseInt(z.fontSize) * 1.2 : y, g = parseInt(z.paddingTop, 10), b = ya(f);
4142
+ b.top += (S - 24) / 2, b.top += g, f.matches("ul:not([data-type=taskList]) li, ol li") && (b.left -= t.dragHandleWidth - 28), b.width = t.dragHandleWidth, n && (n.style.position = "absolute", n.style.left = `${b.left - b.width}px`, n.style.top = `${b.top}px`, i());
4138
4143
  },
4139
4144
  keydown: () => {
4140
4145
  o || a();
@@ -4164,8 +4169,8 @@ function xa(t) {
4164
4169
  const y = (z = d.state.schema.nodes.orderedList) == null ? void 0 : z.createAndFill(
4165
4170
  null,
4166
4171
  f
4167
- ), I = new cs(ds.from(y), 0, 0);
4168
- d.dragging = { slice: I, move: u.ctrlKey };
4172
+ ), S = new cs(ds.from(y), 0, 0);
4173
+ d.dragging = { slice: S, move: u.ctrlKey };
4169
4174
  }
4170
4175
  },
4171
4176
  dragend: (d) => {
@@ -4180,9 +4185,9 @@ function xa(t) {
4180
4185
  },
4181
4186
  apply(d, u, f, c) {
4182
4187
  if (d.docChanged && n && n.dataset.nodePos) {
4183
- const L = parseInt(n.dataset.nodePos, 10);
4188
+ const I = parseInt(n.dataset.nodePos, 10);
4184
4189
  try {
4185
- const v = c.doc.resolve(L);
4190
+ const v = c.doc.resolve(I);
4186
4191
  (!v || v.parent.type.name === "doc") && (o = !1, a());
4187
4192
  } catch {
4188
4193
  o = !1, a();
@@ -4342,7 +4347,7 @@ const va = ss.create({
4342
4347
  ref: n,
4343
4348
  align: e,
4344
4349
  sideOffset: o,
4345
- className: M(
4350
+ className: L(
4346
4351
  "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",
4347
4352
  t
4348
4353
  ),
@@ -4378,7 +4383,7 @@ const Ba = os(
4378
4383
  ({ className: t, variant: e, size: o, asChild: r = !1, ...n }, a) => /* @__PURE__ */ s(
4379
4384
  r ? fs : "button",
4380
4385
  {
4381
- className: M(Ba({ variant: e, size: o, className: t })),
4386
+ className: L(Ba({ variant: e, size: o, className: t })),
4382
4387
  ref: a,
4383
4388
  ...n
4384
4389
  }
@@ -4615,7 +4620,7 @@ const Fa = ({ open: t, onOpenChange: e }) => {
4615
4620
  /* @__PURE__ */ s(
4616
4621
  "p",
4617
4622
  {
4618
- className: M(
4623
+ className: L(
4619
4624
  "underline decoration-stone-400 underline-offset-4",
4620
4625
  {
4621
4626
  "text-blue-500": r.isActive("link")
@@ -4685,7 +4690,7 @@ const Fa = ({ open: t, onOpenChange: e }) => {
4685
4690
  children: /* @__PURE__ */ s(
4686
4691
  ps,
4687
4692
  {
4688
- className: M("size-4", { "text-blue-500": t.isActive("math") }),
4693
+ className: L("size-4", { "text-blue-500": t.isActive("math") }),
4689
4694
  strokeWidth: 2.3
4690
4695
  }
4691
4696
  )
@@ -4805,7 +4810,7 @@ const Fa = ({ open: t, onOpenChange: e }) => {
4805
4810
  ref: n,
4806
4811
  decorative: o,
4807
4812
  orientation: e,
4808
- className: M(
4813
+ className: L(
4809
4814
  "shrink-0 bg-border",
4810
4815
  e === "horizontal" ? "h-[1px] w-full" : " w-[1px]",
4811
4816
  t
@@ -4823,7 +4828,7 @@ const Ua = () => /* @__PURE__ */ T("div", { className: "flex items-center justif
4823
4828
  $e.Root,
4824
4829
  {
4825
4830
  ref: r,
4826
- className: M("relative overflow-hidden", t),
4831
+ className: L("relative overflow-hidden", t),
4827
4832
  ...o,
4828
4833
  children: [
4829
4834
  /* @__PURE__ */ s($e.Viewport, { className: "h-full w-full rounded-[inherit]", children: e }),
@@ -4838,7 +4843,7 @@ const _o = ae.forwardRef(({ className: t, orientation: e = "vertical", ...o }, r
4838
4843
  {
4839
4844
  ref: r,
4840
4845
  orientation: e,
4841
- className: M(
4846
+ className: L(
4842
4847
  "flex touch-none select-none transition-colors",
4843
4848
  e === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
4844
4849
  e === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
@@ -4853,7 +4858,7 @@ const Wa = Le.Portal, Oo = ae.forwardRef(({ className: t, ...e }, o) => /* @__PU
4853
4858
  Le.Overlay,
4854
4859
  {
4855
4860
  ref: o,
4856
- className: M(
4861
+ className: L(
4857
4862
  "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",
4858
4863
  t
4859
4864
  ),
@@ -4867,7 +4872,7 @@ const Ga = ae.forwardRef(({ className: t, children: e, ...o }, r) => /* @__PURE_
4867
4872
  Le.Content,
4868
4873
  {
4869
4874
  ref: r,
4870
- className: M(
4875
+ className: L(
4871
4876
  "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",
4872
4877
  t
4873
4878
  ),
@@ -4887,7 +4892,7 @@ const Ya = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4887
4892
  Le.Title,
4888
4893
  {
4889
4894
  ref: o,
4890
- className: M(
4895
+ className: L(
4891
4896
  "text-lg font-semibold leading-none tracking-tight",
4892
4897
  t
4893
4898
  ),
@@ -4899,7 +4904,7 @@ const Va = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4899
4904
  Le.Description,
4900
4905
  {
4901
4906
  ref: o,
4902
- className: M("text-sm text-muted-foreground", t),
4907
+ className: L("text-sm text-muted-foreground", t),
4903
4908
  ...e
4904
4909
  }
4905
4910
  ));
@@ -4908,7 +4913,7 @@ const Fo = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4908
4913
  ye,
4909
4914
  {
4910
4915
  ref: o,
4911
- className: M(
4916
+ className: L(
4912
4917
  "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
4913
4918
  t
4914
4919
  ),
@@ -4922,7 +4927,7 @@ const Ho = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ T("div",
4922
4927
  ye.Input,
4923
4928
  {
4924
4929
  ref: o,
4925
- className: M(
4930
+ className: L(
4926
4931
  "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",
4927
4932
  t
4928
4933
  ),
@@ -4935,7 +4940,7 @@ const Xa = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4935
4940
  ye.List,
4936
4941
  {
4937
4942
  ref: o,
4938
- className: M("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
4943
+ className: L("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
4939
4944
  ...e
4940
4945
  }
4941
4946
  ));
@@ -4953,7 +4958,7 @@ const Qe = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4953
4958
  ye.Group,
4954
4959
  {
4955
4960
  ref: o,
4956
- className: M(
4961
+ className: L(
4957
4962
  "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",
4958
4963
  t
4959
4964
  ),
@@ -4965,7 +4970,7 @@ const Dt = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4965
4970
  ye.Separator,
4966
4971
  {
4967
4972
  ref: o,
4968
- className: M("-mx-1 h-px bg-border", t),
4973
+ className: L("-mx-1 h-px bg-border", t),
4969
4974
  ...e
4970
4975
  }
4971
4976
  ));
@@ -4974,7 +4979,7 @@ const We = ae.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
4974
4979
  ye.Item,
4975
4980
  {
4976
4981
  ref: o,
4977
- className: M(
4982
+ className: L(
4978
4983
  "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",
4979
4984
  t
4980
4985
  ),
@@ -5305,7 +5310,7 @@ const ei = ({
5305
5310
  children: /* @__PURE__ */ s(
5306
5311
  o.icon,
5307
5312
  {
5308
- className: M("h-4 w-4", {
5313
+ className: L("h-4 w-4", {
5309
5314
  "text-blue-500": o.isActive(t)
5310
5315
  })
5311
5316
  }
@@ -5443,7 +5448,7 @@ const ei = ({
5443
5448
  rt.Item,
5444
5449
  {
5445
5450
  onClick: i.onClick,
5446
- className: M(
5451
+ className: L(
5447
5452
  "gap-2 !p-1.5 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
5448
5453
  i.className
5449
5454
  ),
@@ -5461,7 +5466,7 @@ const ei = ({
5461
5466
  rt.SubMenu,
5462
5467
  {
5463
5468
  expandIcon: /* @__PURE__ */ s(Vt, { size: 16 }),
5464
- popupClassName: M(
5469
+ popupClassName: L(
5465
5470
  "!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0 z-[1080]",
5466
5471
  D`
5467
5472
  .rc-menu {
@@ -5471,7 +5476,7 @@ const ei = ({
5471
5476
  `
5472
5477
  ),
5473
5478
  popupOffset: [4, 0],
5474
- className: M(
5479
+ className: L(
5475
5480
  "gap-2 !p-0 text-sm hover:bg-accent focus:ring-0 rounded-md cursor-pointer",
5476
5481
  D`
5477
5482
  .rc-menu-submenu-title {
@@ -5505,7 +5510,7 @@ const ei = ({
5505
5510
  overlay: /* @__PURE__ */ s(
5506
5511
  rt,
5507
5512
  {
5508
- className: M(
5513
+ className: L(
5509
5514
  "!rounded-lg border border-muted bg-background shadow-xl !p-2 min-w-48 !m-0",
5510
5515
  D`
5511
5516
  .rc-menu-submenu-active {
@@ -5583,7 +5588,7 @@ const ai = ({ children: t, ...e }) => {
5583
5588
  return /* @__PURE__ */ T(
5584
5589
  "div",
5585
5590
  {
5586
- className: M(
5591
+ className: L(
5587
5592
  "custom-drag-handle",
5588
5593
  D`
5589
5594
  width: auto;
@@ -5642,7 +5647,7 @@ const ai = ({ children: t, ...e }) => {
5642
5647
  aiOptions: u
5643
5648
  } = t, [f, c] = R(
5644
5649
  o
5645
- ), [L, v] = R("Saved"), [z, y] = R(), [I, g] = R(!1), [b, x] = R(!1), [k, A] = R(!1), [N, P] = R(!1), B = (E) => {
5650
+ ), [I, v] = R("Saved"), [z, y] = R(), [S, g] = R(!1), [b, x] = R(!1), [k, A] = R(!1), [N, P] = R(!1), B = (E) => {
5646
5651
  const G = new DOMParser().parseFromString(E, "text/html");
5647
5652
  return G.querySelectorAll("pre code").forEach((se) => {
5648
5653
  As.highlightElement(se);
@@ -5733,9 +5738,9 @@ const ai = ({ children: t, ...e }) => {
5733
5738
  uploadFn: j
5734
5739
  })
5735
5740
  ];
5736
- return /* @__PURE__ */ T("div", { className: M("relative w-full max-w-screen-lg", e), children: [
5741
+ return /* @__PURE__ */ T("div", { className: L("relative w-full max-w-screen-lg", e), children: [
5737
5742
  (a && i || l) && /* @__PURE__ */ T("div", { className: "flex absolute right-5 top-5 z-10 mb-5 gap-2", children: [
5738
- a && i && /* @__PURE__ */ s("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: L }),
5743
+ a && i && /* @__PURE__ */ s("div", { className: "rounded-lg bg-accent px-2 py-1 text-sm text-muted-foreground", children: I }),
5739
5744
  l && /* @__PURE__ */ T(
5740
5745
  "div",
5741
5746
  {
@@ -5801,7 +5806,7 @@ const ai = ({ children: t, ...e }) => {
5801
5806
  aiOptions: u,
5802
5807
  children: [
5803
5808
  d && /* @__PURE__ */ s(Ue, { orientation: "vertical" }),
5804
- /* @__PURE__ */ s(ja, { open: I, onOpenChange: g }),
5809
+ /* @__PURE__ */ s(ja, { open: S, onOpenChange: g }),
5805
5810
  /* @__PURE__ */ s(Ue, { orientation: "vertical" }),
5806
5811
  /* @__PURE__ */ s(Fa, { open: k, onOpenChange: A }),
5807
5812
  /* @__PURE__ */ s(Ue, { orientation: "vertical" }),
@@ -6265,10 +6270,10 @@ const yt = De(Ve((t, e) => {
6265
6270
  ae.Children.forEach(t.children, (b) => {
6266
6271
  b && (y = !0);
6267
6272
  });
6268
- const I = {
6273
+ const S = {
6269
6274
  ...t,
6270
6275
  element: y ? document.createElement("div") : void 0
6271
- }, g = new r.Marker(I);
6276
+ }, g = new r.Marker(S);
6272
6277
  return g.setLngLat([t.longitude, t.latitude]), g.getElement().addEventListener("click", (b) => {
6273
6278
  var x, k;
6274
6279
  (k = (x = n.current.props).onClick) == null || k.call(x, {
@@ -6293,12 +6298,12 @@ const yt = De(Ve((t, e) => {
6293
6298
  X(() => (a.addTo(o.getMap()), () => {
6294
6299
  a.remove();
6295
6300
  }), []);
6296
- const { longitude: i, latitude: l, offset: m, style: p, draggable: d = !1, popup: u = null, rotation: f = 0, rotationAlignment: c = "auto", pitchAlignment: L = "auto" } = t;
6301
+ const { longitude: i, latitude: l, offset: m, style: p, draggable: d = !1, popup: u = null, rotation: f = 0, rotationAlignment: c = "auto", pitchAlignment: I = "auto" } = t;
6297
6302
  X(() => {
6298
6303
  Ee(a.getElement(), p);
6299
6304
  }, [p]), et(e, () => a, []);
6300
6305
  const v = n.current.props;
6301
- (a.getLngLat().lng !== i || a.getLngLat().lat !== l) && a.setLngLat([i, l]), m && !ui(a.getOffset(), m) && a.setOffset(m), a.isDraggable() !== d && a.setDraggable(d), a.getRotation() !== f && a.setRotation(f), a.getRotationAlignment() !== c && a.setRotationAlignment(c), a.getPitchAlignment() !== L && a.setPitchAlignment(L), a.getPopup() !== u && a.setPopup(u);
6306
+ (a.getLngLat().lng !== i || a.getLngLat().lat !== l) && a.setLngLat([i, l]), m && !ui(a.getOffset(), m) && a.setOffset(m), a.isDraggable() !== d && a.setDraggable(d), a.getRotation() !== f && a.setRotation(f), a.getRotationAlignment() !== c && a.setRotationAlignment(c), a.getPitchAlignment() !== I && a.setPitchAlignment(I), a.getPopup() !== u && a.setPopup(u);
6302
6307
  const z = Go(v.className, t.className);
6303
6308
  if (z)
6304
6309
  for (const y of z)
@@ -6591,32 +6596,32 @@ const Bi = (t) => {
6591
6596
  );
6592
6597
  if (e.features.forEach((f) => {
6593
6598
  if (!f.properties || !f.properties.adcode) return;
6594
- const { adcode: c } = f.properties, L = u.get(c);
6595
- if (!L) return;
6599
+ const { adcode: c } = f.properties, I = u.get(c);
6600
+ if (!I) return;
6596
6601
  let v = Bi(f);
6597
- if (!v && L) {
6598
- const { longitude: x, latitude: k } = L;
6602
+ if (!v && I) {
6603
+ const { longitude: x, latitude: k } = I;
6599
6604
  v = [x - 2, k - 2, x + 2, k + 2];
6600
6605
  }
6601
6606
  if (!v) return;
6602
- const [z, y, I, g] = v;
6603
- !(I < n || // 省份完全在视图左侧
6607
+ const [z, y, S, g] = v;
6608
+ !(S < n || // 省份完全在视图左侧
6604
6609
  z > a || // 省份完全在视图右侧
6605
6610
  g < i || // 省份完全在视图下方
6606
- y > l) && d.push(L);
6611
+ y > l) && d.push(I);
6607
6612
  }), d.length < 3 && (console.log("找到的相交区域太少,尝试其他检查方法..."), o.forEach((f) => {
6608
6613
  if (d.some((z) => z.code === f.code)) return;
6609
- const { longitude: L, latitude: v } = f;
6610
- L >= n && L <= a && v >= i && v <= l && d.push(f);
6614
+ const { longitude: I, latitude: v } = f;
6615
+ I >= n && I <= a && v >= i && v <= l && d.push(f);
6611
6616
  }), d.length < 3 && (m > 10 || p > 10))) {
6612
6617
  console.log("扩大检查范围...");
6613
- const f = n - 2, c = a + 2, L = i - 2, v = l + 2;
6618
+ const f = n - 2, c = a + 2, I = i - 2, v = l + 2;
6614
6619
  o.forEach((z) => {
6615
6620
  if (d.some(
6616
6621
  (b) => b.code === z.code
6617
6622
  )) return;
6618
- const { longitude: I, latitude: g } = z;
6619
- I >= f && I <= c && g >= L && g <= v && d.push(z);
6623
+ const { longitude: S, latitude: g } = z;
6624
+ S >= f && S <= c && g >= I && g <= v && d.push(z);
6620
6625
  });
6621
6626
  }
6622
6627
  return console.log(`找到 ${d.length} 个区域与视图相交`), d;
@@ -6649,7 +6654,7 @@ const Bi = (t) => {
6649
6654
  fetchGeoData: d,
6650
6655
  children: u
6651
6656
  }) => {
6652
- const f = oe(null), [c, L] = R(Wt), [v, z] = R(null), [y, I] = R(t), [g, b] = R([]), x = oe({}), [k, A] = R({}), [N, P] = R({}), [B, J] = R(!1), [j, F] = R([]), [E, G] = R({}), [se, Z] = R({}), [Y, re] = R(!1), [de, fe] = R([]), ie = te(
6657
+ const f = oe(null), [c, I] = R(Wt), [v, z] = R(null), [y, S] = R(t), [g, b] = R([]), x = oe({}), [k, A] = R({}), [N, P] = R({}), [B, J] = R(!1), [j, F] = R([]), [E, G] = R({}), [se, Z] = R({}), [Y, re] = R(!1), [de, fe] = R([]), ie = te(
6653
6658
  () => d || Oi,
6654
6659
  [d]
6655
6660
  ), { run: ce } = rn(
@@ -6668,24 +6673,24 @@ const Bi = (t) => {
6668
6673
  ), Q = le((h) => {
6669
6674
  const C = [];
6670
6675
  let w = 0, W = 0;
6671
- return h.features.forEach((S) => {
6676
+ return h.features.forEach((M) => {
6672
6677
  var H;
6673
- if (S.properties)
6678
+ if (M.properties)
6674
6679
  try {
6675
- let $ = S.properties.centroid || null;
6676
- !$ && S.properties.center && ($ = S.properties.center), $ && S.properties.adcode && S.properties.name ? (C.push({
6677
- name: S.properties.name,
6680
+ let $ = M.properties.centroid || null;
6681
+ !$ && M.properties.center && ($ = M.properties.center), $ && M.properties.adcode && M.properties.name ? (C.push({
6682
+ name: M.properties.name,
6678
6683
  longitude: $[0],
6679
6684
  latitude: $[1],
6680
- code: S.properties.adcode
6685
+ code: M.properties.adcode
6681
6686
  }), w++) : (W++, console.warn(
6682
- `Missing centroid/center data for ${S.properties.name || "unknown area"}:`,
6683
- S.properties.adcode || "unknown code"
6687
+ `Missing centroid/center data for ${M.properties.name || "unknown area"}:`,
6688
+ M.properties.adcode || "unknown code"
6684
6689
  ));
6685
6690
  } catch ($) {
6686
6691
  W++, console.error(
6687
6692
  "Error processing centroid data for feature:",
6688
- ((H = S.properties) == null ? void 0 : H.name) || "unknown",
6693
+ ((H = M.properties) == null ? void 0 : H.name) || "unknown",
6689
6694
  $
6690
6695
  );
6691
6696
  }
@@ -6697,36 +6702,36 @@ const Bi = (t) => {
6697
6702
  if (h.length === 0)
6698
6703
  return;
6699
6704
  const C = Array.from(
6700
- new Set(h.map((S) => S.code))
6701
- ).map((S) => ({ name: h.find(($) => $.code === S).name, code: S }));
6702
- J((S) => S || !0);
6705
+ new Set(h.map((M) => M.code))
6706
+ ).map((M) => ({ name: h.find(($) => $.code === M).name, code: M }));
6707
+ J((M) => M || !0);
6703
6708
  const w = C.filter(
6704
- (S) => !j.includes(S.code) && !k[S.code]
6709
+ (M) => !j.includes(M.code) && !k[M.code]
6705
6710
  );
6706
6711
  if (w.length === 0)
6707
6712
  return;
6708
- console.debug(`开始加载${w.length}个省的市级数据`), F((S) => {
6713
+ console.debug(`开始加载${w.length}个省的市级数据`), F((M) => {
6709
6714
  const H = w.map(($) => $.code);
6710
- return [.../* @__PURE__ */ new Set([...S, ...H])];
6715
+ return [.../* @__PURE__ */ new Set([...M, ...H])];
6711
6716
  });
6712
6717
  const W = w.map(
6713
- (S) => ie(S.code).then((H) => {
6718
+ (M) => ie(M.code).then((H) => {
6714
6719
  A((ge) => ({
6715
6720
  ...ge,
6716
- [S.code]: H
6721
+ [M.code]: H
6717
6722
  }));
6718
6723
  const $ = Q(H);
6719
6724
  return P((ge) => ({
6720
6725
  ...ge,
6721
- [S.code]: $
6722
- })), { code: S.code, data: H };
6726
+ [M.code]: $
6727
+ })), { code: M.code, data: H };
6723
6728
  }).catch((H) => (console.error(
6724
- `Failed to load cities data for province ${S.name}:`,
6729
+ `Failed to load cities data for province ${M.name}:`,
6725
6730
  H
6726
6731
  ), null))
6727
6732
  );
6728
- Promise.all(W).then((S) => {
6729
- const H = S.filter(Boolean).map(($) => ($ == null ? void 0 : $.code) || "");
6733
+ Promise.all(W).then((M) => {
6734
+ const H = M.filter(Boolean).map(($) => ($ == null ? void 0 : $.code) || "");
6730
6735
  F(
6731
6736
  ($) => $.filter((ge) => !H.includes(ge))
6732
6737
  );
@@ -6742,37 +6747,37 @@ const Bi = (t) => {
6742
6747
  (h) => {
6743
6748
  if (h.length === 0)
6744
6749
  return;
6745
- const C = Array.from(new Set(h.map((S) => S.code))).map(
6746
- (S) => ({ name: h.find(($) => $.code === S).name, code: S })
6750
+ const C = Array.from(new Set(h.map((M) => M.code))).map(
6751
+ (M) => ({ name: h.find(($) => $.code === M).name, code: M })
6747
6752
  );
6748
- re((S) => S || !0);
6753
+ re((M) => M || !0);
6749
6754
  const w = C.filter(
6750
- (S) => !de.includes(S.code) && !E[S.code]
6755
+ (M) => !de.includes(M.code) && !E[M.code]
6751
6756
  );
6752
6757
  if (w.length === 0)
6753
6758
  return;
6754
- console.debug(`开始加载${w.length}个城市的区级数据`), fe((S) => {
6759
+ console.debug(`开始加载${w.length}个城市的区级数据`), fe((M) => {
6755
6760
  const H = w.map(($) => $.code);
6756
- return [.../* @__PURE__ */ new Set([...S, ...H])];
6761
+ return [.../* @__PURE__ */ new Set([...M, ...H])];
6757
6762
  });
6758
6763
  const W = w.map(
6759
- (S) => ie(S.code).then((H) => {
6764
+ (M) => ie(M.code).then((H) => {
6760
6765
  G((ge) => ({
6761
6766
  ...ge,
6762
- [S.code]: H
6767
+ [M.code]: H
6763
6768
  }));
6764
6769
  const $ = Q(H);
6765
6770
  return Z((ge) => ({
6766
6771
  ...ge,
6767
- [S.code]: $
6768
- })), { code: S.code, data: H };
6772
+ [M.code]: $
6773
+ })), { code: M.code, data: H };
6769
6774
  }).catch((H) => (console.error(
6770
- `Failed to load districts data for city ${S.name}:`,
6775
+ `Failed to load districts data for city ${M.name}:`,
6771
6776
  H
6772
6777
  ), null))
6773
6778
  );
6774
- Promise.all(W).then((S) => {
6775
- const H = S.filter(Boolean).map(($) => ($ == null ? void 0 : $.code) || "");
6779
+ Promise.all(W).then((M) => {
6780
+ const H = M.filter(Boolean).map(($) => ($ == null ? void 0 : $.code) || "");
6776
6781
  fe(
6777
6782
  ($) => $.filter((ge) => !H.includes(ge))
6778
6783
  );
@@ -6802,9 +6807,9 @@ const Bi = (t) => {
6802
6807
  }, console.debug("计算结果:", w.length, "个区域在视图内"), l && l(w), y > p) {
6803
6808
  J(!0), re(!0), ue(w);
6804
6809
  const W = Object.values(N).flat().filter(
6805
- (S) => {
6810
+ (M) => {
6806
6811
  var H;
6807
- return (H = f.current) == null ? void 0 : H.getBounds().contains([S.longitude, S.latitude]);
6812
+ return (H = f.current) == null ? void 0 : H.getBounds().contains([M.longitude, M.latitude]);
6808
6813
  }
6809
6814
  );
6810
6815
  W.length > 0 && (console.debug(`加载${W.length}个城市的区级数据`), Ie(W));
@@ -6840,18 +6845,18 @@ const Bi = (t) => {
6840
6845
  (h) => {
6841
6846
  const C = h.viewState.zoom, w = x.current.zoom || y, W = Math.abs(C - w) >= 5e-3;
6842
6847
  if (f.current) {
6843
- const S = f.current.getBounds(), H = {
6844
- north: S.getNorth(),
6845
- south: S.getSouth(),
6846
- east: S.getEast(),
6847
- west: S.getWest()
6848
+ const M = f.current.getBounds(), H = {
6849
+ north: M.getNorth(),
6850
+ south: M.getSouth(),
6851
+ east: M.getEast(),
6852
+ west: M.getWest()
6848
6853
  }, $ = !x.current.bounds || Math.abs(x.current.bounds.north - H.north) >= 1e-3 || Math.abs(x.current.bounds.south - H.south) >= 1e-3 || Math.abs(x.current.bounds.east - H.east) >= 1e-3 || Math.abs(x.current.bounds.west - H.west) >= 1e-3;
6849
6854
  if (W) {
6850
- I(C), x.current.zoom = C;
6855
+ S(C), x.current.zoom = C;
6851
6856
  let ge = 6;
6852
6857
  for (const [Yo, Vo] of Object.entries(n))
6853
6858
  C >= Vo && (ge = parseInt(Yo, 10));
6854
- c.length !== ge && L(Wt);
6859
+ c.length !== ge && I(Wt);
6855
6860
  }
6856
6861
  ($ || W) && me();
6857
6862
  }