quantum-component-library 1.4.48-dev.6 → 1.4.48-dev.8

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.
Files changed (52) hide show
  1. package/dist/components.cjs +1 -1
  2. package/dist/components.js +490 -491
  3. package/dist/{dnd-core-vendor-C8EkmZ-Q.js → dnd-core-vendor-CEbjUoFs.js} +2 -2
  4. package/dist/{dnd-core-vendor-CrbsA5lC.cjs → dnd-core-vendor-gqRN0Czq.cjs} +1 -1
  5. package/dist/generated/graphql.d.ts +1 -1
  6. package/dist/{graphql-vendor-BGoVZGn3.cjs → graphql-vendor-AFHxLsy8.cjs} +1 -1
  7. package/dist/{graphql-vendor-BsmTENtE.js → graphql-vendor-hJezYUeG.js} +1 -1
  8. package/dist/hooks.cjs +1 -1
  9. package/dist/hooks.js +13 -13
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.js +130 -125
  12. package/dist/lib/utils/cn.d.ts +2 -0
  13. package/dist/lib/utils/index.d.ts +1 -2
  14. package/dist/{lodash-vendor-CR237hSU.cjs → lodash-vendor-CF0pV_0E.cjs} +1 -1
  15. package/dist/{lodash-vendor-D4ZPCr77.js → lodash-vendor-apNdTTav.js} +1 -1
  16. package/dist/other-D9ROT7p0.js +20 -0
  17. package/dist/other-DyoApG-9.cjs +1 -0
  18. package/dist/quantum-component-library.css +1 -1
  19. package/dist/{react-dnd-vendor-DQO87S4J.js → react-dnd-vendor-BCrg2QCX.js} +2 -2
  20. package/dist/{react-dnd-vendor-BuaDqq1-.cjs → react-dnd-vendor-PwwXhPmK.cjs} +1 -1
  21. package/dist/react-icons-vendor-BF_sZq07.cjs +1 -0
  22. package/dist/{react-icons-vendor-TETORdU9.js → react-icons-vendor-CMsTQrA0.js} +51 -43
  23. package/dist/{react-select-vendor-C09H7eSP.cjs → react-select-vendor-BeWvSe2q.cjs} +1 -1
  24. package/dist/{react-select-vendor-D8Fzpeg3.js → react-select-vendor-BxbsY5Z-.js} +1 -1
  25. package/dist/services-action-CfZFwhy-.js +40 -0
  26. package/dist/services-action-DBOzfgMl.cjs +1 -0
  27. package/dist/services-human-B98qxeuS.js +798 -0
  28. package/dist/services-human-CnvSTmoF.cjs +1 -0
  29. package/dist/services-rom-DmV5X8yu.cjs +1 -0
  30. package/dist/services-rom-omMeC-vQ.js +18 -0
  31. package/dist/services.cjs +1 -1
  32. package/dist/services.js +52 -844
  33. package/dist/types.cjs +1 -1
  34. package/dist/types.js +11 -11
  35. package/dist/utils-cn-CgdSr4hO.js +7 -0
  36. package/dist/utils-cn-FIKrq5Mb.cjs +1 -0
  37. package/dist/utils-conversion-CWypeWsT.cjs +1 -0
  38. package/dist/utils-conversion-ChFbq8I2.js +94 -0
  39. package/dist/utils-memo-BJJP2KfI.cjs +1 -0
  40. package/dist/utils-memo-DtXdOqCT.js +13 -0
  41. package/dist/utils-parameters-BBFuBK2B.js +21 -0
  42. package/dist/utils-parameters-dwKmz1VU.cjs +1 -0
  43. package/dist/utils-text-CN3zLiZ7.js +5 -0
  44. package/dist/utils-text-lORqO4uI.cjs +1 -0
  45. package/dist/utils.cjs +1 -1
  46. package/dist/utils.js +29 -126
  47. package/dist/{vendor-CRvKgRcl.js → vendor-BOD7IxCS.js} +1 -1
  48. package/dist/{vendor-BwXiOWc8.cjs → vendor-IPtJZCbx.cjs} +1 -1
  49. package/package.json +1 -1
  50. package/dist/other-C4VnLmM6.js +0 -15
  51. package/dist/other-Dp3RPYfF.cjs +0 -1
  52. package/dist/react-icons-vendor-D2s8zw9h.cjs +0 -1
@@ -1,42 +1,43 @@
1
1
  import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
2
- import { Flex as fe, InputGroup as Ge, InputLeftElement as pt, Icon as Je, Input as ye, FormLabel as Xe, Box as V, TableContainer as Ze, Table as Ke, Thead as Ve, Tr as Oe, Th as xe, Tbody as et, Td as je, ButtonGroup as be, Tooltip as Pe, Button as ee, RangeSlider as gt, RangeSliderMark as De, Text as v, RangeSliderTrack as xt, RangeSliderFilledTrack as ft, RangeSliderThumb as We, Select as Ue, NumberInput as Be, NumberInputField as Qe, HStack as re, Tag as ve, Checkbox as jt, Image as bt, useToast as tt, VStack as oe, FormControl as K, RadioGroup as nt, Radio as Ne, Alert as ke, AlertIcon as $e, Spinner as st, useDisclosure as Ct, Modal as yt, ModalOverlay as vt, ModalContent as wt, ModalHeader as Lt, ModalCloseButton as St, ModalBody as Mt, ModalFooter as At, IconButton as Tt, Textarea as qe } from "@chakra-ui/react";
3
- import { useMemo as A, useState as z, useCallback as F, useRef as It, useEffect as ae, memo as Re } from "react";
4
- import { useQuery as he, useMutation as le, useClient as Ot } from "urql";
2
+ import { Flex as fe, InputGroup as Ge, InputLeftElement as gt, Icon as Je, Input as ye, FormLabel as Xe, Box as V, TableContainer as Ze, Table as Ke, Thead as Ve, Tr as Oe, Th as xe, Tbody as et, Td as je, ButtonGroup as be, Tooltip as _e, Button as ee, RangeSlider as xt, RangeSliderMark as De, Text as v, RangeSliderTrack as ft, RangeSliderFilledTrack as jt, RangeSliderThumb as We, Select as Ue, NumberInput as Be, NumberInputField as Qe, HStack as re, Tag as ve, Image as bt, useToast as tt, VStack as oe, FormControl as K, RadioGroup as nt, Radio as Ne, Alert as ke, AlertIcon as $e, Spinner as st, useDisclosure as Ct, Modal as yt, ModalOverlay as vt, ModalContent as wt, ModalHeader as Lt, ModalCloseButton as St, ModalBody as Mt, ModalFooter as At, IconButton as Tt, Textarea as qe } from "@chakra-ui/react";
3
+ import { useMemo as A, useState as z, useCallback as R, useRef as It, useEffect as ae, memo as Fe } from "react";
4
+ import { useQuery as he, useMutation as ie, useClient as Ot } from "urql";
5
+ import { c as ot } from "./utils-cn-CgdSr4hO.js";
5
6
  import "./moment-vendor-DMLRxgRE.js";
6
7
  import { useUiLabelContext as pe, usePartOptionsForSensorLocations as Nt } from "./hooks.js";
7
8
  import { u as kt } from "./ufuzzy-vendor-Dl0ZI6Av.js";
8
- import { s as de } from "./react-select-vendor-D8Fzpeg3.js";
9
- import { F as $t, a as Rt } from "./react-icons-vendor-TETORdU9.js";
10
- import { getFragmentData as P } from "./generated.js";
11
- import { G as ot, a as Ft, C as ze, b as rt, M as we, c as Ee, A as me, d as _e, e as at, f as Dt, g as it, U as lt, h as Te, i as ct, j as Et, k as _t, l as Pt, m as zt, n as Gt, o as Wt, p as Ut } from "./graphql-_vGi4u4K.js";
12
- import { D as Bt, H as Qt, u as qt, a as Yt } from "./react-dnd-vendor-DQO87S4J.js";
13
- import { ThresholdKind as Ie, SensorLocation as G, ActionLaterality as Ht } from "./generated-graphql.js";
14
- import { getSegmentNameWithPlane as dt, getJointNameWithPlane as ut, getJointAngleDirectionName as Jt, getSegmentAngleDirectionName as Xt, getNormativeJointRange as Zt } from "./services.js";
9
+ import { F as $t, a as Ft, b as Rt, c as Dt } from "./react-icons-vendor-CMsTQrA0.js";
10
+ import { s as de } from "./react-select-vendor-BxbsY5Z-.js";
11
+ import { getFragmentData as _ } from "./generated.js";
12
+ import { G as rt, a as Et, C as ze, b as at, M as we, c as Ee, A as me, d as Pe, e as lt, f as Pt, g as it, U as ct, h as Te, i as dt, j as _t, k as zt, l as Gt, m as Wt, n as Ut, o as Bt, p as Qt } from "./graphql-_vGi4u4K.js";
13
+ import { D as qt, H as Yt, u as Ht, a as Jt } from "./react-dnd-vendor-BCrg2QCX.js";
14
+ import { ThresholdKind as Ie, SensorLocation as G, ActionLaterality as Xt } from "./generated-graphql.js";
15
+ import { g as ut, a as ht, b as Zt, c as Kt, d as Vt } from "./services-human-B98qxeuS.js";
15
16
  import { availablePlanes as Ye, getAnalysisPartIdNoSide as Se } from "./types.js";
16
- import { thresholdsToParameters as Kt, parametersToThresholds as He, cn as Vt } from "./utils.js";
17
- const en = ({
17
+ import { t as en, p as He } from "./utils-parameters-BBFuBK2B.js";
18
+ const tn = ({
18
19
  setSearch: n,
19
20
  actions: t,
20
- updateUseCases: i,
21
+ updateUseCases: a,
21
22
  hideUseCaseFilter: c = !1
22
23
  }) => {
23
24
  const u = A(
24
- () => t?.flatMap((l) => l.useCases).filter((l, d, m) => m.findIndex((r) => r.id === l.id) === d).map((l) => ({
25
- label: l.name,
26
- value: l.id
25
+ () => t?.flatMap((i) => i.useCases).filter((i, d, m) => m.findIndex((l) => l.id === i.id) === d).map((i) => ({
26
+ label: i.name,
27
+ value: i.id
27
28
  })) || [],
28
29
  [t]
29
30
  );
30
31
  return /* @__PURE__ */ e.jsxs(fe, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
31
32
  /* @__PURE__ */ e.jsxs(Ge, { size: "md", flex: 1, children: [
32
- /* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsx(Je, { as: $t, color: "gray.300" }) }),
33
+ /* @__PURE__ */ e.jsx(gt, { children: /* @__PURE__ */ e.jsx(Je, { as: $t, color: "gray.300" }) }),
33
34
  /* @__PURE__ */ e.jsx(
34
35
  ye,
35
36
  {
36
37
  placeholder: "Search by name...",
37
38
  width: "100%",
38
39
  maxW: c ? void 0 : "30rem",
39
- onChange: (l) => n(l.target.value)
40
+ onChange: (i) => n(i.target.value)
40
41
  }
41
42
  )
42
43
  ] }),
@@ -45,8 +46,8 @@ const en = ({
45
46
  {
46
47
  size: "md",
47
48
  chakraStyles: {
48
- container: (l) => ({
49
- ...l,
49
+ container: (i) => ({
50
+ ...i,
50
51
  width: "100%"
51
52
  })
52
53
  },
@@ -54,34 +55,34 @@ const en = ({
54
55
  placeholder: "Filter use case",
55
56
  isMulti: !0,
56
57
  options: u,
57
- onChange: (l) => i(l.map((d) => d.value))
58
+ onChange: (i) => a(i.map((d) => d.value))
58
59
  }
59
60
  ) })
60
61
  ] });
61
62
  }, ce = ({
62
63
  children: n
63
- }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: n }), tn = ({ value: n, onChange: t }) => {
64
- const i = z(
64
+ }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: n }), nn = ({ value: n, onChange: t }) => {
65
+ const a = z(
65
66
  () => Math.random().toString(36).substring(2, 15)
66
- )[0], c = F(
67
- (u, l) => {
67
+ )[0], c = R(
68
+ (u, i) => {
68
69
  t((d) => {
69
- const m = [...d], [r] = m.splice(u, 1);
70
- return m.splice(l, 0, r), m;
70
+ const m = [...d], [l] = m.splice(u, 1);
71
+ return m.splice(i, 0, l), m;
71
72
  });
72
73
  },
73
74
  [t]
74
75
  );
75
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(Bt, { backend: Qt, children: /* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs(Ke, { variant: "simple", size: "md", children: [
76
+ return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(qt, { backend: Yt, children: /* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs(Ke, { variant: "simple", size: "md", children: [
76
77
  /* @__PURE__ */ e.jsx(Ve, { children: /* @__PURE__ */ e.jsxs(Oe, { children: [
77
78
  /* @__PURE__ */ e.jsx(xe, { children: "Order" }),
78
79
  /* @__PURE__ */ e.jsx(xe, { children: "Name" })
79
80
  ] }) }),
80
- /* @__PURE__ */ e.jsx(et, { children: n.map((u, l) => /* @__PURE__ */ e.jsx(
81
- nn,
81
+ /* @__PURE__ */ e.jsx(et, { children: n.map((u, i) => /* @__PURE__ */ e.jsx(
82
+ sn,
82
83
  {
83
- listKey: i,
84
- index: l,
84
+ listKey: a,
85
+ index: i,
85
86
  id: u.id,
86
87
  name: u.name,
87
88
  move: c
@@ -89,103 +90,103 @@ const en = ({
89
90
  u.id
90
91
  )) })
91
92
  ] }) }) }) });
92
- }, nn = ({ listKey: n, index: t, id: i, name: c, move: u }) => {
93
- const l = It(null), [{ handlerId: d }, m] = qt({
93
+ }, sn = ({ listKey: n, index: t, id: a, name: c, move: u }) => {
94
+ const i = It(null), [{ handlerId: d }, m] = Ht({
94
95
  accept: n,
95
96
  collect: (p) => ({
96
97
  handlerId: p.getHandlerId()?.toString() ?? ""
97
98
  }),
98
99
  hover: (p, L) => {
99
- if (!l.current)
100
+ if (!i.current)
100
101
  return;
101
102
  const b = p.index, s = t;
102
103
  if (b === s)
103
104
  return;
104
- const f = l.current?.getBoundingClientRect(), C = (f.bottom - f.top) / 2, S = L.getClientOffset().y - f.top;
105
+ const f = i.current?.getBoundingClientRect(), C = (f.bottom - f.top) / 2, S = L.getClientOffset().y - f.top;
105
106
  b < s && S < C || b > s && S > C || (u(b, s), p.index = s);
106
107
  }
107
- }), [{ isDragging: r }, x] = Yt({
108
+ }), [{ isDragging: l }, x] = Jt({
108
109
  type: n,
109
- item: () => ({ id: i, index: t }),
110
+ item: () => ({ id: a, index: t }),
110
111
  collect: (p) => ({
111
112
  isDragging: p.isDragging()
112
113
  })
113
- }), h = r ? 0.6 : 1, T = r ? "grabbing" : "grab";
114
- return x(m(l)), /* @__PURE__ */ e.jsxs(Oe, { ref: l, style: { opacity: h, cursor: T }, "data-handler-id": d, children: [
114
+ }), h = l ? 0.6 : 1, T = l ? "grabbing" : "grab";
115
+ return x(m(i)), /* @__PURE__ */ e.jsxs(Oe, { ref: i, style: { opacity: h, cursor: T }, "data-handler-id": d, children: [
115
116
  /* @__PURE__ */ e.jsx(je, { children: t + 1 }),
116
117
  /* @__PURE__ */ e.jsx(je, { children: c })
117
118
  ] });
118
- }, sn = ({
119
+ }, on = ({
119
120
  items: n,
120
121
  onChange: t,
121
- selectedItem: i,
122
+ selectedItem: a,
122
123
  isDisabled: c,
123
124
  selectedProps: u,
124
- buttonProps: l
125
+ buttonProps: i
125
126
  }) => {
126
- const d = (r) => r === i || r.value === i, m = (r) => d(r) ? { ...l, ...u } : l;
127
- return /* @__PURE__ */ e.jsx(be, { isAttached: !0, isDisabled: c, children: n.map((r, x) => /* @__PURE__ */ e.jsx(
128
- Pe,
127
+ const d = (l) => l === a || l.value === a, m = (l) => d(l) ? { ...i, ...u } : i;
128
+ return /* @__PURE__ */ e.jsx(be, { isAttached: !0, isDisabled: c, children: n.map((l, x) => /* @__PURE__ */ e.jsx(
129
+ _e,
129
130
  {
130
- label: r.tooltip,
131
+ label: l.tooltip,
131
132
  openDelay: 50,
132
133
  closeDelay: 200,
133
134
  placement: "top",
134
- visibility: r.tooltip ? "visible" : "hidden",
135
+ visibility: l.tooltip ? "visible" : "hidden",
135
136
  hasArrow: !0,
136
137
  children: /* @__PURE__ */ e.jsx(
137
138
  ee,
138
139
  {
139
- onClick: () => d(r) ? null : t(r, x),
140
- isDisabled: r.disabled,
141
- ...m(r),
142
- children: r.label
140
+ onClick: () => d(l) ? null : t(l, x),
141
+ isDisabled: l.disabled,
142
+ ...m(l),
143
+ children: l.label
143
144
  }
144
145
  )
145
146
  },
146
147
  x
147
148
  )) });
148
- }, Me = (n, t) => t < 0 ? -1 * Math.abs(n) : Math.abs(n), on = ({
149
+ }, Me = (n, t) => t < 0 ? -1 * Math.abs(n) : Math.abs(n), rn = ({
149
150
  isReversed: n,
150
151
  min: t,
151
- max: i,
152
+ max: a,
152
153
  value: c,
153
154
  onChange: u,
154
- inputProps: l,
155
+ inputProps: i,
155
156
  size: d,
156
157
  zeroMarker: m,
157
- formatValue: r,
158
+ formatValue: l,
158
159
  valueLabel: x,
159
160
  positiveNegativeLabels: h,
160
161
  isDisabled: T,
161
162
  ...p
162
163
  }) => {
163
- const [L, b] = z([void 0, void 0]), s = L[0], f = L[1], C = m && t < -5 && i > 5, j = Number(c?.[0] ?? f ?? t) > 0 ? 1 : -1, S = Number(c?.[1] ?? f ?? i) < 0 ? -1 : 1, R = h?.[0] === h?.[1], I = c?.[0], B = c?.[1];
164
+ const [L, b] = z([void 0, void 0]), s = L[0], f = L[1], C = m && t < -5 && a > 5, j = Number(c?.[0] ?? f ?? t) > 0 ? 1 : -1, S = Number(c?.[1] ?? f ?? a) < 0 ? -1 : 1, F = h?.[0] === h?.[1], N = c?.[0], B = c?.[1];
164
165
  ae(() => {
165
- I !== void 0 && B !== void 0 && b([I.toFixed(0), B.toFixed(0)]);
166
- }, [I, B, b]);
167
- const k = F(
166
+ N !== void 0 && B !== void 0 && b([N.toFixed(0), B.toFixed(0)]);
167
+ }, [N, B, b]);
168
+ const k = R(
168
169
  ([y, D]) => {
169
170
  y < D && b([y.toFixed(0), D.toFixed(0)]);
170
171
  },
171
172
  [b]
172
- ), $ = F(
173
+ ), $ = R(
173
174
  ([y, D]) => {
174
175
  y < D && u([y, D]);
175
176
  },
176
177
  [u]
177
- ), M = F(() => {
178
+ ), M = R(() => {
178
179
  b(([y, D]) => {
179
- const X = isNaN(Number(y)) ? t : Number(y), Z = isNaN(Number(D)) ? i : Number(D), E = Me(Number(X), j), a = Me(Number(Z), S), o = j < 0 ? Math.max(E, t) : Math.min(E, i), w = S < 0 ? Math.max(a, t) : Math.min(a, i);
180
+ const X = isNaN(Number(y)) ? t : Number(y), Z = isNaN(Number(D)) ? a : Number(D), E = Me(Number(X), j), r = Me(Number(Z), S), o = j < 0 ? Math.max(E, t) : Math.min(E, a), w = S < 0 ? Math.max(r, t) : Math.min(r, a);
180
181
  return o > w ? (u([w, o]), [w.toFixed(0), o.toFixed(0)]) : (u([o, w]), [o.toFixed(0), w.toFixed(0)]);
181
182
  });
182
- }, [u, b, j, S, t, i]), se = F(
183
+ }, [u, b, j, S, t, a]), se = R(
183
184
  (y) => {
184
185
  const D = y === "" || isNaN(Number(y)) ? y : Me(Number(y), j);
185
186
  b(([X, Z]) => [D.toString(), Z]);
186
187
  },
187
188
  [b, j]
188
- ), J = F(
189
+ ), J = R(
189
190
  (y) => {
190
191
  const D = y === "" || isNaN(Number(y)) ? y : Me(Number(y), S);
191
192
  b(([X, Z]) => [X, D.toString()]);
@@ -194,24 +195,24 @@ const en = ({
194
195
  ), g = A(
195
196
  () => d === "xs" ? "0.75rem" : void 0,
196
197
  [d]
197
- ), N = F(
198
+ ), I = R(
198
199
  (y, D) => {
199
200
  const X = Number(D.target.value);
200
201
  if (!s || !f || ![-1, 1].includes(X))
201
202
  return;
202
- const Z = (o) => X < 0 ? -1 * Math.abs(o) : Math.abs(o), E = y ? Z(Number(s)) : Number(s), a = y ? Number(f) : Z(Number(f));
203
- E > a ? u([a, E]) : u([E, a]);
203
+ const Z = (o) => X < 0 ? -1 * Math.abs(o) : Math.abs(o), E = y ? Z(Number(s)) : Number(s), r = y ? Number(f) : Z(Number(f));
204
+ E > r ? u([r, E]) : u([E, r]);
204
205
  },
205
206
  [s, f, u]
206
207
  );
207
208
  return /* @__PURE__ */ e.jsxs(fe, { direction: "column", ...p, children: [
208
209
  /* @__PURE__ */ e.jsx(V, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
209
- gt,
210
+ xt,
210
211
  {
211
212
  "aria-label": ["min", "max"],
212
213
  isReversed: n,
213
- value: [Number(s ?? t), Number(f ?? i)],
214
- max: i,
214
+ value: [Number(s ?? t), Number(f ?? a)],
215
+ max: a,
215
216
  min: t,
216
217
  minStepsBetweenThumbs: 3,
217
218
  step: 1,
@@ -225,21 +226,21 @@ const en = ({
225
226
  fontSize: d ?? "sm",
226
227
  fontWeight: "semibold",
227
228
  whiteSpace: "nowrap",
228
- children: r ? r?.(t) : t
229
+ children: l ? l?.(t) : t
229
230
  }
230
231
  ) }),
231
- /* @__PURE__ */ e.jsx(De, { value: i, top: "-1em", children: /* @__PURE__ */ e.jsx(
232
+ /* @__PURE__ */ e.jsx(De, { value: a, top: "-1em", children: /* @__PURE__ */ e.jsx(
232
233
  v,
233
234
  {
234
235
  fontSize: d ?? "sm",
235
236
  fontWeight: "semibold",
236
237
  style: { transform: "translateX(-100%)" },
237
238
  whiteSpace: "nowrap",
238
- children: r ? r(i) : i
239
+ children: l ? l(a) : a
239
240
  }
240
241
  ) }),
241
242
  C && /* @__PURE__ */ e.jsxs(De, { value: 0, top: "-1em", pos: "relative", children: [
242
- /* @__PURE__ */ e.jsx(v, { fontSize: d, fontWeight: "semibold", children: r?.(0) ?? "0" }),
243
+ /* @__PURE__ */ e.jsx(v, { fontSize: d, fontWeight: "semibold", children: l?.(0) ?? "0" }),
243
244
  /* @__PURE__ */ e.jsx(
244
245
  V,
245
246
  {
@@ -252,7 +253,7 @@ const en = ({
252
253
  }
253
254
  )
254
255
  ] }),
255
- /* @__PURE__ */ e.jsx(xt, { children: /* @__PURE__ */ e.jsx(ft, {}) }),
256
+ /* @__PURE__ */ e.jsx(ft, { children: /* @__PURE__ */ e.jsx(jt, {}) }),
256
257
  /* @__PURE__ */ e.jsx(We, { index: 0, w: g, h: g }),
257
258
  /* @__PURE__ */ e.jsx(We, { index: 1, w: g, h: g })
258
259
  ]
@@ -279,7 +280,7 @@ const en = ({
279
280
  fontSize: d ?? "sm",
280
281
  fontWeight: "semibold",
281
282
  whiteSpace: "nowrap",
282
- children: x(i)
283
+ children: x(a)
283
284
  }
284
285
  )
285
286
  ]
@@ -300,8 +301,8 @@ const en = ({
300
301
  size: d,
301
302
  fontWeight: "bold",
302
303
  value: j,
303
- onChange: (y) => N(!0, y),
304
- isDisabled: R || T,
304
+ onChange: (y) => I(!0, y),
305
+ isDisabled: F || T,
305
306
  children: [
306
307
  /* @__PURE__ */ e.jsx("option", { value: -1, children: h[0] }),
307
308
  /* @__PURE__ */ e.jsx("option", { value: 1, children: h[1] })
@@ -314,7 +315,7 @@ const en = ({
314
315
  precision: 0,
315
316
  size: d ?? "sm",
316
317
  min: 0,
317
- max: j < 0 ? Math.abs(t) : B ?? i,
318
+ max: j < 0 ? Math.abs(t) : B ?? a,
318
319
  value: s === "" ? "" : Math.abs(Number(s ?? t)),
319
320
  onChange: se,
320
321
  onBlur: M,
@@ -322,7 +323,7 @@ const en = ({
322
323
  borderRadius: 3,
323
324
  borderColor: "#ccc",
324
325
  isDisabled: T,
325
- ...l,
326
+ ...i,
326
327
  children: /* @__PURE__ */ e.jsx(
327
328
  Qe,
328
329
  {
@@ -338,16 +339,16 @@ const en = ({
338
339
  {
339
340
  size: d ?? "sm",
340
341
  min: 0,
341
- max: S < 0 ? Math.abs(I ?? t) : i,
342
+ max: S < 0 ? Math.abs(N ?? t) : a,
342
343
  precision: 0,
343
- value: f === "" ? "" : Math.abs(Number(f ?? i)),
344
+ value: f === "" ? "" : Math.abs(Number(f ?? a)),
344
345
  onChange: J,
345
346
  onBlur: M,
346
347
  borderWidth: 1,
347
348
  borderRadius: 3,
348
349
  borderColor: "#ccc",
349
350
  isDisabled: T,
350
- ...l,
351
+ ...i,
351
352
  children: /* @__PURE__ */ e.jsx(
352
353
  Qe,
353
354
  {
@@ -365,8 +366,8 @@ const en = ({
365
366
  size: d,
366
367
  fontWeight: "bold",
367
368
  value: S,
368
- onChange: (y) => N(!1, y),
369
- isDisabled: R || T,
369
+ onChange: (y) => I(!1, y),
370
+ isDisabled: F || T,
370
371
  children: [
371
372
  /* @__PURE__ */ e.jsx("option", { value: -1, children: h[0] }),
372
373
  /* @__PURE__ */ e.jsx("option", { value: 1, children: h[1] })
@@ -377,15 +378,15 @@ const en = ({
377
378
  }
378
379
  )
379
380
  ] });
380
- }, rn = ({ tags: n, containerProps: t, ...i }) => /* @__PURE__ */ e.jsx(re, { ...t, children: n.map((c, u) => /* @__PURE__ */ e.jsx(ve, { ...i, children: c }, u)) }), an = new kt({}), ln = ({
381
+ }, an = ({ tags: n, containerProps: t, ...a }) => /* @__PURE__ */ e.jsx(re, { ...t, children: n.map((c, u) => /* @__PURE__ */ e.jsx(ve, { ...a, children: c }, u)) }), ln = new kt({}), cn = ({
381
382
  action: n,
382
383
  quantumIconSrc: t
383
384
  }) => {
384
- const { getLabel: i } = pe(), c = A(() => ({
385
- actionLowerCase: i("action").toLocaleLowerCase()
386
- }), [i]);
385
+ const { getLabel: a } = pe(), c = A(() => ({
386
+ actionLowerCase: a("action").toLocaleLowerCase()
387
+ }), [a]);
387
388
  return n.quantumOwned ? /* @__PURE__ */ e.jsx(
388
- Pe,
389
+ _e,
389
390
  {
390
391
  label: `This ${c.actionLowerCase} is owned by Quantum`,
391
392
  "aria-label": "Quantum owned",
@@ -410,28 +411,28 @@ const en = ({
410
411
  )
411
412
  }
412
413
  ) : null;
413
- }, cn = (n, t) => {
414
+ }, dn = (n, t) => {
414
415
  if (!t || !t.trim().length)
415
416
  return n;
416
- const i = n.map((u) => u.name ?? "");
417
- return an.filter(i, t)?.map((u) => n[u]) ?? [];
418
- }, dn = (n) => !n || n.length === 0 ? "None" : n.map(
417
+ const a = n.map((u) => u.name ?? "");
418
+ return ln.filter(a, t)?.map((u) => n[u]) ?? [];
419
+ }, un = (n) => !n || n.length === 0 ? "None" : n.map(
419
420
  (t) => (
420
421
  // Convert camelCase to separate words (e.g., 'LeftFoot' -> 'Left Foot')
421
422
  t.replace(/([A-Z])/g, " $1").trim()
422
423
  )
423
- ).join(", "), un = (n, t) => !t || t.length == 0 ? n : n.filter(
424
- (i) => i.useCases?.some((c) => t.includes(c.id)) ?? !1
425
- ), hn = ({
424
+ ).join(", "), hn = (n, t) => !t || t.length == 0 ? n : n.filter(
425
+ (a) => a.useCases?.some((c) => t.includes(c.id)) ?? !1
426
+ ), mn = ({
426
427
  actions: n,
427
428
  totalActions: t,
428
- onCreate: i,
429
+ onCreate: a,
429
430
  onDelete: c,
430
431
  onEdit: u,
431
- onView: l,
432
+ onView: i,
432
433
  onSelected: d,
433
434
  onDuplicate: m,
434
- disableMultiSelect: r,
435
+ disableMultiSelect: l,
435
436
  disableDelete: x,
436
437
  disableEdit: h,
437
438
  disableCreate: T,
@@ -440,49 +441,49 @@ const en = ({
440
441
  containerProps: b,
441
442
  quantumIconSrc: s = "/favicon.ico"
442
443
  }) => {
443
- const [f, C] = z(""), [j, S] = z(), { getLabel: R } = pe(), I = A(() => ({
444
- action: R("action"),
445
- actionPlural: R("action_plural"),
446
- actionLowerCase: R("action").toLocaleLowerCase(),
447
- actionPluralLowerCase: R("action_plural").toLocaleLowerCase()
448
- }), [R]), B = A(() => {
444
+ const [f, C] = z(""), [j, S] = z(), { getLabel: F } = pe(), N = A(() => ({
445
+ action: F("action"),
446
+ actionPlural: F("action_plural"),
447
+ actionLowerCase: F("action").toLocaleLowerCase(),
448
+ actionPluralLowerCase: F("action_plural").toLocaleLowerCase()
449
+ }), [F]), B = A(() => {
449
450
  if (!n)
450
451
  return;
451
- const g = cn(n, f);
452
- return p ? g : un(g, j);
453
- }, [n, f, j, p]), k = F(() => {
452
+ const g = dn(n, f);
453
+ return p ? g : hn(g, j);
454
+ }, [n, f, j, p]), k = R(() => {
454
455
  if (!c)
455
456
  return;
456
- const N = n.filter(
457
+ const I = n.filter(
457
458
  (y) => y.selected && !y.quantumOwned
458
459
  ).map((y) => y.id);
459
- c(N);
460
- }, [n, c]), $ = F(() => {
460
+ c(I);
461
+ }, [n, c]), $ = R(() => {
461
462
  if (!m)
462
463
  return;
463
- const g = n.filter((N) => N.selected);
464
- m(g.map((N) => N.id)), d && g.forEach((N) => d(N, !1));
464
+ const g = n.filter((I) => I.selected);
465
+ m(g.map((I) => I.id)), d && g.forEach((I) => d(I, !1));
465
466
  }, [n, m, d]), M = A(() => n.some((g) => g.selected && !g.quantumOwned), [n]), se = A(() => n.some((g) => g.selected), [n]), J = A(() => n.some((g) => g.selected && g.quantumOwned), [n]);
466
467
  return /* @__PURE__ */ e.jsxs(V, { ...b, children: [
467
468
  /* @__PURE__ */ e.jsxs(fe, { alignContent: "space-between", gap: 4, children: [
468
- (i || c || m) && /* @__PURE__ */ e.jsxs(be, { mb: "1rem", gap: 4, children: [
469
- i && /* @__PURE__ */ e.jsxs(
469
+ (a || c || m) && /* @__PURE__ */ e.jsxs(be, { mb: "1rem", gap: 4, children: [
470
+ a && /* @__PURE__ */ e.jsxs(
470
471
  ee,
471
472
  {
472
- isDisabled: !i || T,
473
+ isDisabled: !a || T,
473
474
  colorScheme: "blackAlpha",
474
475
  backgroundColor: "gray.700",
475
- onClick: i,
476
+ onClick: a,
476
477
  children: [
477
478
  "Create New ",
478
- I.action
479
+ N.action
479
480
  ]
480
481
  }
481
482
  ),
482
- c && !r && /* @__PURE__ */ e.jsx(
483
- Pe,
483
+ c && !l && /* @__PURE__ */ e.jsx(
484
+ _e,
484
485
  {
485
- label: J ? M ? `Quantum-owned ${I.actionPluralLowerCase} are selected and will be skipped` : `Selected ${I.actionPluralLowerCase} are quantum-owned and cannot be deleted` : void 0,
486
+ label: J ? M ? `Quantum-owned ${N.actionPluralLowerCase} are selected and will be skipped` : `Selected ${N.actionPluralLowerCase} are quantum-owned and cannot be deleted` : void 0,
486
487
  shouldWrapChildren: !0,
487
488
  children: /* @__PURE__ */ e.jsx(
488
489
  ee,
@@ -495,7 +496,7 @@ const en = ({
495
496
  )
496
497
  }
497
498
  ),
498
- m && !r && /* @__PURE__ */ e.jsx(
499
+ m && !l && /* @__PURE__ */ e.jsx(
499
500
  ee,
500
501
  {
501
502
  colorScheme: "gray",
@@ -506,7 +507,7 @@ const en = ({
506
507
  )
507
508
  ] }),
508
509
  /* @__PURE__ */ e.jsx(
509
- en,
510
+ tn,
510
511
  {
511
512
  setSearch: C,
512
513
  actions: n,
@@ -533,31 +534,27 @@ const en = ({
533
534
  /* @__PURE__ */ e.jsx(et, { children: B?.map((g) => /* @__PURE__ */ e.jsxs(
534
535
  Oe,
535
536
  {
536
- title: r && g.selected ? `This ${I.actionLowerCase} is selected. Click it again to deselect.` : void 0,
537
- bg: r && g.selected ? "gray.200" : void 0,
538
- _hover: {
539
- bg: r && !g.selected ? "#f7f7f7" : void 0
537
+ className: ot(
538
+ "hover:bg-[#f7f7f7]",
539
+ !l && "cursor-pointer",
540
+ g.selected && "bg-gray-200"
541
+ ),
542
+ onClick: () => {
543
+ l || d?.(g, !g.selected);
540
544
  },
541
- cursor: r ? "pointer" : "default",
542
- onClick: () => r ? d?.(g, !g.selected) : void 0,
543
545
  children: [
544
546
  /* @__PURE__ */ e.jsx(je, { children: /* @__PURE__ */ e.jsxs(fe, { children: [
545
- d && !r && /* @__PURE__ */ e.jsx(
546
- jt,
547
- {
548
- isChecked: g.selected,
549
- "aria-label": `Select ${I.actionLowerCase}`,
550
- onChange: (N) => d(g, N.target.checked)
551
- }
552
- ),
553
- (g.quantumOwned || !u) && l && /* @__PURE__ */ e.jsx(
547
+ !l && /* @__PURE__ */ e.jsx(e.Fragment, { children: g.selected ? /* @__PURE__ */ e.jsx(Ft, { className: "text-blue-500" }) : /* @__PURE__ */ e.jsx(Rt, { className: "text-gray-400" }) }),
548
+ (g.quantumOwned || !u) && i && /* @__PURE__ */ e.jsx(
554
549
  ee,
555
550
  {
556
551
  ml: "1em",
557
552
  size: "sm",
558
553
  variant: "link",
559
554
  colorScheme: "blue",
560
- onClick: () => l(g.id),
555
+ onClick: (I) => {
556
+ I.stopPropagation(), i(g.id);
557
+ },
561
558
  children: "View"
562
559
  }
563
560
  ),
@@ -569,14 +566,16 @@ const en = ({
569
566
  size: "sm",
570
567
  variant: "link",
571
568
  colorScheme: "blue",
572
- onClick: () => u(g.id),
569
+ onClick: (I) => {
570
+ I.stopPropagation(), u(g.id);
571
+ },
573
572
  children: "Edit"
574
573
  }
575
574
  )
576
575
  ] }) }),
577
576
  /* @__PURE__ */ e.jsx(je, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(fe, { align: "center", gap: 2, children: [
578
577
  /* @__PURE__ */ e.jsx(
579
- ln,
578
+ cn,
580
579
  {
581
580
  action: g,
582
581
  quantumIconSrc: s
@@ -584,12 +583,12 @@ const en = ({
584
583
  ),
585
584
  g.name
586
585
  ] }) }),
587
- /* @__PURE__ */ e.jsx(je, { maxW: "20rem", whiteSpace: "break-spaces", children: dn(g.sensorLocations) }),
586
+ /* @__PURE__ */ e.jsx(je, { maxW: "20rem", whiteSpace: "break-spaces", children: un(g.sensorLocations) }),
588
587
  !p && /* @__PURE__ */ e.jsx(je, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
589
- rn,
588
+ an,
590
589
  {
591
590
  containerProps: { flexWrap: "wrap" },
592
- tags: g.useCases?.map((N) => N.name) ?? []
591
+ tags: g.useCases?.map((I) => I.name) ?? []
593
592
  }
594
593
  ) })
595
594
  ]
@@ -598,120 +597,120 @@ const en = ({
598
597
  )) })
599
598
  ] }) })
600
599
  ] });
601
- }, Gn = ({
600
+ }, Un = ({
602
601
  onSave: n,
603
602
  onCancel: t,
604
- onError: i,
603
+ onError: a,
605
604
  hideButtons: c = !1,
606
605
  setButtonDisabled: u,
607
- setButtonOnClick: l,
606
+ setButtonOnClick: i,
608
607
  quantumOwned: d
609
608
  }) => {
610
- const m = tt(), { getLabel: r } = pe(), x = A(() => ({
611
- singular: r("action"),
612
- plural: r("action_plural"),
613
- pluralLowerCase: r("action_plural").toLowerCase(),
614
- singularLowerCase: r("action").toLowerCase()
615
- }), [r]), [h, T] = z("copy"), [p, L] = z(""), [b, s] = z([]), [f, C] = z(!1), [j] = he({
616
- query: ot
609
+ const m = tt(), { getLabel: l } = pe(), x = A(() => ({
610
+ singular: l("action"),
611
+ plural: l("action_plural"),
612
+ pluralLowerCase: l("action_plural").toLowerCase(),
613
+ singularLowerCase: l("action").toLowerCase()
614
+ }), [l]), [h, T] = z("copy"), [p, L] = z(""), [b, s] = z([]), [f, C] = z(!1), [j] = he({
615
+ query: rt
617
616
  }), [S] = he({
618
- query: Ft,
617
+ query: Et,
619
618
  variables: { groupId: p },
620
619
  pause: !p
621
620
  // Only run when group is selected
622
- }), [, R] = le(ze), [, I] = le(
623
- rt
621
+ }), [, F] = ie(ze), [, N] = ie(
622
+ at
624
623
  ), B = A(() => j.data?.groups ? j.data.groups.map(
625
- (a) => P(at, a)
624
+ (r) => _(lt, r)
626
625
  ) : [], [j.data]), k = A(() => S.data ? S.data.actions.map(
627
- (o) => P(me, o)
626
+ (o) => _(me, o)
628
627
  ) : [], [S.data]), $ = A(() => k.filter(
629
- (a) => b.includes(a.id)
630
- ), [k, b]), M = F(
631
- (a) => {
632
- const o = a?.value || "";
628
+ (r) => b.includes(r.id)
629
+ ), [k, b]), M = R(
630
+ (r) => {
631
+ const o = r?.value || "";
633
632
  L(o), s([]);
634
633
  },
635
634
  []
636
- ), se = F(
637
- (a) => {
638
- const o = a.map((w) => w.value);
635
+ ), se = R(
636
+ (r) => {
637
+ const o = r.map((w) => w.value);
639
638
  s(o);
640
639
  },
641
640
  []
642
- ), J = F(
643
- async (a) => {
644
- const o = P(
641
+ ), J = R(
642
+ async (r) => {
643
+ const o = _(
645
644
  we,
646
- a.categories
647
- ), _ = P(
645
+ r.categories
646
+ ), P = _(
648
647
  Ee,
649
- a.metadataGroups
648
+ r.metadataGroups
650
649
  ).flatMap(
651
- (U) => U.data.map((te) => P(_e, te).id)
650
+ (U) => U.data.map((te) => _(Pe, te).id)
652
651
  ), W = {
653
- ...a,
654
- name: `${a.name} (Copy)`,
652
+ ...r,
653
+ name: `${r.name} (Copy)`,
655
654
  // Add "(Copy)" suffix to distinguish
656
- description: a.description || void 0,
657
- instructionsPointOfInterest: a.instructionsPointOfInterest || void 0,
658
- instructionsMovementReport: a.instructionsMovementReport || void 0,
659
- laterality: a.laterality,
660
- activityKind: a.activityKind,
661
- sensorLocations: a.sensorLocations,
662
- thresholds: a.thresholds.map((U) => ({
655
+ description: r.description || void 0,
656
+ instructionsPointOfInterest: r.instructionsPointOfInterest || void 0,
657
+ instructionsMovementReport: r.instructionsMovementReport || void 0,
658
+ laterality: r.laterality,
659
+ activityKind: r.activityKind,
660
+ sensorLocations: r.sensorLocations,
661
+ thresholds: r.thresholds.map((U) => ({
663
662
  ...U,
664
663
  id: void 0
665
664
  })),
666
665
  categories: o?.map((U) => U.id),
667
666
  quantumOwned: d,
668
- metadataItemIds: _,
667
+ metadataItemIds: P,
669
668
  id: void 0
670
- }, Q = await R({ fields: W });
669
+ }, Q = await F({ fields: W });
671
670
  if (Q.error)
672
671
  throw new Error(Q.error.message);
673
672
  if (Q.data?.createAction)
674
- return P(me, Q.data.createAction);
673
+ return _(me, Q.data.createAction);
675
674
  throw new Error("No action data returned");
676
675
  },
677
- [R, d]
678
- ), g = F(
679
- async (a) => {
680
- const o = await I({ id: a.id });
676
+ [F, d]
677
+ ), g = R(
678
+ async (r) => {
679
+ const o = await N({ id: r.id });
681
680
  if (o.error)
682
681
  throw new Error(o.error.message);
683
682
  if (o.data?.convertActionToQuantumOwned)
684
- return P(
683
+ return _(
685
684
  me,
686
685
  o.data.convertActionToQuantumOwned
687
686
  );
688
687
  throw new Error("No action data returned");
689
688
  },
690
- [I]
691
- ), N = F(async () => {
689
+ [N]
690
+ ), I = R(async () => {
692
691
  if (C(!0), !$.length) {
693
- const a = new Error(
692
+ const r = new Error(
694
693
  `No ${x.pluralLowerCase} selected for ${h === "copy" ? "copying" : "converting"}`
695
694
  );
696
- i?.(a), C(!1);
695
+ a?.(r), C(!1);
697
696
  return;
698
697
  }
699
698
  try {
700
- const a = [];
699
+ const r = [];
701
700
  let o = 0;
702
- const w = h === "copy" ? J : g, _ = h === "copy" ? "copy" : "convert";
701
+ const w = h === "copy" ? J : g, P = h === "copy" ? "copy" : "convert";
703
702
  for (const W of $)
704
703
  try {
705
704
  const Q = await w(W);
706
- a.push(Q);
705
+ r.push(Q);
707
706
  } catch (Q) {
708
707
  console.error(
709
- `Failed to ${_} ${x.singularLowerCase} "${W.name}":`,
708
+ `Failed to ${P} ${x.singularLowerCase} "${W.name}":`,
710
709
  Q
711
710
  ), o++;
712
711
  }
713
- if (a.length > 0) {
714
- const W = a.length, Q = $.length, U = h === "copy" ? "copied" : "converted", te = h === "copy" ? "copy" : "convert";
712
+ if (r.length > 0) {
713
+ const W = r.length, Q = $.length, U = h === "copy" ? "copied" : "converted", te = h === "copy" ? "copy" : "convert";
715
714
  m({
716
715
  title: o > 0 ? `Partial ${te} completed` : `${x.plural} ${U} successfully`,
717
716
  description: o > 0 ? `${W} of ${Q} ${x.pluralLowerCase} ${U} successfully` : `${W} ${W > 1 ? x.pluralLowerCase : x.singularLowerCase} ${U} successfully`,
@@ -721,17 +720,17 @@ const en = ({
721
720
  }), n?.(), L(""), s([]);
722
721
  } else
723
722
  throw new Error(
724
- `Failed to ${_} any ${x.pluralLowerCase}`
723
+ `Failed to ${P} any ${x.pluralLowerCase}`
725
724
  );
726
- } catch (a) {
727
- const o = h === "copy" ? "copy" : "convert", w = a instanceof Error ? a.message : `Failed to ${o} ${x.pluralLowerCase}`;
725
+ } catch (r) {
726
+ const o = h === "copy" ? "copy" : "convert", w = r instanceof Error ? r.message : `Failed to ${o} ${x.pluralLowerCase}`;
728
727
  m({
729
728
  title: `${h === "copy" ? "Copy" : "Convert"} failed`,
730
729
  description: w,
731
730
  status: "error",
732
731
  duration: 5e3,
733
732
  isClosable: !0
734
- }), i?.(a instanceof Error ? a : new Error(w));
733
+ }), a?.(r instanceof Error ? r : new Error(w));
735
734
  } finally {
736
735
  C(!1);
737
736
  }
@@ -742,8 +741,8 @@ const en = ({
742
741
  g,
743
742
  m,
744
743
  n,
745
- i
746
- ]), y = F(() => {
744
+ a
745
+ ]), y = R(() => {
747
746
  L(""), s([]), T("copy"), t?.();
748
747
  }, [t]);
749
748
  ae(() => {
@@ -752,19 +751,19 @@ const en = ({
752
751
  saveButton: $.length === 0 || f
753
752
  });
754
753
  }, [$.length, f, u]), ae(() => {
755
- l && l({
754
+ i && i({
756
755
  cancelButton: y,
757
- saveButton: N
756
+ saveButton: I
758
757
  });
759
- }, [l, y, N]);
760
- const D = A(() => B.map((a) => ({
761
- value: a.id,
762
- label: a.name
763
- })), [B]), X = A(() => k.filter((a) => h === "copy" ? !0 : !a.quantumOwned).map((a) => ({
764
- value: a.id,
765
- label: a.name,
758
+ }, [i, y, I]);
759
+ const D = A(() => B.map((r) => ({
760
+ value: r.id,
761
+ label: r.name
762
+ })), [B]), X = A(() => k.filter((r) => h === "copy" ? !0 : !r.quantumOwned).map((r) => ({
763
+ value: r.id,
764
+ label: r.name,
766
765
  // Add custom data to identify quantum-owned actions for UI display
767
- isQuantumOwned: a.quantumOwned
766
+ isQuantumOwned: r.quantumOwned
768
767
  })), [k, h]), Z = j.fetching, E = S.fetching;
769
768
  return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsxs(oe, { spacing: 6, align: "stretch", children: [
770
769
  d && /* @__PURE__ */ e.jsxs(K, { children: [
@@ -773,8 +772,8 @@ const en = ({
773
772
  nt,
774
773
  {
775
774
  value: h,
776
- onChange: (a) => {
777
- T(a), s([]);
775
+ onChange: (r) => {
776
+ T(r), s([]);
778
777
  },
779
778
  children: /* @__PURE__ */ e.jsxs(re, { spacing: 6, children: [
780
779
  /* @__PURE__ */ e.jsx(Ne, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(oe, { align: "start", spacing: 1, children: [
@@ -812,7 +811,7 @@ const en = ({
812
811
  {
813
812
  placeholder: "Choose a group...",
814
813
  options: D,
815
- value: D.find((a) => a.value === p) || null,
814
+ value: D.find((r) => r.value === p) || null,
816
815
  onChange: M,
817
816
  isLoading: Z,
818
817
  isDisabled: Z,
@@ -849,19 +848,19 @@ const en = ({
849
848
  placeholder: `Choose ${x.pluralLowerCase} to ${h}...`,
850
849
  options: X,
851
850
  value: X.filter(
852
- (a) => b.includes(a.value)
851
+ (r) => b.includes(r.value)
853
852
  ),
854
853
  onChange: se,
855
854
  isDisabled: X.length === 0,
856
855
  isClearable: !0,
857
856
  isMulti: !0,
858
857
  closeMenuOnSelect: !1,
859
- formatOptionLabel: (a, { context: o }) => /* @__PURE__ */ e.jsxs(re, { justify: "space-between", w: "100%", children: [
858
+ formatOptionLabel: (r, { context: o }) => /* @__PURE__ */ e.jsxs(re, { justify: "space-between", w: "100%", children: [
860
859
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
861
- /* @__PURE__ */ e.jsx(v, { children: a.label }),
862
- o === "value" && a.isQuantumOwned && /* @__PURE__ */ e.jsx(v, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
860
+ /* @__PURE__ */ e.jsx(v, { children: r.label }),
861
+ o === "value" && r.isQuantumOwned && /* @__PURE__ */ e.jsx(v, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
863
862
  ] }),
864
- a.isQuantumOwned && o === "menu" && /* @__PURE__ */ e.jsx(ve, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
863
+ r.isQuantumOwned && o === "menu" && /* @__PURE__ */ e.jsx(ve, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
865
864
  ] })
866
865
  }
867
866
  ),
@@ -885,7 +884,7 @@ const en = ({
885
884
  $.length > 0 && /* @__PURE__ */ e.jsxs(V, { p: 4, bg: "gray.50", borderRadius: "md", children: [
886
885
  /* @__PURE__ */ e.jsx(v, { fontWeight: "semibold", mb: 3, children: $.length === 1 ? `${x.singular} to ${h === "copy" ? "Copy" : "Convert"}:` : `${$.length} ${x.plural} to ${h === "copy" ? "Copy" : "Convert"}:` }),
887
886
  /* @__PURE__ */ e.jsxs(oe, { align: "start", spacing: 3, children: [
888
- $.map((a, o) => /* @__PURE__ */ e.jsxs(
887
+ $.map((r, o) => /* @__PURE__ */ e.jsxs(
889
888
  V,
890
889
  {
891
890
  w: "100%",
@@ -899,9 +898,9 @@ const en = ({
899
898
  /* @__PURE__ */ e.jsxs(v, { fontWeight: "medium", fontSize: "sm", children: [
900
899
  o + 1,
901
900
  ". ",
902
- a.name
901
+ r.name
903
902
  ] }),
904
- a.quantumOwned && /* @__PURE__ */ e.jsx(ve, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
903
+ r.quantumOwned && /* @__PURE__ */ e.jsx(ve, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
905
904
  ] }),
906
905
  /* @__PURE__ */ e.jsxs(
907
906
  oe,
@@ -911,42 +910,42 @@ const en = ({
911
910
  fontSize: "sm",
912
911
  color: "gray.600",
913
912
  children: [
914
- a.description && /* @__PURE__ */ e.jsxs(v, { children: [
913
+ r.description && /* @__PURE__ */ e.jsxs(v, { children: [
915
914
  /* @__PURE__ */ e.jsx("strong", { children: "Description:" }),
916
915
  " ",
917
- a.description
916
+ r.description
918
917
  ] }),
919
918
  /* @__PURE__ */ e.jsxs(v, { children: [
920
919
  /* @__PURE__ */ e.jsx("strong", { children: "Type:" }),
921
920
  " ",
922
- a.activityKind
921
+ r.activityKind
923
922
  ] }),
924
923
  /* @__PURE__ */ e.jsxs(v, { children: [
925
924
  /* @__PURE__ */ e.jsx("strong", { children: "Laterality:" }),
926
925
  " ",
927
- a.laterality
926
+ r.laterality
928
927
  ] }),
929
928
  /* @__PURE__ */ e.jsxs(v, { children: [
930
929
  /* @__PURE__ */ e.jsx("strong", { children: "Sensor Locations:" }),
931
930
  " ",
932
- a.sensorLocations.length
931
+ r.sensorLocations.length
933
932
  ] }),
934
933
  /* @__PURE__ */ e.jsxs(v, { children: [
935
934
  /* @__PURE__ */ e.jsx("strong", { children: "Thresholds:" }),
936
935
  " ",
937
- a.thresholds.length
936
+ r.thresholds.length
938
937
  ] }),
939
938
  /* @__PURE__ */ e.jsxs(v, { children: [
940
939
  /* @__PURE__ */ e.jsx("strong", { children: "Use Cases:" }),
941
940
  " ",
942
- a.useCases.map((w) => w.name).join(", ") || "None"
941
+ r.useCases.map((w) => w.name).join(", ") || "None"
943
942
  ] })
944
943
  ]
945
944
  }
946
945
  )
947
946
  ]
948
947
  },
949
- a.id
948
+ r.id
950
949
  )),
951
950
  $.length > 1 && /* @__PURE__ */ e.jsx(
952
951
  V,
@@ -984,7 +983,7 @@ const en = ({
984
983
  ee,
985
984
  {
986
985
  colorScheme: h === "copy" ? "blue" : "green",
987
- onClick: N,
986
+ onClick: I,
988
987
  isDisabled: $.length === 0 || f,
989
988
  isLoading: f,
990
989
  loadingText: `${h === "copy" ? "Copying" : "Converting"}...`,
@@ -997,79 +996,79 @@ const en = ({
997
996
  )
998
997
  ] })
999
998
  ] }) });
1000
- }, Wn = ({
999
+ }, Bn = ({
1001
1000
  onSave: n,
1002
1001
  onCancel: t,
1003
- onError: i,
1002
+ onError: a,
1004
1003
  hideButtons: c = !1,
1005
1004
  setButtonDisabled: u,
1006
- setButtonOnClick: l,
1005
+ setButtonOnClick: i,
1007
1006
  quantumOwned: d
1008
1007
  }) => {
1009
- const m = tt(), { getLabel: r } = pe(), [x, h] = z(""), [T, p] = z([]), [L, b] = z(!1), [s, f] = z("copy"), [C] = he({
1010
- query: ot
1008
+ const m = tt(), { getLabel: l } = pe(), [x, h] = z(""), [T, p] = z([]), [L, b] = z(!1), [s, f] = z("copy"), [C] = he({
1009
+ query: rt
1011
1010
  }), [j] = he({
1012
- query: Dt,
1011
+ query: Pt,
1013
1012
  variables: { groupId: x },
1014
1013
  pause: !x
1015
1014
  // Only run when group is selected
1016
- }), [, S] = le(it), [, R] = le(lt), [, I] = le(ze), [, B] = le(
1017
- rt
1015
+ }), [, S] = ie(it), [, F] = ie(ct), [, N] = ie(ze), [, B] = ie(
1016
+ at
1018
1017
  ), k = A(() => C.data?.groups ? C.data.groups.map(
1019
- (o) => P(at, o)
1020
- ) : [], [C.data]), $ = A(() => j.data?.modules ? P(
1018
+ (o) => _(lt, o)
1019
+ ) : [], [C.data]), $ = A(() => j.data?.modules ? _(
1021
1020
  Te,
1022
1021
  j.data?.modules
1023
1022
  ).map((w) => {
1024
- const _ = P(
1025
- ct,
1023
+ const P = _(
1024
+ dt,
1026
1025
  w.moduleActions
1027
1026
  );
1028
1027
  return {
1029
1028
  ...w,
1030
- moduleActions: _.map((W) => ({
1029
+ moduleActions: P.map((W) => ({
1031
1030
  ...W,
1032
- action: P(me, W.action)
1031
+ action: _(me, W.action)
1033
1032
  })),
1034
- categories: P(
1033
+ categories: _(
1035
1034
  we,
1036
1035
  w.categories
1037
1036
  )
1038
1037
  };
1039
1038
  }) : [], [j.data]), M = A(() => $.filter(
1040
1039
  (o) => T.includes(o.id)
1041
- ), [$, T]), se = F(
1040
+ ), [$, T]), se = R(
1042
1041
  (o) => {
1043
1042
  const w = o?.value || "";
1044
1043
  h(w), p([]);
1045
1044
  },
1046
1045
  []
1047
- ), J = F(
1046
+ ), J = R(
1048
1047
  (o) => {
1049
- const w = o.map((_) => _.value);
1048
+ const w = o.map((P) => P.value);
1050
1049
  p(w);
1051
1050
  },
1052
1051
  []
1053
- ), g = F(async () => {
1052
+ ), g = R(async () => {
1054
1053
  if (b(!0), !M.length) {
1055
1054
  b(!1);
1056
1055
  const o = new Error(
1057
1056
  `No modules selected for ${s === "convert" ? "converting" : "copying"}`
1058
1057
  );
1059
- i?.(o);
1058
+ a?.(o);
1060
1059
  return;
1061
1060
  }
1062
1061
  try {
1063
1062
  const o = [];
1064
1063
  let w = 0;
1065
- for (const _ of M)
1064
+ for (const P of M)
1066
1065
  try {
1067
- let W = _.moduleActions.map((Q) => Q.actionId);
1066
+ let W = P.moduleActions.map((Q) => Q.actionId);
1068
1067
  if (d) {
1069
- const Q = _.moduleActions.map((Y) => Y.action), U = async (Y) => {
1068
+ const Q = P.moduleActions.map((Y) => Y.action), U = async (Y) => {
1070
1069
  if (s === "copy") {
1071
1070
  if (Y.quantumOwned) return Y;
1072
- const O = P(
1071
+ const O = _(
1073
1072
  we,
1074
1073
  Y.categories
1075
1074
  ), H = {
@@ -1081,8 +1080,8 @@ const en = ({
1081
1080
  })),
1082
1081
  categories: O?.map((ne) => ne.id),
1083
1082
  id: void 0
1084
- }, q = await I({ fields: H });
1085
- return q.error || !q.data?.createAction ? null : P(
1083
+ }, q = await N({ fields: H });
1084
+ return q.error || !q.data?.createAction ? null : _(
1086
1085
  me,
1087
1086
  q.data.createAction
1088
1087
  );
@@ -1091,7 +1090,7 @@ const en = ({
1091
1090
  const Ce = await B({
1092
1091
  id: Y.id
1093
1092
  });
1094
- return Ce.error || !Ce.data?.convertActionToQuantumOwned ? null : P(
1093
+ return Ce.error || !Ce.data?.convertActionToQuantumOwned ? null : _(
1095
1094
  me,
1096
1095
  Ce.data.convertActionToQuantumOwned
1097
1096
  );
@@ -1102,18 +1101,18 @@ const en = ({
1102
1101
  }
1103
1102
  if (s === "convert") {
1104
1103
  const Q = {
1105
- name: _.name,
1106
- description: _.description || void 0,
1104
+ name: P.name,
1105
+ description: P.description || void 0,
1107
1106
  actions: W,
1108
- categories: _.categories.map((te) => te.id),
1107
+ categories: P.categories.map((te) => te.id),
1109
1108
  quantumOwned: !0
1110
- }, U = await R({
1111
- id: _.id,
1109
+ }, U = await F({
1110
+ id: P.id,
1112
1111
  input: Q
1113
1112
  });
1114
1113
  if (U.error) throw new Error(U.error.message);
1115
1114
  if (U.data?.updateModule) {
1116
- const te = P(
1115
+ const te = _(
1117
1116
  Te,
1118
1117
  U.data.updateModule
1119
1118
  );
@@ -1121,15 +1120,15 @@ const en = ({
1121
1120
  }
1122
1121
  } else {
1123
1122
  const Q = {
1124
- name: `${_.name} (Copy)`,
1125
- description: _.description || void 0,
1123
+ name: `${P.name} (Copy)`,
1124
+ description: P.description || void 0,
1126
1125
  actions: W,
1127
- categories: _.categories.map((te) => te.id),
1126
+ categories: P.categories.map((te) => te.id),
1128
1127
  quantumOwned: d
1129
1128
  }, U = await S({ input: Q });
1130
1129
  if (U.error) throw new Error(U.error.message);
1131
1130
  if (U.data?.createModule) {
1132
- const te = P(
1131
+ const te = _(
1133
1132
  Te,
1134
1133
  U.data.createModule
1135
1134
  );
@@ -1138,15 +1137,15 @@ const en = ({
1138
1137
  }
1139
1138
  } catch (W) {
1140
1139
  console.error(
1141
- `Failed to ${s === "convert" ? "convert" : "copy"} module "${_.name}":`,
1140
+ `Failed to ${s === "convert" ? "convert" : "copy"} module "${P.name}":`,
1142
1141
  W
1143
1142
  ), w++;
1144
1143
  }
1145
1144
  if (o.length > 0) {
1146
- const _ = o.length, W = M.length;
1145
+ const P = o.length, W = M.length;
1147
1146
  m({
1148
1147
  title: w > 0 ? `Partial ${s === "convert" ? "convert" : "copy"} completed` : `Modules ${s === "convert" ? "converted" : "copied"} successfully`,
1149
- description: w > 0 ? `${_} of ${W} modules ${s === "convert" ? "converted" : "copied"} successfully` : `${_} module${_ > 1 ? "s" : ""} ${s === "convert" ? "converted" : "copied"} successfully`,
1148
+ description: w > 0 ? `${P} of ${W} modules ${s === "convert" ? "converted" : "copied"} successfully` : `${P} module${P > 1 ? "s" : ""} ${s === "convert" ? "converted" : "copied"} successfully`,
1150
1149
  status: w > 0 ? "warning" : "success",
1151
1150
  duration: 3e3,
1152
1151
  isClosable: !0
@@ -1163,22 +1162,22 @@ const en = ({
1163
1162
  status: "error",
1164
1163
  duration: 5e3,
1165
1164
  isClosable: !0
1166
- }), i?.(o instanceof Error ? o : new Error(w));
1165
+ }), a?.(o instanceof Error ? o : new Error(w));
1167
1166
  } finally {
1168
1167
  b(!1);
1169
1168
  }
1170
1169
  }, [
1171
1170
  M,
1172
1171
  S,
1173
- R,
1172
+ F,
1174
1173
  m,
1175
1174
  n,
1176
- i,
1175
+ a,
1177
1176
  d,
1178
- I,
1177
+ N,
1179
1178
  B,
1180
1179
  s
1181
- ]), N = F(() => {
1180
+ ]), I = R(() => {
1182
1181
  h(""), p([]), f("copy"), t?.();
1183
1182
  }, [t]);
1184
1183
  ae(() => {
@@ -1187,11 +1186,11 @@ const en = ({
1187
1186
  saveButton: M.length === 0 || L
1188
1187
  });
1189
1188
  }, [M.length, L, u]), ae(() => {
1190
- l && l({
1191
- cancelButton: N,
1189
+ i && i({
1190
+ cancelButton: I,
1192
1191
  saveButton: g
1193
1192
  });
1194
- }, [l, N, g]);
1193
+ }, [i, I, g]);
1195
1194
  const y = A(() => k.map((o) => ({
1196
1195
  value: o.id,
1197
1196
  label: o.name
@@ -1201,16 +1200,16 @@ const en = ({
1201
1200
  // Add custom data to identify quantum-owned modules
1202
1201
  isQuantumOwned: o.quantumOwned
1203
1202
  })), [$, s]), X = C.fetching, Z = j.fetching, E = A(() => ({
1204
- singular: r("module"),
1205
- plural: r("module_plural"),
1206
- pluralLowerCase: r("module_plural").toLowerCase(),
1207
- singularLowerCase: r("module").toLowerCase()
1208
- }), [r]), a = A(() => ({
1209
- singular: r("action"),
1210
- plural: r("action_plural"),
1211
- pluralLowerCase: r("action_plural").toLowerCase(),
1212
- singularLowerCase: r("action").toLowerCase()
1213
- }), [r]);
1203
+ singular: l("module"),
1204
+ plural: l("module_plural"),
1205
+ pluralLowerCase: l("module_plural").toLowerCase(),
1206
+ singularLowerCase: l("module").toLowerCase()
1207
+ }), [l]), r = A(() => ({
1208
+ singular: l("action"),
1209
+ plural: l("action_plural"),
1210
+ pluralLowerCase: l("action_plural").toLowerCase(),
1211
+ singularLowerCase: l("action").toLowerCase()
1212
+ }), [l]);
1214
1213
  return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsxs(oe, { spacing: 6, align: "stretch", children: [
1215
1214
  d && /* @__PURE__ */ e.jsxs(K, { children: [
1216
1215
  /* @__PURE__ */ e.jsx(ce, { children: "Operation Mode" }),
@@ -1358,7 +1357,7 @@ const en = ({
1358
1357
  /* @__PURE__ */ e.jsxs(v, { children: [
1359
1358
  /* @__PURE__ */ e.jsx("strong", { children: "Categories:" }),
1360
1359
  " ",
1361
- o.categories.map((_) => _.name).join(", ") || "None"
1360
+ o.categories.map((P) => P.name).join(", ") || "None"
1362
1361
  ] })
1363
1362
  ]
1364
1363
  }
@@ -1395,7 +1394,7 @@ const en = ({
1395
1394
  borderRadius: "md",
1396
1395
  border: "1px solid",
1397
1396
  borderColor: "yellow.200",
1398
- children: /* @__PURE__ */ e.jsx(v, { fontSize: "sm", fontWeight: "medium", color: "yellow.800", children: s === "convert" ? `Converting ${E.plural} will convert non QM-Owned ${a.plural} to QM-Owned ${a.plural}` : `Copying ${E.plural} with Non QM-Owned ${a.plural} will create corresponding QM-Owned ${a.plural}` })
1397
+ children: /* @__PURE__ */ e.jsx(v, { fontSize: "sm", fontWeight: "medium", color: "yellow.800", children: s === "convert" ? `Converting ${E.plural} will convert non QM-Owned ${r.plural} to QM-Owned ${r.plural}` : `Copying ${E.plural} with Non QM-Owned ${r.plural} will create corresponding QM-Owned ${r.plural}` })
1399
1398
  }
1400
1399
  )
1401
1400
  ] })
@@ -1405,7 +1404,7 @@ const en = ({
1405
1404
  ee,
1406
1405
  {
1407
1406
  variant: "outline",
1408
- onClick: N,
1407
+ onClick: I,
1409
1408
  isDisabled: L,
1410
1409
  children: "Cancel"
1411
1410
  }
@@ -1427,36 +1426,36 @@ const en = ({
1427
1426
  )
1428
1427
  ] })
1429
1428
  ] }) });
1430
- }, mn = ({
1429
+ }, pn = ({
1431
1430
  name: n,
1432
1431
  setName: t,
1433
- actions: i,
1432
+ actions: a,
1434
1433
  selectedActionIds: c,
1435
1434
  setSelectedActionIds: u,
1436
- availableCategories: l,
1435
+ availableCategories: i,
1437
1436
  selectedCategoryIds: d,
1438
1437
  setSelectedCategoryIds: m,
1439
- description: r,
1438
+ description: l,
1440
1439
  setDescription: x,
1441
1440
  ...h
1442
1441
  }) => {
1443
- const T = Ct(), p = A(() => i.map((j) => ({
1442
+ const T = Ct(), p = A(() => a.map((j) => ({
1444
1443
  ...j,
1445
1444
  selected: c.includes(j.id)
1446
- })), [i, c]), L = A(() => i.reduce((j, S) => (j[S.id] = S, j), {}), [i]), b = A(
1445
+ })), [a, c]), L = A(() => a.reduce((j, S) => (j[S.id] = S, j), {}), [a]), b = A(
1447
1446
  () => c.map((j) => L[j]),
1448
1447
  [c, L]
1449
- ), s = F(
1448
+ ), s = R(
1450
1449
  (j, S) => {
1451
- u(S ? [...c, j.id] : c.filter((R) => R !== j.id));
1450
+ u(S ? [...c, j.id] : c.filter((F) => F !== j.id));
1452
1451
  },
1453
1452
  [c, u]
1454
- ), f = F(
1453
+ ), f = R(
1455
1454
  (j) => {
1456
1455
  t(j.target.value);
1457
1456
  },
1458
1457
  [t]
1459
- ), C = F(
1458
+ ), C = R(
1460
1459
  (j) => {
1461
1460
  x?.(j.target.value);
1462
1461
  },
@@ -1464,25 +1463,25 @@ const en = ({
1464
1463
  );
1465
1464
  return /* @__PURE__ */ e.jsxs(V, { ...h, children: [
1466
1465
  /* @__PURE__ */ e.jsxs(re, { gap: "2rem", children: [
1467
- /* @__PURE__ */ e.jsx(pn, { name: n ?? "", onInputChange: f }),
1466
+ /* @__PURE__ */ e.jsx(gn, { name: n ?? "", onInputChange: f }),
1468
1467
  /* @__PURE__ */ e.jsx(
1469
- gn,
1468
+ xn,
1470
1469
  {
1471
- availableCategories: l,
1470
+ availableCategories: i,
1472
1471
  value: d,
1473
1472
  onChange: m
1474
1473
  }
1475
1474
  )
1476
1475
  ] }),
1477
1476
  /* @__PURE__ */ e.jsx(
1478
- xn,
1477
+ fn,
1479
1478
  {
1480
- description: r ?? "",
1479
+ description: l ?? "",
1481
1480
  onInputChange: C
1482
1481
  }
1483
1482
  ),
1484
1483
  /* @__PURE__ */ e.jsx(
1485
- fn,
1484
+ jn,
1486
1485
  {
1487
1486
  value: b,
1488
1487
  onChange: u,
@@ -1501,7 +1500,7 @@ const en = ({
1501
1500
  /* @__PURE__ */ e.jsx(Lt, { children: "Select Activities" }),
1502
1501
  /* @__PURE__ */ e.jsx(St, {}),
1503
1502
  /* @__PURE__ */ e.jsx(Mt, { children: /* @__PURE__ */ e.jsx(
1504
- hn,
1503
+ mn,
1505
1504
  {
1506
1505
  actions: p,
1507
1506
  onSelected: s,
@@ -1527,12 +1526,12 @@ const en = ({
1527
1526
  }
1528
1527
  )
1529
1528
  ] });
1530
- }, pn = Re(
1529
+ }, gn = Fe(
1531
1530
  ({
1532
1531
  name: n,
1533
1532
  onInputChange: t
1534
1533
  }) => {
1535
- const { getLabel: i } = pe(), c = i("module");
1534
+ const { getLabel: a } = pe(), c = a("module");
1536
1535
  return /* @__PURE__ */ e.jsxs(K, { mb: 4, children: [
1537
1536
  /* @__PURE__ */ e.jsxs(ce, { children: [
1538
1537
  c,
@@ -1549,22 +1548,22 @@ const en = ({
1549
1548
  )
1550
1549
  ] });
1551
1550
  }
1552
- ), gn = Re(
1551
+ ), xn = Fe(
1553
1552
  ({
1554
1553
  availableCategories: n,
1555
1554
  value: t,
1556
- onChange: i
1555
+ onChange: a
1557
1556
  }) => {
1558
- const { getLabel: c } = pe(), u = c("module"), l = A(() => [
1557
+ const { getLabel: c } = pe(), u = c("module"), i = A(() => [
1559
1558
  ...n,
1560
1559
  {
1561
1560
  id: "other",
1562
1561
  name: "Other"
1563
1562
  }
1564
- ], [n]), d = A(() => l.map((m) => ({
1563
+ ], [n]), d = A(() => i.map((m) => ({
1565
1564
  value: m.id,
1566
1565
  label: m.name
1567
- })), [l]);
1566
+ })), [i]);
1568
1567
  return /* @__PURE__ */ e.jsxs(K, { mb: 4, children: [
1569
1568
  /* @__PURE__ */ e.jsxs(ce, { children: [
1570
1569
  u,
@@ -1575,17 +1574,17 @@ const en = ({
1575
1574
  {
1576
1575
  isDisabled: n.length === 0,
1577
1576
  options: d,
1578
- value: t.length === 0 ? { value: "other", label: "Other" } : l.filter((m) => t.includes(m.id)).map((m) => ({
1577
+ value: t.length === 0 ? { value: "other", label: "Other" } : i.filter((m) => t.includes(m.id)).map((m) => ({
1579
1578
  value: m.id,
1580
1579
  label: m.name
1581
1580
  }))[0],
1582
- onChange: (m) => i(m ? [m.value] : []),
1581
+ onChange: (m) => a(m ? [m.value] : []),
1583
1582
  placeholder: "Select category"
1584
1583
  }
1585
1584
  )
1586
1585
  ] });
1587
1586
  }
1588
- ), xn = Re(
1587
+ ), fn = Fe(
1589
1588
  ({
1590
1589
  description: n,
1591
1590
  onInputChange: t
@@ -1603,11 +1602,11 @@ const en = ({
1603
1602
  }
1604
1603
  )
1605
1604
  ] })
1606
- ), fn = Re(
1605
+ ), jn = Fe(
1607
1606
  ({
1608
1607
  value: n,
1609
1608
  onChange: t,
1610
- onAdjustActivities: i
1609
+ onAdjustActivities: a
1611
1610
  }) => {
1612
1611
  const { getLabel: c } = pe(), u = A(() => ({
1613
1612
  module: c("module"),
@@ -1615,7 +1614,7 @@ const en = ({
1615
1614
  action: c("action"),
1616
1615
  actionPlural: c("action_plural"),
1617
1616
  actionPluralLowerCase: c("action_plural").toLocaleLowerCase()
1618
- }), [c]), l = A(
1617
+ }), [c]), i = A(
1619
1618
  () => n.map((d) => ({
1620
1619
  id: d.id,
1621
1620
  name: d.name
@@ -1640,7 +1639,7 @@ const en = ({
1640
1639
  size: "sm",
1641
1640
  variant: "solid",
1642
1641
  colorScheme: "blue",
1643
- onClick: i,
1642
+ onClick: a,
1644
1643
  children: [
1645
1644
  "Add / Remove ",
1646
1645
  u.actionPlural
@@ -1648,7 +1647,7 @@ const en = ({
1648
1647
  }
1649
1648
  )
1650
1649
  ] }),
1651
- l.length === 0 ? /* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsxs(v, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
1650
+ i.length === 0 ? /* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsxs(v, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
1652
1651
  "No ",
1653
1652
  u.actionPluralLowerCase,
1654
1653
  " selected for this",
@@ -1662,7 +1661,7 @@ const en = ({
1662
1661
  size: "sm",
1663
1662
  variant: "link",
1664
1663
  colorScheme: "blue",
1665
- onClick: i,
1664
+ onClick: a,
1666
1665
  children: [
1667
1666
  "Add ",
1668
1667
  u.actionPluralLowerCase,
@@ -1671,86 +1670,86 @@ const en = ({
1671
1670
  }
1672
1671
  )
1673
1672
  ] }) }) : /* @__PURE__ */ e.jsx(
1674
- tn,
1673
+ nn,
1675
1674
  {
1676
- value: l,
1675
+ value: i,
1677
1676
  onChange: (d) => {
1678
- const m = d(l);
1679
- t(m.map((r) => r.id));
1677
+ const m = d(i);
1678
+ t(m.map((l) => l.id));
1680
1679
  }
1681
1680
  }
1682
1681
  )
1683
1682
  ] });
1684
1683
  }
1685
- ), jn = ({
1684
+ ), bn = ({
1686
1685
  value: n,
1687
1686
  onChange: t,
1688
- forceKind: i,
1687
+ forceKind: a,
1689
1688
  disableRemove: c,
1690
1689
  disableKind: u,
1691
- isDisabled: l,
1690
+ isDisabled: i,
1692
1691
  lockRanges: d,
1693
1692
  ...m
1694
1693
  }) => {
1695
- const r = A(() => [...n].sort((p, L) => {
1694
+ const l = A(() => [...n].sort((p, L) => {
1696
1695
  const b = Ye.indexOf(p.plane), s = Ye.indexOf(L.plane);
1697
1696
  return b - s;
1698
- }), [n]), x = F((p) => "segment" in p.id ? dt(p.id.segment, p.plane, !0) ?? "Unknown" : ut(p.id.joint, p.plane, !0) ?? "Unknown", []), h = F(
1697
+ }), [n]), x = R((p) => "segment" in p.id ? ut(p.id.segment, p.plane, !0) ?? "Unknown" : ht(p.id.joint, p.plane, !0) ?? "Unknown", []), h = R(
1699
1698
  (p, L) => {
1700
- const b = r.findIndex(
1699
+ const b = l.findIndex(
1701
1700
  (f) => f.id === L.id && f.plane === L.plane
1702
1701
  );
1703
- let s = [...r];
1704
- i && (L = { ...L, kind: i }), s[b] = L, d && (s = s.map((f) => ({
1702
+ let s = [...l];
1703
+ a && (L = { ...L, kind: a }), s[b] = L, d && (s = s.map((f) => ({
1705
1704
  ...f,
1706
1705
  min: L.min,
1707
1706
  max: L.max
1708
1707
  }))), t(s);
1709
1708
  },
1710
- [t, r, i, d]
1711
- ), T = F(
1709
+ [t, l, a, d]
1710
+ ), T = R(
1712
1711
  (p) => {
1713
- const L = r.filter(
1712
+ const L = l.filter(
1714
1713
  (b) => b.id !== p.id || b.plane !== p.plane
1715
1714
  );
1716
1715
  t(L);
1717
1716
  },
1718
- [t, r]
1717
+ [t, l]
1719
1718
  );
1720
- return /* @__PURE__ */ e.jsx(oe, { alignItems: "flex-start", overflowY: "auto", ...m, children: r.map((p, L) => /* @__PURE__ */ e.jsx(
1721
- bn,
1719
+ return /* @__PURE__ */ e.jsx(oe, { alignItems: "flex-start", overflowY: "auto", ...m, children: l.map((p, L) => /* @__PURE__ */ e.jsx(
1720
+ Cn,
1722
1721
  {
1723
1722
  label: x(p),
1724
1723
  parameter: p,
1725
1724
  onChange: (b) => h(L, b),
1726
- onRemove: c || l ? void 0 : () => T(p),
1727
- forceKind: i,
1728
- disableKind: u || l,
1729
- isDisabled: l
1725
+ onRemove: c || i ? void 0 : () => T(p),
1726
+ forceKind: a,
1727
+ disableKind: u || i,
1728
+ isDisabled: i
1730
1729
  },
1731
1730
  `${JSON.stringify(p.id)}-${p.plane}`
1732
1731
  )) });
1733
- }, bn = ({
1732
+ }, Cn = ({
1734
1733
  label: n,
1735
1734
  parameter: t,
1736
- onChange: i,
1735
+ onChange: a,
1737
1736
  onRemove: c,
1738
1737
  forceKind: u,
1739
- disableKind: l,
1738
+ disableKind: i,
1740
1739
  isDisabled: d
1741
1740
  }) => {
1742
- const m = F(
1743
- (h) => "joint" in t.id ? Jt(
1741
+ const m = R(
1742
+ (h) => "joint" in t.id ? Zt(
1744
1743
  t.id.joint,
1745
1744
  t.plane,
1746
1745
  h < 0 ? -1 : 1
1747
- ) : Xt(
1746
+ ) : Kt(
1748
1747
  t.id.segment,
1749
1748
  t.plane,
1750
1749
  h < 0 ? -1 : 1
1751
1750
  ),
1752
1751
  [t]
1753
- ), { min: r, max: x } = "joint" in t.id ? Zt(t.id.joint, t.plane) : { min: -180, max: 180 };
1752
+ ), { min: l, max: x } = "joint" in t.id ? Vt(t.id.joint, t.plane) : { min: -180, max: 180 };
1754
1753
  return /* @__PURE__ */ e.jsxs(
1755
1754
  oe,
1756
1755
  {
@@ -1779,16 +1778,16 @@ const en = ({
1779
1778
  size: "xs",
1780
1779
  variant: "ghost",
1781
1780
  "aria-label": "delete",
1782
- icon: /* @__PURE__ */ e.jsx(Je, { as: Rt }),
1781
+ icon: /* @__PURE__ */ e.jsx(Je, { as: Dt }),
1783
1782
  onClick: c
1784
1783
  }
1785
1784
  ),
1786
1785
  !u && /* @__PURE__ */ e.jsx(
1787
- sn,
1786
+ on,
1788
1787
  {
1789
1788
  selectedItem: t?.kind ?? Ie.Limit,
1790
- onChange: ({ value: h }) => i({ ...t, kind: h }),
1791
- isDisabled: l || d,
1789
+ onChange: ({ value: h }) => a({ ...t, kind: h }),
1790
+ isDisabled: i || d,
1792
1791
  buttonProps: {
1793
1792
  size: "sm",
1794
1793
  variant: "outline",
@@ -1806,15 +1805,15 @@ const en = ({
1806
1805
  )
1807
1806
  ] }),
1808
1807
  /* @__PURE__ */ e.jsx(
1809
- on,
1808
+ rn,
1810
1809
  {
1811
1810
  w: "100%",
1812
1811
  size: "xs",
1813
- min: r,
1812
+ min: l,
1814
1813
  max: x,
1815
1814
  zeroMarker: !0,
1816
1815
  value: [t.min, t.max],
1817
- onChange: (h) => i({ ...t, min: h[0], max: h[1] }),
1816
+ onChange: (h) => a({ ...t, min: h[0], max: h[1] }),
1818
1817
  formatValue: (h) => `${Math.abs(h)}°`,
1819
1818
  valueLabel: (h) => m(h) ?? "",
1820
1819
  positiveNegativeLabels: m(0) ? [m(-1) ?? "", m(1) ?? ""] : void 0,
@@ -1824,65 +1823,65 @@ const en = ({
1824
1823
  ]
1825
1824
  }
1826
1825
  );
1827
- }, Ae = (n, t) => "segment" in n && "segment" in t && n.segment === t.segment || "joint" in n && "joint" in t && n.joint === t.joint, Cn = ({
1826
+ }, Ae = (n, t) => "segment" in n && "segment" in t && n.segment === t.segment || "joint" in n && "joint" in t && n.joint === t.joint, yn = ({
1828
1827
  options: n,
1829
1828
  value: t,
1830
- onChange: i,
1829
+ onChange: a,
1831
1830
  forceKind: c,
1832
1831
  singleValue: u,
1833
- singleValueSideless: l,
1832
+ singleValueSideless: i,
1834
1833
  editOnly: d,
1835
1834
  disableKind: m,
1836
- maxParameters: r,
1835
+ maxParameters: l,
1837
1836
  ...x
1838
1837
  }) => {
1839
- const h = l ? 2 : r, T = A(
1838
+ const h = i ? 2 : l, T = A(
1840
1839
  () => n.map((s) => ({
1841
- label: "segment" in s.id ? dt(s.id.segment, s.plane, !0) ?? "Unknown" : ut(s.id.joint, s.plane, !0) ?? "Unknown",
1840
+ label: "segment" in s.id ? ut(s.id.segment, s.plane, !0) ?? "Unknown" : ht(s.id.joint, s.plane, !0) ?? "Unknown",
1842
1841
  value: s.id,
1843
1842
  plane: s.plane
1844
1843
  })),
1845
1844
  [n]
1846
1845
  ), p = A(() => {
1847
- if (!l || t.length === 0)
1846
+ if (!i || t.length === 0)
1848
1847
  return T;
1849
1848
  const s = t[0];
1850
1849
  return T.filter(
1851
1850
  (f) => Se(f.value) === Se(s.id) && f.plane === s.plane
1852
1851
  );
1853
- }, [T, t, l]), L = A(
1852
+ }, [T, t, i]), L = A(
1854
1853
  () => T.filter(
1855
1854
  (s) => t.some((f) => Ae(f.id, s.value) && f.plane === s.plane)
1856
1855
  ),
1857
1856
  [T, t]
1858
- ), b = F(
1857
+ ), b = R(
1859
1858
  (s) => {
1860
1859
  const f = s.map((C) => {
1861
1860
  const j = t.find(
1862
1861
  (k) => Ae(k.id, C.value) && k.plane === C.plane
1863
1862
  ), S = n.find(
1864
1863
  (k) => Ae(k.id, C.value) && k.plane === C.plane
1865
- ), R = l ? t.find(
1864
+ ), F = i ? t.find(
1866
1865
  (k) => Se(k.id) === Se(C.value) && k.plane === C.plane
1867
- ) : void 0, I = R && !j ? R.min : S && S.min ? S.min : 0, B = R && !j ? R.max : S && S.max ? S.max : 0;
1866
+ ) : void 0, N = F && !j ? F.min : S && S.min ? S.min : 0, B = F && !j ? F.max : S && S.max ? S.max : 0;
1868
1867
  return j ?? {
1869
1868
  id: C.value,
1870
1869
  plane: C.plane,
1871
- min: I,
1870
+ min: N,
1872
1871
  max: B,
1873
1872
  kind: c ?? Ie.Limit
1874
1873
  };
1875
1874
  });
1876
- i(f);
1875
+ a(f);
1877
1876
  },
1878
- [i, t, n, c, l]
1877
+ [a, t, n, c, i]
1879
1878
  );
1880
1879
  return ae(() => {
1881
1880
  const s = t.filter(
1882
1881
  (f) => n.some((C) => Ae(C.id, f.id) && C.plane === f.plane)
1883
1882
  );
1884
- s.length !== t.length && i(s);
1885
- }, [n, i]), /* @__PURE__ */ e.jsxs(V, { ...x, children: [
1883
+ s.length !== t.length && a(s);
1884
+ }, [n, a]), /* @__PURE__ */ e.jsxs(V, { ...x, children: [
1886
1885
  /* @__PURE__ */ e.jsx(
1887
1886
  de,
1888
1887
  {
@@ -1896,20 +1895,20 @@ const en = ({
1896
1895
  }
1897
1896
  ),
1898
1897
  /* @__PURE__ */ e.jsx(
1899
- jn,
1898
+ bn,
1900
1899
  {
1901
1900
  marginTop: 2,
1902
1901
  maxH: "28rem",
1903
1902
  value: t,
1904
- onChange: i,
1903
+ onChange: a,
1905
1904
  forceKind: c,
1906
1905
  disableKind: m,
1907
1906
  isDisabled: d,
1908
- lockRanges: l
1907
+ lockRanges: i
1909
1908
  }
1910
1909
  )
1911
1910
  ] });
1912
- }, ht = (n) => {
1911
+ }, mt = (n) => {
1913
1912
  switch (n) {
1914
1913
  case G.Thorax:
1915
1914
  return "Thorax";
@@ -1941,7 +1940,7 @@ const en = ({
1941
1940
  return "Head";
1942
1941
  }
1943
1942
  return console.warn(`Unknown sensor location: ${n}`), "Unknown";
1944
- }, yn = 6, vn = [
1943
+ }, vn = 6, wn = [
1945
1944
  G.LeftFoot,
1946
1945
  G.LeftShank,
1947
1946
  G.LeftThigh,
@@ -1952,114 +1951,114 @@ const en = ({
1952
1951
  G.Thorax,
1953
1952
  G.CenterBack,
1954
1953
  G.Head
1955
- ], wn = vn.map((n) => ({
1956
- label: ht(n),
1954
+ ], Ln = wn.map((n) => ({
1955
+ label: mt(n),
1957
1956
  value: n
1958
- })), Un = ({
1957
+ })), Qn = ({
1959
1958
  id: n,
1960
1959
  onError: t,
1961
- onCancel: i,
1960
+ onCancel: a,
1962
1961
  onSave: c,
1963
1962
  hideButtons: u,
1964
- setButtonOnClick: l,
1963
+ setButtonOnClick: i,
1965
1964
  setButtonDisabled: d,
1966
1965
  quantumOwned: m,
1967
- isView: r
1966
+ isView: l
1968
1967
  }) => {
1969
- const x = Ot(), [{ fetching: h }, T] = le(ze), [{ fetching: p }, L] = le(Et), [{ data: b }] = he({
1970
- query: _t,
1968
+ const x = Ot(), [{ fetching: h }, T] = ie(ze), [{ fetching: p }, L] = ie(_t), [{ data: b }] = he({
1969
+ query: zt,
1971
1970
  variables: { id: n ?? "" },
1972
1971
  pause: !n
1973
- }), s = P(
1972
+ }), s = _(
1974
1973
  me,
1975
1974
  b?.getActionById
1976
1975
  ), f = h || p, C = !!s && !!n, { getLabel: j } = pe(), S = A(() => ({
1977
1976
  action: j("action")
1978
- }), [j]), R = A(() => [
1977
+ }), [j]), F = A(() => [
1979
1978
  { key: "module_category", label: "Link Category", multi: !0 },
1980
1979
  { key: "activity_type", label: `${S.action} Type`, multi: !1 },
1981
1980
  { key: "session_type", label: "Session Type", multi: !0 },
1982
1981
  { key: "body_region", label: "Body Region", multi: !0 },
1983
1982
  { key: "sport", label: "Sport", multi: !0 }
1984
- ], [S.action]), [I, B] = z(""), [k, $] = z(""), [M, se] = z(""), [J, g] = z(""), [N, y] = z([]), [D, X] = z([]), [Z, E] = z({}), a = A(
1985
- () => N.map((O) => O.value),
1986
- [N]
1987
- ), o = Nt(a), [w, _] = z([]), W = I.length > 0, [Q, U] = z({});
1983
+ ], [S.action]), [N, B] = z(""), [k, $] = z(""), [M, se] = z(""), [J, g] = z(""), [I, y] = z([]), [D, X] = z([]), [Z, E] = z({}), r = A(
1984
+ () => I.map((O) => O.value),
1985
+ [I]
1986
+ ), o = Nt(r), [w, P] = z([]), W = N.length > 0, [Q, U] = z({});
1988
1987
  ae(() => {
1989
- const O = R.map(
1990
- (H) => x.query(Pt, { key: H.key })
1988
+ const O = F.map(
1989
+ (H) => x.query(Gt, { key: H.key })
1991
1990
  );
1992
1991
  Promise.all(O).then((H) => {
1993
1992
  const q = {};
1994
1993
  H.forEach((ne) => {
1995
1994
  if (ne.error || !ne.data) return;
1996
- const ie = P(
1995
+ const le = _(
1997
1996
  Ee,
1998
1997
  ne.data.getMetadataByKey
1999
- ), Fe = P(
2000
- _e,
2001
- ie.data
1998
+ ), Re = _(
1999
+ Pe,
2000
+ le.data
2002
2001
  );
2003
- q[ie.key] = Fe.map((ge) => ({
2002
+ q[le.key] = Re.map((ge) => ({
2004
2003
  label: ge.label || ge.value,
2005
2004
  value: ge.value,
2006
2005
  id: ge.id
2007
2006
  }));
2008
2007
  }), E(q);
2009
2008
  });
2010
- }, [x, R]), ae(() => {
2009
+ }, [x, F]), ae(() => {
2011
2010
  if (s) {
2012
- const H = P(
2011
+ const H = _(
2013
2012
  Ee,
2014
2013
  s.metadataGroups
2015
2014
  ).map(
2016
- (ne) => ne.data.map((ie) => P(_e, ie).id)
2015
+ (ne) => ne.data.map((le) => _(Pe, le).id)
2017
2016
  ), q = {
2018
2017
  name: s.name,
2019
2018
  description: s.description || "",
2020
2019
  cameraPlacement: s.cameraPlacement || "",
2021
2020
  videoLink: s.videoLink || "",
2022
2021
  sensorLocations: s.sensorLocations.map((ne) => ({
2023
- label: ht(ne),
2022
+ label: mt(ne),
2024
2023
  value: ne
2025
2024
  })),
2026
- thresholds: Kt(s.thresholds),
2025
+ thresholds: en(s.thresholds),
2027
2026
  metadataIds: H.flat()
2028
2027
  };
2029
- B(q.name), $(q.description), se(q.cameraPlacement), g(q.videoLink), y(q.sensorLocations), _(q.thresholds), X(q.metadataIds), U(q);
2028
+ B(q.name), $(q.description), se(q.cameraPlacement), g(q.videoLink), y(q.sensorLocations), P(q.thresholds), X(q.metadataIds), U(q);
2030
2029
  }
2031
2030
  }, [s]);
2032
2031
  const te = A(
2033
2032
  () => JSON.stringify(Q) !== JSON.stringify({
2034
- name: I,
2033
+ name: N,
2035
2034
  description: k,
2036
2035
  cameraPlacement: M,
2037
2036
  videoLink: J,
2038
- sensorLocations: a,
2037
+ sensorLocations: r,
2039
2038
  thresholds: He(w),
2040
2039
  metadataIds: D
2041
2040
  }),
2042
2041
  [
2043
2042
  Q,
2044
- I,
2045
- a,
2043
+ N,
2044
+ r,
2046
2045
  k,
2047
2046
  M,
2048
2047
  J,
2049
2048
  D,
2050
2049
  w
2051
2050
  ]
2052
- ), Y = F(() => {
2051
+ ), Y = R(() => {
2053
2052
  const O = {
2054
- name: I,
2053
+ name: N,
2055
2054
  description: k,
2056
2055
  cameraPlacement: M,
2057
2056
  videoLink: J,
2058
- sensorLocations: a,
2057
+ sensorLocations: r,
2059
2058
  thresholds: He(w),
2060
2059
  metadataItemIds: D,
2061
2060
  // Backend requires laterality; keep existing default since UI no longer edits it
2062
- laterality: Ht.Either,
2061
+ laterality: Xt.Either,
2063
2062
  quantumOwned: m,
2064
2063
  //Backend requires session type; keep existing default since UI no longer edits it
2065
2064
  sessionType: []
@@ -2078,8 +2077,8 @@ const en = ({
2078
2077
  T,
2079
2078
  L,
2080
2079
  n,
2081
- I,
2082
- a,
2080
+ N,
2081
+ r,
2083
2082
  k,
2084
2083
  M,
2085
2084
  J,
@@ -2092,24 +2091,24 @@ const en = ({
2092
2091
  ae(() => {
2093
2092
  d && d({
2094
2093
  cancelButton: f,
2095
- saveButton: r ? !0 : f || !W || !te
2094
+ saveButton: l ? !0 : f || !W || !te
2096
2095
  });
2097
- }, [f, d, W, te, r]), ae(() => {
2098
- l && l({
2099
- cancelButton: i,
2100
- saveButton: r ? () => {
2096
+ }, [f, d, W, te, l]), ae(() => {
2097
+ i && i({
2098
+ cancelButton: a,
2099
+ saveButton: l ? () => {
2101
2100
  } : Y
2102
2101
  });
2103
- }, [l, i, Y, r]);
2102
+ }, [i, a, Y, l]);
2104
2103
  const Ce = (O, H) => {
2105
- const q = R.find((ie) => ie.key === O);
2104
+ const q = F.find((le) => le.key === O);
2106
2105
  if (!q) return;
2107
2106
  const ne = q.multi ? (H ?? []).map(
2108
- (ie) => ie.id
2107
+ (le) => le.id
2109
2108
  ) : H ? [H.id] : [];
2110
- X((ie) => [...ie.filter((ge) => Object.values(Z).flat().find((Le) => Le.id === ge) && !Object.keys(Z).find(
2109
+ X((le) => [...le.filter((ge) => Object.values(Z).flat().find((Le) => Le.id === ge) && !Object.keys(Z).find(
2111
2110
  (Le) => Z[Le]?.some(
2112
- (mt) => mt.id === ge && Le === O
2111
+ (pt) => pt.id === ge && Le === O
2113
2112
  )
2114
2113
  )), ...ne]);
2115
2114
  };
@@ -2120,11 +2119,11 @@ const en = ({
2120
2119
  /* @__PURE__ */ e.jsx(
2121
2120
  ye,
2122
2121
  {
2123
- value: I,
2122
+ value: N,
2124
2123
  onChange: (O) => B(O.target.value),
2125
2124
  type: "text",
2126
2125
  placeholder: "i.e. Lunge & Return",
2127
- isDisabled: r
2126
+ isDisabled: l
2128
2127
  }
2129
2128
  )
2130
2129
  ] }),
@@ -2137,7 +2136,7 @@ const en = ({
2137
2136
  onChange: (O) => se(O.target.value),
2138
2137
  rows: 2,
2139
2138
  placeholder: "(optional) Describe camera setup, placement, angles",
2140
- isDisabled: r
2139
+ isDisabled: l
2141
2140
  }
2142
2141
  )
2143
2142
  ] }),
@@ -2150,7 +2149,7 @@ const en = ({
2150
2149
  onChange: (O) => g(O.target.value),
2151
2150
  type: "url",
2152
2151
  placeholder: "(optional) https://...",
2153
- isDisabled: r
2152
+ isDisabled: l
2154
2153
  }
2155
2154
  )
2156
2155
  ] }),
@@ -2163,13 +2162,13 @@ const en = ({
2163
2162
  onChange: (O) => $(O.target.value),
2164
2163
  rows: 2,
2165
2164
  placeholder: "(optional) Describe how to perform the test or exercise",
2166
- isDisabled: r
2165
+ isDisabled: l
2167
2166
  }
2168
2167
  )
2169
2168
  ] }),
2170
2169
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2171
2170
  /* @__PURE__ */ e.jsx(ue, { children: "Metadata Tags" }),
2172
- R.map((O) => /* @__PURE__ */ e.jsxs(K, { children: [
2171
+ F.map((O) => /* @__PURE__ */ e.jsxs(K, { children: [
2173
2172
  /* @__PURE__ */ e.jsx(ue, { children: O.label }),
2174
2173
  /* @__PURE__ */ e.jsx(
2175
2174
  de,
@@ -2183,7 +2182,7 @@ const en = ({
2183
2182
  },
2184
2183
  options: Z[O.key],
2185
2184
  placeholder: `Select ${O.multi ? "one or more" : "one"} ${O.label.toLowerCase()}`,
2186
- isDisabled: r,
2185
+ isDisabled: l,
2187
2186
  isClearable: O.multi
2188
2187
  }
2189
2188
  )
@@ -2197,23 +2196,23 @@ const en = ({
2197
2196
  de,
2198
2197
  {
2199
2198
  isMulti: !0,
2200
- value: N,
2199
+ value: I,
2201
2200
  onChange: (O) => y([...O]),
2202
- options: wn,
2203
- isOptionDisabled: () => N.length >= yn,
2204
- isDisabled: r
2201
+ options: Ln,
2202
+ isOptionDisabled: () => I.length >= vn,
2203
+ isDisabled: l
2205
2204
  }
2206
2205
  )
2207
2206
  ] }),
2208
2207
  /* @__PURE__ */ e.jsxs(K, { children: [
2209
2208
  /* @__PURE__ */ e.jsx(ue, { children: "Default Parameters" }),
2210
2209
  /* @__PURE__ */ e.jsx(
2211
- Cn,
2210
+ yn,
2212
2211
  {
2213
2212
  options: o,
2214
2213
  value: w,
2215
- onChange: _,
2216
- editOnly: r
2214
+ onChange: P,
2215
+ editOnly: l
2217
2216
  }
2218
2217
  )
2219
2218
  ] })
@@ -2221,12 +2220,12 @@ const en = ({
2221
2220
  /* @__PURE__ */ e.jsx(
2222
2221
  "div",
2223
2222
  {
2224
- className: Vt(
2223
+ className: ot(
2225
2224
  "col-span-2 flex justify-end",
2226
- (u || r) && "hidden"
2225
+ (u || l) && "hidden"
2227
2226
  ),
2228
2227
  children: /* @__PURE__ */ e.jsxs(be, { mt: 16, gap: 4, children: [
2229
- /* @__PURE__ */ e.jsx(ee, { colorScheme: "gray", isDisabled: f, onClick: i, children: "Cancel" }),
2228
+ /* @__PURE__ */ e.jsx(ee, { colorScheme: "gray", isDisabled: f, onClick: a, children: "Cancel" }),
2230
2229
  /* @__PURE__ */ e.jsx(
2231
2230
  ee,
2232
2231
  {
@@ -2241,88 +2240,88 @@ const en = ({
2241
2240
  }
2242
2241
  )
2243
2242
  ] });
2244
- }, ue = ({ children: n }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: n }), Bn = ({
2243
+ }, ue = ({ children: n }) => /* @__PURE__ */ e.jsx(Xe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: n }), qn = ({
2245
2244
  id: n,
2246
2245
  onCancel: t,
2247
- onSave: i,
2246
+ onSave: a,
2248
2247
  onError: c,
2249
2248
  hideButtons: u,
2250
- quantumOwned: l,
2249
+ quantumOwned: i,
2251
2250
  setButtonOnClick: d,
2252
2251
  setButtonDisabled: m
2253
2252
  }) => {
2254
- const [{ data: r }] = he({
2255
- query: l ? zt : Gt
2253
+ const [{ data: l }] = he({
2254
+ query: i ? Wt : Ut
2256
2255
  }), [{ data: x }] = he({
2257
- query: Wt,
2256
+ query: Bt,
2258
2257
  variables: { id: n },
2259
2258
  pause: !n
2260
2259
  }), [{ data: h }] = he({
2261
- query: Ut
2262
- }), T = P(
2260
+ query: Qt
2261
+ }), T = _(
2263
2262
  we,
2264
2263
  h?.moduleCategories
2265
- ), [{ fetching: p }, L] = le(lt), [{ fetching: b }, s] = le(it), f = P(
2264
+ ), [{ fetching: p }, L] = ie(ct), [{ fetching: b }, s] = ie(it), f = _(
2266
2265
  me,
2267
- l ? r?.quantumOwnedActions : r?.actions
2268
- ) ?? [], C = P(Te, x?.module), j = P(ct, C?.moduleActions) ?? [], [S, R] = z([
2266
+ i ? l?.quantumOwnedActions : l?.actions
2267
+ ) ?? [], C = _(Te, x?.module), j = _(dt, C?.moduleActions) ?? [], [S, F] = z([
2269
2268
  ...j.map((g) => g.actionId) ?? []
2270
- ]), [I, B] = z(C?.name ?? ""), [k, $] = z([]), [M, se] = z(C?.description ?? "");
2269
+ ]), [N, B] = z(C?.name ?? ""), [k, $] = z([]), [M, se] = z(C?.description ?? "");
2271
2270
  ae(() => {
2272
- C && (R(j.map((g) => g.actionId)), B(C.name), se(C.description ?? ""), $(
2271
+ C && (F(j.map((g) => g.actionId)), B(C.name), se(C.description ?? ""), $(
2273
2272
  C.categories.map(
2274
- (g) => P(we, g).id
2273
+ (g) => _(we, g).id
2275
2274
  ) ?? []
2276
2275
  ));
2277
2276
  }, [C, j]);
2278
- const J = F(() => {
2277
+ const J = R(() => {
2279
2278
  let g;
2280
- const N = {
2279
+ const I = {
2281
2280
  actions: S,
2282
- name: I,
2281
+ name: N,
2283
2282
  categories: k.filter((y) => y !== "other"),
2284
2283
  description: M,
2285
- quantumOwned: l
2284
+ quantumOwned: i
2286
2285
  };
2287
2286
  C ? g = L({
2288
2287
  id: C.id,
2289
- input: N
2288
+ input: I
2290
2289
  }) : g = s({
2291
- input: N
2290
+ input: I
2292
2291
  }), g.then(({ error: y }) => {
2293
- y ? c(y) : i();
2292
+ y ? c(y) : a();
2294
2293
  });
2295
2294
  }, [
2296
2295
  s,
2297
2296
  L,
2298
2297
  S,
2299
- I,
2298
+ N,
2300
2299
  M,
2301
2300
  k,
2302
2301
  C,
2303
- i,
2302
+ a,
2304
2303
  c,
2305
- l
2304
+ i
2306
2305
  ]);
2307
2306
  return ae(() => {
2308
2307
  m && m({
2309
2308
  cancelButton: p || b,
2310
- saveButton: p || b || !I || M.trim().split(/\s+/).filter(Boolean).length > 40
2309
+ saveButton: p || b || !N || M.trim().split(/\s+/).filter(Boolean).length > 40
2311
2310
  });
2312
- }, [m, p, b, S, I, M]), ae(() => {
2311
+ }, [m, p, b, S, N, M]), ae(() => {
2313
2312
  d && d({
2314
2313
  cancelButton: t,
2315
2314
  saveButton: J
2316
2315
  });
2317
2316
  }, [d, t, J]), /* @__PURE__ */ e.jsxs(V, { width: "100%", children: [
2318
2317
  /* @__PURE__ */ e.jsx(
2319
- mn,
2318
+ pn,
2320
2319
  {
2321
- name: I,
2320
+ name: N,
2322
2321
  setName: B,
2323
2322
  actions: f,
2324
2323
  selectedActionIds: S,
2325
- setSelectedActionIds: R,
2324
+ setSelectedActionIds: F,
2326
2325
  availableCategories: T ?? [],
2327
2326
  selectedCategoryIds: k,
2328
2327
  setSelectedCategoryIds: $,
@@ -2344,7 +2343,7 @@ const en = ({
2344
2343
  ee,
2345
2344
  {
2346
2345
  colorScheme: "blue",
2347
- isDisabled: p || b || !I || M.trim().split(/\s+/).filter(Boolean).length > 40,
2346
+ isDisabled: p || b || !N || M.trim().split(/\s+/).filter(Boolean).length > 40,
2348
2347
  isLoading: p || b,
2349
2348
  onClick: J,
2350
2349
  children: "Save"
@@ -2354,12 +2353,12 @@ const en = ({
2354
2353
  ] });
2355
2354
  };
2356
2355
  export {
2357
- hn as ActivityList,
2358
- Gn as CopyActivityForm,
2359
- Wn as CopyModuleForm,
2360
- mn as ModuleForm,
2361
- jn as ParameterEditList,
2362
- Cn as ParameterEditSelect,
2363
- Un as UpsertActivityForm,
2364
- Bn as UpsertModuleForm
2356
+ mn as ActivityList,
2357
+ Un as CopyActivityForm,
2358
+ Bn as CopyModuleForm,
2359
+ pn as ModuleForm,
2360
+ bn as ParameterEditList,
2361
+ yn as ParameterEditSelect,
2362
+ Qn as UpsertActivityForm,
2363
+ qn as UpsertModuleForm
2365
2364
  };