@vidispine/vdt-react 23.2.0-pre.2 → 23.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useRef as K, useReducer as fe, useCallback as P, useEffect as $, useState as M, useMemo as he, Children as ne, cloneElement as oe, Component as Je, createContext as Ee, useContext as Ie, isValidElement as _e } from "react";
2
- import { utils as J, search as Xe, vsimport as xe, collection as j, ChunkedTransferManager as Rt, ChunkedUpload as Pt, access as Pe, metadatafield as ze, fieldgroup as Ke, item as ue, library as ge, user as X, group as te, storage as Nt, job as Ze, file as It, metadata as Ne, noauth as et } from "@vidispine/vdt-api";
1
+ import { useRef as z, useReducer as fe, useCallback as P, useEffect as $, useState as M, useMemo as he, Children as oe, cloneElement as se, Component as Je, createContext as Ee, useContext as Ie, isValidElement as _e } from "react";
2
+ import { utils as J, search as Xe, vsimport as xe, collection as V, ChunkedTransferManager as Rt, ChunkedUpload as Pt, access as Pe, metadatafield as ze, fieldgroup as Ke, item as ue, library as ge, user as X, group as te, storage as Nt, job as Ze, file as It, metadata as Ne, noauth as et } from "@vidispine/vdt-api";
3
3
  import { createMetadataType as de, formatTimeCodeText as _t, formatTimeCodeSeconds as Gt, parseMetadataType as tt, ROLE_NAMES as bt } from "@vidispine/vdt-js";
4
4
  import { compressToEncodedURIComponent as wt, decompressFromEncodedURIComponent as Dt } from "lz-string";
5
5
  import Z from "use-deep-compare-effect";
@@ -60,8 +60,8 @@ const Ht = ({
60
60
  return e;
61
61
  }
62
62
  };
63
- function W(e, t, n) {
64
- const r = K(() => null), o = Ht(t, n), s = K(o), [a, i] = fe(Lt, o), l = P(
63
+ function k(e, t, n) {
64
+ const r = z(() => null), o = Ht(t, n), s = z(o), [a, i] = fe(Lt, o), l = P(
65
65
  (p) => (i({ type: "START" }), new Promise((m, d) => {
66
66
  e({
67
67
  cancelToken: new J.CancelToken((h) => {
@@ -431,7 +431,7 @@ function Kt(e) {
431
431
  };
432
432
  }
433
433
  function st(e, t) {
434
- const n = K(!1);
434
+ const n = z(!1);
435
435
  $(() => {
436
436
  n.current ? e() : n.current = !0;
437
437
  }, t);
@@ -452,7 +452,7 @@ function Un(e) {
452
452
  r((c) => ({ ...c, text: u }));
453
453
  }, []), a = P((u) => {
454
454
  r((c) => ({ ...c, maximumSuggestions: u }));
455
- }, []), { request: i, data: { suggestion: l = [] } = {} } = W(
455
+ }, []), { request: i, data: { suggestion: l = [] } = {} } = k(
456
456
  Xe.searchAutoComplete
457
457
  );
458
458
  return st(() => {
@@ -488,7 +488,7 @@ const xn = (e = "id", t = []) => {
488
488
  return { activeTab: t, changeTab: (o, s) => n(s) };
489
489
  };
490
490
  function Fn(e, t) {
491
- const n = K();
491
+ const n = z();
492
492
  $(() => {
493
493
  n.current = e;
494
494
  }, [e]), $(() => {
@@ -497,7 +497,7 @@ function Fn(e, t) {
497
497
  }, [t]);
498
498
  }
499
499
  function qn(e = []) {
500
- const t = K(), n = he(() => Math.floor(e.length / 2), [e]), [r, o] = M(), s = K(r);
500
+ const t = z(), n = he(() => Math.floor(e.length / 2), [e]), [r, o] = M(), s = z(r);
501
501
  if ($(() => () => t.current && clearInterval(t.current), []), e.length === 0)
502
502
  return { width: 0 };
503
503
  s.current = r;
@@ -777,7 +777,7 @@ const fr = ["__mp3_160k"], mr = ["__mp4"], pr = ["__png"], hr = "audio", Er = "v
777
777
  const y = Array.isArray(t) ? t : [t];
778
778
  return Promise.all(
779
779
  y.map(
780
- (S) => j.addCollectionEntity({
780
+ (S) => V.addCollectionEntity({
781
781
  collectionId: S,
782
782
  entityId: p
783
783
  })
@@ -889,7 +889,7 @@ function Vn({
889
889
  queryName: r = "q",
890
890
  defaultState: o = void 0
891
891
  }) {
892
- const s = K(o);
892
+ const s = z(o);
893
893
  return { queryInitialState: he(() => {
894
894
  const { location: i = n } = e || {}, u = new URLSearchParams(i.search).get(r);
895
895
  if (!u)
@@ -925,7 +925,7 @@ const Yn = ({ entityId: e, entityType: t }) => {
925
925
  request: n,
926
926
  data: r = {},
927
927
  isLoading: o
928
- } = W(Pe.listEntityAccess), s = P(
928
+ } = k(Pe.listEntityAccess), s = P(
929
929
  (l = {}) => n({
930
930
  entityId: e,
931
931
  entityType: t,
@@ -998,7 +998,7 @@ const Yn = ({ entityId: e, entityType: t }) => {
998
998
  h = !0;
999
999
  };
1000
1000
  const f = (g = [], y = {}) => g.map(({ name: S, ...R }) => {
1001
- const A = y[S] || {}, { label: N, ...I } = n(
1001
+ const A = y[S] || {}, { label: N, ..._ } = n(
1002
1002
  A,
1003
1003
  r.split(",")
1004
1004
  );
@@ -1008,22 +1008,22 @@ const Yn = ({ entityId: e, entityType: t }) => {
1008
1008
  type: A.type,
1009
1009
  constraint: A.constraint,
1010
1010
  options: Pr(A),
1011
- ...I,
1011
+ ..._,
1012
1012
  ...R
1013
1013
  };
1014
- }), C = (g = [], y = {}, S = {}) => g.map(({ name: R, field: A, group: N, ...I }) => {
1015
- const O = y[R] || {}, V = A || O && O.field, k = N || O && O.group, { label: Q, ...re } = n(
1016
- O,
1014
+ }), C = (g = [], y = {}, S = {}) => g.map(({ name: R, field: A, group: N, ..._ }) => {
1015
+ const G = y[R] || {}, j = A || G && G.field, W = N || G && G.group, { label: Q, ...re } = n(
1016
+ G,
1017
1017
  o.split(",")
1018
1018
  );
1019
1019
  return {
1020
1020
  name: R,
1021
1021
  label: Q || R,
1022
- order: it(O, "order"),
1023
- fields: f(V, S),
1024
- groups: C(k, y, S),
1022
+ order: it(G, "order"),
1023
+ fields: f(j, S),
1024
+ groups: C(W, y, S),
1025
1025
  ...re,
1026
- ...I
1026
+ ..._
1027
1027
  };
1028
1028
  });
1029
1029
  async function v() {
@@ -1034,11 +1034,11 @@ const Yn = ({ entityId: e, entityType: t }) => {
1034
1034
  const A = { ...s, data: r };
1035
1035
  S = e.map(async ({ name: N }) => {
1036
1036
  try {
1037
- const { data: I } = await ze.getMetadataField({
1037
+ const { data: _ } = await ze.getMetadataField({
1038
1038
  fieldName: N,
1039
1039
  queryParams: A
1040
1040
  });
1041
- g[N] = I;
1041
+ g[N] = _;
1042
1042
  } catch {
1043
1043
  console.warn(`Could not retrieve attributes for ${N}`);
1044
1044
  }
@@ -1047,23 +1047,23 @@ const Yn = ({ entityId: e, entityType: t }) => {
1047
1047
  let R = [];
1048
1048
  if (t) {
1049
1049
  const A = [...t], N = { ...a, data: o };
1050
- R = A.map(async ({ name: I }) => {
1050
+ R = A.map(async ({ name: _ }) => {
1051
1051
  try {
1052
- const { data: O } = await Ke.getFieldGroup({
1053
- groupName: I,
1052
+ const { data: G } = await Ke.getFieldGroup({
1053
+ groupName: _,
1054
1054
  queryParams: N
1055
- }), { field: V = [], group: k = [] } = O;
1056
- V.forEach((Q) => {
1057
- const re = Q.data && Q.data.find((ae) => ae.key === "__values");
1055
+ }), { field: j = [], group: W = [] } = G;
1056
+ j.forEach((Q) => {
1057
+ const re = Q.data && Q.data.find((ne) => ne.key === "__values");
1058
1058
  if (re) {
1059
- const ae = Nr(re.value);
1060
- g[Q.name] = { ...Q, values: ae };
1059
+ const ne = Nr(re.value);
1060
+ g[Q.name] = { ...Q, values: ne };
1061
1061
  }
1062
- }), k.forEach((Q) => {
1062
+ }), W.forEach((Q) => {
1063
1063
  A.push(Q);
1064
- }), y[I] = O;
1064
+ }), y[_] = G;
1065
1065
  } catch {
1066
- console.warn(`Could not retrieve attributes for ${I}`);
1066
+ console.warn(`Could not retrieve attributes for ${_}`);
1067
1067
  }
1068
1068
  });
1069
1069
  }
@@ -1074,8 +1074,8 @@ const Yn = ({ entityId: e, entityType: t }) => {
1074
1074
  g
1075
1075
  );
1076
1076
  return A.forEach((N) => {
1077
- const { order: I } = N;
1078
- I && N.fields.sort((O, V) => I.indexOf(O.name) - I.indexOf(V.name));
1077
+ const { order: _ } = N;
1078
+ _ && N.fields.sort((G, j) => _.indexOf(G.name) - _.indexOf(j.name));
1079
1079
  }), A;
1080
1080
  }), u(!1));
1081
1081
  }
@@ -1101,7 +1101,7 @@ function Gr({ metadata: e, markerField: t, markerValue: n, itemSearchDocument: r
1101
1101
  },
1102
1102
  itemSearchDocument: r
1103
1103
  }).then(
1104
- ({ data: { library: o } }) => j.createCollection({
1104
+ ({ data: { library: o } }) => V.createCollection({
1105
1105
  collectionDocument: {
1106
1106
  metadata: t ? de({
1107
1107
  [t]: n || o,
@@ -1118,7 +1118,7 @@ function Gr({ metadata: e, markerField: t, markerValue: n, itemSearchDocument: r
1118
1118
  );
1119
1119
  }
1120
1120
  const ct = ({ collectionId: e }) => new Promise((t, n) => {
1121
- j.getCollection({ collectionId: e, queryParams: { children: "library" } }).then(
1121
+ V.getCollection({ collectionId: e, queryParams: { children: "library" } }).then(
1122
1122
  ({ data: r }) => {
1123
1123
  const { content: o = [] } = r, [s] = o;
1124
1124
  s || n(new Error("No Libraries")), t(s);
@@ -1127,7 +1127,7 @@ const ct = ({ collectionId: e }) => new Promise((t, n) => {
1127
1127
  }), br = ({ collectionId: e }) => ct({ collectionId: e }).then(
1128
1128
  ({ id: t }) => Promise.all([
1129
1129
  ge.removeLibrary({ libraryId: t }),
1130
- j.removeCollection({ collectionId: e })
1130
+ V.removeCollection({ collectionId: e })
1131
1131
  ])
1132
1132
  );
1133
1133
  function wr({ libraryId: e }) {
@@ -1146,7 +1146,7 @@ function Qn({
1146
1146
  initialSearchState: n,
1147
1147
  onSaveSearch: r = Gr,
1148
1148
  onDeleteSearch: o = br,
1149
- onUpdateSearchMetadata: s = j.updateCollectionMetadata,
1149
+ onUpdateSearchMetadata: s = V.updateCollectionMetadata,
1150
1150
  onGetSavedSearchSettings: a = Dr
1151
1151
  }) {
1152
1152
  const i = P(
@@ -1191,7 +1191,7 @@ function Or({ itemSearchDocument: e, queryParams: t, matrixParams: n }) {
1191
1191
  isLoading: s,
1192
1192
  isError: a,
1193
1193
  cancel: i
1194
- } = W(ue.searchItem), l = () => r({ itemSearchDocument: e, queryParams: t, matrixParams: n });
1194
+ } = k(ue.searchItem), l = () => r({ itemSearchDocument: e, queryParams: t, matrixParams: n });
1195
1195
  return Z(() => {
1196
1196
  l();
1197
1197
  }, [e, t, n]), {
@@ -1221,7 +1221,7 @@ function Hr({
1221
1221
  data: o = {},
1222
1222
  isLoading: s,
1223
1223
  isError: a
1224
- } = W(j.getCollection), i = () => r({ collectionId: e, queryParams: t });
1224
+ } = k(V.getCollection), i = () => r({ collectionId: e, queryParams: t });
1225
1225
  return Z(() => {
1226
1226
  n && i();
1227
1227
  }, [e, t]), {
@@ -1236,7 +1236,7 @@ function Xn({
1236
1236
  queryParams: t = {},
1237
1237
  refreshOnMount: n = !0
1238
1238
  }) {
1239
- const { request: r, data: o = {} } = W(j.getCollectionItem), s = () => r({ collectionId: e, queryParams: t });
1239
+ const { request: r, data: o = {} } = k(V.getCollectionItem), s = () => r({ collectionId: e, queryParams: t });
1240
1240
  return Z(() => {
1241
1241
  n && s();
1242
1242
  }, [e, t]), {
@@ -1248,7 +1248,7 @@ const zn = ({ entityId: e, entityType: t }) => {
1248
1248
  let n, r, o;
1249
1249
  switch (t) {
1250
1250
  case "collection":
1251
- n = "collectionType", o = "collectionId", r = j.getCollection;
1251
+ n = "collectionType", o = "collectionId", r = V.getCollection;
1252
1252
  break;
1253
1253
  case "library":
1254
1254
  n = "libraryType", o = "libraryId", r = ge.getLibrary;
@@ -1259,7 +1259,7 @@ const zn = ({ entityId: e, entityType: t }) => {
1259
1259
  default:
1260
1260
  throw new Error("unknown entityType");
1261
1261
  }
1262
- const { request: s, data: a, ...i } = W(r), l = P(
1262
+ const { request: s, data: a, ...i } = k(r), l = P(
1263
1263
  (u) => s({ [o]: e, ...u }),
1264
1264
  [e, o, s]
1265
1265
  );
@@ -1271,7 +1271,7 @@ const zn = ({ entityId: e, entityType: t }) => {
1271
1271
  };
1272
1272
  };
1273
1273
  function Kn(e) {
1274
- const { data: t, request: n } = W(X.getUser, { data: e }), { userName: r } = t || {}, o = P(() => n({ userName: r }), [n, r]);
1274
+ const { data: t, request: n } = k(X.getUser, { data: e }), { userName: r } = t || {}, o = P(() => n({ userName: r }), [n, r]);
1275
1275
  $(() => {
1276
1276
  r && o();
1277
1277
  }, [o, r]);
@@ -1395,7 +1395,7 @@ function Zn(e) {
1395
1395
  request: s,
1396
1396
  hasLoaded: a,
1397
1397
  isError: i
1398
- } = W(X.searchUser), l = () => s({
1398
+ } = k(X.searchUser), l = () => s({
1399
1399
  userSearchDocument: n.userSearchDocument,
1400
1400
  queryParams: n.queryParams
1401
1401
  });
@@ -1433,7 +1433,7 @@ function Zn(e) {
1433
1433
  };
1434
1434
  }
1435
1435
  const eo = (e) => {
1436
- const { request: t, data: n = {}, isLoading: r } = W(te.listGroup), o = () => t(e);
1436
+ const { request: t, data: n = {}, isLoading: r } = k(te.listGroup), o = () => t(e);
1437
1437
  return $(() => {
1438
1438
  o();
1439
1439
  }, [e]), {
@@ -1442,7 +1442,7 @@ const eo = (e) => {
1442
1442
  isLoading: r
1443
1443
  };
1444
1444
  }, to = (e) => {
1445
- const { request: t, data: n = {}, isLoading: r } = W(X.listUser), o = () => t(e);
1445
+ const { request: t, data: n = {}, isLoading: r } = k(X.listUser), o = () => t(e);
1446
1446
  return $(() => {
1447
1447
  o();
1448
1448
  }, [e]), {
@@ -1450,7 +1450,7 @@ const eo = (e) => {
1450
1450
  userListType: n,
1451
1451
  isLoading: r
1452
1452
  };
1453
- }, $r = "CHANGE_PAGE", jr = "CHANGE_ROWS", Wr = "CHANGE_SORT", Vr = "CHANGE_QUERY", kr = "HIDE_ROLES", se = {
1453
+ }, $r = "CHANGE_PAGE", jr = "CHANGE_ROWS", Wr = "CHANGE_SORT", Vr = "CHANGE_QUERY", kr = "HIDE_ROLES", ae = {
1454
1454
  CHANGE_PAGE: $r,
1455
1455
  CHANGE_ROWS: jr,
1456
1456
  CHANGE_SORT: Wr,
@@ -1468,7 +1468,7 @@ const eo = (e) => {
1468
1468
  }), Br = (e, t) => {
1469
1469
  const { type: n } = t;
1470
1470
  switch (n) {
1471
- case se.CHANGE_PAGE: {
1471
+ case ae.CHANGE_PAGE: {
1472
1472
  const { page: r } = t;
1473
1473
  return {
1474
1474
  ...e,
@@ -1479,7 +1479,7 @@ const eo = (e) => {
1479
1479
  }
1480
1480
  };
1481
1481
  }
1482
- case se.CHANGE_ROWS: {
1482
+ case ae.CHANGE_ROWS: {
1483
1483
  const { rowsPerPage: r } = t;
1484
1484
  return {
1485
1485
  ...e,
@@ -1492,7 +1492,7 @@ const eo = (e) => {
1492
1492
  }
1493
1493
  };
1494
1494
  }
1495
- case se.HIDE_ROLES: {
1495
+ case ae.HIDE_ROLES: {
1496
1496
  const { hideRoles: r } = t, o = r === !0 ? !1 : void 0;
1497
1497
  return {
1498
1498
  ...e,
@@ -1504,7 +1504,7 @@ const eo = (e) => {
1504
1504
  }
1505
1505
  };
1506
1506
  }
1507
- case se.CHANGE_QUERY:
1507
+ case ae.CHANGE_QUERY:
1508
1508
  return {
1509
1509
  ...e,
1510
1510
  page: 0,
@@ -1532,7 +1532,7 @@ function ro(e) {
1532
1532
  request: s,
1533
1533
  hasLoaded: a,
1534
1534
  isError: i
1535
- } = W(te.searchGroup), l = () => s({
1535
+ } = k(te.searchGroup), l = () => s({
1536
1536
  groupSearchDocument: n.groupSearchDocument,
1537
1537
  queryParams: n.queryParams
1538
1538
  });
@@ -1545,36 +1545,36 @@ function ro(e) {
1545
1545
  groupListDocument: o,
1546
1546
  onSearchGroup: l,
1547
1547
  onChangePage: ({ page: h }) => r({
1548
- type: se.CHANGE_PAGE,
1548
+ type: ae.CHANGE_PAGE,
1549
1549
  page: h
1550
1550
  }),
1551
1551
  onChangeSort: (h, f, C) => {
1552
1552
  const v = typeof f == "object" ? f.value : f;
1553
1553
  r({
1554
- type: se.CHANGE_SORT,
1554
+ type: ae.CHANGE_SORT,
1555
1555
  field: v,
1556
1556
  order: C
1557
1557
  });
1558
1558
  },
1559
1559
  onChangeRowsPerPage: ({ target: { value: h } } = {}) => r({
1560
- type: se.CHANGE_ROWS,
1560
+ type: ae.CHANGE_ROWS,
1561
1561
  rowsPerPage: h
1562
1562
  }),
1563
1563
  onChangeQuery: (h, f) => {
1564
1564
  r({
1565
- type: se.CHANGE_QUERY,
1565
+ type: ae.CHANGE_QUERY,
1566
1566
  field: h,
1567
1567
  query: f
1568
1568
  });
1569
1569
  },
1570
1570
  onHideRoles: ({ hideRoles: h }) => r({
1571
- type: se.HIDE_ROLES,
1571
+ type: ae.HIDE_ROLES,
1572
1572
  hideRoles: h
1573
1573
  })
1574
1574
  };
1575
1575
  }
1576
1576
  function no(e) {
1577
- const { data: t, request: n } = W(te.getGroup, { data: e }), { groupName: r } = t || {}, o = P(() => n({ groupName: r }), [n, r]);
1577
+ const { data: t, request: n } = k(te.getGroup, { data: e }), { groupName: r } = t || {}, o = P(() => n({ groupName: r }), [n, r]);
1578
1578
  $(() => {
1579
1579
  r && o();
1580
1580
  }, [o, r]);
@@ -1647,7 +1647,7 @@ function no(e) {
1647
1647
  };
1648
1648
  }
1649
1649
  function Qr({ itemId: e, queryParams: t = {}, refreshOnMount: n = !0 }) {
1650
- const { request: r, data: o = {}, isLoading: s, isError: a } = W(ue.getItem), i = () => r({ itemId: e, queryParams: t });
1650
+ const { request: r, data: o = {}, isLoading: s, isError: a } = k(ue.getItem), i = () => r({ itemId: e, queryParams: t });
1651
1651
  return Z(() => {
1652
1652
  n && i();
1653
1653
  }, [e, t]), {
@@ -1658,7 +1658,7 @@ function Qr({ itemId: e, queryParams: t = {}, refreshOnMount: n = !0 }) {
1658
1658
  };
1659
1659
  }
1660
1660
  const oo = ({ collectionId: e, defaultEnabled: t = !0 }) => {
1661
- const [n, r] = M(), [o, s] = M(t), a = (p) => s((m) => p !== void 0 ? p : !m), i = K(), l = K(), u = K(), c = P(
1661
+ const [n, r] = M(), [o, s] = M(t), a = (p) => s((m) => p !== void 0 ? p : !m), i = z(), l = z(), u = z(), c = P(
1662
1662
  ({ itemId: p }) => {
1663
1663
  if (o === !1)
1664
1664
  return;
@@ -1673,20 +1673,20 @@ const oo = ({ collectionId: e, defaultEnabled: t = !0 }) => {
1673
1673
  const { current: C } = i, { current: v } = l;
1674
1674
  if (!Array.isArray(C)) {
1675
1675
  Promise.all([
1676
- j.getCollection({
1676
+ V.getCollection({
1677
1677
  collectionId: e,
1678
1678
  queryParams: { children: "item" }
1679
1679
  }),
1680
- j.searchCollectionItem({
1680
+ V.searchCollectionItem({
1681
1681
  collectionId: e,
1682
1682
  searchDocument: m,
1683
1683
  queryParams: { first: h, number: f }
1684
1684
  })
1685
1685
  ]).then(([{ data: A }, { data: N }]) => {
1686
- const { hits: I, item: O = [] } = N;
1687
- i.current = O.map(({ id: k }) => k), u.current = I;
1688
- const { content: V } = A;
1689
- l.current = V, d({ first: 1, number: 100 });
1686
+ const { hits: _, item: G = [] } = N;
1687
+ i.current = G.map(({ id: W }) => W), u.current = _;
1688
+ const { content: j } = A;
1689
+ l.current = j, d({ first: 1, number: 100 });
1690
1690
  });
1691
1691
  return;
1692
1692
  }
@@ -1696,13 +1696,13 @@ const oo = ({ collectionId: e, defaultEnabled: t = !0 }) => {
1696
1696
  return;
1697
1697
  }
1698
1698
  if (y === -1 && g > C.length) {
1699
- j.searchCollectionItem({
1699
+ V.searchCollectionItem({
1700
1700
  collectionId: e,
1701
1701
  searchDocument: m,
1702
1702
  queryParams: { first: h + f, number: f }
1703
1703
  }).then(({ data: A }) => {
1704
1704
  const { item: N = [] } = A;
1705
- i.current.push(...N.map(({ id: I }) => I)), d({ first: h + f, number: f });
1705
+ i.current.push(...N.map(({ id: _ }) => _)), d({ first: h + f, number: f });
1706
1706
  });
1707
1707
  return;
1708
1708
  }
@@ -1734,7 +1734,7 @@ const oo = ({ collectionId: e, defaultEnabled: t = !0 }) => {
1734
1734
  return t;
1735
1735
  };
1736
1736
  function so(e = [], t = 0, n = void 0, r = Jr) {
1737
- const [o, s] = M(0), [a, i] = M(0), [l, u] = M(!1), [c, p] = M([]), [m, d] = M(), [h, f] = M(0), C = K(
1737
+ const [o, s] = M(0), [a, i] = M(0), [l, u] = M(!1), [c, p] = M([]), [m, d] = M(), [h, f] = M(0), C = z(
1738
1738
  rt((A) => {
1739
1739
  i(A);
1740
1740
  }, 10)
@@ -1746,28 +1746,28 @@ function so(e = [], t = 0, n = void 0, r = Jr) {
1746
1746
  }
1747
1747
  }, g = P(
1748
1748
  (A) => {
1749
- const N = A.clientX - v(A.currentTarget) - t, I = A.currentTarget.offsetWidth;
1750
- return N < 0 ? 0 : N > I ? I : N;
1749
+ const N = A.clientX - v(A.currentTarget) - t, _ = A.currentTarget.offsetWidth;
1750
+ return N < 0 ? 0 : N > _ ? _ : N;
1751
1751
  },
1752
1752
  [t]
1753
1753
  ), y = (A, N) => {
1754
- let I = N[0], O = Math.abs(A - I), V = 0;
1755
- for (let k = 0; k < N.length; k += 1) {
1756
- const Q = Math.abs(A - N[k]), re = A - N[k] > 0;
1757
- Q < O && re && (O = Q, I = N[k], V = k);
1754
+ let _ = N[0], G = Math.abs(A - _), j = 0;
1755
+ for (let W = 0; W < N.length; W += 1) {
1756
+ const Q = Math.abs(A - N[W]), re = A - N[W] > 0;
1757
+ Q < G && re && (G = Q, _ = N[W], j = W);
1758
1758
  }
1759
- return V;
1759
+ return j;
1760
1760
  }, S = (A) => {
1761
1761
  if (n) {
1762
1762
  const N = g(A);
1763
1763
  s(N - 1), h !== A.currentTarget.offsetWidth && f(A.currentTarget.offsetWidth);
1764
- const I = N / (A.currentTarget.offsetWidth / +n);
1765
- d(Gt(I));
1766
- const O = y(
1767
- I,
1768
- c.map((V) => V.toSeconds().toFixed(0))
1764
+ const _ = N / (A.currentTarget.offsetWidth / +n);
1765
+ d(Gt(_));
1766
+ const G = y(
1767
+ _,
1768
+ c.map((j) => j.toSeconds().toFixed(0))
1769
1769
  );
1770
- O !== a && C(O);
1770
+ G !== a && C(G);
1771
1771
  }
1772
1772
  };
1773
1773
  return Z(() => {
@@ -1793,7 +1793,7 @@ function ao({
1793
1793
  triggerLength: o = 1,
1794
1794
  apiCall: s = ue.searchItem
1795
1795
  }) {
1796
- const [a, i] = M(""), l = K(rt(i, n)).current, { data: { autocomplete: u = [] } = {}, request: c } = W(s), { suggestion: p = [] } = u[0] || {};
1796
+ const [a, i] = M(""), l = z(rt(i, n)).current, { data: { autocomplete: u = [] } = {}, request: c } = k(s), { suggestion: p = [] } = u[0] || {};
1797
1797
  return Z(() => {
1798
1798
  e && a && a.length >= o && c({
1799
1799
  body: {
@@ -1818,7 +1818,7 @@ function io() {
1818
1818
  request: e,
1819
1819
  data: { value: t = [] } = {},
1820
1820
  isLoading: n
1821
- } = W(ze.getMetadataFieldAllowedValues);
1821
+ } = k(ze.getMetadataFieldAllowedValues);
1822
1822
  return {
1823
1823
  getMetadataDataset: (o, s, a) => {
1824
1824
  o && e({
@@ -1847,7 +1847,7 @@ function co({
1847
1847
  o.map(async (f) => {
1848
1848
  const {
1849
1849
  data: { content: C, metadata: v = {} }
1850
- } = await j.getCollection({
1850
+ } = await V.getCollection({
1851
1851
  collectionId: f,
1852
1852
  queryParams: t
1853
1853
  }), { field: g } = v.timespan[0];
@@ -1871,14 +1871,14 @@ function co({
1871
1871
  u(f);
1872
1872
  });
1873
1873
  }, [o, t]), p = (f, C, v, g, y) => {
1874
- j.createCollection({
1874
+ V.createCollection({
1875
1875
  collectionDocument: {
1876
1876
  metadata: de({
1877
1877
  [C]: v,
1878
1878
  title: g
1879
1879
  })
1880
1880
  }
1881
- }).then(({ data: { id: S } }) => f ? j.updateCollection({
1881
+ }).then(({ data: { id: S } }) => f ? V.updateCollection({
1882
1882
  collectionId: f,
1883
1883
  collectionDocument: {
1884
1884
  content: [
@@ -1908,7 +1908,7 @@ function co({
1908
1908
  },
1909
1909
  itemSearchDocument: v
1910
1910
  }).then(
1911
- ({ data: { library: y } }) => j.createCollection({
1911
+ ({ data: { library: y } }) => V.createCollection({
1912
1912
  collectionDocument: {
1913
1913
  metadata: de({
1914
1914
  [n.markerField]: n.markerValue,
@@ -1923,7 +1923,7 @@ function co({
1923
1923
  }
1924
1924
  })
1925
1925
  ).then(
1926
- ({ data: { id: y } }) => j.updateCollection({
1926
+ ({ data: { id: y } }) => V.updateCollection({
1927
1927
  collectionId: f,
1928
1928
  collectionDocument: {
1929
1929
  content: [
@@ -1947,7 +1947,7 @@ function co({
1947
1947
  } catch (y) {
1948
1948
  u(y);
1949
1949
  }
1950
- }, d = (f) => j.removeCollection({ collectionId: f }).catch((C) => {
1950
+ }, d = (f) => V.removeCollection({ collectionId: f }).catch((C) => {
1951
1951
  u(C);
1952
1952
  }), h = (f) => {
1953
1953
  i((C) => C.filter((v) => v.id !== f));
@@ -1973,7 +1973,7 @@ const uo = ({ collectionId: e, onError: t }) => {
1973
1973
  try {
1974
1974
  if (!e)
1975
1975
  throw Error("Missing collectionId");
1976
- const { data: u = {} } = await j.getCollectionMetadata({
1976
+ const { data: u = {} } = await V.getCollectionMetadata({
1977
1977
  collectionId: e,
1978
1978
  queryParams: {
1979
1979
  content: "metadata",
@@ -1993,7 +1993,7 @@ const uo = ({ collectionId: e, onError: t }) => {
1993
1993
  try {
1994
1994
  const c = de({
1995
1995
  representativeItems: Array.isArray(u) ? u : [u]
1996
- }), p = await j.updateCollectionMetadata({
1996
+ }), p = await V.updateCollectionMetadata({
1997
1997
  collectionId: e,
1998
1998
  metadataDocument: c
1999
1999
  });
@@ -2106,8 +2106,8 @@ function fo(e, t, n, r, o, s, a, i) {
2106
2106
  name: "V3_sport_Team",
2107
2107
  mode: "add"
2108
2108
  };
2109
- R.field.forEach((I) => {
2110
- N.field.push(I);
2109
+ R.field.forEach((_) => {
2110
+ N.field.push(_);
2111
2111
  }), h.includes(A) && v.push(N);
2112
2112
  });
2113
2113
  const g = {
@@ -2122,7 +2122,7 @@ function fo(e, t, n, r, o, s, a, i) {
2122
2122
  }, y = [...new Set(h)], S = [];
2123
2123
  y.forEach((R) => {
2124
2124
  const A = t.itemType.metadata.timespan[0].group.find(
2125
- (N, I) => R === I
2125
+ (N, _) => R === _
2126
2126
  );
2127
2127
  S.push(A.uuid);
2128
2128
  });
@@ -2154,7 +2154,7 @@ function nn({
2154
2154
  data: s = {},
2155
2155
  isLoading: a,
2156
2156
  isError: i
2157
- } = W(Ne.getEntityMetadata), l = () => o({ entity: e, entityId: t, queryParams: n });
2157
+ } = k(Ne.getEntityMetadata), l = () => o({ entity: e, entityId: t, queryParams: n });
2158
2158
  return Z(() => {
2159
2159
  r && l();
2160
2160
  }, [e, t, n]), {
@@ -2170,7 +2170,7 @@ function on({ groupName: e, queryParams: t = {}, refreshOnMount: n = !0 }) {
2170
2170
  data: o = {},
2171
2171
  isLoading: s,
2172
2172
  isError: a
2173
- } = W(Ke.getFieldGroup), i = () => r({ groupName: e, queryParams: t });
2173
+ } = k(Ke.getFieldGroup), i = () => r({ groupName: e, queryParams: t });
2174
2174
  return Z(() => {
2175
2175
  n && i();
2176
2176
  }, [e, t]), {
@@ -2202,8 +2202,8 @@ function mo({
2202
2202
  ...i,
2203
2203
  ...u,
2204
2204
  itemType: e
2205
- }, p = (m) => oe(m, c);
2206
- return ne.map(a, p);
2205
+ }, p = (m) => se(m, c);
2206
+ return oe.map(a, p);
2207
2207
  }
2208
2208
  function po({
2209
2209
  itemSearchDocument: e,
@@ -2218,7 +2218,7 @@ function po({
2218
2218
  data: i = {},
2219
2219
  isLoading: l,
2220
2220
  isError: u
2221
- } = W(j.searchCollection, o, r), c = () => a({ itemSearchDocument: e, queryParams: t, matrixParams: n });
2221
+ } = k(V.searchCollection, o, r), c = () => a({ itemSearchDocument: e, queryParams: t, matrixParams: n });
2222
2222
  Z(() => {
2223
2223
  c();
2224
2224
  }, [e, t, n]);
@@ -2230,8 +2230,8 @@ function po({
2230
2230
  onRefresh: c,
2231
2231
  isLoading: l,
2232
2232
  isError: u
2233
- }, m = (d) => oe(d, p);
2234
- return ne.map(s, m);
2233
+ }, m = (d) => se(d, p);
2234
+ return oe.map(s, m);
2235
2235
  }
2236
2236
  function ho({ itemSearchDocument: e, queryParams: t, matrixParams: n, children: r }) {
2237
2237
  const { itemListType: o, onRefresh: s, isLoading: a, isError: i } = Or({
@@ -2246,8 +2246,8 @@ function ho({ itemSearchDocument: e, queryParams: t, matrixParams: n, children:
2246
2246
  onRefresh: s,
2247
2247
  isLoading: a,
2248
2248
  isError: i
2249
- }, u = (c) => oe(c, l);
2250
- return ne.map(r, u);
2249
+ }, u = (c) => se(c, l);
2250
+ return oe.map(r, u);
2251
2251
  }
2252
2252
  function Eo({
2253
2253
  itemSearchDocument: e,
@@ -2260,7 +2260,7 @@ function Eo({
2260
2260
  data: s = {},
2261
2261
  isLoading: a,
2262
2262
  isError: i
2263
- } = W(Xe.searchItemCollection), l = () => o({ itemSearchDocument: e, queryParams: t, matrixParams: n });
2263
+ } = k(Xe.searchItemCollection), l = () => o({ itemSearchDocument: e, queryParams: t, matrixParams: n });
2264
2264
  Z(() => {
2265
2265
  l();
2266
2266
  }, [e, t, n]);
@@ -2272,8 +2272,8 @@ function Eo({
2272
2272
  onRefresh: l,
2273
2273
  isLoading: a,
2274
2274
  isError: i
2275
- }, c = (p) => oe(p, u);
2276
- return ne.map(r, c);
2275
+ }, c = (p) => se(p, u);
2276
+ return oe.map(r, c);
2277
2277
  }
2278
2278
  function go({ itemId: e, queryParams: t, refreshOnMount: n, children: r }) {
2279
2279
  const { itemType: o, onRefresh: s, isLoading: a, isError: i } = Qr({
@@ -2287,8 +2287,8 @@ function go({ itemId: e, queryParams: t, refreshOnMount: n, children: r }) {
2287
2287
  onRefresh: s,
2288
2288
  isLoading: a,
2289
2289
  isError: i
2290
- }, u = (c) => oe(c, l);
2291
- return ne.map(r, u);
2290
+ }, u = (c) => se(c, l);
2291
+ return oe.map(r, u);
2292
2292
  }
2293
2293
  function yo({
2294
2294
  collectionId: e,
@@ -2307,11 +2307,11 @@ function yo({
2307
2307
  onRefresh: s,
2308
2308
  isLoading: a,
2309
2309
  isError: i
2310
- }, u = (c) => oe(c, l);
2311
- return ne.map(r, u);
2310
+ }, u = (c) => se(c, l);
2311
+ return oe.map(r, u);
2312
2312
  }
2313
2313
  function Ao({ matrixParams: e, queryParams: t, children: n }) {
2314
- const { request: r, data: o = {}, isLoading: s, isError: a } = W(Ze.listJob), i = () => r({ matrixParams: e, queryParams: t });
2314
+ const { request: r, data: o = {}, isLoading: s, isError: a } = k(Ze.listJob), i = () => r({ matrixParams: e, queryParams: t });
2315
2315
  Z(() => {
2316
2316
  i();
2317
2317
  }, [e, t]);
@@ -2322,11 +2322,11 @@ function Ao({ matrixParams: e, queryParams: t, children: n }) {
2322
2322
  isLoading: s,
2323
2323
  isError: a,
2324
2324
  jobs: o
2325
- }, u = (c) => oe(c, l);
2326
- return ne.map(n, u);
2325
+ }, u = (c) => se(c, l);
2326
+ return oe.map(n, u);
2327
2327
  }
2328
2328
  function Co({ entityId: e, entityType: t, queryParams: n, children: r }) {
2329
- const { request: o, data: s = {}, isLoading: a } = W(Pe.listEntityAccess), i = () => o({ entityId: e, entityType: t, queryParams: n });
2329
+ const { request: o, data: s = {}, isLoading: a } = k(Pe.listEntityAccess), i = () => o({ entityId: e, entityType: t, queryParams: n });
2330
2330
  $(() => {
2331
2331
  i();
2332
2332
  }, [e, t, n]);
@@ -2337,8 +2337,8 @@ function Co({ entityId: e, entityType: t, queryParams: n, children: r }) {
2337
2337
  accessControlList: s,
2338
2338
  onRefresh: i,
2339
2339
  isLoading: a
2340
- }, u = (c) => oe(c, l);
2341
- return ne.map(r, u);
2340
+ }, u = (c) => se(c, l);
2341
+ return oe.map(r, u);
2342
2342
  }
2343
2343
  class lt extends Je {
2344
2344
  constructor(t) {
@@ -2351,8 +2351,8 @@ class lt extends Je {
2351
2351
  t.serverUrl !== n && (n ? J.defaultClient.defaults.baseURL = n : delete J.defaultClient.defaults.baseURL), t.token !== r && (r ? J.defaultClient.defaults.headers.Authorization = `token ${r}` : delete J.defaultClient.defaults.headers.Authorization), !r && (t.username !== o || t.password !== s) && (J.defaultClient.defaults.auth = { username: o, password: s }), t.runAs !== a && (a ? J.defaultClient.defaults.headers.RunAs = a : delete J.defaultClient.defaults.headers.RunAs);
2352
2352
  }
2353
2353
  render() {
2354
- const { children: t, username: n, serverUrl: r } = this.props, o = { username: n, serverUrl: r }, s = (a) => oe(a, o);
2355
- return ne.map(t, s);
2354
+ const { children: t, username: n, serverUrl: r } = this.props, o = { username: n, serverUrl: r }, s = (a) => se(a, o);
2355
+ return oe.map(t, s);
2356
2356
  }
2357
2357
  }
2358
2358
  const ye = "VIDISPINE-TOKEN", Ae = "VIDISPINE-USERNAME", Ce = "VIDISPINE-SERVER-URL", Se = "VIDISPINE-REMEMBER-ME", sn = ({ userName: e, password: t, serverUrl: n }) => {
@@ -2482,8 +2482,8 @@ function vo({ groupName: e, queryParams: t, refreshOnMount: n, children: r }) {
2482
2482
  onRefresh: s,
2483
2483
  isLoading: a,
2484
2484
  isError: i
2485
- }, u = (c) => oe(c, l);
2486
- return ne.map(r, u);
2485
+ }, u = (c) => se(c, l);
2486
+ return oe.map(r, u);
2487
2487
  }
2488
2488
  const dt = Ee();
2489
2489
  function To({ intialState: e = {}, onRefresh: t, userName: n, children: r }) {
@@ -2551,8 +2551,8 @@ function No({
2551
2551
  isError: l
2552
2552
  };
2553
2553
  e === "collection" ? u.collectionId = t : e === "item" && (u.itemId = t);
2554
- const c = (p) => oe(p, u);
2555
- return ne.map(o, c);
2554
+ const c = (p) => se(p, u);
2555
+ return oe.map(o, c);
2556
2556
  }
2557
2557
  const Io = (e, t = {}) => (n) => /* @__PURE__ */ B(cn, { ...t, children: /* @__PURE__ */ B(e, { ...n }) }), _o = (...e) => e.reduce(
2558
2558
  (t, n) => (...r) => t(n(...r)),
@@ -2798,10 +2798,10 @@ function pn() {
2798
2798
  element: S(),
2799
2799
  elementType: R(),
2800
2800
  instanceOf: A,
2801
- node: V(),
2802
- objectOf: I,
2801
+ node: j(),
2802
+ objectOf: _,
2803
2803
  oneOf: N,
2804
- oneOfType: O,
2804
+ oneOfType: G,
2805
2805
  shape: Q,
2806
2806
  exact: re
2807
2807
  };
@@ -2814,34 +2814,34 @@ function pn() {
2814
2814
  f.prototype = Error.prototype;
2815
2815
  function C(E) {
2816
2816
  if (process.env.NODE_ENV !== "production")
2817
- var T = {}, D = 0;
2818
- function b(H, G, w, L, F, U, ee) {
2819
- if (L = L || m, U = U || w, ee !== n) {
2817
+ var T = {}, O = 0;
2818
+ function w(H, b, D, L, F, U, ee) {
2819
+ if (L = L || m, U = U || D, ee !== n) {
2820
2820
  if (l) {
2821
- var z = new Error(
2821
+ var K = new Error(
2822
2822
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
2823
2823
  );
2824
- throw z.name = "Invariant Violation", z;
2824
+ throw K.name = "Invariant Violation", K;
2825
2825
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
2826
- var le = L + ":" + w;
2826
+ var le = L + ":" + D;
2827
2827
  !T[le] && // Avoid spamming the console because they are often not actionable except for lib authors
2828
- D < 3 && (s(
2828
+ O < 3 && (s(
2829
2829
  "You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
2830
- ), T[le] = !0, D++);
2830
+ ), T[le] = !0, O++);
2831
2831
  }
2832
2832
  }
2833
- return G[w] == null ? H ? G[w] === null ? new f("The " + F + " `" + U + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new f("The " + F + " `" + U + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : E(G, w, L, F, U);
2833
+ return b[D] == null ? H ? b[D] === null ? new f("The " + F + " `" + U + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new f("The " + F + " `" + U + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : E(b, D, L, F, U);
2834
2834
  }
2835
- var _ = b.bind(null, !1);
2836
- return _.isRequired = b.bind(null, !0), _;
2835
+ var I = w.bind(null, !1);
2836
+ return I.isRequired = w.bind(null, !0), I;
2837
2837
  }
2838
2838
  function v(E) {
2839
- function T(D, b, _, H, G, w) {
2840
- var L = D[b], F = ie(L);
2839
+ function T(O, w, I, H, b, D) {
2840
+ var L = O[w], F = ie(L);
2841
2841
  if (F !== E) {
2842
2842
  var U = me(L);
2843
2843
  return new f(
2844
- "Invalid " + H + " `" + G + "` of type " + ("`" + U + "` supplied to `" + _ + "`, expected ") + ("`" + E + "`."),
2844
+ "Invalid " + H + " `" + b + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + E + "`."),
2845
2845
  { expectedType: E }
2846
2846
  );
2847
2847
  }
@@ -2853,16 +2853,16 @@ function pn() {
2853
2853
  return C(a);
2854
2854
  }
2855
2855
  function y(E) {
2856
- function T(D, b, _, H, G) {
2856
+ function T(O, w, I, H, b) {
2857
2857
  if (typeof E != "function")
2858
- return new f("Property `" + G + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
2859
- var w = D[b];
2860
- if (!Array.isArray(w)) {
2861
- var L = ie(w);
2862
- return new f("Invalid " + H + " `" + G + "` of type " + ("`" + L + "` supplied to `" + _ + "`, expected an array."));
2858
+ return new f("Property `" + b + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
2859
+ var D = O[w];
2860
+ if (!Array.isArray(D)) {
2861
+ var L = ie(D);
2862
+ return new f("Invalid " + H + " `" + b + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an array."));
2863
2863
  }
2864
- for (var F = 0; F < w.length; F++) {
2865
- var U = E(w, F, _, H, G + "[" + F + "]", n);
2864
+ for (var F = 0; F < D.length; F++) {
2865
+ var U = E(D, F, I, H, b + "[" + F + "]", n);
2866
2866
  if (U instanceof Error)
2867
2867
  return U;
2868
2868
  }
@@ -2871,32 +2871,32 @@ function pn() {
2871
2871
  return C(T);
2872
2872
  }
2873
2873
  function S() {
2874
- function E(T, D, b, _, H) {
2875
- var G = T[D];
2876
- if (!i(G)) {
2877
- var w = ie(G);
2878
- return new f("Invalid " + _ + " `" + H + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement."));
2874
+ function E(T, O, w, I, H) {
2875
+ var b = T[O];
2876
+ if (!i(b)) {
2877
+ var D = ie(b);
2878
+ return new f("Invalid " + I + " `" + H + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected a single ReactElement."));
2879
2879
  }
2880
2880
  return null;
2881
2881
  }
2882
2882
  return C(E);
2883
2883
  }
2884
2884
  function R() {
2885
- function E(T, D, b, _, H) {
2886
- var G = T[D];
2887
- if (!e.isValidElementType(G)) {
2888
- var w = ie(G);
2889
- return new f("Invalid " + _ + " `" + H + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement type."));
2885
+ function E(T, O, w, I, H) {
2886
+ var b = T[O];
2887
+ if (!e.isValidElementType(b)) {
2888
+ var D = ie(b);
2889
+ return new f("Invalid " + I + " `" + H + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected a single ReactElement type."));
2890
2890
  }
2891
2891
  return null;
2892
2892
  }
2893
2893
  return C(E);
2894
2894
  }
2895
2895
  function A(E) {
2896
- function T(D, b, _, H, G) {
2897
- if (!(D[b] instanceof E)) {
2898
- var w = E.name || m, L = Tt(D[b]);
2899
- return new f("Invalid " + H + " `" + G + "` of type " + ("`" + L + "` supplied to `" + _ + "`, expected ") + ("instance of `" + w + "`."));
2896
+ function T(O, w, I, H, b) {
2897
+ if (!(O[w] instanceof E)) {
2898
+ var D = E.name || m, L = Tt(O[w]);
2899
+ return new f("Invalid " + H + " `" + b + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected ") + ("instance of `" + D + "`."));
2900
2900
  }
2901
2901
  return null;
2902
2902
  }
@@ -2907,28 +2907,28 @@ function pn() {
2907
2907
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
2908
2908
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
2909
2909
  ) : s("Invalid argument supplied to oneOf, expected an array.")), a;
2910
- function T(D, b, _, H, G) {
2911
- for (var w = D[b], L = 0; L < E.length; L++)
2912
- if (h(w, E[L]))
2910
+ function T(O, w, I, H, b) {
2911
+ for (var D = O[w], L = 0; L < E.length; L++)
2912
+ if (h(D, E[L]))
2913
2913
  return null;
2914
- var F = JSON.stringify(E, function(ee, z) {
2915
- var le = me(z);
2916
- return le === "symbol" ? String(z) : z;
2914
+ var F = JSON.stringify(E, function(ee, K) {
2915
+ var le = me(K);
2916
+ return le === "symbol" ? String(K) : K;
2917
2917
  });
2918
- return new f("Invalid " + H + " `" + G + "` of value `" + String(w) + "` " + ("supplied to `" + _ + "`, expected one of " + F + "."));
2918
+ return new f("Invalid " + H + " `" + b + "` of value `" + String(D) + "` " + ("supplied to `" + I + "`, expected one of " + F + "."));
2919
2919
  }
2920
2920
  return C(T);
2921
2921
  }
2922
- function I(E) {
2923
- function T(D, b, _, H, G) {
2922
+ function _(E) {
2923
+ function T(O, w, I, H, b) {
2924
2924
  if (typeof E != "function")
2925
- return new f("Property `" + G + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
2926
- var w = D[b], L = ie(w);
2925
+ return new f("Property `" + b + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
2926
+ var D = O[w], L = ie(D);
2927
2927
  if (L !== "object")
2928
- return new f("Invalid " + H + " `" + G + "` of type " + ("`" + L + "` supplied to `" + _ + "`, expected an object."));
2929
- for (var F in w)
2930
- if (r(w, F)) {
2931
- var U = E(w, F, _, H, G + "." + F, n);
2928
+ return new f("Invalid " + H + " `" + b + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected an object."));
2929
+ for (var F in D)
2930
+ if (r(D, F)) {
2931
+ var U = E(D, F, I, H, b + "." + F, n);
2932
2932
  if (U instanceof Error)
2933
2933
  return U;
2934
2934
  }
@@ -2936,49 +2936,49 @@ function pn() {
2936
2936
  }
2937
2937
  return C(T);
2938
2938
  }
2939
- function O(E) {
2939
+ function G(E) {
2940
2940
  if (!Array.isArray(E))
2941
2941
  return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
2942
2942
  for (var T = 0; T < E.length; T++) {
2943
- var D = E[T];
2944
- if (typeof D != "function")
2943
+ var O = E[T];
2944
+ if (typeof O != "function")
2945
2945
  return s(
2946
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + vt(D) + " at index " + T + "."
2946
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + vt(O) + " at index " + T + "."
2947
2947
  ), a;
2948
2948
  }
2949
- function b(_, H, G, w, L) {
2949
+ function w(I, H, b, D, L) {
2950
2950
  for (var F = [], U = 0; U < E.length; U++) {
2951
- var ee = E[U], z = ee(_, H, G, w, L, n);
2952
- if (z == null)
2951
+ var ee = E[U], K = ee(I, H, b, D, L, n);
2952
+ if (K == null)
2953
2953
  return null;
2954
- z.data && r(z.data, "expectedType") && F.push(z.data.expectedType);
2954
+ K.data && r(K.data, "expectedType") && F.push(K.data.expectedType);
2955
2955
  }
2956
2956
  var le = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
2957
- return new f("Invalid " + w + " `" + L + "` supplied to " + ("`" + G + "`" + le + "."));
2957
+ return new f("Invalid " + D + " `" + L + "` supplied to " + ("`" + b + "`" + le + "."));
2958
2958
  }
2959
- return C(b);
2959
+ return C(w);
2960
2960
  }
2961
- function V() {
2962
- function E(T, D, b, _, H) {
2963
- return ae(T[D]) ? null : new f("Invalid " + _ + " `" + H + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
2961
+ function j() {
2962
+ function E(T, O, w, I, H) {
2963
+ return ne(T[O]) ? null : new f("Invalid " + I + " `" + H + "` supplied to " + ("`" + w + "`, expected a ReactNode."));
2964
2964
  }
2965
2965
  return C(E);
2966
2966
  }
2967
- function k(E, T, D, b, _) {
2967
+ function W(E, T, O, w, I) {
2968
2968
  return new f(
2969
- (E || "React class") + ": " + T + " type `" + D + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
2969
+ (E || "React class") + ": " + T + " type `" + O + "." + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
2970
2970
  );
2971
2971
  }
2972
2972
  function Q(E) {
2973
- function T(D, b, _, H, G) {
2974
- var w = D[b], L = ie(w);
2973
+ function T(O, w, I, H, b) {
2974
+ var D = O[w], L = ie(D);
2975
2975
  if (L !== "object")
2976
- return new f("Invalid " + H + " `" + G + "` of type `" + L + "` " + ("supplied to `" + _ + "`, expected `object`."));
2976
+ return new f("Invalid " + H + " `" + b + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
2977
2977
  for (var F in E) {
2978
2978
  var U = E[F];
2979
2979
  if (typeof U != "function")
2980
- return k(_, H, G, F, me(U));
2981
- var ee = U(w, F, _, H, G + "." + F, n);
2980
+ return W(I, H, b, F, me(U));
2981
+ var ee = U(D, F, I, H, b + "." + F, n);
2982
2982
  if (ee)
2983
2983
  return ee;
2984
2984
  }
@@ -2987,29 +2987,29 @@ function pn() {
2987
2987
  return C(T);
2988
2988
  }
2989
2989
  function re(E) {
2990
- function T(D, b, _, H, G) {
2991
- var w = D[b], L = ie(w);
2990
+ function T(O, w, I, H, b) {
2991
+ var D = O[w], L = ie(D);
2992
2992
  if (L !== "object")
2993
- return new f("Invalid " + H + " `" + G + "` of type `" + L + "` " + ("supplied to `" + _ + "`, expected `object`."));
2994
- var F = t({}, D[b], E);
2993
+ return new f("Invalid " + H + " `" + b + "` of type `" + L + "` " + ("supplied to `" + I + "`, expected `object`."));
2994
+ var F = t({}, O[w], E);
2995
2995
  for (var U in F) {
2996
2996
  var ee = E[U];
2997
2997
  if (r(E, U) && typeof ee != "function")
2998
- return k(_, H, G, U, me(ee));
2998
+ return W(I, H, b, U, me(ee));
2999
2999
  if (!ee)
3000
3000
  return new f(
3001
- "Invalid " + H + " `" + G + "` key `" + U + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(D[b], null, " ") + `
3001
+ "Invalid " + H + " `" + b + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(O[w], null, " ") + `
3002
3002
  Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
3003
3003
  );
3004
- var z = ee(w, U, _, H, G + "." + U, n);
3005
- if (z)
3006
- return z;
3004
+ var K = ee(D, U, I, H, b + "." + U, n);
3005
+ if (K)
3006
+ return K;
3007
3007
  }
3008
3008
  return null;
3009
3009
  }
3010
3010
  return C(T);
3011
3011
  }
3012
- function ae(E) {
3012
+ function ne(E) {
3013
3013
  switch (typeof E) {
3014
3014
  case "number":
3015
3015
  case "string":
@@ -3019,20 +3019,20 @@ Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
3019
3019
  return !E;
3020
3020
  case "object":
3021
3021
  if (Array.isArray(E))
3022
- return E.every(ae);
3022
+ return E.every(ne);
3023
3023
  if (E === null || i(E))
3024
3024
  return !0;
3025
3025
  var T = p(E);
3026
3026
  if (T) {
3027
- var D = T.call(E), b;
3027
+ var O = T.call(E), w;
3028
3028
  if (T !== E.entries) {
3029
- for (; !(b = D.next()).done; )
3030
- if (!ae(b.value))
3029
+ for (; !(w = O.next()).done; )
3030
+ if (!ne(w.value))
3031
3031
  return !1;
3032
3032
  } else
3033
- for (; !(b = D.next()).done; ) {
3034
- var _ = b.value;
3035
- if (_ && !ae(_[1]))
3033
+ for (; !(w = O.next()).done; ) {
3034
+ var I = w.value;
3035
+ if (I && !ne(I[1]))
3036
3036
  return !1;
3037
3037
  }
3038
3038
  } else
@@ -3165,7 +3165,7 @@ function yt({
3165
3165
  const [i, l] = fe(yn, {
3166
3166
  settings: r,
3167
3167
  userName: e
3168
- }), u = K();
3168
+ }), u = z();
3169
3169
  return $(() => {
3170
3170
  const { userName: c } = i;
3171
3171
  !s || !c || s({
@@ -3295,7 +3295,7 @@ function Ct({
3295
3295
  token: l,
3296
3296
  children: u
3297
3297
  }) {
3298
- const { data: c, request: p } = W(X.getUser), [m, d, h] = nt([
3298
+ const { data: c, request: p } = k(X.getUser), [m, d, h] = nt([
3299
3299
  ve,
3300
3300
  pe,
3301
3301
  Te,
@@ -3305,51 +3305,51 @@ function Ct({
3305
3305
  [pe]: C = i,
3306
3306
  [Te]: v = a
3307
3307
  } = m, g = m[Re] === "true", { maxAge: y } = e, S = P(
3308
- (I) => {
3309
- let O;
3308
+ (G) => {
3309
+ let j;
3310
3310
  try {
3311
- return r({ maxAge: y, ...I }).then((V) => {
3311
+ return r({ maxAge: y, ...G }).then((W) => {
3312
3312
  const {
3313
- userName: k,
3314
- serverUrl: Q,
3315
- rememberMe: re
3316
- } = I;
3317
- k && d(pe, k, e), Q && d(Te, Q, e), re && d(Re, re, e), V && d(ve, V, e), p({ userName: k }), o && o(I);
3318
- }).catch((V) => {
3319
- O = V, s && s(O);
3313
+ userName: Q,
3314
+ serverUrl: re,
3315
+ rememberMe: ne
3316
+ } = G;
3317
+ Q && d(pe, Q, e), re && d(Te, re, e), ne && d(Re, ne, e), W && d(ve, W, e), p({ userName: Q }), o && o(G);
3318
+ }).catch((W) => {
3319
+ j = W, s && s(j);
3320
3320
  });
3321
- } catch (V) {
3322
- O = V, s && s(O);
3321
+ } catch (W) {
3322
+ j = W, s && s(j);
3323
3323
  }
3324
- return O;
3324
+ return j;
3325
3325
  },
3326
3326
  [e, y, s, r, o, p, d]
3327
3327
  ), R = P(() => {
3328
3328
  h(ve, e), g || (h(pe, e), h(Te, e), h(Re, e));
3329
- }, [e, g, h]), A = K();
3329
+ }, [e, g, h]), A = z(), N = z();
3330
3330
  $(() => (f && (A.current && J.defaultClient.interceptors.response.eject(A.current), A.current = J.defaultClient.interceptors.response.use(
3331
- (I) => I,
3332
- (I) => {
3333
- if (I.response)
3334
- I.response.status === 401 && (R(), s && s(Error(Be)));
3331
+ (G) => G,
3332
+ (G) => {
3333
+ if (G.response)
3334
+ G.response.status === 401 && (R(), s && s(Error(Be)));
3335
3335
  else {
3336
- const { config: { baseURL: O } = {} } = I;
3337
- et.getSelfTest({ baseURL: O }).then(() => {
3338
- R(), s && s(Error(Be));
3339
- }).catch(() => null);
3336
+ const { config: { baseURL: j } = {} } = G;
3337
+ N.current !== !0 && (N.current = !0, et.getSelfTest({ baseURL: j }).then(() => {
3338
+ N.current = void 0, R(), s && s(Error(Be));
3339
+ }).catch(() => (N.current = void 0, null)));
3340
3340
  }
3341
- return Promise.reject(I);
3341
+ return Promise.reject(G);
3342
3342
  }
3343
3343
  )), () => {
3344
3344
  A.current && J.defaultClient.interceptors.response.eject(A.current);
3345
3345
  }), [R, s, f]), $(() => {
3346
3346
  f && C === void 0 && X.whoAmI().then(
3347
- ({ data: I }) => d(pe, I, e)
3347
+ ({ data: G }) => d(pe, G, e)
3348
3348
  );
3349
3349
  }, [C, f]), $(() => {
3350
3350
  f && v && a && v !== a && (R(), s && s(Error(Tn)));
3351
3351
  }, [f, v, a, R, s]);
3352
- const N = he(
3352
+ const _ = he(
3353
3353
  () => ({
3354
3354
  serverUrl: v,
3355
3355
  token: f,
@@ -3360,7 +3360,7 @@ function Ct({
3360
3360
  }),
3361
3361
  [S, R, v, f, C, c]
3362
3362
  );
3363
- return f ? /* @__PURE__ */ B(lt, { token: f, username: C, serverUrl: v, children: /* @__PURE__ */ B(At.Provider, { value: N, children: u }) }) : /* @__PURE__ */ B(
3363
+ return f ? /* @__PURE__ */ B(lt, { token: f, username: C, serverUrl: v, children: /* @__PURE__ */ B(At.Provider, { value: _, children: u }) }) : /* @__PURE__ */ B(
3364
3364
  t,
3365
3365
  {
3366
3366
  onLogin: S,
@@ -3407,7 +3407,7 @@ const wo = () => {
3407
3407
  }, Pn = ({ entityId: e, entityType: t, collectionId: n, rootParentId: r, onError: o }) => {
3408
3408
  if (n && n !== r)
3409
3409
  try {
3410
- return j.addCollectionEntity({
3410
+ return V.addCollectionEntity({
3411
3411
  collectionId: n,
3412
3412
  entityId: e,
3413
3413
  queryParams: {
@@ -3429,7 +3429,7 @@ const wo = () => {
3429
3429
  }) => {
3430
3430
  if (n && n !== r)
3431
3431
  try {
3432
- return j.removeCollectionEntity({
3432
+ return V.removeCollectionEntity({
3433
3433
  collectionId: n,
3434
3434
  entityId: e,
3435
3435
  queryParams: {
@@ -3585,7 +3585,7 @@ export {
3585
3585
  Do as handleMoveEntity,
3586
3586
  Nn as handleRemoveEntity,
3587
3587
  Bn as useAddMetadataFieldAttributes,
3588
- W as useApi,
3588
+ k as useApi,
3589
3589
  wo as useAuthContext,
3590
3590
  Un as useAutocomplete,
3591
3591
  oo as useCollectionAutoPlay,