@glodon-aiot/dataset-annotation 3.25.0-alpha.9 → 3.25.0

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 (26) hide show
  1. package/dist/es/components/DetectionAnnotation/index.mjs +410 -398
  2. package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +235 -234
  3. package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +52 -51
  4. package/dist/es/components/VLMAnnotationDetail/index.mjs +318 -285
  5. package/dist/es/index.mjs +1 -1
  6. package/dist/lib/index.js +3 -3
  7. package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +1 -0
  8. package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +1 -1
  9. package/package.json +2 -2
  10. package/dist/dataset-annotation.js +0 -123598
  11. package/dist/dataset-annotation.umd.cjs +0 -1017
  12. package/dist/example/DatasetAnnotationDemo.d.ts +0 -3
  13. package/dist/example/DemoTabs.d.ts +0 -3
  14. package/dist/example/DetectionDatasetDemo.d.ts +0 -5
  15. package/dist/example/DetectionImageDemo.d.ts +0 -5
  16. package/dist/example/OcrDatasetDemo.d.ts +0 -5
  17. package/dist/example/OcrImageDemo.d.ts +0 -5
  18. package/dist/example/OcrkvcDatasetDemo.d.ts +0 -5
  19. package/dist/example/constant.local.d.ts +0 -6
  20. package/dist/example/index.d.ts +0 -1
  21. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +0 -16
  22. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +0 -12
  23. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +0 -21
  24. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +0 -16
  25. package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +0 -19
  26. package/dist/src/utils/reactCompatibility.d.ts +0 -5
@@ -2,48 +2,48 @@ var Yt = Object.defineProperty, en = Object.defineProperties;
2
2
  var tn = Object.getOwnPropertyDescriptors;
3
3
  var at = Object.getOwnPropertySymbols;
4
4
  var nn = Object.prototype.hasOwnProperty, rn = Object.prototype.propertyIsEnumerable;
5
- var dt = (L, g, a) => g in L ? Yt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
5
+ var dt = (w, g, a) => g in w ? Yt(w, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[g] = a, b = (w, g) => {
6
6
  for (var a in g || (g = {}))
7
- nn.call(g, a) && dt(L, a, g[a]);
7
+ nn.call(g, a) && dt(w, a, g[a]);
8
8
  if (at)
9
9
  for (var a of at(g))
10
- rn.call(g, a) && dt(L, a, g[a]);
11
- return L;
12
- }, S = (L, g) => en(L, tn(g));
13
- var He = (L, g, a) => new Promise((J, be) => {
14
- var ve = (I) => {
10
+ rn.call(g, a) && dt(w, a, g[a]);
11
+ return w;
12
+ }, S = (w, g) => en(w, tn(g));
13
+ var He = (w, g, a) => new Promise((Q, ye) => {
14
+ var Se = (I) => {
15
15
  try {
16
16
  oe(a.next(I));
17
17
  } catch (le) {
18
- be(le);
18
+ ye(le);
19
19
  }
20
20
  }, T = (I) => {
21
21
  try {
22
22
  oe(a.throw(I));
23
23
  } catch (le) {
24
- be(le);
24
+ ye(le);
25
25
  }
26
- }, oe = (I) => I.done ? J(I.value) : Promise.resolve(I.value).then(ve, T);
27
- oe((a = a.apply(L, g)).next());
26
+ }, oe = (I) => I.done ? Q(I.value) : Promise.resolve(I.value).then(Se, T);
27
+ oe((a = a.apply(w, g)).next());
28
28
  });
29
- import { jsx as s, jsxs as m, Fragment as ft } from "react/jsx-runtime";
30
- import { useRef as q, useState as p, useLayoutEffect as on, useEffect as C, useCallback as ln } from "react";
31
- import { message as D, ConfigProvider as sn, Space as me, Select as cn, Button as re, Dropdown as ut, Tabs as an, Checkbox as ht, Col as dn, Tooltip as fn, Empty as un, Spin as hn, Modal as De } from "antd";
29
+ import { jsx as s, jsxs as p, Fragment as ft } from "react/jsx-runtime";
30
+ import { useRef as W, useState as m, useLayoutEffect as on, useEffect as C, useCallback as ln } from "react";
31
+ import { message as k, ConfigProvider as sn, Space as ve, Select as cn, Button as re, Dropdown as ut, Tabs as an, Checkbox as ht, Col as dn, Tooltip as fn, Empty as un, Spin as hn, Modal as Ne } from "antd";
32
32
  import gn from "rc-virtual-list";
33
- import { UploadZipsStatus as ie, PreLabelTaskStatus as pn } from "@glodon-aiot/apis";
34
- import mn from "antd/es/locale/zh_CN";
33
+ import { UploadZipsStatus as ie, PreLabelTaskStatus as mn } from "@glodon-aiot/apis";
34
+ import pn from "antd/es/locale/zh_CN";
35
35
  import bn from "../../DatasetContext/index.mjs";
36
36
  import vn from "./icon_item_empty.svg.mjs";
37
37
  import "./style.less.mjs";
38
38
  import { tagColors as gt } from "../../utils/index.mjs";
39
- import { scrollSampleIntoView as Sn, getVirtualListHolder as yn } from "../../utils/scrollSampleIntoView.mjs";
39
+ import { scrollSampleIntoView as yn, getVirtualListHolder as Sn } from "../../utils/scrollSampleIntoView.mjs";
40
40
  import Cn from "./components/Labels/index.mjs";
41
41
  import { useKeyPress as In } from "ahooks";
42
- import pt from "./components/DisabledTooltip/index.mjs";
42
+ import mt from "./components/DisabledTooltip/index.mjs";
43
43
  import xn from "./PreSamplesPage/index.mjs";
44
- import { DownOutlined as mt, SearchOutlined as kn } from "@ant-design/icons";
45
- import Ln from "../../Common/Page/index.mjs";
46
- import wn from "../PicZipImportModal/index.mjs";
44
+ import { DownOutlined as pt, SearchOutlined as kn } from "@ant-design/icons";
45
+ import wn from "../../Common/Page/index.mjs";
46
+ import Ln from "../PicZipImportModal/index.mjs";
47
47
  import Dn from "../PageNav/index.mjs";
48
48
  import Nn from "../Thumbnail/index.mjs";
49
49
  import Tn from "../CompositionInput/index.mjs";
@@ -54,26 +54,26 @@ import { DEFAULT_FILTER_SWITCH as zn } from "../../constant.mjs";
54
54
  import An from "../DetectionStatus/index.mjs";
55
55
  import En from "./components/ImageModal/index.mjs";
56
56
  import Fn from "./hooks/useSamplePreload.mjs";
57
- var Bn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(Bn || {});
58
- const pr = (L) => {
57
+ var Bn = /* @__PURE__ */ ((w) => (w.Next = "NEXT", w.Prev = "PREV", w.Confirm = "CONFIRM", w.Save = "Save", w))(Bn || {});
58
+ const mr = (w) => {
59
59
  const {
60
60
  services: g,
61
61
  datasetId: a,
62
- versionId: J,
63
- backTo: be,
64
- labelManager: ve = !1,
62
+ versionId: Q,
63
+ backTo: ye,
64
+ labelManager: Se = !1,
65
65
  datasetManager: T = !1,
66
66
  annotation: oe,
67
67
  header: I = {
68
68
  versionSelect: !1
69
69
  },
70
70
  exampleSrcRoot: le
71
- } = L, se = b({}, zn);
72
- Vn(se, L.filterSwitch);
73
- const Se = !!(T && T.delete), j = !!(T && T.label), Ne = Se || j, ce = q(null), Te = q(null), [bt, vt] = p(0), [k, Ue] = p(), [o, ae] = p(), [ye, St] = p([]), [qe, Ke] = p(!1), [de, We] = p(0), [fe, $e] = p(0), [u, Re] = p(""), [Q, je] = p(0), [yt, Ct] = p(), [Ge, Pe] = p(!1), [Ze, It] = p(!1), [_e, xt] = p(!0), [kt, Lt] = p(!1), [F, Xe] = p([]), [v, H] = p([]), [ue, G] = p(!1), [Y, he] = p(!1), [E, V] = p(-1), [h, N] = p(), [wt, Je] = p(), [Dt, Ce] = p(!1), [f, z] = p(), [l, R] = p({
71
+ } = w, se = b({}, zn);
72
+ Vn(se, w.filterSwitch);
73
+ const Ce = !!(T && T.delete), G = !!(T && T.label), Te = Ce || G, ce = W(null), Re = W(null), [bt, vt] = m(0), [x, Ue] = m(), [l, ae] = m(), [Ie, yt] = m([]), [qe, Ke] = m(!1), [de, We] = m(0), [fe, $e] = m(0), [u, Pe] = m(""), [Y, je] = m(0), [St, Ct] = m(), [Ge, Ve] = m(!1), [Ze, It] = m(!1), [_e, xt] = m(!0), [kt, wt] = m(!1), [B, Xe] = m([]), [v, H] = m([]), [ue, Z] = m(!1), [ee, he] = m(!1), [F, z] = m(-1), [h, N] = m(), [Lt, Je] = m(), [Dt, xe] = m(!1), [f, A] = m(), [o, R] = m({
74
74
  current: 0,
75
75
  pageSize: 100
76
- }), [K, Ve] = p([]), [Z, Nt] = p(""), [Tt, Rt] = p(!1), [Qe, Ye] = p(), [Ie, ze] = p(null), [B, et] = p(!1), [Pt, Vt] = p(!1), [Mn, zt] = p(0), [On, Ae] = p(""), [ge, At] = p(""), ee = q({}), Ee = q(void 0), xe = q(!1), pe = q(0), tt = q(0), W = q(0), [P, Fe] = p(/* @__PURE__ */ new Set()), [Et, ke] = p(!1), nt = q(-1);
76
+ }), [$, ze] = m([]), [_, Nt] = m(""), [Tt, Rt] = m(!1), [Qe, Ye] = m(), [ke, Ae] = m(null), [M, et] = m(!1), [Pt, Vt] = m(!1), [Mn, zt] = m(0), [On, Ee] = m(""), [ge, At] = m(""), X = W({}), me = W(void 0), we = W(!1), pe = W(0), tt = W(0), U = W(0), [P, Fe] = m(/* @__PURE__ */ new Set()), [Et, Le] = m(!1), nt = W(-1);
77
77
  on(() => {
78
78
  const e = ce.current;
79
79
  if (!e)
@@ -86,15 +86,15 @@ const pr = (L) => {
86
86
  });
87
87
  };
88
88
  n();
89
- const r = typeof ResizeObserver != "undefined" ? new ResizeObserver(n) : null;
90
- r == null || r.observe(e);
91
- const i = window.visualViewport;
92
- return i == null || i.addEventListener("resize", n), window.addEventListener("resize", n), () => {
93
- cancelAnimationFrame(t), r == null || r.disconnect(), i == null || i.removeEventListener("resize", n), window.removeEventListener("resize", n);
89
+ const i = typeof ResizeObserver != "undefined" ? new ResizeObserver(n) : null;
90
+ i == null || i.observe(e);
91
+ const r = window.visualViewport;
92
+ return r == null || r.addEventListener("resize", n), window.addEventListener("resize", n), () => {
93
+ cancelAnimationFrame(t), i == null || i.disconnect(), r == null || r.removeEventListener("resize", n), window.removeEventListener("resize", n);
94
94
  };
95
- }, [k]);
95
+ }, [x]);
96
96
  const te = () => {
97
- N(void 0), z(void 0), V(-1), G(!1), U(), setTimeout(() => {
97
+ N(void 0), A(void 0), z(-1), Z(!1), q(), setTimeout(() => {
98
98
  R((e) => S(b({}, e), {
99
99
  current: 1,
100
100
  type: void 0
@@ -106,8 +106,8 @@ const pr = (L) => {
106
106
  Ct(e);
107
107
  });
108
108
  }, [a]), C(() => {
109
- w();
110
- }, [o == null ? void 0 : o.id]), C(() => {
109
+ L();
110
+ }, [l == null ? void 0 : l.id]), C(() => {
111
111
  a && (Ke(!0), Promise.all([
112
112
  // 数据集
113
113
  g.cvforceDatahub.getDatasetsId(a).then((e) => {
@@ -115,70 +115,70 @@ const pr = (L) => {
115
115
  }),
116
116
  // 版本列表
117
117
  g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
118
- St(e.recordList), ae(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
118
+ yt(e.recordList), ae(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
119
119
  })
120
120
  ]).finally(() => Ke(!1)));
121
- }, [a, J]);
121
+ }, [a, Q]);
122
122
  const rt = () => {
123
- !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
123
+ !a || !l || g.cvforceDatahub.getDatasetsIdVersionsVid(a, l.id).then((e) => {
124
124
  ae(e), Nt(e.versionAsyncTask.state);
125
125
  });
126
126
  };
127
127
  C(() => {
128
- Z !== ie.Pending && Z !== ie.Started || D.warning("文件导入中,请刷新页面再试");
129
- }, [Z]), C(() => {
130
- ae(void 0), R(S(b({}, l), {
128
+ _ !== ie.Pending && _ !== ie.Started || k.warning("文件导入中,请刷新页面再试");
129
+ }, [_]), C(() => {
130
+ ae(void 0), R(S(b({}, o), {
131
131
  current: 1
132
132
  })), H([]), rt();
133
- }, [a, J]), C(() => {
133
+ }, [a, Q]), C(() => {
134
134
  a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
135
135
  Ue(e);
136
136
  });
137
137
  }, [a]), C(() => {
138
- pe.current++, W.current++;
139
- }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, u, K]), C(() => {
140
- U();
141
- }, [K, o, u]), C(() => {
142
- !o || !k || A(S(b({}, l), {
138
+ pe.current++, U.current++;
139
+ }, [x == null ? void 0 : x.id, l == null ? void 0 : l.id, u, $]), C(() => {
140
+ q();
141
+ }, [$, l, u]), C(() => {
142
+ !l || !x || E(S(b({}, o), {
143
143
  current: 1
144
144
  })).then((e) => {
145
145
  });
146
- }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, K]), C(() => {
147
- if (xe.current) {
148
- xe.current = !1;
146
+ }, [x == null ? void 0 : x.id, l == null ? void 0 : l.id, $]), C(() => {
147
+ if (we.current) {
148
+ we.current = !1;
149
149
  return;
150
150
  }
151
- if (Ee.current === l.current) {
152
- Ee.current = void 0, w();
151
+ if (me.current === o.current) {
152
+ me.current = void 0, L();
153
153
  return;
154
154
  }
155
- A().then((e) => {
156
- }), w();
157
- }, [l.current]), C(() => {
158
- B && w();
155
+ E().then((e) => {
156
+ }), L();
157
+ }, [o.current]), C(() => {
158
+ M && L();
159
159
  }, [Qe]), C(() => {
160
160
  let e = !1;
161
- const t = ee.current[u];
161
+ const t = X.current[u];
162
162
  let n;
163
- return t && t.page > 1 ? n = A(S(b({}, l), {
163
+ return t && t.page > 1 ? n = E(S(b({}, o), {
164
164
  current: 1,
165
165
  pageSize: t.page * 100,
166
166
  // 假设默认pageSize为100
167
167
  total: void 0
168
- })).then((r) => (e || (Ee.current = t.page, R((i) => S(b({}, i), {
168
+ })).then((i) => (e || (me.current = t.page, R((r) => S(b({}, r), {
169
169
  current: t.page,
170
170
  pageSize: 100
171
- }))), r)) : n = A(S(b({}, l), {
171
+ }))), i)) : n = E(S(b({}, o), {
172
172
  current: 1,
173
173
  total: void 0
174
- })), n.then((r) => {
175
- if (!e && (Ce(!1), !!r && !(!h && !Y)))
176
- if (Array.isArray(r) && r.length) {
177
- const i = ee.current[u], c = i == null ? void 0 : i.index, d = c !== void 0 && c >= 0 && c < r.length ? c : 0;
178
- V(d), N(r[d]), z(void 0);
174
+ })), n.then((i) => {
175
+ if (!e && (xe(!1), !!i && !(!h && !ee)))
176
+ if (Array.isArray(i) && i.length) {
177
+ const r = X.current[u], c = r == null ? void 0 : r.index, d = c !== void 0 && c >= 0 && c < i.length ? c : 0;
178
+ z(d), N(i[d]), A(void 0);
179
179
  } else
180
- N(void 0), z(void 0), V(-1), U(), setTimeout(() => {
181
- R((i) => S(b({}, i), {
180
+ N(void 0), A(void 0), z(-1), q(), setTimeout(() => {
181
+ R((r) => S(b({}, r), {
182
182
  current: 1,
183
183
  type: void 0
184
184
  }));
@@ -189,52 +189,52 @@ const pr = (L) => {
189
189
  }, [u]), C(() => {
190
190
  var t;
191
191
  let e;
192
- if (!Y) {
193
- const n = h !== void 0, r = h == null ? void 0 : h.id, i = E;
194
- N(void 0), z(void 0), G(!1), V(-1), Je(void 0), Ce(!1), U(), n && ((t = Te.current) == null || t.fetchLabels()), w(), r !== void 0 && (e = requestAnimationFrame(() => {
195
- Sn(yn(ce.current), r, i);
192
+ if (!ee) {
193
+ const n = h !== void 0, i = h == null ? void 0 : h.id, r = F;
194
+ U.current++, X.current = {}, N(void 0), A(void 0), Z(!1), z(-1), Je(void 0), xe(!1), q(), n && ((t = Re.current) == null || t.fetchLabels()), L(), i !== void 0 && (e = requestAnimationFrame(() => {
195
+ yn(Sn(ce.current), i, r);
196
196
  }));
197
197
  }
198
198
  return () => {
199
199
  e !== void 0 && cancelAnimationFrame(e);
200
200
  };
201
- }, [Y]);
201
+ }, [ee]);
202
202
  const Ft = ln((e, t) => {
203
203
  Je(e ? void 0 : t);
204
204
  }, []);
205
205
  Fn({
206
206
  samples: v,
207
- currentIndex: E,
208
- active: Y,
209
- loadedImageUrl: wt
207
+ currentIndex: F,
208
+ active: ee,
209
+ loadedImageUrl: Lt
210
210
  }), C(() => {
211
- Lt(!_e && Ze);
211
+ wt(!_e && Ze);
212
212
  }, [_e, Ze]), C(() => {
213
213
  if (!a) {
214
- Ie && (clearTimeout(Ie), ze(null)), Ye(void 0);
214
+ ke && (clearTimeout(ke), Ae(null)), Ye(void 0);
215
215
  return;
216
216
  }
217
217
  Me();
218
- }, [a, o == null ? void 0 : o.id]), C(() => {
218
+ }, [a, l == null ? void 0 : l.id]), C(() => {
219
219
  Me();
220
220
  }, [Tt]), C(() => {
221
221
  Be();
222
- }, [B, a, o]), C(() => {
223
- pe.current++, W.current++, A(S(b({}, l), {
222
+ }, [M, a, l]), C(() => {
223
+ pe.current++, U.current++, E(S(b({}, o), {
224
224
  current: 1
225
- })), w();
225
+ })), L();
226
226
  }, [ge]), C(() => {
227
- Ae("");
227
+ Ee("");
228
228
  }, [h]), C(() => {
229
229
  if (v.length === 0) {
230
- ke(!1);
230
+ Le(!1);
231
231
  return;
232
232
  }
233
233
  const e = v.every((t) => P.has(t.id));
234
- ke(e);
234
+ Le(e);
235
235
  }, [v, P]);
236
236
  const Be = () => {
237
- o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
237
+ l && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
238
238
  pageNo: 1,
239
239
  pageSize: 1e3,
240
240
  confirmStatus: 1
@@ -242,26 +242,26 @@ const pr = (L) => {
242
242
  zt(e.recordList.length);
243
243
  });
244
244
  }, Me = () => {
245
- !a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
245
+ !a || !l || g.cvforceDatahub.getPreLabelTask(a, l.id).then((e) => {
246
246
  const t = e[0];
247
- if (Ye(t), Ie && (clearTimeout(Ie), ze(null)), !(t != null && t.state) || t.state !== pn.Started) {
248
- et(!1), w();
247
+ if (Ye(t), ke && (clearTimeout(ke), Ae(null)), !(t != null && t.state) || t.state !== mn.Started) {
248
+ et(!1), L();
249
249
  return;
250
250
  } else
251
251
  et(!0);
252
- ze(setTimeout(() => {
252
+ Ae(setTimeout(() => {
253
253
  Me();
254
254
  }, 1e4));
255
255
  });
256
256
  };
257
257
  C(() => {
258
- k && k.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
259
- }, [k]);
260
- const A = (e, t) => {
261
- const n = (e == null ? void 0 : e.current) || l.current, r = (e == null ? void 0 : e.pageSize) || l.pageSize;
262
- if (!a || !o || !n)
258
+ x && x.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
259
+ }, [x]);
260
+ const E = (e, t) => {
261
+ const n = (e == null ? void 0 : e.current) || o.current, i = (e == null ? void 0 : e.pageSize) || o.pageSize;
262
+ if (!a || !l || !n)
263
263
  return Promise.resolve(!1);
264
- const i = pe.current, c = K.map((x) => x.label), d = () => {
264
+ const r = pe.current, c = $.map((D) => D.label), d = () => {
265
265
  switch (u) {
266
266
  case "nocode":
267
267
  return "nocode";
@@ -283,67 +283,67 @@ const pr = (L) => {
283
283
  return 2;
284
284
  }
285
285
  };
286
- return n === 1 && Wt(), R(S(b({}, l), {
286
+ return n === 1 && Wt(), R(S(b({}, o), {
287
287
  current: n,
288
- pageSize: r
289
- })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
288
+ pageSize: i
289
+ })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
290
290
  pageNo: n,
291
- pageSize: r,
291
+ pageSize: i,
292
292
  labels: d(),
293
293
  confirmStatus: y(),
294
294
  searchName: ge
295
- }).then((x) => {
296
- if (i !== pe.current)
295
+ }).then((D) => {
296
+ if (r !== pe.current)
297
297
  return !1;
298
- const M = x.recordList || [], X = n === 1 ? M : [...t || v, ...M];
299
- if (H(X), R(S(b({}, l), {
298
+ const O = D.recordList || [], J = n === 1 ? O : [...t || v, ...O];
299
+ if (H(J), R(S(b({}, o), {
300
300
  current: n,
301
- pageSize: r,
302
- total: x.totalResults
303
- })), l.type === "next" && M.length) {
304
- V(0);
305
- const $ = x.recordList[0];
306
- N($);
301
+ pageSize: i,
302
+ total: D.totalResults
303
+ })), o.type === "next" && O.length) {
304
+ z(0);
305
+ const j = D.recordList[0];
306
+ N(j);
307
307
  }
308
- if (l.type === "prev" && M.length) {
309
- V(l.pageSize - 1);
310
- const $ = x.recordList[l.pageSize - 1];
311
- N($);
308
+ if (o.type === "prev" && O.length) {
309
+ z(o.pageSize - 1);
310
+ const j = D.recordList[o.pageSize - 1];
311
+ N(j);
312
312
  }
313
- return ue && E < 0 && (V(0), N(M[0]), he(!0)), X;
313
+ return ue && F < 0 && (z(0), N(O[0]), he(!0)), J;
314
314
  }).catch(() => !1);
315
315
  };
316
316
  C(() => {
317
- R(u === "nocode" ? S(b({}, l), {
317
+ $.length > 0 || R(u === "nocode" ? S(b({}, o), {
318
318
  total: de
319
- }) : u === "" ? S(b({}, l), {
320
- total: Q
321
- }) : u === "pending" ? S(b({}, l), {
319
+ }) : u === "" ? S(b({}, o), {
320
+ total: Y
321
+ }) : u === "pending" ? S(b({}, o), {
322
322
  total: fe
323
- }) : S(b({}, l), {
324
- total: Q - de - fe
323
+ }) : S(b({}, o), {
324
+ total: Y - de - fe
325
325
  }));
326
- }, [de, Q, fe]);
327
- const w = () => {
328
- !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
326
+ }, [de, Y, fe]);
327
+ const L = () => {
328
+ !a || !l || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
329
329
  label: "allcode",
330
330
  confirmStatus: 2,
331
331
  searchName: ge
332
332
  }).then((e) => {
333
- const t = e.find((i) => i.id === "allcodeid"), n = e.find((i) => i.id === "nocodeid"), r = e.find((i) => i.id === "pendingid");
334
- je(t ? t.count : 0), We(n ? n.count : 0), $e(r ? r.count : 0);
333
+ const t = e.find((r) => r.id === "allcodeid"), n = e.find((r) => r.id === "nocodeid"), i = e.find((r) => r.id === "pendingid");
334
+ je(t ? t.count : 0), We(n ? n.count : 0), $e(i ? i.count : 0);
335
335
  });
336
- }, U = () => {
337
- if (!a || !(o != null && o.id))
336
+ }, q = () => {
337
+ if (!a || !(l != null && l.id))
338
338
  return;
339
339
  const e = ++tt.current;
340
340
  let t = 2;
341
- return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
341
+ return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
342
342
  confirmStatus: t
343
343
  }).then((n) => {
344
344
  if (e !== tt.current)
345
345
  return;
346
- const i = (n || []).filter((c) => c.label !== "nocode").map((c, d) => {
346
+ const r = (n || []).filter((c) => c.label !== "nocode").map((c, d) => {
347
347
  var y;
348
348
  return {
349
349
  label: c.label,
@@ -353,33 +353,33 @@ const pr = (L) => {
353
353
  color: gt[d % 40]
354
354
  };
355
355
  });
356
- return Xe(i), n;
356
+ return Xe(r), n;
357
357
  });
358
358
  }, Bt = (e) => {
359
359
  if (!v)
360
360
  return;
361
- G(!1), V(e);
361
+ Z(!1), z(e);
362
362
  const t = v[e];
363
- N(t), z(void 0), he(!0), u !== void 0 && (ee.current[u] = {
363
+ N(t), A(void 0), he(!0), u !== void 0 && (X.current[u] = {
364
364
  index: e,
365
- page: l.current || 1
365
+ page: o.current || 1
366
366
  });
367
367
  };
368
368
  C(() => {
369
- l.type || A();
370
- }, [l.type]), C(() => {
369
+ o.type || E();
370
+ }, [o.type]), C(() => {
371
371
  if (!f)
372
372
  return;
373
373
  const e = [];
374
374
  f == null || f.labels.forEach((t) => {
375
- F != null && F.find((n) => n.id === t.id) && e.push(t);
376
- }), e.length !== f.labels.length && z(S(b({}, f), {
375
+ B != null && B.find((n) => n.id === t.id) && e.push(t);
376
+ }), e.length !== f.labels.length && A(S(b({}, f), {
377
377
  labels: e
378
378
  }));
379
- }, [F]);
380
- const _ = (e, t, n, r) => {
379
+ }, [B]);
380
+ const K = (e, t, n, i) => {
381
381
  setTimeout(() => {
382
- r === W.current && (V(t), N(e[t]), z(void 0), u !== void 0 && (ee.current[u] = {
382
+ i === U.current && (z(t), N(e[t]), A(void 0), u !== void 0 && (X.current[u] = {
383
383
  index: t,
384
384
  page: n
385
385
  }));
@@ -387,171 +387,183 @@ const pr = (L) => {
387
387
  }, it = (e, t) => {
388
388
  if (!v)
389
389
  return;
390
- const n = ++W.current;
390
+ const n = ++U.current;
391
391
  if (!ue) {
392
- H((r) => {
393
- var y;
394
- if (!Array.isArray(r) || !r.length)
395
- return te(), r;
396
- const i = E + 1, d = !!K.length ? r.length : (y = l.total) != null ? y : r.length;
397
- return i >= r.length ? i >= d ? D.error("已经是最后一个了") : A({
398
- current: l.current + 1,
399
- pageSize: l.pageSize,
392
+ H((i) => {
393
+ var d;
394
+ if (!Array.isArray(i) || !i.length)
395
+ return te(), i;
396
+ const r = F + 1, c = (d = o.total) != null ? d : i.length;
397
+ return r >= i.length ? r >= c ? k.error("已经是最后一个了") : (me.current = o.current + 1, E({
398
+ current: o.current + 1,
399
+ pageSize: o.pageSize,
400
400
  type: "next"
401
- }, r).then((x) => {
402
- Array.isArray(x) && _(x, i, l.current + 1, n);
403
- }) : _(r, i, l.current || 1, n), r;
401
+ }, i).then((y) => {
402
+ if (Array.isArray(y)) {
403
+ if (r >= y.length) {
404
+ y.length > 0 && K(y, y.length - 1, o.current || 1, n), k.error("已经是最后一个了");
405
+ return;
406
+ }
407
+ K(y, r, o.current + 1, n);
408
+ }
409
+ })) : K(i, r, o.current || 1, n), i;
404
410
  });
405
411
  return;
406
412
  }
407
- return Le(e, t).then((r) => (r && n === W.current && (console.log("action", t, "changedSample", f), w(), H((i) => {
413
+ return De(e, t).then((i) => (i && n === U.current && (console.log("action", t, "changedSample", f), L(), H((r) => {
408
414
  var d, y;
409
415
  let c;
410
- if (Array.isArray(i)) {
411
- if (!i.length)
412
- return te(), i;
413
- const x = u === "", M = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", X = t !== "CONFIRM" && u === "pending", $ = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", we = x || X || $ || M ? E + 1 : E;
416
+ if (Array.isArray(r)) {
417
+ if (!r.length)
418
+ return te(), r;
419
+ const D = u === "", O = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", J = t !== "CONFIRM" && u === "pending", j = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", be = D || J || j || O ? F + 1 : F;
414
420
  if (f) {
415
421
  if (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode" || t === "CONFIRM" && u === "pending") {
416
- const O = i.findIndex((Oe) => Oe.id === f.id);
417
- O > -1 && (i.splice(O, 1), c = [...i], l.total && (l.total = l.total - 1));
422
+ const V = r.findIndex((Oe) => Oe.id === f.id);
423
+ V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
418
424
  }
419
425
  } else if (t === "CONFIRM" && u === "pending") {
420
- const O = i.findIndex((Oe) => Oe.id === (h == null ? void 0 : h.id));
421
- O > -1 && (i.splice(O, 1), c = [...i], l.total && (l.total = l.total - 1));
426
+ const V = r.findIndex((Oe) => Oe.id === (h == null ? void 0 : h.id));
427
+ V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
422
428
  }
423
- if (we >= i.length)
424
- if (l.total && we >= l.total) {
425
- if (i.length > 0) {
426
- const O = i.length - 1;
427
- _(i, O, l.current || 1, n);
429
+ if (be >= r.length)
430
+ if (o.total && be >= o.total) {
431
+ if (r.length > 0) {
432
+ const V = r.length - 1;
433
+ K(r, V, o.current || 1, n);
428
434
  }
429
- D.error("已经是最后一个了");
435
+ k.error("已经是最后一个了");
430
436
  } else
431
- A({
432
- current: l.current + 1,
433
- pageSize: l.pageSize,
437
+ me.current = o.current + 1, E({
438
+ current: o.current + 1,
439
+ pageSize: o.pageSize,
434
440
  type: "next"
435
- }, i).then((O) => {
436
- Array.isArray(O) && _(O, we, l.current + 1, n);
441
+ }, r).then((V) => {
442
+ if (Array.isArray(V)) {
443
+ if (be >= V.length) {
444
+ V.length > 0 && K(V, V.length - 1, o.current || 1, n), k.error("已经是最后一个了");
445
+ return;
446
+ }
447
+ K(V, be, o.current + 1, n);
448
+ }
437
449
  });
438
450
  else
439
- _(i, we, l.current || 1, n);
451
+ K(r, be, o.current || 1, n);
440
452
  }
441
- return c || i;
442
- })), r));
453
+ return c || r;
454
+ })), i));
443
455
  }, Mt = (e) => {
444
456
  if (!v)
445
457
  return;
446
- const t = ++W.current;
458
+ const t = ++U.current;
447
459
  if (!ue) {
448
460
  H((n) => {
449
461
  if (!Array.isArray(n) || !n.length)
450
462
  return te(), n;
451
- const r = E - 1;
452
- return r < 0 ? D.error("已经是第一个了") : _(n, r, l.current || 1, t), n;
463
+ const i = F - 1;
464
+ return i < 0 ? k.error("已经是第一个了") : K(n, i, o.current || 1, t), n;
453
465
  });
454
466
  return;
455
467
  }
456
- Le(e).then((n) => {
457
- n && t === W.current && (w(), H((r) => {
458
- let i;
459
- if (Array.isArray(r)) {
460
- if (!r.length)
461
- return te(), r;
462
- const c = E - 1;
468
+ De(e).then((n) => {
469
+ n && t === U.current && (L(), H((i) => {
470
+ let r;
471
+ if (Array.isArray(i)) {
472
+ if (!i.length)
473
+ return te(), i;
474
+ const c = F - 1;
463
475
  if (c < 0)
464
- c < 0 ? D.error("已经是第一个了") : R({
465
- current: l.current - 1,
466
- pageSize: l.pageSize,
476
+ c < 0 ? k.error("已经是第一个了") : R({
477
+ current: o.current - 1,
478
+ pageSize: o.pageSize,
467
479
  type: "prev"
468
480
  });
469
481
  else {
470
482
  if (f && (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode")) {
471
- const d = r.findIndex((y) => y.id === f.id);
472
- d > -1 && (r.splice(d, 1), i = [...r], l.total && (l.total = l.total - 1));
483
+ const d = i.findIndex((y) => y.id === f.id);
484
+ d > -1 && (i.splice(d, 1), r = [...i], o.total && (o.total = o.total - 1));
473
485
  }
474
- _(r, c, l.current || 1, t);
486
+ K(i, c, o.current || 1, t);
475
487
  }
476
488
  }
477
- return i || r;
489
+ return r || i;
478
490
  }));
479
491
  });
480
492
  }, Ot = (e) => {
481
- const t = Object.keys(e.labels.reduce((n, r) => (n[r.label] ? ++n[r.label] : n[r.label] = 1, n), {})).length;
493
+ const t = Object.keys(e.labels.reduce((n, i) => (n[i.label] ? ++n[i.label] : n[i.label] = 1, n), {})).length;
482
494
  return t >= 2 ? `+${t - 1}` : null;
483
495
  }, Ht = (e) => {
484
- var x, M;
496
+ var D, O;
485
497
  const {
486
498
  scrollTop: t,
487
499
  scrollHeight: n,
488
- clientHeight: r
489
- } = e.currentTarget, i = n - t - r, c = 3, d = (x = l.pageSize) != null ? x : 100, y = (M = l.current) != null ? M : 0;
490
- y >= 1 && v.length > 0 && v.length < y * d || (!l.total || l.total > v.length) && i <= c && R((X) => {
491
- var $;
492
- return S(b({}, X), {
493
- current: (($ = X.current) != null ? $ : 0) + 1
500
+ clientHeight: i
501
+ } = e.currentTarget, r = n - t - i, c = 3, d = (D = o.pageSize) != null ? D : 100, y = (O = o.current) != null ? O : 0;
502
+ y >= 1 && v.length > 0 && v.length < y * d || (!o.total || o.total > v.length) && r <= c && R((J) => {
503
+ var j;
504
+ return S(b({}, J), {
505
+ current: ((j = J.current) != null ? j : 0) + 1
494
506
  });
495
507
  });
496
- }, Le = (e, t) => {
497
- var n, r;
498
- if (!o)
508
+ }, De = (e, t) => {
509
+ var n, i;
510
+ if (!l)
499
511
  return Promise.resolve(!1);
500
- if (f && !B) {
501
- const i = S(b({}, f), {
512
+ if (f && !M) {
513
+ const r = S(b({}, f), {
502
514
  labels: f.labels ? [...f.labels] : []
503
515
  });
504
- return i.labels && (i.labels = i.labels.filter((c) => !!c.id)), e !== void 0 && (i.confirmStatus = e, i.isLabeled = ((n = i.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [i], e).then(() => {
505
- D.success({
516
+ return r.labels && (r.labels = r.labels.filter((c) => !!c.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [r], e).then(() => {
517
+ k.success({
506
518
  content: "保存成功"
507
519
  });
508
- const c = S(b({}, i), {
509
- labels: i.labels ? [...i.labels] : []
520
+ const c = S(b({}, r), {
521
+ labels: r.labels ? [...r.labels] : []
510
522
  });
511
523
  return H((d) => {
512
- const y = d.findIndex((x) => x.id === (c == null ? void 0 : c.id));
524
+ const y = d.findIndex((D) => D.id === (c == null ? void 0 : c.id));
513
525
  if (y > -1) {
514
- const x = [...d];
515
- return x[y] = c, x;
526
+ const D = [...d];
527
+ return D[y] = c, D;
516
528
  }
517
529
  return d;
518
- }), N(c), z(c), !0;
530
+ }), N(c), A(c), !0;
519
531
  }).catch(() => !1);
520
532
  } else
521
- return !f && !B && h ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (h.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (h.labels && (h.labels = h.labels.filter((i) => !!i.id)), e !== void 0 && (h.confirmStatus = e, h.isLabeled = ((r = h.labels) == null ? void 0 : r.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [h], e).then(() => (D.success({
533
+ return !f && !M && h ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (h.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (h.labels && (h.labels = h.labels.filter((r) => !!r.id)), e !== void 0 && (h.confirmStatus = e, h.isLabeled = ((i = h.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [h], e).then(() => (k.success({
522
534
  content: "保存成功"
523
- }), H((i) => {
524
- const c = i.findIndex((d) => d.id === (h == null ? void 0 : h.id));
525
- return c > -1 && (i[c] = h), [...i];
535
+ }), H((r) => {
536
+ const c = r.findIndex((d) => d.id === (h == null ? void 0 : h.id));
537
+ return c > -1 && (r[c] = h), [...r];
526
538
  }), N(b({}, h)), !0)).catch(() => !1)) : Promise.resolve(!0);
527
539
  }, Ut = (e, t) => {
528
540
  if (f && f.labels.some((n) => !n.id))
529
- return D.error("所有标注需设置标签"), Promise.resolve(!1);
541
+ return k.error("所有标注需设置标签"), Promise.resolve(!1);
530
542
  it(e, t);
531
543
  }, qt = (e) => {
532
544
  if (f && f.labels.some((t) => !t.id)) {
533
- D.error("所有标注需设置标签");
545
+ k.error("所有标注需设置标签");
534
546
  return;
535
547
  }
536
548
  if (!f) {
537
- G(!1);
549
+ Z(!1);
538
550
  return;
539
551
  }
540
- Le(e).then((t) => {
541
- t && (z(void 0), G(!1), w(), U());
552
+ De(e).then((t) => {
553
+ t && (A(void 0), Z(!1), L(), q());
542
554
  });
543
555
  }, Kt = () => {
544
- De.confirm({
556
+ Ne.confirm({
545
557
  title: "确认要删除当前数据吗?",
546
558
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
547
559
  onOk: () => {
548
- !h || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, o.id, h.id).then(() => {
560
+ !h || !l || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, l.id, h.id).then(() => {
549
561
  const e = v.findIndex((n) => n.id === h.id);
550
562
  v.splice(e, 1);
551
563
  const t = v.length;
552
- H([...v]), R(S(b({}, l), {
553
- total: l.total ? l.total - 1 : 0
554
- })), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (N(void 0), z(void 0), V(-1), ue || he(!1), setTimeout(() => {
564
+ H([...v]), R(S(b({}, o), {
565
+ total: o.total ? o.total - 1 : 0
566
+ })), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), z(e - 1)), L(), A(void 0), (t === 0 || o.total && o.total - 1 === 0) && (N(void 0), A(void 0), z(-1), ue || he(!1), setTimeout(() => {
555
567
  R((n) => S(b({}, n), {
556
568
  current: 1,
557
569
  type: void 0
@@ -562,7 +574,7 @@ const pr = (L) => {
562
574
  });
563
575
  }, ot = [{
564
576
  key: "",
565
- label: `全部(${Q})`,
577
+ label: `全部(${Y})`,
566
578
  children: null
567
579
  }, {
568
580
  key: "nocode",
@@ -574,7 +586,7 @@ const pr = (L) => {
574
586
  children: null
575
587
  }, {
576
588
  key: "hascode",
577
- label: `已标注(${Q - de - fe})`,
589
+ label: `已标注(${Y - de - fe})`,
578
590
  children: null
579
591
  }], Wt = () => {
580
592
  var e, t;
@@ -584,32 +596,32 @@ const pr = (L) => {
584
596
  }, $t = (e) => {
585
597
  At(e), ne();
586
598
  }, lt = (e) => {
587
- if (pe.current++, W.current++, E >= 0 && u !== void 0 && u !== null) {
588
- const n = ee.current[u];
589
- !!n && n.page > 1 && (l.current || 1) === 1 || (ee.current[u] = {
590
- index: E,
591
- page: l.current || 1
599
+ if (pe.current++, U.current++, F >= 0 && u !== void 0 && u !== null) {
600
+ const n = X.current[u];
601
+ !!n && n.page > 1 && (o.current || 1) === 1 || (X.current[u] = {
602
+ index: F,
603
+ page: o.current || 1
592
604
  });
593
605
  }
594
- ne(), e !== u && Ce(!0);
595
- const t = (l.current || 1) !== 1;
596
- f ? Le(f == null ? void 0 : f.confirmStatus).then((n) => {
597
- n ? (xe.current = t, Re(e), w()) : (Ce(!1), D.error("保存失败"));
598
- }) : (xe.current = t, R(S(b({}, l), {
606
+ ne(), e !== u && xe(!0);
607
+ const t = (o.current || 1) !== 1;
608
+ f ? De(f == null ? void 0 : f.confirmStatus).then((n) => {
609
+ n ? (we.current = t, Pe(e), L()) : (xe(!1), k.error("保存失败"));
610
+ }) : (we.current = t, R(S(b({}, o), {
599
611
  current: 1,
600
612
  total: void 0
601
- })), Re(e)), e === "nocode" && Ve([]);
613
+ })), Pe(e)), e === "nocode" && ze([]);
602
614
  }, jt = () => {
603
- if (console.log("一键确认", g, o), !(g != null && g.cvforceDatahub) || !(o != null && o.id))
615
+ if (console.log("一键确认", g, l), !(g != null && g.cvforceDatahub) || !(l != null && l.id))
604
616
  return Promise.resolve(!1);
605
- De.confirm({
617
+ Ne.confirm({
606
618
  title: "一键保存所有标注?",
607
619
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
608
620
  onOk: () => {
609
- g.cvforceDatahub.getAllConfirmSamples(a, o.id).then((e) => {
610
- D.success("保存成功"), A(S(b({}, l), {
621
+ g.cvforceDatahub.getAllConfirmSamples(a, l.id).then((e) => {
622
+ k.success("保存成功"), E(S(b({}, o), {
611
623
  current: 1
612
- })), w();
624
+ })), L();
613
625
  });
614
626
  }
615
627
  });
@@ -622,9 +634,9 @@ const pr = (L) => {
622
634
  t.add(n.id);
623
635
  }) : v.forEach((n) => {
624
636
  t.delete(n.id);
625
- }), Fe(t), ke(e);
637
+ }), Fe(t), Le(e);
626
638
  }, ne = () => {
627
- Fe(/* @__PURE__ */ new Set()), ke(!1);
639
+ Fe(/* @__PURE__ */ new Set()), Le(!1);
628
640
  }, st = () => {
629
641
  const e = v.filter((n) => P.has(n.id)), t = {
630
642
  nocode: 0,
@@ -635,23 +647,23 @@ const pr = (L) => {
635
647
  n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
636
648
  }), t;
637
649
  }, _t = () => {
638
- if (!Se)
650
+ if (!Ce)
639
651
  return;
640
652
  if (P.size === 0) {
641
- D.warning("请先选择要删除的图片");
653
+ k.warning("请先选择要删除的图片");
642
654
  return;
643
655
  }
644
- const e = st(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
656
+ const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
645
657
  children: [/* @__PURE__ */ s("p", {
646
658
  style: {
647
659
  marginBottom: 16
648
660
  },
649
661
  children: "所选类型下的数量统计:"
650
- }), /* @__PURE__ */ m("div", {
662
+ }), /* @__PURE__ */ p("div", {
651
663
  style: {
652
664
  marginBottom: 16
653
665
  },
654
- children: [t && /* @__PURE__ */ m("div", {
666
+ children: [t && /* @__PURE__ */ p("div", {
655
667
  style: {
656
668
  display: "flex",
657
669
  alignItems: "center",
@@ -668,10 +680,10 @@ const pr = (L) => {
668
680
  fontSize: 12
669
681
  },
670
682
  children: "未标注"
671
- }), /* @__PURE__ */ m("span", {
683
+ }), /* @__PURE__ */ p("span", {
672
684
  children: [e.nocode, "张"]
673
685
  })]
674
- }), n && /* @__PURE__ */ m("div", {
686
+ }), n && /* @__PURE__ */ p("div", {
675
687
  style: {
676
688
  display: "flex",
677
689
  alignItems: "center",
@@ -688,10 +700,10 @@ const pr = (L) => {
688
700
  fontSize: 12
689
701
  },
690
702
  children: "待确认"
691
- }), /* @__PURE__ */ m("span", {
703
+ }), /* @__PURE__ */ p("span", {
692
704
  children: [e.pending, "张"]
693
705
  })]
694
- }), r && /* @__PURE__ */ m("div", {
706
+ }), i && /* @__PURE__ */ p("div", {
695
707
  style: {
696
708
  display: "flex",
697
709
  alignItems: "center",
@@ -708,7 +720,7 @@ const pr = (L) => {
708
720
  fontSize: 12
709
721
  },
710
722
  children: "已标注"
711
- }), /* @__PURE__ */ m("span", {
723
+ }), /* @__PURE__ */ p("span", {
712
724
  children: [e.hascode, "张"]
713
725
  })]
714
726
  })]
@@ -719,47 +731,47 @@ const pr = (L) => {
719
731
  children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
720
732
  })]
721
733
  });
722
- De.confirm({
734
+ Ne.confirm({
723
735
  title: "删除操作确认",
724
- content: i,
736
+ content: r,
725
737
  okText: "确定",
726
738
  cancelText: "取消",
727
739
  width: 500,
728
740
  onOk: () => He(void 0, null, function* () {
729
- if (!o)
741
+ if (!l)
730
742
  return;
731
743
  const c = Array.from(P);
732
744
  if (c.length === 0) {
733
- D.warning("没有选中的图片");
745
+ k.warning("没有选中的图片");
734
746
  return;
735
747
  }
736
748
  try {
737
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, c), D.success("删除成功"), ne(), A(S(b({}, l), {
749
+ yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, l.id, c), k.success("删除成功"), ne(), E(S(b({}, o), {
738
750
  current: 1
739
- })), w(), U();
751
+ })), L(), q();
740
752
  } catch (d) {
741
- D.error("删除失败");
753
+ k.error("删除失败");
742
754
  }
743
755
  })
744
756
  });
745
757
  }, Xt = () => {
746
- if (!j)
758
+ if (!G)
747
759
  return;
748
760
  if (P.size === 0) {
749
- D.warning("请先选择要清除标注的图片");
761
+ k.warning("请先选择要清除标注的图片");
750
762
  return;
751
763
  }
752
- const e = st(), t = e.nocode > 0, n = e.pending > 0, r = e.hascode > 0, i = /* @__PURE__ */ m("div", {
764
+ const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
753
765
  children: [/* @__PURE__ */ s("p", {
754
766
  style: {
755
767
  marginBottom: 16
756
768
  },
757
769
  children: "所选类型下的数量统计:"
758
- }), /* @__PURE__ */ m("div", {
770
+ }), /* @__PURE__ */ p("div", {
759
771
  style: {
760
772
  marginBottom: 16
761
773
  },
762
- children: [t && /* @__PURE__ */ m("div", {
774
+ children: [t && /* @__PURE__ */ p("div", {
763
775
  style: {
764
776
  display: "flex",
765
777
  alignItems: "center",
@@ -776,10 +788,10 @@ const pr = (L) => {
776
788
  fontSize: 12
777
789
  },
778
790
  children: "未标注"
779
- }), /* @__PURE__ */ m("span", {
791
+ }), /* @__PURE__ */ p("span", {
780
792
  children: [e.nocode, "张"]
781
793
  })]
782
- }), n && /* @__PURE__ */ m("div", {
794
+ }), n && /* @__PURE__ */ p("div", {
783
795
  style: {
784
796
  display: "flex",
785
797
  alignItems: "center",
@@ -796,10 +808,10 @@ const pr = (L) => {
796
808
  fontSize: 12
797
809
  },
798
810
  children: "待确认"
799
- }), /* @__PURE__ */ m("span", {
811
+ }), /* @__PURE__ */ p("span", {
800
812
  children: [e.pending, "张"]
801
813
  })]
802
- }), r && /* @__PURE__ */ m("div", {
814
+ }), i && /* @__PURE__ */ p("div", {
803
815
  style: {
804
816
  display: "flex",
805
817
  alignItems: "center",
@@ -816,7 +828,7 @@ const pr = (L) => {
816
828
  fontSize: 12
817
829
  },
818
830
  children: "已标注"
819
- }), /* @__PURE__ */ m("span", {
831
+ }), /* @__PURE__ */ p("span", {
820
832
  children: [e.hascode, "张"]
821
833
  })]
822
834
  })]
@@ -824,18 +836,18 @@ const pr = (L) => {
824
836
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
825
837
  })]
826
838
  });
827
- De.confirm({
839
+ Ne.confirm({
828
840
  title: "删除操作确认",
829
- content: i,
841
+ content: r,
830
842
  okText: "确定",
831
843
  cancelText: "取消",
832
844
  width: 500,
833
845
  onOk: () => He(void 0, null, function* () {
834
- if (!o)
846
+ if (!l)
835
847
  return;
836
848
  const c = v.filter((d) => P.has(d.id));
837
849
  if (c.length === 0) {
838
- D.warning("没有选中的图片");
850
+ k.warning("没有选中的图片");
839
851
  return;
840
852
  }
841
853
  try {
@@ -844,38 +856,38 @@ const pr = (L) => {
844
856
  confirmStatus: 0,
845
857
  isLabeled: !1
846
858
  }));
847
- yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ne(), A(S(b({}, l), {
859
+ yield g.cvforceDatahub.updateSamples(a, l.id, d, 0), k.success("清除标注成功"), ne(), E(S(b({}, o), {
848
860
  current: 1
849
- })), w(), U();
861
+ })), L(), q();
850
862
  } catch (d) {
851
- D.error("清除标注失败");
863
+ k.error("清除标注失败");
852
864
  }
853
865
  })
854
866
  });
855
- }, Jt = [...Se ? [{
867
+ }, Jt = [...Ce ? [{
856
868
  key: "deleteWithAnnotations",
857
869
  label: "删除所选图片(含标注)",
858
870
  onClick: _t
859
- }] : [], ...j ? [{
871
+ }] : [], ...G ? [{
860
872
  key: "clearAnnotations",
861
873
  label: "仅清除所选图片内的标注",
862
874
  onClick: Xt
863
- }] : []], ct = !h && !!(T && T.preLabel) && !!(o != null && o.id), Qt = j || ct;
875
+ }] : []], ct = !h && !!(T && T.preLabel) && !!(l != null && l.id), Qt = G || ct;
864
876
  return /* @__PURE__ */ s(sn, {
865
- locale: mn,
877
+ locale: pn,
866
878
  children: /* @__PURE__ */ s(bn.Provider, {
867
879
  value: {
868
880
  datasetId: a,
869
- versionId: (o == null ? void 0 : o.id) || "",
870
- no: (o == null ? void 0 : o.no) || "",
881
+ versionId: (l == null ? void 0 : l.id) || "",
882
+ no: (l == null ? void 0 : l.no) || "",
871
883
  loading: qe,
872
- version: o,
873
- versions: ye,
884
+ version: l,
885
+ versions: Ie,
874
886
  samples: v,
875
- pagination: l,
887
+ pagination: o,
876
888
  services: g,
877
889
  featuresConfig: {
878
- labelManager: ve,
890
+ labelManager: Se,
879
891
  datasetManager: T,
880
892
  annotation: oe,
881
893
  filterSwitch: se,
@@ -883,71 +895,71 @@ const pr = (L) => {
883
895
  exampleSrcRoot: le
884
896
  }
885
897
  },
886
- children: k ? k.markType === "detection" ? /* @__PURE__ */ s("div", {
898
+ children: x ? x.markType === "detection" ? /* @__PURE__ */ s("div", {
887
899
  className: "detection-version-detail",
888
- children: Pt ? o != null && o.id && T && T.preLabel ? /* @__PURE__ */ s(xn, {
900
+ children: Pt ? l != null && l.id && T && T.preLabel ? /* @__PURE__ */ s(xn, {
889
901
  datasetId: a,
890
- versionId: o.id,
902
+ versionId: l.id,
891
903
  onClose: () => {
892
- Vt(!1), Be(), U(), w(), A();
904
+ Vt(!1), Be(), q(), L(), E();
893
905
  },
894
906
  samples: v,
895
- labels: F,
907
+ labels: B,
896
908
  fetchLength: Be
897
- }) : null : /* @__PURE__ */ m(Ln, {
909
+ }) : null : /* @__PURE__ */ p(wn, {
898
910
  className: "product-details-page",
899
911
  header: I === !1 ? void 0 : /* @__PURE__ */ s(Dn, {
900
- backTo: be,
912
+ backTo: ye,
901
913
  onBackClick: I != null && I.onBackClick ? () => {
902
914
  h && te(), I.onBackClick && I.onBackClick();
903
915
  } : void 0,
904
- left: !qe && /* @__PURE__ */ m(me, {
916
+ left: !qe && /* @__PURE__ */ p(ve, {
905
917
  children: [/* @__PURE__ */ s("span", {
906
918
  style: {
907
919
  fontWeight: "bold"
908
920
  },
909
- children: k == null ? void 0 : k.name
921
+ children: x == null ? void 0 : x.name
910
922
  }), /* @__PURE__ */ s(cn, {
911
923
  disabled: (I == null ? void 0 : I.versionSelect) === !1,
912
- value: o == null ? void 0 : o.id,
924
+ value: l == null ? void 0 : l.id,
913
925
  style: {
914
926
  width: 70
915
927
  },
916
- options: ye.map((e) => ({
928
+ options: Ie.map((e) => ({
917
929
  label: e.no,
918
930
  value: e.id
919
931
  })),
920
932
  onChange: (e) => {
921
- const t = ye.find((r) => r.id === e);
922
- if (!k || !t)
933
+ const t = Ie.find((i) => i.id === e);
934
+ if (!x || !t)
923
935
  return;
924
- const n = ye.find((r) => r.id === t.id);
936
+ const n = Ie.find((i) => i.id === t.id);
925
937
  ae(n), ne(), I != null && I.onVersionChange && I.onVersionChange(n);
926
938
  }
927
939
  })]
928
940
  }),
929
- right: /* @__PURE__ */ m(me, {
930
- children: [!h && T && T.add && /* @__PURE__ */ s(pt, {
931
- isPreLabel: B,
941
+ right: /* @__PURE__ */ p(ve, {
942
+ children: [!h && T && T.add && /* @__PURE__ */ s(mt, {
943
+ isPreLabel: M,
932
944
  placement: "bottom",
933
945
  children: /* @__PURE__ */ s(re, {
934
946
  type: "default",
935
- onClick: () => Pe(!0),
936
- disabled: Z === ie.Pending || Z === ie.Started || B,
947
+ onClick: () => Ve(!0),
948
+ disabled: _ === ie.Pending || _ === ie.Started || M,
937
949
  children: "导入数据"
938
950
  }, "del")
939
951
  }), Qt && /* @__PURE__ */ s(ut, {
940
952
  menu: {
941
- items: [...j ? [{
953
+ items: [...G ? [{
942
954
  key: "manual",
943
- label: /* @__PURE__ */ s(pt, {
944
- isPreLabel: B,
945
- children: /* @__PURE__ */ s(me, {
955
+ label: /* @__PURE__ */ s(mt, {
956
+ isPreLabel: M,
957
+ children: /* @__PURE__ */ s(ve, {
946
958
  children: /* @__PURE__ */ s(re, {
947
959
  type: "text",
948
- disabled: B,
960
+ disabled: M,
949
961
  onClick: () => {
950
- h || Re("nocode"), G(!0), V(-1), u === "nocode" && (V(0), N(v[0])), he(!0);
962
+ h || Pe("nocode"), Z(!0), z(-1), u === "nocode" && (z(0), N(v[0])), he(!0);
951
963
  },
952
964
  children: "人工标注"
953
965
  })
@@ -958,7 +970,7 @@ const pr = (L) => {
958
970
  label: /* @__PURE__ */ s(Pn, {
959
971
  buttonType: "text",
960
972
  datasetId: a,
961
- versionId: (o == null ? void 0 : o.id) || "",
973
+ versionId: (l == null ? void 0 : l.id) || "",
962
974
  disabled: !v.length,
963
975
  setIsTaskChange: Rt,
964
976
  datasetType: "detection",
@@ -967,42 +979,42 @@ const pr = (L) => {
967
979
  } : null]
968
980
  },
969
981
  placement: "bottom",
970
- children: /* @__PURE__ */ m(re, {
982
+ children: /* @__PURE__ */ p(re, {
971
983
  type: "primary",
972
- children: ["开始标注", /* @__PURE__ */ s(mt, {})]
984
+ children: ["开始标注", /* @__PURE__ */ s(pt, {})]
973
985
  })
974
986
  }), /* @__PURE__ */ s(Rn, {
975
987
  when: kt,
976
988
  content: "确认要离开此页面吗?",
977
989
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
978
- }), Ge && /* @__PURE__ */ s(wn, {
979
- datasetIam: yt,
990
+ }), Ge && /* @__PURE__ */ s(Ln, {
991
+ datasetIam: St,
980
992
  datasetId: a,
981
- currentVersion: o,
982
- tenCode: k == null ? void 0 : k.tenantCode,
993
+ currentVersion: l,
994
+ tenCode: x == null ? void 0 : x.tenantCode,
983
995
  isVisible: Ge,
984
- setIsVisible: Pe,
985
- getVersionListRequest: w,
996
+ setIsVisible: Ve,
997
+ getVersionListRequest: L,
986
998
  setIsConfirm: xt,
987
999
  onUploadStatusChange: (e) => {
988
1000
  It(e);
989
1001
  },
990
1002
  tableReload: () => {
991
1003
  var e, t, n;
992
- o != null && o.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
1004
+ l != null && l.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
993
1005
  top: 0
994
- }), A(S(b({}, l), {
1006
+ }), E(S(b({}, o), {
995
1007
  current: 1
996
- })), (n = Te.current) == null || n.fetchLabels());
1008
+ })), (n = Re.current) == null || n.fetchLabels());
997
1009
  },
998
1010
  loadVersionData: rt,
999
- markType: k.markType
1011
+ markType: x.markType
1000
1012
  })]
1001
1013
  })
1002
1014
  }),
1003
- children: [/* @__PURE__ */ m("div", {
1015
+ children: [/* @__PURE__ */ p("div", {
1004
1016
  className: "detection-header",
1005
- children: [/* @__PURE__ */ m(me, {
1017
+ children: [/* @__PURE__ */ p(ve, {
1006
1018
  children: [se.tabs && /* @__PURE__ */ s(an, {
1007
1019
  className: "header-tab",
1008
1020
  activeKey: u,
@@ -1017,89 +1029,89 @@ const pr = (L) => {
1017
1029
  value: ge,
1018
1030
  onChange: $t,
1019
1031
  allowClear: !0
1020
- }), !h && Ne && /* @__PURE__ */ s(ut, {
1032
+ }), !h && Te && /* @__PURE__ */ s(ut, {
1021
1033
  menu: {
1022
1034
  items: Jt
1023
1035
  },
1024
1036
  disabled: P.size === 0,
1025
- children: /* @__PURE__ */ m(re, {
1037
+ children: /* @__PURE__ */ p(re, {
1026
1038
  size: "middle",
1027
1039
  disabled: P.size === 0,
1028
- children: ["删除", /* @__PURE__ */ s(mt, {})]
1040
+ children: ["删除", /* @__PURE__ */ s(pt, {})]
1029
1041
  })
1030
- }), !h && Ne && /* @__PURE__ */ m(ft, {
1042
+ }), !h && Te && /* @__PURE__ */ p(ft, {
1031
1043
  children: [/* @__PURE__ */ s(ht, {
1032
1044
  checked: Et,
1033
1045
  onChange: (e) => Zt(e.target.checked),
1034
1046
  children: "选择当前页"
1035
- }), P.size > 0 && /* @__PURE__ */ m("span", {
1047
+ }), P.size > 0 && /* @__PURE__ */ p("span", {
1036
1048
  style: {
1037
1049
  color: "#666"
1038
1050
  },
1039
- children: ["已选中", P.size, "张,共", l.total || 0, "张"]
1051
+ children: ["已选中", P.size, "张,共", o.total || 0, "张"]
1040
1052
  })]
1041
1053
  })]
1042
- }), /* @__PURE__ */ s(me, {
1043
- children: u === "pending" && j && /* @__PURE__ */ s(re, {
1054
+ }), /* @__PURE__ */ s(ve, {
1055
+ children: u === "pending" && G && /* @__PURE__ */ s(re, {
1044
1056
  type: "primary",
1045
1057
  className: "pending-confirm-button",
1046
1058
  onClick: jt,
1047
1059
  children: "一键确认"
1048
1060
  })
1049
1061
  })]
1050
- }), /* @__PURE__ */ m("div", {
1062
+ }), /* @__PURE__ */ p("div", {
1051
1063
  className: "d-row",
1052
- children: [/* @__PURE__ */ m("div", {
1064
+ children: [/* @__PURE__ */ p("div", {
1053
1065
  className: "d-right",
1054
1066
  ref: ce,
1055
- children: [Y && /* @__PURE__ */ s(En, {
1067
+ children: [ee && /* @__PURE__ */ s(En, {
1056
1068
  datasetId: a,
1057
- isImageDetailVisible: Y,
1069
+ isImageDetailVisible: ee,
1058
1070
  setIsImageDetailVisible: he,
1059
1071
  currentSample: f != null ? f : h,
1060
- labels: F,
1072
+ labels: B,
1061
1073
  previewMode: !ue,
1062
1074
  filterItems: ot,
1063
1075
  filterMode: u,
1064
1076
  onFilterChange: lt,
1065
- onChange: z,
1077
+ onChange: A,
1066
1078
  onNextClick: (e) => it(e),
1067
1079
  onPrevClick: (e) => Mt(e),
1068
1080
  onSave: (e, t) => Ut(e, t),
1069
1081
  onDeleteSample: () => Kt(),
1070
1082
  onEnterEdit: () => {
1071
- G(!0);
1083
+ Z(!0);
1072
1084
  },
1073
1085
  onBackToDetail: (e) => qt(e),
1074
1086
  onLoadingChange: Ft,
1075
1087
  switchingSample: Dt,
1076
1088
  onRefresh: () => {
1077
1089
  var e;
1078
- (e = U()) == null || e.then((t) => {
1079
- var n, r;
1090
+ (e = q()) == null || e.then((t) => {
1091
+ var n, i;
1080
1092
  if (f) {
1081
- const i = [];
1093
+ const r = [];
1082
1094
  (n = f.labels) == null || n.forEach((c) => {
1083
- t != null && t.find((d) => d.id === c.id) && i.push(c);
1084
- }), f.labels = i, z(b({}, f));
1095
+ t != null && t.find((d) => d.id === c.id) && r.push(c);
1096
+ }), f.labels = r, A(b({}, f));
1085
1097
  }
1086
1098
  if (h) {
1087
- const i = [];
1088
- (r = h.labels) == null || r.forEach((c) => {
1089
- t != null && t.find((d) => d.id === c.id) && i.push(c);
1090
- }), h.labels = i, N(b({}, h));
1099
+ const r = [];
1100
+ (i = h.labels) == null || i.forEach((c) => {
1101
+ t != null && t.find((d) => d.id === c.id) && r.push(c);
1102
+ }), h.labels = r, N(b({}, h));
1091
1103
  }
1092
- }), w();
1104
+ }), L();
1093
1105
  },
1094
- isPreLabel: B,
1106
+ isPreLabel: M,
1095
1107
  imgCount: {
1096
- total: Q,
1097
- index: E + 1
1108
+ total: Y,
1109
+ index: F + 1
1098
1110
  },
1099
- settingHide: !ve,
1100
- canLabel: j,
1101
- canDelete: Se
1102
- }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ s(ft, {
1111
+ settingHide: !Se,
1112
+ canLabel: G,
1113
+ canDelete: Ce
1114
+ }), o.total !== void 0 && o.total > 0 ? /* @__PURE__ */ s(ft, {
1103
1115
  children: /* @__PURE__ */ s(gn, {
1104
1116
  innerProps: {
1105
1117
  className: "d-right-row"
@@ -1113,23 +1125,23 @@ const pr = (L) => {
1113
1125
  return /* @__PURE__ */ s(dn, {
1114
1126
  className: "d-right-col",
1115
1127
  "data-sample-id": e.id,
1116
- children: /* @__PURE__ */ m("div", {
1128
+ children: /* @__PURE__ */ p("div", {
1117
1129
  className: "right-col-wrapper",
1118
- onMouseEnter: () => Ae(e.id),
1119
- onMouseLeave: () => Ae(""),
1130
+ onMouseEnter: () => Ee(e.id),
1131
+ onMouseLeave: () => Ee(""),
1120
1132
  children: [/* @__PURE__ */ s("div", {
1121
1133
  className: "detection-status-wrapper",
1122
1134
  children: /* @__PURE__ */ s(An, {
1123
1135
  sample: e
1124
1136
  })
1125
- }), Ne && /* @__PURE__ */ s("div", {
1137
+ }), Te && /* @__PURE__ */ s("div", {
1126
1138
  className: "sample-checkbox-wrapper",
1127
1139
  children: /* @__PURE__ */ s(ht, {
1128
1140
  checked: P.has(e.id),
1129
- onChange: (r) => {
1130
- r.stopPropagation(), Gt(e.id, r.target.checked);
1141
+ onChange: (i) => {
1142
+ i.stopPropagation(), Gt(e.id, i.target.checked);
1131
1143
  },
1132
- onClick: (r) => r.stopPropagation()
1144
+ onClick: (i) => i.stopPropagation()
1133
1145
  })
1134
1146
  }), /* @__PURE__ */ s("div", {
1135
1147
  className: "right-col-img",
@@ -1139,16 +1151,16 @@ const pr = (L) => {
1139
1151
  width: 124,
1140
1152
  thumbnailUrl: e.thumbnailUrl
1141
1153
  })
1142
- }), /* @__PURE__ */ m("div", {
1154
+ }), /* @__PURE__ */ p("div", {
1143
1155
  className: "right-col-text",
1144
1156
  children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ s(fn, {
1145
1157
  placement: "top",
1146
1158
  title: /* @__PURE__ */ s("div", {
1147
- children: Object.keys(e.labels.reduce((r, i) => (r[i.label] ? ++r[i.label] : r[i.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
1148
- children: r
1149
- }, r))
1159
+ children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ s("div", {
1160
+ children: i
1161
+ }, i))
1150
1162
  }),
1151
- children: /* @__PURE__ */ m("div", {
1163
+ children: /* @__PURE__ */ p("div", {
1152
1164
  style: {
1153
1165
  width: "100%",
1154
1166
  display: "flex"
@@ -1186,18 +1198,18 @@ const pr = (L) => {
1186
1198
  })
1187
1199
  }) : /* @__PURE__ */ s("div", {
1188
1200
  className: "empty",
1189
- children: l.total === 0 ? /* @__PURE__ */ s(un, {
1201
+ children: o.total === 0 ? /* @__PURE__ */ s(un, {
1190
1202
  image: vn,
1191
- description: /* @__PURE__ */ m("span", {
1203
+ description: /* @__PURE__ */ p("span", {
1192
1204
  children: ["暂无数据", u !== "hascode" && !ge && /* @__PURE__ */ s("span", {
1193
- children: T && T.add && /* @__PURE__ */ m(re, {
1205
+ children: T && T.add && /* @__PURE__ */ p(re, {
1194
1206
  type: "link",
1195
1207
  size: "small",
1196
1208
  style: {
1197
1209
  padding: 0
1198
1210
  },
1199
- onClick: () => Pe(!0),
1200
- disabled: Z === ie.Pending || Z === ie.Started,
1211
+ onClick: () => Ve(!0),
1212
+ disabled: _ === ie.Pending || _ === ie.Started,
1201
1213
  children: [/* @__PURE__ */ s("span", {
1202
1214
  style: {
1203
1215
  color: "black"
@@ -1212,35 +1224,35 @@ const pr = (L) => {
1212
1224
  }), u !== "nocode" && se.labels && /* @__PURE__ */ s("div", {
1213
1225
  className: "d-sider",
1214
1226
  children: /* @__PURE__ */ s(Cn, {
1215
- ref: Te,
1227
+ ref: Re,
1216
1228
  datasetId: a,
1217
- data: F || [],
1229
+ data: B || [],
1218
1230
  showStatColumns: !0,
1219
- selected: K,
1231
+ selected: $,
1220
1232
  onSelectedChange: (e) => {
1221
- ne(), Ve((F == null ? void 0 : F.filter((t) => e.find((n) => n.label === t.label))) || []);
1233
+ ne(), ze((B == null ? void 0 : B.filter((t) => e.find((n) => n.label === t.label))) || []);
1222
1234
  },
1223
1235
  onListChange: (e) => {
1224
- if (!o)
1236
+ if (!l)
1225
1237
  return;
1226
1238
  let t = 2;
1227
- u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
1239
+ u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
1228
1240
  confirmStatus: t
1229
1241
  }).then((n) => {
1230
- const i = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
1231
- var x;
1242
+ const r = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
1243
+ var D;
1232
1244
  return {
1233
1245
  label: d.label,
1234
1246
  count: d.count,
1235
- boxCount: (x = d.boxCount) != null ? x : 0,
1247
+ boxCount: (D = d.boxCount) != null ? D : 0,
1236
1248
  id: d.id,
1237
1249
  color: gt[y % 40]
1238
1250
  };
1239
- }), c = K.filter((d) => i.some((y) => y.id === d.id));
1240
- Xe(i), K.length !== c.length && Ve(c);
1241
- }), w();
1251
+ }), c = $.filter((d) => r.some((y) => y.id === d.id));
1252
+ Xe(r), $.length !== c.length && ze(c);
1253
+ }), L();
1242
1254
  },
1243
- isPreLabel: B
1255
+ isPreLabel: M
1244
1256
  })
1245
1257
  })]
1246
1258
  })]
@@ -1257,5 +1269,5 @@ const pr = (L) => {
1257
1269
  };
1258
1270
  export {
1259
1271
  Bn as ISampleActionType,
1260
- pr as default
1272
+ mr as default
1261
1273
  };