@wandelbots/wandelbots-js-react-components 5.6.0 → 5.6.1-pr.dev-new-nova-js-client.614.87ed9a2

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.
@@ -26,7 +26,7 @@ import xe from "@mui/icons-material/Share";
26
26
  import P from "@mui/material/Stack";
27
27
  import zt from "@mui/material/Tab";
28
28
  import Vt from "@mui/material/Tabs";
29
- import { JointTypeEnum as G, NovaClient as ye, poseToWandelscriptString as Se } from "@wandelbots/nova-js/v2";
29
+ import { JointTypeEnum as G, Nova as ye, poseToWandelscriptString as Se } from "@wandelbots/nova-js/v2";
30
30
  import { lowerFirst as ve, countBy as Ce, isString as we } from "lodash-es";
31
31
  import { runInAction as D, makeAutoObservable as mt, when as at, autorun as kt, makeObservable as Te, action as Rt, observable as Me } from "mobx";
32
32
  import { radiansToDegrees as Nt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as Ie } from "@wandelbots/nova-js";
@@ -85,12 +85,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
85
85
  onAppSelect: i,
86
86
  disabled: n = !1,
87
87
  sx: c
88
- } = e, [s, l] = L(null), u = !!s, f = (p) => {
89
- l(p.currentTarget);
90
- }, g = () => {
88
+ } = e, [s, l] = L(null), d = !!s, m = (g) => {
89
+ l(g.currentTarget);
90
+ }, u = () => {
91
91
  l(null);
92
- }, d = (p) => {
93
- g(), p.onClick ? p.onClick() : p.href && (window.location.href = p.href), i == null || i(p);
92
+ }, p = (g) => {
93
+ u(), g.onClick ? g.onClick() : g.href && (window.location.href = g.href), i == null || i(g);
94
94
  };
95
95
  return /* @__PURE__ */ S(et, { children: [
96
96
  /* @__PURE__ */ a(
@@ -127,7 +127,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
127
127
  "aria-label": "switch app",
128
128
  "aria-controls": "app-menu",
129
129
  "aria-haspopup": "true",
130
- onClick: f,
130
+ onClick: m,
131
131
  disabled: n,
132
132
  sx: {
133
133
  ml: 1,
@@ -135,10 +135,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
135
135
  height: 28,
136
136
  borderRadius: "6px",
137
137
  padding: 0,
138
- backgroundColor: (p) => Mt(p.palette.common.white, 0.1),
138
+ backgroundColor: (g) => Mt(g.palette.common.white, 0.1),
139
139
  opacity: 1,
140
140
  "&:hover": {
141
- backgroundColor: (p) => Mt(p.palette.common.white, 0.16)
141
+ backgroundColor: (g) => Mt(g.palette.common.white, 0.16)
142
142
  },
143
143
  "& .MuiSvgIcon-root": {
144
144
  fontSize: "8px",
@@ -156,12 +156,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
156
156
  /* @__PURE__ */ a(
157
157
  Bt,
158
158
  {
159
- open: u,
160
- onClick: g,
159
+ open: d,
160
+ onClick: u,
161
161
  sx: {
162
162
  backdropFilter: "blur(4px)",
163
163
  backgroundColor: "rgba(0, 0, 0, 0.3)",
164
- zIndex: (p) => p.zIndex.modal - 1
164
+ zIndex: (g) => g.zIndex.modal - 1
165
165
  }
166
166
  }
167
167
  ),
@@ -170,8 +170,8 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
170
170
  {
171
171
  id: "app-menu",
172
172
  anchorEl: s,
173
- open: u,
174
- onClose: g,
173
+ open: d,
174
+ onClose: u,
175
175
  anchorOrigin: {
176
176
  vertical: "bottom",
177
177
  horizontal: "left"
@@ -181,16 +181,16 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
181
181
  horizontal: "left"
182
182
  },
183
183
  sx: {
184
- zIndex: (p) => p.zIndex.modal,
184
+ zIndex: (g) => g.zIndex.modal,
185
185
  "& .MuiPaper-root": {
186
186
  minWidth: 200,
187
187
  mt: 1
188
188
  }
189
189
  },
190
- children: r.map((p) => /* @__PURE__ */ S(Y, { onClick: () => d(p), children: [
191
- /* @__PURE__ */ a(w, { sx: { display: "flex", alignItems: "center" }, children: p.icon }),
192
- /* @__PURE__ */ a(R, { variant: "body1", sx: { ml: 2 }, children: p.name })
193
- ] }, p.id))
190
+ children: r.map((g) => /* @__PURE__ */ S(Y, { onClick: () => p(g), children: [
191
+ /* @__PURE__ */ a(w, { sx: { display: "flex", alignItems: "center" }, children: g.icon }),
192
+ /* @__PURE__ */ a(R, { variant: "body1", sx: { ml: 2 }, children: g.name })
193
+ ] }, g.id))
194
194
  }
195
195
  )
196
196
  ] });
@@ -214,14 +214,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
214
214
  hasError: o,
215
215
  className: r
216
216
  }) => {
217
- const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime: u, currentProgress: f } = e, {
218
- showErrorAnimation: g,
219
- showPauseAnimation: d,
220
- showPulsatingText: p,
221
- pulsatingFinished: x,
217
+ const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime: d, currentProgress: m } = e, {
218
+ showErrorAnimation: u,
219
+ showPauseAnimation: p,
220
+ showPulsatingText: g,
221
+ pulsatingFinished: f,
222
222
  showLabels: y,
223
- showMainText: h,
224
- showIdlePulsating: m,
223
+ showMainText: b,
224
+ showIdlePulsating: h,
225
225
  idleDotsCount: v
226
226
  } = t;
227
227
  return /* @__PURE__ */ S(
@@ -242,7 +242,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
242
242
  {
243
243
  width: 264,
244
244
  height: 264,
245
- value: s === "idle" ? 0 : f,
245
+ value: s === "idle" ? 0 : m,
246
246
  valueMin: 0,
247
247
  valueMax: 100,
248
248
  innerRadius: "85%",
@@ -251,7 +251,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
251
251
  skipAnimation: !0,
252
252
  text: () => "",
253
253
  sx: {
254
- opacity: d || g ? 0.6 : 1,
254
+ opacity: p || u ? 0.6 : 1,
255
255
  transition: "opacity 0.5s ease-out",
256
256
  "& .MuiGauge-valueArc": {
257
257
  fill: o ? c.palette.error.light : c.palette.success.main,
@@ -314,14 +314,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
314
314
  variant: "body2",
315
315
  sx: {
316
316
  fontSize: "12px",
317
- color: s === "measured" && (p || x) ? c.palette.success.main : c.palette.text.secondary,
317
+ color: s === "measured" && (g || f) ? c.palette.success.main : c.palette.text.secondary,
318
318
  transition: "color 0.8s ease-in-out"
319
319
  },
320
320
  children: /* @__PURE__ */ a(
321
321
  "span",
322
322
  {
323
323
  style: {
324
- opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
324
+ opacity: s === "measured" && f ? g ? 1 : 0.6 : 1,
325
325
  transition: "opacity 2s ease-in-out"
326
326
  },
327
327
  children: s === "measuring" || s === "measured" ? i("CycleTimer.CycleTime.lb", "Cycle Time") : s === "countdown" ? i("CycleTimer.RemainingTime.lb", "Remaining Time") : ""
@@ -348,7 +348,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
348
348
  /* @__PURE__ */ a(
349
349
  H,
350
350
  {
351
- in: h && s === "idle" && !o,
351
+ in: b && s === "idle" && !o,
352
352
  timeout: 200,
353
353
  children: /* @__PURE__ */ S(
354
354
  R,
@@ -373,7 +373,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
373
373
  "span",
374
374
  {
375
375
  style: {
376
- opacity: m ? 1 : 0.6,
376
+ opacity: h ? 1 : 0.6,
377
377
  transition: "opacity 2s ease-in-out"
378
378
  },
379
379
  children: i(
@@ -389,7 +389,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
389
389
  display: "inline-block",
390
390
  width: "18px",
391
391
  textAlign: "left",
392
- opacity: m ? 1 : 0.6,
392
+ opacity: h ? 1 : 0.6,
393
393
  transition: "opacity 2s ease-in-out"
394
394
  },
395
395
  children: ".".repeat(v)
@@ -400,7 +400,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
400
400
  )
401
401
  }
402
402
  ),
403
- /* @__PURE__ */ a(H, { in: h && o, timeout: 200, children: /* @__PURE__ */ a(
403
+ /* @__PURE__ */ a(H, { in: b && o, timeout: 200, children: /* @__PURE__ */ a(
404
404
  R,
405
405
  {
406
406
  variant: "h3",
@@ -417,7 +417,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
417
417
  /* @__PURE__ */ a(
418
418
  H,
419
419
  {
420
- in: h && !o && s !== "idle" && s !== "success",
420
+ in: b && !o && s !== "idle" && s !== "success",
421
421
  timeout: 300,
422
422
  children: /* @__PURE__ */ a(
423
423
  R,
@@ -469,18 +469,18 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
469
469
  variant: "body2",
470
470
  sx: {
471
471
  fontSize: "12px",
472
- color: s === "measured" && (p || x) ? c.palette.success.main : c.palette.text.secondary,
472
+ color: s === "measured" && (g || f) ? c.palette.success.main : c.palette.text.secondary,
473
473
  transition: "color 0.8s ease-in-out"
474
474
  },
475
475
  children: /* @__PURE__ */ a(
476
476
  "span",
477
477
  {
478
478
  style: {
479
- opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
479
+ opacity: s === "measured" && f ? g ? 1 : 0.6 : 1,
480
480
  transition: "opacity 2s ease-in-out"
481
481
  },
482
- children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" && u !== null ? i("CycleTimer.OfTime.lb", {
483
- time: N(u, n.language)
482
+ children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" && d !== null ? i("CycleTimer.OfTime.lb", {
483
+ time: N(d, n.language)
484
484
  }) : ""
485
485
  }
486
486
  )
@@ -503,13 +503,13 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
503
503
  compact: r,
504
504
  className: i
505
505
  }) => {
506
- const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime: u, maxTime: f } = e, {
507
- showErrorAnimation: g,
508
- showPauseAnimation: d,
509
- showPulsatingText: p,
510
- pulsatingFinished: x,
506
+ const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime: d, maxTime: m } = e, {
507
+ showErrorAnimation: u,
508
+ showPauseAnimation: p,
509
+ showPulsatingText: g,
510
+ pulsatingFinished: f,
511
511
  showIdlePulsating: y,
512
- idleDotsCount: h
512
+ idleDotsCount: b
513
513
  } = t;
514
514
  return r && l === "idle" ? /* @__PURE__ */ a(
515
515
  w,
@@ -529,7 +529,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
529
529
  fontSize: "14px",
530
530
  transition: "color 0.5s ease-out"
531
531
  },
532
- children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(u, c.language)
532
+ children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(d, c.language)
533
533
  }
534
534
  )
535
535
  }
@@ -553,7 +553,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
553
553
  display: "flex",
554
554
  alignItems: "center",
555
555
  justifyContent: "center",
556
- opacity: d || g ? 0.6 : 1,
556
+ opacity: p || u ? 0.6 : 1,
557
557
  transition: "opacity 0.5s ease-out"
558
558
  },
559
559
  children: /* @__PURE__ */ S(
@@ -573,9 +573,9 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
573
573
  cy: "10",
574
574
  r: "8",
575
575
  fill: "none",
576
- stroke: o ? s.palette.error.light : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
576
+ stroke: o ? s.palette.error.light : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
577
577
  strokeWidth: "2",
578
- opacity: l === "measured" && x ? p ? 1 : 0.6 : 0.3,
578
+ opacity: l === "measured" && f ? g ? 1 : 0.6 : 0.3,
579
579
  style: {
580
580
  transition: "stroke 0.8s ease-in-out, opacity 2s ease-in-out"
581
581
  }
@@ -588,13 +588,13 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
588
588
  cy: "10",
589
589
  r: "8",
590
590
  fill: "none",
591
- stroke: o ? s.palette.error.light : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
591
+ stroke: o ? s.palette.error.light : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
592
592
  strokeWidth: "2",
593
593
  strokeLinecap: "round",
594
594
  strokeDasharray: `${2 * Math.PI * 8}`,
595
595
  strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 : e.currentProgress) / 100)}`,
596
596
  style: {
597
- opacity: l === "measured" && x ? p ? 1 : 0.6 : 1,
597
+ opacity: l === "measured" && f ? g ? 1 : 0.6 : 1,
598
598
  transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
599
599
  }
600
600
  }
@@ -609,11 +609,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
609
609
  {
610
610
  variant: "body2",
611
611
  sx: {
612
- color: o ? s.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.text.primary,
612
+ color: o ? s.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.text.primary,
613
613
  fontSize: "14px",
614
614
  lineHeight: "normal",
615
615
  letterSpacing: "normal",
616
- opacity: l === "idle" ? y ? 1 : 0.6 : l === "measured" && x ? p ? 1 : 0.6 : 1,
616
+ opacity: l === "idle" ? y ? 1 : 0.6 : l === "measured" && f ? g ? 1 : 0.6 : 1,
617
617
  transition: "color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"
618
618
  },
619
619
  children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? /* @__PURE__ */ S(et, { children: [
@@ -626,10 +626,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
626
626
  width: "18px",
627
627
  textAlign: "left"
628
628
  },
629
- children: ".".repeat(h)
629
+ children: ".".repeat(b)
630
630
  }
631
631
  )
632
- ] }) : l === "measuring" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && f !== null ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Time.lb", { time: N(f, c.language) })}` : N(u, c.language)
632
+ ] }) : l === "measuring" ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && m !== null ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Time.lb", { time: N(m, c.language) })}` : N(d, c.language)
633
633
  }
634
634
  )
635
635
  ]
@@ -653,17 +653,17 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
653
653
  null
654
654
  ), n = A(null), c = A(0), s = A(null), l = A(
655
655
  null
656
- ), u = _(() => {
657
- t((b) => ({ ...b, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
658
- t((b) => ({ ...b, showPauseAnimation: !1 }));
656
+ ), d = _(() => {
657
+ t((x) => ({ ...x, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
658
+ t((x) => ({ ...x, showPauseAnimation: !1 }));
659
659
  }, 800);
660
- }, []), f = _(() => {
661
- t((b) => ({ ...b, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
662
- t((b) => ({ ...b, showErrorAnimation: !1 }));
660
+ }, []), m = _(() => {
661
+ t((x) => ({ ...x, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
662
+ t((x) => ({ ...x, showErrorAnimation: !1 }));
663
663
  }, 600);
664
- }, []), g = _(() => {
665
- t((b) => ({ ...b, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
666
- }, []), d = _((b) => {
664
+ }, []), u = _(() => {
665
+ t((x) => ({ ...x, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
666
+ }, []), p = _((x) => {
667
667
  c.current = 0, t((T) => ({
668
668
  ...T,
669
669
  showPulsatingText: !0,
@@ -678,51 +678,51 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
678
678
  ...T,
679
679
  showPulsatingText: !T.showPulsatingText
680
680
  }));
681
- }, 2e3), b && b();
681
+ }, 2e3), x && x();
682
682
  }, 800);
683
- }, []), p = _(() => {
684
- i.current && (clearInterval(i.current), i.current = null), t((b) => ({
685
- ...b,
683
+ }, []), g = _(() => {
684
+ i.current && (clearInterval(i.current), i.current = null), t((x) => ({
685
+ ...x,
686
686
  showPulsatingText: !1,
687
687
  pulsatingFinished: !1
688
688
  })), c.current = 0;
689
- }, []), x = _(() => {
690
- t((b) => ({
691
- ...b,
689
+ }, []), f = _(() => {
690
+ t((x) => ({
691
+ ...x,
692
692
  showIdlePulsating: !0
693
693
  })), s.current = setInterval(() => {
694
- t((b) => ({
695
- ...b,
696
- showIdlePulsating: !b.showIdlePulsating
694
+ t((x) => ({
695
+ ...x,
696
+ showIdlePulsating: !x.showIdlePulsating
697
697
  }));
698
698
  }, 2e3), l.current = setInterval(() => {
699
- t((b) => ({
700
- ...b,
701
- idleDotsCount: (b.idleDotsCount + 1) % 4
699
+ t((x) => ({
700
+ ...x,
701
+ idleDotsCount: (x.idleDotsCount + 1) % 4
702
702
  // Cycle through 0, 1, 2, 3
703
703
  }));
704
704
  }, 800);
705
705
  }, []), y = _(() => {
706
- s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), t((b) => ({
707
- ...b,
706
+ s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), t((x) => ({
707
+ ...x,
708
708
  showIdlePulsating: !1,
709
709
  idleDotsCount: 0
710
710
  }));
711
- }, []), h = _(() => {
712
- t((b) => ({
713
- ...b,
711
+ }, []), b = _(() => {
712
+ t((x) => ({
713
+ ...x,
714
714
  showLabels: !1,
715
715
  showMainText: !1
716
716
  })), n.current && clearTimeout(n.current), n.current = setTimeout(() => {
717
- t((b) => ({
718
- ...b,
717
+ t((x) => ({
718
+ ...x,
719
719
  showLabels: !0,
720
720
  showMainText: !0
721
721
  }));
722
722
  }, 200);
723
- }, []), m = _(() => {
724
- t((b) => ({
725
- ...b,
723
+ }, []), h = _(() => {
724
+ t((x) => ({
725
+ ...x,
726
726
  showLabels: !0,
727
727
  showMainText: !0
728
728
  }));
@@ -731,15 +731,15 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
731
731
  }, []);
732
732
  return {
733
733
  animationState: e,
734
- triggerPauseAnimation: u,
735
- triggerErrorAnimation: f,
736
- clearErrorAnimation: g,
737
- startPulsatingAnimation: d,
738
- stopPulsatingAnimation: p,
739
- startIdleAnimations: x,
734
+ triggerPauseAnimation: d,
735
+ triggerErrorAnimation: m,
736
+ clearErrorAnimation: u,
737
+ startPulsatingAnimation: p,
738
+ stopPulsatingAnimation: g,
739
+ startIdleAnimations: f,
740
740
  stopIdleAnimations: y,
741
- triggerFadeTransition: h,
742
- setInitialAnimationState: m,
741
+ triggerFadeTransition: b,
742
+ setInitialAnimationState: h,
743
743
  cleanup: v
744
744
  };
745
745
  }, bo = ({
@@ -752,7 +752,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
752
752
  onClearErrorAnimation: c,
753
753
  onStartPulsating: s
754
754
  }) => {
755
- const [l, u] = L({
755
+ const [l, d] = L({
756
756
  currentState: "idle",
757
757
  remainingTime: 0,
758
758
  maxTime: null,
@@ -760,14 +760,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
760
760
  isPausedState: !1,
761
761
  currentProgress: 0,
762
762
  wasRunningBeforeError: !1
763
- }), f = A(null), g = A(null), d = A(0), [p] = $t([0], {
763
+ }), m = A(null), u = A(null), p = A(0), [g] = $t([0], {
764
764
  tension: 80,
765
765
  friction: 18,
766
766
  onChange: ([C]) => {
767
- u((M) => ({ ...M, currentProgress: C }));
767
+ d((M) => ({ ...M, currentProgress: C }));
768
768
  }
769
- }), x = _(() => {
770
- u((C) => ({
769
+ }), f = _(() => {
770
+ d((C) => ({
771
771
  ...C,
772
772
  currentState: "idle",
773
773
  maxTime: null,
@@ -776,11 +776,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
776
776
  isPausedState: !1,
777
777
  currentProgress: 0
778
778
  // Reset progress to 0 for gauge
779
- })), d.current = 0, g.current = null, p.setImmediate([0]);
780
- }, [p]), y = _(
779
+ })), p.current = 0, u.current = null, g.setImmediate([0]);
780
+ }, [g]), y = _(
781
781
  (C = 0) => {
782
782
  const M = C / 60 % 1 * 100;
783
- u((k) => ({
783
+ d((k) => ({
784
784
  ...k,
785
785
  currentState: "measuring",
786
786
  maxTime: null,
@@ -788,48 +788,48 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
788
788
  isPausedState: !1,
789
789
  currentProgress: M
790
790
  // Immediately set progress
791
- })), d.current = 0, p.setImmediate([M]), e ? (g.current = Date.now() - C * 1e3, u((k) => ({ ...k, isRunning: !0 }))) : g.current = null;
791
+ })), p.current = 0, g.setImmediate([M]), e ? (u.current = Date.now() - C * 1e3, d((k) => ({ ...k, isRunning: !0 }))) : u.current = null;
792
792
  },
793
- [e, p]
794
- ), h = _(
793
+ [e, g]
794
+ ), b = _(
795
795
  (C, M = 0) => {
796
- u((I) => ({ ...I, isRunning: !1 })), g.current = null, u((I) => ({
796
+ d((I) => ({ ...I, isRunning: !1 })), u.current = null, d((I) => ({
797
797
  ...I,
798
798
  currentState: "countdown",
799
799
  maxTime: C,
800
800
  isPausedState: !1
801
- })), d.current = 0;
801
+ })), p.current = 0;
802
802
  const k = Math.max(0, C - M), j = M > 0 ? M / C * 100 : 0;
803
- u((I) => ({
803
+ d((I) => ({
804
804
  ...I,
805
805
  remainingTime: k,
806
806
  currentProgress: j
807
807
  // Immediately set progress
808
- })), p.setImmediate([j]), k === 0 ? (u((I) => ({ ...I, isRunning: !1 })), g.current = null, t && queueMicrotask(() => t())) : e ? setTimeout(() => {
809
- g.current = Date.now() - M * 1e3, u((I) => ({ ...I, isRunning: !0 }));
810
- }, 0) : g.current = null;
808
+ })), g.setImmediate([j]), k === 0 ? (d((I) => ({ ...I, isRunning: !1 })), u.current = null, t && queueMicrotask(() => t())) : e ? setTimeout(() => {
809
+ u.current = Date.now() - M * 1e3, d((I) => ({ ...I, isRunning: !0 }));
810
+ }, 0) : u.current = null;
811
811
  },
812
- [e, t, p]
813
- ), m = _(() => {
814
- u((C) => ({
812
+ [e, t, g]
813
+ ), h = _(() => {
814
+ d((C) => ({
815
815
  ...C,
816
816
  isRunning: !1,
817
817
  currentState: "measured"
818
- })), g.current = null, s(() => {
818
+ })), u.current = null, s(() => {
819
819
  o && o();
820
820
  });
821
821
  }, [s, o]), v = _(() => {
822
- if (g.current && l.isRunning) {
823
- const M = Date.now() - g.current;
824
- d.current += M;
825
- const k = d.current / 1e3, j = po(
822
+ if (u.current && l.isRunning) {
823
+ const M = Date.now() - u.current;
824
+ p.current += M;
825
+ const k = p.current / 1e3, j = po(
826
826
  l.currentState,
827
827
  k,
828
828
  l.maxTime
829
829
  );
830
- p.setTarget([j]);
830
+ g.setTarget([j]);
831
831
  }
832
- u((C) => ({
832
+ d((C) => ({
833
833
  ...C,
834
834
  isRunning: !1,
835
835
  isPausedState: !0
@@ -838,10 +838,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
838
838
  l.isRunning,
839
839
  l.currentState,
840
840
  l.maxTime,
841
- p,
841
+ g,
842
842
  i
843
- ]), b = _(() => {
844
- l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (g.current = Date.now(), u((C) => ({
843
+ ]), x = _(() => {
844
+ l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (u.current = Date.now(), d((C) => ({
845
845
  ...C,
846
846
  isRunning: !0,
847
847
  isPausedState: !1
@@ -852,76 +852,76 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
852
852
  l.currentState
853
853
  ]), T = _(() => l.isPausedState, [l.isPausedState]);
854
854
  return F(() => {
855
- r ? (l.isRunning && !l.isPausedState && (u((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (u((C) => ({ ...C, wasRunningBeforeError: !1 })), b()), c());
855
+ r ? (l.isRunning && !l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !1 })), x()), c());
856
856
  }, [
857
857
  r,
858
858
  l.isRunning,
859
859
  l.isPausedState,
860
860
  l.wasRunningBeforeError,
861
861
  v,
862
- b,
862
+ x,
863
863
  n,
864
864
  c
865
865
  ]), F(() => {
866
866
  if (l.isRunning) {
867
867
  const C = () => {
868
- if (g.current) {
869
- const k = (Date.now() - g.current + d.current) / 1e3;
868
+ if (u.current) {
869
+ const k = (Date.now() - u.current + p.current) / 1e3;
870
870
  if (l.currentState === "countdown" && l.maxTime !== null) {
871
871
  const j = Math.max(0, l.maxTime - k);
872
- u((E) => ({
872
+ d((E) => ({
873
873
  ...E,
874
874
  remainingTime: Math.ceil(j)
875
875
  }));
876
876
  const I = Math.min(100, k / l.maxTime * 100);
877
- if (p.setTarget([I]), j <= 0) {
878
- u((E) => ({
877
+ if (g.setTarget([I]), j <= 0) {
878
+ d((E) => ({
879
879
  ...E,
880
880
  isRunning: !1,
881
881
  remainingTime: 0
882
- })), g.current = null, p.setTarget([100]), t && queueMicrotask(() => t());
882
+ })), u.current = null, g.setTarget([100]), t && queueMicrotask(() => t());
883
883
  return;
884
884
  }
885
885
  } else if (l.currentState === "measuring") {
886
- u((I) => ({
886
+ d((I) => ({
887
887
  ...I,
888
888
  remainingTime: Math.floor(k)
889
889
  }));
890
890
  const j = k / 60 % 1 * 100;
891
- p.setTarget([j]);
891
+ g.setTarget([j]);
892
892
  }
893
- l.isRunning && (f.current = requestAnimationFrame(C));
893
+ l.isRunning && (m.current = requestAnimationFrame(C));
894
894
  }
895
895
  };
896
- f.current = requestAnimationFrame(C);
896
+ m.current = requestAnimationFrame(C);
897
897
  } else
898
- f.current && (cancelAnimationFrame(f.current), f.current = null);
898
+ m.current && (cancelAnimationFrame(m.current), m.current = null);
899
899
  return () => {
900
- f.current && cancelAnimationFrame(f.current);
900
+ m.current && cancelAnimationFrame(m.current);
901
901
  };
902
902
  }, [
903
903
  l.isRunning,
904
904
  t,
905
905
  l.currentState,
906
906
  l.maxTime,
907
- p
907
+ g
908
908
  ]), F(() => {
909
909
  let C = null;
910
910
  const M = () => {
911
- p.update(1 / 60), C = requestAnimationFrame(M);
911
+ g.update(1 / 60), C = requestAnimationFrame(M);
912
912
  };
913
913
  return C = requestAnimationFrame(M), () => {
914
914
  C && cancelAnimationFrame(C);
915
915
  };
916
- }, [p]), {
916
+ }, [g]), {
917
917
  timerState: l,
918
918
  controls: {
919
- startNewCycle: h,
919
+ startNewCycle: b,
920
920
  startMeasuring: y,
921
- setIdle: x,
922
- completeMeasuring: m,
921
+ setIdle: f,
922
+ completeMeasuring: h,
923
923
  pause: v,
924
- resume: b,
924
+ resume: x,
925
925
  isPaused: T
926
926
  }
927
927
  };
@@ -938,36 +938,36 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
938
938
  hasError: s = !1
939
939
  }) => {
940
940
  const l = A(void 0), {
941
- animationState: u,
942
- triggerPauseAnimation: f,
943
- triggerErrorAnimation: g,
944
- clearErrorAnimation: d,
945
- startPulsatingAnimation: p,
946
- stopPulsatingAnimation: x,
941
+ animationState: d,
942
+ triggerPauseAnimation: m,
943
+ triggerErrorAnimation: u,
944
+ clearErrorAnimation: p,
945
+ startPulsatingAnimation: g,
946
+ stopPulsatingAnimation: f,
947
947
  startIdleAnimations: y,
948
- stopIdleAnimations: h,
949
- triggerFadeTransition: m,
948
+ stopIdleAnimations: b,
949
+ triggerFadeTransition: h,
950
950
  setInitialAnimationState: v,
951
- cleanup: b
951
+ cleanup: x
952
952
  } = fo(), { timerState: T, controls: C } = bo({
953
953
  autoStart: r,
954
954
  onCycleEnd: t,
955
955
  onMeasuringComplete: o,
956
956
  hasError: s,
957
- onPauseAnimation: f,
958
- onErrorAnimation: g,
959
- onClearErrorAnimation: d,
960
- onStartPulsating: p
957
+ onPauseAnimation: m,
958
+ onErrorAnimation: u,
959
+ onClearErrorAnimation: p,
960
+ onStartPulsating: g
961
961
  });
962
962
  return F(() => {
963
963
  const M = l.current;
964
- l.current !== void 0 && M !== T.currentState ? (M === "measured" && x(), M === "idle" && h(), m()) : v(), T.currentState === "idle" && y(), l.current = T.currentState;
964
+ l.current !== void 0 && M !== T.currentState ? (M === "measured" && f(), M === "idle" && b(), h()) : v(), T.currentState === "idle" && y(), l.current = T.currentState;
965
965
  }, [
966
966
  T.currentState,
967
- x,
968
- h,
967
+ f,
968
+ b,
969
969
  y,
970
- m,
970
+ h,
971
971
  v
972
972
  ]), F(() => {
973
973
  let M = !0;
@@ -977,11 +977,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
977
977
  return () => {
978
978
  M = !1, clearTimeout(k);
979
979
  };
980
- }, [e, C]), F(() => b, [b]), i === "small" ? /* @__PURE__ */ a(
980
+ }, [e, C]), F(() => x, [x]), i === "small" ? /* @__PURE__ */ a(
981
981
  ho,
982
982
  {
983
983
  timerState: T,
984
- animationState: u,
984
+ animationState: d,
985
985
  hasError: s,
986
986
  compact: n,
987
987
  className: c
@@ -990,7 +990,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
990
990
  mo,
991
991
  {
992
992
  timerState: T,
993
- animationState: u,
993
+ animationState: d,
994
994
  hasError: s,
995
995
  className: c
996
996
  }
@@ -1009,25 +1009,25 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1009
1009
  title: c,
1010
1010
  showCount: s = !0,
1011
1011
  searchPlaceholder: l = "Search programs",
1012
- dataGridProps: u,
1013
- CustomToolbar: f,
1014
- selectFirstByDefault: g = !1,
1015
- sx: d
1012
+ dataGridProps: d,
1013
+ CustomToolbar: m,
1014
+ selectFirstByDefault: u = !1,
1015
+ sx: p
1016
1016
  }) => {
1017
1017
  var j;
1018
- const p = B(), x = ce(), y = A(null), [h, m] = L(null), v = rt(() => e.map(o), [e, o]);
1018
+ const g = B(), f = ce(), y = A(null), [b, h] = L(null), v = rt(() => e.map(o), [e, o]);
1019
1019
  F(() => {
1020
- x.current && v.length > 0 && x.current.autosizeColumns({
1020
+ f.current && v.length > 0 && f.current.autosizeColumns({
1021
1021
  includeOutliers: !0,
1022
1022
  includeHeaders: !0,
1023
1023
  expand: !0,
1024
1024
  columns: t.map((I) => I.field)
1025
1025
  });
1026
- }, [v, t, x]), F(() => {
1027
- if (!y.current || !x.current) return;
1026
+ }, [v, t, f]), F(() => {
1027
+ if (!y.current || !f.current) return;
1028
1028
  const I = new ResizeObserver(() => {
1029
1029
  setTimeout(() => {
1030
- x.current && v.length > 0 && x.current.autosizeColumns({
1030
+ f.current && v.length > 0 && f.current.autosizeColumns({
1031
1031
  includeOutliers: !0,
1032
1032
  includeHeaders: !0,
1033
1033
  expand: !0,
@@ -1038,21 +1038,21 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1038
1038
  return I.observe(y.current), () => {
1039
1039
  I.disconnect();
1040
1040
  };
1041
- }, [x, v.length, t]);
1042
- const b = rt(() => {
1041
+ }, [f, v.length, t]);
1042
+ const x = rt(() => {
1043
1043
  if (i !== void 0)
1044
1044
  return i;
1045
- if (h !== null)
1046
- return h;
1047
- if (g && e.length > 0) {
1045
+ if (b !== null)
1046
+ return b;
1047
+ if (u && e.length > 0) {
1048
1048
  const I = e[0];
1049
- return m(I), I;
1049
+ return h(I), I;
1050
1050
  }
1051
1051
  return null;
1052
- }, [g, e, i, h]), T = (I) => {
1052
+ }, [u, e, i, b]), T = (I) => {
1053
1053
  const E = e.find((V) => o(V).id === I.id);
1054
- E && (i === void 0 && m(E), r && r(E, I));
1055
- }, C = rt(() => !b || !n ? null : n(b), [b, n]);
1054
+ E && (i === void 0 && h(E), r && r(E, I));
1055
+ }, C = rt(() => !x || !n ? null : n(x), [x, n]);
1056
1056
  function M() {
1057
1057
  return /* @__PURE__ */ a(ge, { children: /* @__PURE__ */ S(
1058
1058
  w,
@@ -1288,7 +1288,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1288
1288
  }
1289
1289
  ) });
1290
1290
  }
1291
- const k = f || M;
1291
+ const k = m || M;
1292
1292
  return /* @__PURE__ */ a(
1293
1293
  w,
1294
1294
  {
@@ -1307,7 +1307,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1307
1307
  },
1308
1308
  "&:hover *": {
1309
1309
  scrollbarWidth: "thin",
1310
- scrollbarColor: `${p.palette.divider} transparent`,
1310
+ scrollbarColor: `${g.palette.divider} transparent`,
1311
1311
  "&::-webkit-scrollbar": {
1312
1312
  display: "block",
1313
1313
  width: "8px",
@@ -1317,19 +1317,19 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1317
1317
  background: "transparent"
1318
1318
  },
1319
1319
  "&::-webkit-scrollbar-thumb": {
1320
- background: p.palette.divider,
1320
+ background: g.palette.divider,
1321
1321
  borderRadius: "4px"
1322
1322
  },
1323
1323
  "&::-webkit-scrollbar-thumb:hover": {
1324
- background: p.palette.action.hover
1324
+ background: g.palette.action.hover
1325
1325
  }
1326
1326
  },
1327
- ...d
1327
+ ...p
1328
1328
  },
1329
1329
  children: /* @__PURE__ */ a(
1330
1330
  de,
1331
1331
  {
1332
- apiRef: x,
1332
+ apiRef: f,
1333
1333
  rows: v,
1334
1334
  columns: t,
1335
1335
  onRowClick: T,
@@ -1353,19 +1353,19 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1353
1353
  items: []
1354
1354
  }
1355
1355
  },
1356
- ...u == null ? void 0 : u.initialState
1356
+ ...d == null ? void 0 : d.initialState
1357
1357
  },
1358
- ...u,
1358
+ ...d,
1359
1359
  autosizeOnMount: !0,
1360
1360
  autosizeOptions: {
1361
1361
  // Merge any custom autosize options first
1362
- ...(u == null ? void 0 : u.autosizeOptions) || {},
1362
+ ...(d == null ? void 0 : d.autosizeOptions) || {},
1363
1363
  // Force these key properties to always be true to maintain autosize behavior
1364
1364
  includeOutliers: !0,
1365
1365
  includeHeaders: !0,
1366
1366
  expand: !0,
1367
1367
  // Auto-size all columns by default (can be overridden by dataGridProps)
1368
- columns: ((j = u == null ? void 0 : u.autosizeOptions) == null ? void 0 : j.columns) || t.map((I) => I.field)
1368
+ columns: ((j = d == null ? void 0 : d.autosizeOptions) == null ? void 0 : j.columns) || t.map((I) => I.field)
1369
1369
  },
1370
1370
  sx: {
1371
1371
  border: "none",
@@ -1505,7 +1505,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
1505
1505
  // Remove any remaining MUI background overlays
1506
1506
  "& .MuiBackdrop-root": {},
1507
1507
  "& .MuiModal-backdrop": {},
1508
- ...u == null ? void 0 : u.sx
1508
+ ...d == null ? void 0 : d.sx
1509
1509
  }
1510
1510
  }
1511
1511
  )
@@ -1527,16 +1527,16 @@ const Pt = $(
1527
1527
  activeJoggingDirection: c,
1528
1528
  ...s
1529
1529
  }) => {
1530
- var b, T, C, M, k, j, I;
1530
+ var x, T, C, M, k, j, I;
1531
1531
  pt(() => {
1532
- const E = o(), V = d.current;
1532
+ const E = o(), V = p.current;
1533
1533
  V && (V.textContent = E);
1534
1534
  });
1535
- const l = B(), [u, f] = L(null);
1535
+ const l = B(), [d, m] = L(null);
1536
1536
  F(() => {
1537
1537
  n && v();
1538
1538
  }, [n]);
1539
- const g = c || u, d = A(null);
1539
+ const u = c || d, p = A(null);
1540
1540
  e || (e = {
1541
1541
  color: "#fff",
1542
1542
  backgroundColor: "#000",
@@ -1549,7 +1549,7 @@ const Pt = $(
1549
1549
  },
1550
1550
  labelColor: "#000"
1551
1551
  });
1552
- const p = g ? (b = e.buttonBackgroundColor) == null ? void 0 : b.pressed : e.borderColor, x = {
1552
+ const g = u ? (x = e.buttonBackgroundColor) == null ? void 0 : x.pressed : e.borderColor, f = {
1553
1553
  width: "55px",
1554
1554
  color: e.color,
1555
1555
  path: { fill: e.color },
@@ -1559,7 +1559,7 @@ const Pt = $(
1559
1559
  pointerEvents: "none"
1560
1560
  }
1561
1561
  }, y = {
1562
- ...x,
1562
+ ...f,
1563
1563
  backgroundColor: (T = e.buttonBackgroundColor) == null ? void 0 : T.default,
1564
1564
  ":hover": {
1565
1565
  backgroundColor: (C = e.buttonBackgroundColor) == null ? void 0 : C.hovered
@@ -1573,8 +1573,8 @@ const Pt = $(
1573
1573
  backgroundColor: (k = e.buttonBackgroundColor) == null ? void 0 : k.disabled,
1574
1574
  "svg path": { fill: l.palette.action.disabled }
1575
1575
  }
1576
- }, h = {
1577
- ...x,
1576
+ }, b = {
1577
+ ...f,
1578
1578
  backgroundColor: (j = e.buttonBackgroundColor) == null ? void 0 : j.pressed,
1579
1579
  color: e.backgroundColor,
1580
1580
  path: { fill: e.backgroundColor },
@@ -1583,11 +1583,11 @@ const Pt = $(
1583
1583
  "svg path": { fill: l.palette.action.disabled }
1584
1584
  }
1585
1585
  };
1586
- function m(E, V) {
1587
- n || E.button === 0 && (f(V), r(V));
1586
+ function h(E, V) {
1587
+ n || E.button === 0 && (m(V), r(V));
1588
1588
  }
1589
1589
  function v() {
1590
- f(null), i();
1590
+ m(null), i();
1591
1591
  }
1592
1592
  return /* @__PURE__ */ S(P, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
1593
1593
  /* @__PURE__ */ a(
@@ -1595,16 +1595,16 @@ const Pt = $(
1595
1595
  {
1596
1596
  disabled: n,
1597
1597
  disableRipple: !0,
1598
- onPointerDown: (E) => m(E, "-"),
1598
+ onPointerDown: (E) => h(E, "-"),
1599
1599
  onPointerUp: v,
1600
1600
  onPointerOut: v,
1601
1601
  size: "large",
1602
1602
  sx: {
1603
- ...g === "-" ? h : y,
1603
+ ...u === "-" ? b : y,
1604
1604
  borderRadius: "16px 0px 0px 16px",
1605
- borderLeft: `2px solid ${p ?? "#fff"}`,
1606
- borderBottom: `2px solid ${p ?? "#fff"}`,
1607
- borderTop: `2px solid ${p ?? "#fff"}`
1605
+ borderLeft: `2px solid ${g ?? "#fff"}`,
1606
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1607
+ borderTop: `2px solid ${g ?? "#fff"}`
1608
1608
  },
1609
1609
  children: /* @__PURE__ */ a(_e, {})
1610
1610
  }
@@ -1619,8 +1619,8 @@ const Pt = $(
1619
1619
  alignItems: "center",
1620
1620
  justifyContent: "center",
1621
1621
  opacity: "0.9",
1622
- borderBottom: `2px solid ${p ?? "#fff"}`,
1623
- borderTop: `2px solid ${p ?? "#fff"}`
1622
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1623
+ borderTop: `2px solid ${g ?? "#fff"}`
1624
1624
  },
1625
1625
  children: [
1626
1626
  /* @__PURE__ */ a(
@@ -1655,7 +1655,7 @@ const Pt = $(
1655
1655
  minWidth: "80px",
1656
1656
  textAlign: "center"
1657
1657
  },
1658
- ref: d,
1658
+ ref: p,
1659
1659
  children: o()
1660
1660
  }
1661
1661
  )
@@ -1667,16 +1667,16 @@ const Pt = $(
1667
1667
  {
1668
1668
  disableRipple: !0,
1669
1669
  disabled: n,
1670
- onPointerDown: (E) => m(E, "+"),
1670
+ onPointerDown: (E) => h(E, "+"),
1671
1671
  onPointerUp: v,
1672
1672
  onPointerOut: v,
1673
1673
  size: "large",
1674
1674
  sx: {
1675
- ...g === "+" ? h : y,
1675
+ ...u === "+" ? b : y,
1676
1676
  borderRadius: "0px 16px 16px 0px",
1677
- borderRight: `2px solid ${p ?? "#fff"}`,
1678
- borderBottom: `2px solid ${p ?? "#fff"}`,
1679
- borderTop: `2px solid ${p ?? "#fff"}`
1677
+ borderRight: `2px solid ${g ?? "#fff"}`,
1678
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1679
+ borderTop: `2px solid ${g ?? "#fff"}`
1680
1680
  },
1681
1681
  children: /* @__PURE__ */ a(Pe, {})
1682
1682
  }
@@ -1697,10 +1697,10 @@ const Pt = $(
1697
1697
  ...s
1698
1698
  }) => {
1699
1699
  var M, k, j, I, E, V, Q, ot, xt, yt, St, vt, Ct, wt, Tt;
1700
- const { t: l } = z(), [u, f] = L(), g = B(), d = {
1701
- background: (M = g.palette.backgroundPaperElevation) == null ? void 0 : M[4],
1702
- color: (k = g.palette.backgroundPaperElevation) == null ? void 0 : k[11]
1703
- }, p = Lt(() => ({
1700
+ const { t: l } = z(), [d, m] = L(), u = B(), p = {
1701
+ background: (M = u.palette.backgroundPaperElevation) == null ? void 0 : M[4],
1702
+ color: (k = u.palette.backgroundPaperElevation) == null ? void 0 : k[11]
1703
+ }, g = Lt(() => ({
1704
1704
  activeJoggingDir: null,
1705
1705
  startJogging(O) {
1706
1706
  this.activeJoggingDir = O, e(O);
@@ -1708,26 +1708,26 @@ const Pt = $(
1708
1708
  stopJogging() {
1709
1709
  this.activeJoggingDir = null, t();
1710
1710
  }
1711
- })), x = qe(() => {
1711
+ })), f = qe(() => {
1712
1712
  const O = i ? y(n()) : n();
1713
- (O === void 0 || u === void 0 || Math.abs(u - O) > 1e-9) && f(O);
1713
+ (O === void 0 || d === void 0 || Math.abs(d - O) > 1e-9) && m(O);
1714
1714
  }, 50);
1715
- pt(x);
1715
+ pt(f);
1716
1716
  function y(O) {
1717
1717
  if (O !== void 0)
1718
1718
  return Nt(O);
1719
1719
  }
1720
- function h(O) {
1721
- O.button === 0 && p.startJogging("-");
1720
+ function b(O) {
1721
+ O.button === 0 && g.startJogging("-");
1722
1722
  }
1723
- function m(O) {
1724
- O.button === 0 && p.startJogging("+");
1723
+ function h(O) {
1724
+ O.button === 0 && g.startJogging("+");
1725
1725
  }
1726
1726
  function v(O) {
1727
- p.stopJogging();
1727
+ g.stopJogging();
1728
1728
  }
1729
- function b(O) {
1730
- p.stopJogging();
1729
+ function x(O) {
1730
+ g.stopJogging();
1731
1731
  }
1732
1732
  function T(O, X = 1) {
1733
1733
  if (O === void 0 || Number.isNaN(O)) return "";
@@ -1754,23 +1754,23 @@ const Pt = $(
1754
1754
  sx: {
1755
1755
  "& .MuiIconButton-root": {
1756
1756
  width: "52px",
1757
- color: g.palette.text.primary,
1757
+ color: u.palette.text.primary,
1758
1758
  alignContent: "center",
1759
- backgroundColor: (j = g.palette.backgroundPaperElevation) == null ? void 0 : j[11],
1759
+ backgroundColor: (j = u.palette.backgroundPaperElevation) == null ? void 0 : j[11],
1760
1760
  "& svg": {
1761
1761
  width: "42px",
1762
1762
  height: "42px"
1763
1763
  },
1764
1764
  "&.Mui-disabled": {
1765
- backgroundColor: (I = g.palette.backgroundPaperElevation) == null ? void 0 : I[11],
1766
- color: g.palette.action.disabled,
1765
+ backgroundColor: (I = u.palette.backgroundPaperElevation) == null ? void 0 : I[11],
1766
+ color: u.palette.action.disabled,
1767
1767
  opacity: 1
1768
1768
  },
1769
1769
  "&:hover": {
1770
- backgroundColor: (E = g.palette.backgroundPaperElevation) == null ? void 0 : E[9]
1770
+ backgroundColor: (E = u.palette.backgroundPaperElevation) == null ? void 0 : E[9]
1771
1771
  },
1772
1772
  "&:active": {
1773
- ...d
1773
+ ...p
1774
1774
  }
1775
1775
  }
1776
1776
  },
@@ -1778,21 +1778,21 @@ const Pt = $(
1778
1778
  /* @__PURE__ */ a(
1779
1779
  q,
1780
1780
  {
1781
- onPointerDown: h,
1781
+ onPointerDown: b,
1782
1782
  onPointerUp: v,
1783
- onPointerOut: b,
1783
+ onPointerOut: x,
1784
1784
  disabled: c,
1785
1785
  disableRipple: !0,
1786
1786
  sx: {
1787
1787
  borderRadius: "16px 0px 0px 16px",
1788
- ...p.activeJoggingDir === "-" ? d : {}
1788
+ ...g.activeJoggingDir === "-" ? p : {}
1789
1789
  },
1790
1790
  children: /* @__PURE__ */ a(
1791
1791
  Ue,
1792
1792
  {
1793
1793
  sx: {
1794
1794
  pointerEvents: "none",
1795
- color: (xt = (ot = (Q = (V = g.componentsExt) == null ? void 0 : V.JoggingPanel) == null ? void 0 : Q.JoggingJoint) == null ? void 0 : ot.Joint) == null ? void 0 : xt.arrowColor
1795
+ color: (xt = (ot = (Q = (V = u.componentsExt) == null ? void 0 : V.JoggingPanel) == null ? void 0 : Q.JoggingJoint) == null ? void 0 : ot.Joint) == null ? void 0 : xt.arrowColor
1796
1796
  }
1797
1797
  }
1798
1798
  )
@@ -1809,7 +1809,7 @@ const Pt = $(
1809
1809
  borderLeftWidth: 0,
1810
1810
  borderRightWidth: 0,
1811
1811
  border: "none",
1812
- backgroundColor: (yt = g.palette.backgroundPaperElevation) == null ? void 0 : yt[11],
1812
+ backgroundColor: (yt = u.palette.backgroundPaperElevation) == null ? void 0 : yt[11],
1813
1813
  paddingLeft: "20px",
1814
1814
  paddingRight: "20px",
1815
1815
  zIndex: 1
@@ -1826,9 +1826,9 @@ const Pt = $(
1826
1826
  fontVariantNumeric: "tabular-nums",
1827
1827
  minWidth: "80px",
1828
1828
  textAlign: "center",
1829
- color: c ? g.palette.action.disabled : g.palette.text.primary
1829
+ color: c ? u.palette.action.disabled : u.palette.text.primary
1830
1830
  },
1831
- children: i ? T(u) : C(u)
1831
+ children: i ? T(d) : C(d)
1832
1832
  }
1833
1833
  ),
1834
1834
  /* @__PURE__ */ a(
@@ -1838,7 +1838,7 @@ const Pt = $(
1838
1838
  "aria-label": "Joint position",
1839
1839
  min: i ? y(o) : o,
1840
1840
  max: i ? y(r) : r,
1841
- value: u || 0,
1841
+ value: d || 0,
1842
1842
  track: !1,
1843
1843
  sx: {
1844
1844
  "& .MuiSlider-mark": {
@@ -1848,15 +1848,15 @@ const Pt = $(
1848
1848
  width: "5px",
1849
1849
  height: "12px",
1850
1850
  borderRadius: "2px",
1851
- color: c ? g.palette.action.disabled : g.palette.text.primary
1851
+ color: c ? u.palette.action.disabled : u.palette.text.primary
1852
1852
  },
1853
1853
  "& .MuiSlider-markLabel": {
1854
1854
  top: "20px",
1855
1855
  fontSize: "12px",
1856
- color: c ? g.palette.action.disabled : g.palette.text.secondary
1856
+ color: c ? u.palette.action.disabled : u.palette.text.secondary
1857
1857
  },
1858
1858
  "& .MuiSlider-rail": {
1859
- backgroundColor: (St = g.palette.backgroundPaperElevation) == null ? void 0 : St[5],
1859
+ backgroundColor: (St = u.palette.backgroundPaperElevation) == null ? void 0 : St[5],
1860
1860
  opacity: 1
1861
1861
  }
1862
1862
  },
@@ -1878,21 +1878,21 @@ const Pt = $(
1878
1878
  /* @__PURE__ */ a(
1879
1879
  q,
1880
1880
  {
1881
- onPointerDown: m,
1881
+ onPointerDown: h,
1882
1882
  onPointerUp: v,
1883
- onPointerOut: b,
1883
+ onPointerOut: x,
1884
1884
  disabled: c,
1885
1885
  disableRipple: !0,
1886
1886
  sx: {
1887
1887
  borderRadius: "0px 16px 16px 0px",
1888
- ...p.activeJoggingDir === "+" ? d : {}
1888
+ ...g.activeJoggingDir === "+" ? p : {}
1889
1889
  },
1890
1890
  children: /* @__PURE__ */ a(
1891
1891
  He,
1892
1892
  {
1893
1893
  sx: {
1894
1894
  pointerEvents: "none",
1895
- color: (Tt = (wt = (Ct = (vt = g.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : Ct.JoggingJoint) == null ? void 0 : wt.Joint) == null ? void 0 : Tt.arrowColor
1895
+ color: (Tt = (wt = (Ct = (vt = u.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : Ct.JoggingJoint) == null ? void 0 : wt.Joint) == null ? void 0 : Tt.arrowColor
1896
1896
  }
1897
1897
  }
1898
1898
  )
@@ -1947,81 +1947,86 @@ function vo(e, t) {
1947
1947
  }
1948
1948
  const Ot = 1e-4;
1949
1949
  class ht {
1950
- constructor(t, o, r, i, n, c) {
1951
- this.nova = t, this.controller = o, this.motionGroup = r, this.description = i, this.initialMotionState = n, this.motionStateSocket = c, this.rapidlyChangingMotionState = n, c.addEventListener("message", (s) => {
1952
- var g;
1953
- const l = (g = W(s.data)) == null ? void 0 : g.result;
1954
- if (!l)
1950
+ constructor(t, o, r, i, n, c, s) {
1951
+ this.nova = t, this.cellId = o, this.controller = r, this.motionGroup = i, this.description = n, this.initialMotionState = c, this.motionStateSocket = s, this.rapidlyChangingMotionState = c, s.addEventListener("message", (l) => {
1952
+ var p;
1953
+ const d = (p = W(l.data)) == null ? void 0 : p.result;
1954
+ if (!d)
1955
1955
  throw new Error(
1956
- `Failed to get motion state for ${this.motionGroupId}: ${s.data}`
1956
+ `Failed to get motion state for ${this.motionGroupId}: ${l.data}`
1957
1957
  );
1958
1958
  Ut(
1959
1959
  this.rapidlyChangingMotionState.joint_position,
1960
- l.joint_position,
1960
+ d.joint_position,
1961
1961
  Ot
1962
1962
  ) || D(() => {
1963
- this.rapidlyChangingMotionState.joint_position = l.joint_position;
1963
+ this.rapidlyChangingMotionState.joint_position = d.joint_position;
1964
1964
  }), Ht(
1965
1965
  this.rapidlyChangingMotionState,
1966
- l,
1966
+ d,
1967
1967
  Ot
1968
1968
  ) || D(() => {
1969
- var d, p, x;
1970
- this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose : (d = l.tcp_pose) != null && d.orientation && ((p = l.tcp_pose) != null && p.position) && ((x = this.rapidlyChangingMotionState.tcp_pose) != null && x.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
1971
- position: l.tcp_pose.position,
1969
+ var g, f, y;
1970
+ this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = d.tcp_pose : (g = d.tcp_pose) != null && g.orientation && ((f = d.tcp_pose) != null && f.position) && ((y = this.rapidlyChangingMotionState.tcp_pose) != null && y.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
1971
+ position: d.tcp_pose.position,
1972
1972
  orientation: vo(
1973
- l.tcp_pose.orientation,
1973
+ d.tcp_pose.orientation,
1974
1974
  this.rapidlyChangingMotionState.tcp_pose.orientation
1975
1975
  )
1976
1976
  } : console.warn(
1977
1977
  "Received incomplete tcp_pose, ignoring",
1978
- l.tcp_pose
1978
+ d.tcp_pose
1979
1979
  );
1980
- }), l.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== l.tcp && D(() => {
1981
- this.rapidlyChangingMotionState.tcp = l.tcp;
1982
- }), this.rapidlyChangingMotionState.standstill !== l.standstill && D(() => {
1983
- this.rapidlyChangingMotionState.standstill = l.standstill;
1980
+ }), d.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== d.tcp && D(() => {
1981
+ this.rapidlyChangingMotionState.tcp = d.tcp;
1982
+ }), this.rapidlyChangingMotionState.standstill !== d.standstill && D(() => {
1983
+ this.rapidlyChangingMotionState.standstill = d.standstill;
1984
1984
  });
1985
- const u = this.rapidlyChangingMotionState.joint_limit_reached.limit_reached, f = l.joint_limit_reached.limit_reached;
1986
- u.some((d, p) => d !== f[p]) && D(() => {
1987
- this.rapidlyChangingMotionState.joint_limit_reached = l.joint_limit_reached;
1988
- }), this.rapidlyChangingMotionState.execute !== l.execute && D(() => {
1989
- this.rapidlyChangingMotionState.execute = l.execute;
1985
+ const m = this.rapidlyChangingMotionState.joint_limit_reached.limit_reached, u = d.joint_limit_reached.limit_reached;
1986
+ m.some((g, f) => g !== u[f]) && D(() => {
1987
+ this.rapidlyChangingMotionState.joint_limit_reached = d.joint_limit_reached;
1988
+ }), this.rapidlyChangingMotionState.execute !== d.execute && D(() => {
1989
+ this.rapidlyChangingMotionState.execute = d.execute;
1990
1990
  });
1991
1991
  }), mt(this);
1992
1992
  }
1993
- static async open(t, o) {
1993
+ static async open(t, o, r = {}) {
1994
1994
  var g;
1995
- const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
1996
- (d) => d.motion_group === o
1995
+ const i = r.cellId ?? "cell", [n, c] = o.split("@"), s = await t.api.controller.getCurrentRobotControllerState(
1996
+ i,
1997
+ c
1998
+ ), l = s == null ? void 0 : s.motion_groups.find(
1999
+ (f) => f.motion_group === o
1997
2000
  );
1998
- if (!n || !c)
2001
+ if (!s || !l)
1999
2002
  throw new Error(
2000
- `Controller ${i} or motion group ${o} not found`
2003
+ `Controller ${c} or motion group ${o} not found`
2001
2004
  );
2002
- const s = t.openReconnectingWebsocket(
2003
- `/controllers/${i}/motion-groups/${o}/state-stream`
2004
- ), l = await s.firstMessage(), u = (g = W(l.data)) == null ? void 0 : g.result;
2005
+ const d = t.openReconnectingWebsocket(
2006
+ `/cells/${i}/controllers/${c}/motion-groups/${o}/state-stream`
2007
+ ), m = await d.firstMessage(), u = (g = W(m.data)) == null ? void 0 : g.result;
2005
2008
  if (!u)
2006
2009
  throw new Error(
2007
- `Unable to parse initial motion state message ${l.data}`
2010
+ `Unable to parse initial motion state message ${m.data}`
2008
2011
  );
2009
2012
  console.log(
2010
- `Connected motion state websocket to motion group ${c.motion_group}. Initial state:
2013
+ `Connected motion state websocket to motion group ${l.motion_group}. Initial state:
2011
2014
  `,
2012
2015
  u
2013
2016
  );
2014
- const f = await t.api.motionGroup.getMotionGroupDescription(
2017
+ const p = await t.api.motionGroup.getMotionGroupDescription(
2015
2018
  i,
2016
- c.motion_group
2019
+ c,
2020
+ l.motion_group
2017
2021
  );
2018
2022
  return new ht(
2019
2023
  t,
2020
- n,
2021
- c,
2022
- f,
2024
+ i,
2025
+ s,
2026
+ l,
2027
+ p,
2023
2028
  u,
2024
- s
2029
+ d
2025
2030
  );
2026
2031
  }
2027
2032
  get motionGroupId() {
@@ -2062,7 +2067,13 @@ class ft {
2062
2067
  * @returns Promise resolving to initialized JoggerConnection instance
2063
2068
  */
2064
2069
  static async open(t, o, r = {}) {
2065
- const i = await ht.open(t, o), n = new ft(i, r);
2070
+ const i = await ht.open(
2071
+ t,
2072
+ o,
2073
+ {
2074
+ cellId: r.cellId
2075
+ }
2076
+ ), n = new ft(i, r);
2066
2077
  return await n.setJoggingMode(n.mode), n;
2067
2078
  }
2068
2079
  getDefaultTcp(t) {
@@ -2080,6 +2091,9 @@ class ft {
2080
2091
  get nova() {
2081
2092
  return this.motionStream.nova;
2082
2093
  }
2094
+ get cellId() {
2095
+ return this.motionStream.cellId;
2096
+ }
2083
2097
  get numJoints() {
2084
2098
  return this.motionStream.joints.length;
2085
2099
  }
@@ -2129,9 +2143,9 @@ class ft {
2129
2143
  );
2130
2144
  }, this.timeout);
2131
2145
  this.joggingSocket = this.nova.openReconnectingWebsocket(
2132
- `/controllers/${this.motionStream.controllerId}/execution/jogging`
2146
+ `/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/jogging`
2133
2147
  ), this.joggingSocket.addEventListener("message", (i) => {
2134
- var c, s, l, u;
2148
+ var c, s, l, d;
2135
2149
  const n = W(i.data);
2136
2150
  if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
2137
2151
  clearTimeout(r), t();
@@ -2139,7 +2153,7 @@ class ft {
2139
2153
  }
2140
2154
  if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
2141
2155
  if (clearTimeout(r), this.onBlocked && ((l = n == null ? void 0 : n.result) != null && l.message.includes(Dt))) {
2142
- (u = this.joggingSocket) == null || u.dispose(), this.onBlocked();
2156
+ (d = this.joggingSocket) == null || d.dispose(), this.onBlocked();
2143
2157
  return;
2144
2158
  } else this.onError ? this.onError(i.data) : o(new Error(i.data));
2145
2159
  }), this.joggingSocket.sendJson({
@@ -2234,15 +2248,15 @@ class ft {
2234
2248
  throw new Error(
2235
2249
  "Current pose has no position, cannot perform translation"
2236
2250
  );
2237
- const h = [...t.position];
2238
- h[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
2251
+ const b = [...t.position];
2252
+ b[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
2239
2253
  limits_override: {
2240
2254
  tcp_velocity_limit: r
2241
2255
  },
2242
2256
  path: {
2243
2257
  path_definition_name: "PathLine",
2244
2258
  target_pose: {
2245
- position: h,
2259
+ position: b,
2246
2260
  orientation: t.orientation
2247
2261
  }
2248
2262
  }
@@ -2252,13 +2266,13 @@ class ft {
2252
2266
  throw new Error(
2253
2267
  "Current pose has no orientation, cannot perform rotation"
2254
2268
  );
2255
- const h = new ct(
2269
+ const b = new ct(
2256
2270
  t.orientation[0],
2257
2271
  t.orientation[1],
2258
2272
  t.orientation[2]
2259
- ), m = h.length(), v = h.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1), T = new ct(0, 0, 0);
2273
+ ), h = b.length(), v = b.clone().normalize(), x = c.distanceRads * (n === "-" ? -1 : 1), T = new ct(0, 0, 0);
2260
2274
  T[i] = 1;
2261
- const C = Math.cos(0.5 * b) * Math.cos(0.5 * m), M = Math.sin(0.5 * b) * Math.sin(0.5 * m), k = Math.sin(0.5 * b) * Math.cos(0.5 * m), j = Math.cos(0.5 * b) * Math.sin(0.5 * m), I = T.dot(
2275
+ const C = Math.cos(0.5 * x) * Math.cos(0.5 * h), M = Math.sin(0.5 * x) * Math.sin(0.5 * h), k = Math.sin(0.5 * x) * Math.cos(0.5 * h), j = Math.cos(0.5 * x) * Math.sin(0.5 * h), I = T.dot(
2262
2276
  v
2263
2277
  ), E = T.clone().cross(v), V = 2 * Math.acos(C - M * I), Q = V / Math.sin(0.5 * V), ot = new ct().addScaledVector(E, M).addScaledVector(T, k).addScaledVector(v, j).multiplyScalar(Q);
2264
2278
  s.push({
@@ -2281,35 +2295,36 @@ class ft {
2281
2295
  );
2282
2296
  return;
2283
2297
  }
2284
- const u = {
2298
+ const d = {
2285
2299
  motion_group_model: l.motion_group_model,
2286
2300
  cycle_time: l.cycle_time,
2287
2301
  mounting: l.mounting,
2288
2302
  // tcp_offset: description.tcp_offset, TODO: implement tcp_offset handling
2289
2303
  // FIXME use proper mode's limits if set
2290
2304
  global: l.operation_limits.auto_limits
2291
- }, f = await this.nova.api.trajectoryPlanning.planTrajectory(
2305
+ }, m = await this.nova.api.trajectoryPlanning.planTrajectory(
2306
+ this.cellId,
2292
2307
  {
2293
- motion_group_setup: u,
2308
+ motion_group_setup: d,
2294
2309
  start_joint_position: o,
2295
2310
  motion_commands: s
2296
2311
  }
2297
- ), g = f.response;
2298
- if (!g)
2312
+ ), u = m.response;
2313
+ if (!u)
2299
2314
  throw new Error(
2300
- `Failed to plan jogging increment motion ${JSON.stringify(f)}`
2315
+ `Failed to plan jogging increment motion ${JSON.stringify(m)}`
2301
2316
  );
2302
2317
  this.trajectorySocket && (console.warn("Trajectory jogging websocket already open; will close"), this.trajectorySocket.dispose()), this.trajectorySocket = this.nova.openReconnectingWebsocket(
2303
- `/controllers/${this.motionStream.controllerId}/execution/trajectory`
2318
+ `/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`
2304
2319
  );
2305
- const d = (h) => {
2306
- var m;
2307
- if (!h || h.add_trajectory_error || h.message)
2320
+ const p = (b) => {
2321
+ var h;
2322
+ if (!b || b.add_trajectory_error || b.message)
2308
2323
  if (this.onError)
2309
- this.onError(h);
2324
+ this.onError(b);
2310
2325
  else
2311
2326
  throw new Error(
2312
- ((m = h == null ? void 0 : h.add_trajectory_error) == null ? void 0 : m.message) || (h == null ? void 0 : h.message) || "Failed to execute trajectory, unknown error"
2327
+ ((h = b == null ? void 0 : b.add_trajectory_error) == null ? void 0 : h.message) || (b == null ? void 0 : b.message) || "Failed to execute trajectory, unknown error"
2313
2328
  );
2314
2329
  if (!this.trajectorySocket)
2315
2330
  throw new Error(
@@ -2319,54 +2334,54 @@ class ft {
2319
2334
  message_type: "StartMovementRequest",
2320
2335
  direction: "DIRECTION_FORWARD"
2321
2336
  });
2322
- }, p = async () => {
2323
- var h;
2324
- await at(() => !this.motionStream.rapidlyChangingMotionState.standstill), await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (h = this.trajectorySocket) == null || h.dispose(), this.trajectorySocket = null;
2325
- }, x = async () => {
2326
- var h;
2327
- await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (h = this.trajectorySocket) == null || h.dispose(), this.trajectorySocket = null;
2328
- }, y = async (h) => {
2329
- if (h != null && h.message)
2337
+ }, g = async () => {
2338
+ var b;
2339
+ await at(() => !this.motionStream.rapidlyChangingMotionState.standstill), await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (b = this.trajectorySocket) == null || b.dispose(), this.trajectorySocket = null;
2340
+ }, f = async () => {
2341
+ var b;
2342
+ await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (b = this.trajectorySocket) == null || b.dispose(), this.trajectorySocket = null;
2343
+ }, y = async (b) => {
2344
+ if (b != null && b.message)
2330
2345
  if (this.onError) {
2331
- this.onError(h);
2346
+ this.onError(b);
2332
2347
  return;
2333
2348
  } else
2334
2349
  throw new Error(
2335
- h.message || "Failed to execute trajectory, unknown error"
2350
+ b.message || "Failed to execute trajectory, unknown error"
2336
2351
  );
2337
- this.motionStream.rapidlyChangingMotionState.standstill ? await p() : await x();
2352
+ this.motionStream.rapidlyChangingMotionState.standstill ? await g() : await f();
2338
2353
  };
2339
- this.trajectorySocket.addEventListener("message", (h) => {
2340
- var v, b;
2341
- const m = W(h.data);
2342
- if (!((v = m == null ? void 0 : m.result) != null && v.kind))
2354
+ this.trajectorySocket.addEventListener("message", (b) => {
2355
+ var v, x;
2356
+ const h = W(b.data);
2357
+ if (!((v = h == null ? void 0 : h.result) != null && v.kind))
2343
2358
  throw new Error(
2344
- `Failed to execute trajectory: Received invalid message ${h.data}`
2359
+ `Failed to execute trajectory: Received invalid message ${b.data}`
2345
2360
  );
2346
- if (this.onBlocked && ((b = m.result.message) != null && b.includes(Dt))) {
2361
+ if (this.onBlocked && ((x = h.result.message) != null && x.includes(Dt))) {
2347
2362
  this.onBlocked();
2348
2363
  return;
2349
2364
  }
2350
- if (m.result.kind === "INITIALIZE_RECEIVED")
2351
- d(m.result);
2352
- else if (m.result.kind === "START_RECEIVED")
2353
- y(m);
2354
- else if (m.result.kind !== "PAUSE_RECEIVED") if (m.result.kind === "MOTION_ERROR" && m.result.message)
2365
+ if (h.result.kind === "INITIALIZE_RECEIVED")
2366
+ p(h.result);
2367
+ else if (h.result.kind === "START_RECEIVED")
2368
+ y(h);
2369
+ else if (h.result.kind !== "PAUSE_RECEIVED") if (h.result.kind === "MOTION_ERROR" && h.result.message)
2355
2370
  if (this.onError) {
2356
- this.onError(m);
2371
+ this.onError(h);
2357
2372
  return;
2358
2373
  } else
2359
- throw new Error(m.result.message);
2374
+ throw new Error(h.result.message);
2360
2375
  else
2361
2376
  throw new Error(
2362
- `Failed to execute trajectory, cannot handle message type "${m.result.kind}"`
2377
+ `Failed to execute trajectory, cannot handle message type "${h.result.kind}"`
2363
2378
  );
2364
2379
  }), this.trajectorySocket.sendJson({
2365
2380
  message_type: "InitializeMovementRequest",
2366
2381
  trajectory: {
2367
2382
  message_type: "TrajectoryData",
2368
2383
  motion_group: this.motionGroupId,
2369
- data: g,
2384
+ data: u,
2370
2385
  tcp: this.tcp
2371
2386
  }
2372
2387
  });
@@ -2546,18 +2561,18 @@ class bt {
2546
2561
  constructor(t, o, r, i, n) {
2547
2562
  var c, s, l;
2548
2563
  this.jogger = t, this.coordSystems = o, this.motionGroupDescription = r, this.tcps = i, this.inverseSolverValue = n, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = G.RevoluteJoint;
2549
- for (const u of o)
2550
- if (u.coordinate_system === "") {
2551
- u.coordinate_system = "world";
2564
+ for (const d of o)
2565
+ if (d.coordinate_system === "") {
2566
+ d.coordinate_system = "world";
2552
2567
  break;
2553
2568
  }
2554
2569
  this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = n, this.jointType = ((l = (s = r == null ? void 0 : r.dh_parameters) == null ? void 0 : s[0]) == null ? void 0 : l.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
2555
2570
  this.block();
2556
2571
  }, this.loadFromLocalStorage(), this.disposers.push(kt(() => this.saveToLocalStorage())), this.disposers.push(
2557
2572
  kt(() => {
2558
- const u = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
2559
- u && u !== this.selectedTcpId && D(() => {
2560
- this.selectedTcpId = u, this.tcpChangeInProgress = !1;
2573
+ const d = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
2574
+ d && d !== this.selectedTcpId && D(() => {
2575
+ this.selectedTcpId = d, this.tcpChangeInProgress = !1;
2561
2576
  });
2562
2577
  })
2563
2578
  ), window.joggingStore = this;
@@ -2567,31 +2582,33 @@ class bt {
2567
2582
  * from the backend
2568
2583
  */
2569
2584
  static async loadFor(t) {
2570
- const { nova: o } = t, [r, i] = await Promise.all([
2585
+ const { nova: o, cellId: r } = t, [i, n] = await Promise.all([
2571
2586
  // Fetch coord systems so user can select between them
2572
2587
  o.api.controller.listCoordinateSystems(
2588
+ r,
2573
2589
  t.motionStream.controllerId,
2574
2590
  "ROTATION_VECTOR"
2575
2591
  ),
2576
2592
  // Same for TCPs and other info from description
2577
2593
  o.api.motionGroup.getMotionGroupDescription(
2594
+ r,
2578
2595
  t.motionStream.controllerId,
2579
2596
  t.motionGroupId
2580
2597
  )
2581
- ]), n = await o.api.motionGroupModels.getMotionGroupKinematicModel(
2582
- i.motion_group_model
2583
- ), c = Object.entries(i.tcps || {}).map(([s, l]) => ({
2584
- id: s,
2585
- readable_name: l.name,
2586
- position: l.pose.position,
2587
- orientation: l.pose.orientation
2598
+ ]), c = await o.api.motionGroupModels.getMotionGroupKinematicModel(
2599
+ n.motion_group_model
2600
+ ), s = Object.entries(n.tcps || {}).map(([l, d]) => ({
2601
+ id: l,
2602
+ readable_name: d.name,
2603
+ position: d.pose.position,
2604
+ orientation: d.pose.orientation
2588
2605
  }));
2589
2606
  return new bt(
2590
2607
  t,
2591
- r || [],
2592
- i,
2593
- c,
2594
- n.inverse_solver
2608
+ i || [],
2609
+ n,
2610
+ s,
2611
+ c.inverse_solver
2595
2612
  );
2596
2613
  }
2597
2614
  dispose() {
@@ -2705,7 +2722,7 @@ class bt {
2705
2722
  this.selectedCoordSystemId = t;
2706
2723
  }
2707
2724
  /**
2708
- * @deprecated Use {@link requestTcpChange} instead. This method now delegates
2725
+ * @deprecated Use {@link JoggingStore.requestTcpChange} instead. This method now delegates
2709
2726
  * to `requestTcpChange` which properly communicates the TCP change to the server.
2710
2727
  */
2711
2728
  setSelectedTcpId(t) {
@@ -2719,20 +2736,22 @@ class bt {
2719
2736
  *
2720
2737
  * If the jogger is actively jogging, the websocket is reinitialised with the new TCP.
2721
2738
  * If the jogger is idle, a jogging websocket is briefly opened to communicate the
2722
- * TCP change, then closed again.
2739
+ * TCP change. The websocket is kept open until the state-stream confirms the
2740
+ * change (or a 1s timeout), to ensure the backend has time to process it.
2723
2741
  */
2724
2742
  async requestTcpChange(t) {
2725
2743
  if (t === this.selectedTcpId) return;
2726
2744
  this.tcpChangeInProgress = !0;
2727
2745
  const o = this.jogger.tcp, r = this.jogger.mode !== "jogging";
2728
2746
  try {
2729
- this.jogger.tcp = t, r ? (await this.jogger.setJoggingMode("jogging"), await this.jogger.setJoggingMode("off")) : await this.jogger.setJoggingMode("jogging", !1);
2730
- const i = await this.waitForTcpConfirmation(t, 1e4);
2731
- D(() => {
2747
+ this.jogger.tcp = t, r ? await this.jogger.setJoggingMode("jogging") : await this.jogger.setJoggingMode("jogging", !1);
2748
+ let i = await this.waitForTcpConfirmation(t, 1e3);
2749
+ r && await this.jogger.setJoggingMode("off"), i || (i = await this.waitForTcpConfirmation(t, 2e3)), D(() => {
2732
2750
  i ? this.selectedTcpId = t : (this.jogger.tcp = o, this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "");
2733
2751
  });
2734
2752
  } catch (i) {
2735
- throw D(() => {
2753
+ throw r && await this.jogger.setJoggingMode("off").catch(() => {
2754
+ }), D(() => {
2736
2755
  this.jogger.tcp = o, this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "";
2737
2756
  }), i;
2738
2757
  } finally {
@@ -2926,8 +2945,8 @@ const Ro = J(
2926
2945
  }), Eo = J((e) => {
2927
2946
  var n, c, s;
2928
2947
  const t = B(), { store: o } = e, { t: r } = z();
2929
- function i(l, u) {
2930
- u === e.velocity || !Ge(u) || e.onVelocityChange(u, e.useDegree);
2948
+ function i(l, d) {
2949
+ d === e.velocity || !Ge(d) || e.onVelocityChange(d, e.useDegree);
2931
2950
  }
2932
2951
  return /* @__PURE__ */ S(
2933
2952
  P,
@@ -3084,29 +3103,29 @@ const Zt = J(
3084
3103
  children: t
3085
3104
  }) => {
3086
3105
  const { t: o } = z(), r = B();
3087
- function i(d, p) {
3088
- (p === "translate" || p === "rotate") && e.setSelectedCartesianMotionType(p);
3106
+ function i(p, g) {
3107
+ (g === "translate" || g === "rotate") && e.setSelectedCartesianMotionType(g);
3089
3108
  }
3090
- async function n(d, p) {
3091
- const x = await e.activate(), y = x.motionStream.rapidlyChangingMotionState.tcp_pose, h = x.motionStream.rapidlyChangingMotionState.joint_position;
3109
+ async function n(p, g) {
3110
+ const f = await e.activate(), y = f.motionStream.rapidlyChangingMotionState.tcp_pose, b = f.motionStream.rapidlyChangingMotionState.joint_position;
3092
3111
  y && await e.withMotionLock(async () => {
3093
3112
  try {
3094
3113
  e.setCurrentIncrementJog({
3095
- axis: d.axis,
3096
- direction: d.direction
3114
+ axis: p.axis,
3115
+ direction: p.direction
3097
3116
  }), await e.jogger.runIncrementalCartesianMotion({
3098
3117
  currentTcpPose: y,
3099
- currentJoints: h,
3118
+ currentJoints: b,
3100
3119
  coordSystemId: e.activeCoordSystemId,
3101
3120
  velocityInRelevantUnits: e.selectedCartesianMotionType === "translate" ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec,
3102
- axis: d.axis,
3103
- direction: d.direction,
3121
+ axis: p.axis,
3122
+ direction: p.direction,
3104
3123
  motion: e.selectedCartesianMotionType === "translate" ? {
3105
3124
  type: "translate",
3106
- distanceMm: p.mm
3125
+ distanceMm: g.mm
3107
3126
  } : {
3108
3127
  type: "rotate",
3109
- distanceRads: Ie(p.degrees)
3128
+ distanceRads: Ie(g.degrees)
3110
3129
  }
3111
3130
  });
3112
3131
  } finally {
@@ -3114,17 +3133,17 @@ const Zt = J(
3114
3133
  }
3115
3134
  });
3116
3135
  }
3117
- async function c(d) {
3136
+ async function c(p) {
3118
3137
  if (!e.isLocked) {
3119
3138
  if (await e.activate(), e.activeDiscreteIncrement)
3120
- return n(d, e.activeDiscreteIncrement);
3121
- d.motionType === "translate" ? await e.jogger.translateTCP({
3122
- axis: d.axis,
3123
- direction: d.direction,
3139
+ return n(p, e.activeDiscreteIncrement);
3140
+ p.motionType === "translate" ? await e.jogger.translateTCP({
3141
+ axis: p.axis,
3142
+ direction: p.direction,
3124
3143
  velocityMmPerSec: e.translationVelocityMmPerSec
3125
3144
  }) : await e.jogger.rotateTCP({
3126
- axis: d.axis,
3127
- direction: d.direction,
3145
+ axis: p.axis,
3146
+ direction: p.direction,
3128
3147
  velocityRadsPerSec: e.rotationVelocityRadsPerSec
3129
3148
  });
3130
3149
  }
@@ -3132,13 +3151,13 @@ const Zt = J(
3132
3151
  async function s() {
3133
3152
  e.isLocked || e.activeDiscreteIncrement || await e.deactivate();
3134
3153
  }
3135
- function l(d, p, x) {
3136
- var h, m, v;
3137
- const y = (v = (m = (h = x.componentsExt) == null ? void 0 : h.JoggingPanel) == null ? void 0 : m.JoggingCartesian) == null ? void 0 : v.Axis;
3154
+ function l(p, g, f) {
3155
+ var b, h, v;
3156
+ const y = (v = (h = (b = f.componentsExt) == null ? void 0 : b.JoggingPanel) == null ? void 0 : h.JoggingCartesian) == null ? void 0 : v.Axis;
3138
3157
  if (y)
3139
- return p === "translate" ? y[d] : y.CustomRotation ?? y[d];
3158
+ return g === "translate" ? y[p] : y.CustomRotation ?? y[p];
3140
3159
  }
3141
- const u = [
3160
+ const d = [
3142
3161
  {
3143
3162
  id: "x",
3144
3163
  icon: /* @__PURE__ */ a(Oe, {}),
@@ -3155,12 +3174,12 @@ const Zt = J(
3155
3174
  colors: l("Z", e.selectedCartesianMotionType, r)
3156
3175
  }
3157
3176
  ];
3158
- function f(d) {
3159
- return o("General.mm.variable", { amount: d.toFixed(1) });
3177
+ function m(p) {
3178
+ return o("General.mm.variable", { amount: p.toFixed(1) });
3160
3179
  }
3161
- function g(d) {
3180
+ function u(p) {
3162
3181
  return o("General.degree.variable", {
3163
- amount: Nt(d).toFixed(1)
3182
+ amount: Nt(p).toFixed(1)
3164
3183
  });
3165
3184
  }
3166
3185
  return /* @__PURE__ */ S(
@@ -3219,55 +3238,55 @@ const Zt = J(
3219
3238
  ]
3220
3239
  }
3221
3240
  ),
3222
- e.selectedCartesianMotionType === "translate" && u.map((d) => {
3223
- var p, x;
3241
+ e.selectedCartesianMotionType === "translate" && d.map((p) => {
3242
+ var g, f;
3224
3243
  return /* @__PURE__ */ a(
3225
3244
  Pt,
3226
3245
  {
3227
- "data-testid": `jogging-cartesian-axis-control-${d.id}`,
3228
- "aria-label": `jogging-cartesian-axis-control-${d.id}`,
3229
- colors: d.colors,
3246
+ "data-testid": `jogging-cartesian-axis-control-${p.id}`,
3247
+ "aria-label": `jogging-cartesian-axis-control-${p.id}`,
3248
+ colors: p.colors,
3230
3249
  disabled: e.isLocked,
3231
- activeJoggingDirection: ((p = e.incrementJogInProgress) == null ? void 0 : p.axis) === d.id ? e.incrementJogInProgress.direction : void 0,
3250
+ activeJoggingDirection: ((g = e.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? e.incrementJogInProgress.direction : void 0,
3232
3251
  label: /* @__PURE__ */ S(et, { children: [
3233
- d.icon,
3252
+ p.icon,
3234
3253
  /* @__PURE__ */ a(
3235
3254
  R,
3236
3255
  {
3237
3256
  sx: {
3238
3257
  fontSize: "24px",
3239
- color: ((x = d.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3258
+ color: ((f = p.colors) == null ? void 0 : f.labelColor) ?? r.palette.text.primary
3240
3259
  },
3241
- children: d.id.toUpperCase()
3260
+ children: p.id.toUpperCase()
3242
3261
  }
3243
3262
  )
3244
3263
  ] }),
3245
3264
  getDisplayedValue: () => {
3246
- var y, h;
3247
- return f(
3248
- ((h = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : h[tt[d.id]]) || 0
3265
+ var y, b;
3266
+ return m(
3267
+ ((b = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : b[tt[p.id]]) || 0
3249
3268
  );
3250
3269
  },
3251
3270
  startJogging: (y) => c({
3252
- axis: d.id,
3271
+ axis: p.id,
3253
3272
  motionType: "translate",
3254
3273
  direction: y
3255
3274
  }),
3256
3275
  stopJogging: s
3257
3276
  },
3258
- d.id
3277
+ p.id
3259
3278
  );
3260
3279
  }),
3261
- e.selectedCartesianMotionType === "rotate" && u.map((d) => {
3262
- var p, x;
3280
+ e.selectedCartesianMotionType === "rotate" && d.map((p) => {
3281
+ var g, f;
3263
3282
  return /* @__PURE__ */ a(
3264
3283
  Pt,
3265
3284
  {
3266
- "data-testid": `jogging-cartesian-axis-control-${d.id}`,
3267
- "aria-label": `jogging-cartesian-axis-control-${d.id}`,
3268
- colors: d.colors,
3285
+ "data-testid": `jogging-cartesian-axis-control-${p.id}`,
3286
+ "aria-label": `jogging-cartesian-axis-control-${p.id}`,
3287
+ colors: p.colors,
3269
3288
  disabled: e.isLocked,
3270
- activeJoggingDirection: ((p = e.incrementJogInProgress) == null ? void 0 : p.axis) === d.id ? e.incrementJogInProgress.direction : void 0,
3289
+ activeJoggingDirection: ((g = e.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? e.incrementJogInProgress.direction : void 0,
3271
3290
  label: /* @__PURE__ */ S(et, { children: [
3272
3291
  /* @__PURE__ */ a(Je, {}),
3273
3292
  /* @__PURE__ */ a(
@@ -3275,26 +3294,26 @@ const Zt = J(
3275
3294
  {
3276
3295
  sx: {
3277
3296
  fontSize: "24px",
3278
- color: ((x = d.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3297
+ color: ((f = p.colors) == null ? void 0 : f.labelColor) ?? r.palette.text.primary
3279
3298
  },
3280
- children: d.id.toUpperCase()
3299
+ children: p.id.toUpperCase()
3281
3300
  }
3282
3301
  )
3283
3302
  ] }),
3284
3303
  getDisplayedValue: () => {
3285
- var y, h;
3286
- return g(
3287
- ((h = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : h[tt[d.id]]) || 0
3304
+ var y, b;
3305
+ return u(
3306
+ ((b = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : b[tt[p.id]]) || 0
3288
3307
  );
3289
3308
  },
3290
3309
  startJogging: (y) => c({
3291
- axis: d.id,
3310
+ axis: p.id,
3292
3311
  motionType: "rotate",
3293
3312
  direction: y
3294
3313
  }),
3295
3314
  stopJogging: s
3296
3315
  },
3297
- d.id
3316
+ p.id
3298
3317
  );
3299
3318
  })
3300
3319
  ]
@@ -3356,8 +3375,8 @@ const Zt = J(
3356
3375
  alignItems: "center",
3357
3376
  gap: "24px",
3358
3377
  children: e.jogger.motionStream.joints.map((n) => {
3359
- var s, l, u;
3360
- const c = (u = (l = (s = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : u.position;
3378
+ var s, l, d;
3379
+ const c = (d = (l = (s = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : d.position;
3361
3380
  return /* @__PURE__ */ S(
3362
3381
  P,
3363
3382
  {
@@ -3384,12 +3403,12 @@ const Zt = J(
3384
3403
  upperLimit: c == null ? void 0 : c.upper_limit,
3385
3404
  useDegree: e.jointType === G.RevoluteJoint,
3386
3405
  getValue: () => {
3387
- const f = e.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
3388
- return f !== void 0 ? f : void 0;
3406
+ const m = e.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
3407
+ return m !== void 0 ? m : void 0;
3389
3408
  },
3390
- startJogging: (f) => r({
3409
+ startJogging: (m) => r({
3391
3410
  joint: n.index,
3392
- direction: f
3411
+ direction: m
3393
3412
  }),
3394
3413
  stopJogging: i
3395
3414
  }
@@ -3425,7 +3444,13 @@ const Zt = J(
3425
3444
  try {
3426
3445
  let i = e.store;
3427
3446
  if (!i) {
3428
- const n = await ft.open(t, e.motionGroupId);
3447
+ const n = await ft.open(
3448
+ t,
3449
+ e.motionGroupId,
3450
+ {
3451
+ cellId: e.cellId
3452
+ }
3453
+ );
3429
3454
  i = await bt.loadFor(n);
3430
3455
  }
3431
3456
  D(() => {
@@ -3438,7 +3463,7 @@ const Zt = J(
3438
3463
  return F(() => (r(), e.store ? () => null : () => {
3439
3464
  var i;
3440
3465
  (i = o.joggingStore) == null || i.dispose();
3441
- }), [e.store, e.nova, e.motionGroupId]), F(() => {
3466
+ }), [e.store, e.nova, e.motionGroupId, e.cellId]), F(() => {
3442
3467
  const i = o.joggingStore;
3443
3468
  i && (e.locked ? i.lock("external") : i.unlock("external"));
3444
3469
  }, [o.joggingStore, e.locked]), /* @__PURE__ */ a(
@@ -3518,10 +3543,10 @@ const Zt = J(
3518
3543
  return await navigator.clipboard.writeText(t), console.log("Copied!"), n(!0), !0;
3519
3544
  } catch (l) {
3520
3545
  console.error(l);
3521
- const u = window.getSelection();
3522
- if (u && o && "current" in o && o.current) {
3523
- const f = document.createRange();
3524
- f.selectNodeContents(o.current), u.removeAllRanges(), u.addRange(f);
3546
+ const d = window.getSelection();
3547
+ if (d && o && "current" in o && o.current) {
3548
+ const m = document.createRange();
3549
+ m.selectNodeContents(o.current), d.removeAllRanges(), d.addRange(m);
3525
3550
  }
3526
3551
  }
3527
3552
  return !1;
@@ -3670,24 +3695,24 @@ const st = (e, t, o) => ({
3670
3695
  level: t
3671
3696
  }), fi = (e, t) => st(e, "debug", t), bi = (e, t) => st(e, "info", t), xi = (e, t) => st(e, "warning", t), yi = (e, t) => st(e, "error", t), Ao = $(
3672
3697
  J((e) => {
3673
- var f;
3698
+ var m;
3674
3699
  const { messages: t = [], onClear: o, height: r = 400, sx: i } = e, n = B(), c = A(null);
3675
3700
  F(() => {
3676
3701
  if (t.length === 0) return;
3677
- const g = c.current;
3678
- if (!g) return;
3679
- const d = setTimeout(() => {
3680
- g.scrollTop = g.scrollHeight;
3702
+ const u = c.current;
3703
+ if (!u) return;
3704
+ const p = setTimeout(() => {
3705
+ u.scrollTop = u.scrollHeight;
3681
3706
  }, 10);
3682
- return () => clearTimeout(d);
3707
+ return () => clearTimeout(p);
3683
3708
  }, [t.length]);
3684
- const s = (g) => g.toLocaleTimeString("en-US", {
3709
+ const s = (u) => u.toLocaleTimeString("en-US", {
3685
3710
  hour12: !1,
3686
3711
  hour: "2-digit",
3687
3712
  minute: "2-digit",
3688
3713
  second: "2-digit"
3689
- }), l = (g) => {
3690
- switch (g) {
3714
+ }), l = (u) => {
3715
+ switch (u) {
3691
3716
  case "error":
3692
3717
  return n.palette.error.main;
3693
3718
  case "warning":
@@ -3699,19 +3724,19 @@ const st = (e, t, o) => ({
3699
3724
  default:
3700
3725
  return n.palette.text.secondary;
3701
3726
  }
3702
- }, u = ({ message: g }) => {
3703
- const [d, p] = L(!1), [x, y] = L(!1), [h, m] = L(!1), v = g.message.length > 150, b = async () => {
3727
+ }, d = ({ message: u }) => {
3728
+ const [p, g] = L(!1), [f, y] = L(!1), [b, h] = L(!1), v = u.message.length > 150, x = async () => {
3704
3729
  try {
3705
- await navigator.clipboard.writeText(g.message), y(!0), setTimeout(() => y(!1), 2e3);
3730
+ await navigator.clipboard.writeText(u.message), y(!0), setTimeout(() => y(!1), 2e3);
3706
3731
  } catch (C) {
3707
3732
  console.error("Failed to copy message:", C);
3708
3733
  }
3709
- }, T = v && !d ? `${g.message.substring(0, 150)}...` : g.message;
3734
+ }, T = v && !p ? `${u.message.substring(0, 150)}...` : u.message;
3710
3735
  return /* @__PURE__ */ a(
3711
3736
  w,
3712
3737
  {
3713
- onMouseEnter: () => m(!0),
3714
- onMouseLeave: () => m(!1),
3738
+ onMouseEnter: () => h(!0),
3739
+ onMouseLeave: () => h(!1),
3715
3740
  sx: {
3716
3741
  display: "flex",
3717
3742
  gap: 1,
@@ -3740,7 +3765,7 @@ const st = (e, t, o) => ({
3740
3765
  },
3741
3766
  children: [
3742
3767
  "[",
3743
- s(g.timestamp),
3768
+ s(u.timestamp),
3744
3769
  "]"
3745
3770
  ]
3746
3771
  }
@@ -3754,7 +3779,7 @@ const st = (e, t, o) => ({
3754
3779
  fontSize: "12px",
3755
3780
  lineHeight: "18px",
3756
3781
  letterSpacing: "0.4px",
3757
- color: l(g.level),
3782
+ color: l(u.level),
3758
3783
  wordBreak: "break-word",
3759
3784
  overflowWrap: "anywhere",
3760
3785
  hyphens: "auto",
@@ -3771,16 +3796,16 @@ const st = (e, t, o) => ({
3771
3796
  display: "flex",
3772
3797
  alignItems: "flex-start",
3773
3798
  gap: 0.5,
3774
- opacity: h ? 1 : 0,
3799
+ opacity: b ? 1 : 0,
3775
3800
  transition: "opacity 0.2s ease-in-out",
3776
- visibility: h ? "visible" : "hidden"
3801
+ visibility: b ? "visible" : "hidden"
3777
3802
  },
3778
3803
  children: [
3779
3804
  /* @__PURE__ */ a(
3780
3805
  q,
3781
3806
  {
3782
3807
  size: "small",
3783
- onClick: b,
3808
+ onClick: x,
3784
3809
  sx: {
3785
3810
  padding: "2px",
3786
3811
  color: n.palette.text.secondary,
@@ -3788,7 +3813,7 @@ const st = (e, t, o) => ({
3788
3813
  backgroundColor: n.palette.action.hover
3789
3814
  }
3790
3815
  },
3791
- title: x ? "Copied!" : "Copy message",
3816
+ title: f ? "Copied!" : "Copy message",
3792
3817
  children: /* @__PURE__ */ a(Ze, { sx: { fontSize: 12 } })
3793
3818
  }
3794
3819
  ),
@@ -3796,7 +3821,7 @@ const st = (e, t, o) => ({
3796
3821
  q,
3797
3822
  {
3798
3823
  size: "small",
3799
- onClick: () => p(!d),
3824
+ onClick: () => g(!p),
3800
3825
  sx: {
3801
3826
  padding: "2px",
3802
3827
  color: n.palette.text.secondary,
@@ -3804,8 +3829,8 @@ const st = (e, t, o) => ({
3804
3829
  backgroundColor: n.palette.action.hover
3805
3830
  }
3806
3831
  },
3807
- title: d ? "Collapse" : "Expand",
3808
- children: d ? /* @__PURE__ */ a(Xe, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(Ke, { sx: { fontSize: 12 } })
3832
+ title: p ? "Collapse" : "Expand",
3833
+ children: p ? /* @__PURE__ */ a(Xe, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(Ke, { sx: { fontSize: 12 } })
3809
3834
  }
3810
3835
  )
3811
3836
  ]
@@ -3813,14 +3838,14 @@ const st = (e, t, o) => ({
3813
3838
  )
3814
3839
  ] })
3815
3840
  },
3816
- g.id
3841
+ u.id
3817
3842
  );
3818
3843
  };
3819
3844
  return /* @__PURE__ */ S(
3820
3845
  to,
3821
3846
  {
3822
3847
  sx: {
3823
- backgroundColor: ((f = n.palette.backgroundPaperElevation) == null ? void 0 : f[2]) || "#171927",
3848
+ backgroundColor: ((m = n.palette.backgroundPaperElevation) == null ? void 0 : m[2]) || "#171927",
3824
3849
  backgroundImage: "none",
3825
3850
  // Override any gradient from elevation
3826
3851
  height: r,
@@ -3930,7 +3955,7 @@ const st = (e, t, o) => ({
3930
3955
  },
3931
3956
  children: "No log messages"
3932
3957
  }
3933
- ) : t.map((g) => /* @__PURE__ */ a(u, { message: g }, g.id))
3958
+ ) : t.map((u) => /* @__PURE__ */ a(d, { message: u }, u.id))
3934
3959
  }
3935
3960
  )
3936
3961
  ]
@@ -4043,41 +4068,41 @@ var Kt = /* @__PURE__ */ ((e) => (e.PRECONDITION_NOT_FULFILLED = "PRECONDITION_N
4043
4068
  const Fo = $(
4044
4069
  J(({ setupState: e, className: t }) => {
4045
4070
  const o = B(), { t: r } = z(), i = () => {
4046
- var u, f, g, d, p, x, y;
4071
+ var d, m, u, p, g, f, y;
4047
4072
  switch (e) {
4048
4073
  case "READY":
4049
4074
  return {
4050
4075
  label: r("RobotSetupReadinessIndicator.Ready.lb"),
4051
- indicatorColor: ((u = o.palette.tertiary) == null ? void 0 : u.main) || o.palette.primary.main,
4052
- backgroundColor: ((f = o.palette.backgroundPaperElevation) == null ? void 0 : f[11]) || o.palette.background.paper,
4076
+ indicatorColor: ((d = o.palette.tertiary) == null ? void 0 : d.main) || o.palette.primary.main,
4077
+ backgroundColor: ((m = o.palette.backgroundPaperElevation) == null ? void 0 : m[11]) || o.palette.background.paper,
4053
4078
  textColor: o.palette.secondary.contrastText
4054
4079
  };
4055
4080
  case "ROBOT_DISCONNECTED":
4056
4081
  return {
4057
4082
  label: r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),
4058
4083
  indicatorColor: o.palette.error.main,
4059
- backgroundColor: ((g = o.palette.backgroundPaperElevation) == null ? void 0 : g[11]) || o.palette.background.paper,
4084
+ backgroundColor: ((u = o.palette.backgroundPaperElevation) == null ? void 0 : u[11]) || o.palette.background.paper,
4060
4085
  textColor: o.palette.secondary.contrastText
4061
4086
  };
4062
4087
  case "CELL_OPEN":
4063
4088
  return {
4064
4089
  label: r("RobotSetupReadinessIndicator.CellOpen.lb"),
4065
4090
  indicatorColor: o.palette.error.main,
4066
- backgroundColor: ((d = o.palette.backgroundPaperElevation) == null ? void 0 : d[11]) || o.palette.background.paper,
4091
+ backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
4067
4092
  textColor: o.palette.secondary.contrastText
4068
4093
  };
4069
4094
  case "E_STOP":
4070
4095
  return {
4071
4096
  label: r("RobotSetupReadinessIndicator.EStop.lb"),
4072
4097
  indicatorColor: o.palette.error.main,
4073
- backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
4098
+ backgroundColor: ((g = o.palette.backgroundPaperElevation) == null ? void 0 : g[11]) || o.palette.background.paper,
4074
4099
  textColor: o.palette.secondary.contrastText
4075
4100
  };
4076
4101
  case "MANUAL_MODE":
4077
4102
  return {
4078
4103
  label: r("RobotSetupReadinessIndicator.ManualMode.lb"),
4079
4104
  indicatorColor: o.palette.error.main,
4080
- backgroundColor: ((x = o.palette.backgroundPaperElevation) == null ? void 0 : x[11]) || o.palette.background.paper,
4105
+ backgroundColor: ((f = o.palette.backgroundPaperElevation) == null ? void 0 : f[11]) || o.palette.background.paper,
4081
4106
  textColor: o.palette.secondary.contrastText
4082
4107
  };
4083
4108
  default:
@@ -4318,11 +4343,11 @@ function $o({ children: e, ...t }) {
4318
4343
  scrollButtons: c,
4319
4344
  selectionFollowsFocus: s,
4320
4345
  textColor: l,
4321
- value: u,
4322
- variant: f,
4323
- ...g
4346
+ value: d,
4347
+ variant: m,
4348
+ ...u
4324
4349
  } = t;
4325
- return /* @__PURE__ */ a(w, { ...g, children: e });
4350
+ return /* @__PURE__ */ a(w, { ...u, children: e });
4326
4351
  }
4327
4352
  const Ti = $(
4328
4353
  J((e) => {
@@ -4333,12 +4358,12 @@ const Ti = $(
4333
4358
  onTabChange: i,
4334
4359
  sx: n,
4335
4360
  ref: c
4336
- } = e, s = o !== void 0, [l, u] = L(r), f = s ? o : l;
4361
+ } = e, s = o !== void 0, [l, d] = L(r), m = s ? o : l;
4337
4362
  F(() => {
4338
- s || t.length !== 0 && (l < 0 || l > t.length - 1) && u(0);
4363
+ s || t.length !== 0 && (l < 0 || l > t.length - 1) && d(0);
4339
4364
  }, [t.length, s, l]);
4340
- const g = (d, p) => {
4341
- s || u(p), i == null || i(p);
4365
+ const u = (p, g) => {
4366
+ s || d(g), i == null || i(g);
4342
4367
  };
4343
4368
  return /* @__PURE__ */ S(
4344
4369
  w,
@@ -4357,16 +4382,16 @@ const Ti = $(
4357
4382
  // Extra padding to prevent badge clipping
4358
4383
  // Top: accommodates badge positioned at top: -6px with 20px height
4359
4384
  // Right: accommodates badge positioned at right: -8px with 20px width
4360
- paddingTop: (d) => d.spacing(2),
4385
+ paddingTop: (p) => p.spacing(2),
4361
4386
  // 16px
4362
- paddingRight: (d) => d.spacing(2.5)
4387
+ paddingRight: (p) => p.spacing(2.5)
4363
4388
  // 20px
4364
4389
  },
4365
4390
  children: /* @__PURE__ */ a(
4366
4391
  Vt,
4367
4392
  {
4368
- value: f,
4369
- onChange: g,
4393
+ value: m,
4394
+ onChange: u,
4370
4395
  sx: {
4371
4396
  minHeight: "32px",
4372
4397
  backgroundColor: "transparent",
@@ -4388,23 +4413,23 @@ const Ti = $(
4388
4413
  overflow: "visible"
4389
4414
  }
4390
4415
  },
4391
- children: t.map((d, p) => {
4416
+ children: t.map((p, g) => {
4392
4417
  var T, C, M;
4393
- const x = () => {
4394
- if (!d.badge) return;
4395
- const k = d.badge.content, j = d.badge.max;
4418
+ const f = () => {
4419
+ if (!p.badge) return;
4420
+ const k = p.badge.content, j = p.badge.max;
4396
4421
  return typeof k == "number" && j && k > j ? `${j}+` : k;
4397
4422
  }, y = () => {
4398
- if (!d.badge) return !1;
4399
- const k = d.badge.content, j = d.badge.showZero;
4423
+ if (!p.badge) return !1;
4424
+ const k = p.badge.content, j = p.badge.showZero;
4400
4425
  return !(k === 0 && !j);
4401
- }, h = x(), m = y(), v = () => {
4402
- s || u(p), i == null || i(p);
4403
- }, b = /* @__PURE__ */ a(
4426
+ }, b = f(), h = y(), v = () => {
4427
+ s || d(g), i == null || i(g);
4428
+ }, x = /* @__PURE__ */ a(
4404
4429
  zt,
4405
4430
  {
4406
- label: d.label,
4407
- icon: d.icon,
4431
+ label: p.label,
4432
+ icon: p.icon,
4408
4433
  iconPosition: "start",
4409
4434
  disableRipple: !0,
4410
4435
  onClick: v,
@@ -4418,13 +4443,13 @@ const Ti = $(
4418
4443
  return ((j = k.palette.backgroundPaperElevation) == null ? void 0 : j[11]) || "#32344B";
4419
4444
  },
4420
4445
  color: "text.primary",
4421
- opacity: f === p ? 1 : 0.38,
4446
+ opacity: m === g ? 1 : 0.38,
4422
4447
  fontSize: "13px",
4423
4448
  transition: "all 0.2s ease-in-out",
4424
4449
  position: "relative",
4425
4450
  overflow: "visible",
4426
4451
  "&:hover": {
4427
- opacity: f === p ? 1 : 0.6
4452
+ opacity: m === g ? 1 : 0.6
4428
4453
  },
4429
4454
  "&.Mui-selected": {
4430
4455
  opacity: 1,
@@ -4442,9 +4467,9 @@ const Ti = $(
4442
4467
  }
4443
4468
  }
4444
4469
  },
4445
- d.id
4470
+ p.id
4446
4471
  );
4447
- return m ? /* @__PURE__ */ a(
4472
+ return h ? /* @__PURE__ */ a(
4448
4473
  $o,
4449
4474
  {
4450
4475
  component: "span",
@@ -4452,10 +4477,10 @@ const Ti = $(
4452
4477
  children: /* @__PURE__ */ a(
4453
4478
  lo,
4454
4479
  {
4455
- badgeContent: h,
4456
- color: ((T = d.badge) == null ? void 0 : T.color) || "error",
4457
- max: (C = d.badge) == null ? void 0 : C.max,
4458
- showZero: (M = d.badge) == null ? void 0 : M.showZero,
4480
+ badgeContent: b,
4481
+ color: ((T = p.badge) == null ? void 0 : T.color) || "error",
4482
+ max: (C = p.badge) == null ? void 0 : C.max,
4483
+ showZero: (M = p.badge) == null ? void 0 : M.showZero,
4459
4484
  anchorOrigin: {
4460
4485
  vertical: "top",
4461
4486
  horizontal: "right"
@@ -4467,12 +4492,12 @@ const Ti = $(
4467
4492
  opacity: "1 !important"
4468
4493
  }
4469
4494
  },
4470
- children: b
4495
+ children: x
4471
4496
  }
4472
4497
  )
4473
4498
  },
4474
- d.id
4475
- ) : b;
4499
+ p.id
4500
+ ) : x;
4476
4501
  })
4477
4502
  }
4478
4503
  )
@@ -4482,13 +4507,13 @@ const Ti = $(
4482
4507
  w,
4483
4508
  {
4484
4509
  sx: {
4485
- mt: (d) => d.spacing(2),
4510
+ mt: (p) => p.spacing(2),
4486
4511
  borderBottom: 1,
4487
4512
  borderColor: "divider"
4488
4513
  }
4489
4514
  }
4490
4515
  ),
4491
- /* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children: t.map((d, p) => /* @__PURE__ */ a(Lo, { value: f, index: p, children: d.content }, d.id)) })
4516
+ /* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children: t.map((p, g) => /* @__PURE__ */ a(Lo, { value: m, index: g, children: p.content }, p.id)) })
4492
4517
  ]
4493
4518
  }
4494
4519
  );
@@ -4512,7 +4537,7 @@ const Ti = $(
4512
4537
  hasError: o,
4513
4538
  className: r
4514
4539
  }) => {
4515
- const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation: u, showMainText: f } = t;
4540
+ const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation: d, showMainText: m } = t;
4516
4541
  return /* @__PURE__ */ S(
4517
4542
  w,
4518
4543
  {
@@ -4540,7 +4565,7 @@ const Ti = $(
4540
4565
  skipAnimation: !0,
4541
4566
  text: () => "",
4542
4567
  sx: {
4543
- opacity: u || l ? 0.6 : 1,
4568
+ opacity: d || l ? 0.6 : 1,
4544
4569
  transition: "opacity 0.5s ease-out",
4545
4570
  "& .MuiGauge-valueArc": {
4546
4571
  fill: o ? n.palette.error.light : n.palette.success.main,
@@ -4593,7 +4618,7 @@ const Ti = $(
4593
4618
  marginBottom: 0.5
4594
4619
  },
4595
4620
  children: [
4596
- /* @__PURE__ */ a(H, { in: f && o, timeout: 200, children: /* @__PURE__ */ a(
4621
+ /* @__PURE__ */ a(H, { in: m && o, timeout: 200, children: /* @__PURE__ */ a(
4597
4622
  R,
4598
4623
  {
4599
4624
  variant: "h6",
@@ -4606,7 +4631,7 @@ const Ti = $(
4606
4631
  children: i("timer.error")
4607
4632
  }
4608
4633
  ) }),
4609
- /* @__PURE__ */ a(H, { in: f && !o, timeout: 300, children: /* @__PURE__ */ a(
4634
+ /* @__PURE__ */ a(H, { in: m && !o, timeout: 300, children: /* @__PURE__ */ a(
4610
4635
  R,
4611
4636
  {
4612
4637
  variant: "h1",
@@ -4636,7 +4661,7 @@ const Ti = $(
4636
4661
  compact: r,
4637
4662
  className: i
4638
4663
  }) => {
4639
- const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress: u } = e, { showErrorAnimation: f, showPauseAnimation: g } = t;
4664
+ const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress: d } = e, { showErrorAnimation: m, showPauseAnimation: u } = t;
4640
4665
  return r ? /* @__PURE__ */ a(
4641
4666
  w,
4642
4667
  {
@@ -4679,7 +4704,7 @@ const Ti = $(
4679
4704
  display: "flex",
4680
4705
  alignItems: "center",
4681
4706
  justifyContent: "center",
4682
- opacity: g || f ? 0.6 : 1,
4707
+ opacity: u || m ? 0.6 : 1,
4683
4708
  transition: "opacity 0.5s ease-out"
4684
4709
  },
4685
4710
  children: /* @__PURE__ */ S(
@@ -4718,7 +4743,7 @@ const Ti = $(
4718
4743
  strokeWidth: "2",
4719
4744
  strokeLinecap: "round",
4720
4745
  strokeDasharray: `${2 * Math.PI * 8}`,
4721
- strokeDashoffset: `${2 * Math.PI * 8 * (1 - u / 100)}`,
4746
+ strokeDashoffset: `${2 * Math.PI * 8 * (1 - d / 100)}`,
4722
4747
  style: {
4723
4748
  transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
4724
4749
  }
@@ -4756,31 +4781,31 @@ const Ti = $(
4756
4781
  ), r = A(
4757
4782
  null
4758
4783
  ), i = A(null), n = _(() => {
4759
- t((g) => ({ ...g, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
4760
- t((g) => ({ ...g, showPauseAnimation: !1 }));
4784
+ t((u) => ({ ...u, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
4785
+ t((u) => ({ ...u, showPauseAnimation: !1 }));
4761
4786
  }, 800);
4762
4787
  }, []), c = _(() => {
4763
- t((g) => ({ ...g, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
4764
- t((g) => ({ ...g, showErrorAnimation: !1 }));
4788
+ t((u) => ({ ...u, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
4789
+ t((u) => ({ ...u, showErrorAnimation: !1 }));
4765
4790
  }, 600);
4766
4791
  }, []), s = _(() => {
4767
- t((g) => ({ ...g, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
4792
+ t((u) => ({ ...u, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
4768
4793
  }, []), l = _(() => {
4769
- t((g) => ({
4770
- ...g,
4794
+ t((u) => ({
4795
+ ...u,
4771
4796
  showMainText: !1
4772
4797
  })), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
4773
- t((g) => ({
4774
- ...g,
4798
+ t((u) => ({
4799
+ ...u,
4775
4800
  showMainText: !0
4776
4801
  }));
4777
4802
  }, 200);
4778
- }, []), u = _(() => {
4779
- t((g) => ({
4780
- ...g,
4803
+ }, []), d = _(() => {
4804
+ t((u) => ({
4805
+ ...u,
4781
4806
  showMainText: !0
4782
4807
  }));
4783
- }, []), f = _(() => {
4808
+ }, []), m = _(() => {
4784
4809
  o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
4785
4810
  }, []);
4786
4811
  return {
@@ -4789,8 +4814,8 @@ const Ti = $(
4789
4814
  triggerErrorAnimation: c,
4790
4815
  clearErrorAnimation: s,
4791
4816
  triggerFadeTransition: l,
4792
- setInitialAnimationState: u,
4793
- cleanup: f
4817
+ setInitialAnimationState: d,
4818
+ cleanup: m
4794
4819
  };
4795
4820
  }, Go = ({
4796
4821
  autoStart: e,
@@ -4805,97 +4830,97 @@ const Ti = $(
4805
4830
  isPausedState: !1,
4806
4831
  currentProgress: 0,
4807
4832
  wasRunningBeforeError: !1
4808
- }), s = A(null), l = A(null), u = A(0), f = A(0), [g] = $t([0], {
4833
+ }), s = A(null), l = A(null), d = A(0), m = A(0), [u] = $t([0], {
4809
4834
  tension: 80,
4810
4835
  friction: 18,
4811
- onChange: ([m]) => {
4812
- c((v) => ({ ...v, currentProgress: m }));
4836
+ onChange: ([h]) => {
4837
+ c((v) => ({ ...v, currentProgress: h }));
4813
4838
  }
4814
- }), d = _(
4815
- (m = 0) => {
4816
- const v = m / 60 % 1 * 100;
4817
- c((b) => ({
4818
- ...b,
4819
- elapsedTime: m,
4839
+ }), p = _(
4840
+ (h = 0) => {
4841
+ const v = h / 60 % 1 * 100;
4842
+ c((x) => ({
4843
+ ...x,
4844
+ elapsedTime: h,
4820
4845
  isPausedState: !1,
4821
4846
  currentProgress: v
4822
- })), u.current = 0, f.current = v, g.setImmediate([v]), e ? (l.current = Date.now() - m * 1e3, c((b) => ({ ...b, isRunning: !0 }))) : l.current = null;
4847
+ })), d.current = 0, m.current = v, u.setImmediate([v]), e ? (l.current = Date.now() - h * 1e3, c((x) => ({ ...x, isRunning: !0 }))) : l.current = null;
4823
4848
  },
4824
- [e, g]
4825
- ), p = _(() => {
4849
+ [e, u]
4850
+ ), g = _(() => {
4826
4851
  if (l.current && n.isRunning) {
4827
- const v = (Date.now() - l.current) / 1e3 + u.current, b = v / 60 % 1 * 100;
4828
- g.setTarget([b]), c((T) => ({
4852
+ const v = (Date.now() - l.current) / 1e3 + d.current, x = v / 60 % 1 * 100;
4853
+ u.setTarget([x]), c((T) => ({
4829
4854
  ...T,
4830
4855
  elapsedTime: Math.floor(v)
4831
4856
  }));
4832
4857
  }
4833
- c((m) => ({
4834
- ...m,
4858
+ c((h) => ({
4859
+ ...h,
4835
4860
  isRunning: !1,
4836
4861
  isPausedState: !0
4837
4862
  })), o();
4838
- }, [n.isRunning, g, o]), x = _(() => {
4839
- n.isPausedState && (u.current = n.elapsedTime, l.current = Date.now(), c((m) => ({
4840
- ...m,
4863
+ }, [n.isRunning, u, o]), f = _(() => {
4864
+ n.isPausedState && (d.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
4865
+ ...h,
4841
4866
  isRunning: !0,
4842
4867
  isPausedState: !1
4843
4868
  })));
4844
4869
  }, [n.isPausedState, n.elapsedTime]), y = _(() => {
4845
- c((m) => ({
4846
- ...m,
4870
+ c((h) => ({
4871
+ ...h,
4847
4872
  elapsedTime: 0,
4848
4873
  isRunning: !1,
4849
4874
  isPausedState: !1,
4850
4875
  currentProgress: 0
4851
- })), u.current = 0, l.current = null, f.current = 0, g.setImmediate([0]);
4852
- }, [g]), h = _(() => n.isPausedState, [n.isPausedState]);
4876
+ })), d.current = 0, l.current = null, m.current = 0, u.setImmediate([0]);
4877
+ }, [u]), b = _(() => n.isPausedState, [n.isPausedState]);
4853
4878
  return F(() => {
4854
- t ? (n.isRunning && (c((m) => ({ ...m, wasRunningBeforeError: !0 })), p()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((m) => ({ ...m, wasRunningBeforeError: !1 })), x()), i());
4879
+ t ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), g()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), f()), i());
4855
4880
  }, [
4856
4881
  t,
4857
4882
  n.isRunning,
4858
4883
  n.wasRunningBeforeError,
4859
- p,
4860
- x,
4884
+ g,
4885
+ f,
4861
4886
  r,
4862
4887
  i
4863
4888
  ]), F(() => {
4864
4889
  if (n.isRunning) {
4865
- const m = () => {
4890
+ const h = () => {
4866
4891
  if (l.current) {
4867
- const b = (Date.now() - l.current) / 1e3 + u.current, T = b / 60 % 1 * 100;
4892
+ const x = (Date.now() - l.current) / 1e3 + d.current, T = x / 60 % 1 * 100;
4868
4893
  c((M) => ({
4869
4894
  ...M,
4870
- elapsedTime: Math.floor(b)
4895
+ elapsedTime: Math.floor(x)
4871
4896
  })), Math.abs(
4872
- T - f.current
4873
- ) > 0.1 && (g.setTarget([T]), f.current = T);
4897
+ T - m.current
4898
+ ) > 0.1 && (u.setTarget([T]), m.current = T);
4874
4899
  }
4875
- s.current = requestAnimationFrame(m);
4900
+ s.current = requestAnimationFrame(h);
4876
4901
  };
4877
- s.current = requestAnimationFrame(m);
4902
+ s.current = requestAnimationFrame(h);
4878
4903
  } else
4879
4904
  s.current && (cancelAnimationFrame(s.current), s.current = null);
4880
4905
  return () => {
4881
4906
  s.current && (cancelAnimationFrame(s.current), s.current = null);
4882
4907
  };
4883
- }, [n.isRunning, g]), F(() => {
4884
- let m = null;
4908
+ }, [n.isRunning, u]), F(() => {
4909
+ let h = null;
4885
4910
  const v = () => {
4886
- g.update(), m = requestAnimationFrame(v);
4911
+ u.update(), h = requestAnimationFrame(v);
4887
4912
  };
4888
- return m = requestAnimationFrame(v), () => {
4889
- m && cancelAnimationFrame(m);
4913
+ return h = requestAnimationFrame(v), () => {
4914
+ h && cancelAnimationFrame(h);
4890
4915
  };
4891
- }, [g]), {
4916
+ }, [u]), {
4892
4917
  timerState: n,
4893
4918
  controls: {
4894
- start: d,
4895
- pause: p,
4896
- resume: x,
4919
+ start: p,
4920
+ pause: g,
4921
+ resume: f,
4897
4922
  reset: y,
4898
- isPaused: h
4923
+ isPaused: b
4899
4924
  }
4900
4925
  };
4901
4926
  }, Mi = $(
@@ -4912,30 +4937,30 @@ const Ti = $(
4912
4937
  animationState: c,
4913
4938
  triggerPauseAnimation: s,
4914
4939
  triggerErrorAnimation: l,
4915
- clearErrorAnimation: u,
4916
- setInitialAnimationState: f,
4917
- cleanup: g
4918
- } = Wo(), { timerState: d, controls: p } = Go({
4940
+ clearErrorAnimation: d,
4941
+ setInitialAnimationState: m,
4942
+ cleanup: u
4943
+ } = Wo(), { timerState: p, controls: g } = Go({
4919
4944
  autoStart: t,
4920
4945
  hasError: n,
4921
4946
  onPauseAnimation: s,
4922
4947
  onErrorAnimation: l,
4923
- onClearErrorAnimation: u
4948
+ onClearErrorAnimation: d
4924
4949
  });
4925
4950
  return F(() => {
4926
- f();
4927
- }, [f]), F(() => {
4928
- let x = !0;
4951
+ m();
4952
+ }, [m]), F(() => {
4953
+ let f = !0;
4929
4954
  const y = setTimeout(() => {
4930
- x && e(p);
4955
+ f && e(g);
4931
4956
  }, 0);
4932
4957
  return () => {
4933
- x = !1, clearTimeout(y);
4958
+ f = !1, clearTimeout(y);
4934
4959
  };
4935
- }, [e, p]), F(() => g, [g]), o === "small" ? /* @__PURE__ */ a(
4960
+ }, [e, g]), F(() => u, [u]), o === "small" ? /* @__PURE__ */ a(
4936
4961
  No,
4937
4962
  {
4938
- timerState: d,
4963
+ timerState: p,
4939
4964
  animationState: c,
4940
4965
  hasError: n,
4941
4966
  compact: r,
@@ -4944,7 +4969,7 @@ const Ti = $(
4944
4969
  ) : /* @__PURE__ */ a(
4945
4970
  Vo,
4946
4971
  {
4947
- timerState: d,
4972
+ timerState: p,
4948
4973
  animationState: c,
4949
4974
  hasError: n,
4950
4975
  className: i
@@ -4960,101 +4985,107 @@ const Ti = $(
4960
4985
  reverse_rotation_direction: !1
4961
4986
  };
4962
4987
  class gt {
4963
- constructor(t, o, r, i, n, c, s, l, u, f) {
4964
- this.nova = t, this.controller = o, this.motionGroup = r, this.initialMotionState = i, this.motionStateSocket = n, this.isVirtual = c, this.tcps = s, this.description = l, this.initialControllerState = u, this.controllerStateSocket = f, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = i, this.controllerState = u, f.addEventListener("message", (g) => {
4965
- var p;
4966
- const d = (p = W(g.data)) == null ? void 0 : p.result;
4967
- d && D(() => {
4968
- this.controllerState = d;
4988
+ constructor(t, o, r, i, n, c, s, l, d, m, u) {
4989
+ this.nova = t, this.cellId = o, this.controller = r, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = c, this.isVirtual = s, this.tcps = l, this.description = d, this.initialControllerState = m, this.controllerStateSocket = u, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = n, this.controllerState = m, u.addEventListener("message", (p) => {
4990
+ var f;
4991
+ const g = (f = W(p.data)) == null ? void 0 : f.result;
4992
+ g && D(() => {
4993
+ this.controllerState = g;
4969
4994
  });
4970
- }), n.addEventListener("message", (g) => {
4971
- var p;
4972
- const d = (p = W(g.data)) == null ? void 0 : p.result;
4973
- if (!d)
4995
+ }), c.addEventListener("message", (p) => {
4996
+ var f;
4997
+ const g = (f = W(p.data)) == null ? void 0 : f.result;
4998
+ if (!g)
4974
4999
  throw new Error(
4975
- `Failed to get motion state for ${this.motionGroupId}: ${g.data}`
5000
+ `Failed to get motion state for ${this.motionGroupId}: ${p.data}`
4976
5001
  );
4977
5002
  Ut(
4978
5003
  this.rapidlyChangingMotionState.joint_position,
4979
- d.joint_position,
5004
+ g.joint_position,
4980
5005
  Jt
4981
5006
  ) || D(() => {
4982
- this.rapidlyChangingMotionState.joint_position = d.joint_position;
5007
+ this.rapidlyChangingMotionState.joint_position = g.joint_position;
4983
5008
  }), Ht(
4984
5009
  this.rapidlyChangingMotionState,
4985
- d,
5010
+ g,
4986
5011
  Jt
4987
5012
  ) || D(() => {
4988
- this.rapidlyChangingMotionState.tcp_pose = d.tcp_pose;
4989
- }), d.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== d.tcp && D(() => {
4990
- this.rapidlyChangingMotionState.tcp = d.tcp;
4991
- }), this.rapidlyChangingMotionState.standstill !== d.standstill && D(() => {
4992
- this.rapidlyChangingMotionState.standstill = d.standstill;
5013
+ this.rapidlyChangingMotionState.tcp_pose = g.tcp_pose;
5014
+ }), g.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== g.tcp && D(() => {
5015
+ this.rapidlyChangingMotionState.tcp = g.tcp;
5016
+ }), this.rapidlyChangingMotionState.standstill !== g.standstill && D(() => {
5017
+ this.rapidlyChangingMotionState.standstill = g.standstill;
4993
5018
  });
4994
5019
  }), mt(this);
4995
5020
  }
4996
- static async connectMultiple(t, o) {
5021
+ static async connectMultiple(t, o, r = {}) {
4997
5022
  return Promise.all(
4998
5023
  o.map(
4999
- (r) => gt.connect(t, r)
5024
+ (i) => gt.connect(t, i, r)
5000
5025
  )
5001
5026
  );
5002
5027
  }
5003
- static async connect(t, o) {
5004
- var m, v;
5005
- const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
5006
- (b) => b.motion_group === o
5028
+ static async connect(t, o, r = {}) {
5029
+ var x, T;
5030
+ const i = r.cellId ?? "cell", [n, c] = o.split("@"), s = await t.api.controller.getCurrentRobotControllerState(
5031
+ i,
5032
+ c
5033
+ ), l = s == null ? void 0 : s.motion_groups.find(
5034
+ (C) => C.motion_group === o
5007
5035
  );
5008
- if (!n || !c)
5036
+ if (!s || !l)
5009
5037
  throw new Error(
5010
- `Controller ${i} or motion group ${o} not found`
5038
+ `Controller ${c} or motion group ${o} not found`
5011
5039
  );
5012
- const s = t.openReconnectingWebsocket(
5013
- `/controllers/${i}/motion-groups/${o}/state-stream`
5014
- ), l = await s.firstMessage(), u = (m = W(l.data)) == null ? void 0 : m.result;
5040
+ const d = t.openReconnectingWebsocket(
5041
+ `/cells/${i}/controllers/${c}/motion-groups/${o}/state-stream`
5042
+ ), m = await d.firstMessage(), u = (x = W(m.data)) == null ? void 0 : x.result;
5015
5043
  if (!u)
5016
5044
  throw new Error(
5017
- `Unable to parse initial motion state message ${l.data}`
5045
+ `Unable to parse initial motion state message ${m.data}`
5018
5046
  );
5019
5047
  console.log(
5020
- `Connected motion state websocket to motion group ${c.motion_group}. Initial state:
5048
+ `Connected motion state websocket to motion group ${l.motion_group}. Initial state:
5021
5049
  `,
5022
5050
  u
5023
5051
  );
5024
5052
  const g = (await t.api.controller.getRobotController(
5025
- n.controller
5026
- )).configuration.kind === "VirtualController", d = await t.api.motionGroup.getMotionGroupDescription(
5027
5053
  i,
5028
- c.motion_group
5029
- ), p = Object.entries(d.tcps || {}).map(
5030
- ([b, T]) => ({
5031
- id: b,
5032
- readable_name: T.name,
5033
- position: T.pose.position,
5034
- orientation: T.pose.orientation
5054
+ s.controller
5055
+ )).configuration.kind === "VirtualController", f = await t.api.motionGroup.getMotionGroupDescription(
5056
+ i,
5057
+ c,
5058
+ l.motion_group
5059
+ ), y = Object.entries(f.tcps || {}).map(
5060
+ ([C, M]) => ({
5061
+ id: C,
5062
+ readable_name: M.name,
5063
+ position: M.pose.position,
5064
+ orientation: M.pose.orientation
5035
5065
  })
5036
- ), x = t.openReconnectingWebsocket(
5037
- `/controllers/${n.controller}/state-stream?response_rate=1000`
5038
- ), y = await x.firstMessage(), h = (v = W(y.data)) == null ? void 0 : v.result;
5039
- if (!h)
5066
+ ), b = t.openReconnectingWebsocket(
5067
+ `/cells/${i}/controllers/${s.controller}/state-stream?response_rate=1000`
5068
+ ), h = await b.firstMessage(), v = (T = W(h.data)) == null ? void 0 : T.result;
5069
+ if (!v)
5040
5070
  throw new Error(
5041
- `Unable to parse initial controller state message ${y.data}`
5071
+ `Unable to parse initial controller state message ${h.data}`
5042
5072
  );
5043
5073
  return console.log(
5044
- `Connected controller state websocket to controller ${n.controller}. Initial state:
5074
+ `Connected controller state websocket to controller ${s.controller}. Initial state:
5045
5075
  `,
5046
- h
5076
+ v
5047
5077
  ), new gt(
5048
5078
  t,
5049
- n,
5050
- c,
5051
- u,
5079
+ i,
5052
5080
  s,
5053
- g,
5054
- p,
5081
+ l,
5082
+ u,
5055
5083
  d,
5056
- h,
5057
- x
5084
+ g,
5085
+ y,
5086
+ f,
5087
+ v,
5088
+ b
5058
5089
  );
5059
5090
  }
5060
5091
  get motionGroupId() {
@@ -5097,11 +5128,11 @@ class gt {
5097
5128
  }
5098
5129
  /** Gets the robot mounting position rotation in 3D viz coordinates */
5099
5130
  get mountingQuaternion() {
5100
- var i, n, c, s, l, u;
5131
+ var i, n, c, s, l, d;
5101
5132
  const t = new Et.Vector3(
5102
5133
  ((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
5103
5134
  ((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
5104
- ((u = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : u[2]) || 0
5135
+ ((d = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : d[2]) || 0
5105
5136
  ), o = t.length(), r = t.normalize();
5106
5137
  return new Et.Quaternion().setFromAxisAngle(r, o);
5107
5138
  }
@@ -5153,6 +5184,7 @@ class gt {
5153
5184
  });
5154
5185
  try {
5155
5186
  await this.nova.api.controller.setDefaultMode(
5187
+ this.cellId,
5156
5188
  this.controllerId,
5157
5189
  "ROBOT_SYSTEM_MODE_MONITOR"
5158
5190
  ), D(() => {
@@ -5174,6 +5206,7 @@ class gt {
5174
5206
  });
5175
5207
  try {
5176
5208
  await this.nova.api.controller.setDefaultMode(
5209
+ this.cellId,
5177
5210
  this.controllerId,
5178
5211
  "ROBOT_SYSTEM_MODE_CONTROL"
5179
5212
  ), D(() => {