quantum-component-library 1.4.54-dev.1 → 1.4.55-dev.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.
@@ -1,21 +1,21 @@
1
1
  import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
2
2
  import "./moment-vendor-DMLRxgRE.js";
3
- import { Flex as Ie, InputGroup as it, InputLeftElement as Pt, Icon as yt, Input as ve, FormLabel as Xe, ButtonGroup as Ae, Tooltip as nt, Button as se, Box as te, RangeSlider as Gt, RangeSliderMark as tt, Text as S, RangeSliderTrack as Et, RangeSliderFilledTrack as _t, RangeSliderThumb as lt, Select as ct, NumberInput as dt, NumberInputField as ut, HStack as re, Tag as $e, FormControl as Y, TableContainer as zt, Table as Bt, Thead as Wt, Tr as mt, Th as Re, Tbody as Ut, Td as _e, Image as Qt, useToast as vt, VStack as ue, RadioGroup as Ct, Radio as Ye, Alert as He, AlertIcon as Je, Spinner as wt, useDisclosure as qt, Modal as Kt, ModalOverlay as Yt, ModalContent as Ht, ModalHeader as Jt, ModalCloseButton as Xt, ModalBody as Zt, ModalFooter as Vt, Badge as St, IconButton as en, Tabs as tn, TabList as nn, Tab as ht, TabPanels as sn, TabPanel as pt, Textarea as ze } from "@chakra-ui/react";
3
+ import { Flex as Ie, InputGroup as lt, InputLeftElement as Ft, Icon as vt, Input as ve, FormLabel as Ze, ButtonGroup as ke, Tooltip as st, Button as re, Box as ne, RangeSlider as Gt, RangeSliderMark as nt, Text as S, RangeSliderTrack as Et, RangeSliderFilledTrack as _t, RangeSliderThumb as ct, Select as dt, NumberInput as ut, NumberInputField as mt, HStack as te, Tag as De, FormControl as Y, TableContainer as zt, Table as Bt, Thead as Wt, Tr as ht, Th as $e, Tbody as Ut, Td as ze, Image as Qt, useToast as Ct, VStack as ue, RadioGroup as wt, Radio as He, Alert as Je, AlertIcon as Xe, Spinner as St, useDisclosure as qt, Modal as Kt, ModalOverlay as Yt, ModalContent as Ht, ModalHeader as Jt, ModalCloseButton as Xt, ModalBody as Zt, ModalFooter as Vt, Badge as Oe, IconButton as en, Tabs as tn, TabList as nn, Tab as pt, TabPanels as sn, TabPanel as gt, Textarea as Be } from "@chakra-ui/react";
4
4
  import { useMemo as k, useState as _, useEffect as le, useCallback as G, createContext as rn, useContext as on, memo as Me, useRef as an } from "react";
5
5
  import { getFragmentData as I } from "./generated.js";
6
- import { G as st, M as je, a as be, b as Lt, c as ln, C as rt, d as It, e as Mt, R as Ze, f as De, T as Oe, A as Ce, g as cn, h as Ot, U as At, i as Qe, j as kt, k as dn, l as un, m as mn, n as hn, o as pn, p as gn } from "./graphql-CN-pqRpK.js";
7
- import { c as qe } from "./utils-cn-CgdSr4hO.js";
6
+ import { G as rt, M as je, a as be, b as Lt, c as ln, C as ot, d as It, e as Mt, R as Ve, f as Pe, T as Ae, A as Ce, g as cn, h as Ot, U as At, i as qe, j as kt, k as dn, l as un, m as mn, n as hn, o as pn, p as gn } from "./graphql-CN-pqRpK.js";
7
+ import { c as Ke } from "./utils-cn-CgdSr4hO.js";
8
8
  import "./lodash-vendor-CY4G3-79.js";
9
- import { useClient as ot, useQuery as we, useMutation as fe } from "urql";
9
+ import { useClient as at, useQuery as we, useMutation as fe } from "urql";
10
10
  import { useUiLabelContext as xe, useAllPartParameters as xn } from "./hooks.js";
11
11
  import { u as fn } from "./ufuzzy-vendor-Dl0ZI6Av.js";
12
12
  import { s as he } from "./react-select-vendor-B0QF8gkj.js";
13
13
  import { F as jn, a as bn, b as yn, c as vn } from "./react-icons-vendor-CMsTQrA0.js";
14
14
  import { reportKindName as Le } from "./services.js";
15
15
  import { D as Cn, H as wn, u as Sn, a as Ln } from "./react-dnd-vendor-DYesaYGm.js";
16
- import { g as Tt, a as Nt, b as In, c as Mn, d as On, e as gt, f as xt } from "./services-human-D5IllQkM.js";
17
- import { ThresholdKind as Ke, ReportKind as ae, ActionLaterality as An, SensorLocation as me } from "./generated-graphql.js";
18
- import { availablePlanes as ft, getAnalysisPartIdNoSide as Be } from "./types.js";
16
+ import { g as Tt, a as Nt, b as In, c as Mn, d as On, e as xt, f as ft } from "./services-human-D5IllQkM.js";
17
+ import { ThresholdKind as Ye, ReportKind as ae, ActionLaterality as An, SensorLocation as me } from "./generated-graphql.js";
18
+ import { availablePlanes as jt, getAnalysisPartIdNoSide as We } from "./types.js";
19
19
  const kn = ({
20
20
  setSearch: r,
21
21
  actions: n,
@@ -30,8 +30,8 @@ const kn = ({
30
30
  [n]
31
31
  );
32
32
  return /* @__PURE__ */ e.jsxs(Ie, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
33
- /* @__PURE__ */ e.jsxs(it, { size: "md", flex: 1, children: [
34
- /* @__PURE__ */ e.jsx(Pt, { children: /* @__PURE__ */ e.jsx(yt, { as: jn, color: "gray.300" }) }),
33
+ /* @__PURE__ */ e.jsxs(lt, { size: "md", flex: 1, children: [
34
+ /* @__PURE__ */ e.jsx(Ft, { children: /* @__PURE__ */ e.jsx(vt, { as: jn, color: "gray.300" }) }),
35
35
  /* @__PURE__ */ e.jsx(
36
36
  ve,
37
37
  {
@@ -42,7 +42,7 @@ const kn = ({
42
42
  }
43
43
  )
44
44
  ] }),
45
- !m && /* @__PURE__ */ e.jsx(it, { size: "md", children: /* @__PURE__ */ e.jsx(
45
+ !m && /* @__PURE__ */ e.jsx(lt, { size: "md", children: /* @__PURE__ */ e.jsx(
46
46
  he,
47
47
  {
48
48
  size: "md",
@@ -62,7 +62,7 @@ const kn = ({
62
62
  ] });
63
63
  }, ge = ({
64
64
  children: r
65
- }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: r }), Tn = ({
65
+ }) => /* @__PURE__ */ e.jsx(Ze, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: r }), Tn = ({
66
66
  items: r,
67
67
  onChange: n,
68
68
  selectedItem: i,
@@ -71,8 +71,8 @@ const kn = ({
71
71
  buttonProps: u
72
72
  }) => {
73
73
  const d = (s) => s === i || s.value === i, h = (s) => d(s) ? { ...u, ...g } : u;
74
- return /* @__PURE__ */ e.jsx(Ae, { isAttached: !0, isDisabled: m, children: r.map((s, l) => /* @__PURE__ */ e.jsx(
75
- nt,
74
+ return /* @__PURE__ */ e.jsx(ke, { isAttached: !0, isDisabled: m, children: r.map((s, l) => /* @__PURE__ */ e.jsx(
75
+ st,
76
76
  {
77
77
  label: s.tooltip,
78
78
  openDelay: 50,
@@ -81,7 +81,7 @@ const kn = ({
81
81
  visibility: s.tooltip ? "visible" : "hidden",
82
82
  hasArrow: !0,
83
83
  children: /* @__PURE__ */ e.jsx(
84
- se,
84
+ re,
85
85
  {
86
86
  onClick: () => d(s) ? null : n(s, l),
87
87
  isDisabled: s.disabled,
@@ -92,7 +92,7 @@ const kn = ({
92
92
  },
93
93
  l
94
94
  )) });
95
- }, We = (r, n) => n < 0 ? -1 * Math.abs(r) : Math.abs(r), Nn = ({
95
+ }, Ue = (r, n) => n < 0 ? -1 * Math.abs(r) : Math.abs(r), Nn = ({
96
96
  isReversed: r,
97
97
  min: n,
98
98
  max: i,
@@ -123,18 +123,18 @@ const kn = ({
123
123
  [g]
124
124
  ), J = G(() => {
125
125
  w(([N, z]) => {
126
- const X = isNaN(Number(N)) ? n : Number(N), W = isNaN(Number(z)) ? i : Number(z), H = We(Number(X), C), c = We(Number(W), j), t = C < 0 ? Math.max(H, n) : Math.min(H, i), o = j < 0 ? Math.max(c, n) : Math.min(c, i);
126
+ const X = isNaN(Number(N)) ? n : Number(N), W = isNaN(Number(z)) ? i : Number(z), H = Ue(Number(X), C), c = Ue(Number(W), j), t = C < 0 ? Math.max(H, n) : Math.min(H, i), o = j < 0 ? Math.max(c, n) : Math.min(c, i);
127
127
  return t > o ? (g([o, t]), [o.toFixed(0), t.toFixed(0)]) : (g([t, o]), [t.toFixed(0), o.toFixed(0)]);
128
128
  });
129
129
  }, [g, w, C, j, n, i]), oe = G(
130
130
  (N) => {
131
- const z = N === "" || isNaN(Number(N)) ? N : We(Number(N), C);
131
+ const z = N === "" || isNaN(Number(N)) ? N : Ue(Number(N), C);
132
132
  w(([X, W]) => [z.toString(), W]);
133
133
  },
134
134
  [w, C]
135
135
  ), D = G(
136
136
  (N) => {
137
- const z = N === "" || isNaN(Number(N)) ? N : We(Number(N), j);
137
+ const z = N === "" || isNaN(Number(N)) ? N : Ue(Number(N), j);
138
138
  w(([X, W]) => [X, z.toString()]);
139
139
  },
140
140
  [w, j]
@@ -152,7 +152,7 @@ const kn = ({
152
152
  [y, x, g]
153
153
  );
154
154
  return /* @__PURE__ */ e.jsxs(Ie, { direction: "column", ...L, children: [
155
- /* @__PURE__ */ e.jsx(te, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
155
+ /* @__PURE__ */ e.jsx(ne, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
156
156
  Gt,
157
157
  {
158
158
  "aria-label": ["min", "max"],
@@ -166,7 +166,7 @@ const kn = ({
166
166
  onChangeEnd: T,
167
167
  isDisabled: v,
168
168
  children: [
169
- /* @__PURE__ */ e.jsx(tt, { value: n, top: "-1em", children: /* @__PURE__ */ e.jsx(
169
+ /* @__PURE__ */ e.jsx(nt, { value: n, top: "-1em", children: /* @__PURE__ */ e.jsx(
170
170
  S,
171
171
  {
172
172
  fontSize: d ?? "sm",
@@ -175,7 +175,7 @@ const kn = ({
175
175
  children: s ? s?.(n) : n
176
176
  }
177
177
  ) }),
178
- /* @__PURE__ */ e.jsx(tt, { value: i, top: "-1em", children: /* @__PURE__ */ e.jsx(
178
+ /* @__PURE__ */ e.jsx(nt, { value: i, top: "-1em", children: /* @__PURE__ */ e.jsx(
179
179
  S,
180
180
  {
181
181
  fontSize: d ?? "sm",
@@ -185,10 +185,10 @@ const kn = ({
185
185
  children: s ? s(i) : i
186
186
  }
187
187
  ) }),
188
- a && /* @__PURE__ */ e.jsxs(tt, { value: 0, top: "-1em", pos: "relative", children: [
188
+ a && /* @__PURE__ */ e.jsxs(nt, { value: 0, top: "-1em", pos: "relative", children: [
189
189
  /* @__PURE__ */ e.jsx(S, { fontSize: d, fontWeight: "semibold", children: s?.(0) ?? "0" }),
190
190
  /* @__PURE__ */ e.jsx(
191
- te,
191
+ ne,
192
192
  {
193
193
  position: "absolute",
194
194
  width: "2px",
@@ -200,8 +200,8 @@ const kn = ({
200
200
  )
201
201
  ] }),
202
202
  /* @__PURE__ */ e.jsx(Et, { children: /* @__PURE__ */ e.jsx(_t, {}) }),
203
- /* @__PURE__ */ e.jsx(lt, { index: 0, w: Z, h: Z }),
204
- /* @__PURE__ */ e.jsx(lt, { index: 1, w: Z, h: Z })
203
+ /* @__PURE__ */ e.jsx(ct, { index: 0, w: Z, h: Z }),
204
+ /* @__PURE__ */ e.jsx(ct, { index: 1, w: Z, h: Z })
205
205
  ]
206
206
  }
207
207
  ) }),
@@ -241,7 +241,7 @@ const kn = ({
241
241
  gap: "0.125em",
242
242
  children: [
243
243
  p && /* @__PURE__ */ e.jsxs(
244
- ct,
244
+ dt,
245
245
  {
246
246
  width: "auto",
247
247
  size: d,
@@ -256,7 +256,7 @@ const kn = ({
256
256
  }
257
257
  ),
258
258
  /* @__PURE__ */ e.jsx(
259
- dt,
259
+ ut,
260
260
  {
261
261
  precision: 0,
262
262
  size: d ?? "sm",
@@ -271,7 +271,7 @@ const kn = ({
271
271
  isDisabled: v,
272
272
  ...u,
273
273
  children: /* @__PURE__ */ e.jsx(
274
- ut,
274
+ mt,
275
275
  {
276
276
  backgroundColor: "#fff",
277
277
  paddingRight: 0,
@@ -281,7 +281,7 @@ const kn = ({
281
281
  }
282
282
  ),
283
283
  /* @__PURE__ */ e.jsx(
284
- dt,
284
+ ut,
285
285
  {
286
286
  size: d ?? "sm",
287
287
  min: 0,
@@ -296,7 +296,7 @@ const kn = ({
296
296
  isDisabled: v,
297
297
  ...u,
298
298
  children: /* @__PURE__ */ e.jsx(
299
- ut,
299
+ mt,
300
300
  {
301
301
  backgroundColor: "#fff",
302
302
  paddingRight: 0,
@@ -306,7 +306,7 @@ const kn = ({
306
306
  }
307
307
  ),
308
308
  p && /* @__PURE__ */ e.jsxs(
309
- ct,
309
+ dt,
310
310
  {
311
311
  width: "auto",
312
312
  size: d,
@@ -324,7 +324,7 @@ const kn = ({
324
324
  }
325
325
  )
326
326
  ] });
327
- }, Rn = ({ tags: r, containerProps: n, ...i }) => /* @__PURE__ */ e.jsx(re, { ...n, children: r.map((m, g) => /* @__PURE__ */ e.jsx($e, { ...i, children: m }, g)) }), $n = new fn({}), Dn = ({
327
+ }, Rn = ({ tags: r, containerProps: n, ...i }) => /* @__PURE__ */ e.jsx(te, { ...n, children: r.map((m, g) => /* @__PURE__ */ e.jsx(De, { ...i, children: m }, g)) }), $n = new fn({}), Dn = ({
328
328
  action: r,
329
329
  quantumIconSrc: n
330
330
  }) => {
@@ -332,12 +332,12 @@ const kn = ({
332
332
  actionLowerCase: i("action").toLocaleLowerCase()
333
333
  }), [i]);
334
334
  return r.quantumOwned ? /* @__PURE__ */ e.jsx(
335
- nt,
335
+ st,
336
336
  {
337
337
  label: `This ${m.actionLowerCase} is owned by Quantum`,
338
338
  "aria-label": "Quantum owned",
339
339
  children: /* @__PURE__ */ e.jsx(
340
- te,
340
+ ne,
341
341
  {
342
342
  boxSize: "1.5em",
343
343
  borderRadius: "full",
@@ -357,12 +357,12 @@ const kn = ({
357
357
  )
358
358
  }
359
359
  ) : null;
360
- }, Fn = (r, n) => {
360
+ }, Pn = (r, n) => {
361
361
  if (!n || !n.trim().length)
362
362
  return r;
363
363
  const i = r.map((g) => g.name ?? "");
364
364
  return $n.filter(i, n)?.map((g) => r[g]) ?? [];
365
- }, Pn = (r) => !r || r.length === 0 ? "None" : r.map(
365
+ }, Fn = (r) => !r || r.length === 0 ? "None" : r.map(
366
366
  (n) => (
367
367
  // Convert camelCase to separate words (e.g., 'LeftFoot' -> 'Left Foot')
368
368
  n.replace(/([A-Z])/g, " $1").trim()
@@ -413,7 +413,7 @@ const kn = ({
413
413
  containerProps: y,
414
414
  quantumIconSrc: x = "/favicon.ico"
415
415
  }) => {
416
- const [a, C] = _(""), [j, O] = _(), [R, $] = _([]), [A, T] = _({}), { getLabel: J } = xe(), oe = ot(), D = k(() => ({
416
+ const [a, C] = _(""), [j, O] = _(), [R, $] = _([]), [A, T] = _({}), { getLabel: J } = xe(), oe = at(), D = k(() => ({
417
417
  action: J("action"),
418
418
  actionPlural: J("action_plural"),
419
419
  actionLowerCase: J("action").toLocaleLowerCase(),
@@ -429,7 +429,7 @@ const kn = ({
429
429
  if (!M)
430
430
  return;
431
431
  const t = Z.map(
432
- (o) => oe.query(st, { key: o.key })
432
+ (o) => oe.query(rt, { key: o.key })
433
433
  );
434
434
  Promise.all(t).then((o) => {
435
435
  const b = {};
@@ -453,7 +453,7 @@ const kn = ({
453
453
  const V = k(() => {
454
454
  if (!r)
455
455
  return;
456
- const t = Fn(r, a), o = L ? t : Gn(t, j);
456
+ const t = Pn(r, a), o = L ? t : Gn(t, j);
457
457
  return M ? En(
458
458
  o,
459
459
  R,
@@ -492,11 +492,11 @@ const kn = ({
492
492
  },
493
493
  [Z, A]
494
494
  );
495
- return /* @__PURE__ */ e.jsxs(te, { ...y, children: [
495
+ return /* @__PURE__ */ e.jsxs(ne, { ...y, children: [
496
496
  /* @__PURE__ */ e.jsxs(Ie, { alignContent: "space-between", gap: 4, children: [
497
- (i || m || h) && /* @__PURE__ */ e.jsxs(Ae, { mb: "1rem", gap: 4, children: [
497
+ (i || m || h) && /* @__PURE__ */ e.jsxs(ke, { mb: "1rem", gap: 4, children: [
498
498
  i && /* @__PURE__ */ e.jsxs(
499
- se,
499
+ re,
500
500
  {
501
501
  isDisabled: !i || v,
502
502
  colorScheme: "blackAlpha",
@@ -509,12 +509,12 @@ const kn = ({
509
509
  }
510
510
  ),
511
511
  m && !s && /* @__PURE__ */ e.jsx(
512
- nt,
512
+ st,
513
513
  {
514
514
  label: H ? X ? `Quantum-owned ${D.actionPluralLowerCase} are selected and will be skipped` : `Selected ${D.actionPluralLowerCase} are quantum-owned and cannot be deleted` : void 0,
515
515
  shouldWrapChildren: !0,
516
516
  children: /* @__PURE__ */ e.jsx(
517
- se,
517
+ re,
518
518
  {
519
519
  colorScheme: "gray",
520
520
  isDisabled: !X || !m || l,
@@ -525,7 +525,7 @@ const kn = ({
525
525
  }
526
526
  ),
527
527
  h && !s && /* @__PURE__ */ e.jsx(
528
- se,
528
+ re,
529
529
  {
530
530
  colorScheme: "gray",
531
531
  isDisabled: !W,
@@ -544,8 +544,8 @@ const kn = ({
544
544
  }
545
545
  )
546
546
  ] }),
547
- M && A && /* @__PURE__ */ e.jsx(te, { my: 4, children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4", children: Z.map((t) => /* @__PURE__ */ e.jsxs(Y, { children: [
548
- /* @__PURE__ */ e.jsx(Xe, { fontSize: "sm", children: t.label }),
547
+ M && A && /* @__PURE__ */ e.jsx(ne, { my: 4, children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4", children: Z.map((t) => /* @__PURE__ */ e.jsxs(Y, { children: [
548
+ /* @__PURE__ */ e.jsx(Ze, { fontSize: "sm", children: t.label }),
549
549
  /* @__PURE__ */ e.jsx(
550
550
  he,
551
551
  {
@@ -572,8 +572,8 @@ const kn = ({
572
572
  )
573
573
  ] }, t.key)) }) }),
574
574
  /* @__PURE__ */ e.jsx(zt, { mr: "2rem", overflowX: "hidden", ...w, children: /* @__PURE__ */ e.jsxs(Bt, { size: "md", variant: "simple", children: [
575
- /* @__PURE__ */ e.jsx(Wt, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(mt, { children: [
576
- /* @__PURE__ */ e.jsxs(Re, { fontWeight: "normal", children: [
575
+ /* @__PURE__ */ e.jsx(Wt, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(ht, { children: [
576
+ /* @__PURE__ */ e.jsxs($e, { fontWeight: "normal", children: [
577
577
  "(showing ",
578
578
  V?.length ?? 0,
579
579
  " of",
@@ -581,15 +581,15 @@ const kn = ({
581
581
  n ?? r.length,
582
582
  ")"
583
583
  ] }),
584
- /* @__PURE__ */ e.jsx(Re, { children: "Name" }),
585
- /* @__PURE__ */ e.jsx(Re, { children: "Sensor Locations" }),
586
- !L && /* @__PURE__ */ e.jsx(Re, { children: "Use Case" }),
587
- /* @__PURE__ */ e.jsx(Re, {})
584
+ /* @__PURE__ */ e.jsx($e, { children: "Name" }),
585
+ /* @__PURE__ */ e.jsx($e, { children: "Sensor Locations" }),
586
+ !L && /* @__PURE__ */ e.jsx($e, { children: "Use Case" }),
587
+ /* @__PURE__ */ e.jsx($e, {})
588
588
  ] }) }),
589
589
  /* @__PURE__ */ e.jsx(Ut, { children: V?.map((t) => /* @__PURE__ */ e.jsxs(
590
- mt,
590
+ ht,
591
591
  {
592
- className: qe(
592
+ className: Ke(
593
593
  "hover:bg-[#f7f7f7]",
594
594
  !s && "cursor-pointer",
595
595
  t.selected && "bg-gray-200"
@@ -598,10 +598,10 @@ const kn = ({
598
598
  s || d?.(t, !t.selected);
599
599
  },
600
600
  children: [
601
- /* @__PURE__ */ e.jsx(_e, { children: /* @__PURE__ */ e.jsxs(Ie, { children: [
601
+ /* @__PURE__ */ e.jsx(ze, { children: /* @__PURE__ */ e.jsxs(Ie, { children: [
602
602
  !s && /* @__PURE__ */ e.jsx(e.Fragment, { children: t.selected ? /* @__PURE__ */ e.jsx(bn, { className: "text-blue-500" }) : /* @__PURE__ */ e.jsx(yn, { className: "text-gray-400" }) }),
603
603
  (t.quantumOwned || !g) && u && /* @__PURE__ */ e.jsx(
604
- se,
604
+ re,
605
605
  {
606
606
  ml: "1em",
607
607
  size: "sm",
@@ -614,7 +614,7 @@ const kn = ({
614
614
  }
615
615
  ),
616
616
  !t.quantumOwned && g && /* @__PURE__ */ e.jsx(
617
- se,
617
+ re,
618
618
  {
619
619
  isDisabled: p,
620
620
  ml: "1em",
@@ -628,7 +628,7 @@ const kn = ({
628
628
  }
629
629
  )
630
630
  ] }) }),
631
- /* @__PURE__ */ e.jsx(_e, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(Ie, { align: "center", gap: 2, children: [
631
+ /* @__PURE__ */ e.jsx(ze, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(Ie, { align: "center", gap: 2, children: [
632
632
  /* @__PURE__ */ e.jsx(
633
633
  Dn,
634
634
  {
@@ -638,8 +638,8 @@ const kn = ({
638
638
  ),
639
639
  t.name
640
640
  ] }) }),
641
- /* @__PURE__ */ e.jsx(_e, { maxW: "20rem", whiteSpace: "break-spaces", children: Pn(t.sensorLocations) }),
642
- !L && /* @__PURE__ */ e.jsx(_e, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
641
+ /* @__PURE__ */ e.jsx(ze, { maxW: "20rem", whiteSpace: "break-spaces", children: Fn(t.sensorLocations) }),
642
+ !L && /* @__PURE__ */ e.jsx(ze, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
643
643
  Rn,
644
644
  {
645
645
  containerProps: { flexWrap: "wrap" },
@@ -661,7 +661,7 @@ const kn = ({
661
661
  setButtonOnClick: u,
662
662
  quantumOwned: d
663
663
  }) => {
664
- const h = vt(), { getLabel: s } = xe(), l = k(() => ({
664
+ const h = Ct(), { getLabel: s } = xe(), l = k(() => ({
665
665
  singular: s("action"),
666
666
  plural: s("action_plural"),
667
667
  pluralLowerCase: s("action_plural").toLowerCase(),
@@ -673,16 +673,16 @@ const kn = ({
673
673
  variables: { groupId: L },
674
674
  pause: !L
675
675
  // Only run when group is selected
676
- }), [, O] = fe(rt), [, R] = fe(
676
+ }), [, O] = fe(ot), [, R] = fe(
677
677
  It
678
678
  ), $ = k(() => C.data?.groups ? C.data.groups.map(
679
679
  (c) => I(Mt, c)
680
680
  ) : [], [C.data]), A = k(() => j.data ? j.data.actions.map((t) => {
681
681
  const o = I(Ce, t), b = I(
682
- Ze,
682
+ Ve,
683
683
  o.reports
684
684
  ), U = I(
685
- De,
685
+ Pe,
686
686
  o.categories
687
687
  ), Q = I(
688
688
  je,
@@ -693,10 +693,10 @@ const kn = ({
693
693
  }));
694
694
  return {
695
695
  ...o,
696
- thresholds: I(Oe, o.thresholds),
696
+ thresholds: I(Ae, o.thresholds),
697
697
  reports: b.map((E) => ({
698
698
  ...E,
699
- thresholds: I(Oe, E.thresholds)
699
+ thresholds: I(Ae, E.thresholds)
700
700
  })),
701
701
  categories: U,
702
702
  metadataGroups: Q
@@ -842,18 +842,18 @@ const kn = ({
842
842
  // Add custom data to identify quantum-owned actions for UI display
843
843
  isQuantumOwned: c.quantumOwned
844
844
  })), [A, p]), W = C.fetching, H = j.fetching;
845
- return /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(ue, { spacing: 6, align: "stretch", children: [
845
+ return /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsxs(ue, { spacing: 6, align: "stretch", children: [
846
846
  d && /* @__PURE__ */ e.jsxs(Y, { children: [
847
847
  /* @__PURE__ */ e.jsx(ge, { children: "Operation Mode" }),
848
848
  /* @__PURE__ */ e.jsx(
849
- Ct,
849
+ wt,
850
850
  {
851
851
  value: p,
852
852
  onChange: (c) => {
853
853
  v(c), y([]);
854
854
  },
855
- children: /* @__PURE__ */ e.jsxs(re, { spacing: 6, children: [
856
- /* @__PURE__ */ e.jsx(Ye, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
855
+ children: /* @__PURE__ */ e.jsxs(te, { spacing: 6, children: [
856
+ /* @__PURE__ */ e.jsx(He, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
857
857
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "medium", children: [
858
858
  "Copy ",
859
859
  l.plural
@@ -865,7 +865,7 @@ const kn = ({
865
865
  "based on selected ones"
866
866
  ] })
867
867
  ] }) }),
868
- /* @__PURE__ */ e.jsx(Ye, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
868
+ /* @__PURE__ */ e.jsx(He, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
869
869
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "medium", children: [
870
870
  "Convert to Quantum Owned ",
871
871
  l.singular
@@ -895,8 +895,8 @@ const kn = ({
895
895
  isClearable: !0
896
896
  }
897
897
  ),
898
- C.error && /* @__PURE__ */ e.jsxs(He, { status: "error", mt: 2, children: [
899
- /* @__PURE__ */ e.jsx(Je, {}),
898
+ C.error && /* @__PURE__ */ e.jsxs(Je, { status: "error", mt: 2, children: [
899
+ /* @__PURE__ */ e.jsx(Xe, {}),
900
900
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", children: [
901
901
  "Failed to load groups: ",
902
902
  C.error.message
@@ -911,8 +911,8 @@ const kn = ({
911
911
  " ",
912
912
  p === "copy" ? "Copy" : "Convert"
913
913
  ] }),
914
- H ? /* @__PURE__ */ e.jsxs(re, { children: [
915
- /* @__PURE__ */ e.jsx(wt, { size: "sm" }),
914
+ H ? /* @__PURE__ */ e.jsxs(te, { children: [
915
+ /* @__PURE__ */ e.jsx(St, { size: "sm" }),
916
916
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", color: "gray.600", children: [
917
917
  "Loading ",
918
918
  l.pluralLowerCase,
@@ -932,12 +932,12 @@ const kn = ({
932
932
  isClearable: !0,
933
933
  isMulti: !0,
934
934
  closeMenuOnSelect: !1,
935
- formatOptionLabel: (c, { context: t }) => /* @__PURE__ */ e.jsxs(re, { justify: "space-between", w: "100%", children: [
935
+ formatOptionLabel: (c, { context: t }) => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", w: "100%", children: [
936
936
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
937
937
  /* @__PURE__ */ e.jsx(S, { children: c.label }),
938
938
  t === "value" && c.isQuantumOwned && /* @__PURE__ */ e.jsx(S, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
939
939
  ] }),
940
- c.isQuantumOwned && t === "menu" && /* @__PURE__ */ e.jsx($e, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
940
+ c.isQuantumOwned && t === "menu" && /* @__PURE__ */ e.jsx(De, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
941
941
  ] })
942
942
  }
943
943
  ),
@@ -947,8 +947,8 @@ const kn = ({
947
947
  " found"
948
948
  ] })
949
949
  ] }),
950
- j.error && /* @__PURE__ */ e.jsxs(He, { status: "error", mt: 2, children: [
951
- /* @__PURE__ */ e.jsx(Je, {}),
950
+ j.error && /* @__PURE__ */ e.jsxs(Je, { status: "error", mt: 2, children: [
951
+ /* @__PURE__ */ e.jsx(Xe, {}),
952
952
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", children: [
953
953
  "Failed to load ",
954
954
  l.pluralLowerCase,
@@ -958,11 +958,11 @@ const kn = ({
958
958
  ] })
959
959
  ] })
960
960
  ] }),
961
- T.length > 0 && /* @__PURE__ */ e.jsxs(te, { p: 4, bg: "gray.50", borderRadius: "md", children: [
961
+ T.length > 0 && /* @__PURE__ */ e.jsxs(ne, { p: 4, bg: "gray.50", borderRadius: "md", children: [
962
962
  /* @__PURE__ */ e.jsx(S, { fontWeight: "semibold", mb: 3, children: T.length === 1 ? `${l.singular} to ${p === "copy" ? "Copy" : "Convert"}:` : `${T.length} ${l.plural} to ${p === "copy" ? "Copy" : "Convert"}:` }),
963
963
  /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 3, children: [
964
964
  T.map((c, t) => /* @__PURE__ */ e.jsxs(
965
- te,
965
+ ne,
966
966
  {
967
967
  w: "100%",
968
968
  p: 3,
@@ -971,13 +971,13 @@ const kn = ({
971
971
  border: "1px solid",
972
972
  borderColor: "gray.200",
973
973
  children: [
974
- /* @__PURE__ */ e.jsxs(re, { justify: "space-between", align: "start", mb: 2, children: [
974
+ /* @__PURE__ */ e.jsxs(te, { justify: "space-between", align: "start", mb: 2, children: [
975
975
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "medium", fontSize: "sm", children: [
976
976
  t + 1,
977
977
  ". ",
978
978
  c.name
979
979
  ] }),
980
- c.quantumOwned && /* @__PURE__ */ e.jsx($e, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
980
+ c.quantumOwned && /* @__PURE__ */ e.jsx(De, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
981
981
  ] }),
982
982
  /* @__PURE__ */ e.jsxs(
983
983
  ue,
@@ -1025,7 +1025,7 @@ const kn = ({
1025
1025
  c.id
1026
1026
  )),
1027
1027
  T.length > 1 && /* @__PURE__ */ e.jsx(
1028
- te,
1028
+ ne,
1029
1029
  {
1030
1030
  w: "100%",
1031
1031
  p: 2,
@@ -1046,9 +1046,9 @@ const kn = ({
1046
1046
  )
1047
1047
  ] })
1048
1048
  ] }),
1049
- !m && /* @__PURE__ */ e.jsxs(Ae, { spacing: 4, justifyContent: "flex-end", children: [
1049
+ !m && /* @__PURE__ */ e.jsxs(ke, { spacing: 4, justifyContent: "flex-end", children: [
1050
1050
  /* @__PURE__ */ e.jsx(
1051
- se,
1051
+ re,
1052
1052
  {
1053
1053
  variant: "outline",
1054
1054
  onClick: N,
@@ -1057,7 +1057,7 @@ const kn = ({
1057
1057
  }
1058
1058
  ),
1059
1059
  /* @__PURE__ */ e.jsxs(
1060
- se,
1060
+ re,
1061
1061
  {
1062
1062
  colorScheme: p === "copy" ? "blue" : "green",
1063
1063
  onClick: V,
@@ -1082,7 +1082,7 @@ const kn = ({
1082
1082
  setButtonOnClick: u,
1083
1083
  quantumOwned: d
1084
1084
  }) => {
1085
- const h = vt(), { getLabel: s } = xe(), l = k(() => ({
1085
+ const h = Ct(), { getLabel: s } = xe(), l = k(() => ({
1086
1086
  singular: s("module"),
1087
1087
  plural: s("module_plural"),
1088
1088
  pluralLowerCase: s("module_plural").toLowerCase(),
@@ -1099,12 +1099,12 @@ const kn = ({
1099
1099
  variables: { groupId: v },
1100
1100
  pause: !v
1101
1101
  // Only run when group is selected
1102
- }), [, R] = fe(Ot), [, $] = fe(At), [, A] = fe(rt), [, T] = fe(
1102
+ }), [, R] = fe(Ot), [, $] = fe(At), [, A] = fe(ot), [, T] = fe(
1103
1103
  It
1104
1104
  ), J = k(() => j.data?.groups ? j.data.groups.map(
1105
1105
  (t) => I(Mt, t)
1106
1106
  ) : [], [j.data]), oe = k(() => O.data?.modules ? I(
1107
- Qe,
1107
+ qe,
1108
1108
  O.data?.modules
1109
1109
  ).map((o) => {
1110
1110
  const b = I(
@@ -1121,7 +1121,7 @@ const kn = ({
1121
1121
  action: I(Ce, Q.action)
1122
1122
  })),
1123
1123
  categories: I(
1124
- De,
1124
+ Pe,
1125
1125
  o.categories
1126
1126
  ),
1127
1127
  metadataItems: q
@@ -1160,42 +1160,42 @@ const kn = ({
1160
1160
  if (a === "copy") {
1161
1161
  if (K.quantumOwned) return K;
1162
1162
  const ye = I(
1163
- De,
1163
+ Pe,
1164
1164
  K.categories
1165
- ), ke = I(
1165
+ ), Te = I(
1166
1166
  je,
1167
1167
  K.metadataGroups
1168
1168
  ).map((pe) => I(
1169
1169
  be,
1170
1170
  pe.data
1171
- ).map((Ne) => Ne.id)).flat(), Ge = I(
1172
- Ze,
1171
+ ).map((Re) => Re.id)).flat(), Ee = I(
1172
+ Ve,
1173
1173
  K.reports
1174
1174
  ).map((pe) => ({
1175
1175
  ...pe,
1176
1176
  id: void 0,
1177
1177
  thresholds: I(
1178
- Oe,
1178
+ Ae,
1179
1179
  pe.thresholds
1180
- ).map((Ne) => ({
1181
- ...Ne,
1180
+ ).map((Re) => ({
1181
+ ...Re,
1182
1182
  id: void 0
1183
1183
  }))
1184
- })), Ve = I(
1185
- Oe,
1184
+ })), et = I(
1185
+ Ae,
1186
1186
  K.thresholds
1187
1187
  ).map((pe) => ({
1188
1188
  ...pe,
1189
1189
  id: void 0
1190
- })), Te = {
1190
+ })), Ne = {
1191
1191
  ...K,
1192
1192
  quantumOwned: !0,
1193
- thresholds: Ve,
1193
+ thresholds: et,
1194
1194
  categories: ye?.map((pe) => pe.id),
1195
- reports: Ge,
1196
- metadataIds: ke,
1195
+ reports: Ee,
1196
+ metadataIds: Te,
1197
1197
  id: void 0
1198
- }, Se = await A({ fields: Te });
1198
+ }, Se = await A({ fields: Ne });
1199
1199
  return Se.error || !Se.data?.createAction ? null : I(
1200
1200
  Ce,
1201
1201
  Se.data.createAction
@@ -1228,7 +1228,7 @@ const kn = ({
1228
1228
  if (Q.error) throw new Error(Q.error.message);
1229
1229
  if (Q.data?.updateModule) {
1230
1230
  const E = I(
1231
- Qe,
1231
+ qe,
1232
1232
  Q.data.updateModule
1233
1233
  );
1234
1234
  t.push(E);
@@ -1249,7 +1249,7 @@ const kn = ({
1249
1249
  if (Q.error) throw new Error(Q.error.message);
1250
1250
  if (Q.data?.createModule) {
1251
1251
  const E = I(
1252
- Qe,
1252
+ qe,
1253
1253
  Q.data.createModule
1254
1254
  );
1255
1255
  t.push(E);
@@ -1321,18 +1321,18 @@ const kn = ({
1321
1321
  // Add custom data to identify quantum-owned modules
1322
1322
  isQuantumOwned: t.quantumOwned
1323
1323
  })), [oe, a]), H = j.fetching, c = O.fetching;
1324
- return /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsxs(ue, { spacing: 6, align: "stretch", children: [
1324
+ return /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsxs(ue, { spacing: 6, align: "stretch", children: [
1325
1325
  d && /* @__PURE__ */ e.jsxs(Y, { children: [
1326
1326
  /* @__PURE__ */ e.jsx(ge, { children: "Operation Mode" }),
1327
1327
  /* @__PURE__ */ e.jsx(
1328
- Ct,
1328
+ wt,
1329
1329
  {
1330
1330
  value: a,
1331
1331
  onChange: (t) => {
1332
1332
  C(t), w([]);
1333
1333
  },
1334
- children: /* @__PURE__ */ e.jsxs(re, { spacing: 6, children: [
1335
- /* @__PURE__ */ e.jsx(Ye, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
1334
+ children: /* @__PURE__ */ e.jsxs(te, { spacing: 6, children: [
1335
+ /* @__PURE__ */ e.jsx(He, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
1336
1336
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "medium", children: [
1337
1337
  "Copy ",
1338
1338
  l.plural
@@ -1343,7 +1343,7 @@ const kn = ({
1343
1343
  " based on selected ones"
1344
1344
  ] })
1345
1345
  ] }) }),
1346
- /* @__PURE__ */ e.jsx(Ye, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
1346
+ /* @__PURE__ */ e.jsx(He, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 1, children: [
1347
1347
  /* @__PURE__ */ e.jsx(S, { fontWeight: "medium", children: "Convert to Quantum Owned" }),
1348
1348
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", color: "gray.600", children: [
1349
1349
  "Convert existing ",
@@ -1369,8 +1369,8 @@ const kn = ({
1369
1369
  isClearable: !0
1370
1370
  }
1371
1371
  ),
1372
- j.error && /* @__PURE__ */ e.jsxs(He, { status: "error", mt: 2, children: [
1373
- /* @__PURE__ */ e.jsx(Je, {}),
1372
+ j.error && /* @__PURE__ */ e.jsxs(Je, { status: "error", mt: 2, children: [
1373
+ /* @__PURE__ */ e.jsx(Xe, {}),
1374
1374
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", children: [
1375
1375
  "Failed to load groups: ",
1376
1376
  j.error.message
@@ -1379,8 +1379,8 @@ const kn = ({
1379
1379
  ] }),
1380
1380
  v && /* @__PURE__ */ e.jsxs(Y, { children: [
1381
1381
  /* @__PURE__ */ e.jsx(ge, { children: a === "convert" ? `Select ${l.plural} to Convert` : `Select ${l.plural} to Copy` }),
1382
- c ? /* @__PURE__ */ e.jsxs(re, { children: [
1383
- /* @__PURE__ */ e.jsx(wt, { size: "sm" }),
1382
+ c ? /* @__PURE__ */ e.jsxs(te, { children: [
1383
+ /* @__PURE__ */ e.jsx(St, { size: "sm" }),
1384
1384
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", color: "gray.600", children: [
1385
1385
  "Loading ",
1386
1386
  l.pluralLowerCase,
@@ -1400,12 +1400,12 @@ const kn = ({
1400
1400
  isClearable: !0,
1401
1401
  isMulti: !0,
1402
1402
  closeMenuOnSelect: !1,
1403
- formatOptionLabel: (t, { context: o }) => /* @__PURE__ */ e.jsxs(re, { justify: "space-between", w: "100%", children: [
1403
+ formatOptionLabel: (t, { context: o }) => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", w: "100%", children: [
1404
1404
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1405
1405
  /* @__PURE__ */ e.jsx(S, { children: t.label }),
1406
1406
  o === "value" && t.isQuantumOwned && /* @__PURE__ */ e.jsx(S, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
1407
1407
  ] }),
1408
- t.isQuantumOwned && o === "menu" && /* @__PURE__ */ e.jsx($e, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
1408
+ t.isQuantumOwned && o === "menu" && /* @__PURE__ */ e.jsx(De, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
1409
1409
  ] })
1410
1410
  }
1411
1411
  ),
@@ -1415,8 +1415,8 @@ const kn = ({
1415
1415
  " found in this group"
1416
1416
  ] })
1417
1417
  ] }),
1418
- O.error && /* @__PURE__ */ e.jsxs(He, { status: "error", mt: 2, children: [
1419
- /* @__PURE__ */ e.jsx(Je, {}),
1418
+ O.error && /* @__PURE__ */ e.jsxs(Je, { status: "error", mt: 2, children: [
1419
+ /* @__PURE__ */ e.jsx(Xe, {}),
1420
1420
  /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", children: [
1421
1421
  "Failed to load ",
1422
1422
  l.pluralLowerCase,
@@ -1426,11 +1426,11 @@ const kn = ({
1426
1426
  ] })
1427
1427
  ] })
1428
1428
  ] }),
1429
- D.length > 0 && /* @__PURE__ */ e.jsxs(te, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1429
+ D.length > 0 && /* @__PURE__ */ e.jsxs(ne, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1430
1430
  /* @__PURE__ */ e.jsx(S, { fontWeight: "semibold", mb: 3, children: D.length === 1 ? `${l.singular} to ${a === "copy" ? "Copy" : "Convert"}` : `${D.length} ${l.plural} to ${a === "copy" ? "Copy" : "Convert"}` }),
1431
1431
  /* @__PURE__ */ e.jsxs(ue, { align: "start", spacing: 3, children: [
1432
1432
  D.map((t, o) => /* @__PURE__ */ e.jsxs(
1433
- te,
1433
+ ne,
1434
1434
  {
1435
1435
  w: "100%",
1436
1436
  p: 3,
@@ -1439,13 +1439,13 @@ const kn = ({
1439
1439
  border: "1px solid",
1440
1440
  borderColor: "gray.200",
1441
1441
  children: [
1442
- /* @__PURE__ */ e.jsxs(re, { justify: "space-between", align: "start", mb: 2, children: [
1442
+ /* @__PURE__ */ e.jsxs(te, { justify: "space-between", align: "start", mb: 2, children: [
1443
1443
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "medium", fontSize: "sm", children: [
1444
1444
  o + 1,
1445
1445
  ". ",
1446
1446
  t.name
1447
1447
  ] }),
1448
- t.quantumOwned && /* @__PURE__ */ e.jsx($e, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
1448
+ t.quantumOwned && /* @__PURE__ */ e.jsx(De, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
1449
1449
  ] }),
1450
1450
  /* @__PURE__ */ e.jsxs(
1451
1451
  ue,
@@ -1478,7 +1478,7 @@ const kn = ({
1478
1478
  t.id
1479
1479
  )),
1480
1480
  D.length > 1 && /* @__PURE__ */ e.jsx(
1481
- te,
1481
+ ne,
1482
1482
  {
1483
1483
  w: "100%",
1484
1484
  p: 2,
@@ -1498,7 +1498,7 @@ const kn = ({
1498
1498
  }
1499
1499
  ),
1500
1500
  d && D.filter((t) => t.moduleActions.some((o) => !o.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
1501
- te,
1501
+ ne,
1502
1502
  {
1503
1503
  p: 2,
1504
1504
  bg: "yellow.50",
@@ -1510,9 +1510,9 @@ const kn = ({
1510
1510
  )
1511
1511
  ] })
1512
1512
  ] }),
1513
- !m && /* @__PURE__ */ e.jsxs(Ae, { spacing: 4, justifyContent: "flex-end", children: [
1513
+ !m && /* @__PURE__ */ e.jsxs(ke, { spacing: 4, justifyContent: "flex-end", children: [
1514
1514
  /* @__PURE__ */ e.jsx(
1515
- se,
1515
+ re,
1516
1516
  {
1517
1517
  variant: "outline",
1518
1518
  onClick: z,
@@ -1521,7 +1521,7 @@ const kn = ({
1521
1521
  }
1522
1522
  ),
1523
1523
  /* @__PURE__ */ e.jsxs(
1524
- se,
1524
+ re,
1525
1525
  {
1526
1526
  colorScheme: a === "copy" ? "blue" : "green",
1527
1527
  onClick: N,
@@ -1583,8 +1583,8 @@ const kn = ({
1583
1583
  },
1584
1584
  [l]
1585
1585
  );
1586
- return /* @__PURE__ */ e.jsxs(te, { ...w, children: [
1587
- /* @__PURE__ */ e.jsxs(re, { gap: "2rem", children: [
1586
+ return /* @__PURE__ */ e.jsxs(ne, { ...w, children: [
1587
+ /* @__PURE__ */ e.jsxs(te, { gap: "2rem", children: [
1588
1588
  /* @__PURE__ */ e.jsx(Bn, { name: r ?? "", onInputChange: O }),
1589
1589
  /* @__PURE__ */ e.jsx(
1590
1590
  Wn,
@@ -1644,7 +1644,7 @@ const kn = ({
1644
1644
  }
1645
1645
  ) }),
1646
1646
  /* @__PURE__ */ e.jsx(Vt, { children: /* @__PURE__ */ e.jsx(
1647
- se,
1647
+ re,
1648
1648
  {
1649
1649
  colorScheme: "blue",
1650
1650
  onClick: y.onClose,
@@ -1761,13 +1761,13 @@ const kn = ({
1761
1761
  () => r.filter((l) => !!l?.id).map((l) => ({
1762
1762
  id: l.id,
1763
1763
  name: l.name,
1764
- reports: I(Ze, l.reports) || [],
1764
+ reports: I(Ve, l.reports) || [],
1765
1765
  selectedReportId: m[l.id] || null
1766
1766
  })),
1767
1767
  [r, m]
1768
1768
  );
1769
1769
  return /* @__PURE__ */ e.jsxs(Y, { mb: 4, children: [
1770
- /* @__PURE__ */ e.jsxs(re, { justifyContent: "space-between", children: [
1770
+ /* @__PURE__ */ e.jsxs(te, { justifyContent: "space-between", children: [
1771
1771
  /* @__PURE__ */ e.jsx(ge, { children: /* @__PURE__ */ e.jsxs("span", { children: [
1772
1772
  h.actionPlural,
1773
1773
  !d && /* @__PURE__ */ e.jsxs(S, { fontSize: "sm", color: "gray.500", children: [
@@ -1780,7 +1780,7 @@ const kn = ({
1780
1780
  ] })
1781
1781
  ] }) }),
1782
1782
  !d && /* @__PURE__ */ e.jsxs(
1783
- se,
1783
+ re,
1784
1784
  {
1785
1785
  size: "sm",
1786
1786
  variant: "solid",
@@ -1801,7 +1801,7 @@ const kn = ({
1801
1801
  h.moduleLowerCase,
1802
1802
  ".",
1803
1803
  !d && /* @__PURE__ */ e.jsxs(
1804
- se,
1804
+ re,
1805
1805
  {
1806
1806
  ml: "0.5em",
1807
1807
  size: "sm",
@@ -1849,7 +1849,7 @@ const kn = ({
1849
1849
  },
1850
1850
  [n, i]
1851
1851
  );
1852
- return /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsx(Cn, { backend: wn, children: /* @__PURE__ */ e.jsx(ue, { spacing: 3, align: "stretch", children: r.map((h, s) => /* @__PURE__ */ e.jsx(
1852
+ return /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(Cn, { backend: wn, children: /* @__PURE__ */ e.jsx(ue, { spacing: 3, align: "stretch", children: r.map((h, s) => /* @__PURE__ */ e.jsx(
1853
1853
  Kn,
1854
1854
  {
1855
1855
  listKey: u,
@@ -1908,7 +1908,7 @@ const kn = ({
1908
1908
  })
1909
1909
  ], [n.reports]), y = v ? 0.6 : 1, x = m ? "default" : v ? "grabbing" : "grab";
1910
1910
  return L(p(d)), /* @__PURE__ */ e.jsx(
1911
- te,
1911
+ ne,
1912
1912
  {
1913
1913
  ref: d,
1914
1914
  p: 3,
@@ -1918,20 +1918,20 @@ const kn = ({
1918
1918
  bg: "gray.50",
1919
1919
  style: { opacity: y, cursor: x },
1920
1920
  "data-handler-id": l,
1921
- children: /* @__PURE__ */ e.jsxs(re, { justify: "space-between", align: "center", children: [
1922
- /* @__PURE__ */ e.jsxs(re, { spacing: 3, children: [
1921
+ children: /* @__PURE__ */ e.jsxs(te, { justify: "space-between", align: "center", children: [
1922
+ /* @__PURE__ */ e.jsxs(te, { spacing: 3, children: [
1923
1923
  /* @__PURE__ */ e.jsxs(S, { fontWeight: "semibold", minW: "2rem", children: [
1924
1924
  i + 1,
1925
1925
  "."
1926
1926
  ] }),
1927
1927
  /* @__PURE__ */ e.jsx(S, { fontWeight: "medium", children: n.name })
1928
1928
  ] }),
1929
- /* @__PURE__ */ e.jsxs(re, { spacing: 3, align: "center", children: [
1929
+ /* @__PURE__ */ e.jsxs(te, { spacing: 3, align: "center", children: [
1930
1930
  /* @__PURE__ */ e.jsxs(S, { id: M, fontSize: "sm", color: "gray.600", children: [
1931
1931
  s,
1932
1932
  " Report:"
1933
1933
  ] }),
1934
- /* @__PURE__ */ e.jsx(te, { width: { base: "100%", md: "450px" }, children: /* @__PURE__ */ e.jsx(
1934
+ /* @__PURE__ */ e.jsx(ne, { width: { base: "100%", md: "450px" }, children: /* @__PURE__ */ e.jsx(
1935
1935
  he,
1936
1936
  {
1937
1937
  "aria-labelledby": M,
@@ -1980,8 +1980,8 @@ const kn = ({
1980
1980
  );
1981
1981
  return g ? /* @__PURE__ */ e.jsxs(Y, { mb: 4, children: [
1982
1982
  /* @__PURE__ */ e.jsx(ge, { children: "Metadata Tags" }),
1983
- /* @__PURE__ */ e.jsx(re, { gap: "1rem", align: "start", children: u.map((h) => /* @__PURE__ */ e.jsxs(Y, { flex: "1", children: [
1984
- /* @__PURE__ */ e.jsx(Xe, { fontSize: "sm", children: h.label }),
1983
+ /* @__PURE__ */ e.jsx(te, { gap: "1rem", align: "start", children: u.map((h) => /* @__PURE__ */ e.jsxs(Y, { flex: "1", children: [
1984
+ /* @__PURE__ */ e.jsx(Ze, { fontSize: "sm", children: h.label }),
1985
1985
  /* @__PURE__ */ e.jsx(
1986
1986
  he,
1987
1987
  {
@@ -2015,7 +2015,7 @@ const kn = ({
2015
2015
  ...h
2016
2016
  }) => {
2017
2017
  const s = k(() => [...r].sort((L, M) => {
2018
- const w = ft.indexOf(L.plane), y = ft.indexOf(M.plane);
2018
+ const w = jt.indexOf(L.plane), y = jt.indexOf(M.plane);
2019
2019
  return w - y;
2020
2020
  }), [r]), l = G((L) => "segment" in L.id ? Tt(L.id.segment, L.plane, !0) ?? "Unknown" : Nt(L.id.joint, L.plane, !0) ?? "Unknown", []), p = G(
2021
2021
  (L, M) => {
@@ -2084,7 +2084,7 @@ const kn = ({
2084
2084
  overflow: "hidden",
2085
2085
  flexShrink: "0",
2086
2086
  children: [
2087
- /* @__PURE__ */ e.jsxs(re, { w: "100%", children: [
2087
+ /* @__PURE__ */ e.jsxs(te, { w: "100%", alignItems: "center", children: [
2088
2088
  /* @__PURE__ */ e.jsx(
2089
2089
  S,
2090
2090
  {
@@ -2095,21 +2095,24 @@ const kn = ({
2095
2095
  children: r
2096
2096
  }
2097
2097
  ),
2098
- n.sensorOnly && /* @__PURE__ */ e.jsx(St, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor Only" }),
2098
+ n.sensorOnly ? /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor" }) : /* @__PURE__ */ e.jsxs(te, { spacing: 1, children: [
2099
+ /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "blue", variant: "subtle", children: "Pose" }),
2100
+ /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor" })
2101
+ ] }),
2099
2102
  m && !d && /* @__PURE__ */ e.jsx(
2100
2103
  en,
2101
2104
  {
2102
2105
  size: "xs",
2103
2106
  variant: "ghost",
2104
2107
  "aria-label": "delete",
2105
- icon: /* @__PURE__ */ e.jsx(yt, { as: vn }),
2108
+ icon: /* @__PURE__ */ e.jsx(vt, { as: vn }),
2106
2109
  onClick: m
2107
2110
  }
2108
2111
  ),
2109
2112
  !g && /* @__PURE__ */ e.jsx(
2110
2113
  Tn,
2111
2114
  {
2112
- selectedItem: n?.kind ?? Ke.Limit,
2115
+ selectedItem: n?.kind ?? Ye.Limit,
2113
2116
  onChange: ({ value: p }) => i({ ...n, kind: p }),
2114
2117
  isDisabled: u || d,
2115
2118
  buttonProps: {
@@ -2122,8 +2125,8 @@ const kn = ({
2122
2125
  colorScheme: "teal"
2123
2126
  },
2124
2127
  items: [
2125
- { value: Ke.Limit, label: "limit" },
2126
- { value: Ke.Target, label: "target" }
2128
+ { value: Ye.Limit, label: "limit" },
2129
+ { value: Ye.Target, label: "target" }
2127
2130
  ]
2128
2131
  }
2129
2132
  )
@@ -2147,7 +2150,7 @@ const kn = ({
2147
2150
  ]
2148
2151
  }
2149
2152
  );
2150
- }, Ue = (r, n) => "segment" in r && "segment" in n && r.segment === n.segment || "joint" in r && "joint" in n && r.joint === n.joint, jt = ({
2153
+ }, Qe = (r, n) => "segment" in r && "segment" in n && r.segment === n.segment || "joint" in r && "joint" in n && r.joint === n.joint, bt = ({
2151
2154
  options: r,
2152
2155
  value: n,
2153
2156
  onChange: i,
@@ -2165,7 +2168,7 @@ const kn = ({
2165
2168
  const C = "joint" in a.id;
2166
2169
  let j, O;
2167
2170
  if (C ? (j = Nt(a.id.joint, a.plane, !0) ?? "Unknown", O = `joint:${a.id.joint}`) : (j = Tt(a.id.segment, a.plane, !0) ?? "Unknown", O = `segment:${a.id.segment}`), !x.has(O)) {
2168
- const A = C ? gt(a.id.joint) ?? "Unknown Joint" : gt(a.id.segment) ?? "Unknown Segment";
2171
+ const A = C ? xt(a.id.joint) ?? "Unknown Joint" : xt(a.id.segment) ?? "Unknown Segment";
2169
2172
  x.set(O, {
2170
2173
  label: A,
2171
2174
  options: []
@@ -2177,10 +2180,23 @@ const kn = ({
2177
2180
  a.plane
2178
2181
  ].filter(Boolean).map((A) => String(A).toLowerCase().replace(/\s+|_/g, ""));
2179
2182
  R.options.push({
2180
- label: /* @__PURE__ */ e.jsxs(re, { spacing: 2, justify: "space-between", w: "100%", pl: 3, children: [
2181
- /* @__PURE__ */ e.jsx(S, { children: j }),
2182
- a.sensorOnly && /* @__PURE__ */ e.jsx(St, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor Only" })
2183
- ] }),
2183
+ label: /* @__PURE__ */ e.jsxs(
2184
+ te,
2185
+ {
2186
+ spacing: 2,
2187
+ justify: "space-between",
2188
+ alignItems: "center",
2189
+ w: "100%",
2190
+ pl: 3,
2191
+ children: [
2192
+ /* @__PURE__ */ e.jsx(S, { children: j }),
2193
+ a.sensorOnly ? /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor" }) : /* @__PURE__ */ e.jsxs(te, { spacing: 1, children: [
2194
+ /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "blue", variant: "subtle", children: "Pose" }),
2195
+ /* @__PURE__ */ e.jsx(Oe, { size: "sm", colorScheme: "orange", variant: "subtle", children: "Sensor" })
2196
+ ] })
2197
+ ]
2198
+ }
2199
+ ),
2184
2200
  value: a.id,
2185
2201
  plane: a.plane,
2186
2202
  sensorOnly: a.sensorOnly,
@@ -2194,11 +2210,11 @@ const kn = ({
2194
2210
  return v.map((a) => ({
2195
2211
  ...a,
2196
2212
  options: a.options.filter(
2197
- (C) => Be(C.value) === Be(x.id) && C.plane === x.plane
2213
+ (C) => We(C.value) === We(x.id) && C.plane === x.plane
2198
2214
  )
2199
2215
  })).filter((a) => a.options.length > 0);
2200
2216
  }, [v, n, u]), M = k(() => v.flatMap((a) => a.options).filter(
2201
- (a) => n.some((C) => Ue(C.id, a.value) && C.plane === a.plane)
2217
+ (a) => n.some((C) => Qe(C.id, a.value) && C.plane === a.plane)
2202
2218
  ), [v, n]), w = G((x, a) => {
2203
2219
  if (!a) return !0;
2204
2220
  const C = a.toLowerCase().replace(/\s+|_/g, ""), j = x.data;
@@ -2209,11 +2225,11 @@ const kn = ({
2209
2225
  (x) => {
2210
2226
  const a = x.map((C) => {
2211
2227
  const j = n.find(
2212
- (T) => Ue(T.id, C.value) && T.plane === C.plane
2228
+ (T) => Qe(T.id, C.value) && T.plane === C.plane
2213
2229
  ), O = r.find(
2214
- (T) => Ue(T.id, C.value) && T.plane === C.plane
2230
+ (T) => Qe(T.id, C.value) && T.plane === C.plane
2215
2231
  ), R = u ? n.find(
2216
- (T) => Be(T.id) === Be(C.value) && T.plane === C.plane
2232
+ (T) => We(T.id) === We(C.value) && T.plane === C.plane
2217
2233
  ) : void 0, $ = R && !j ? R.min : O && O.min ? O.min : 0, A = R && !j ? R.max : O && O.max ? O.max : 0;
2218
2234
  return j ?? {
2219
2235
  id: C.value,
@@ -2221,7 +2237,7 @@ const kn = ({
2221
2237
  min: $,
2222
2238
  max: A,
2223
2239
  sensorOnly: C.sensorOnly,
2224
- kind: m ?? Ke.Limit
2240
+ kind: m ?? Ye.Limit
2225
2241
  };
2226
2242
  });
2227
2243
  i(a);
@@ -2230,10 +2246,10 @@ const kn = ({
2230
2246
  );
2231
2247
  return le(() => {
2232
2248
  const x = n.filter(
2233
- (a) => r.some((C) => Ue(C.id, a.id) && C.plane === a.plane)
2249
+ (a) => r.some((C) => Qe(C.id, a.id) && C.plane === a.plane)
2234
2250
  );
2235
2251
  x.length !== n.length && i(x);
2236
- }, [r, i, n]), /* @__PURE__ */ e.jsxs(te, { ...l, children: [
2252
+ }, [r, i, n]), /* @__PURE__ */ e.jsxs(ne, { ...l, children: [
2237
2253
  /* @__PURE__ */ e.jsx(
2238
2254
  he,
2239
2255
  {
@@ -2263,7 +2279,7 @@ const kn = ({
2263
2279
  }
2264
2280
  )
2265
2281
  ] });
2266
- }, bt = (r) => {
2282
+ }, yt = (r) => {
2267
2283
  switch (r) {
2268
2284
  case me.Thorax:
2269
2285
  return "Thorax";
@@ -2305,7 +2321,7 @@ const kn = ({
2305
2321
  quantumOwned: h,
2306
2322
  isView: s
2307
2323
  }) => {
2308
- const l = ot(), [{ fetching: p }, v] = fe(rt), [{ fetching: L }, M] = fe(dn), [{ data: w }] = we({
2324
+ const l = at(), [{ fetching: p }, v] = fe(ot), [{ fetching: L }, M] = fe(dn), [{ data: w }] = we({
2309
2325
  query: un,
2310
2326
  variables: { id: r ?? "" },
2311
2327
  pause: !r
@@ -2315,14 +2331,14 @@ const kn = ({
2315
2331
  w?.getActionById
2316
2332
  );
2317
2333
  if (!f) return null;
2318
- const F = (I(Ze, f.reports) || []).map((P) => ({
2319
- ...P,
2320
- thresholds: I(Oe, P.thresholds)
2334
+ const P = (I(Ve, f.reports) || []).map((F) => ({
2335
+ ...F,
2336
+ thresholds: I(Ae, F.thresholds)
2321
2337
  }));
2322
2338
  return {
2323
2339
  ...f,
2324
- thresholds: I(Oe, f.thresholds),
2325
- reports: F
2340
+ thresholds: I(Ae, f.thresholds),
2341
+ reports: P
2326
2342
  };
2327
2343
  }, [w]), x = p || L, a = !!y && !!r, { getLabel: C } = xe(), j = k(() => ({
2328
2344
  action: C("action")
@@ -2337,7 +2353,7 @@ const kn = ({
2337
2353
  label: "Activity Motion Direction",
2338
2354
  multi: !0
2339
2355
  }
2340
- ], [j.action]), [R, $] = _(""), [A, T] = _(""), [J, oe] = _(""), [D, Z] = _(""), [V, N] = _([]), [z, X] = _({}), [W, H] = _(null), [c, t] = _(""), [o, b] = _([]), [U, q] = _([]), [Q, E] = _(""), [K, ce] = _([]), ye = xn(), at = k(() => ye.filter((f) => f.sensorOnly), [ye]), ke = [
2356
+ ], [j.action]), [R, $] = _(""), [A, T] = _(""), [J, oe] = _(""), [D, Z] = _(""), [V, N] = _([]), [z, X] = _({}), [W, H] = _(null), [c, t] = _(""), [o, b] = _([]), [U, q] = _([]), [Q, E] = _(""), [K, ce] = _([]), ye = xn(), it = k(() => ye.filter((f) => f.sensorOnly), [ye]), Te = [
2341
2357
  {
2342
2358
  label: Le(ae.GeneralActivity),
2343
2359
  value: ae.GeneralActivity
@@ -2355,28 +2371,28 @@ const kn = ({
2355
2371
  label: Le(ae.PointOfInterest),
2356
2372
  value: ae.PointOfInterest
2357
2373
  }
2358
- ], Pe = k(() => R.trim().length > 0, [R]), [Ge, Ve] = _({});
2374
+ ], Ge = k(() => R.trim().length > 0, [R]), [Ee, et] = _({});
2359
2375
  le(() => {
2360
2376
  const f = O.map(
2361
- (B) => l.query(st, { key: B.key })
2377
+ (B) => l.query(rt, { key: B.key })
2362
2378
  );
2363
2379
  Promise.all(f).then((B) => {
2364
- const F = {};
2365
- B.forEach((P) => {
2366
- if (P.error || !P.data) return;
2367
- const ne = I(
2380
+ const P = {};
2381
+ B.forEach((F) => {
2382
+ if (F.error || !F.data) return;
2383
+ const se = I(
2368
2384
  je,
2369
- P.data.getMetadataByKey
2385
+ F.data.getMetadataByKey
2370
2386
  ), ee = I(
2371
2387
  be,
2372
- ne.data
2388
+ se.data
2373
2389
  );
2374
- F[ne.key] = ee.map((de) => ({
2390
+ P[se.key] = ee.map((de) => ({
2375
2391
  label: de.label || de.value,
2376
2392
  value: de.value,
2377
2393
  id: de.id
2378
2394
  }));
2379
- }), X(F);
2395
+ }), X(P);
2380
2396
  });
2381
2397
  }, [l, O]), le(() => {
2382
2398
  if (y) {
@@ -2384,13 +2400,13 @@ const kn = ({
2384
2400
  je,
2385
2401
  y.metadataGroups
2386
2402
  ).map(
2387
- (ne) => ne.data.map((ee) => I(be, ee).id)
2388
- ), F = y.reports.map((ne) => ({
2389
- id: ne.id,
2390
- name: ne.name ?? "",
2391
- instructions: ne.instructions ?? "",
2392
- kind: ne.reportKind,
2393
- parameters: ne.thresholds.map((ee) => ({
2403
+ (se) => se.data.map((ee) => I(be, ee).id)
2404
+ ), P = y.reports.map((se) => ({
2405
+ id: se.id,
2406
+ name: se.name ?? "",
2407
+ instructions: se.instructions ?? "",
2408
+ kind: se.reportKind,
2409
+ parameters: se.thresholds.map((ee) => ({
2394
2410
  id: {
2395
2411
  [ee.partKind]: ee.partId
2396
2412
  },
@@ -2399,25 +2415,25 @@ const kn = ({
2399
2415
  max: ee.max,
2400
2416
  plane: ee.partDimension,
2401
2417
  oldId: ee.id,
2402
- sensorOnly: at.some((de) => {
2403
- const et = de.id[ee.partKind];
2404
- return et ? et === ee.partId && de.plane === ee.partDimension : !1;
2418
+ sensorOnly: it.some((de) => {
2419
+ const tt = de.id[ee.partKind];
2420
+ return tt ? tt === ee.partId && de.plane === ee.partDimension : !1;
2405
2421
  })
2406
2422
  })),
2407
- sensorLocations: ne.sensorLocations
2408
- })), P = {
2423
+ sensorLocations: se.sensorLocations
2424
+ })), F = {
2409
2425
  name: y.name,
2410
2426
  description: y.description || "",
2411
2427
  cameraPlacement: y.cameraPlacement || "",
2412
2428
  videoLink: y.videoLink || "",
2413
2429
  metadataIds: B.flat(),
2414
- reports: F
2430
+ reports: P
2415
2431
  };
2416
- $(P.name), T(P.description), oe(P.cameraPlacement), Z(P.videoLink), N(P.metadataIds), ce(F), Ve(P);
2432
+ $(F.name), T(F.description), oe(F.cameraPlacement), Z(F.videoLink), N(F.metadataIds), ce(P), et(F);
2417
2433
  }
2418
2434
  }, [y]);
2419
- const Te = k(
2420
- () => JSON.stringify(Ge) !== JSON.stringify({
2435
+ const Ne = k(
2436
+ () => JSON.stringify(Ee) !== JSON.stringify({
2421
2437
  name: R,
2422
2438
  description: A,
2423
2439
  cameraPlacement: J,
@@ -2426,7 +2442,7 @@ const kn = ({
2426
2442
  reports: K
2427
2443
  }),
2428
2444
  [
2429
- Ge,
2445
+ Ee,
2430
2446
  R,
2431
2447
  A,
2432
2448
  J,
@@ -2449,20 +2465,20 @@ const kn = ({
2449
2465
  // Backend requires thresholds; use empty array since reports handle parameters now
2450
2466
  thresholds: [],
2451
2467
  // Include reports data
2452
- reports: K.map((F) => ({
2453
- id: F.isNew ? void 0 : F.id,
2454
- name: F.name,
2455
- reportKind: F.kind,
2456
- sensorLocations: F.sensorLocations,
2457
- instructions: F.instructions,
2458
- thresholds: F.parameters.map((P) => ({
2459
- id: P.oldId,
2460
- kind: P.kind,
2461
- min: P.min,
2462
- max: P.max,
2463
- partKind: "joint" in P.id ? "joint" : "segment",
2464
- partId: "joint" in P.id ? P.id.joint : P.id.segment,
2465
- partDimension: P.plane
2468
+ reports: K.map((P) => ({
2469
+ id: P.isNew ? void 0 : P.id,
2470
+ name: P.name,
2471
+ reportKind: P.kind,
2472
+ sensorLocations: P.sensorLocations,
2473
+ instructions: P.instructions,
2474
+ thresholds: P.parameters.map((F) => ({
2475
+ id: F.oldId,
2476
+ kind: F.kind,
2477
+ min: F.min,
2478
+ max: F.max,
2479
+ partKind: "joint" in F.id ? "joint" : "segment",
2480
+ partId: "joint" in F.id ? F.id.joint : F.id.segment,
2481
+ partDimension: F.plane
2466
2482
  }))
2467
2483
  }))
2468
2484
  };
@@ -2472,8 +2488,8 @@ const kn = ({
2472
2488
  fields: f
2473
2489
  }) : B = v({
2474
2490
  fields: f
2475
- }), B.then(({ error: F }) => {
2476
- F ? n(F) : m();
2491
+ }), B.then(({ error: P }) => {
2492
+ P ? n(P) : m();
2477
2493
  });
2478
2494
  }, [
2479
2495
  h,
@@ -2493,9 +2509,9 @@ const kn = ({
2493
2509
  le(() => {
2494
2510
  d && d({
2495
2511
  cancelButton: x,
2496
- saveButton: s ? !0 : x || !Pe || !Te
2512
+ saveButton: s ? !0 : x || !Ge || !Ne
2497
2513
  });
2498
- }, [x, d, Pe, Te, s]), le(() => {
2514
+ }, [x, d, Ge, Ne, s]), le(() => {
2499
2515
  u && u({
2500
2516
  cancelButton: i,
2501
2517
  saveButton: s ? () => {
@@ -2504,9 +2520,9 @@ const kn = ({
2504
2520
  }, [u, i, Se, s]);
2505
2521
  const pe = G(
2506
2522
  (f) => {
2507
- const B = xt(
2523
+ const B = ft(
2508
2524
  f.map(
2509
- (F) => "joint" in F.id ? F.id.joint : F.id.segment
2525
+ (P) => "joint" in P.id ? P.id.joint : P.id.segment
2510
2526
  )
2511
2527
  );
2512
2528
  q(B);
@@ -2516,7 +2532,7 @@ const kn = ({
2516
2532
  le(() => {
2517
2533
  pe(o);
2518
2534
  }, [o, pe]);
2519
- const Ne = G(() => {
2535
+ const Re = G(() => {
2520
2536
  if (!W || !c.trim())
2521
2537
  return;
2522
2538
  const f = W === ae.PointOfInterest, B = {
@@ -2529,7 +2545,7 @@ const kn = ({
2529
2545
  instructions: f ? Q : "",
2530
2546
  isNew: !0
2531
2547
  };
2532
- ce((F) => [...F, B]), H(null), t(""), b([]), q([]), E("");
2548
+ ce((P) => [...P, B]), H(null), t(""), b([]), q([]), E("");
2533
2549
  }, [
2534
2550
  W,
2535
2551
  c,
@@ -2537,27 +2553,27 @@ const kn = ({
2537
2553
  U,
2538
2554
  Q
2539
2555
  ]), $t = G((f) => {
2540
- ce((B) => B.filter((F) => F.id !== f));
2556
+ ce((B) => B.filter((P) => P.id !== f));
2541
2557
  }, []), Dt = (f, B) => {
2542
- const F = O.find((ne) => ne.key === f);
2543
- if (!F) return;
2544
- const P = F.multi ? (B ?? []).map(
2545
- (ne) => ne.id
2558
+ const P = O.find((se) => se.key === f);
2559
+ if (!P) return;
2560
+ const F = P.multi ? (B ?? []).map(
2561
+ (se) => se.id
2546
2562
  ) : B ? [B.id] : [];
2547
- N((ne) => [...ne.filter((de) => Object.values(z).flat().find((Ee) => Ee.id === de) && !Object.keys(z).find(
2548
- (Ee) => z[Ee]?.some(
2549
- (Ft) => Ft.id === de && Ee === f
2563
+ N((se) => [...se.filter((de) => Object.values(z).flat().find((_e) => _e.id === de) && !Object.keys(z).find(
2564
+ (_e) => z[_e]?.some(
2565
+ (Pt) => Pt.id === de && _e === f
2550
2566
  )
2551
- )), ...P]);
2567
+ )), ...F]);
2552
2568
  };
2553
2569
  return /* @__PURE__ */ e.jsxs(ue, { spacing: 4, w: "full", align: "stretch", children: [
2554
2570
  /* @__PURE__ */ e.jsxs(tn, { children: [
2555
2571
  /* @__PURE__ */ e.jsxs(nn, { children: [
2556
- /* @__PURE__ */ e.jsx(ht, { children: "Activity Configuration" }),
2557
- /* @__PURE__ */ e.jsx(ht, { children: "Reports Configuration" })
2572
+ /* @__PURE__ */ e.jsx(pt, { children: "Activity Configuration" }),
2573
+ /* @__PURE__ */ e.jsx(pt, { children: "Reports Configuration" })
2558
2574
  ] }),
2559
2575
  /* @__PURE__ */ e.jsxs(sn, { children: [
2560
- /* @__PURE__ */ e.jsx(pt, { px: 0, children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
2576
+ /* @__PURE__ */ e.jsx(gt, { px: 0, children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
2561
2577
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2562
2578
  /* @__PURE__ */ e.jsxs(Y, { children: [
2563
2579
  /* @__PURE__ */ e.jsx(ie, { children: "Name" }),
@@ -2575,7 +2591,7 @@ const kn = ({
2575
2591
  /* @__PURE__ */ e.jsxs(Y, { children: [
2576
2592
  /* @__PURE__ */ e.jsx(ie, { children: "Camera Placement" }),
2577
2593
  /* @__PURE__ */ e.jsx(
2578
- ze,
2594
+ Be,
2579
2595
  {
2580
2596
  value: J,
2581
2597
  onChange: (f) => oe(f.target.value),
@@ -2601,7 +2617,7 @@ const kn = ({
2601
2617
  /* @__PURE__ */ e.jsxs(Y, { children: [
2602
2618
  /* @__PURE__ */ e.jsx(ie, { children: "Description" }),
2603
2619
  /* @__PURE__ */ e.jsx(
2604
- ze,
2620
+ Be,
2605
2621
  {
2606
2622
  value: A,
2607
2623
  onChange: (f) => T(f.target.value),
@@ -2635,15 +2651,15 @@ const kn = ({
2635
2651
  ] }, f.key))
2636
2652
  ] })
2637
2653
  ] }) }),
2638
- /* @__PURE__ */ e.jsx(pt, { px: 0, children: /* @__PURE__ */ e.jsxs(
2654
+ /* @__PURE__ */ e.jsx(gt, { px: 0, children: /* @__PURE__ */ e.jsxs(
2639
2655
  "div",
2640
2656
  {
2641
- className: qe(
2657
+ className: Ke(
2642
2658
  "grid grid-cols-1 gap-6",
2643
2659
  !s && "md:grid-cols-2"
2644
2660
  ),
2645
2661
  children: [
2646
- /* @__PURE__ */ e.jsxs("div", { className: qe("space-y-4", s && "hidden"), children: [
2662
+ /* @__PURE__ */ e.jsxs("div", { className: Ke("space-y-4", s && "hidden"), children: [
2647
2663
  /* @__PURE__ */ e.jsx(ie, { children: "Add New Report" }),
2648
2664
  /* @__PURE__ */ e.jsxs(Y, { children: [
2649
2665
  /* @__PURE__ */ e.jsx(ie, { children: "Report Name" }),
@@ -2664,11 +2680,11 @@ const kn = ({
2664
2680
  /* @__PURE__ */ e.jsx(
2665
2681
  he,
2666
2682
  {
2667
- value: W ? ke.find(
2683
+ value: W ? Te.find(
2668
2684
  (f) => f.value === W
2669
2685
  ) : null,
2670
2686
  onChange: (f) => H(f?.value || null),
2671
- options: ke,
2687
+ options: Te,
2672
2688
  placeholder: "Select report type...",
2673
2689
  isDisabled: s,
2674
2690
  isClearable: !0
@@ -2679,7 +2695,7 @@ const kn = ({
2679
2695
  /* @__PURE__ */ e.jsxs(Y, { children: [
2680
2696
  /* @__PURE__ */ e.jsx(ie, { children: "Default Parameters" }),
2681
2697
  /* @__PURE__ */ e.jsx(
2682
- jt,
2698
+ bt,
2683
2699
  {
2684
2700
  options: ye,
2685
2701
  value: o,
@@ -2689,12 +2705,12 @@ const kn = ({
2689
2705
  )
2690
2706
  ] }),
2691
2707
  /* @__PURE__ */ e.jsxs(Y, { children: [
2692
- /* @__PURE__ */ e.jsx(ie, { children: "Suggested Sensor Locations" }),
2708
+ /* @__PURE__ */ e.jsx(ie, { children: "Sensor Locations" }),
2693
2709
  /* @__PURE__ */ e.jsx(
2694
2710
  ve,
2695
2711
  {
2696
2712
  value: U.map(
2697
- (f) => bt(f)
2713
+ (f) => yt(f)
2698
2714
  ).join(", "),
2699
2715
  placeholder: "Auto-filled based on parameters...",
2700
2716
  isDisabled: !0
@@ -2705,7 +2721,7 @@ const kn = ({
2705
2721
  W === ae.PointOfInterest && /* @__PURE__ */ e.jsxs(Y, { children: [
2706
2722
  /* @__PURE__ */ e.jsx(ie, { children: "Instructions" }),
2707
2723
  /* @__PURE__ */ e.jsx(
2708
- ze,
2724
+ Be,
2709
2725
  {
2710
2726
  value: Q,
2711
2727
  onChange: (f) => E(f.target.value),
@@ -2716,11 +2732,11 @@ const kn = ({
2716
2732
  )
2717
2733
  ] }),
2718
2734
  /* @__PURE__ */ e.jsx("div", { className: "w-full flex justify-end", children: /* @__PURE__ */ e.jsx(
2719
- se,
2735
+ re,
2720
2736
  {
2721
2737
  colorScheme: "blue",
2722
- onClick: Ne,
2723
- isDisabled: !W || !c.trim() || s || ke.length === 0 || W !== ae.PointOfInterest && o.length === 0,
2738
+ onClick: Re,
2739
+ isDisabled: !W || !c.trim() || s || Te.length === 0 || W !== ae.PointOfInterest && o.length === 0,
2724
2740
  children: "Add Report"
2725
2741
  }
2726
2742
  ) })
@@ -2735,7 +2751,7 @@ const kn = ({
2735
2751
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-start", children: [
2736
2752
  /* @__PURE__ */ e.jsx(S, { fontSize: "sm", color: "gray.600", children: Le(f.kind) }),
2737
2753
  !s && /* @__PURE__ */ e.jsx(
2738
- se,
2754
+ re,
2739
2755
  {
2740
2756
  size: "xs",
2741
2757
  colorScheme: "red",
@@ -2752,8 +2768,8 @@ const kn = ({
2752
2768
  {
2753
2769
  value: f.name,
2754
2770
  onChange: (B) => ce(
2755
- (F) => F.map(
2756
- (P) => P.id === f.id ? { ...P, name: B.target.value } : P
2771
+ (P) => P.map(
2772
+ (F) => F.id === f.id ? { ...F, name: B.target.value } : F
2757
2773
  )
2758
2774
  ),
2759
2775
  placeholder: "Enter report name...",
@@ -2764,12 +2780,12 @@ const kn = ({
2764
2780
  f.kind === ae.PointOfInterest && /* @__PURE__ */ e.jsxs(Y, { children: [
2765
2781
  /* @__PURE__ */ e.jsx(ie, { children: "Instructions" }),
2766
2782
  /* @__PURE__ */ e.jsx(
2767
- ze,
2783
+ Be,
2768
2784
  {
2769
2785
  value: f.instructions,
2770
2786
  onChange: (B) => ce(
2771
- (F) => F.map(
2772
- (P) => P.id === f.id ? { ...P, instructions: B.target.value } : P
2787
+ (P) => P.map(
2788
+ (F) => F.id === f.id ? { ...F, instructions: B.target.value } : F
2773
2789
  )
2774
2790
  ),
2775
2791
  rows: 3,
@@ -2781,15 +2797,15 @@ const kn = ({
2781
2797
  f.kind !== ae.PointOfInterest && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
2782
2798
  /* @__PURE__ */ e.jsx(ie, { children: "Default Parameters" }),
2783
2799
  /* @__PURE__ */ e.jsx(
2784
- jt,
2800
+ bt,
2785
2801
  {
2786
2802
  options: ye,
2787
2803
  value: f.parameters,
2788
2804
  onChange: (B) => {
2789
- const F = (ee) => "joint" in ee.id ? ee.id.joint : ee.id.segment, P = B.map(F), ne = xt(P);
2805
+ const P = (ee) => "joint" in ee.id ? ee.id.joint : ee.id.segment, F = B.map(P), se = ft(F);
2790
2806
  ce(
2791
2807
  (ee) => ee.map(
2792
- (de) => de.id === f.id ? { ...de, parameters: B, sensorLocations: ne } : de
2808
+ (de) => de.id === f.id ? { ...de, parameters: B, sensorLocations: se } : de
2793
2809
  )
2794
2810
  );
2795
2811
  },
@@ -2801,7 +2817,7 @@ const kn = ({
2801
2817
  "Sensors:",
2802
2818
  " ",
2803
2819
  f.sensorLocations.map(
2804
- (B) => bt(B)
2820
+ (B) => yt(B)
2805
2821
  ).join(", ")
2806
2822
  ] })
2807
2823
  ]
@@ -2815,17 +2831,17 @@ const kn = ({
2815
2831
  ] })
2816
2832
  ] }),
2817
2833
  /* @__PURE__ */ e.jsx(
2818
- re,
2834
+ te,
2819
2835
  {
2820
2836
  justify: "end",
2821
- className: qe((g || s) && "!hidden"),
2822
- children: /* @__PURE__ */ e.jsxs(Ae, { gap: 4, children: [
2823
- /* @__PURE__ */ e.jsx(se, { colorScheme: "gray", isDisabled: x, onClick: i, children: "Cancel" }),
2837
+ className: Ke((g || s) && "!hidden"),
2838
+ children: /* @__PURE__ */ e.jsxs(ke, { gap: 4, children: [
2839
+ /* @__PURE__ */ e.jsx(re, { colorScheme: "gray", isDisabled: x, onClick: i, children: "Cancel" }),
2824
2840
  /* @__PURE__ */ e.jsx(
2825
- se,
2841
+ re,
2826
2842
  {
2827
2843
  colorScheme: "blue",
2828
- isDisabled: x || !Pe || !Te,
2844
+ isDisabled: x || !Ge || !Ne,
2829
2845
  isLoading: x,
2830
2846
  onClick: Se,
2831
2847
  children: "Save changes"
@@ -2835,17 +2851,17 @@ const kn = ({
2835
2851
  }
2836
2852
  )
2837
2853
  ] });
2838
- }, ie = ({ children: r }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: r }), Xn = ({
2854
+ }, ie = ({ children: r }) => /* @__PURE__ */ e.jsx(Ze, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: r }), Xn = ({
2839
2855
  children: r,
2840
2856
  isView: n,
2841
2857
  metadataKeys: i
2842
2858
  }) => {
2843
- const [m, g] = _({}), u = ot();
2859
+ const [m, g] = _({}), u = at();
2844
2860
  return le(() => {
2845
2861
  let d = !1;
2846
2862
  return (async () => {
2847
2863
  const s = (i ?? []).map(
2848
- (v) => u.query(st, { key: v }).toPromise()
2864
+ (v) => u.query(rt, { key: v }).toPromise()
2849
2865
  ), l = await Promise.all(s), p = {};
2850
2866
  for (const v of l) {
2851
2867
  if (v.error || !v.data?.getMetadataByKey) continue;
@@ -2886,19 +2902,19 @@ const kn = ({
2886
2902
  }), [{ data: L }] = we({
2887
2903
  query: gn
2888
2904
  }), M = I(
2889
- De,
2905
+ Pe,
2890
2906
  L?.moduleCategories
2891
2907
  ), [{ fetching: w }, y] = fe(At), [{ fetching: x }, a] = fe(Ot), C = k(() => !l || p ? [] : I(
2892
2908
  Ce,
2893
2909
  u ? l?.quantumOwnedActions ?? [] : l?.actions ?? []
2894
- ).filter((c) => !!c?.id), [l, u, p]), j = I(Qe, v?.module), O = k(() => I(kt, j?.moduleActions) ?? [], [j?.moduleActions]), [R, $] = _([
2910
+ ).filter((c) => !!c?.id), [l, u, p]), j = I(qe, v?.module), O = k(() => I(kt, j?.moduleActions) ?? [], [j?.moduleActions]), [R, $] = _([
2895
2911
  ...O.map((H) => H.actionId) ?? []
2896
2912
  ]), [A, T] = _(j?.name ?? ""), [J, oe] = _([]), [D, Z] = _(j?.description ?? ""), [V, N] = _([]), [z, X] = _({});
2897
2913
  le(() => {
2898
2914
  if (j) {
2899
2915
  $(O.map((o) => o.actionId)), T(j.name), Z(j.description ?? ""), oe(
2900
2916
  j.categories.map(
2901
- (o) => I(De, o).id
2917
+ (o) => I(Pe, o).id
2902
2918
  ) ?? []
2903
2919
  );
2904
2920
  const c = I(
@@ -2960,7 +2976,7 @@ const kn = ({
2960
2976
  cancelButton: n,
2961
2977
  saveButton: W
2962
2978
  });
2963
- }, [d, n, W]), /* @__PURE__ */ e.jsx(te, { width: "100%", children: /* @__PURE__ */ e.jsxs(
2979
+ }, [d, n, W]), /* @__PURE__ */ e.jsx(ne, { width: "100%", children: /* @__PURE__ */ e.jsxs(
2964
2980
  Xn,
2965
2981
  {
2966
2982
  isView: s,
@@ -2985,9 +3001,9 @@ const kn = ({
2985
3001
  setActionReportIds: X
2986
3002
  }
2987
3003
  ),
2988
- !g && !s && /* @__PURE__ */ e.jsx(re, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(Ae, { mt: 16, gap: 4, children: [
3004
+ !g && !s && /* @__PURE__ */ e.jsx(te, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(ke, { mt: 16, gap: 4, children: [
2989
3005
  /* @__PURE__ */ e.jsx(
2990
- se,
3006
+ re,
2991
3007
  {
2992
3008
  colorScheme: "gray",
2993
3009
  isDisabled: w || x,
@@ -2996,7 +3012,7 @@ const kn = ({
2996
3012
  }
2997
3013
  ),
2998
3014
  /* @__PURE__ */ e.jsx(
2999
- se,
3015
+ re,
3000
3016
  {
3001
3017
  colorScheme: "blue",
3002
3018
  isDisabled: w || x || !A || D.trim().split(/\s+/).filter(Boolean).length > 40,
@@ -3016,7 +3032,7 @@ export {
3016
3032
  fs as CopyModuleForm,
3017
3033
  zn as ModuleForm,
3018
3034
  Hn as ParameterEditList,
3019
- jt as ParameterEditSelect,
3035
+ bt as ParameterEditSelect,
3020
3036
  js as UpsertActivityForm,
3021
3037
  bs as UpsertModuleForm
3022
3038
  };