@glodon-aiot/dataset-annotation 3.22.2-alpha.2 → 3.22.2-alpha.4

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