@glodon-aiot/dataset-annotation 3.19.0-alpha.19 → 3.19.0-alpha.21

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,33 +1,33 @@
1
- var Oe = Object.defineProperty, Ze = Object.defineProperties;
2
- var _e = Object.getOwnPropertyDescriptors;
1
+ var Ze = Object.defineProperty, _e = Object.defineProperties;
2
+ var $e = Object.getOwnPropertyDescriptors;
3
3
  var fe = Object.getOwnPropertySymbols;
4
- var $e = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable;
5
- var me = (h, o, t) => o in h ? Oe(h, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[o] = t, g = (h, o) => {
4
+ var je = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable;
5
+ var me = (h, o, t) => o in h ? Ze(h, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[o] = t, g = (h, o) => {
6
6
  for (var t in o || (o = {}))
7
- $e.call(o, t) && me(h, t, o[t]);
7
+ je.call(o, t) && me(h, t, o[t]);
8
8
  if (fe)
9
9
  for (var t of fe(o))
10
- je.call(o, t) && me(h, t, o[t]);
10
+ qe.call(o, t) && me(h, t, o[t]);
11
11
  return h;
12
- }, S = (h, o) => Ze(h, _e(o));
13
- import { jsx as i, jsxs as b, Fragment as qe } from "react/jsx-runtime";
14
- import { useState as l, useRef as he, useLayoutEffect as We, useEffect as m } from "react";
15
- import { message as J, ConfigProvider as Ge, Space as K, Select as Je, Button as Q, Tabs as Qe, Col as Xe, Empty as Ye } from "antd";
16
- import et from "antd/es/locale/zh_CN";
12
+ }, S = (h, o) => _e(h, $e(o));
13
+ import { jsx as i, jsxs as b, Fragment as We } from "react/jsx-runtime";
14
+ import { useState as l, useRef as he, useLayoutEffect as Ge, useEffect as m } from "react";
15
+ import { message as J, ConfigProvider as Je, Space as K, Select as Qe, Button as Q, Tabs as Xe, Col as Ye, Empty as et } from "antd";
16
+ import tt from "antd/es/locale/zh_CN";
17
17
  import "./style.less.mjs";
18
- import tt from "./VlmModal/index.mjs";
19
- import rt from "lodash/merge";
18
+ import rt from "./VlmModal/index.mjs";
19
+ import nt from "lodash/merge";
20
20
  import { UploadZipsStatus as T } from "@glodon-aiot/apis";
21
- import nt from "rc-virtual-list";
22
- import it from "../../Common/Page/index.mjs";
23
- import ot from "../Thumbnail/index.mjs";
24
- import st from "../../DatasetContext/index.mjs";
25
- import { DEFAULT_FILTER_SWITCH as lt } from "../../constant.mjs";
26
- import ct from "../PageNav/index.mjs";
27
- import at from "../PicZipImportModal/index.mjs";
28
- import { Prompt as dt } from "../hooks/Prompt.mjs";
29
- import ut from "../DetectionAnnotation/icon_item_empty.svg.mjs";
30
- const Tt = (h) => {
21
+ import it from "rc-virtual-list";
22
+ import ot from "../../Common/Page/index.mjs";
23
+ import st from "../Thumbnail/index.mjs";
24
+ import lt from "../../DatasetContext/index.mjs";
25
+ import { DEFAULT_FILTER_SWITCH as ct } from "../../constant.mjs";
26
+ import at from "../PageNav/index.mjs";
27
+ import dt from "../PicZipImportModal/index.mjs";
28
+ import { Prompt as ut } from "../hooks/Prompt.mjs";
29
+ import ft from "../DetectionAnnotation/icon_item_empty.svg.mjs";
30
+ const Nt = (h) => {
31
31
  const {
32
32
  services: o,
33
33
  datasetId: t,
@@ -41,12 +41,13 @@ const Tt = (h) => {
41
41
  },
42
42
  exampleSrcRoot: Se,
43
43
  apiUrl: be,
44
- token: ye
45
- } = h, [c, O] = l(), [r, L] = l(), [F, X] = l([]), [Y, H] = l(!1), [Ie, ee] = l(!1), [B, P] = l(!1), [Ce, U] = l("preview"), [Z, te] = l(0), [f, ke] = l([]), [_, D] = l(), [Ve, re] = l(), [$, w] = l(-1), [s, x] = l({
44
+ token: ye,
45
+ getToken: Ie
46
+ } = h, [c, O] = l(), [r, L] = l(), [F, X] = l([]), [Y, H] = l(!1), [Ce, ee] = l(!1), [B, P] = l(!1), [ke, U] = l("preview"), [Z, te] = l(0), [f, Ve] = l([]), [_, D] = l(), [Le, re] = l(), [$, w] = l(-1), [s, x] = l({
46
47
  current: 0,
47
48
  pageSize: 100
48
- }), [ne, ie] = l(0), [z, j] = l(""), [I, Le] = l(""), [De, we] = l(), [xe, Me] = l(), [oe, q] = l(!1), [se, Te] = l(!1), [le, Ne] = l(!0), [ze, Ee] = l(!1), W = he(null), [Re, Ae] = l(0), ce = he(-1), G = g({}, lt);
49
- rt(G, h.filterSwitch), We(() => {
49
+ }), [ne, ie] = l(0), [z, j] = l(""), [I, De] = l(""), [we, xe] = l(), [Me, Te] = l(), [oe, q] = l(!1), [se, Ne] = l(!1), [le, ze] = l(!0), [Ee, Re] = l(!1), W = he(null), [Ae, Fe] = l(0), ce = he(-1), G = g({}, ct);
50
+ nt(G, h.filterSwitch), Ge(() => {
50
51
  const e = W.current;
51
52
  if (!e)
52
53
  return;
@@ -54,7 +55,7 @@ const Tt = (h) => {
54
55
  const a = () => {
55
56
  cancelAnimationFrame(n), n = requestAnimationFrame(() => {
56
57
  const C = e.clientHeight, k = Math.max(1, Math.round(C));
57
- k !== ce.current && (ce.current = k, Ae(k));
58
+ k !== ce.current && (ce.current = k, Fe(k));
58
59
  });
59
60
  };
60
61
  a();
@@ -65,9 +66,9 @@ const Tt = (h) => {
65
66
  cancelAnimationFrame(n), d == null || d.disconnect(), p == null || p.removeEventListener("resize", a), window.removeEventListener("resize", a);
66
67
  };
67
68
  }, [c]);
68
- const Fe = () => {
69
+ const He = () => {
69
70
  j("nocode"), U("annotation"), P(!0);
70
- }, He = (e) => {
71
+ }, Be = (e) => {
71
72
  if (!f)
72
73
  return;
73
74
  w(e);
@@ -75,10 +76,10 @@ const Tt = (h) => {
75
76
  D(n), U("preview"), P(!0);
76
77
  };
77
78
  m(() => {
78
- o.cvforceDatahub && o.cvforceDatahub.getOptionsImgproxy().then((e) => we(e));
79
+ o.cvforceDatahub && o.cvforceDatahub.getOptionsImgproxy().then((e) => xe(e));
79
80
  }, [o.cvforceDatahub]), m(() => {
80
81
  t && o.cvforceDatahub.getS3Iam(t).then((e) => {
81
- Me(e);
82
+ Te(e);
82
83
  });
83
84
  }, [t]), m(() => {
84
85
  !t || r || (H(!0), Promise.all([
@@ -109,7 +110,7 @@ const Tt = (h) => {
109
110
  }, []);
110
111
  const ae = () => {
111
112
  !t || !r || o.cvforceDatahub.getDatasetsIdVersionsVid(t, r.id).then((e) => {
112
- L(e), Le(e.versionAsyncTask.state);
113
+ L(e), De(e.versionAsyncTask.state);
113
114
  });
114
115
  };
115
116
  m(() => {
@@ -117,7 +118,7 @@ const Tt = (h) => {
117
118
  }, [t, r == null ? void 0 : r.id]), m(() => {
118
119
  I !== T.Pending && I !== T.Started || J.warning("文件导入中,请刷新页面再试");
119
120
  }, [I]), m(() => {
120
- Ee(!le && se);
121
+ Re(!le && se);
121
122
  }, [le, se]);
122
123
  const E = () => {
123
124
  !t || !r || o.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(t, r.id).then((e) => {
@@ -147,7 +148,7 @@ const Tt = (h) => {
147
148
  labels: k()
148
149
  }).then((R) => {
149
150
  const v = R.recordList || [], A = a === 1 ? v : p === "prev" ? [...v, ...C] : [...C, ...v];
150
- if (ke(A), x(S(g({}, s), {
151
+ if (Ve(A), x(S(g({}, s), {
151
152
  current: a,
152
153
  pageSize: d,
153
154
  type: void 0,
@@ -178,7 +179,7 @@ const Tt = (h) => {
178
179
  })).then((e) => {
179
180
  });
180
181
  }, [z]);
181
- const Be = () => {
182
+ const Pe = () => {
182
183
  if (!f)
183
184
  return;
184
185
  const e = $ + 1;
@@ -193,7 +194,7 @@ const Tt = (h) => {
193
194
  const n = f[e];
194
195
  D(n);
195
196
  }
196
- }, Pe = () => {
197
+ }, Ue = () => {
197
198
  if (!f)
198
199
  return;
199
200
  const e = $ - 1;
@@ -208,7 +209,7 @@ const Tt = (h) => {
208
209
  const n = f[e];
209
210
  D(n);
210
211
  }
211
- }, Ue = [{
212
+ }, Ke = [{
212
213
  key: "",
213
214
  label: `全部(${Z})`,
214
215
  children: null
@@ -232,7 +233,7 @@ const Tt = (h) => {
232
233
  (n = (e = W.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || n.scrollTo({
233
234
  top: 0
234
235
  });
235
- }, Ke = (e) => {
236
+ }, Oe = (e) => {
236
237
  var v, A;
237
238
  const {
238
239
  scrollTop: n,
@@ -246,9 +247,9 @@ const Tt = (h) => {
246
247
  });
247
248
  });
248
249
  };
249
- return /* @__PURE__ */ i(Ge, {
250
- locale: et,
251
- children: /* @__PURE__ */ i(st.Provider, {
250
+ return /* @__PURE__ */ i(Je, {
251
+ locale: tt,
252
+ children: /* @__PURE__ */ i(lt.Provider, {
252
253
  value: {
253
254
  datasetId: t,
254
255
  versionId: (r == null ? void 0 : r.id) || "",
@@ -260,6 +261,7 @@ const Tt = (h) => {
260
261
  pagination: s,
261
262
  services: o,
262
263
  token: ye,
264
+ getToken: Ie,
263
265
  apiUrl: be,
264
266
  featuresConfig: {
265
267
  labelManager: ge,
@@ -272,9 +274,9 @@ const Tt = (h) => {
272
274
  },
273
275
  children: c ? c.markType === "vlm" ? /* @__PURE__ */ b("div", {
274
276
  className: "vlm-version-detail",
275
- children: [/* @__PURE__ */ b(it, {
277
+ children: [/* @__PURE__ */ b(ot, {
276
278
  className: "product-details-page",
277
- header: u === !1 ? void 0 : /* @__PURE__ */ i(ct, {
279
+ header: u === !1 ? void 0 : /* @__PURE__ */ i(at, {
278
280
  backTo: pe,
279
281
  onBackClick: u != null && u.onBackClick ? () => {
280
282
  u.onBackClick && u.onBackClick();
@@ -285,7 +287,7 @@ const Tt = (h) => {
285
287
  fontWeight: "bold"
286
288
  },
287
289
  children: c == null ? void 0 : c.name
288
- }), /* @__PURE__ */ i(Je, {
290
+ }), /* @__PURE__ */ i(Qe, {
289
291
  disabled: (u == null ? void 0 : u.versionSelect) === !1,
290
292
  value: r == null ? void 0 : r.id,
291
293
  style: {
@@ -314,12 +316,12 @@ const Tt = (h) => {
314
316
  onClick: () => q(!0),
315
317
  disabled: I === T.Pending || I === T.Started,
316
318
  children: "导入数据"
317
- }, "del"), /* @__PURE__ */ i(dt, {
318
- when: ze,
319
+ }, "del"), /* @__PURE__ */ i(ut, {
320
+ when: Ee,
319
321
  content: "确认要离开此页面吗?",
320
322
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
321
- }), oe && /* @__PURE__ */ i(at, {
322
- datasetIam: xe,
323
+ }), oe && /* @__PURE__ */ i(dt, {
324
+ datasetIam: Me,
323
325
  datasetId: t,
324
326
  currentVersion: r,
325
327
  tenCode: c == null ? void 0 : c.tenantCode,
@@ -327,9 +329,9 @@ const Tt = (h) => {
327
329
  isVisible: oe,
328
330
  setIsVisible: q,
329
331
  getVersionListRequest: E,
330
- setIsConfirm: Ne,
332
+ setIsConfirm: ze,
331
333
  onUploadStatusChange: (e) => {
332
- Te(e);
334
+ Ne(e);
333
335
  },
334
336
  tableReload: () => {
335
337
  r != null && r.id && (de(), M(S(g({}, s), {
@@ -343,7 +345,7 @@ const Tt = (h) => {
343
345
  children: [/* @__PURE__ */ b("div", {
344
346
  className: "vlm-header",
345
347
  children: [/* @__PURE__ */ i(K, {
346
- children: G.tabs && /* @__PURE__ */ i(Qe, {
348
+ children: G.tabs && /* @__PURE__ */ i(Xe, {
347
349
  className: "header-tab",
348
350
  activeKey: z,
349
351
  onChange: (e) => {
@@ -352,13 +354,13 @@ const Tt = (h) => {
352
354
  // total: 0,
353
355
  })), j(e);
354
356
  },
355
- items: Ue
357
+ items: Ke
356
358
  })
357
359
  }), /* @__PURE__ */ i(K, {
358
360
  children: y && y.label && /* @__PURE__ */ i(Q, {
359
361
  type: "primary",
360
362
  disabled: !Z,
361
- onClick: Fe,
363
+ onClick: He,
362
364
  style: {
363
365
  marginRight: "10px"
364
366
  },
@@ -370,26 +372,26 @@ const Tt = (h) => {
370
372
  children: /* @__PURE__ */ i("div", {
371
373
  className: "d-right",
372
374
  ref: W,
373
- children: _ ? /* @__PURE__ */ i("div", {}) : s.total !== void 0 && s.total > 0 ? /* @__PURE__ */ i(qe, {
374
- children: /* @__PURE__ */ i(nt, {
375
+ children: _ ? /* @__PURE__ */ i("div", {}) : s.total !== void 0 && s.total > 0 ? /* @__PURE__ */ i(We, {
376
+ children: /* @__PURE__ */ i(it, {
375
377
  innerProps: {
376
378
  className: "d-right-row"
377
379
  },
378
380
  data: f,
379
381
  itemKey: "id",
380
- height: Math.max(Re, 1),
381
- onScroll: Ke,
382
- children: (e, n) => /* @__PURE__ */ i(Xe, {
382
+ height: Math.max(Ae, 1),
383
+ onScroll: Oe,
384
+ children: (e, n) => /* @__PURE__ */ i(Ye, {
383
385
  className: "d-right-col",
384
- onClick: () => He(n),
386
+ onClick: () => Be(n),
385
387
  children: /* @__PURE__ */ b("div", {
386
388
  className: "right-col-wrapper",
387
389
  children: [/* @__PURE__ */ i("div", {
388
390
  className: "right-col-img",
389
- children: /* @__PURE__ */ i(ot, {
391
+ children: /* @__PURE__ */ i(st, {
390
392
  fileKey: e.fileKey,
391
393
  width: 124,
392
- imgProxy: De
394
+ imgProxy: we
393
395
  })
394
396
  }), /* @__PURE__ */ i("div", {
395
397
  className: "right-col-text",
@@ -402,8 +404,8 @@ const Tt = (h) => {
402
404
  })
403
405
  }) : /* @__PURE__ */ i("div", {
404
406
  className: "empty",
405
- children: s.total === 0 ? /* @__PURE__ */ i(Ye, {
406
- image: ut,
407
+ children: s.total === 0 ? /* @__PURE__ */ i(et, {
408
+ image: ft,
407
409
  description: /* @__PURE__ */ b("span", {
408
410
  children: ["暂无数据", z !== "hascode" && /* @__PURE__ */ i("span", {
409
411
  children: y && y.add && /* @__PURE__ */ b(Q, {
@@ -427,17 +429,17 @@ const Tt = (h) => {
427
429
  })
428
430
  })
429
431
  })]
430
- }), B && /* @__PURE__ */ i(tt, {
432
+ }), B && /* @__PURE__ */ i(rt, {
431
433
  isVlmModalVisible: B,
432
434
  setIsVlmModalVisible: P,
433
435
  record: _,
434
- onNextClick: () => Be(),
435
- onPrevClick: () => Pe(),
436
- listLoading: Ie,
436
+ onNextClick: () => Pe(),
437
+ onPrevClick: () => Ue(),
438
+ listLoading: Ce,
437
439
  ocrMarkTmpl: c == null ? void 0 : c.ocrMarkTmpl,
438
440
  datasetId: t,
439
441
  versionId: r == null ? void 0 : r.id,
440
- initialMode: Ce,
442
+ initialMode: ke,
441
443
  filterMode: z,
442
444
  onFilterModeChange: (e) => {
443
445
  j(e);
@@ -453,7 +455,7 @@ const Tt = (h) => {
453
455
  current: 1
454
456
  })), E();
455
457
  },
456
- selectSampleId: Ve,
458
+ selectSampleId: Le,
457
459
  onClose: () => {
458
460
  M(S(g({}, s), {
459
461
  current: 1
@@ -476,5 +478,5 @@ const Tt = (h) => {
476
478
  });
477
479
  };
478
480
  export {
479
- Tt as default
481
+ Nt as default
480
482
  };
@@ -1,129 +1,148 @@
1
- var H = Object.defineProperty, O = Object.defineProperties;
2
- var y = Object.getOwnPropertyDescriptors;
3
- var c = Object.getOwnPropertySymbols;
4
- var v = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
5
- var E = (e, r, o) => r in e ? H(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, a = (e, r) => {
1
+ var B = Object.defineProperty, L = Object.defineProperties;
2
+ var $ = Object.getOwnPropertyDescriptors;
3
+ var d = Object.getOwnPropertySymbols;
4
+ var S = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
+ var h = (e, r, o) => r in e ? B(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, f = (e, r) => {
6
6
  for (var o in r || (r = {}))
7
- v.call(r, o) && E(e, o, r[o]);
8
- if (c)
9
- for (var o of c(r))
10
- g.call(r, o) && E(e, o, r[o]);
7
+ S.call(r, o) && h(e, o, r[o]);
8
+ if (d)
9
+ for (var o of d(r))
10
+ D.call(r, o) && h(e, o, r[o]);
11
11
  return e;
12
- }, T = (e, r) => O(e, y(r));
13
- var A = (e, r) => {
12
+ }, M = (e, r) => L(e, $(r));
13
+ var b = (e, r) => {
14
14
  var o = {};
15
15
  for (var t in e)
16
- v.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
17
- if (e != null && c)
18
- for (var t of c(e))
19
- r.indexOf(t) < 0 && g.call(e, t) && (o[t] = e[t]);
16
+ S.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
17
+ if (e != null && d)
18
+ for (var t of d(e))
19
+ r.indexOf(t) < 0 && D.call(e, t) && (o[t] = e[t]);
20
20
  return o;
21
21
  };
22
- import { jsx as B } from "react/jsx-runtime";
23
- import L from "react-dom";
24
- import { defaultApiUrl as $ } from "../constant.mjs";
25
- import V from "../components/ClassificationAnnotation/index.mjs";
26
- import { CVForceDatahubApi as j, ModelServiceApi as z } from "@glodon-aiot/apis";
27
- import { isExpired as G } from "../utils/index.mjs";
28
- import { notification as k } from "antd";
29
- import N from "axios";
30
- import W from "lodash/merge";
31
- import { VIEW_MODE_FEATURES as J, LABEL_MODE_FEATURES as K, MANAGE_MODE_FEATURES as P } from "../featuresConfig.mjs";
32
- function Q(e) {
22
+ var w = (e, r, o) => new Promise((t, i) => {
23
+ var p = (s) => {
24
+ try {
25
+ l(o.next(s));
26
+ } catch (m) {
27
+ i(m);
28
+ }
29
+ }, v = (s) => {
30
+ try {
31
+ l(o.throw(s));
32
+ } catch (m) {
33
+ i(m);
34
+ }
35
+ }, l = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(p, v);
36
+ l((o = o.apply(e, r)).next());
37
+ });
38
+ import { jsx as V } from "react/jsx-runtime";
39
+ import j from "react-dom";
40
+ import { defaultApiUrl as z } from "../constant.mjs";
41
+ import G from "../components/ClassificationAnnotation/index.mjs";
42
+ import { CVForceDatahubApi as N, ModelServiceApi as W } from "@glodon-aiot/apis";
43
+ import { isExpired as J, createTokenResolver as K } from "../utils/index.mjs";
44
+ import { notification as I } from "antd";
45
+ import P from "axios";
46
+ import Q from "lodash/merge";
47
+ import { VIEW_MODE_FEATURES as X, LABEL_MODE_FEATURES as Y, MANAGE_MODE_FEATURES as Z } from "../featuresConfig.mjs";
48
+ function q(e) {
33
49
  switch (e) {
34
50
  case "manage":
35
- return a({}, P);
51
+ return f({}, Z);
36
52
  case "label":
37
- return a({}, K);
53
+ return f({}, Y);
38
54
  case "view":
39
- return a({}, J);
55
+ return f({}, X);
40
56
  default:
41
57
  return null;
42
58
  }
43
59
  }
44
- const ce = (e) => {
45
- const u = e, {
60
+ const me = (e) => {
61
+ const T = e, {
46
62
  getContainer: r = () => document.createElement("div"),
47
63
  token: o,
48
- errorHandlers: t,
49
- apiUrl: h = $,
50
- datasetId: S,
51
- versionId: D,
52
- mode: M = "label"
53
- } = u, b = A(u, [
64
+ getToken: t,
65
+ errorHandlers: i,
66
+ apiUrl: p = z,
67
+ datasetId: v,
68
+ versionId: l,
69
+ mode: s = "label"
70
+ } = T, m = b(T, [
54
71
  "getContainer",
55
72
  "token",
73
+ "getToken",
56
74
  "errorHandlers",
57
75
  "apiUrl",
58
76
  "datasetId",
59
77
  "versionId",
60
78
  "mode"
61
- ]), f = a({}, Q(M));
62
- W(f, b);
63
- const I = r(), w = (() => {
64
- const x = h, C = (n) => {
65
- var s;
66
- if (!o)
79
+ ]), E = f({}, q(s));
80
+ Q(E, m);
81
+ const x = r(), C = (() => {
82
+ const R = p, U = K(o, t), _ = (n) => w(void 0, null, function* () {
83
+ var c;
84
+ const a = yield U();
85
+ if (!a)
67
86
  return n;
68
- if (G(o)) {
69
- const i = "aiotToken is timeout";
70
- t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
87
+ if (J(a)) {
88
+ const u = "aiotToken is timeout";
89
+ i.aiotToken ? typeof i.aiotToken == "function" ? i.aiotToken(
71
90
  // @ts-ignore
72
- new Error(i, {
91
+ new Error(u, {
73
92
  cause: {
74
93
  status: 401,
75
- message: i
94
+ message: u
76
95
  }
77
96
  })
78
- ) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
97
+ ) : console.error("errorHandlers.aiotToken is not a function") : console.error(u);
79
98
  }
80
- return n.headers = (s = n.headers) != null ? s : {}, n.headers = T(a({}, n.headers), {
81
- Authorization: o ? `Bearer ${o}` : ""
99
+ return n.headers = (c = n.headers) != null ? c : {}, n.headers = M(f({}, n.headers), {
100
+ Authorization: a ? `Bearer ${a}` : ""
82
101
  }), n;
83
- };
84
- function l(n, s = !0) {
85
- const i = `${x}${n}`, p = N.create({
86
- baseURL: i
102
+ });
103
+ function g(n, a = !0) {
104
+ const c = `${R}${n}`, u = P.create({
105
+ baseURL: c
87
106
  });
88
- return s && p.interceptors.request.use(C), p;
107
+ return a && u.interceptors.request.use(_), u;
89
108
  }
90
- const m = (n, s) => {
91
- n !== 10001 && n !== 10215 && (k.config({
109
+ const k = (n, a) => {
110
+ n !== 10001 && n !== 10215 && (I.config({
92
111
  getContainer: r
93
- }), k.error({
94
- message: s
112
+ }), I.error({
113
+ message: a
95
114
  }));
96
- }, d = (n, s) => {
115
+ }, A = (n, a) => {
97
116
  if (n === 401) {
98
- const i = "aiotToken is invalid";
99
- t.aiotToken ? typeof t.aiotToken == "function" ? t.aiotToken(
117
+ const c = "aiotToken is invalid";
118
+ i.aiotToken ? typeof i.aiotToken == "function" ? i.aiotToken(
100
119
  // @ts-ignore
101
- new Error(i, {
120
+ new Error(c, {
102
121
  cause: {
103
122
  status: 401,
104
- message: i
123
+ message: c
105
124
  }
106
125
  })
107
- ) : console.error("errorHandlers.aiotToken is not a function") : console.error(i);
126
+ ) : console.error("errorHandlers.aiotToken is not a function") : console.error(c);
108
127
  }
109
- }, U = l("/datahub/v1"), _ = new j(U, {
110
- onHttpStatusError: d,
111
- onAppStatusError: m
112
- }), R = l("/mlopsdeploy/v1"), F = new z(R, {
113
- onHttpStatusError: d,
114
- onAppStatusError: m
128
+ }, y = g("/datahub/v1"), F = new N(y, {
129
+ onHttpStatusError: A,
130
+ onAppStatusError: k
131
+ }), H = g("/mlopsdeploy/v1"), O = new W(H, {
132
+ onHttpStatusError: A,
133
+ onAppStatusError: k
115
134
  });
116
135
  return {
117
- cvforceDatahub: _,
118
- cvforceModelService: F
136
+ cvforceDatahub: F,
137
+ cvforceModelService: O
119
138
  };
120
139
  })();
121
- L.render(/* @__PURE__ */ B(V, a({
122
- services: w,
123
- datasetId: S,
124
- versionId: D
125
- }, f)), I);
140
+ j.render(/* @__PURE__ */ V(G, f({
141
+ services: C,
142
+ datasetId: v,
143
+ versionId: l
144
+ }, E)), x);
126
145
  };
127
146
  export {
128
- ce as default
147
+ me as default
129
148
  };