@glodon-aiot/dataset-annotation 3.23.0-alpha.2 → 3.23.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,43 +2,43 @@ var Wt = Object.defineProperty, $t = Object.defineProperties;
2
2
  var jt = Object.getOwnPropertyDescriptors;
3
3
  var it = Object.getOwnPropertySymbols;
4
4
  var Gt = Object.prototype.hasOwnProperty, Zt = Object.prototype.propertyIsEnumerable;
5
- var rt = (L, g, c) => g in L ? Wt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: c }) : L[g] = c, b = (L, g) => {
6
- for (var c in g || (g = {}))
7
- Gt.call(g, c) && rt(L, c, g[c]);
5
+ var rt = (L, g, a) => g in L ? Wt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
6
+ for (var a in g || (g = {}))
7
+ Gt.call(g, a) && rt(L, a, g[a]);
8
8
  if (it)
9
- for (var c of it(g))
10
- Zt.call(g, c) && rt(L, c, g[c]);
9
+ for (var a of it(g))
10
+ Zt.call(g, a) && rt(L, a, g[a]);
11
11
  return L;
12
- }, y = (L, g) => $t(L, jt(g));
13
- var Be = (L, g, c) => new Promise((J, me) => {
14
- var be = (I) => {
12
+ }, S = (L, g) => $t(L, jt(g));
13
+ var Be = (L, g, a) => new Promise((J, me) => {
14
+ var be = (x) => {
15
15
  try {
16
- oe(c.next(I));
16
+ oe(a.next(x));
17
17
  } catch (le) {
18
18
  me(le);
19
19
  }
20
- }, N = (I) => {
20
+ }, N = (x) => {
21
21
  try {
22
- oe(c.throw(I));
22
+ oe(a.throw(x));
23
23
  } catch (le) {
24
24
  me(le);
25
25
  }
26
- }, oe = (I) => I.done ? J(I.value) : Promise.resolve(I.value).then(be, N);
27
- oe((c = c.apply(L, g)).next());
26
+ }, oe = (x) => x.done ? J(x.value) : Promise.resolve(x.value).then(be, N);
27
+ oe((a = a.apply(L, g)).next());
28
28
  });
29
- import { jsx as a, jsxs as m, Fragment as ot } from "react/jsx-runtime";
30
- import { useRef as $, useState as p, useLayoutEffect as _t, useEffect as C, useCallback as Xt } from "react";
29
+ import { jsx as c, jsxs as m, Fragment as ot } from "react/jsx-runtime";
30
+ import { useRef as $, useState as p, useLayoutEffect as _t, useEffect as I, useCallback as Xt } from "react";
31
31
  import { message as D, ConfigProvider as Jt, Space as pe, Select as Qt, Button as ie, Dropdown as lt, Tabs as Yt, Checkbox as st, Col as en, Tooltip as tn, Empty as nn, Spin as rn, Modal as ke } from "antd";
32
32
  import on from "rc-virtual-list";
33
33
  import { UploadZipsStatus as re, PreLabelTaskStatus as ln } from "@glodon-aiot/apis";
34
34
  import sn from "antd/es/locale/zh_CN";
35
- import an from "../../DatasetContext/index.mjs";
36
- import cn from "./icon_item_empty.svg.mjs";
35
+ import cn from "../../DatasetContext/index.mjs";
36
+ import an from "./icon_item_empty.svg.mjs";
37
37
  import "./style.less.mjs";
38
- import { tagColors as at } from "../../utils/index.mjs";
38
+ import { tagColors as ct } from "../../utils/index.mjs";
39
39
  import dn from "./components/Labels/index.mjs";
40
40
  import { useKeyPress as fn } from "ahooks";
41
- import ct from "./components/DisabledTooltip/index.mjs";
41
+ import at from "./components/DisabledTooltip/index.mjs";
42
42
  import hn from "./PreSamplesPage/index.mjs";
43
43
  import { DownOutlined as dt, SearchOutlined as un } from "@ant-design/icons";
44
44
  import gn from "../../Common/Page/index.mjs";
@@ -57,31 +57,31 @@ var wn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm =
57
57
  const ii = (L) => {
58
58
  const {
59
59
  services: g,
60
- datasetId: c,
60
+ datasetId: a,
61
61
  versionId: J,
62
62
  backTo: me,
63
63
  labelManager: be = !1,
64
64
  datasetManager: N = !1,
65
65
  annotation: oe,
66
- header: I = {
66
+ header: x = {
67
67
  versionSelect: !1
68
68
  },
69
69
  exampleSrcRoot: le
70
70
  } = L, se = b({}, In);
71
71
  Cn(se, L.filterSwitch);
72
- const ae = $(null), Le = $(null), [ft, ht] = p(0), [x, Me] = p(), [o, ce] = p(), [ve, ut] = p([]), [Fe, Oe] = p(!1), [de, He] = p(0), [fe, Ue] = p(0), [h, we] = p(""), [Q, qe] = p(0), [gt, pt] = p(), [Ke, De] = p(!1), [We, mt] = p(!1), [$e, bt] = p(!0), [vt, yt] = p(!1), [O, je] = p([]), [v, U] = p([]), [he, j] = p(!1), [Y, ue] = p(!1), [M, V] = p(-1), [u, R] = p(), [St, Ge] = p(), [d, z] = p(), [l, T] = p({
72
+ const ce = $(null), Le = $(null), [ft, ht] = p(0), [k, Me] = p(), [o, ae] = p(), [ve, ut] = p([]), [Fe, Oe] = p(!1), [de, He] = p(0), [fe, Ue] = p(0), [h, we] = p(""), [Q, qe] = p(0), [gt, pt] = p(), [Ke, De] = p(!1), [We, mt] = p(!1), [$e, bt] = p(!0), [vt, yt] = p(!1), [O, je] = p([]), [v, U] = p([]), [he, j] = p(!1), [Y, ue] = p(!1), [M, V] = p(-1), [u, R] = p(), [St, Ge] = p(), [f, z] = p(), [l, T] = p({
73
73
  current: 0,
74
74
  pageSize: 100
75
75
  }), [W, Ne] = p([]), [G, Ct] = p(""), [It, xt] = p(!1), [Ze, _e] = p(), [ye, Re] = p(null), [H, Xe] = p(!1), [kt, Lt] = p(!1), [Dn, wt] = p(0), [Nn, Te] = p(""), [ee, Dt] = p(""), ge = $({}), Pe = $(!1), Se = $(0), Ce = $(0), Z = $(0), [P, Ve] = p(/* @__PURE__ */ new Set()), [Nt, Ie] = p(!1), Je = $(-1);
76
76
  _t(() => {
77
- const e = ae.current;
77
+ const e = ce.current;
78
78
  if (!e)
79
79
  return;
80
80
  let t = 0;
81
81
  const n = () => {
82
82
  cancelAnimationFrame(t), t = requestAnimationFrame(() => {
83
- const s = e.clientHeight, f = Math.max(1, Math.round(s));
84
- f !== Je.current && (Je.current = f, ht(f));
83
+ const s = e.clientHeight, d = Math.max(1, Math.round(s));
84
+ d !== Je.current && (Je.current = d, ht(d));
85
85
  });
86
86
  };
87
87
  n();
@@ -91,78 +91,78 @@ const ii = (L) => {
91
91
  return r == null || r.addEventListener("resize", n), window.addEventListener("resize", n), () => {
92
92
  cancelAnimationFrame(t), i == null || i.disconnect(), r == null || r.removeEventListener("resize", n), window.removeEventListener("resize", n);
93
93
  };
94
- }, [x]);
94
+ }, [k]);
95
95
  const te = () => {
96
96
  R(void 0), z(void 0), V(-1), j(!1), q(), setTimeout(() => {
97
- T((e) => y(b({}, e), {
97
+ T((e) => S(b({}, e), {
98
98
  current: 1,
99
99
  type: void 0
100
100
  }));
101
101
  }, 10);
102
102
  };
103
- fn("Esc", te), C(() => {
104
- c && g.cvforceDatahub.getS3Iam(c).then((e) => {
103
+ fn("Esc", te), I(() => {
104
+ a && g.cvforceDatahub.getS3Iam(a).then((e) => {
105
105
  pt(e);
106
106
  });
107
- }, [c]), C(() => {
107
+ }, [a]), I(() => {
108
108
  w();
109
- }, [o == null ? void 0 : o.id]), C(() => {
110
- c && (Oe(!0), Promise.all([
109
+ }, [o == null ? void 0 : o.id]), I(() => {
110
+ a && (Oe(!0), Promise.all([
111
111
  // 数据集
112
- g.cvforceDatahub.getDatasetsId(c).then((e) => {
112
+ g.cvforceDatahub.getDatasetsId(a).then((e) => {
113
113
  Me(e);
114
114
  }),
115
115
  // 版本列表
116
- g.cvforceDatahub.getDatasetsIdVersions(c, 1, 1e3).then((e) => {
117
- ut(e.recordList), ce(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
116
+ g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
117
+ ut(e.recordList), ae(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
118
118
  })
119
119
  ]).finally(() => Oe(!1)));
120
- }, [c, J]);
120
+ }, [a, J]);
121
121
  const Qe = () => {
122
- !c || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(c, o.id).then((e) => {
123
- ce(e), Ct(e.versionAsyncTask.state);
122
+ !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
123
+ ae(e), Ct(e.versionAsyncTask.state);
124
124
  });
125
125
  };
126
- C(() => {
126
+ I(() => {
127
127
  G !== re.Pending && G !== re.Started || D.warning("文件导入中,请刷新页面再试");
128
- }, [G]), C(() => {
129
- ce(void 0), T(y(b({}, l), {
128
+ }, [G]), I(() => {
129
+ ae(void 0), T(S(b({}, l), {
130
130
  current: 1
131
131
  })), U([]), Qe();
132
- }, [c, J]), C(() => {
133
- c && g.cvforceDatahub.getDatasetsId(c).then((e) => {
132
+ }, [a, J]), I(() => {
133
+ a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
134
134
  Me(e);
135
135
  });
136
- }, [c]), C(() => {
136
+ }, [a]), I(() => {
137
137
  Se.current++, Ce.current++, Z.current++;
138
- }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, h, W, ee]), C(() => {
138
+ }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, h, W, ee]), I(() => {
139
139
  q();
140
- }, [W, o, h]), C(() => {
141
- !o || !x || A(y(b({}, l), {
140
+ }, [W, o, h]), I(() => {
141
+ !o || !k || A(S(b({}, l), {
142
142
  current: 1
143
143
  })).then((e) => {
144
144
  });
145
- }, [x == null ? void 0 : x.id, o == null ? void 0 : o.id, W]), C(() => {
145
+ }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, W]), I(() => {
146
146
  if (Pe.current) {
147
147
  Pe.current = !1, w();
148
148
  return;
149
149
  }
150
150
  A().then((e) => {
151
151
  }), w();
152
- }, [l.current]), C(() => {
152
+ }, [l.current]), I(() => {
153
153
  H && w();
154
- }, [Ze]), C(() => {
154
+ }, [Ze]), I(() => {
155
155
  const e = ge.current[h];
156
156
  let t;
157
- e && e.page > 1 ? t = A(y(b({}, l), {
157
+ e && e.page > 1 ? t = A(S(b({}, l), {
158
158
  current: 1,
159
159
  pageSize: e.page * 100,
160
160
  // 假设默认pageSize为100
161
161
  total: void 0
162
- })).then((n) => (Pe.current = !0, T((i) => y(b({}, i), {
162
+ })).then((n) => (Pe.current = !0, T((i) => S(b({}, i), {
163
163
  current: e.page,
164
164
  pageSize: 100
165
- })), n)) : t = A(y(b({}, l), {
165
+ })), n)) : t = A(S(b({}, l), {
166
166
  current: 1,
167
167
  total: void 0
168
168
  })), t.then((n) => {
@@ -172,26 +172,26 @@ const ii = (L) => {
172
172
  V(s), R(n[s]), z(void 0);
173
173
  } else
174
174
  R(void 0), z(void 0), V(-1), q(), setTimeout(() => {
175
- T((i) => y(b({}, i), {
175
+ T((i) => S(b({}, i), {
176
176
  current: 1,
177
177
  type: void 0
178
178
  }));
179
179
  }, 10);
180
180
  });
181
- }, [h]), C(() => {
181
+ }, [h]), I(() => {
182
182
  var t;
183
183
  let e;
184
184
  if (!Y) {
185
185
  const n = u !== void 0, i = u == null ? void 0 : u.id, r = M;
186
186
  R(void 0), z(void 0), j(!1), V(-1), Ge(void 0), q(), n && ((t = Le.current) == null || t.fetchLabels()), w(), i !== void 0 && (e = requestAnimationFrame(() => {
187
187
  var F, X;
188
- const s = (F = ae.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
188
+ const s = (F = ce.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
189
189
  if (!s)
190
190
  return;
191
- const f = Array.from(s.querySelectorAll("[data-sample-id]")), S = (X = f.find((B) => B.dataset.sampleId === String(i))) != null ? X : r >= 0 ? f[r] : void 0;
192
- if (!S)
191
+ const d = Array.from(s.querySelectorAll("[data-sample-id]")), y = (X = d.find((B) => B.dataset.sampleId === String(i))) != null ? X : r >= 0 ? d[r] : void 0;
192
+ if (!y)
193
193
  return;
194
- const k = s.getBoundingClientRect(), E = S.getBoundingClientRect(), K = s.scrollTop + E.top - k.top - Math.max(0, (s.clientHeight - E.height) / 2);
194
+ const C = s.getBoundingClientRect(), E = y.getBoundingClientRect(), K = s.scrollTop + E.top - C.top - Math.max(0, (s.clientHeight - E.height) / 2);
195
195
  s.scrollTo({
196
196
  top: Math.max(0, K)
197
197
  });
@@ -209,25 +209,25 @@ const ii = (L) => {
209
209
  currentIndex: M,
210
210
  active: Y,
211
211
  loadedImageUrl: St
212
- }), C(() => {
212
+ }), I(() => {
213
213
  yt(!$e && We);
214
- }, [$e, We]), C(() => {
215
- if (!c) {
214
+ }, [$e, We]), I(() => {
215
+ if (!a) {
216
216
  ye && (clearTimeout(ye), Re(null)), _e(void 0);
217
217
  return;
218
218
  }
219
219
  Ae();
220
- }, [c, o == null ? void 0 : o.id]), C(() => {
220
+ }, [a, o == null ? void 0 : o.id]), I(() => {
221
221
  Ae();
222
- }, [It]), C(() => {
222
+ }, [It]), I(() => {
223
223
  ze();
224
- }, [H, c, o]), C(() => {
225
- A(y(b({}, l), {
224
+ }, [H, a, o]), I(() => {
225
+ A(S(b({}, l), {
226
226
  current: 1
227
227
  })), w();
228
- }, [ee]), C(() => {
228
+ }, [ee]), I(() => {
229
229
  Te("");
230
- }, [u]), C(() => {
230
+ }, [u]), I(() => {
231
231
  if (v.length === 0) {
232
232
  Ie(!1);
233
233
  return;
@@ -236,7 +236,7 @@ const ii = (L) => {
236
236
  Ie(e);
237
237
  }, [v, P]);
238
238
  const ze = () => {
239
- o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(c, o.id, {
239
+ o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
240
240
  pageNo: 1,
241
241
  pageSize: 1e3,
242
242
  confirmStatus: 1
@@ -244,7 +244,7 @@ const ii = (L) => {
244
244
  wt(e.recordList.length);
245
245
  });
246
246
  }, Ae = () => {
247
- !c || !o || g.cvforceDatahub.getPreLabelTask(c, o.id).then((e) => {
247
+ !a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
248
248
  const t = e[0];
249
249
  if (_e(t), ye && (clearTimeout(ye), Re(null)), !(t != null && t.state) || t.state !== ln.Started) {
250
250
  Xe(!1), w();
@@ -256,14 +256,14 @@ const ii = (L) => {
256
256
  }, 1e4));
257
257
  });
258
258
  };
259
- C(() => {
260
- x && x.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
261
- }, [x]);
259
+ I(() => {
260
+ k && k.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
261
+ }, [k]);
262
262
  const A = (e, t) => {
263
263
  const n = (e == null ? void 0 : e.current) || l.current, i = (e == null ? void 0 : e.pageSize) || l.pageSize;
264
- if (!c || !o || !n)
264
+ if (!a || !o || !n)
265
265
  return Promise.resolve(!1);
266
- const r = Se.current, s = W.map((k) => k.label), f = () => {
266
+ const r = Se.current, s = W.map((C) => C.label), d = () => {
267
267
  switch (h) {
268
268
  case "nocode":
269
269
  return "nocode";
@@ -274,7 +274,7 @@ const ii = (L) => {
274
274
  default:
275
275
  return s.length ? s : void 0;
276
276
  }
277
- }, S = () => {
277
+ }, y = () => {
278
278
  switch (h) {
279
279
  case "nocode":
280
280
  case "hascode":
@@ -285,49 +285,49 @@ const ii = (L) => {
285
285
  return 2;
286
286
  }
287
287
  };
288
- return n === 1 && Mt(), T(y(b({}, l), {
288
+ return n === 1 && Mt(), T(S(b({}, l), {
289
289
  current: n,
290
290
  pageSize: i
291
- })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(c, o.id, {
291
+ })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
292
292
  pageNo: n,
293
293
  pageSize: i,
294
- labels: f(),
295
- confirmStatus: S(),
294
+ labels: d(),
295
+ confirmStatus: y(),
296
296
  searchName: ee
297
- }).then((k) => {
297
+ }).then((C) => {
298
298
  if (r !== Se.current)
299
299
  return !1;
300
- const E = k.recordList || [], K = n === 1 ? E : [...t || v, ...E];
301
- if (U(K), T(y(b({}, l), {
300
+ const E = C.recordList || [], K = n === 1 ? E : [...t || v, ...E];
301
+ if (U(K), T(S(b({}, l), {
302
302
  current: n,
303
303
  pageSize: i,
304
- total: k.totalResults
304
+ total: C.totalResults
305
305
  })), l.type === "next" && E.length) {
306
306
  V(0);
307
- const F = k.recordList[0];
307
+ const F = C.recordList[0];
308
308
  R(F);
309
309
  }
310
310
  if (l.type === "prev" && E.length) {
311
311
  V(l.pageSize - 1);
312
- const F = k.recordList[l.pageSize - 1];
312
+ const F = C.recordList[l.pageSize - 1];
313
313
  R(F);
314
314
  }
315
315
  return he && M < 0 && (V(0), R(E[0]), ue(!0)), K;
316
316
  }).catch(() => !1);
317
317
  };
318
- C(() => {
319
- T(h === "nocode" ? y(b({}, l), {
318
+ I(() => {
319
+ T(h === "nocode" ? S(b({}, l), {
320
320
  total: de
321
- }) : h === "" ? y(b({}, l), {
321
+ }) : h === "" ? S(b({}, l), {
322
322
  total: Q
323
- }) : h === "pending" ? y(b({}, l), {
323
+ }) : h === "pending" ? S(b({}, l), {
324
324
  total: fe
325
- }) : y(b({}, l), {
325
+ }) : S(b({}, l), {
326
326
  total: Q - de - fe
327
327
  }));
328
328
  }, [de, Q, fe]);
329
329
  const w = () => {
330
- !c || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
330
+ !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
331
331
  label: "allcode",
332
332
  confirmStatus: 2,
333
333
  searchName: ee
@@ -336,21 +336,25 @@ const ii = (L) => {
336
336
  qe(t ? t.count : 0), He(n ? n.count : 0), Ue(i ? i.count : 0);
337
337
  });
338
338
  }, q = () => {
339
- if (!c || !(o != null && o.id))
339
+ if (!a || !(o != null && o.id))
340
340
  return;
341
341
  const e = Ce.current;
342
342
  let t = 2;
343
- return h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
343
+ return h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
344
344
  confirmStatus: t
345
345
  }).then((n) => {
346
346
  if (e !== Ce.current)
347
347
  return;
348
- const r = (n || []).filter((s) => s.label !== "nocode").map((s, f) => ({
349
- label: s.label,
350
- count: s.count,
351
- id: s.id,
352
- color: at[f % 40]
353
- }));
348
+ const r = (n || []).filter((s) => s.label !== "nocode").map((s, d) => {
349
+ var y;
350
+ return {
351
+ label: s.label,
352
+ count: s.count,
353
+ boxCount: (y = s.boxCount) != null ? y : 0,
354
+ id: s.id,
355
+ color: ct[d % 40]
356
+ };
357
+ });
354
358
  return je(r), n;
355
359
  });
356
360
  }, Tt = (e) => {
@@ -363,15 +367,15 @@ const ii = (L) => {
363
367
  page: l.current || 1
364
368
  });
365
369
  };
366
- C(() => {
370
+ I(() => {
367
371
  l.type || A();
368
- }, [l.type]), C(() => {
369
- if (!d)
372
+ }, [l.type]), I(() => {
373
+ if (!f)
370
374
  return;
371
375
  const e = [];
372
- d == null || d.labels.forEach((t) => {
376
+ f == null || f.labels.forEach((t) => {
373
377
  O != null && O.find((n) => n.id === t.id) && e.push(t);
374
- }), e.length !== d.labels.length && z(y(b({}, d), {
378
+ }), e.length !== f.labels.length && z(S(b({}, f), {
375
379
  labels: e
376
380
  }));
377
381
  }, [O]);
@@ -388,30 +392,30 @@ const ii = (L) => {
388
392
  const n = ++Z.current;
389
393
  if (!he) {
390
394
  U((i) => {
391
- var S;
395
+ var y;
392
396
  if (!Array.isArray(i) || !i.length)
393
397
  return te(), i;
394
- const r = M + 1, f = !!W.length ? i.length : (S = l.total) != null ? S : i.length;
395
- return r >= i.length ? r >= f ? D.error("已经是最后一个了") : A({
398
+ const r = M + 1, d = !!W.length ? i.length : (y = l.total) != null ? y : i.length;
399
+ return r >= i.length ? r >= d ? D.error("已经是最后一个了") : A({
396
400
  current: l.current + 1,
397
401
  pageSize: l.pageSize,
398
402
  type: "next"
399
- }, i).then((k) => {
400
- Array.isArray(k) && _(k, r, l.current + 1, n);
403
+ }, i).then((C) => {
404
+ Array.isArray(C) && _(C, r, l.current + 1, n);
401
405
  }) : _(i, r, l.current || 1, n), i;
402
406
  });
403
407
  return;
404
408
  }
405
- return xe(e, t).then((i) => (i && n === Z.current && (console.log("action", t, "changedSample", d), w(), U((r) => {
406
- var f, S;
409
+ return xe(e, t).then((i) => (i && n === Z.current && (console.log("action", t, "changedSample", f), w(), U((r) => {
410
+ var d, y;
407
411
  let s;
408
412
  if (Array.isArray(r)) {
409
413
  if (!r.length)
410
414
  return te(), r;
411
- const k = h === "", E = (!((f = d == null ? void 0 : d.labels) != null && f.length) || !d) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((S = d == null ? void 0 : d.labels) == null ? void 0 : S.length) || !d) && h === "hascode", X = k || K || F || E ? M + 1 : M;
412
- if (d) {
413
- if (d.labels.length && h === "nocode" || !d.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
414
- const B = r.findIndex((Ee) => Ee.id === d.id);
415
+ const C = h === "", E = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && h === "hascode", X = C || K || F || E ? M + 1 : M;
416
+ if (f) {
417
+ if (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
418
+ const B = r.findIndex((Ee) => Ee.id === f.id);
415
419
  B > -1 && (r.splice(B, 1), s = [...r], l.total && (l.total = l.total - 1));
416
420
  }
417
421
  } else if (t === "CONFIRM" && h === "pending") {
@@ -465,9 +469,9 @@ const ii = (L) => {
465
469
  type: "prev"
466
470
  });
467
471
  else {
468
- if (d && (d.labels.length && h === "nocode" || !d.labels.length && h === "hascode")) {
469
- const f = i.findIndex((S) => S.id === d.id);
470
- f > -1 && (i.splice(f, 1), r = [...i], l.total && (l.total = l.total - 1));
472
+ if (f && (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode")) {
473
+ const d = i.findIndex((y) => y.id === f.id);
474
+ d > -1 && (i.splice(d, 1), r = [...i], l.total && (l.total = l.total - 1));
471
475
  }
472
476
  _(i, s, l.current || 1, t);
473
477
  }
@@ -479,15 +483,15 @@ const ii = (L) => {
479
483
  const t = Object.keys(e.labels.reduce((n, i) => (n[i.label] ? ++n[i.label] : n[i.label] = 1, n), {})).length;
480
484
  return t >= 2 ? `+${t - 1}` : null;
481
485
  }, zt = (e) => {
482
- var k, E;
486
+ var C, E;
483
487
  const {
484
488
  scrollTop: t,
485
489
  scrollHeight: n,
486
490
  clientHeight: i
487
- } = e.currentTarget, r = n - t - i, s = 3, f = (k = l.pageSize) != null ? k : 100, S = (E = l.current) != null ? E : 0;
488
- S >= 1 && v.length > 0 && v.length < S * f || (!l.total || l.total > v.length) && r <= s && T((K) => {
491
+ } = e.currentTarget, r = n - t - i, s = 3, d = (C = l.pageSize) != null ? C : 100, y = (E = l.current) != null ? E : 0;
492
+ y >= 1 && v.length > 0 && v.length < y * d || (!l.total || l.total > v.length) && r <= s && T((K) => {
489
493
  var F;
490
- return y(b({}, K), {
494
+ return S(b({}, K), {
491
495
  current: ((F = K.current) != null ? F : 0) + 1
492
496
  });
493
497
  });
@@ -495,43 +499,43 @@ const ii = (L) => {
495
499
  var n, i;
496
500
  if (!o)
497
501
  return Promise.resolve(!1);
498
- if (d && !H) {
499
- const r = y(b({}, d), {
500
- labels: d.labels ? [...d.labels] : []
502
+ if (f && !H) {
503
+ const r = S(b({}, f), {
504
+ labels: f.labels ? [...f.labels] : []
501
505
  });
502
- return r.labels && (r.labels = r.labels.filter((s) => !!s.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(c, o.id, [r], e).then(() => {
506
+ return r.labels && (r.labels = r.labels.filter((s) => !!s.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [r], e).then(() => {
503
507
  D.success({
504
508
  content: "保存成功"
505
509
  });
506
- const s = y(b({}, r), {
510
+ const s = S(b({}, r), {
507
511
  labels: r.labels ? [...r.labels] : []
508
512
  });
509
- return U((f) => {
510
- const S = f.findIndex((k) => k.id === (s == null ? void 0 : s.id));
511
- if (S > -1) {
512
- const k = [...f];
513
- return k[S] = s, k;
513
+ return U((d) => {
514
+ const y = d.findIndex((C) => C.id === (s == null ? void 0 : s.id));
515
+ if (y > -1) {
516
+ const C = [...d];
517
+ return C[y] = s, C;
514
518
  }
515
- return f;
519
+ return d;
516
520
  }), R(s), z(s), !0;
517
521
  }).catch(() => !1);
518
522
  } else
519
- return !d && !H && u ? t !== "CONFIRM" && h === "pending" || h === "nocode" || h === "hascode" || h === "" && (u.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (u.labels && (u.labels = u.labels.filter((r) => !!r.id)), e !== void 0 && (u.confirmStatus = e, u.isLabeled = ((i = u.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(c, o.id, [u], e).then(() => (D.success({
523
+ return !f && !H && u ? t !== "CONFIRM" && h === "pending" || h === "nocode" || h === "hascode" || h === "" && (u.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (u.labels && (u.labels = u.labels.filter((r) => !!r.id)), e !== void 0 && (u.confirmStatus = e, u.isLabeled = ((i = u.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(a, o.id, [u], e).then(() => (D.success({
520
524
  content: "保存成功"
521
525
  }), U((r) => {
522
- const s = r.findIndex((f) => f.id === (u == null ? void 0 : u.id));
526
+ const s = r.findIndex((d) => d.id === (u == null ? void 0 : u.id));
523
527
  return s > -1 && (r[s] = u), [...r];
524
528
  }), R(b({}, u)), !0)).catch(() => !1)) : Promise.resolve(!0);
525
529
  }, At = (e, t) => {
526
- if (d && d.labels.some((n) => !n.id))
530
+ if (f && f.labels.some((n) => !n.id))
527
531
  return D.error("所有标注需设置标签"), Promise.resolve(!1);
528
532
  Ye(e, t);
529
533
  }, Et = (e) => {
530
- if (d && d.labels.some((t) => !t.id)) {
534
+ if (f && f.labels.some((t) => !t.id)) {
531
535
  D.error("所有标注需设置标签");
532
536
  return;
533
537
  }
534
- if (!d) {
538
+ if (!f) {
535
539
  j(!1);
536
540
  return;
537
541
  }
@@ -543,14 +547,14 @@ const ii = (L) => {
543
547
  title: "确认要删除当前数据吗?",
544
548
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
545
549
  onOk: () => {
546
- !u || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(c, o.id, u.id).then(() => {
550
+ !u || !o || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, o.id, u.id).then(() => {
547
551
  const e = v.findIndex((n) => n.id === u.id);
548
552
  v.splice(e, 1);
549
553
  const t = v.length;
550
- U([...v]), T(y(b({}, l), {
554
+ U([...v]), T(S(b({}, l), {
551
555
  total: l.total ? l.total - 1 : 0
552
556
  })), e <= v.length - 1 ? R(v[e]) : (R(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (R(void 0), z(void 0), V(-1), he || ue(!1), setTimeout(() => {
553
- T((n) => y(b({}, n), {
557
+ T((n) => S(b({}, n), {
554
558
  current: 1,
555
559
  type: void 0
556
560
  }));
@@ -576,7 +580,7 @@ const ii = (L) => {
576
580
  children: null
577
581
  }], Mt = () => {
578
582
  var e, t;
579
- (t = (e = ae.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
583
+ (t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
580
584
  top: 0
581
585
  });
582
586
  }, Ft = (e) => {
@@ -585,9 +589,9 @@ const ii = (L) => {
585
589
  Se.current++, Ce.current++, Z.current++, M >= 0 && h !== void 0 && h !== null && (ge.current[h] = {
586
590
  index: M,
587
591
  page: l.current || 1
588
- }), ne(), d ? xe(d == null ? void 0 : d.confirmStatus).then((t) => {
592
+ }), ne(), f ? xe(f == null ? void 0 : f.confirmStatus).then((t) => {
589
593
  t ? (we(e), w()) : D.error("保存失败");
590
- }) : (T(y(b({}, l), {
594
+ }) : (T(S(b({}, l), {
591
595
  current: 1,
592
596
  total: void 0
593
597
  })), we(e)), e === "nocode" && Ne([]);
@@ -598,8 +602,8 @@ const ii = (L) => {
598
602
  title: "一键保存所有标注?",
599
603
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
600
604
  onOk: () => {
601
- g.cvforceDatahub.getAllConfirmSamples(c, o.id).then((e) => {
602
- D.success("保存成功"), A(y(b({}, l), {
605
+ g.cvforceDatahub.getAllConfirmSamples(a, o.id).then((e) => {
606
+ D.success("保存成功"), A(S(b({}, l), {
603
607
  current: 1
604
608
  })), w();
605
609
  });
@@ -632,7 +636,7 @@ const ii = (L) => {
632
636
  return;
633
637
  }
634
638
  const e = nt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
635
- children: [/* @__PURE__ */ a("p", {
639
+ children: [/* @__PURE__ */ c("p", {
636
640
  style: {
637
641
  marginBottom: 16
638
642
  },
@@ -647,7 +651,7 @@ const ii = (L) => {
647
651
  alignItems: "center",
648
652
  marginBottom: 4
649
653
  },
650
- children: [/* @__PURE__ */ a("span", {
654
+ children: [/* @__PURE__ */ c("span", {
651
655
  style: {
652
656
  display: "inline-block",
653
657
  padding: "2px 8px",
@@ -667,7 +671,7 @@ const ii = (L) => {
667
671
  alignItems: "center",
668
672
  marginBottom: 4
669
673
  },
670
- children: [/* @__PURE__ */ a("span", {
674
+ children: [/* @__PURE__ */ c("span", {
671
675
  style: {
672
676
  display: "inline-block",
673
677
  padding: "2px 8px",
@@ -687,7 +691,7 @@ const ii = (L) => {
687
691
  alignItems: "center",
688
692
  marginBottom: 4
689
693
  },
690
- children: [/* @__PURE__ */ a("span", {
694
+ children: [/* @__PURE__ */ c("span", {
691
695
  style: {
692
696
  display: "inline-block",
693
697
  padding: "2px 8px",
@@ -702,7 +706,7 @@ const ii = (L) => {
702
706
  children: [e.hascode, "张"]
703
707
  })]
704
708
  })]
705
- }), /* @__PURE__ */ a("p", {
709
+ }), /* @__PURE__ */ c("p", {
706
710
  style: {
707
711
  color: "red"
708
712
  },
@@ -724,10 +728,10 @@ const ii = (L) => {
724
728
  return;
725
729
  }
726
730
  try {
727
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(c, o.id, s), D.success("删除成功"), ne(), A(y(b({}, l), {
731
+ yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), ne(), A(S(b({}, l), {
728
732
  current: 1
729
733
  })), w(), q();
730
- } catch (f) {
734
+ } catch (d) {
731
735
  D.error("删除失败");
732
736
  }
733
737
  })
@@ -738,7 +742,7 @@ const ii = (L) => {
738
742
  return;
739
743
  }
740
744
  const e = nt(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ m("div", {
741
- children: [/* @__PURE__ */ a("p", {
745
+ children: [/* @__PURE__ */ c("p", {
742
746
  style: {
743
747
  marginBottom: 16
744
748
  },
@@ -753,7 +757,7 @@ const ii = (L) => {
753
757
  alignItems: "center",
754
758
  marginBottom: 4
755
759
  },
756
- children: [/* @__PURE__ */ a("span", {
760
+ children: [/* @__PURE__ */ c("span", {
757
761
  style: {
758
762
  display: "inline-block",
759
763
  padding: "2px 8px",
@@ -773,7 +777,7 @@ const ii = (L) => {
773
777
  alignItems: "center",
774
778
  marginBottom: 4
775
779
  },
776
- children: [/* @__PURE__ */ a("span", {
780
+ children: [/* @__PURE__ */ c("span", {
777
781
  style: {
778
782
  display: "inline-block",
779
783
  padding: "2px 8px",
@@ -793,7 +797,7 @@ const ii = (L) => {
793
797
  alignItems: "center",
794
798
  marginBottom: 4
795
799
  },
796
- children: [/* @__PURE__ */ a("span", {
800
+ children: [/* @__PURE__ */ c("span", {
797
801
  style: {
798
802
  display: "inline-block",
799
803
  padding: "2px 8px",
@@ -808,7 +812,7 @@ const ii = (L) => {
808
812
  children: [e.hascode, "张"]
809
813
  })]
810
814
  })]
811
- }), /* @__PURE__ */ a("p", {
815
+ }), /* @__PURE__ */ c("p", {
812
816
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
813
817
  })]
814
818
  });
@@ -821,31 +825,31 @@ const ii = (L) => {
821
825
  onOk: () => Be(void 0, null, function* () {
822
826
  if (!o)
823
827
  return;
824
- const s = v.filter((f) => P.has(f.id));
828
+ const s = v.filter((d) => P.has(d.id));
825
829
  if (s.length === 0) {
826
830
  D.warning("没有选中的图片");
827
831
  return;
828
832
  }
829
833
  try {
830
- const f = s.map((S) => y(b({}, S), {
834
+ const d = s.map((y) => S(b({}, y), {
831
835
  labels: [],
832
836
  confirmStatus: 0,
833
837
  isLabeled: !1
834
838
  }));
835
- yield g.cvforceDatahub.updateSamples(c, o.id, f, 0), D.success("清除标注成功"), ne(), A(y(b({}, l), {
839
+ yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ne(), A(S(b({}, l), {
836
840
  current: 1
837
841
  })), w(), q();
838
- } catch (f) {
842
+ } catch (d) {
839
843
  D.error("清除标注失败");
840
844
  }
841
845
  })
842
846
  });
843
847
  };
844
- return /* @__PURE__ */ a(Jt, {
848
+ return /* @__PURE__ */ c(Jt, {
845
849
  locale: sn,
846
- children: /* @__PURE__ */ a(an.Provider, {
850
+ children: /* @__PURE__ */ c(cn.Provider, {
847
851
  value: {
848
- datasetId: c,
852
+ datasetId: a,
849
853
  versionId: (o == null ? void 0 : o.id) || "",
850
854
  no: (o == null ? void 0 : o.no) || "",
851
855
  loading: Fe,
@@ -859,14 +863,14 @@ const ii = (L) => {
859
863
  datasetManager: N,
860
864
  annotation: oe,
861
865
  filterSwitch: se,
862
- header: I,
866
+ header: x,
863
867
  exampleSrcRoot: le
864
868
  }
865
869
  },
866
- children: x ? x.markType === "detection" ? /* @__PURE__ */ a("div", {
870
+ children: k ? k.markType === "detection" ? /* @__PURE__ */ c("div", {
867
871
  className: "detection-version-detail",
868
- children: kt ? o != null && o.id && N && N.preLabel ? /* @__PURE__ */ a(hn, {
869
- datasetId: c,
872
+ children: kt ? o != null && o.id && N && N.preLabel ? /* @__PURE__ */ c(hn, {
873
+ datasetId: a,
870
874
  versionId: o.id,
871
875
  onClose: () => {
872
876
  Lt(!1), ze(), q(), w(), A();
@@ -876,19 +880,19 @@ const ii = (L) => {
876
880
  fetchLength: ze
877
881
  }) : null : /* @__PURE__ */ m(gn, {
878
882
  className: "product-details-page",
879
- header: I === !1 ? void 0 : /* @__PURE__ */ a(mn, {
883
+ header: x === !1 ? void 0 : /* @__PURE__ */ c(mn, {
880
884
  backTo: me,
881
- onBackClick: I != null && I.onBackClick ? () => {
882
- u && te(), I.onBackClick && I.onBackClick();
885
+ onBackClick: x != null && x.onBackClick ? () => {
886
+ u && te(), x.onBackClick && x.onBackClick();
883
887
  } : void 0,
884
888
  left: !Fe && /* @__PURE__ */ m(pe, {
885
- children: [/* @__PURE__ */ a("span", {
889
+ children: [/* @__PURE__ */ c("span", {
886
890
  style: {
887
891
  fontWeight: "bold"
888
892
  },
889
- children: x == null ? void 0 : x.name
890
- }), /* @__PURE__ */ a(Qt, {
891
- disabled: (I == null ? void 0 : I.versionSelect) === !1,
893
+ children: k == null ? void 0 : k.name
894
+ }), /* @__PURE__ */ c(Qt, {
895
+ disabled: (x == null ? void 0 : x.versionSelect) === !1,
892
896
  value: o == null ? void 0 : o.id,
893
897
  style: {
894
898
  width: 70
@@ -899,31 +903,31 @@ const ii = (L) => {
899
903
  })),
900
904
  onChange: (e) => {
901
905
  const t = ve.find((i) => i.id === e);
902
- if (!x || !t)
906
+ if (!k || !t)
903
907
  return;
904
908
  const n = ve.find((i) => i.id === t.id);
905
- ce(n), ne(), I != null && I.onVersionChange && I.onVersionChange(n);
909
+ ae(n), ne(), x != null && x.onVersionChange && x.onVersionChange(n);
906
910
  }
907
911
  })]
908
912
  }),
909
913
  right: /* @__PURE__ */ m(pe, {
910
- children: [!u && N && N.add && /* @__PURE__ */ a(ct, {
914
+ children: [!u && N && N.add && /* @__PURE__ */ c(at, {
911
915
  isPreLabel: H,
912
916
  placement: "bottom",
913
- children: /* @__PURE__ */ a(ie, {
917
+ children: /* @__PURE__ */ c(ie, {
914
918
  type: "default",
915
919
  onClick: () => De(!0),
916
920
  disabled: G === re.Pending || G === re.Started || H,
917
921
  children: "导入数据"
918
922
  }, "del")
919
- }), /* @__PURE__ */ a(lt, {
923
+ }), /* @__PURE__ */ c(lt, {
920
924
  menu: {
921
925
  items: [{
922
926
  key: "manual",
923
- label: /* @__PURE__ */ a(ct, {
927
+ label: /* @__PURE__ */ c(at, {
924
928
  isPreLabel: H,
925
- children: /* @__PURE__ */ a(pe, {
926
- children: N && N.label && /* @__PURE__ */ a(ie, {
929
+ children: /* @__PURE__ */ c(pe, {
930
+ children: N && N.label && /* @__PURE__ */ c(ie, {
927
931
  type: "text",
928
932
  disabled: H,
929
933
  onClick: () => {
@@ -935,9 +939,9 @@ const ii = (L) => {
935
939
  })
936
940
  }, !u && N && N.preLabel && (o != null && o.id) ? {
937
941
  key: "auto",
938
- label: /* @__PURE__ */ a(Sn, {
942
+ label: /* @__PURE__ */ c(Sn, {
939
943
  buttonType: "text",
940
- datasetId: c,
944
+ datasetId: a,
941
945
  versionId: o.id,
942
946
  disabled: !v.length,
943
947
  setIsTaskChange: xt,
@@ -949,17 +953,17 @@ const ii = (L) => {
949
953
  placement: "bottom",
950
954
  children: /* @__PURE__ */ m(ie, {
951
955
  type: "primary",
952
- children: ["开始标注", /* @__PURE__ */ a(dt, {})]
956
+ children: ["开始标注", /* @__PURE__ */ c(dt, {})]
953
957
  })
954
- }), /* @__PURE__ */ a(yn, {
958
+ }), /* @__PURE__ */ c(yn, {
955
959
  when: vt,
956
960
  content: "确认要离开此页面吗?",
957
961
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
958
- }), Ke && /* @__PURE__ */ a(pn, {
962
+ }), Ke && /* @__PURE__ */ c(pn, {
959
963
  datasetIam: gt,
960
- datasetId: c,
964
+ datasetId: a,
961
965
  currentVersion: o,
962
- tenCode: x == null ? void 0 : x.tenantCode,
966
+ tenCode: k == null ? void 0 : k.tenantCode,
963
967
  isVisible: Ke,
964
968
  setIsVisible: De,
965
969
  getVersionListRequest: w,
@@ -969,35 +973,35 @@ const ii = (L) => {
969
973
  },
970
974
  tableReload: () => {
971
975
  var e, t, n;
972
- o != null && o.id && ((t = (e = ae.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
976
+ o != null && o.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
973
977
  top: 0
974
- }), A(y(b({}, l), {
978
+ }), A(S(b({}, l), {
975
979
  current: 1
976
980
  })), (n = Le.current) == null || n.fetchLabels());
977
981
  },
978
982
  loadVersionData: Qe,
979
- markType: x.markType
983
+ markType: k.markType
980
984
  })]
981
985
  })
982
986
  }),
983
987
  children: [/* @__PURE__ */ m("div", {
984
988
  className: "detection-header",
985
989
  children: [/* @__PURE__ */ m(pe, {
986
- children: [se.tabs && /* @__PURE__ */ a(Yt, {
990
+ children: [se.tabs && /* @__PURE__ */ c(Yt, {
987
991
  className: "header-tab",
988
992
  activeKey: h,
989
993
  items: et,
990
994
  onChange: tt
991
- }), !u && se.search && /* @__PURE__ */ a(vn, {
995
+ }), !u && se.search && /* @__PURE__ */ c(vn, {
992
996
  placeholder: "请输入图片名称搜索",
993
997
  style: {
994
998
  width: 200
995
999
  },
996
- suffix: /* @__PURE__ */ a(un, {}),
1000
+ suffix: /* @__PURE__ */ c(un, {}),
997
1001
  value: ee,
998
1002
  onChange: Ft,
999
1003
  allowClear: !0
1000
- }), !u && /* @__PURE__ */ a(lt, {
1004
+ }), !u && /* @__PURE__ */ c(lt, {
1001
1005
  menu: {
1002
1006
  items: [{
1003
1007
  key: "deleteWithAnnotations",
@@ -1013,10 +1017,10 @@ const ii = (L) => {
1013
1017
  children: /* @__PURE__ */ m(ie, {
1014
1018
  size: "middle",
1015
1019
  disabled: P.size === 0,
1016
- children: ["删除", /* @__PURE__ */ a(dt, {})]
1020
+ children: ["删除", /* @__PURE__ */ c(dt, {})]
1017
1021
  })
1018
1022
  }), !u && /* @__PURE__ */ m(ot, {
1019
- children: [/* @__PURE__ */ a(st, {
1023
+ children: [/* @__PURE__ */ c(st, {
1020
1024
  checked: Nt,
1021
1025
  onChange: (e) => Ut(e.target.checked),
1022
1026
  children: "选择当前页"
@@ -1027,8 +1031,8 @@ const ii = (L) => {
1027
1031
  children: ["已选中", P.size, "张,共", l.total || 0, "张"]
1028
1032
  })]
1029
1033
  })]
1030
- }), /* @__PURE__ */ a(pe, {
1031
- children: h === "pending" && /* @__PURE__ */ a(ie, {
1034
+ }), /* @__PURE__ */ c(pe, {
1035
+ children: h === "pending" && /* @__PURE__ */ c(ie, {
1032
1036
  type: "primary",
1033
1037
  className: "pending-confirm-button",
1034
1038
  onClick: Ot,
@@ -1039,12 +1043,12 @@ const ii = (L) => {
1039
1043
  className: "d-row",
1040
1044
  children: [/* @__PURE__ */ m("div", {
1041
1045
  className: "d-right",
1042
- ref: ae,
1043
- children: [Y && /* @__PURE__ */ a(kn, {
1044
- datasetId: c,
1046
+ ref: ce,
1047
+ children: [Y && /* @__PURE__ */ c(kn, {
1048
+ datasetId: a,
1045
1049
  isImageDetailVisible: Y,
1046
1050
  setIsImageDetailVisible: ue,
1047
- currentSample: d != null ? d : u,
1051
+ currentSample: f != null ? f : u,
1048
1052
  labels: O,
1049
1053
  previewMode: !he,
1050
1054
  filterItems: et,
@@ -1064,16 +1068,16 @@ const ii = (L) => {
1064
1068
  var e;
1065
1069
  (e = q()) == null || e.then((t) => {
1066
1070
  var n, i;
1067
- if (d) {
1071
+ if (f) {
1068
1072
  const r = [];
1069
- (n = d.labels) == null || n.forEach((s) => {
1070
- t != null && t.find((f) => f.id === s.id) && r.push(s);
1071
- }), d.labels = r, z(b({}, d));
1073
+ (n = f.labels) == null || n.forEach((s) => {
1074
+ t != null && t.find((d) => d.id === s.id) && r.push(s);
1075
+ }), f.labels = r, z(b({}, f));
1072
1076
  }
1073
1077
  if (u) {
1074
1078
  const r = [];
1075
1079
  (i = u.labels) == null || i.forEach((s) => {
1076
- t != null && t.find((f) => f.id === s.id) && r.push(s);
1080
+ t != null && t.find((d) => d.id === s.id) && r.push(s);
1077
1081
  }), u.labels = r, R(b({}, u));
1078
1082
  }
1079
1083
  }), w();
@@ -1086,8 +1090,8 @@ const ii = (L) => {
1086
1090
  settingHide: !be,
1087
1091
  canLabel: !!(N && N.label),
1088
1092
  canDelete: !!(N && N.delete)
1089
- }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ a(ot, {
1090
- children: /* @__PURE__ */ a(on, {
1093
+ }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(ot, {
1094
+ children: /* @__PURE__ */ c(on, {
1091
1095
  innerProps: {
1092
1096
  className: "d-right-row"
1093
1097
  },
@@ -1097,41 +1101,41 @@ const ii = (L) => {
1097
1101
  onScroll: zt,
1098
1102
  children: (e, t) => {
1099
1103
  var n;
1100
- return /* @__PURE__ */ a(en, {
1104
+ return /* @__PURE__ */ c(en, {
1101
1105
  className: "d-right-col",
1102
1106
  "data-sample-id": e.id,
1103
1107
  children: /* @__PURE__ */ m("div", {
1104
1108
  className: "right-col-wrapper",
1105
1109
  onMouseEnter: () => Te(e.id),
1106
1110
  onMouseLeave: () => Te(""),
1107
- children: [/* @__PURE__ */ a("div", {
1111
+ children: [/* @__PURE__ */ c("div", {
1108
1112
  className: "detection-status-wrapper",
1109
- children: /* @__PURE__ */ a(xn, {
1113
+ children: /* @__PURE__ */ c(xn, {
1110
1114
  sample: e
1111
1115
  })
1112
- }), /* @__PURE__ */ a("div", {
1116
+ }), /* @__PURE__ */ c("div", {
1113
1117
  className: "sample-checkbox-wrapper",
1114
- children: /* @__PURE__ */ a(st, {
1118
+ children: /* @__PURE__ */ c(st, {
1115
1119
  checked: P.has(e.id),
1116
1120
  onChange: (i) => {
1117
1121
  i.stopPropagation(), Ht(e.id, i.target.checked);
1118
1122
  },
1119
1123
  onClick: (i) => i.stopPropagation()
1120
1124
  })
1121
- }), /* @__PURE__ */ a("div", {
1125
+ }), /* @__PURE__ */ c("div", {
1122
1126
  className: "right-col-img",
1123
1127
  onClick: () => Tt(t),
1124
- children: /* @__PURE__ */ a(bn, {
1128
+ children: /* @__PURE__ */ c(bn, {
1125
1129
  fileKey: e.fileKey,
1126
1130
  width: 124,
1127
1131
  thumbnailUrl: e.thumbnailUrl
1128
1132
  })
1129
1133
  }), /* @__PURE__ */ m("div", {
1130
1134
  className: "right-col-text",
1131
- children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ a(tn, {
1135
+ children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(tn, {
1132
1136
  placement: "top",
1133
- title: /* @__PURE__ */ a("div", {
1134
- children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ a("div", {
1137
+ title: /* @__PURE__ */ c("div", {
1138
+ children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ c("div", {
1135
1139
  children: i
1136
1140
  }, i))
1137
1141
  }),
@@ -1140,7 +1144,7 @@ const ii = (L) => {
1140
1144
  width: "100%",
1141
1145
  display: "flex"
1142
1146
  },
1143
- children: [/* @__PURE__ */ a("span", {
1147
+ children: [/* @__PURE__ */ c("span", {
1144
1148
  style: {
1145
1149
  display: "inline-block",
1146
1150
  maxWidth: "calc(100% - 25px)",
@@ -1149,7 +1153,7 @@ const ii = (L) => {
1149
1153
  whiteSpace: "nowrap"
1150
1154
  },
1151
1155
  children: e.labels[0].label
1152
- }), e.labels.length > 1 ? /* @__PURE__ */ a("span", {
1156
+ }), e.labels.length > 1 ? /* @__PURE__ */ c("span", {
1153
1157
  style: {
1154
1158
  color: "rgba(0,0,0,0.45)",
1155
1159
  marginLeft: 5
@@ -1157,13 +1161,13 @@ const ii = (L) => {
1157
1161
  children: Vt(e)
1158
1162
  }) : null]
1159
1163
  })
1160
- }) : /* @__PURE__ */ a("span", {
1164
+ }) : /* @__PURE__ */ c("span", {
1161
1165
  style: {
1162
1166
  color: "rgba(0,0,0,0.45)",
1163
1167
  width: "100%"
1164
1168
  },
1165
1169
  children: "无标签"
1166
- }), /* @__PURE__ */ a("div", {
1170
+ }), /* @__PURE__ */ c("div", {
1167
1171
  children: t + 1
1168
1172
  })]
1169
1173
  })]
@@ -1171,12 +1175,12 @@ const ii = (L) => {
1171
1175
  }, e.id);
1172
1176
  }
1173
1177
  })
1174
- }) : /* @__PURE__ */ a("div", {
1178
+ }) : /* @__PURE__ */ c("div", {
1175
1179
  className: "empty",
1176
- children: l.total === 0 ? /* @__PURE__ */ a(nn, {
1177
- image: cn,
1180
+ children: l.total === 0 ? /* @__PURE__ */ c(nn, {
1181
+ image: an,
1178
1182
  description: /* @__PURE__ */ m("span", {
1179
- children: ["暂无数据", h !== "hascode" && !ee && /* @__PURE__ */ a("span", {
1183
+ children: ["暂无数据", h !== "hascode" && !ee && /* @__PURE__ */ c("span", {
1180
1184
  children: N && N.add && /* @__PURE__ */ m(ie, {
1181
1185
  type: "link",
1182
1186
  size: "small",
@@ -1185,7 +1189,7 @@ const ii = (L) => {
1185
1189
  },
1186
1190
  onClick: () => De(!0),
1187
1191
  disabled: G === re.Pending || G === re.Started,
1188
- children: [/* @__PURE__ */ a("span", {
1192
+ children: [/* @__PURE__ */ c("span", {
1189
1193
  style: {
1190
1194
  color: "black"
1191
1195
  },
@@ -1194,14 +1198,15 @@ const ii = (L) => {
1194
1198
  })
1195
1199
  })]
1196
1200
  })
1197
- }) : /* @__PURE__ */ a(rn, {})
1201
+ }) : /* @__PURE__ */ c(rn, {})
1198
1202
  })]
1199
- }), h !== "nocode" && se.labels && /* @__PURE__ */ a("div", {
1203
+ }), h !== "nocode" && se.labels && /* @__PURE__ */ c("div", {
1200
1204
  className: "d-sider",
1201
- children: /* @__PURE__ */ a(dn, {
1205
+ children: /* @__PURE__ */ c(dn, {
1202
1206
  ref: Le,
1203
- datasetId: c,
1207
+ datasetId: a,
1204
1208
  data: O || [],
1209
+ showStatColumns: !0,
1205
1210
  selected: W,
1206
1211
  onSelectedChange: (e) => {
1207
1212
  ne(), Ne((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
@@ -1210,15 +1215,19 @@ const ii = (L) => {
1210
1215
  if (!o)
1211
1216
  return;
1212
1217
  let t = 2;
1213
- h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(c, o.id, {
1218
+ h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
1214
1219
  confirmStatus: t
1215
1220
  }).then((n) => {
1216
- const r = (n || []).filter((f) => f.label !== "nocode").map((f, S) => ({
1217
- label: f.label,
1218
- count: f.count,
1219
- id: f.id,
1220
- color: at[S % 40]
1221
- })), s = W.filter((f) => r.some((S) => S.id === f.id));
1221
+ const r = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
1222
+ var C;
1223
+ return {
1224
+ label: d.label,
1225
+ count: d.count,
1226
+ boxCount: (C = d.boxCount) != null ? C : 0,
1227
+ id: d.id,
1228
+ color: ct[y % 40]
1229
+ };
1230
+ }), s = W.filter((d) => r.some((y) => y.id === d.id));
1222
1231
  je(r), W.length !== s.length && Ne(s);
1223
1232
  }), w();
1224
1233
  },
@@ -1227,7 +1236,7 @@ const ii = (L) => {
1227
1236
  })]
1228
1237
  })]
1229
1238
  })
1230
- }) : /* @__PURE__ */ a("div", {
1239
+ }) : /* @__PURE__ */ c("div", {
1231
1240
  style: {
1232
1241
  color: "red",
1233
1242
  textAlign: "center"