@glodon-aiot/dataset-annotation 3.13.0-alpha.27 → 3.13.0-alpha.29

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,345 +1,345 @@
1
- var ut = Object.defineProperty, gt = Object.defineProperties;
2
- var mt = Object.getOwnPropertyDescriptors;
3
- var ze = Object.getOwnPropertySymbols;
4
- var pt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable;
5
- var Me = (V, f, o) => f in V ? ut(V, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : V[f] = o, p = (V, f) => {
1
+ var ft = Object.defineProperty, ht = Object.defineProperties;
2
+ var ut = Object.getOwnPropertyDescriptors;
3
+ var Ae = Object.getOwnPropertySymbols;
4
+ var gt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable;
5
+ var Ee = (N, f, o) => f in N ? ft(N, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : N[f] = o, g = (N, f) => {
6
6
  for (var o in f || (f = {}))
7
- pt.call(f, o) && Me(V, o, f[o]);
8
- if (ze)
9
- for (var o of ze(f))
10
- bt.call(f, o) && Me(V, o, f[o]);
11
- return V;
12
- }, I = (V, f) => gt(V, mt(f));
13
- import { jsx as s, jsxs as T, Fragment as Re } from "react/jsx-runtime";
14
- import { useRef as vt, useState as c, useEffect as h } from "react";
15
- import { message as M, ConfigProvider as St, Space as ie, Select as Ct, Button as ne, Tabs as yt, Col as It, Tooltip as Lt, Empty as Dt, Spin as kt, Modal as xt } from "antd";
16
- import Tt from "rc-virtual-list";
17
- import { UploadZipsStatus as $, PreLabelTaskStatus as Vt } from "@glodon-aiot/apis";
18
- import Nt from "antd/es/locale/zh_CN";
19
- import Pt from "../../DatasetContext/index.mjs";
20
- import wt from "./icon_item_empty.svg.mjs";
7
+ gt.call(f, o) && Ee(N, o, f[o]);
8
+ if (Ae)
9
+ for (var o of Ae(f))
10
+ mt.call(f, o) && Ee(N, o, f[o]);
11
+ return N;
12
+ }, S = (N, f) => ht(N, ut(f));
13
+ import { jsx as s, jsxs as V, Fragment as ze } from "react/jsx-runtime";
14
+ import { useRef as pt, useState as d, useEffect as u } from "react";
15
+ import { message as z, ConfigProvider as bt, Space as te, Select as vt, Button as ie, Tabs as St, Col as Ct, Tooltip as yt, Empty as It, Spin as Lt, Modal as Dt } from "antd";
16
+ import kt from "rc-virtual-list";
17
+ import { UploadZipsStatus as K, PreLabelTaskStatus as Tt } from "@glodon-aiot/apis";
18
+ import xt from "antd/es/locale/zh_CN";
19
+ import Vt from "../../DatasetContext/index.mjs";
20
+ import Nt from "./icon_item_empty.svg.mjs";
21
21
  import "./style.less.mjs";
22
- import { tagColors as Be } from "../../utils/index.mjs";
23
- import At from "./components/Labels/index.mjs";
24
- import { useKeyPress as Et } from "ahooks";
25
- import Oe from "./components/DisabledTooltip/index.mjs";
26
- import zt from "./PreSamplesPage/index.mjs";
27
- import { SearchOutlined as Mt } from "@ant-design/icons";
28
- import Rt from "../../Common/Page/index.mjs";
29
- import Bt from "../PicZipImportModal/index.mjs";
30
- import Ot from "../PageNav/index.mjs";
31
- import Ft from "../Thumbnail/index.mjs";
32
- import Ht from "../CompositionInput/index.mjs";
33
- import { Prompt as Kt } from "../hooks/Prompt.mjs";
34
- import Ut from "../PreLabelOCR/index.mjs";
35
- import jt from "lodash/merge";
36
- import { DEFAULT_FILTER_SWITCH as Zt } from "../../constant.mjs";
37
- import $t from "./components/ImageModal/index.mjs";
38
- const Si = (V) => {
39
- var Ae;
22
+ import { tagColors as Me } from "../../utils/index.mjs";
23
+ import Pt from "./components/Labels/index.mjs";
24
+ import { useKeyPress as wt } from "ahooks";
25
+ import Fe from "./components/DisabledTooltip/index.mjs";
26
+ import At from "./PreSamplesPage/index.mjs";
27
+ import { SearchOutlined as Et } from "@ant-design/icons";
28
+ import zt from "../../Common/Page/index.mjs";
29
+ import Mt from "../PicZipImportModal/index.mjs";
30
+ import Ft from "../PageNav/index.mjs";
31
+ import Rt from "../Thumbnail/index.mjs";
32
+ import Bt from "../CompositionInput/index.mjs";
33
+ import { Prompt as Ot } from "../hooks/Prompt.mjs";
34
+ import Ht from "../PreLabelOCR/index.mjs";
35
+ import Kt from "lodash/merge";
36
+ import { DEFAULT_FILTER_SWITCH as Ut } from "../../constant.mjs";
37
+ import jt from "./components/ImageModal/index.mjs";
38
+ const bi = (N) => {
39
+ var Pe;
40
40
  const {
41
41
  services: f,
42
42
  datasetId: o,
43
- versionId: Q,
44
- backTo: Fe,
45
- labelManager: ge = !1,
46
- datasetManager: C = !1,
47
- annotation: He,
48
- header: L = {
43
+ versionId: X,
44
+ backTo: Re,
45
+ labelManager: he = !1,
46
+ datasetManager: D = !1,
47
+ annotation: Be,
48
+ header: k = {
49
49
  versionSelect: !1
50
50
  },
51
- exampleSrcRoot: Ke
52
- } = V, W = p({}, Zt);
53
- jt(W, V.filterSwitch);
54
- const q = vt(null), [v, me] = c(), [i, _] = c(), [X, Ue] = c([]), [pe, be] = c(!1), [H, ve] = c(0), [y, re] = c(""), [K, Se] = c(0), [je, Ze] = c(), [Ce, oe] = c(!1), [ye, $e] = c(!1), [Ie, We] = c(!0), [qe, _e] = c(!1), [P, Le] = c([]), [m, z] = c([]), [R, B] = c(!1), [le, Y] = c(!1), [O, S] = c(-1), [g, b] = c(), [a, D] = c(), [U, j] = c(!1), [n, N] = c({
51
+ exampleSrcRoot: Oe
52
+ } = N, U = g({}, Ut);
53
+ Kt(U, N.filterSwitch);
54
+ const j = pt(null), [C, ue] = d(), [i, Z] = d(), [Y, He] = d([]), [ge, me] = d(!1), [$, pe] = d(0), [y, ne] = d(""), [B, be] = d(0), [Ke, Ue] = d(), [ve, re] = d(!1), [Se, je] = d(!1), [Ce, Ze] = d(!0), [$e, We] = d(!1), [P, ye] = d([]), [p, E] = d([]), [W, q] = d(!1), [_, G] = d(!1), [M, b] = d(-1), [v, m] = d(), [c, I] = d(), [r, x] = d({
55
55
  current: 0,
56
56
  pageSize: 100
57
- }), [Z, se] = c([]), [F, Ge] = c(""), [Je, Qe] = c(!1), [De, ke] = c(), [ee, ae] = c(null), [w, xe] = c(!1), [Xe, Te] = c(!1), [Ye, et] = c(0), [Wt, ce] = c(""), [G, tt] = c(""), [it, nt] = c(), A = () => {
58
- b(void 0), D(void 0), S(-1), B(!1), j(!1), te(), setTimeout(() => {
59
- N((e) => I(p({}, e), {
57
+ }), [F, oe] = d([]), [R, qe] = d(""), [_e, Ge] = d(!1), [Ie, Le] = d(), [ee, le] = d(null), [w, De] = d(!1), [Je, ke] = d(!1), [Qe, Xe] = d(0), [Zt, se] = d(""), [J, Ye] = d(""), [et, tt] = d(), O = () => {
58
+ m(void 0), I(void 0), b(-1), q(!1), H(), setTimeout(() => {
59
+ x((e) => S(g({}, e), {
60
60
  current: 1,
61
61
  type: void 0
62
62
  }));
63
63
  }, 10);
64
64
  };
65
- Et("Esc", A), h(() => {
65
+ wt("Esc", O), u(() => {
66
66
  o && f.cvforceDatahub.getS3Iam(o).then((e) => {
67
- Ze(e);
67
+ Ue(e);
68
68
  });
69
- }, [o]), h(() => {
70
- f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => nt(e));
71
- }, [f.cvforceDatahub]), h(() => {
72
- x();
73
- }, [i == null ? void 0 : i.id]), h(() => {
74
- o && (be(!0), Promise.all([
69
+ }, [o]), u(() => {
70
+ f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => tt(e));
71
+ }, [f.cvforceDatahub]), u(() => {
72
+ T();
73
+ }, [i == null ? void 0 : i.id]), u(() => {
74
+ o && (me(!0), Promise.all([
75
75
  // 数据集
76
76
  f.cvforceDatahub.getDatasetsId(o).then((e) => {
77
- me(e);
77
+ ue(e);
78
78
  }),
79
79
  // 版本列表
80
80
  f.cvforceDatahub.getDatasetsIdVersions(o, 1, 1e3).then((e) => {
81
- Ue(e.recordList), _(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
81
+ He(e.recordList), Z(X ? e.recordList.find((t) => t.id === X) : e.recordList[0]);
82
82
  })
83
- ]).finally(() => be(!1)));
84
- }, [o, Q]);
85
- const Ve = () => {
83
+ ]).finally(() => me(!1)));
84
+ }, [o, X]);
85
+ const Te = () => {
86
86
  !o || !i || f.cvforceDatahub.getDatasetsIdVersionsVid(o, i.id).then((e) => {
87
- _(e), Ge(e.versionAsyncTask.state);
87
+ Z(e), qe(e.versionAsyncTask.state);
88
88
  });
89
89
  };
90
- h(() => {
91
- F !== $.Pending && F !== $.Started || M.warning("文件导入中,请刷新页面再试");
92
- }, [F]), h(() => {
93
- _(void 0), N(I(p({}, n), {
90
+ u(() => {
91
+ R !== K.Pending && R !== K.Started || z.warning("文件导入中,请刷新页面再试");
92
+ }, [R]), u(() => {
93
+ Z(void 0), x(S(g({}, r), {
94
94
  current: 1
95
- })), z([]), Ve();
96
- }, [o, Q]), h(() => {
95
+ })), E([]), Te();
96
+ }, [o, X]), u(() => {
97
97
  o && f.cvforceDatahub.getDatasetsId(o).then((e) => {
98
- me(e);
98
+ ue(e);
99
99
  });
100
- }, [o]), h(() => {
101
- te();
102
- }, [Z, i]), h(() => {
103
- !i || !v || E(I(p({}, n), {
100
+ }, [o]), u(() => {
101
+ H();
102
+ }, [F, i]), u(() => {
103
+ !i || !C || A(S(g({}, r), {
104
104
  current: 1
105
105
  })).then((e) => {
106
106
  });
107
- }, [v == null ? void 0 : v.id, i == null ? void 0 : i.id, Z]), h(() => {
108
- E().then((e) => {
109
- }), x();
110
- }, [n.current]), h(() => {
111
- w && x();
112
- }, [De]), h(() => {
113
- E(I(p({}, n), {
107
+ }, [C == null ? void 0 : C.id, i == null ? void 0 : i.id, F]), u(() => {
108
+ A().then((e) => {
109
+ }), T();
110
+ }, [r.current]), u(() => {
111
+ w && T();
112
+ }, [Ie]), u(() => {
113
+ A(S(g({}, r), {
114
114
  current: 1,
115
115
  total: void 0
116
116
  })).then((e) => {
117
- e && g && (Array.isArray(e) && e.length ? (S(0), b(e[0]), D(void 0)) : A());
117
+ e && (!v && !_ || (Array.isArray(e) && e.length ? (b(0), m(e[0]), I(void 0)) : (m(void 0), I(void 0), b(-1), H(), setTimeout(() => {
118
+ x((t) => S(g({}, t), {
119
+ current: 1,
120
+ type: void 0
121
+ }));
122
+ }, 10))));
118
123
  });
119
- }, [y]), h(() => {
120
- le || (b(void 0), D(void 0), j(!1), B(!1), S(-1));
121
- }, [le]), h(() => {
122
- !R && g && !U && B(!0);
123
- }, [g, U]), h(() => {
124
- !m.length && R && A();
125
- }, [m.length, R]), h(() => {
126
- R && j(!1);
127
- }, [R]), h(() => {
128
- _e(!Ie && ye);
129
- }, [Ie, ye]), h(() => {
124
+ }, [y]), u(() => {
125
+ _ || (m(void 0), I(void 0), q(!1), b(-1), H(), T());
126
+ }, [_]), u(() => {
127
+ We(!Ce && Se);
128
+ }, [Ce, Se]), u(() => {
130
129
  if (!o) {
131
- ee && (clearTimeout(ee), ae(null)), ke(void 0);
130
+ ee && (clearTimeout(ee), le(null)), Le(void 0);
132
131
  return;
133
132
  }
134
- fe();
135
- }, [o, i == null ? void 0 : i.id]), h(() => {
136
- fe();
137
- }, [Je]), h(() => {
138
- de();
139
- }, [w, o, i]), h(() => {
140
- E(I(p({}, n), {
133
+ ae();
134
+ }, [o, i == null ? void 0 : i.id]), u(() => {
135
+ ae();
136
+ }, [_e]), u(() => {
137
+ ce();
138
+ }, [w, o, i]), u(() => {
139
+ A(S(g({}, r), {
141
140
  current: 1
142
- })), x();
143
- }, [G]), h(() => {
144
- ce("");
145
- }, [g]);
146
- const de = () => {
141
+ })), T();
142
+ }, [J]), u(() => {
143
+ se("");
144
+ }, [v]);
145
+ const ce = () => {
147
146
  i && f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
148
147
  pageNo: 1,
149
148
  pageSize: 1e3,
150
149
  confirmStatus: 1
151
150
  }).then((e) => {
152
- et(e.recordList.length);
151
+ Xe(e.recordList.length);
153
152
  });
154
- }, fe = () => {
153
+ }, ae = () => {
155
154
  !o || !i || f.cvforceDatahub.getPreLabelTask(o, i.id).then((e) => {
156
155
  const t = e[0];
157
- if (ke(t), ee && (clearTimeout(ee), ae(null)), !(t != null && t.state) || t.state !== Vt.Started) {
158
- xe(!1), x();
156
+ if (Le(t), ee && (clearTimeout(ee), le(null)), !(t != null && t.state) || t.state !== Tt.Started) {
157
+ De(!1), T();
159
158
  return;
160
159
  } else
161
- xe(!0);
162
- ae(setTimeout(() => {
163
- fe();
160
+ De(!0);
161
+ le(setTimeout(() => {
162
+ ae();
164
163
  }, 1e4));
165
164
  });
166
165
  };
167
- h(() => {
168
- v && v.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
169
- }, [v]);
170
- const E = (e, t) => {
171
- const l = (e == null ? void 0 : e.current) || n.current, r = (e == null ? void 0 : e.pageSize) || n.pageSize;
166
+ u(() => {
167
+ C && C.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
168
+ }, [C]);
169
+ const A = (e, t) => {
170
+ const l = (e == null ? void 0 : e.current) || r.current, n = (e == null ? void 0 : e.pageSize) || r.pageSize;
172
171
  if (!o || !i || !l)
173
172
  return Promise.resolve(!1);
174
- const d = Z.map((k) => k.label), u = () => {
173
+ const a = F.map((L) => L.label), h = () => {
175
174
  switch (y) {
176
175
  case "nocode":
177
176
  return "nocode";
178
177
  case "hascode":
179
- return d.length ? d : "hascode";
178
+ return a.length ? a : "hascode";
180
179
  default:
181
- return d.length ? d : void 0;
180
+ return a.length ? a : void 0;
182
181
  }
183
182
  };
184
- return l === 1 && dt(), N(I(p({}, n), {
183
+ return l === 1 && ct(), x(S(g({}, r), {
185
184
  current: l,
186
- pageSize: r
185
+ pageSize: n
187
186
  })), f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
188
187
  pageNo: l,
189
- pageSize: r,
190
- labels: u(),
191
- searchName: G
192
- }).then((k) => {
193
- const J = k.recordList || [], Ee = l === 1 ? J : [...t || m, ...J];
194
- if (z(Ee), N(I(p({}, n), {
188
+ pageSize: n,
189
+ labels: h(),
190
+ searchName: J
191
+ }).then((L) => {
192
+ const Q = L.recordList || [], we = l === 1 ? Q : [...t || p, ...Q];
193
+ if (E(we), x(S(g({}, r), {
195
194
  current: l,
196
- pageSize: r,
197
- total: k.totalResults
198
- })), n.type === "next" && J.length) {
199
- S(0);
200
- const ue = k.recordList[0];
201
- b(ue);
195
+ pageSize: n,
196
+ total: L.totalResults
197
+ })), r.type === "next" && Q.length) {
198
+ b(0);
199
+ const fe = L.recordList[0];
200
+ m(fe);
202
201
  }
203
- if (n.type === "prev" && J.length) {
204
- S(n.pageSize - 1);
205
- const ue = k.recordList[n.pageSize - 1];
206
- b(ue);
202
+ if (r.type === "prev" && Q.length) {
203
+ b(r.pageSize - 1);
204
+ const fe = L.recordList[r.pageSize - 1];
205
+ m(fe);
207
206
  }
208
- return R && O < 0 && (S(0), b(J[0]), Y(!0)), Ee;
207
+ return W && M < 0 && (b(0), m(Q[0]), G(!0)), we;
209
208
  }).catch(() => !1);
210
209
  };
211
- h(() => {
212
- N(y === "nocode" ? I(p({}, n), {
213
- total: H
214
- }) : y === "" ? I(p({}, n), {
215
- total: K
216
- }) : I(p({}, n), {
217
- total: K - H
210
+ u(() => {
211
+ x(y === "nocode" ? S(g({}, r), {
212
+ total: $
213
+ }) : y === "" ? S(g({}, r), {
214
+ total: B
215
+ }) : S(g({}, r), {
216
+ total: B - $
218
217
  }));
219
- }, [H, K]);
220
- const x = () => {
218
+ }, [$, B]);
219
+ const T = () => {
221
220
  !o || !i || f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id, {
222
221
  label: "allcode",
223
- searchName: G
222
+ searchName: J
224
223
  }).then((e) => {
225
- const t = e.find((r) => r.id === "allcodeid"), l = e.find((r) => r.id === "nocodeid");
226
- Se(t ? t.count : 0), ve(l ? l.count : 0);
224
+ const t = e.find((n) => n.id === "allcodeid"), l = e.find((n) => n.id === "nocodeid");
225
+ be(t ? t.count : 0), pe(l ? l.count : 0);
227
226
  });
228
- }, te = () => {
227
+ }, H = () => {
229
228
  if (!(!o || !(i != null && i.id)))
230
229
  return f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((e) => {
231
- const l = (e || []).filter((r) => r.label !== "nocode").map((r, d) => ({
232
- label: r.label,
233
- count: r.count,
234
- id: r.id,
235
- color: Be[d % 40]
230
+ const l = (e || []).filter((n) => n.label !== "nocode").map((n, a) => ({
231
+ label: n.label,
232
+ count: n.count,
233
+ id: n.id,
234
+ color: Me[a % 40]
236
235
  }));
237
- return Le(l), e;
236
+ return ye(l), e;
238
237
  });
239
- }, rt = (e) => {
240
- if (!m)
238
+ }, it = (e) => {
239
+ if (!p)
241
240
  return;
242
- j(!0), B(!1), S(e);
243
- const t = m[e];
244
- b(t), D(void 0), Y(!0);
241
+ q(!1), b(e);
242
+ const t = p[e];
243
+ m(t), I(void 0), G(!0);
245
244
  };
246
- h(() => {
247
- n.type || E();
248
- }, [n.type]), h(() => {
249
- if (!a)
245
+ u(() => {
246
+ r.type || A();
247
+ }, [r.type]), u(() => {
248
+ if (!c)
250
249
  return;
251
250
  const e = [];
252
- a == null || a.labels.forEach((t) => {
251
+ c == null || c.labels.forEach((t) => {
253
252
  P != null && P.find((l) => l.id === t.id) && e.push(t);
254
- }), a.labels = e, D(a);
253
+ }), c.labels = e, I(c);
255
254
  }, [P]);
256
- const Ne = () => {
257
- if (m) {
258
- if (U) {
259
- z((e) => {
255
+ const xe = () => {
256
+ if (p) {
257
+ if (!W) {
258
+ E((e) => {
259
+ var a;
260
260
  if (!Array.isArray(e) || !e.length)
261
- return A(), e;
262
- const t = O + 1;
263
- return t >= e.length ? n.total && t >= n.total ? M.error("已经是最后一个了") : E({
264
- current: n.current + 1,
265
- pageSize: n.pageSize,
261
+ return O(), e;
262
+ const t = M + 1, n = !!F.length ? e.length : (a = r.total) != null ? a : e.length;
263
+ return t >= e.length ? t >= n ? z.error("已经是最后一个了") : A({
264
+ current: r.current + 1,
265
+ pageSize: r.pageSize,
266
266
  type: "next"
267
- }, e).then((l) => {
268
- S(t);
269
- const r = l[t];
270
- b(r), D(void 0);
267
+ }, e).then((h) => {
268
+ b(t);
269
+ const L = h[t];
270
+ m(L), I(void 0);
271
271
  }) : setTimeout(() => {
272
- S(t);
273
- const l = e[t];
274
- b(l), D(void 0);
272
+ b(t);
273
+ const h = e[t];
274
+ m(h), I(void 0);
275
275
  }, 200), e;
276
276
  });
277
277
  return;
278
278
  }
279
- return he().then((e) => (e && (x(), z((t) => {
279
+ return de().then((e) => (e && (T(), E((t) => {
280
280
  let l;
281
281
  if (Array.isArray(t)) {
282
282
  if (!t.length)
283
- return A(), t;
284
- const r = !a || a.labels.length && y === "hascode" || !a.labels.length && y === "nocode" || y === "" ? O + 1 : O;
285
- if (a && (a.labels.length && y === "nocode" || !a.labels.length && y === "hascode")) {
286
- const d = t.findIndex((u) => u.id === a.id);
287
- d > -1 && (t.splice(d, 1), l = [...t], n.total && (n.total = n.total - 1));
283
+ return O(), t;
284
+ const n = !c || c.labels.length && y === "hascode" || !c.labels.length && y === "nocode" || y === "" ? M + 1 : M;
285
+ if (c && (c.labels.length && y === "nocode" || !c.labels.length && y === "hascode")) {
286
+ const a = t.findIndex((h) => h.id === c.id);
287
+ a > -1 && (t.splice(a, 1), l = [...t], r.total && (r.total = r.total - 1));
288
288
  }
289
- r >= t.length ? n.total && r >= n.total ? M.error("已经是最后一个了") : E({
290
- current: n.current + 1,
291
- pageSize: n.pageSize,
289
+ n >= t.length ? r.total && n >= r.total ? z.error("已经是最后一个了") : A({
290
+ current: r.current + 1,
291
+ pageSize: r.pageSize,
292
292
  type: "next"
293
- }, t).then((d) => {
294
- S(r);
295
- const u = d[r];
296
- b(u), D(void 0);
293
+ }, t).then((a) => {
294
+ b(n);
295
+ const h = a[n];
296
+ m(h), I(void 0);
297
297
  }) : setTimeout(() => {
298
- S(r);
299
- const d = t[r];
300
- b(d), D(void 0);
298
+ b(n);
299
+ const a = t[n];
300
+ m(a), I(void 0);
301
301
  }, 200);
302
302
  }
303
303
  return l || t;
304
304
  })), e));
305
305
  }
306
- }, ot = () => {
307
- if (m) {
308
- if (U) {
309
- z((e) => {
306
+ }, nt = () => {
307
+ if (p) {
308
+ if (!W) {
309
+ E((e) => {
310
310
  if (!Array.isArray(e) || !e.length)
311
- return A(), e;
312
- const t = O - 1;
313
- return t < 0 ? M.error("已经是第一个了") : setTimeout(() => {
314
- S(t);
311
+ return O(), e;
312
+ const t = M - 1;
313
+ return t < 0 ? z.error("已经是第一个了") : setTimeout(() => {
314
+ b(t);
315
315
  const l = e[t];
316
- b(l), D(void 0);
316
+ m(l), I(void 0);
317
317
  }, 200), e;
318
318
  });
319
319
  return;
320
320
  }
321
- he().then((e) => {
322
- e && (x(), z((t) => {
321
+ de().then((e) => {
322
+ e && (T(), E((t) => {
323
323
  let l;
324
324
  if (Array.isArray(t)) {
325
325
  if (!t.length)
326
- return A(), t;
327
- const r = O - 1;
328
- if (r < 0)
329
- r < 0 ? M.error("已经是第一个了") : N({
330
- current: n.current - 1,
331
- pageSize: n.pageSize,
326
+ return O(), t;
327
+ const n = M - 1;
328
+ if (n < 0)
329
+ n < 0 ? z.error("已经是第一个了") : x({
330
+ current: r.current - 1,
331
+ pageSize: r.pageSize,
332
332
  type: "prev"
333
333
  });
334
334
  else {
335
- if (a && (a.labels.length && y === "nocode" || !a.labels.length && y === "hascode")) {
336
- const d = t.findIndex((u) => u.id === a.id);
337
- d > -1 && (t.splice(d, 1), l = [...t], n.total && (n.total = n.total - 1));
335
+ if (c && (c.labels.length && y === "nocode" || !c.labels.length && y === "hascode")) {
336
+ const a = t.findIndex((h) => h.id === c.id);
337
+ a > -1 && (t.splice(a, 1), l = [...t], r.total && (r.total = r.total - 1));
338
338
  }
339
339
  setTimeout(() => {
340
- S(r);
341
- const d = t[r];
342
- b(d), D(void 0);
340
+ b(n);
341
+ const a = t[n];
342
+ m(a), I(void 0);
343
343
  }, 200);
344
344
  }
345
345
  }
@@ -347,294 +347,300 @@ const Si = (V) => {
347
347
  }));
348
348
  });
349
349
  }
350
- }, lt = (e) => {
351
- const t = Object.keys(e.labels.reduce((l, r) => (l[r.label] ? ++l[r.label] : l[r.label] = 1, l), {})).length;
350
+ }, rt = (e) => {
351
+ const t = Object.keys(e.labels.reduce((l, n) => (l[n.label] ? ++l[n.label] : l[n.label] = 1, l), {})).length;
352
352
  return t >= 2 ? `+${t - 1}` : null;
353
- }, st = (e) => {
353
+ }, ot = (e) => {
354
354
  var t;
355
- (!n.total || n.total > m.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = q.current) == null ? void 0 : t.clientHeight) && N(I(p({}, n), {
356
- current: n.current + 1
355
+ (!r.total || r.total > p.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = j.current) == null ? void 0 : t.clientHeight) && x(S(g({}, r), {
356
+ current: r.current + 1
357
357
  }));
358
- }, he = () => i ? a && !w ? (a.labels && (a.labels = a.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [a], 0).then(() => (M.success({
358
+ }, de = () => i ? c && !w ? (c.labels && (c.labels = c.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [c], 0).then(() => (z.success({
359
359
  content: "保存成功"
360
- }), z((e) => {
361
- const t = e.findIndex((l) => l.id === (a == null ? void 0 : a.id));
362
- return t > -1 && (e[t] = a), [...e];
363
- }), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), at = () => {
364
- if (a && a.labels.some((e) => !e.id))
365
- return M.error("所有标注需设置标签"), Promise.resolve(!1);
366
- Ne();
367
- }, ct = () => {
368
- xt.confirm({
360
+ }), E((e) => {
361
+ const t = e.findIndex((l) => l.id === (c == null ? void 0 : c.id));
362
+ return t > -1 && (e[t] = c), [...e];
363
+ }), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), lt = () => {
364
+ if (c && c.labels.some((e) => !e.id))
365
+ return z.error("所有标注需设置标签"), Promise.resolve(!1);
366
+ xe();
367
+ }, st = () => {
368
+ Dt.confirm({
369
369
  title: "确认要删除当前数据吗?",
370
370
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
371
371
  onOk: () => {
372
- !g || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, g.id).then(() => {
373
- const e = m.findIndex((t) => t.id === g.id);
374
- m.splice(e, 1), z([...m]), N(I(p({}, n), {
375
- total: n.total ? n.total - 1 : 0
376
- })), e <= m.length - 1 ? b(m[e]) : (b(m[e - 1]), S(e - 1)), x(), D(void 0), n.total && n.total - 1 === 0 && A();
372
+ !v || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, v.id).then(() => {
373
+ const e = p.findIndex((l) => l.id === v.id);
374
+ p.splice(e, 1);
375
+ const t = p.length;
376
+ E([...p]), x(S(g({}, r), {
377
+ total: r.total ? r.total - 1 : 0
378
+ })), e <= p.length - 1 ? m(p[e]) : (m(p[e - 1]), b(e - 1)), T(), I(void 0), (t === 0 || r.total && r.total - 1 === 0) && (m(void 0), I(void 0), b(-1), W || G(!1), setTimeout(() => {
379
+ x((l) => S(g({}, l), {
380
+ current: 1,
381
+ type: void 0
382
+ }));
383
+ }, 10));
377
384
  });
378
385
  }
379
386
  });
380
- }, Pe = [{
387
+ }, Ve = [{
381
388
  key: "",
382
- label: `全部(${K})`,
389
+ label: `全部(${B})`,
383
390
  children: null
384
391
  }, {
385
392
  key: "nocode",
386
- label: `未标注(${H})`,
393
+ label: `未标注(${$})`,
387
394
  children: null
388
395
  }, {
389
396
  key: "hascode",
390
- label: `已标注(${K - H})`,
397
+ label: `已标注(${B - $})`,
391
398
  children: null
392
- }], dt = () => {
399
+ }], ct = () => {
393
400
  var e, t;
394
- (t = (e = q.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
401
+ (t = (e = j.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
395
402
  top: 0
396
403
  });
397
- }, ft = () => {
398
- Te(!0);
399
- }, ht = (e) => {
400
- tt(e);
401
- }, we = (e) => {
402
- a ? (he().then((t) => {
403
- t ? (re(e), x()) : M.error("保存失败");
404
- }), B(!1)) : (N(I(p({}, n), {
404
+ }, at = () => {
405
+ ke(!0);
406
+ }, dt = (e) => {
407
+ Ye(e);
408
+ }, Ne = (e) => {
409
+ c ? de().then((t) => {
410
+ t ? (ne(e), T()) : z.error("保存失败");
411
+ }) : (x(S(g({}, r), {
405
412
  current: 1,
406
413
  total: void 0
407
- })), re(e)), e === "nocode" && se([]);
414
+ })), ne(e)), e === "nocode" && oe([]);
408
415
  };
409
- return /* @__PURE__ */ s(St, {
410
- locale: Nt,
411
- children: /* @__PURE__ */ s(Pt.Provider, {
416
+ return /* @__PURE__ */ s(bt, {
417
+ locale: xt,
418
+ children: /* @__PURE__ */ s(Vt.Provider, {
412
419
  value: {
413
420
  datasetId: o,
414
421
  versionId: (i == null ? void 0 : i.id) || "",
415
422
  no: (i == null ? void 0 : i.no) || "",
416
- loading: pe,
423
+ loading: ge,
417
424
  version: i,
418
- versions: X,
419
- samples: m,
420
- pagination: n,
425
+ versions: Y,
426
+ samples: p,
427
+ pagination: r,
421
428
  services: f,
422
429
  featuresConfig: {
423
- labelManager: ge,
424
- datasetManager: C,
425
- annotation: He,
426
- filterSwitch: W,
427
- header: L,
428
- exampleSrcRoot: Ke
430
+ labelManager: he,
431
+ datasetManager: D,
432
+ annotation: Be,
433
+ filterSwitch: U,
434
+ header: k,
435
+ exampleSrcRoot: Oe
429
436
  }
430
437
  },
431
- children: v ? v.markType === "detection" ? /* @__PURE__ */ s("div", {
438
+ children: C ? C.markType === "detection" ? /* @__PURE__ */ s("div", {
432
439
  className: "detection-version-detail",
433
- children: Xe ? i != null && i.id && C && C.preLabel ? /* @__PURE__ */ s(zt, {
440
+ children: Je ? i != null && i.id && D && D.preLabel ? /* @__PURE__ */ s(At, {
434
441
  datasetId: o,
435
442
  versionId: i.id,
436
443
  onClose: () => {
437
- Te(!1), de(), te(), x(), E();
444
+ ke(!1), ce(), H(), T(), A();
438
445
  },
439
- samples: m,
446
+ samples: p,
440
447
  labels: P,
441
- fetchLength: de
442
- }) : null : /* @__PURE__ */ T(Rt, {
448
+ fetchLength: ce
449
+ }) : null : /* @__PURE__ */ V(zt, {
443
450
  className: "product-details-page",
444
- header: L === !1 ? void 0 : /* @__PURE__ */ s(Ot, {
445
- backTo: Fe,
446
- onBackClick: L != null && L.onBackClick ? () => {
447
- g && A(), L.onBackClick && L.onBackClick();
451
+ header: k === !1 ? void 0 : /* @__PURE__ */ s(Ft, {
452
+ backTo: Re,
453
+ onBackClick: k != null && k.onBackClick ? () => {
454
+ v && O(), k.onBackClick && k.onBackClick();
448
455
  } : void 0,
449
- left: !pe && /* @__PURE__ */ T(ie, {
456
+ left: !ge && /* @__PURE__ */ V(te, {
450
457
  children: [/* @__PURE__ */ s("span", {
451
458
  style: {
452
459
  fontWeight: "bold"
453
460
  },
454
- children: v == null ? void 0 : v.name
455
- }), /* @__PURE__ */ s(Ct, {
456
- disabled: (L == null ? void 0 : L.versionSelect) === !1,
461
+ children: C == null ? void 0 : C.name
462
+ }), /* @__PURE__ */ s(vt, {
463
+ disabled: (k == null ? void 0 : k.versionSelect) === !1,
457
464
  value: i == null ? void 0 : i.id,
458
465
  style: {
459
466
  width: 70
460
467
  },
461
- options: X.map((e) => ({
468
+ options: Y.map((e) => ({
462
469
  label: e.no,
463
470
  value: e.id
464
471
  })),
465
472
  onChange: (e) => {
466
- const t = X.find((r) => r.id === e);
467
- if (!v || !t)
473
+ const t = Y.find((n) => n.id === e);
474
+ if (!C || !t)
468
475
  return;
469
- const l = X.find((r) => r.id === t.id);
470
- _(l), L != null && L.onVersionChange && L.onVersionChange(l);
476
+ const l = Y.find((n) => n.id === t.id);
477
+ Z(l), k != null && k.onVersionChange && k.onVersionChange(l);
471
478
  }
472
479
  })]
473
480
  }),
474
- right: /* @__PURE__ */ T(ie, {
475
- children: [!g && C && C.add && /* @__PURE__ */ s(Oe, {
481
+ right: /* @__PURE__ */ V(te, {
482
+ children: [!v && D && D.add && /* @__PURE__ */ s(Fe, {
476
483
  isPreLabel: w,
477
484
  placement: "bottom",
478
- children: /* @__PURE__ */ s(ne, {
485
+ children: /* @__PURE__ */ s(ie, {
479
486
  type: "default",
480
- onClick: () => oe(!0),
481
- disabled: F === $.Pending || F === $.Started || w,
487
+ onClick: () => re(!0),
488
+ disabled: R === K.Pending || R === K.Started || w,
482
489
  children: "导入数据"
483
490
  }, "del")
484
- }), !g && C && C.preLabel && (i != null && i.id) ? /* @__PURE__ */ T(Re, {
485
- children: [/* @__PURE__ */ s(Ut, {
491
+ }), !v && D && D.preLabel && (i != null && i.id) ? /* @__PURE__ */ V(ze, {
492
+ children: [/* @__PURE__ */ s(Ht, {
486
493
  datasetId: o,
487
494
  versionId: i.id,
488
- disabled: !m.length,
489
- setIsTaskChange: Qe,
495
+ disabled: !p.length,
496
+ setIsTaskChange: Ge,
490
497
  datasetType: "detection",
491
- preLabelTask: De
492
- }), /* @__PURE__ */ s(ne, {
493
- disabled: w || !Ye,
494
- onClick: ft,
498
+ preLabelTask: Ie
499
+ }), /* @__PURE__ */ s(ie, {
500
+ disabled: w || !Qe,
501
+ onClick: at,
495
502
  children: "待确认标注"
496
503
  })]
497
- }) : null, /* @__PURE__ */ s(Kt, {
498
- when: qe,
504
+ }) : null, /* @__PURE__ */ s(Ot, {
505
+ when: $e,
499
506
  content: "确认要离开此页面吗?",
500
507
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
501
- }), Ce && /* @__PURE__ */ s(Bt, {
502
- datasetIam: je,
508
+ }), ve && /* @__PURE__ */ s(Mt, {
509
+ datasetIam: Ke,
503
510
  datasetId: o,
504
511
  currentVersion: i,
505
- tenCode: v == null ? void 0 : v.tenantCode,
506
- isVisible: Ce,
507
- setIsVisible: oe,
508
- getVersionListRequest: x,
509
- setIsConfirm: We,
512
+ tenCode: C == null ? void 0 : C.tenantCode,
513
+ isVisible: ve,
514
+ setIsVisible: re,
515
+ getVersionListRequest: T,
516
+ setIsConfirm: Ze,
510
517
  onUploadStatusChange: (e) => {
511
- $e(e);
518
+ je(e);
512
519
  },
513
520
  tableReload: () => {
514
521
  var e, t;
515
- i != null && i.id && ((t = (e = q.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
522
+ i != null && i.id && ((t = (e = j.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
516
523
  top: 0
517
- }), E(I(p({}, n), {
524
+ }), A(S(g({}, r), {
518
525
  current: 1
519
526
  })));
520
527
  },
521
- loadVersionData: Ve
528
+ loadVersionData: Te
522
529
  })]
523
530
  })
524
531
  }),
525
- children: [/* @__PURE__ */ T("div", {
532
+ children: [/* @__PURE__ */ V("div", {
526
533
  className: "detection-header",
527
- children: [/* @__PURE__ */ T(ie, {
528
- children: [W.tabs && /* @__PURE__ */ s(yt, {
534
+ children: [/* @__PURE__ */ V(te, {
535
+ children: [U.tabs && /* @__PURE__ */ s(St, {
529
536
  className: "header-tab",
530
537
  activeKey: y,
531
- items: Pe,
532
- onChange: we
533
- }), !g && W.search && /* @__PURE__ */ s(Ht, {
538
+ items: Ve,
539
+ onChange: Ne
540
+ }), !v && U.search && /* @__PURE__ */ s(Bt, {
534
541
  placeholder: "请输入图片名称搜索",
535
- suffix: /* @__PURE__ */ s(Mt, {}),
536
- value: G,
537
- onChange: ht,
542
+ suffix: /* @__PURE__ */ s(Et, {}),
543
+ value: J,
544
+ onChange: dt,
538
545
  allowClear: !0
539
546
  })]
540
- }), /* @__PURE__ */ s(Oe, {
547
+ }), /* @__PURE__ */ s(Fe, {
541
548
  isPreLabel: w,
542
- children: /* @__PURE__ */ s(ie, {
543
- children: C && C.label && /* @__PURE__ */ s(ne, {
549
+ children: /* @__PURE__ */ s(te, {
550
+ children: D && D.label && /* @__PURE__ */ s(ie, {
544
551
  type: "primary",
545
- disabled: !H || w,
552
+ disabled: w,
546
553
  onClick: () => {
547
- g || re("nocode"), j(!1), B(!0), S(-1), y === "nocode" && (S(0), b(m[0])), Y(!0);
554
+ v || ne("nocode"), q(!0), b(-1), y === "nocode" && (b(0), m(p[0])), G(!0);
548
555
  },
549
556
  children: "标注"
550
557
  })
551
558
  })
552
559
  })]
553
- }), /* @__PURE__ */ T("div", {
560
+ }), /* @__PURE__ */ V("div", {
554
561
  className: "d-row",
555
- children: [/* @__PURE__ */ T("div", {
562
+ children: [/* @__PURE__ */ V("div", {
556
563
  className: "d-right",
557
- ref: q,
558
- children: [g && /* @__PURE__ */ s($t, {
564
+ ref: j,
565
+ children: [_ && /* @__PURE__ */ s(jt, {
559
566
  datasetId: o,
560
- isImageDetailVisible: le,
561
- setIsImageDetailVisible: Y,
562
- currentSample: a != null ? a : g,
567
+ isImageDetailVisible: _,
568
+ setIsImageDetailVisible: G,
569
+ currentSample: c != null ? c : v,
563
570
  labels: P,
564
- editing: U ? !1 : R,
565
- filterItems: Pe,
571
+ previewMode: !W,
572
+ filterItems: Ve,
566
573
  filterMode: y,
567
- onFilterChange: we,
568
- onChange: D,
569
- onNextClick: () => Ne(),
570
- onPrevClick: () => ot(),
571
- onSave: () => at(),
572
- onDeleteSample: () => ct(),
574
+ onFilterChange: Ne,
575
+ onChange: I,
576
+ onNextClick: () => xe(),
577
+ onPrevClick: () => nt(),
578
+ onSave: () => lt(),
579
+ onDeleteSample: () => st(),
573
580
  onEnterEdit: () => {
574
- j(!1), B(!0);
581
+ q(!0);
575
582
  },
576
583
  onRefresh: () => {
577
584
  var e;
578
- (e = te()) == null || e.then((t) => {
579
- var l, r;
580
- if (a) {
581
- const d = [];
582
- (l = a.labels) == null || l.forEach((u) => {
583
- t != null && t.find((k) => k.id === u.id) && d.push(u);
584
- }), a.labels = d, D(p({}, a));
585
+ (e = H()) == null || e.then((t) => {
586
+ var l, n;
587
+ if (c) {
588
+ const a = [];
589
+ (l = c.labels) == null || l.forEach((h) => {
590
+ t != null && t.find((L) => L.id === h.id) && a.push(h);
591
+ }), c.labels = a, I(g({}, c));
585
592
  }
586
- if (g) {
587
- const d = [];
588
- (r = g.labels) == null || r.forEach((u) => {
589
- t != null && t.find((k) => k.id === u.id) && d.push(u);
590
- }), g.labels = d, b(p({}, g));
593
+ if (v) {
594
+ const a = [];
595
+ (n = v.labels) == null || n.forEach((h) => {
596
+ t != null && t.find((L) => L.id === h.id) && a.push(h);
597
+ }), v.labels = a, m(g({}, v));
591
598
  }
592
- }), x();
599
+ }), T();
593
600
  },
594
601
  isPreLabel: w,
595
602
  imgCount: {
596
- total: K,
597
- index: O + 1
603
+ total: B,
604
+ index: M + 1
598
605
  },
599
- settingHide: !ge,
600
- canLabel: !!(C && C.label),
601
- canDelete: !!(C && C.delete),
602
- previewMode: U
603
- }), g ? /* @__PURE__ */ s("div", {}) : n.total !== void 0 && n.total > 0 ? /* @__PURE__ */ s(Re, {
604
- children: /* @__PURE__ */ s(Tt, {
606
+ settingHide: !he,
607
+ canLabel: !!(D && D.label),
608
+ canDelete: !!(D && D.delete)
609
+ }), v ? /* @__PURE__ */ s("div", {}) : r.total !== void 0 && r.total > 0 ? /* @__PURE__ */ s(ze, {
610
+ children: /* @__PURE__ */ s(kt, {
605
611
  innerProps: {
606
612
  className: "d-right-row"
607
613
  },
608
- data: m,
614
+ data: p,
609
615
  itemKey: "id",
610
- height: (Ae = q.current) == null ? void 0 : Ae.clientHeight,
611
- onScroll: st,
616
+ height: (Pe = j.current) == null ? void 0 : Pe.clientHeight,
617
+ onScroll: ot,
612
618
  children: (e, t) => {
613
619
  var l;
614
- return /* @__PURE__ */ s(It, {
620
+ return /* @__PURE__ */ s(Ct, {
615
621
  className: "d-right-col",
616
- onClick: () => rt(t),
617
- children: /* @__PURE__ */ T("div", {
622
+ onClick: () => it(t),
623
+ children: /* @__PURE__ */ V("div", {
618
624
  className: "right-col-wrapper",
619
- onMouseEnter: () => ce(e.id),
620
- onMouseLeave: () => ce(""),
625
+ onMouseEnter: () => se(e.id),
626
+ onMouseLeave: () => se(""),
621
627
  children: [/* @__PURE__ */ s("div", {
622
628
  className: "right-col-img",
623
- children: /* @__PURE__ */ s(Ft, {
629
+ children: /* @__PURE__ */ s(Rt, {
624
630
  fileKey: e.fileKey,
625
631
  width: 124,
626
- imgProxy: it
632
+ imgProxy: et
627
633
  })
628
- }), /* @__PURE__ */ T("div", {
634
+ }), /* @__PURE__ */ V("div", {
629
635
  className: "right-col-text",
630
- children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(Lt, {
636
+ children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(yt, {
631
637
  placement: "top",
632
638
  title: /* @__PURE__ */ s("div", {
633
- children: Object.keys(e.labels.reduce((r, d) => (r[d.label] ? ++r[d.label] : r[d.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
634
- children: r
635
- }, r))
639
+ children: Object.keys(e.labels.reduce((n, a) => (n[a.label] ? ++n[a.label] : n[a.label] = 1, n), {})).map((n) => /* @__PURE__ */ s("div", {
640
+ children: n
641
+ }, n))
636
642
  }),
637
- children: /* @__PURE__ */ T("div", {
643
+ children: /* @__PURE__ */ V("div", {
638
644
  style: {
639
645
  width: "100%",
640
646
  display: "flex"
@@ -653,7 +659,7 @@ const Si = (V) => {
653
659
  color: "rgba(0,0,0,0.45)",
654
660
  marginLeft: 5
655
661
  },
656
- children: lt(e)
662
+ children: rt(e)
657
663
  }) : null]
658
664
  })
659
665
  }) : /* @__PURE__ */ s("span", {
@@ -672,18 +678,18 @@ const Si = (V) => {
672
678
  })
673
679
  }) : /* @__PURE__ */ s("div", {
674
680
  className: "empty",
675
- children: n.total === 0 ? /* @__PURE__ */ s(Dt, {
676
- image: wt,
677
- description: /* @__PURE__ */ T("span", {
678
- children: ["暂无数据", y !== "hascode" && !G && /* @__PURE__ */ s("span", {
679
- children: C && C.add && /* @__PURE__ */ T(ne, {
681
+ children: r.total === 0 ? /* @__PURE__ */ s(It, {
682
+ image: Nt,
683
+ description: /* @__PURE__ */ V("span", {
684
+ children: ["暂无数据", y !== "hascode" && !J && /* @__PURE__ */ s("span", {
685
+ children: D && D.add && /* @__PURE__ */ V(ie, {
680
686
  type: "link",
681
687
  size: "small",
682
688
  style: {
683
689
  padding: 0
684
690
  },
685
- onClick: () => oe(!0),
686
- disabled: F === $.Pending || F === $.Started,
691
+ onClick: () => re(!0),
692
+ disabled: R === K.Pending || R === K.Started,
687
693
  children: [/* @__PURE__ */ s("span", {
688
694
  style: {
689
695
  color: "black"
@@ -693,27 +699,27 @@ const Si = (V) => {
693
699
  })
694
700
  })]
695
701
  })
696
- }) : /* @__PURE__ */ s(kt, {})
702
+ }) : /* @__PURE__ */ s(Lt, {})
697
703
  })]
698
- }), !g && W.labels && /* @__PURE__ */ s("div", {
704
+ }), y !== "nocode" && !v && U.labels && /* @__PURE__ */ s("div", {
699
705
  className: "d-sider",
700
- children: /* @__PURE__ */ s(At, {
706
+ children: /* @__PURE__ */ s(Pt, {
701
707
  datasetId: o,
702
708
  data: P || [],
703
- selected: Z,
709
+ selected: F,
704
710
  onSelectedChange: (e) => {
705
- se((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
711
+ oe((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
706
712
  },
707
713
  onListChange: (e) => {
708
714
  i && (f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((t) => {
709
- const r = (t || []).filter((u) => u.label !== "nocode").map((u, k) => ({
710
- label: u.label,
711
- count: u.count,
712
- id: u.id,
713
- color: Be[k % 40]
714
- })), d = Z.filter((u) => r.some((k) => k.id === u.id));
715
- Le(r), Z.length !== d.length && se(d);
716
- }), x());
715
+ const n = (t || []).filter((h) => h.label !== "nocode").map((h, L) => ({
716
+ label: h.label,
717
+ count: h.count,
718
+ id: h.id,
719
+ color: Me[L % 40]
720
+ })), a = F.filter((h) => n.some((L) => L.id === h.id));
721
+ ye(n), F.length !== a.length && oe(a);
722
+ }), T());
717
723
  },
718
724
  isPreLabel: w
719
725
  })
@@ -731,5 +737,5 @@ const Si = (V) => {
731
737
  });
732
738
  };
733
739
  export {
734
- Si as default
740
+ bi as default
735
741
  };