@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.403aa7c → 6.4.0-pr.revamp.667.4e5a9e6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +54 -5
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +3 -0
  4. package/dist/3d.js +25 -20
  5. package/dist/CurrentPose/index.cjs +1 -0
  6. package/dist/CurrentPose/index.d.ts +3 -0
  7. package/dist/CurrentPose/index.js +9 -0
  8. package/dist/CurrentPoseBar/index.cjs +1 -1
  9. package/dist/CurrentPoseBar/index.js +1 -1
  10. package/dist/JoggingButtons/index.cjs +1 -1
  11. package/dist/JoggingButtons/index.js +1 -1
  12. package/dist/JoggingGizmo/index.cjs +1 -1
  13. package/dist/JoggingGizmo/index.js +2 -2
  14. package/dist/JoggingJointSlider/index.cjs +1 -1
  15. package/dist/JoggingJointSlider/index.js +1 -1
  16. package/dist/RobotControl/index.cjs +1 -0
  17. package/dist/RobotControl/index.d.ts +3 -0
  18. package/dist/RobotControl/index.js +9 -0
  19. package/dist/RobotControlPanel/index.cjs +1 -1
  20. package/dist/RobotControlPanel/index.js +1 -1
  21. package/dist/RobotHeader/index.cjs +1 -1
  22. package/dist/RobotHeader/index.d.ts +2 -0
  23. package/dist/RobotHeader/index.js +6 -3
  24. package/dist/SafetyBar/index.cjs +1 -1
  25. package/dist/SafetyBar/index.d.ts +1 -0
  26. package/dist/SafetyBar/index.js +4 -3
  27. package/dist/chunks/CurrentPose-BIPvpQLG.cjs +1 -0
  28. package/dist/chunks/CurrentPose-DYKoKD2D.js +51 -0
  29. package/dist/chunks/{CurrentPoseBar-CyHUWmjM.cjs → CurrentPoseBar-CAEEifBY.cjs} +1 -1
  30. package/dist/chunks/{CurrentPoseBar-zTZi68tY.js → CurrentPoseBar-Cb_Pk2jp.js} +2 -2
  31. package/dist/chunks/{JoggingButtons-CbL-5LMK.cjs → JoggingButtons-DC0jII72.cjs} +1 -1
  32. package/dist/chunks/{JoggingButtons-CXaozFVz.js → JoggingButtons-DluWqNuO.js} +1 -1
  33. package/dist/chunks/{JoggingGizmo-DGbFLWgT.cjs → JoggingGizmo-DT7iX5Ka.cjs} +1 -1
  34. package/dist/chunks/{JoggingGizmo-SuS9MmL7.js → JoggingGizmo-Hy42DAQU.js} +1 -1
  35. package/dist/chunks/{JoggingGizmoOrientation-x_crT_64.js → JoggingGizmoOrientation-Bba8HLQJ.js} +1 -1
  36. package/dist/chunks/{JoggingGizmoOrientation-dzned4f4.cjs → JoggingGizmoOrientation-l2slmUE_.cjs} +1 -1
  37. package/dist/chunks/{JoggingJointSlider-R3_A9Ppj.cjs → JoggingJointSlider-C0lI_9W5.cjs} +1 -1
  38. package/dist/chunks/{JoggingJointSlider-CZ-k6XCa.js → JoggingJointSlider-DePZ3JHW.js} +1 -1
  39. package/dist/chunks/Pose3-B_fLR-Wv.js +80 -0
  40. package/dist/chunks/Pose3-Ch4xVeXV.cjs +1 -0
  41. package/dist/chunks/RobotControl-C1JzXIAa.js +285 -0
  42. package/dist/chunks/RobotControl-ku4CNQCb.cjs +1 -0
  43. package/dist/chunks/{RobotControlPanel-BXtBHEe9.cjs → RobotControlPanel-B4u3D3yO.cjs} +1 -1
  44. package/dist/chunks/{RobotControlPanel-BiLexAWI.js → RobotControlPanel-Cy5LwU1h.js} +5 -5
  45. package/dist/chunks/coordSystemLabel-BJKeaGA3.cjs +1 -0
  46. package/dist/chunks/coordSystemLabel-C1jfhEh5.js +29 -0
  47. package/dist/chunks/{externalizeComponent-BdxGBLIv.cjs → externalizeComponent-Bl23ayrr.cjs} +1 -1
  48. package/dist/chunks/{externalizeComponent-_w2d1_pz.js → externalizeComponent-CSzPVfuG.js} +4 -2
  49. package/dist/chunks/{loadRobotSession-dh1V1ljR.js → loadRobotSession-DVkuHA-V.js} +814 -702
  50. package/dist/chunks/loadRobotSession-cQNeaBOf.cjs +3 -0
  51. package/dist/chunks/robotActivationOf-DUHukd46.js +371 -0
  52. package/dist/chunks/robotActivationOf-DeJsI4H5.cjs +1 -0
  53. package/dist/chunks/robotModelSource-C2Mi0LtR.js +1296 -0
  54. package/dist/chunks/robotModelSource-D7VR89r_.cjs +1 -0
  55. package/dist/chunks/{SafetyBar-BVk-SH_0.cjs → robotSafetyOf-Cb4qlwd_.cjs} +1 -1
  56. package/dist/chunks/{SafetyBar-eYzCHOFD.js → robotSafetyOf-Dr5Q4rCp.js} +44 -34
  57. package/dist/chunks/useEveryFrame-CHxg25f4.cjs +1 -0
  58. package/dist/chunks/useEveryFrame-DAuNawGP.js +155 -0
  59. package/dist/chunks/{Pose3-pocKPrHN.js → useSmoothedMotionState-COMJRcOt.js} +63 -141
  60. package/dist/chunks/useSmoothedMotionState-Con0E5Bx.cjs +1 -0
  61. package/dist/components/currentPoseBar/CurrentPose.d.ts +23 -0
  62. package/dist/components/currentPoseBar/useCurrentPoseProps.d.ts +16 -0
  63. package/dist/components/jogging/coordSystemLabel.d.ts +7 -0
  64. package/dist/components/robotControl/RobotControl.d.ts +23 -0
  65. package/dist/components/robotControl/poseText.d.ts +21 -5
  66. package/dist/components/robotControl/useRobotControlProps.d.ts +28 -0
  67. package/dist/components/robotHeader/robotActivationOf.d.ts +8 -0
  68. package/dist/components/robotHeader/robotSafetyOf.d.ts +11 -0
  69. package/dist/components/robotSession/RobotSessionProvider.d.ts +13 -0
  70. package/dist/components/robots/LinearAxis.d.ts +12 -11
  71. package/dist/components/robots/Robot.d.ts +26 -9
  72. package/dist/components/robots/robotModelSource.d.ts +38 -0
  73. package/dist/core.cjs +1 -1
  74. package/dist/core.d.ts +8 -0
  75. package/dist/core.js +65 -50
  76. package/dist/index.cjs +1 -1
  77. package/dist/index.js +91 -71
  78. package/dist/lib/ConnectedMotionGroup.d.ts +5 -1
  79. package/dist/lib/robotSession/RobotDescription.d.ts +6 -2
  80. package/dist/lib/robotSession/RobotLiveState.d.ts +7 -0
  81. package/dist/lib/robotSession/RobotSession.d.ts +3 -0
  82. package/dist/lib/robotSession/RobotTargetPose.d.ts +78 -0
  83. package/dist/lib/robotSession/robotPose.d.ts +28 -0
  84. package/package.json +1 -1
  85. package/dist/chunks/Pose3-DIyg-aZA.cjs +0 -1
  86. package/dist/chunks/Robot-B3vKEVXP.cjs +0 -1
  87. package/dist/chunks/Robot-DDD382dk.js +0 -1272
  88. package/dist/chunks/RobotHeader-BvIzk8Fw.js +0 -244
  89. package/dist/chunks/RobotHeader-Daft80jq.cjs +0 -1
  90. package/dist/chunks/loadRobotSession-C8vDrOsJ.cjs +0 -3
  91. package/dist/chunks/useEveryFrame-G_-ma1nC.js +0 -142
  92. package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +0 -1
@@ -1,62 +1,65 @@
1
- import { jsxs as _, Fragment as rt, jsx as g } from "react/jsx-runtime";
2
- import me from "@mui/material/AppBar";
3
- import Nt from "@mui/material/Backdrop";
4
- import G from "@mui/material/Box";
5
- import pe from "@mui/material/Menu";
6
- import W from "@mui/material/MenuItem";
7
- import fe from "@mui/material/Toolbar";
8
- import I from "@mui/material/Typography";
9
- import { ZeroGravityComponentsBackdropFill as ye } from "@wandelbots/design-tokens";
10
- import { ExpandMoreFilled as Se } from "@wandelbots/icons/ExpandMoreFilled";
11
- import { RoundedIconButton as ve } from "@wandelbots/mui";
12
- import { observer as A, useLocalObservable as Vt } from "mobx-react-lite";
1
+ import { jsxs as v, Fragment as rt, jsx as g } from "react/jsx-runtime";
2
+ import ye from "@mui/material/AppBar";
3
+ import Gt from "@mui/material/Backdrop";
4
+ import B from "@mui/material/Box";
5
+ import Se from "@mui/material/Menu";
6
+ import z from "@mui/material/MenuItem";
7
+ import _e from "@mui/material/Toolbar";
8
+ import M from "@mui/material/Typography";
9
+ import { ZeroGravityComponentsBackdropFill as ve } from "@wandelbots/design-tokens";
10
+ import { ExpandMoreFilled as be } from "@wandelbots/icons/ExpandMoreFilled";
11
+ import { RoundedIconButton as Ce } from "@wandelbots/mui";
12
+ import { observer as A, useLocalObservable as Ut } from "mobx-react-lite";
13
13
  import * as b from "react";
14
- import { useState as et, forwardRef as H, useEffect as st, useRef as dt, useId as _e } from "react";
15
- import { e as ot } from "./externalizeComponent-_w2d1_pz.js";
16
- import be from "@mui/icons-material/OpenWith";
17
- import Ce from "@mui/icons-material/Share";
14
+ import { useState as et, forwardRef as Y, useEffect as st, useRef as dt, useId as Ee } from "react";
15
+ import { e as ot } from "./externalizeComponent-CSzPVfuG.js";
16
+ import Ie from "@mui/icons-material/OpenWith";
17
+ import we from "@mui/icons-material/Share";
18
18
  import C from "@mui/material/Stack";
19
- import we from "@mui/material/Tab";
20
- import Me from "@mui/material/Tabs";
21
- import { runInAction as S, makeAutoObservable as $, computed as Ft, when as at, autorun as wt, reaction as pt } from "mobx";
19
+ import Me from "@mui/material/Tab";
20
+ import je from "@mui/material/Tabs";
21
+ import { runInAction as S, makeAutoObservable as L, computed as zt, when as at, autorun as It, reaction as yt } from "mobx";
22
22
  import { useTranslation as F } from "react-i18next";
23
- import Gt from "@mui/material/CircularProgress";
24
- import { capitalize as Ee } from "@mui/material/utils";
25
- import { lowerFirst as Ie, countBy as Te } from "lodash-es";
26
- import { m as je } from "./SafetyBar-eYzCHOFD.js";
27
- import xe from "@mui/material/Alert";
28
- import Oe from "@mui/material/AlertTitle";
29
- import ft from "@mui/material/Button";
30
- import { useTheme as Q, styled as Bt } from "@mui/material/styles";
31
- import Y from "@mui/material/Divider";
32
- import Mt from "@mui/material/ToggleButton";
33
- import { radiansToDegrees as Ut, tryParseJson as P, XYZ_TO_VECTOR as Et, degreesToRadians as ke, makeErrorMessage as z } from "@wandelbots/nova-js";
23
+ import Wt from "@mui/material/CircularProgress";
24
+ import { capitalize as Te } from "@mui/material/utils";
25
+ import { lowerFirst as xe, countBy as Oe } from "lodash-es";
26
+ import { m as ke } from "./robotSafetyOf-Dr5Q4rCp.js";
27
+ import Re from "@mui/material/Alert";
28
+ import Ae from "@mui/material/AlertTitle";
29
+ import St from "@mui/material/Button";
30
+ import { useTheme as K, styled as Ht } from "@mui/material/styles";
31
+ import W from "@mui/material/Divider";
32
+ import wt from "@mui/material/ToggleButton";
33
+ import { radiansToDegrees as Yt, tryParseJson as J, XYZ_TO_VECTOR as Mt, degreesToRadians as Pe, makeErrorMessage as H } from "@wandelbots/nova-js";
34
34
  import lt from "@mui/material/IconButton";
35
- import { d as bt, p as It, q as Re, c as U, e as Z, P as V } from "./Pose3-pocKPrHN.js";
36
- import { e as Tt, v as Ae, c as ut } from "./joggingColors-CuT5u0H8.js";
37
- import zt from "lodash-es/isEqual.js";
38
- import Je from "@mui/material/InputAdornment";
39
- import Pe from "@mui/material/FormControl";
40
- import De from "@mui/material/InputLabel";
41
- import $e from "@mui/material/Select";
42
- import Le from "@mui/material/ToggleButtonGroup";
43
- import Wt from "@mui/material/Slider";
44
- import Ne from "lodash-es/isNumber.js";
45
- import { JointTypeEnum as N } from "@wandelbots/nova-js/v2";
46
- import Ve from "@mui/icons-material/ChevronLeft";
47
- import Fe from "@mui/icons-material/ChevronRight";
48
- import Ge from "lodash-es/throttle.js";
49
- import Be from "@mui/material/Dialog";
50
- import Ue from "@mui/material/DialogActions";
51
- import ze from "@mui/material/DialogContent";
52
- import We from "@mui/material/DialogTitle";
53
- import * as jt from "three";
54
- import { Vector3 as X, Quaternion as Ye } from "three";
55
- import { t as Yt } from "./converters-D9KpJ2HD.js";
56
- import { isAxiosError as Ht } from "axios";
35
+ import { d as Et, c as U, e as Z } from "./useSmoothedMotionState-COMJRcOt.js";
36
+ import { e as jt, v as Je, c as mt } from "./joggingColors-CuT5u0H8.js";
37
+ import Kt from "lodash-es/isEqual.js";
38
+ import De from "@mui/material/InputAdornment";
39
+ import Le from "@mui/material/FormControl";
40
+ import $e from "@mui/material/InputLabel";
41
+ import Ve from "@mui/material/Select";
42
+ import Ne from "@mui/material/ToggleButtonGroup";
43
+ import Qt from "@mui/material/Slider";
44
+ import Fe from "lodash-es/isNumber.js";
45
+ import { JointTypeEnum as V } from "@wandelbots/nova-js/v2";
46
+ import Be from "@mui/icons-material/ChevronLeft";
47
+ import Ge from "@mui/icons-material/ChevronRight";
48
+ import Ue from "lodash-es/throttle.js";
49
+ import ze from "@mui/material/Dialog";
50
+ import We from "@mui/material/DialogActions";
51
+ import He from "@mui/material/DialogContent";
52
+ import Ye from "@mui/material/DialogTitle";
53
+ import * as Tt from "three";
54
+ import { Vector3 as X, Quaternion as Ke } from "three";
55
+ import { t as qt } from "./converters-D9KpJ2HD.js";
56
+ import { isAxiosError as Zt } from "axios";
57
57
  import q from "lodash-es/keyBy.js";
58
- import He from "lodash-es/uniqueId.js";
59
- const mn = ot(
58
+ import Qe from "lodash-es/uniqueId.js";
59
+ import { p as xt, q as qe, P as N } from "./Pose3-B_fLR-Wv.js";
60
+ import { R as Ze, b as Xe } from "./robotActivationOf-DUHukd46.js";
61
+ import { j as Ot, b as kt, p as to, a as eo } from "./useEveryFrame-DAuNawGP.js";
62
+ const xn = ot(
60
63
  A((o) => {
61
64
  const {
62
65
  appIcon: t,
@@ -72,9 +75,9 @@ const mn = ot(
72
75
  }, u = (l) => {
73
76
  m(), l.onClick ? l.onClick() : l.href && (window.location.href = l.href), n == null || n(l);
74
77
  };
75
- return /* @__PURE__ */ _(rt, { children: [
78
+ return /* @__PURE__ */ v(rt, { children: [
76
79
  /* @__PURE__ */ g(
77
- me,
80
+ ye,
78
81
  {
79
82
  position: "static",
80
83
  sx: {
@@ -86,14 +89,14 @@ const mn = ot(
86
89
  },
87
90
  ...s
88
91
  },
89
- children: /* @__PURE__ */ _(fe, { sx: { minHeight: "62px !important" }, children: [
90
- /* @__PURE__ */ g(G, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: t }),
91
- /* @__PURE__ */ _(G, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
92
- /* @__PURE__ */ g(I, { component: "h1", variant: "subtitle1", children: e }),
92
+ children: /* @__PURE__ */ v(_e, { sx: { minHeight: "62px !important" }, children: [
93
+ /* @__PURE__ */ g(B, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: t }),
94
+ /* @__PURE__ */ v(B, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
95
+ /* @__PURE__ */ g(M, { component: "h1", variant: "subtitle1", children: e }),
93
96
  i.length > 0 && /* @__PURE__ */ g(
94
- ve,
97
+ Ce,
95
98
  {
96
- icon: /* @__PURE__ */ g(Se, { size: 20 }),
99
+ icon: /* @__PURE__ */ g(be, { size: 20 }),
97
100
  ariaLabel: "switch app",
98
101
  "aria-controls": "app-menu",
99
102
  "aria-haspopup": "true",
@@ -107,19 +110,19 @@ const mn = ot(
107
110
  }
108
111
  ),
109
112
  /* @__PURE__ */ g(
110
- Nt,
113
+ Gt,
111
114
  {
112
115
  open: h,
113
116
  onClick: m,
114
117
  sx: {
115
118
  backdropFilter: "blur(4px)",
116
- backgroundColor: ye,
119
+ backgroundColor: ve,
117
120
  zIndex: (l) => l.zIndex.modal - 1
118
121
  }
119
122
  }
120
123
  ),
121
124
  /* @__PURE__ */ g(
122
- pe,
125
+ Se,
123
126
  {
124
127
  id: "app-menu",
125
128
  anchorEl: a,
@@ -140,23 +143,23 @@ const mn = ot(
140
143
  mt: 1
141
144
  }
142
145
  },
143
- children: i.map((l) => /* @__PURE__ */ _(W, { onClick: () => u(l), children: [
144
- /* @__PURE__ */ g(G, { sx: { display: "flex", alignItems: "center" }, children: l.icon }),
145
- /* @__PURE__ */ g(I, { variant: "body1", sx: { ml: 2 }, children: l.name })
146
+ children: i.map((l) => /* @__PURE__ */ v(z, { onClick: () => u(l), children: [
147
+ /* @__PURE__ */ g(B, { sx: { display: "flex", alignItems: "center" }, children: l.icon }),
148
+ /* @__PURE__ */ g(M, { variant: "body1", sx: { ml: 2 }, children: l.name })
146
149
  ] }, l.id))
147
150
  }
148
151
  )
149
152
  ] });
150
153
  })
151
- ), Qe = ({
154
+ ), oo = ({
152
155
  title: o,
153
156
  titleId: t,
154
157
  ...e
155
- }, i) => /* @__PURE__ */ b.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("g", { id: "JogMinus" }, /* @__PURE__ */ b.createElement("path", { id: "Minus", d: "M0 13V8H21V13H0Z", fill: "white" }))), Ke = H(Qe), qe = ({
158
+ }, i) => /* @__PURE__ */ b.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("g", { id: "JogMinus" }, /* @__PURE__ */ b.createElement("path", { id: "Minus", d: "M0 13V8H21V13H0Z", fill: "white" }))), io = Y(oo), no = ({
156
159
  title: o,
157
160
  titleId: t,
158
161
  ...e
159
- }, i) => /* @__PURE__ */ b.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("g", { id: "JogPlus" }, /* @__PURE__ */ b.createElement("g", { id: "Plus" }, /* @__PURE__ */ b.createElement("path", { d: "M0 13V8H8V13H0Z", fill: "white" }), /* @__PURE__ */ b.createElement("path", { d: "M8 0L13 2.18557e-07L13 21H8L8 0Z", fill: "white" }), /* @__PURE__ */ b.createElement("path", { d: "M13 13V8H21V13H13Z", fill: "white" })))), Ze = H(qe), xt = ot(
162
+ }, i) => /* @__PURE__ */ b.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("g", { id: "JogPlus" }, /* @__PURE__ */ b.createElement("g", { id: "Plus" }, /* @__PURE__ */ b.createElement("path", { d: "M0 13V8H8V13H0Z", fill: "white" }), /* @__PURE__ */ b.createElement("path", { d: "M8 0L13 2.18557e-07L13 21H8L8 0Z", fill: "white" }), /* @__PURE__ */ b.createElement("path", { d: "M13 13V8H21V13H13Z", fill: "white" })))), ro = Y(no), Rt = ot(
160
163
  A(
161
164
  ({
162
165
  colors: o,
@@ -168,14 +171,14 @@ const mn = ot(
168
171
  activeJoggingDirection: s,
169
172
  ...a
170
173
  }) => {
171
- var T, j, x, M, O, L, B;
172
- bt(() => {
173
- const J = e(), D = u.current;
174
- D && (D.textContent = J);
174
+ var j, T, x, I, O, $, G;
175
+ Et(() => {
176
+ const P = e(), D = u.current;
177
+ D && (D.textContent = P);
175
178
  });
176
- const d = Q(), [h, c] = et(null);
179
+ const d = K(), [h, c] = et(null);
177
180
  st(() => {
178
- r && E();
181
+ r && w();
179
182
  }, [r]);
180
183
  const m = s || h, u = dt(null);
181
184
  o || (o = {
@@ -190,7 +193,7 @@ const mn = ot(
190
193
  },
191
194
  labelColor: "#000"
192
195
  });
193
- const l = m ? (T = o.buttonBackgroundColor) == null ? void 0 : T.pressed : o.borderColor, p = {
196
+ const l = m ? (j = o.buttonBackgroundColor) == null ? void 0 : j.pressed : o.borderColor, p = {
194
197
  width: "55px",
195
198
  color: o.color,
196
199
  path: { fill: o.color },
@@ -201,12 +204,12 @@ const mn = ot(
201
204
  }
202
205
  }, f = {
203
206
  ...p,
204
- backgroundColor: (j = o.buttonBackgroundColor) == null ? void 0 : j.default,
207
+ backgroundColor: (T = o.buttonBackgroundColor) == null ? void 0 : T.default,
205
208
  ":hover": {
206
209
  backgroundColor: (x = o.buttonBackgroundColor) == null ? void 0 : x.hovered
207
210
  },
208
211
  ":active": {
209
- backgroundColor: (M = o.buttonBackgroundColor) == null ? void 0 : M.pressed,
212
+ backgroundColor: (I = o.buttonBackgroundColor) == null ? void 0 : I.pressed,
210
213
  color: o.backgroundColor,
211
214
  path: { fill: o.backgroundColor }
212
215
  },
@@ -214,43 +217,43 @@ const mn = ot(
214
217
  backgroundColor: (O = o.buttonBackgroundColor) == null ? void 0 : O.disabled,
215
218
  "svg path": { fill: d.palette.action.disabled }
216
219
  }
217
- }, v = {
220
+ }, _ = {
218
221
  ...p,
219
- backgroundColor: (L = o.buttonBackgroundColor) == null ? void 0 : L.pressed,
222
+ backgroundColor: ($ = o.buttonBackgroundColor) == null ? void 0 : $.pressed,
220
223
  color: o.backgroundColor,
221
224
  path: { fill: o.backgroundColor },
222
225
  ":disabled": {
223
- backgroundColor: (B = o.buttonBackgroundColor) == null ? void 0 : B.pressed,
226
+ backgroundColor: (G = o.buttonBackgroundColor) == null ? void 0 : G.pressed,
224
227
  "svg path": { fill: d.palette.action.disabled }
225
228
  }
226
229
  };
227
- function w(J, D) {
228
- r || J.button === 0 && (c(D), i(D));
230
+ function E(P, D) {
231
+ r || P.button === 0 && (c(D), i(D));
229
232
  }
230
- function E() {
233
+ function w() {
231
234
  c(null), n();
232
235
  }
233
- return /* @__PURE__ */ _(C, { height: "64px", direction: "row", justifyContent: "center", ...a, children: [
236
+ return /* @__PURE__ */ v(C, { height: "64px", direction: "row", justifyContent: "center", ...a, children: [
234
237
  /* @__PURE__ */ g(
235
238
  lt,
236
239
  {
237
240
  disabled: r,
238
241
  disableRipple: !0,
239
- onPointerDown: (J) => w(J, "-"),
240
- onPointerUp: E,
241
- onPointerOut: E,
242
+ onPointerDown: (P) => E(P, "-"),
243
+ onPointerUp: w,
244
+ onPointerOut: w,
242
245
  size: "large",
243
246
  sx: {
244
- ...m === "-" ? v : f,
247
+ ...m === "-" ? _ : f,
245
248
  borderRadius: "16px 0px 0px 16px",
246
249
  borderLeft: `2px solid ${l ?? "#fff"}`,
247
250
  borderBottom: `2px solid ${l ?? "#fff"}`,
248
251
  borderTop: `2px solid ${l ?? "#fff"}`
249
252
  },
250
- children: /* @__PURE__ */ g(Ke, {})
253
+ children: /* @__PURE__ */ g(io, {})
251
254
  }
252
255
  ),
253
- /* @__PURE__ */ _(
256
+ /* @__PURE__ */ v(
254
257
  C,
255
258
  {
256
259
  spacing: "6px",
@@ -285,7 +288,7 @@ const mn = ot(
285
288
  }
286
289
  ),
287
290
  /* @__PURE__ */ g(
288
- I,
291
+ M,
289
292
  {
290
293
  height: "22px",
291
294
  sx: {
@@ -308,24 +311,24 @@ const mn = ot(
308
311
  {
309
312
  disableRipple: !0,
310
313
  disabled: r,
311
- onPointerDown: (J) => w(J, "+"),
312
- onPointerUp: E,
313
- onPointerOut: E,
314
+ onPointerDown: (P) => E(P, "+"),
315
+ onPointerUp: w,
316
+ onPointerOut: w,
314
317
  size: "large",
315
318
  sx: {
316
- ...m === "+" ? v : f,
319
+ ...m === "+" ? _ : f,
317
320
  borderRadius: "0px 16px 16px 0px",
318
321
  borderRight: `2px solid ${l ?? "#fff"}`,
319
322
  borderBottom: `2px solid ${l ?? "#fff"}`,
320
323
  borderTop: `2px solid ${l ?? "#fff"}`
321
324
  },
322
- children: /* @__PURE__ */ g(Ze, {})
325
+ children: /* @__PURE__ */ g(ro, {})
323
326
  }
324
327
  )
325
328
  ] });
326
329
  }
327
330
  )
328
- ), Xe = ot(
331
+ ), so = ot(
329
332
  A(
330
333
  ({
331
334
  startJogging: o,
@@ -337,11 +340,11 @@ const mn = ot(
337
340
  disabled: s,
338
341
  ...a
339
342
  }) => {
340
- var M, O, L, B, J, D, it;
341
- const { t: d } = F(), [h, c] = et(), m = Q(), u = {
342
- background: (M = m.palette.backgroundPaperElevation) == null ? void 0 : M[4],
343
+ var I, O, $, G, P, D, it;
344
+ const { t: d } = F(), [h, c] = et(), m = K(), u = {
345
+ background: (I = m.palette.backgroundPaperElevation) == null ? void 0 : I[4],
343
346
  color: (O = m.palette.backgroundPaperElevation) == null ? void 0 : O[11]
344
- }, l = Vt(() => ({
347
+ }, l = Ut(() => ({
345
348
  activeJoggingDir: null,
346
349
  startJogging(y) {
347
350
  this.activeJoggingDir = y, o(y);
@@ -349,28 +352,28 @@ const mn = ot(
349
352
  stopJogging() {
350
353
  this.activeJoggingDir = null, t();
351
354
  }
352
- })), p = Ge(() => {
355
+ })), p = Ue(() => {
353
356
  const y = n ? f(r()) : r();
354
357
  (y === void 0 || h === void 0 || Math.abs(h - y) > 1e-9) && c(y);
355
358
  }, 50);
356
- bt(p);
359
+ Et(p);
357
360
  function f(y) {
358
361
  if (y !== void 0)
359
- return Ut(y);
362
+ return Yt(y);
360
363
  }
361
- function v(y) {
364
+ function _(y) {
362
365
  y.button === 0 && l.startJogging("-");
363
366
  }
364
- function w(y) {
367
+ function E(y) {
365
368
  y.button === 0 && l.startJogging("+");
366
369
  }
367
- function E(y) {
370
+ function w(y) {
368
371
  l.stopJogging();
369
372
  }
370
- function T(y) {
373
+ function j(y) {
371
374
  l.stopJogging();
372
375
  }
373
- function j(y, k = 1) {
376
+ function T(y, k = 1) {
374
377
  if (y === void 0 || Number.isNaN(y)) return "";
375
378
  const R = d("General.degree.variable", {
376
379
  amount: y.toFixed(k)
@@ -384,7 +387,7 @@ const mn = ot(
384
387
  });
385
388
  return y > 0 && k === 0 ? `+${R}` : R;
386
389
  }
387
- return /* @__PURE__ */ _(
390
+ return /* @__PURE__ */ v(
388
391
  C,
389
392
  {
390
393
  height: "64px",
@@ -397,18 +400,18 @@ const mn = ot(
397
400
  width: "52px",
398
401
  color: m.palette.text.primary,
399
402
  alignContent: "center",
400
- backgroundColor: (L = m.palette.backgroundPaperElevation) == null ? void 0 : L[11],
403
+ backgroundColor: ($ = m.palette.backgroundPaperElevation) == null ? void 0 : $[11],
401
404
  "& svg": {
402
405
  width: "42px",
403
406
  height: "42px"
404
407
  },
405
408
  "&.Mui-disabled": {
406
- backgroundColor: (B = m.palette.backgroundPaperElevation) == null ? void 0 : B[11],
409
+ backgroundColor: (G = m.palette.backgroundPaperElevation) == null ? void 0 : G[11],
407
410
  color: m.palette.action.disabled,
408
411
  opacity: 1
409
412
  },
410
413
  "&:hover": {
411
- backgroundColor: (J = m.palette.backgroundPaperElevation) == null ? void 0 : J[9]
414
+ backgroundColor: (P = m.palette.backgroundPaperElevation) == null ? void 0 : P[9]
412
415
  },
413
416
  "&:active": {
414
417
  ...u
@@ -419,9 +422,9 @@ const mn = ot(
419
422
  /* @__PURE__ */ g(
420
423
  lt,
421
424
  {
422
- onPointerDown: v,
423
- onPointerUp: E,
424
- onPointerOut: T,
425
+ onPointerDown: _,
426
+ onPointerUp: w,
427
+ onPointerOut: j,
425
428
  disabled: s,
426
429
  disableRipple: !0,
427
430
  sx: {
@@ -429,17 +432,17 @@ const mn = ot(
429
432
  ...l.activeJoggingDir === "-" ? u : {}
430
433
  },
431
434
  children: /* @__PURE__ */ g(
432
- Ve,
435
+ Be,
433
436
  {
434
437
  sx: {
435
438
  pointerEvents: "none",
436
- color: Tt
439
+ color: jt
437
440
  }
438
441
  }
439
442
  )
440
443
  }
441
444
  ),
442
- /* @__PURE__ */ _(
445
+ /* @__PURE__ */ v(
443
446
  C,
444
447
  {
445
448
  flexGrow: 1,
@@ -457,7 +460,7 @@ const mn = ot(
457
460
  },
458
461
  children: [
459
462
  /* @__PURE__ */ g(
460
- I,
463
+ M,
461
464
  {
462
465
  sx: {
463
466
  fontSize: "15px",
@@ -469,11 +472,11 @@ const mn = ot(
469
472
  textAlign: "center",
470
473
  color: s ? m.palette.action.disabled : m.palette.text.primary
471
474
  },
472
- children: n ? j(h) : x(h)
475
+ children: n ? T(h) : x(h)
473
476
  }
474
477
  ),
475
478
  /* @__PURE__ */ g(
476
- Wt,
479
+ Qt,
477
480
  {
478
481
  disabled: !0,
479
482
  "aria-label": "Joint position",
@@ -504,11 +507,11 @@ const mn = ot(
504
507
  marks: e !== void 0 && i !== void 0 && [
505
508
  {
506
509
  value: n ? f(e) : e,
507
- label: n ? j(f(e), 0) : x(e)
510
+ label: n ? T(f(e), 0) : x(e)
508
511
  },
509
512
  {
510
513
  value: n ? f(i) : i,
511
- label: n ? j(f(i), 0) : x(i)
514
+ label: n ? T(f(i), 0) : x(i)
512
515
  }
513
516
  ]
514
517
  }
@@ -519,9 +522,9 @@ const mn = ot(
519
522
  /* @__PURE__ */ g(
520
523
  lt,
521
524
  {
522
- onPointerDown: w,
523
- onPointerUp: E,
524
- onPointerOut: T,
525
+ onPointerDown: E,
526
+ onPointerUp: w,
527
+ onPointerOut: j,
525
528
  disabled: s,
526
529
  disableRipple: !0,
527
530
  sx: {
@@ -529,11 +532,11 @@ const mn = ot(
529
532
  ...l.activeJoggingDir === "+" ? u : {}
530
533
  },
531
534
  children: /* @__PURE__ */ g(
532
- Fe,
535
+ Ge,
533
536
  {
534
537
  sx: {
535
538
  pointerEvents: "none",
536
- color: Tt
539
+ color: jt
537
540
  }
538
541
  }
539
542
  )
@@ -545,7 +548,7 @@ const mn = ot(
545
548
  }
546
549
  )
547
550
  );
548
- function to({
551
+ function ao({
549
552
  currentTcpPose: o,
550
553
  axis: t,
551
554
  direction: e,
@@ -566,7 +569,7 @@ function to({
566
569
  "Current pose has no orientation, cannot translate relative to tool"
567
570
  );
568
571
  u.applyQuaternion(
569
- It(
572
+ xt(
570
573
  o.orientation,
571
574
  "ROTATION_VECTOR"
572
575
  )
@@ -580,27 +583,27 @@ function to({
580
583
  }
581
584
  if (!o.orientation)
582
585
  throw new Error("Current pose has no orientation, cannot perform rotation");
583
- const a = It(
586
+ const a = xt(
584
587
  o.orientation,
585
588
  "ROTATION_VECTOR"
586
589
  ), d = new X();
587
590
  d[t] = 1, !n && r && d.applyQuaternion(r);
588
- const h = new Ye().setFromAxisAngle(
591
+ const h = new Ke().setFromAxisAngle(
589
592
  d,
590
593
  i.distanceRads * s
591
594
  ), c = n ? a.multiply(h) : h.multiply(a);
592
595
  return {
593
596
  position: o.position,
594
- orientation: [...Re(c)]
597
+ orientation: [...qe(c)]
595
598
  };
596
599
  }
597
- function Ct(o, t, e) {
598
- return t.length !== o.length ? !1 : Kt(o, t, e);
600
+ function gt(o, t, e) {
601
+ return t.length !== o.length ? !1 : te(o, t, e);
599
602
  }
600
- function Qt(o, t, e) {
601
- return t.length !== o.length ? !0 : Kt(o, t, e);
603
+ function Xt(o, t, e) {
604
+ return t.length !== o.length ? !0 : te(o, t, e);
602
605
  }
603
- function Kt(o, t, e) {
606
+ function te(o, t, e) {
604
607
  for (let i = 0; i < t.length; i++)
605
608
  if (Math.abs(
606
609
  (t[i] ?? 0) - (o[i] ?? 0)
@@ -608,7 +611,7 @@ function Kt(o, t, e) {
608
611
  return !1;
609
612
  return !0;
610
613
  }
611
- function eo(o, t, e) {
614
+ function lo(o, t, e) {
612
615
  if (o === void 0 && t || o && t === void 0 || (o == null ? void 0 : o.orientation) === void 0 || (t == null ? void 0 : t.orientation) === void 0 || (o == null ? void 0 : o.position) === void 0 || (t == null ? void 0 : t.position) === void 0)
613
616
  return !1;
614
617
  if (o === void 0 || t === void 0)
@@ -616,14 +619,14 @@ function eo(o, t, e) {
616
619
  let i = 0;
617
620
  return i += Math.abs(o.orientation[0] - t.orientation[0]), i += Math.abs(o.orientation[1] - t.orientation[1]), i += Math.abs(o.orientation[2] - t.orientation[2]), i += Math.abs(o.position[0] - t.position[0]), i += Math.abs(o.position[1] - t.position[1]), i += Math.abs(o.position[2] - t.position[2]), i <= e;
618
621
  }
619
- function qt(o, t, e) {
620
- return o.coordinate_system === t.coordinate_system && o.tcp === t.tcp && eo(
622
+ function ee(o, t, e) {
623
+ return o.coordinate_system === t.coordinate_system && o.tcp === t.tcp && lo(
621
624
  o.tcp_pose,
622
625
  t.tcp_pose,
623
626
  e
624
627
  );
625
628
  }
626
- function Zt(o, t) {
629
+ function oe(o, t) {
627
630
  const e = new X(
628
631
  t[0],
629
632
  t[1],
@@ -638,47 +641,47 @@ function Zt(o, t) {
638
641
  let d = s - n;
639
642
  return d -= 2 * Math.PI * Math.floor((d + Math.PI) / (2 * Math.PI)), s = n + d, [...a.multiplyScalar(s)];
640
643
  }
641
- const oo = 2e-4;
642
- function Xt(o) {
644
+ const co = 2e-4;
645
+ function ie(o) {
643
646
  const { joint_position: t, tcp_pose: e, tcp: i, coordinate_system: n } = o;
644
647
  return { joint_position: t, tcp_pose: e, tcp: i, coordinate_system: n };
645
648
  }
646
- function te(o, t) {
647
- return o.tcp === t.tcp && o.coordinate_system === t.coordinate_system && o.tcp_pose === void 0 == (t.tcp_pose === void 0) && Ct(
649
+ function ne(o, t) {
650
+ return o.tcp === t.tcp && o.coordinate_system === t.coordinate_system && o.tcp_pose === void 0 == (t.tcp_pose === void 0) && gt(
648
651
  o.joint_position,
649
652
  t.joint_position,
650
- oo
653
+ co
651
654
  );
652
655
  }
653
- const Ot = 1e-4;
654
- class gt {
656
+ const At = 1e-4;
657
+ class ht {
655
658
  constructor(t, e, i, n, r, s, a = "cell", d = {}) {
656
659
  this.controller = e, this.motionGroup = i, this.description = n, this.initialMotionState = r, this.motionStateSocket = s, this.cellId = a, this.nova = U(t), this.logger = d.logger ?? console, this.rapidlyChangingMotionState = r, s.addEventListener("message", (h) => {
657
660
  var l;
658
- const c = (l = P(h.data)) == null ? void 0 : l.result;
661
+ const c = (l = J(h.data)) == null ? void 0 : l.result;
659
662
  if (!c)
660
663
  throw new Error(
661
664
  `Failed to get motion state for ${this.motionGroupId}: ${h.data}`
662
665
  );
663
- qt(
666
+ ee(
664
667
  this.rapidlyChangingMotionState,
665
668
  c,
666
- Ot
669
+ At
667
670
  ) || S(() => {
668
- var p, f, v;
669
- this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = c.tcp_pose : (p = c.tcp_pose) != null && p.orientation && ((f = c.tcp_pose) != null && f.position) && ((v = this.rapidlyChangingMotionState.tcp_pose) != null && v.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
671
+ var p, f, _;
672
+ this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = c.tcp_pose : (p = c.tcp_pose) != null && p.orientation && ((f = c.tcp_pose) != null && f.position) && ((_ = this.rapidlyChangingMotionState.tcp_pose) != null && _.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
670
673
  position: c.tcp_pose.position,
671
- orientation: Zt(
674
+ orientation: oe(
672
675
  c.tcp_pose.orientation,
673
676
  this.rapidlyChangingMotionState.tcp_pose.orientation
674
677
  )
675
678
  } : this.logger.debug("Received incomplete tcp_pose, ignoring", {
676
679
  tcpPose: c.tcp_pose
677
680
  });
678
- }), Qt(
681
+ }), Xt(
679
682
  this.rapidlyChangingMotionState.joint_position,
680
683
  c.joint_position,
681
- Ot
684
+ At
682
685
  ) || S(() => {
683
686
  this.rapidlyChangingMotionState.joint_position = c.joint_position;
684
687
  }), c.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== c.tcp && S(() => {
@@ -692,12 +695,12 @@ class gt {
692
695
  }), this.rapidlyChangingMotionState.execute !== c.execute && S(() => {
693
696
  this.rapidlyChangingMotionState.execute = c.execute;
694
697
  });
695
- }), $(this, {
698
+ }), L(this, {
696
699
  logger: !1,
697
700
  // keepAlive: pose readouts poll it from requestAnimationFrame, which
698
701
  // MobX does not track, and a computed nobody observes is recomputed on
699
702
  // every read without consulting `equals`
700
- readoutState: Ft({ equals: te, keepAlive: !0 })
703
+ readoutState: zt({ equals: ne, keepAlive: !0 })
701
704
  });
702
705
  }
703
706
  static async open(t, e, i = {}) {
@@ -706,7 +709,7 @@ class gt {
706
709
  r,
707
710
  a
708
711
  ), h = d == null ? void 0 : d.motion_groups.find(
709
- (v) => v.motion_group === e
712
+ (_) => _.motion_group === e
710
713
  );
711
714
  if (!d || !h)
712
715
  throw new Error(
@@ -714,7 +717,7 @@ class gt {
714
717
  );
715
718
  const c = n.openReconnectingWebsocket(
716
719
  `/cells/${r}/controllers/${a}/motion-groups/${e}/state-stream`
717
- ), m = await c.firstMessage(), u = (f = P(m.data)) == null ? void 0 : f.result;
720
+ ), m = await c.firstMessage(), u = (f = J(m.data)) == null ? void 0 : f.result;
718
721
  if (!u)
719
722
  throw new Error(
720
723
  `Unable to parse initial motion state message ${m.data}`
@@ -729,7 +732,7 @@ class gt {
729
732
  a,
730
733
  h.motion_group
731
734
  );
732
- return new gt(
735
+ return new ht(
733
736
  n,
734
737
  d,
735
738
  h,
@@ -746,7 +749,7 @@ class gt {
746
749
  * also holds for untracked reads, e.g. from requestAnimationFrame.
747
750
  */
748
751
  get readoutState() {
749
- return Xt(this.rapidlyChangingMotionState);
752
+ return ie(this.rapidlyChangingMotionState);
750
753
  }
751
754
  get motionGroupId() {
752
755
  return this.motionGroup.motion_group;
@@ -763,12 +766,12 @@ class gt {
763
766
  this.motionStateSocket.close();
764
767
  }
765
768
  }
766
- const kt = "Movement request rejected. Another client is currently executing a 'Jogging' motion!", io = 500, no = 5e3;
767
- function ro(o) {
769
+ const Pt = "Movement request rejected. Another client is currently executing a 'Jogging' motion!", go = 500, ho = 5e3;
770
+ function uo(o) {
768
771
  var e;
769
- return (((e = o.times) == null ? void 0 : e[o.times.length - 1]) ?? 0) * 2e3 + no;
772
+ return (((e = o.times) == null ? void 0 : e[o.times.length - 1]) ?? 0) * 2e3 + ho;
770
773
  }
771
- class ht {
774
+ class ut {
772
775
  constructor(t, e = {}) {
773
776
  this.motionStream = t, this.options = e, this.DEFAULT_MODE = "off", this.DEFAULT_TCP = "Flange", this.NO_TCP = void 0, this.DEFAULT_INIT_TIMEOUT = 5e3, this.DEFAULT_ORIENTATION = "coordsys", this.mode = "off", this.joggingSocket = null, this.trajectorySocket = null, this.timeout = this.DEFAULT_INIT_TIMEOUT, this.incrementalMotionInFlight = !1, this.ownsMotionStream = !1, this.tcp = (e == null ? void 0 : e.tcp) || t.motionGroup.tcp || this.getDefaultTcp(t), this.coordinateSystem = e == null ? void 0 : e.coordinateSystem, this.orientation = (e == null ? void 0 : e.orientation) || this.DEFAULT_ORIENTATION, this.timeout = (e == null ? void 0 : e.timeout) || this.DEFAULT_INIT_TIMEOUT, this.mode = (e == null ? void 0 : e.mode) || this.DEFAULT_MODE, this.onError = e == null ? void 0 : e.onError, this.logger = (e == null ? void 0 : e.logger) ?? console;
774
777
  }
@@ -793,14 +796,14 @@ class ht {
793
796
  * `dispose()` also closes the motion stream that this function opens.
794
797
  */
795
798
  static async open(t, e, i = {}) {
796
- const n = await gt.open(
799
+ const n = await ht.open(
797
800
  t,
798
801
  e,
799
802
  {
800
803
  cellId: i.cellId,
801
804
  logger: i.logger
802
805
  }
803
- ), r = new ht(n, i);
806
+ ), r = new ut(n, i);
804
807
  r.ownsMotionStream = !0;
805
808
  try {
806
809
  await r.setJoggingMode(r.mode);
@@ -812,7 +815,7 @@ class ht {
812
815
  getDefaultTcp(t) {
813
816
  var i, n;
814
817
  const e = (n = (i = t.description.dh_parameters) == null ? void 0 : i[0]) == null ? void 0 : n.type;
815
- return t.joints.length < 6 && (e === N.RevoluteJoint || e === N.PrismaticJoint) ? this.NO_TCP : this.DEFAULT_TCP;
818
+ return t.joints.length < 6 && (e === V.RevoluteJoint || e === V.PrismaticJoint) ? this.NO_TCP : this.DEFAULT_TCP;
816
819
  }
817
820
  // Set a new tcp or other options. If current mode is jogging, will reinitialize the jogging websocket
818
821
  async setOptions(t) {
@@ -907,13 +910,13 @@ class ht {
907
910
  };
908
911
  this.endJoggingInit = a, i.addEventListener("close", d), i.addEventListener("message", (h) => {
909
912
  var m, u, l;
910
- const c = P(h.data);
913
+ const c = J(h.data);
911
914
  if (((m = c == null ? void 0 : c.result) == null ? void 0 : m.kind) === "INITIALIZE_RECEIVED") {
912
915
  s();
913
916
  return;
914
917
  }
915
918
  if (((u = c == null ? void 0 : c.result) == null ? void 0 : u.kind) === "MOTION_ERROR")
916
- if (this.onBlocked && ((l = c == null ? void 0 : c.result) != null && l.message.includes(kt))) {
919
+ if (this.onBlocked && ((l = c == null ? void 0 : c.result) != null && l.message.includes(Pt))) {
917
920
  s(), i.dispose(), this.onBlocked();
918
921
  return;
919
922
  } else this.onError ? (s(), this.onError(h.data)) : s(new Error(h.data));
@@ -994,7 +997,7 @@ class ht {
994
997
  */
995
998
  get coordinateSystemRotation() {
996
999
  if (!(this.orientation === "tool" || !this.coordinateSystem))
997
- return V.fromCoordinateSystem(this.coordinateSystem).quaternion;
1000
+ return N.fromCoordinateSystem(this.coordinateSystem).quaternion;
998
1001
  }
999
1002
  /**
1000
1003
  * Velocity vector along one axis of the jogging frame. The API takes TCP
@@ -1051,8 +1054,8 @@ class ht {
1051
1054
  direction: r,
1052
1055
  motion: s
1053
1056
  }) {
1054
- var f, v, w;
1055
- const a = [], d = to({
1057
+ var f, _, E;
1058
+ const a = [], d = ao({
1056
1059
  currentTcpPose: t,
1057
1060
  axis: n,
1058
1061
  direction: r,
@@ -1077,8 +1080,8 @@ class ht {
1077
1080
  );
1078
1081
  return;
1079
1082
  }
1080
- const c = this.motionStream.rapidlyChangingMotionState.tcp, m = c ? (v = (f = h.tcps) == null ? void 0 : f[c]) == null ? void 0 : v.pose : void 0, u = {
1081
- motion_group_model: ((w = this.options) == null ? void 0 : w.motionGroupModel) ?? h.motion_group_model,
1083
+ const c = this.motionStream.rapidlyChangingMotionState.tcp, m = c ? (_ = (f = h.tcps) == null ? void 0 : f[c]) == null ? void 0 : _.pose : void 0, u = {
1084
+ motion_group_model: ((E = this.options) == null ? void 0 : E.motionGroupModel) ?? h.motion_group_model,
1082
1085
  cycle_time: h.cycle_time,
1083
1086
  mounting: h.mounting,
1084
1087
  tcp_offset: m,
@@ -1144,14 +1147,14 @@ class ht {
1144
1147
  }
1145
1148
  };
1146
1149
  r = h, this.endIncrementalMotion = h;
1147
- const m = ro(t);
1150
+ const m = uo(t);
1148
1151
  n = setTimeout(() => {
1149
1152
  c(
1150
1153
  new Error(`Jogging motion did not complete within ${m}ms`)
1151
1154
  );
1152
1155
  }, m), e.addEventListener("message", (u) => {
1153
1156
  var p, f;
1154
- const l = (p = P(u.data)) == null ? void 0 : p.result;
1157
+ const l = (p = J(u.data)) == null ? void 0 : p.result;
1155
1158
  if (!(l != null && l.kind)) {
1156
1159
  c(
1157
1160
  new Error(
@@ -1160,7 +1163,7 @@ class ht {
1160
1163
  );
1161
1164
  return;
1162
1165
  }
1163
- if (this.onBlocked && ((f = l.message) != null && f.includes(kt))) {
1166
+ if (this.onBlocked && ((f = l.message) != null && f.includes(Pt))) {
1164
1167
  this.onBlocked(), h();
1165
1168
  return;
1166
1169
  }
@@ -1210,13 +1213,13 @@ class ht {
1210
1213
  async waitForMotionToFinish(t) {
1211
1214
  const e = () => this.motionStream.rapidlyChangingMotionState.standstill;
1212
1215
  await at(() => !e(), {
1213
- timeout: io,
1216
+ timeout: go,
1214
1217
  signal: t
1215
1218
  }).catch(() => {
1216
1219
  }), await at(e, { signal: t });
1217
1220
  }
1218
1221
  }
1219
- const so = (o) => {
1222
+ const mo = (o) => {
1220
1223
  const t = o.softTimeout || 3e3, [e, i] = et(!1);
1221
1224
  return st(() => {
1222
1225
  const n = setTimeout(() => {
@@ -1232,16 +1235,16 @@ const so = (o) => {
1232
1235
  justifyContent: "center",
1233
1236
  sx: { color: "text.primary" },
1234
1237
  children: o.error ? /* @__PURE__ */ g(
1235
- ao,
1238
+ po,
1236
1239
  {
1237
1240
  loadingMessage: o.message,
1238
1241
  error: o.error
1239
1242
  }
1240
- ) : /* @__PURE__ */ _(rt, { children: [
1241
- /* @__PURE__ */ g(Gt, { sx: { mb: 3 } }),
1242
- !!o.message && /* @__PURE__ */ g(I, { variant: "body1", children: o.message }),
1243
+ ) : /* @__PURE__ */ v(rt, { children: [
1244
+ /* @__PURE__ */ g(Wt, { sx: { mb: 3 } }),
1245
+ !!o.message && /* @__PURE__ */ g(M, { variant: "body1", children: o.message }),
1243
1246
  /* @__PURE__ */ g(
1244
- I,
1247
+ M,
1245
1248
  {
1246
1249
  variant: "body2",
1247
1250
  sx: {
@@ -1255,9 +1258,9 @@ const so = (o) => {
1255
1258
  ] })
1256
1259
  }
1257
1260
  );
1258
- }, ao = (o) => {
1259
- const t = je(o.error), e = o.error instanceof Error ? o.error.stack : null;
1260
- return /* @__PURE__ */ _(
1261
+ }, po = (o) => {
1262
+ const t = ke(o.error), e = o.error instanceof Error ? o.error.stack : null;
1263
+ return /* @__PURE__ */ v(
1261
1264
  C,
1262
1265
  {
1263
1266
  sx: {
@@ -1268,9 +1271,9 @@ const so = (o) => {
1268
1271
  color: "error.main"
1269
1272
  },
1270
1273
  children: [
1271
- /* @__PURE__ */ g(I, { variant: "body1", children: (o.loadingMessage ? `Error while ${Ie(Ee(o.loadingMessage))} - ` : "") + t }),
1274
+ /* @__PURE__ */ g(M, { variant: "body1", children: (o.loadingMessage ? `Error while ${xe(Te(o.loadingMessage))} - ` : "") + t }),
1272
1275
  e && /* @__PURE__ */ g(
1273
- G,
1276
+ B,
1274
1277
  {
1275
1278
  component: "pre",
1276
1279
  sx: {
@@ -1287,10 +1290,10 @@ const so = (o) => {
1287
1290
  ]
1288
1291
  }
1289
1292
  );
1290
- }, lo = A(({ store: o }) => {
1293
+ }, fo = A(({ store: o }) => {
1291
1294
  const { t } = F();
1292
1295
  return /* @__PURE__ */ g(
1293
- Nt,
1296
+ Gt,
1294
1297
  {
1295
1298
  "data-testid": "jogging-blocked",
1296
1299
  "aria-label": "jogging-blocked",
@@ -1303,13 +1306,13 @@ const so = (o) => {
1303
1306
  justifyContent: "flex-start",
1304
1307
  alignItems: "flex-start"
1305
1308
  },
1306
- children: /* @__PURE__ */ _(C, { sx: { m: 2, width: "100%" }, children: [
1307
- /* @__PURE__ */ _(xe, { severity: "error", sx: { mb: 2 }, children: [
1308
- /* @__PURE__ */ g(Oe, { children: t("Jogging.Blocked.ti") }),
1309
+ children: /* @__PURE__ */ v(C, { sx: { m: 2, width: "100%" }, children: [
1310
+ /* @__PURE__ */ v(Re, { severity: "error", sx: { mb: 2 }, children: [
1311
+ /* @__PURE__ */ g(Ae, { children: t("Jogging.Blocked.ti") }),
1309
1312
  t("Jogging.Blocked.lb")
1310
1313
  ] }),
1311
1314
  /* @__PURE__ */ g(
1312
- ft,
1315
+ St,
1313
1316
  {
1314
1317
  variant: "contained",
1315
1318
  color: "secondary",
@@ -1320,36 +1323,36 @@ const so = (o) => {
1320
1323
  ] })
1321
1324
  }
1322
1325
  );
1323
- }), co = ({
1326
+ }), yo = ({
1324
1327
  title: o,
1325
1328
  titleId: t,
1326
1329
  ...e
1327
- }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), go = H(co), ho = ({
1330
+ }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), So = Y(yo), _o = ({
1328
1331
  title: o,
1329
1332
  titleId: t,
1330
1333
  ...e
1331
- }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), uo = H(ho), mo = ({
1334
+ }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), vo = Y(_o), bo = ({
1332
1335
  title: o,
1333
1336
  titleId: t,
1334
1337
  ...e
1335
- }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 19, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z", clipRule: "evenodd" })), po = H(mo), fo = ({
1338
+ }, i) => /* @__PURE__ */ b.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 19, fill: "none", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z", clipRule: "evenodd" })), Co = Y(bo), Eo = ({
1336
1339
  title: o,
1337
1340
  titleId: t,
1338
1341
  ...e
1339
- }, i) => /* @__PURE__ */ b.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { d: "M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z", fill: "white" })), yo = H(fo), ee = A(
1342
+ }, i) => /* @__PURE__ */ b.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...e }, o ? /* @__PURE__ */ b.createElement("title", { id: t }, o) : null, /* @__PURE__ */ b.createElement("path", { d: "M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z", fill: "white" })), Io = Y(Eo), re = A(
1340
1343
  ({ store: o }) => {
1341
1344
  const { t } = F(), [e, i] = et(
1342
1345
  o.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached
1343
1346
  ), n = dt(e);
1344
- bt(() => {
1347
+ Et(() => {
1345
1348
  const s = o.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;
1346
- zt(n.current, s) || (n.current = s, i(s));
1349
+ Kt(n.current, s) || (n.current = s, i(s));
1347
1350
  });
1348
1351
  const r = [];
1349
1352
  for (const [s, a] of e.entries())
1350
1353
  a && r.push(s);
1351
1354
  return /* @__PURE__ */ g(
1352
- G,
1355
+ B,
1353
1356
  {
1354
1357
  sx: {
1355
1358
  display: "flex",
@@ -1357,7 +1360,7 @@ const so = (o) => {
1357
1360
  justifyContent: "center"
1358
1361
  },
1359
1362
  children: /* @__PURE__ */ g(
1360
- I,
1363
+ M,
1361
1364
  {
1362
1365
  "data-testid": "jogging-joint-limit-detector",
1363
1366
  "aria-label": "jogging-joint-limit-detector",
@@ -1376,7 +1379,7 @@ const so = (o) => {
1376
1379
  }
1377
1380
  );
1378
1381
  }
1379
- ), So = Bt(Pe)(({ theme: o }) => ({
1382
+ ), wo = Ht(Le)(({ theme: o }) => ({
1380
1383
  "&.MuiFormControl-root": {
1381
1384
  ".MuiSelect-select": {
1382
1385
  paddingTop: "20px",
@@ -1397,31 +1400,31 @@ function nt({
1397
1400
  labelValue: o,
1398
1401
  ...t
1399
1402
  }) {
1400
- return /* @__PURE__ */ _(So, { fullWidth: !0, variant: "filled", children: [
1401
- /* @__PURE__ */ g(De, { id: t.labelId, children: o }),
1402
- /* @__PURE__ */ g($e, { ...t })
1403
+ return /* @__PURE__ */ v(wo, { fullWidth: !0, variant: "filled", children: [
1404
+ /* @__PURE__ */ g($e, { id: t.labelId, children: o }),
1405
+ /* @__PURE__ */ g(Ve, { ...t })
1403
1406
  ] });
1404
1407
  }
1405
- function Rt(o) {
1408
+ function Jt(o) {
1406
1409
  const t = o.lastIndexOf("On");
1407
1410
  return t > 0 ? o.slice(0, t) : o;
1408
1411
  }
1409
- function oe(o, t) {
1412
+ function se(o, t) {
1410
1413
  const e = o[t];
1411
1414
  if (e)
1412
1415
  return e;
1413
- const i = Rt(t), n = o[i];
1416
+ const i = Jt(t), n = o[i];
1414
1417
  if (n)
1415
1418
  return n;
1416
1419
  const r = Object.keys(o).filter(
1417
- (a) => Rt(a) === i
1420
+ (a) => Jt(a) === i
1418
1421
  );
1419
1422
  if (r.length !== 1)
1420
1423
  return;
1421
1424
  const s = r[0];
1422
1425
  return s ? o[s] : void 0;
1423
1426
  }
1424
- const vo = {
1427
+ const Mo = {
1425
1428
  coordinate_system: "world",
1426
1429
  name: "world",
1427
1430
  reference_coordinate_system: "",
@@ -1429,7 +1432,7 @@ const vo = {
1429
1432
  orientation: [0, 0, 0],
1430
1433
  orientation_type: "ROTATION_VECTOR"
1431
1434
  };
1432
- function ie(o) {
1435
+ function ae(o) {
1433
1436
  const t = q(
1434
1437
  o.map((n) => ({
1435
1438
  ...n,
@@ -1437,12 +1440,12 @@ function ie(o) {
1437
1440
  })),
1438
1441
  "coordinate_system"
1439
1442
  );
1440
- t.world ?? (t.world = vo);
1443
+ t.world ?? (t.world = Mo);
1441
1444
  const e = {}, i = (n) => {
1442
1445
  const r = e[n];
1443
1446
  if (r)
1444
1447
  return r;
1445
- const s = oe(t, n);
1448
+ const s = se(t, n);
1446
1449
  if (!s)
1447
1450
  throw new Error(
1448
1451
  `Unknown coordinate system ${n}. Known coordinate systems are: ${Object.keys(t).join(", ")}`
@@ -1452,8 +1455,8 @@ function ie(o) {
1452
1455
  if (a === "world")
1453
1456
  d = s;
1454
1457
  else {
1455
- const h = i(a), c = V.fromCoordinateSystem(h).multiply(
1456
- V.fromCoordinateSystem(s)
1458
+ const h = i(a), c = N.fromCoordinateSystem(h).multiply(
1459
+ N.fromCoordinateSystem(s)
1457
1460
  );
1458
1461
  d = {
1459
1462
  ...s,
@@ -1480,8 +1483,8 @@ function ie(o) {
1480
1483
  ])
1481
1484
  );
1482
1485
  }
1483
- function yt(o, t) {
1484
- const e = oe(
1486
+ function _t(o, t) {
1487
+ const e = se(
1485
1488
  o,
1486
1489
  t || "world"
1487
1490
  );
@@ -1491,19 +1494,19 @@ function yt(o, t) {
1491
1494
  );
1492
1495
  return e;
1493
1496
  }
1494
- function _o(o, t) {
1495
- return yt(
1496
- ie(t),
1497
+ function jo(o, t) {
1498
+ return _t(
1499
+ ae(t),
1497
1500
  o
1498
1501
  );
1499
1502
  }
1500
1503
  function ct(o, t, e) {
1501
1504
  if (o.coordinateSystemId === t)
1502
1505
  return o;
1503
- const i = ie(e), n = yt(
1506
+ const i = ae(e), n = _t(
1504
1507
  i,
1505
1508
  o.coordinateSystemId || "world"
1506
- ), r = yt(
1509
+ ), r = _t(
1507
1510
  i,
1508
1511
  t
1509
1512
  );
@@ -1512,9 +1515,9 @@ function ct(o, t, e) {
1512
1515
  ...o,
1513
1516
  coordinateSystemId: r.coordinate_system
1514
1517
  };
1515
- const s = V.fromCoordinateSystem(r).inverse().multiply(
1516
- V.fromCoordinateSystem(n).multiply(
1517
- V.fromPose(o.pose)
1518
+ const s = N.fromCoordinateSystem(r).inverse().multiply(
1519
+ N.fromCoordinateSystem(n).multiply(
1520
+ N.fromPose(o.pose)
1518
1521
  )
1519
1522
  );
1520
1523
  return {
@@ -1534,14 +1537,14 @@ function ct(o, t, e) {
1534
1537
  coordinateSystemId: r.coordinate_system
1535
1538
  };
1536
1539
  }
1537
- function ne(o, t, e) {
1538
- const i = V.fromPose(o).multiply(V.fromRobotTcp(t).inverse()).multiply(V.fromRobotTcp(e)), { position: n, orientation: r } = i;
1540
+ function le(o, t, e) {
1541
+ const i = N.fromPose(o).multiply(N.fromRobotTcp(t).inverse()).multiply(N.fromRobotTcp(e)), { position: n, orientation: r } = i;
1539
1542
  return {
1540
1543
  position: [n.x, n.y, n.z],
1541
1544
  orientation: [r.x, r.y, r.z]
1542
1545
  };
1543
1546
  }
1544
- function At(o, t) {
1547
+ function Dt(o, t) {
1545
1548
  const e = o == null ? void 0 : o[t];
1546
1549
  if (!e)
1547
1550
  throw new Error(
@@ -1553,7 +1556,7 @@ function At(o, t) {
1553
1556
  orientation_type: "ROTATION_VECTOR"
1554
1557
  };
1555
1558
  }
1556
- function bo({
1559
+ function Lt({
1557
1560
  inputPose: o,
1558
1561
  selectedTcpId: t,
1559
1562
  selectedCoordinateSystemId: e,
@@ -1562,10 +1565,10 @@ function bo({
1562
1565
  }) {
1563
1566
  const r = t && t !== o.tcpId ? {
1564
1567
  ...o,
1565
- pose: ne(
1568
+ pose: le(
1566
1569
  o.pose,
1567
- At(i, o.tcpId),
1568
- At(i, t)
1570
+ Dt(i, o.tcpId),
1571
+ Dt(i, t)
1569
1572
  ),
1570
1573
  tcpId: t
1571
1574
  } : o;
@@ -1575,11 +1578,11 @@ function bo({
1575
1578
  n
1576
1579
  ) : r;
1577
1580
  }
1578
- function re(o) {
1581
+ function ce(o) {
1579
1582
  var t, e, i, n, r;
1580
1583
  if (typeof o == "string") {
1581
- const s = P(o);
1582
- return s ? re(s) : o;
1584
+ const s = J(o);
1585
+ return s ? ce(s) : o;
1583
1586
  }
1584
1587
  if (o && typeof o == "object") {
1585
1588
  const s = o;
@@ -1592,7 +1595,7 @@ function re(o) {
1592
1595
  }
1593
1596
  return "Jogging motion failed";
1594
1597
  }
1595
- const Co = [
1598
+ const To = [
1596
1599
  // Trajectory-planning failure causes, identified by the error_feedback_name
1597
1600
  // of a PlanTrajectoryFailedResponse (see extractJogErrorMessage)
1598
1601
  {
@@ -1622,12 +1625,12 @@ const Co = [
1622
1625
  translationKey: "Jogging.StreamStateSection.Error.PlanningFailed.lb"
1623
1626
  }
1624
1627
  ];
1625
- function wo(o) {
1628
+ function xo(o) {
1626
1629
  var t;
1627
- return ((t = Co.find(({ pattern: e }) => e.test(o))) == null ? void 0 : t.translationKey) ?? null;
1630
+ return ((t = To.find(({ pattern: e }) => e.test(o))) == null ? void 0 : t.translationKey) ?? null;
1628
1631
  }
1629
- const Mo = 5, Eo = 250;
1630
- function Io(o) {
1632
+ const Oo = 5, ko = 250;
1633
+ function Ro(o) {
1631
1634
  var i, n, r, s;
1632
1635
  const t = [
1633
1636
  (n = (i = o == null ? void 0 : o.manual_t1_limits) == null ? void 0 : i.tcp) == null ? void 0 : n.velocity,
@@ -1635,29 +1638,29 @@ function Io(o) {
1635
1638
  ].filter(
1636
1639
  (a) => typeof a == "number" && Number.isFinite(a) && a > 0
1637
1640
  );
1638
- return Math.min(Eo, ...t) / 10;
1641
+ return Math.min(ko, ...t) / 10;
1639
1642
  }
1640
- const St = [
1643
+ const vt = [
1641
1644
  { id: "0.1", mm: 0.1, degrees: 0.05 },
1642
1645
  { id: "1", mm: 1, degrees: 0.5 },
1643
1646
  { id: "5", mm: 5, degrees: 2.5 },
1644
1647
  { id: "10", mm: 10, degrees: 5 }
1645
- ], To = [
1648
+ ], Ao = [
1646
1649
  { id: "continuous" },
1647
- ...St
1648
- ], jo = ["coordsys", "tool"], Jt = "joggingToolStore", xo = () => typeof localStorage > "u" ? void 0 : localStorage;
1650
+ ...vt
1651
+ ], Po = ["coordsys", "tool"], $t = "joggingToolStore", Jo = () => typeof localStorage > "u" ? void 0 : localStorage;
1649
1652
  class tt {
1650
1653
  constructor(t, e, i, n, r, s = {}) {
1651
1654
  var d, h, c;
1652
- this.jogger = t, this.coordSystems = e, this.motionGroupDescription = i, this.tcps = n, this.inverseSolverValue = r, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.jogCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.lastJogError = null, this.onBeforeActivate = null, this.rotationVelocityDegPerSec = Mo, this.minTranslationVelocityMmPerSec = 1, 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 = N.RevoluteJoint, this.storage = s.storage ?? xo();
1655
+ this.jogger = t, this.coordSystems = e, this.motionGroupDescription = i, this.tcps = n, this.inverseSolverValue = r, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.jogCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.lastJogError = null, this.onBeforeActivate = null, this.rotationVelocityDegPerSec = Oo, this.minTranslationVelocityMmPerSec = 1, 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 = V.RevoluteJoint, this.storage = s.storage ?? Jo();
1653
1656
  for (const m of e)
1654
1657
  if (m.coordinate_system === "") {
1655
1658
  m.coordinate_system = "world";
1656
1659
  break;
1657
1660
  }
1658
- this.selectedCoordSystemId = ((d = e[0]) == null ? void 0 : d.coordinate_system) || "world", this.jogCoordSystemId = this.selectedCoordSystemId, this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = r, this.translationVelocityMmPerSec = Io(
1661
+ this.selectedCoordSystemId = ((d = e[0]) == null ? void 0 : d.coordinate_system) || "world", this.jogCoordSystemId = this.selectedCoordSystemId, this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = r, this.translationVelocityMmPerSec = Ro(
1659
1662
  i == null ? void 0 : i.operation_limits
1660
- ), this.jointType = ((c = (h = i == null ? void 0 : i.dh_parameters) == null ? void 0 : h[0]) == null ? void 0 : c.type) ?? N.RevoluteJoint, $(
1663
+ ), this.jointType = ((c = (h = i == null ? void 0 : i.dh_parameters) == null ? void 0 : h[0]) == null ? void 0 : c.type) ?? V.RevoluteJoint, L(
1661
1664
  this,
1662
1665
  { storage: !1 },
1663
1666
  { autoBind: !0 }
@@ -1666,9 +1669,9 @@ class tt {
1666
1669
  };
1667
1670
  const a = this.jogger.onError;
1668
1671
  this.jogger.onError = (m) => {
1669
- this.setLastJogError(re(m)), a == null || a(m);
1670
- }, this.loadFromLocalStorage(), this.disposers.push(wt(() => this.saveToLocalStorage())), this.disposers.push(
1671
- wt(() => {
1672
+ this.setLastJogError(ce(m)), a == null || a(m);
1673
+ }, this.loadFromLocalStorage(), this.disposers.push(It(() => this.saveToLocalStorage())), this.disposers.push(
1674
+ It(() => {
1672
1675
  const m = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
1673
1676
  m && m !== this.selectedTcpId && S(() => {
1674
1677
  this.selectedTcpId = m, this.tcpChangeInProgress = !1;
@@ -1735,7 +1738,7 @@ class tt {
1735
1738
  this.jogger.dispose();
1736
1739
  }
1737
1740
  get coordSystemCountByName() {
1738
- return Te(this.coordSystems, (t) => t.name);
1741
+ return Oe(this.coordSystems, (t) => t.name);
1739
1742
  }
1740
1743
  async deactivate() {
1741
1744
  this.jogger.mode === "jogging" && await this.jogger.setJoggingMode("off");
@@ -1758,7 +1761,7 @@ class tt {
1758
1761
  */
1759
1762
  loadFromLocalStorage() {
1760
1763
  var i;
1761
- const t = (i = this.storage) == null ? void 0 : i.getItem(Jt), e = t ? P(t) : void 0;
1764
+ const t = (i = this.storage) == null ? void 0 : i.getItem($t), e = t ? J(t) : void 0;
1762
1765
  e && (this.tabsById[e.selectedTabId] && (this.selectedTabId = e.selectedTabId), this.coordSystemsById[e.selectedCoordSystemId] && (this.selectedCoordSystemId = e.selectedCoordSystemId), this.coordSystemsById[e.jogCoordSystemId] && (this.jogCoordSystemId = e.jogCoordSystemId), this.incrementOptionsById[e.selectedIncrementId] && (this.selectedIncrementId = e.selectedIncrementId), ["translate", "rotate"].includes(e.selectedCartesianMotionType) && (this.selectedCartesianMotionType = e.selectedCartesianMotionType), ["coordsys", "tool"].includes(e.selectedOrientation) && (this.selectedOrientation = e.selectedOrientation));
1763
1766
  }
1764
1767
  /**
@@ -1767,7 +1770,7 @@ class tt {
1767
1770
  */
1768
1771
  saveToLocalStorage() {
1769
1772
  var t;
1770
- (t = this.storage) == null || t.setItem(Jt, JSON.stringify(this.localStorageSave));
1773
+ (t = this.storage) == null || t.setItem($t, JSON.stringify(this.localStorageSave));
1771
1774
  }
1772
1775
  get isLocked() {
1773
1776
  return this.locks.size > 0;
@@ -1780,7 +1783,7 @@ class tt {
1780
1783
  * shown as-is).
1781
1784
  */
1782
1785
  get lastJogErrorTranslationKey() {
1783
- return this.lastJogError ? wo(this.lastJogError) : null;
1786
+ return this.lastJogError ? xo(this.lastJogError) : null;
1784
1787
  }
1785
1788
  get localStorageSave() {
1786
1789
  return {
@@ -1814,10 +1817,10 @@ class tt {
1814
1817
  }), t;
1815
1818
  }
1816
1819
  get incrementOptions() {
1817
- return To;
1820
+ return Ao;
1818
1821
  }
1819
1822
  get discreteIncrementOptions() {
1820
- return St;
1823
+ return vt;
1821
1824
  }
1822
1825
  get incrementOptionsById() {
1823
1826
  return q(this.incrementOptions, (t) => t.id);
@@ -1844,7 +1847,7 @@ class tt {
1844
1847
  }
1845
1848
  /** The coordinate system to jog along, resolved relative to world */
1846
1849
  get jogCoordSystem() {
1847
- return _o(
1850
+ return jo(
1848
1851
  this.jogCoordSystemId,
1849
1852
  this.coordSystems
1850
1853
  );
@@ -1884,7 +1887,7 @@ class tt {
1884
1887
  try {
1885
1888
  return ct(
1886
1889
  {
1887
- pose: ne(i, s, a),
1890
+ pose: le(i, s, a),
1888
1891
  coordinateSystemId: r || "world"
1889
1892
  },
1890
1893
  e,
@@ -1899,7 +1902,7 @@ class tt {
1899
1902
  * In tool orientation, a step moves along the tool's axes.
1900
1903
  */
1901
1904
  get activeDiscreteIncrement() {
1902
- return St.find(
1905
+ return vt.find(
1903
1906
  (t) => t.id === this.selectedIncrementId
1904
1907
  );
1905
1908
  }
@@ -2025,7 +2028,7 @@ class tt {
2025
2028
  }
2026
2029
  /** Lock the UI until the given async callback resolves */
2027
2030
  async withMotionLock(t) {
2028
- const e = He();
2031
+ const e = Qe();
2029
2032
  this.lock(e);
2030
2033
  try {
2031
2034
  return await t();
@@ -2034,10 +2037,10 @@ class tt {
2034
2037
  }
2035
2038
  }
2036
2039
  }
2037
- const Oo = A(
2040
+ const Do = A(
2038
2041
  ({ store: o, useDegree: t }) => {
2039
2042
  var s;
2040
- const { t: e } = F(), i = _e(), n = [];
2043
+ const { t: e } = F(), i = Ee(), n = [];
2041
2044
  function r(a) {
2042
2045
  switch (a) {
2043
2046
  case "coordsys":
@@ -2059,7 +2062,7 @@ const Oo = A(
2059
2062
  variant: "filled",
2060
2063
  displayEmpty: !0,
2061
2064
  onChange: (a) => o.setSelectedCoordSystemId(a.target.value),
2062
- children: o.coordSystems.map((a) => /* @__PURE__ */ g(W, { value: a.coordinate_system, children: a.name && o.coordSystemCountByName[a.name] > 1 ? `${a.name} / ${a.coordinate_system}` : a.name || a.coordinate_system }, a.coordinate_system))
2065
+ children: o.coordSystems.map((a) => /* @__PURE__ */ g(z, { value: a.coordinate_system, children: a.name && o.coordSystemCountByName[a.name] > 1 ? `${a.name} / ${a.coordinate_system}` : a.name || a.coordinate_system }, a.coordinate_system))
2063
2066
  },
2064
2067
  "coord"
2065
2068
  )
@@ -2079,8 +2082,8 @@ const Oo = A(
2079
2082
  });
2080
2083
  },
2081
2084
  disabled: o.tcpChangeInProgress,
2082
- endAdornment: o.tcpChangeInProgress ? /* @__PURE__ */ g(Je, { position: "end", children: /* @__PURE__ */ g(Gt, { size: 16 }) }) : void 0,
2083
- children: o.tcps.map((a) => /* @__PURE__ */ g(W, { value: a.id, children: a.id }, a.id))
2085
+ endAdornment: o.tcpChangeInProgress ? /* @__PURE__ */ g(De, { position: "end", children: /* @__PURE__ */ g(Wt, { size: 16 }) }) : void 0,
2086
+ children: o.tcps.map((a) => /* @__PURE__ */ g(z, { value: a.id, children: a.id }, a.id))
2084
2087
  },
2085
2088
  "tcp"
2086
2089
  )
@@ -2092,12 +2095,12 @@ const Oo = A(
2092
2095
  labelId: `orientation-select-${i}`,
2093
2096
  value: o.selectedOrientation,
2094
2097
  onChange: (a) => o.setSelectedOrientation(a.target.value),
2095
- children: jo.map((a) => /* @__PURE__ */ g(W, { value: a, children: r(a) }, a))
2098
+ children: Po.map((a) => /* @__PURE__ */ g(z, { value: a, children: r(a) }, a))
2096
2099
  },
2097
2100
  "orientation"
2098
2101
  )
2099
2102
  ), o.showIncrementSelect && n.push(
2100
- /* @__PURE__ */ _(
2103
+ /* @__PURE__ */ v(
2101
2104
  nt,
2102
2105
  {
2103
2106
  labelValue: e("Jogging.Increment.hlb"),
@@ -2109,14 +2112,14 @@ const Oo = A(
2109
2112
  a.target.value
2110
2113
  ),
2111
2114
  children: [
2112
- /* @__PURE__ */ g(W, { value: "continuous", children: e("Jogging.Increment.Continuous.dd") }, "continuous"),
2113
- o.discreteIncrementOptions.map((a) => /* @__PURE__ */ g(W, { value: a.id, children: t ? `${a.degrees}°` : `${a.mm}mm` }, a.id))
2115
+ /* @__PURE__ */ g(z, { value: "continuous", children: e("Jogging.Increment.Continuous.dd") }, "continuous"),
2116
+ o.discreteIncrementOptions.map((a) => /* @__PURE__ */ g(z, { value: a.id, children: t ? `${a.degrees}°` : `${a.mm}mm` }, a.id))
2114
2117
  ]
2115
2118
  },
2116
2119
  "increment"
2117
2120
  )
2118
2121
  ), /* @__PURE__ */ g(
2119
- G,
2122
+ B,
2120
2123
  {
2121
2124
  component: "div",
2122
2125
  "data-testid": "jogging-options",
@@ -2129,7 +2132,7 @@ const Oo = A(
2129
2132
  "& label": { opacity: 0.7, fontSize: "12px", marginBottom: "4px" }
2130
2133
  },
2131
2134
  children: n.map((a, d) => /* @__PURE__ */ g(
2132
- G,
2135
+ B,
2133
2136
  {
2134
2137
  sx: {
2135
2138
  gridColumn: n.length % 2 === 1 && d === n.length - 1 ? "span 2" : "auto"
@@ -2141,7 +2144,7 @@ const Oo = A(
2141
2144
  }
2142
2145
  );
2143
2146
  }
2144
- ), ko = Bt(Le)(({ theme: o }) => {
2147
+ ), Lo = Ht(Ne)(({ theme: o }) => {
2145
2148
  var t;
2146
2149
  return {
2147
2150
  "&.MuiToggleButtonGroup-root": {
@@ -2163,13 +2166,13 @@ const Oo = A(
2163
2166
  }
2164
2167
  }
2165
2168
  };
2166
- }), Ro = ot(
2169
+ }), $o = ot(
2167
2170
  A((o) => {
2168
2171
  const { store: t } = o, { t: e } = F();
2169
2172
  function i(n, r) {
2170
- r === o.velocity || !Ne(r) || o.onVelocityChange(r, o.useDegree);
2173
+ r === o.velocity || !Fe(r) || o.onVelocityChange(r, o.useDegree);
2171
2174
  }
2172
- return /* @__PURE__ */ _(
2175
+ return /* @__PURE__ */ v(
2173
2176
  C,
2174
2177
  {
2175
2178
  direction: "row",
@@ -2179,17 +2182,17 @@ const Oo = A(
2179
2182
  "aria-label": "velocity-slider",
2180
2183
  children: [
2181
2184
  t.showVelocityLegend && /* @__PURE__ */ g(
2182
- I,
2185
+ M,
2183
2186
  {
2184
2187
  sx: {
2185
- color: Ae,
2188
+ color: Je,
2186
2189
  fontSize: "14px"
2187
2190
  },
2188
2191
  children: e("Jogging.Velocity.bt")
2189
2192
  }
2190
2193
  ),
2191
2194
  /* @__PURE__ */ g(
2192
- Wt,
2195
+ Qt,
2193
2196
  {
2194
2197
  value: o.velocity,
2195
2198
  color: "secondary",
@@ -2207,15 +2210,15 @@ const Oo = A(
2207
2210
  }
2208
2211
  }
2209
2212
  ),
2210
- t.showVelocitySliderLabel && (o.renderValue ? o.renderValue(o.velocity) : /* @__PURE__ */ g(se, { value: o.velocity.toString() }))
2213
+ t.showVelocitySliderLabel && (o.renderValue ? o.renderValue(o.velocity) : /* @__PURE__ */ g(de, { value: o.velocity.toString() }))
2211
2214
  ]
2212
2215
  }
2213
2216
  );
2214
2217
  })
2215
2218
  );
2216
- function se({ value: o, sx: t }) {
2219
+ function de({ value: o, sx: t }) {
2217
2220
  var i;
2218
- const e = Q();
2221
+ const e = K();
2219
2222
  return /* @__PURE__ */ g(
2220
2223
  C,
2221
2224
  {
@@ -2231,7 +2234,7 @@ function se({ value: o, sx: t }) {
2231
2234
  ...t
2232
2235
  },
2233
2236
  children: /* @__PURE__ */ g(
2234
- I,
2237
+ M,
2235
2238
  {
2236
2239
  component: "span",
2237
2240
  sx: {
@@ -2247,14 +2250,14 @@ function se({ value: o, sx: t }) {
2247
2250
  }
2248
2251
  );
2249
2252
  }
2250
- const ae = A(
2253
+ const ge = A(
2251
2254
  ({ store: o, useDegree: t }) => {
2252
2255
  const { t: e } = F();
2253
2256
  function i(n, r) {
2254
2257
  return r ? `ω = ${e("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: n })}` : `v = ${e("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: n })}`;
2255
2258
  }
2256
2259
  return /* @__PURE__ */ g(
2257
- Ro,
2260
+ $o,
2258
2261
  {
2259
2262
  store: o,
2260
2263
  velocity: o.velocityInDisplayUnits(t),
@@ -2264,7 +2267,7 @@ const ae = A(
2264
2267
  useDegree: t,
2265
2268
  disabled: o.isLocked,
2266
2269
  renderValue: (n) => /* @__PURE__ */ g(
2267
- se,
2270
+ de,
2268
2271
  {
2269
2272
  value: i(n, t),
2270
2273
  sx: {
@@ -2278,11 +2281,11 @@ const ae = A(
2278
2281
  }
2279
2282
  );
2280
2283
  }
2281
- ), le = A(({ store: o }) => {
2284
+ ), he = A(({ store: o }) => {
2282
2285
  var s, a, d;
2283
- const { t } = F(), e = Q(), i = ((d = (a = (s = o.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : s.details) == null ? void 0 : a.state) == null ? void 0 : d.kind) ?? "KIND_UNKNOWN", n = o.lastJogError, r = o.lastJogErrorTranslationKey;
2284
- return /* @__PURE__ */ _(
2285
- G,
2286
+ const { t } = F(), e = K(), i = ((d = (a = (s = o.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : s.details) == null ? void 0 : a.state) == null ? void 0 : d.kind) ?? "KIND_UNKNOWN", n = o.lastJogError, r = o.lastJogErrorTranslationKey;
2287
+ return /* @__PURE__ */ v(
2288
+ B,
2286
2289
  {
2287
2290
  sx: {
2288
2291
  display: "flex",
@@ -2292,7 +2295,7 @@ const ae = A(
2292
2295
  },
2293
2296
  children: [
2294
2297
  /* @__PURE__ */ g(
2295
- I,
2298
+ M,
2296
2299
  {
2297
2300
  variant: "body2",
2298
2301
  sx: {
@@ -2304,7 +2307,7 @@ const ae = A(
2304
2307
  }
2305
2308
  ),
2306
2309
  /* @__PURE__ */ g(
2307
- I,
2310
+ M,
2308
2311
  {
2309
2312
  variant: "body2",
2310
2313
  color: n ? "error" : void 0,
@@ -2321,17 +2324,17 @@ const ae = A(
2321
2324
  ]
2322
2325
  }
2323
2326
  );
2324
- }), Ao = A(
2327
+ }), Vo = A(
2325
2328
  ({
2326
2329
  store: o,
2327
2330
  children: t
2328
2331
  }) => {
2329
- const { t: e } = F(), i = Q(), n = dt(0);
2332
+ const { t: e } = F(), i = K(), n = dt(0);
2330
2333
  function r(u, l) {
2331
2334
  (l === "translate" || l === "rotate") && o.setSelectedCartesianMotionType(l);
2332
2335
  }
2333
2336
  async function s(u, l) {
2334
- const p = await o.activate(), f = p.motionStream.rapidlyChangingMotionState.tcp_pose, v = p.motionStream.rapidlyChangingMotionState.joint_position;
2337
+ const p = await o.activate(), f = p.motionStream.rapidlyChangingMotionState.tcp_pose, _ = p.motionStream.rapidlyChangingMotionState.joint_position;
2335
2338
  f && await o.withMotionLock(async () => {
2336
2339
  try {
2337
2340
  o.setCurrentIncrementJog({
@@ -2339,7 +2342,7 @@ const ae = A(
2339
2342
  direction: u.direction
2340
2343
  }), await o.jogger.runIncrementalCartesianMotion({
2341
2344
  currentTcpPose: f,
2342
- currentJoints: v,
2345
+ currentJoints: _,
2343
2346
  coordSystemId: o.activeCoordSystemId,
2344
2347
  velocityInRelevantUnits: o.selectedCartesianMotionType === "translate" ? o.translationVelocityMmPerSec : o.rotationVelocityRadsPerSec,
2345
2348
  axis: u.axis,
@@ -2349,7 +2352,7 @@ const ae = A(
2349
2352
  distanceMm: l.mm
2350
2353
  } : {
2351
2354
  type: "rotate",
2352
- distanceRads: ke(l.degrees)
2355
+ distanceRads: Pe(l.degrees)
2353
2356
  }
2354
2357
  });
2355
2358
  } finally {
@@ -2386,18 +2389,18 @@ const ae = A(
2386
2389
  const h = [
2387
2390
  {
2388
2391
  id: "x",
2389
- icon: /* @__PURE__ */ g(go, {}),
2390
- colors: ut.X
2392
+ icon: /* @__PURE__ */ g(So, {}),
2393
+ colors: mt.X
2391
2394
  },
2392
2395
  {
2393
2396
  id: "y",
2394
- icon: /* @__PURE__ */ g(uo, {}),
2395
- colors: ut.Y
2397
+ icon: /* @__PURE__ */ g(vo, {}),
2398
+ colors: mt.Y
2396
2399
  },
2397
2400
  {
2398
2401
  id: "z",
2399
- icon: /* @__PURE__ */ g(po, {}),
2400
- colors: ut.Z
2402
+ icon: /* @__PURE__ */ g(Co, {}),
2403
+ colors: mt.Z
2401
2404
  }
2402
2405
  ];
2403
2406
  function c(u) {
@@ -2405,10 +2408,10 @@ const ae = A(
2405
2408
  }
2406
2409
  function m(u) {
2407
2410
  return e("General.degree.variable", {
2408
- amount: Ut(u).toFixed(1)
2411
+ amount: Yt(u).toFixed(1)
2409
2412
  });
2410
2413
  }
2411
- return /* @__PURE__ */ _(
2414
+ return /* @__PURE__ */ v(
2412
2415
  C,
2413
2416
  {
2414
2417
  "data-testid": "jogging-cartesian-tab",
@@ -2417,22 +2420,22 @@ const ae = A(
2417
2420
  gap: 2,
2418
2421
  sx: { padding: "18px 24px" },
2419
2422
  children: [
2420
- /* @__PURE__ */ _(C, { gap: 2, children: [
2423
+ /* @__PURE__ */ v(C, { gap: 2, children: [
2421
2424
  /* @__PURE__ */ g(
2422
- Oo,
2425
+ Do,
2423
2426
  {
2424
2427
  store: o,
2425
2428
  useDegree: o.selectedCartesianMotionType === "rotate"
2426
2429
  }
2427
2430
  ),
2428
2431
  /* @__PURE__ */ g(
2429
- ae,
2432
+ ge,
2430
2433
  {
2431
2434
  store: o,
2432
2435
  useDegree: o.selectedCartesianMotionType === "rotate"
2433
2436
  }
2434
2437
  ),
2435
- /* @__PURE__ */ g(Y, {})
2438
+ /* @__PURE__ */ g(W, {})
2436
2439
  ] }),
2437
2440
  /* @__PURE__ */ g(
2438
2441
  C,
@@ -2442,7 +2445,7 @@ const ae = A(
2442
2445
  gap: "24px",
2443
2446
  justifyContent: "center",
2444
2447
  sx: { flexGrow: "1" },
2445
- children: /* @__PURE__ */ _(
2448
+ children: /* @__PURE__ */ v(
2446
2449
  C,
2447
2450
  {
2448
2451
  alignItems: "center",
@@ -2450,8 +2453,8 @@ const ae = A(
2450
2453
  gap: "24px",
2451
2454
  sx: { flexGrow: 1 },
2452
2455
  children: [
2453
- /* @__PURE__ */ _(
2454
- ko,
2456
+ /* @__PURE__ */ v(
2457
+ Lo,
2455
2458
  {
2456
2459
  value: o.selectedCartesianMotionType,
2457
2460
  onChange: r,
@@ -2459,25 +2462,25 @@ const ae = A(
2459
2462
  "aria-label": e("Jogging.Cartesian.MotionType.lb"),
2460
2463
  sx: { justifyContent: "center" },
2461
2464
  children: [
2462
- /* @__PURE__ */ g(Mt, { value: "translate", children: e("Jogging.Cartesian.Translation.bt") }),
2463
- /* @__PURE__ */ g(Mt, { value: "rotate", children: e("Jogging.Cartesian.Rotation.bt") })
2465
+ /* @__PURE__ */ g(wt, { value: "translate", children: e("Jogging.Cartesian.Translation.bt") }),
2466
+ /* @__PURE__ */ g(wt, { value: "rotate", children: e("Jogging.Cartesian.Rotation.bt") })
2464
2467
  ]
2465
2468
  }
2466
2469
  ),
2467
2470
  o.selectedCartesianMotionType === "translate" && h.map((u) => {
2468
2471
  var l, p;
2469
2472
  return /* @__PURE__ */ g(
2470
- xt,
2473
+ Rt,
2471
2474
  {
2472
2475
  "data-testid": `jogging-cartesian-axis-control-${u.id}`,
2473
2476
  "aria-label": `jogging-cartesian-axis-control-${u.id}`,
2474
2477
  colors: u.colors,
2475
2478
  disabled: o.isLocked,
2476
2479
  activeJoggingDirection: ((l = o.incrementJogInProgress) == null ? void 0 : l.axis) === u.id ? o.incrementJogInProgress.direction : void 0,
2477
- label: /* @__PURE__ */ _(rt, { children: [
2480
+ label: /* @__PURE__ */ v(rt, { children: [
2478
2481
  u.icon,
2479
2482
  /* @__PURE__ */ g(
2480
- I,
2483
+ M,
2481
2484
  {
2482
2485
  sx: {
2483
2486
  fontSize: "24px",
@@ -2488,9 +2491,9 @@ const ae = A(
2488
2491
  )
2489
2492
  ] }),
2490
2493
  getDisplayedValue: () => {
2491
- var f, v;
2494
+ var f, _;
2492
2495
  return c(
2493
- ((v = (f = o.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : f.position) == null ? void 0 : v[Et[u.id]]) || 0
2496
+ ((_ = (f = o.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : f.position) == null ? void 0 : _[Mt[u.id]]) || 0
2494
2497
  );
2495
2498
  },
2496
2499
  startJogging: (f) => a({
@@ -2506,17 +2509,17 @@ const ae = A(
2506
2509
  o.selectedCartesianMotionType === "rotate" && h.map((u) => {
2507
2510
  var l, p;
2508
2511
  return /* @__PURE__ */ g(
2509
- xt,
2512
+ Rt,
2510
2513
  {
2511
2514
  "data-testid": `jogging-cartesian-axis-control-${u.id}`,
2512
2515
  "aria-label": `jogging-cartesian-axis-control-${u.id}`,
2513
2516
  colors: u.colors,
2514
2517
  disabled: o.isLocked,
2515
2518
  activeJoggingDirection: ((l = o.incrementJogInProgress) == null ? void 0 : l.axis) === u.id ? o.incrementJogInProgress.direction : void 0,
2516
- label: /* @__PURE__ */ _(rt, { children: [
2517
- /* @__PURE__ */ g(yo, {}),
2519
+ label: /* @__PURE__ */ v(rt, { children: [
2520
+ /* @__PURE__ */ g(Io, {}),
2518
2521
  /* @__PURE__ */ g(
2519
- I,
2522
+ M,
2520
2523
  {
2521
2524
  sx: {
2522
2525
  fontSize: "24px",
@@ -2527,9 +2530,9 @@ const ae = A(
2527
2530
  )
2528
2531
  ] }),
2529
2532
  getDisplayedValue: () => {
2530
- var f, v;
2533
+ var f, _;
2531
2534
  return m(
2532
- ((v = (f = o.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : f.orientation) == null ? void 0 : v[Et[u.id]]) || 0
2535
+ ((_ = (f = o.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : f.orientation) == null ? void 0 : _[Mt[u.id]]) || 0
2533
2536
  );
2534
2537
  },
2535
2538
  startJogging: (f) => a({
@@ -2547,18 +2550,18 @@ const ae = A(
2547
2550
  )
2548
2551
  }
2549
2552
  ),
2550
- /* @__PURE__ */ g(ee, { store: o }),
2551
- /* @__PURE__ */ g(Y, {}),
2552
- /* @__PURE__ */ g(le, { store: o }),
2553
- t && /* @__PURE__ */ g(Y, {}),
2553
+ /* @__PURE__ */ g(re, { store: o }),
2554
+ /* @__PURE__ */ g(W, {}),
2555
+ /* @__PURE__ */ g(he, { store: o }),
2556
+ t && /* @__PURE__ */ g(W, {}),
2554
2557
  t
2555
2558
  ]
2556
2559
  }
2557
2560
  );
2558
2561
  }
2559
- ), Jo = A(
2562
+ ), No = A(
2560
2563
  ({ store: o, children: t }) => {
2561
- const e = Q(), i = dt(0);
2564
+ const e = K(), i = dt(0);
2562
2565
  async function n(s) {
2563
2566
  const a = ++i.current;
2564
2567
  try {
@@ -2566,8 +2569,8 @@ const ae = A(
2566
2569
  await o.jogger.rotateJoints({
2567
2570
  joint: s.joint,
2568
2571
  direction: s.direction,
2569
- velocityUnit: o.jointType === N.PrismaticJoint ? "mm/s" : "rad/s",
2570
- velocityValue: o.jointType === N.PrismaticJoint ? o.translationVelocityMmPerSec : o.rotationVelocityRadsPerSec
2572
+ velocityUnit: o.jointType === V.PrismaticJoint ? "mm/s" : "rad/s",
2573
+ velocityValue: o.jointType === V.PrismaticJoint ? o.translationVelocityMmPerSec : o.rotationVelocityRadsPerSec
2571
2574
  });
2572
2575
  } catch (d) {
2573
2576
  console.error("Jogging failed:", d);
@@ -2576,7 +2579,7 @@ const ae = A(
2576
2579
  async function r() {
2577
2580
  i.current++, await o.jogger.stop(), await o.deactivate();
2578
2581
  }
2579
- return /* @__PURE__ */ _(
2582
+ return /* @__PURE__ */ v(
2580
2583
  C,
2581
2584
  {
2582
2585
  "data-testid": "jogging-joint-tab",
@@ -2586,13 +2589,13 @@ const ae = A(
2586
2589
  sx: { padding: "18px 24px" },
2587
2590
  children: [
2588
2591
  /* @__PURE__ */ g(
2589
- ae,
2592
+ ge,
2590
2593
  {
2591
2594
  store: o,
2592
- useDegree: o.jointType === N.RevoluteJoint
2595
+ useDegree: o.jointType === V.RevoluteJoint
2593
2596
  }
2594
2597
  ),
2595
- /* @__PURE__ */ g(Y, {}),
2598
+ /* @__PURE__ */ g(W, {}),
2596
2599
  /* @__PURE__ */ g(
2597
2600
  C,
2598
2601
  {
@@ -2609,7 +2612,7 @@ const ae = A(
2609
2612
  children: o.jogger.motionStream.joints.map((s) => {
2610
2613
  var d, h, c;
2611
2614
  const a = (c = (h = (d = o.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : d.joints) == null ? void 0 : h[s.index]) == null ? void 0 : c.position;
2612
- return /* @__PURE__ */ _(
2615
+ return /* @__PURE__ */ v(
2613
2616
  C,
2614
2617
  {
2615
2618
  "data-testid": `jogging-joint-value-control-${s.index}`,
@@ -2621,19 +2624,19 @@ const ae = A(
2621
2624
  width: "100%",
2622
2625
  children: [
2623
2626
  o.showJointsLegend && /* @__PURE__ */ g(
2624
- I,
2627
+ M,
2625
2628
  {
2626
2629
  color: o.isLocked ? e.palette.text.disabled : e.palette.text.secondary,
2627
2630
  children: `G${s.index + 1}`
2628
2631
  }
2629
2632
  ),
2630
2633
  /* @__PURE__ */ g(
2631
- Xe,
2634
+ so,
2632
2635
  {
2633
2636
  disabled: o.isLocked,
2634
2637
  lowerLimit: a == null ? void 0 : a.lower_limit,
2635
2638
  upperLimit: a == null ? void 0 : a.upper_limit,
2636
- useDegree: o.jointType === N.RevoluteJoint,
2639
+ useDegree: o.jointType === V.RevoluteJoint,
2637
2640
  getValue: () => {
2638
2641
  const m = o.jogger.motionStream.rapidlyChangingMotionState.joint_position[s.index];
2639
2642
  return m !== void 0 ? m : void 0;
@@ -2654,18 +2657,18 @@ const ae = A(
2654
2657
  )
2655
2658
  }
2656
2659
  ),
2657
- /* @__PURE__ */ g(ee, { store: o }),
2658
- /* @__PURE__ */ g(Y, {}),
2659
- /* @__PURE__ */ g(le, { store: o }),
2660
- t && /* @__PURE__ */ g(Y, {}),
2660
+ /* @__PURE__ */ g(re, { store: o }),
2661
+ /* @__PURE__ */ g(W, {}),
2662
+ /* @__PURE__ */ g(he, { store: o }),
2663
+ t && /* @__PURE__ */ g(W, {}),
2661
2664
  t
2662
2665
  ]
2663
2666
  }
2664
2667
  );
2665
2668
  }
2666
- ), pn = ot(
2669
+ ), On = ot(
2667
2670
  A((o) => {
2668
- const t = Vt(() => ({
2671
+ const t = Ut(() => ({
2669
2672
  joggingStore: null,
2670
2673
  loadingError: null
2671
2674
  }));
@@ -2678,7 +2681,7 @@ const ae = A(
2678
2681
  try {
2679
2682
  let r = o.store;
2680
2683
  if (!r) {
2681
- const s = await ht.open(
2684
+ const s = await ut.open(
2682
2685
  o.nova,
2683
2686
  o.motionGroupId,
2684
2687
  {
@@ -2726,11 +2729,11 @@ const ae = A(
2726
2729
  position: "relative",
2727
2730
  ...o.sx
2728
2731
  },
2729
- children: t.joggingStore ? /* @__PURE__ */ g(Po, { store: t.joggingStore, children: o.children }) : /* @__PURE__ */ g(so, { message: "Loading jogging", error: t.loadingError })
2732
+ children: t.joggingStore ? /* @__PURE__ */ g(Fo, { store: t.joggingStore, children: o.children }) : /* @__PURE__ */ g(mo, { message: "Loading jogging", error: t.loadingError })
2730
2733
  }
2731
2734
  );
2732
2735
  })
2733
- ), Po = A(
2736
+ ), Fo = A(
2734
2737
  ({
2735
2738
  store: o,
2736
2739
  children: t
@@ -2738,13 +2741,13 @@ const ae = A(
2738
2741
  const { t: e } = F();
2739
2742
  function i() {
2740
2743
  if (o.currentTab.id === "cartesian")
2741
- return /* @__PURE__ */ g(Ao, { store: o, children: t });
2744
+ return /* @__PURE__ */ g(Vo, { store: o, children: t });
2742
2745
  if (o.currentTab.id === "joint")
2743
- return /* @__PURE__ */ g(Jo, { store: o, children: t });
2746
+ return /* @__PURE__ */ g(No, { store: o, children: t });
2744
2747
  }
2745
- return /* @__PURE__ */ _(C, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
2748
+ return /* @__PURE__ */ v(C, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
2746
2749
  /* @__PURE__ */ g(
2747
- Me,
2750
+ je,
2748
2751
  {
2749
2752
  "data-testid": "jogging-tabs",
2750
2753
  "aria-label": "jogging-tabs",
@@ -2752,13 +2755,13 @@ const ae = A(
2752
2755
  onChange: o.onTabChange,
2753
2756
  variant: "fullWidth",
2754
2757
  children: o.tabs.map((n) => {
2755
- const r = n.label === "Cartesian" ? e("Jogging.Cartesian.bt") : e("Jogging.Joints.bt"), s = n.label === "cartesian" ? /* @__PURE__ */ g(be, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ g(Ce, { fontSize: "small", sx: { mr: 1 } });
2758
+ const r = n.label === "Cartesian" ? e("Jogging.Cartesian.bt") : e("Jogging.Joints.bt"), s = n.label === "cartesian" ? /* @__PURE__ */ g(Ie, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ g(we, { fontSize: "small", sx: { mr: 1 } });
2756
2759
  return /* @__PURE__ */ g(
2757
- we,
2760
+ Me,
2758
2761
  {
2759
2762
  "data-testid": `jogging-tab-${n.id}`,
2760
2763
  "aria-label": `jogging-tab-${n.id}`,
2761
- label: o.showTabIcons ? /* @__PURE__ */ _(C, { direction: "row", alignItems: "center", children: [
2764
+ label: o.showTabIcons ? /* @__PURE__ */ v(C, { direction: "row", alignItems: "center", children: [
2762
2765
  s,
2763
2766
  r
2764
2767
  ] }) : r,
@@ -2779,23 +2782,23 @@ const ae = A(
2779
2782
  children: i()
2780
2783
  }
2781
2784
  ),
2782
- o.blocked && /* @__PURE__ */ g(lo, { store: o })
2785
+ o.blocked && /* @__PURE__ */ g(fo, { store: o })
2783
2786
  ] });
2784
2787
  }
2785
2788
  );
2786
- function Do() {
2789
+ function Bo() {
2787
2790
  const o = window.location.href;
2788
2791
  return o.substring(
2789
2792
  0,
2790
2793
  o.indexOf("/", o.indexOf("//") + 2)
2791
2794
  );
2792
2795
  }
2793
- function fn({
2794
- baseUrl: o = Do(),
2796
+ function kn({
2797
+ baseUrl: o = Bo(),
2795
2798
  ...t
2796
2799
  }) {
2797
- return /* @__PURE__ */ _(
2798
- Be,
2800
+ return /* @__PURE__ */ v(
2801
+ ze,
2799
2802
  {
2800
2803
  "aria-labelledby": "no-motion-group-modal-title",
2801
2804
  open: !0,
@@ -2815,9 +2818,9 @@ function fn({
2815
2818
  }
2816
2819
  },
2817
2820
  children: [
2818
- /* @__PURE__ */ g(We, { id: "no-motion-group-modal-title", children: "No motion group found" }),
2819
- /* @__PURE__ */ _(
2820
- ze,
2821
+ /* @__PURE__ */ g(Ye, { id: "no-motion-group-modal-title", children: "No motion group found" }),
2822
+ /* @__PURE__ */ v(
2823
+ He,
2821
2824
  {
2822
2825
  sx: {
2823
2826
  marginTop: "3rem",
@@ -2825,14 +2828,14 @@ function fn({
2825
2828
  textAlign: "center"
2826
2829
  },
2827
2830
  children: [
2828
- /* @__PURE__ */ g(I, { color: "#fff", children: "Found no devices to connect to." }),
2829
- /* @__PURE__ */ g(I, { color: "#fff", children: "Please ensure a motion group has been created." })
2831
+ /* @__PURE__ */ g(M, { color: "#fff", children: "Found no devices to connect to." }),
2832
+ /* @__PURE__ */ g(M, { color: "#fff", children: "Please ensure a motion group has been created." })
2830
2833
  ]
2831
2834
  }
2832
2835
  ),
2833
- /* @__PURE__ */ g(Ue, { children: /* @__PURE__ */ _(C, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
2836
+ /* @__PURE__ */ g(We, { children: /* @__PURE__ */ v(C, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
2834
2837
  /* @__PURE__ */ g(
2835
- ft,
2838
+ St,
2836
2839
  {
2837
2840
  href: `${o}/settings`,
2838
2841
  variant: "contained",
@@ -2844,7 +2847,7 @@ function fn({
2844
2847
  }
2845
2848
  ),
2846
2849
  /* @__PURE__ */ g(
2847
- ft,
2850
+ St,
2848
2851
  {
2849
2852
  href: `${o}`,
2850
2853
  variant: "text",
@@ -2862,38 +2865,38 @@ function fn({
2862
2865
  }
2863
2866
  );
2864
2867
  }
2865
- const Pt = 1e-4, $o = {
2868
+ const Vt = 1e-4, Go = {
2866
2869
  a: 0,
2867
2870
  d: 0,
2868
2871
  alpha: 0,
2869
2872
  theta: 0,
2870
2873
  reverse_rotation_direction: !1
2871
2874
  };
2872
- class vt {
2875
+ class bt {
2873
2876
  constructor(t, e, i, n, r, s, a, d, h, c, m = "cell") {
2874
2877
  this.controller = e, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = r, this.isVirtual = s, this.tcps = a, this.description = d, this.initialControllerState = h, this.controllerStateSocket = c, this.cellId = m, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.nova = U(t), this.rapidlyChangingMotionState = n, this.controllerState = h, c.addEventListener("message", (u) => {
2875
2878
  var p;
2876
- const l = (p = P(u.data)) == null ? void 0 : p.result;
2879
+ const l = (p = J(u.data)) == null ? void 0 : p.result;
2877
2880
  l && S(() => {
2878
2881
  this.controllerState = l;
2879
2882
  });
2880
2883
  }), r.addEventListener("message", (u) => {
2881
2884
  var p;
2882
- const l = (p = P(u.data)) == null ? void 0 : p.result;
2885
+ const l = (p = J(u.data)) == null ? void 0 : p.result;
2883
2886
  if (!l)
2884
2887
  throw new Error(
2885
2888
  `Failed to get motion state for ${this.motionGroupId}: ${u.data}`
2886
2889
  );
2887
- Qt(
2890
+ Xt(
2888
2891
  this.rapidlyChangingMotionState.joint_position,
2889
2892
  l.joint_position,
2890
- Pt
2893
+ Vt
2891
2894
  ) || S(() => {
2892
2895
  this.rapidlyChangingMotionState.joint_position = l.joint_position;
2893
- }), qt(
2896
+ }), ee(
2894
2897
  this.rapidlyChangingMotionState,
2895
2898
  l,
2896
- Pt
2899
+ Vt
2897
2900
  ) || S(() => {
2898
2901
  this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose;
2899
2902
  }), l.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== l.tcp && S(() => {
@@ -2901,13 +2904,13 @@ class vt {
2901
2904
  }), this.rapidlyChangingMotionState.standstill !== l.standstill && S(() => {
2902
2905
  this.rapidlyChangingMotionState.standstill = l.standstill;
2903
2906
  });
2904
- }), $(this);
2907
+ }), L(this);
2905
2908
  }
2906
2909
  static async connectMultiple(t, e, i = {}) {
2907
2910
  const n = U(t), r = i.cellId ?? Z(t);
2908
2911
  return Promise.all(
2909
2912
  e.map(
2910
- (s) => vt.connect(n, s, {
2913
+ (s) => bt.connect(n, s, {
2911
2914
  ...i,
2912
2915
  cellId: r
2913
2916
  })
@@ -2915,12 +2918,12 @@ class vt {
2915
2918
  );
2916
2919
  }
2917
2920
  static async connect(t, e, i = {}) {
2918
- var j, x;
2921
+ var T, x;
2919
2922
  const n = U(t), r = i.cellId ?? Z(t) ?? "cell", [s, a] = e.split("@"), d = await n.api.controller.getCurrentRobotControllerState(
2920
2923
  r,
2921
2924
  a
2922
2925
  ), h = d == null ? void 0 : d.motion_groups.find(
2923
- (M) => M.motion_group === e
2926
+ (I) => I.motion_group === e
2924
2927
  );
2925
2928
  if (!d || !h)
2926
2929
  throw new Error(
@@ -2928,7 +2931,7 @@ class vt {
2928
2931
  );
2929
2932
  const c = n.openReconnectingWebsocket(
2930
2933
  `/cells/${r}/controllers/${a}/motion-groups/${e}/state-stream`
2931
- ), m = await c.firstMessage(), u = (j = P(m.data)) == null ? void 0 : j.result;
2934
+ ), m = await c.firstMessage(), u = (T = J(m.data)) == null ? void 0 : T.result;
2932
2935
  if (!u)
2933
2936
  throw new Error(
2934
2937
  `Unable to parse initial motion state message ${m.data}`
@@ -2945,35 +2948,35 @@ class vt {
2945
2948
  r,
2946
2949
  a,
2947
2950
  h.motion_group
2948
- ), v = Object.entries(f.tcps || {}).map(
2949
- ([M, O]) => ({
2950
- id: M,
2951
+ ), _ = Object.entries(f.tcps || {}).map(
2952
+ ([I, O]) => ({
2953
+ id: I,
2951
2954
  readable_name: O.name,
2952
2955
  position: O.pose.position,
2953
2956
  orientation: O.pose.orientation
2954
2957
  })
2955
- ), w = n.openReconnectingWebsocket(
2958
+ ), E = n.openReconnectingWebsocket(
2956
2959
  `/cells/${r}/controllers/${d.controller}/state-stream?response_rate=1000`
2957
- ), E = await w.firstMessage(), T = (x = P(E.data)) == null ? void 0 : x.result;
2958
- if (!T)
2960
+ ), w = await E.firstMessage(), j = (x = J(w.data)) == null ? void 0 : x.result;
2961
+ if (!j)
2959
2962
  throw new Error(
2960
- `Unable to parse initial controller state message ${E.data}`
2963
+ `Unable to parse initial controller state message ${w.data}`
2961
2964
  );
2962
2965
  return console.log(
2963
2966
  `Connected controller state websocket to controller ${d.controller}. Initial state:
2964
2967
  `,
2965
- T
2966
- ), new vt(
2968
+ j
2969
+ ), new bt(
2967
2970
  n,
2968
2971
  d,
2969
2972
  h,
2970
2973
  u,
2971
2974
  c,
2972
2975
  p,
2973
- v,
2976
+ _,
2974
2977
  f,
2975
- T,
2976
- w,
2978
+ j,
2979
+ E,
2977
2980
  r
2978
2981
  );
2979
2982
  }
@@ -2999,7 +3002,7 @@ class vt {
2999
3002
  get dhParameters() {
3000
3003
  if (this.description.dh_parameters !== void 0)
3001
3004
  return this.description.dh_parameters.map((t) => ({
3002
- ...$o,
3005
+ ...Go,
3003
3006
  ...t
3004
3007
  }));
3005
3008
  }
@@ -3018,12 +3021,12 @@ class vt {
3018
3021
  /** Gets the robot mounting position rotation in 3D viz coordinates */
3019
3022
  get mountingQuaternion() {
3020
3023
  var n, r, s, a, d, h;
3021
- const t = new jt.Vector3(
3024
+ const t = new Tt.Vector3(
3022
3025
  ((r = (n = this.description.mounting) == null ? void 0 : n.orientation) == null ? void 0 : r[0]) || 0,
3023
3026
  ((a = (s = this.description.mounting) == null ? void 0 : s.orientation) == null ? void 0 : a[1]) || 0,
3024
3027
  ((h = (d = this.description.mounting) == null ? void 0 : d.orientation) == null ? void 0 : h[2]) || 0
3025
3028
  ), e = t.length(), i = t.normalize();
3026
- return new jt.Quaternion().setFromAxisAngle(i, e);
3029
+ return new Tt.Quaternion().setFromAxisAngle(i, e);
3027
3030
  }
3028
3031
  /**
3029
3032
  * Whether the controller is currently in a safety state
@@ -3117,7 +3120,7 @@ class vt {
3117
3120
  this.joggingVelocity = t;
3118
3121
  }
3119
3122
  }
3120
- const ce = 1e-4, Lo = /* @__PURE__ */ new Set([
3123
+ const ue = 1e-4, Uo = /* @__PURE__ */ new Set([
3121
3124
  "timestamp",
3122
3125
  "sequence_number",
3123
3126
  "joint_position",
@@ -3127,8 +3130,8 @@ const ce = 1e-4, Lo = /* @__PURE__ */ new Set([
3127
3130
  "tcp_pose",
3128
3131
  "flange_velocity",
3129
3132
  "tcp_velocity"
3130
- ]), No = 1, Dt = (o) => Array.isArray(o) && o.length === 3 && o.every((t) => typeof t == "number");
3131
- class Vo {
3133
+ ]), zo = 1, Nt = (o) => Array.isArray(o) && o.length === 3 && o.every((t) => typeof t == "number");
3134
+ class Wo {
3132
3135
  constructor(t, e, i, n = {}) {
3133
3136
  this.source = t, this.motionGroupId = e, this.lastMessageReceivedAt = Date.now(), this.lastInvalidStateMessage = null, this.connectionQuality = "good";
3134
3137
  const r = i.motion_groups.find(
@@ -3141,7 +3144,7 @@ class Vo {
3141
3144
  this.isVirtual = n.isVirtual ?? !1, this.onError = n.onError, this.reconnectsOnFocus = (n.reconnectOnFocus ?? !0) && typeof window < "u", this.rapidlyChangingMotionState = r, this.lastValidStateMessage = {
3142
3145
  receivedAt: Date.now(),
3143
3146
  data: i
3144
- }, $(
3147
+ }, L(
3145
3148
  this,
3146
3149
  {
3147
3150
  source: !1,
@@ -3153,7 +3156,7 @@ class Vo {
3153
3156
  // keepAlive: a computed nobody observes is recomputed on every read
3154
3157
  // without consulting `equals`, so the hold would depend on a component
3155
3158
  // happening to observe the readout at the time.
3156
- readoutState: Ft({ equals: te, keepAlive: !0 })
3159
+ readoutState: zt({ equals: ne, keepAlive: !0 })
3157
3160
  },
3158
3161
  { autoBind: !0 }
3159
3162
  ), this.source.addEventListener("message", this.handleMessage), this.connectionQualityInterval = setInterval(
@@ -3171,7 +3174,7 @@ class Vo {
3171
3174
  * for untracked reads.
3172
3175
  */
3173
3176
  get readoutState() {
3174
- return Xt(this.rapidlyChangingMotionState);
3177
+ return ie(this.rapidlyChangingMotionState);
3175
3178
  }
3176
3179
  /** The motion group's state in the next message of the source */
3177
3180
  async nextMotionState() {
@@ -3228,7 +3231,7 @@ class Vo {
3228
3231
  updateRapidlyChangingMotionState(t, e) {
3229
3232
  const i = this.rapidlyChangingMotionState, n = t;
3230
3233
  for (const r of Object.keys(n))
3231
- e != null && e.has(r) || zt(i[r], n[r]) || (i[r] = n[r]);
3234
+ e != null && e.has(r) || Kt(i[r], n[r]) || (i[r] = n[r]);
3232
3235
  for (const r of Object.keys(i))
3233
3236
  e != null && e.has(r) || r in n || delete i[r];
3234
3237
  }
@@ -3241,7 +3244,7 @@ class Vo {
3241
3244
  updateConnectionQuality() {
3242
3245
  const t = Date.now() - this.lastMessageReceivedAt, e = this.isVirtual ? 3e3 : 1e3, i = this.isVirtual ? 6e3 : 3e3;
3243
3246
  if (t > i) {
3244
- this.source.readyState === No && this.source.reconnect(), this.setConnectionQuality("critical");
3247
+ this.source.readyState === zo && this.source.reconnect(), this.setConnectionQuality("critical");
3245
3248
  return;
3246
3249
  }
3247
3250
  if (t > e) {
@@ -3259,7 +3262,7 @@ class Vo {
3259
3262
  const e = this.source.parse(t.data);
3260
3263
  if (!(e != null && e.motion_groups)) {
3261
3264
  (h = this.onError) == null || h.call(this, {
3262
- message: z(t.data),
3265
+ message: H(t.data),
3263
3266
  url: this.source.url
3264
3267
  }), this.setLastInvalidStateMessage(t.data);
3265
3268
  return;
@@ -3277,38 +3280,38 @@ class Vo {
3277
3280
  }), this.setLastInvalidStateMessage(t.data);
3278
3281
  return;
3279
3282
  }
3280
- const r = !Ct(
3283
+ const r = !gt(
3281
3284
  this.rapidlyChangingMotionState.joint_position,
3282
3285
  n.joint_position,
3283
- ce
3286
+ ue
3284
3287
  ), s = this.rapidlyChangingMotionState.tcp !== n.tcp;
3285
3288
  if (!r && !s) {
3286
3289
  this.updateRapidlyChangingMotionState(
3287
3290
  n,
3288
- Lo
3291
+ Uo
3289
3292
  );
3290
3293
  return;
3291
3294
  }
3292
3295
  const a = this.rapidlyChangingMotionState.flange_pose, d = n.flange_pose;
3293
- if ((d == null ? void 0 : d.orientation) == null || !Dt(d.orientation)) {
3296
+ if ((d == null ? void 0 : d.orientation) == null || !Nt(d.orientation)) {
3294
3297
  const m = d == null ? void 0 : d.orientation;
3295
3298
  throw new Error(
3296
3299
  `Invalid newFlangePose.orientation: expected [number, number, number] (got ${m == null ? "null" : m.length})`
3297
3300
  );
3298
3301
  }
3299
- if ((a == null ? void 0 : a.orientation) == null || !Dt(a.orientation)) {
3302
+ if ((a == null ? void 0 : a.orientation) == null || !Nt(a.orientation)) {
3300
3303
  const m = a == null ? void 0 : a.orientation;
3301
3304
  throw new Error(
3302
3305
  `Invalid oldFlangePose.orientation: expected [number, number, number] (got ${m == null ? "null" : m.length})`
3303
3306
  );
3304
3307
  }
3305
- d.orientation = Zt(
3308
+ d.orientation = oe(
3306
3309
  d.orientation,
3307
3310
  a.orientation
3308
3311
  ), this.updateRapidlyChangingMotionState(n);
3309
3312
  }
3310
3313
  }
3311
- function Fo(o) {
3314
+ function Ho(o) {
3312
3315
  return {
3313
3316
  get url() {
3314
3317
  return o.url;
@@ -3324,38 +3327,38 @@ function Fo(o) {
3324
3327
  close: () => o.close(),
3325
3328
  parse: (t) => {
3326
3329
  var e;
3327
- return (e = Yt(t)) == null ? void 0 : e.result;
3330
+ return (e = qt(t)) == null ? void 0 : e.result;
3328
3331
  }
3329
3332
  };
3330
3333
  }
3331
- function Go(o, {
3334
+ function Yo(o, {
3332
3335
  controllerId: t,
3333
3336
  cellId: e,
3334
3337
  responseRateMs: i
3335
3338
  }) {
3336
3339
  const n = U(o), r = e ?? Z(o) ?? "cell", s = i === void 0 ? "" : `?response_rate=${i}`;
3337
- return Fo(
3340
+ return Ho(
3338
3341
  n.openReconnectingWebsocket(
3339
3342
  `/cells/${r}/controllers/${t}/state-stream${s}`
3340
3343
  )
3341
3344
  );
3342
3345
  }
3343
- const Bo = [
3346
+ const Ko = [
3344
3347
  "FeedbackOutOfWorkspace",
3345
3348
  "FeedbackJointLimitExceeded",
3346
3349
  "FeedbackAxisRangeExceeded",
3347
3350
  "FeedbackNoSolutionInCurrentConfiguration"
3348
3351
  ];
3349
- function yn(o) {
3350
- return o === "FeedbackSingularity" ? "Jogging.TargetPose.Error.Singularity.lb" : o === "FeedbackCollision" ? "Jogging.TargetPose.Error.Collision.lb" : Bo.includes(o) ? "Jogging.TargetPose.Error.NotReachable.lb" : "Jogging.TargetPose.Error.PlanningFailed.lb";
3352
+ function Qo(o) {
3353
+ return o === "FeedbackSingularity" ? "Jogging.TargetPose.Error.Singularity.lb" : o === "FeedbackCollision" ? "Jogging.TargetPose.Error.Collision.lb" : Ko.includes(o) ? "Jogging.TargetPose.Error.NotReachable.lb" : "Jogging.TargetPose.Error.PlanningFailed.lb";
3351
3354
  }
3352
- function de(o) {
3355
+ function me(o) {
3353
3356
  const t = o.api.opts.axiosInstance;
3354
3357
  if (!t)
3355
3358
  throw new Error("Nova API client has no configured HTTP transport");
3356
3359
  return t;
3357
3360
  }
3358
- function _t(o, t) {
3361
+ function Ct(o, t) {
3359
3362
  const e = o.api.opts.baseOptions ?? {}, i = { ...e, ...t };
3360
3363
  return (e.headers || t.headers) && (i.headers = {
3361
3364
  ...e.headers,
@@ -3365,25 +3368,25 @@ function _t(o, t) {
3365
3368
  ...t.params
3366
3369
  }), i;
3367
3370
  }
3368
- async function Uo(o, t, e, i) {
3371
+ async function qo(o, t, e, i) {
3369
3372
  var r;
3370
3373
  if (!e) return t;
3371
3374
  const n = `/experimental/motion-group-models/${encodeURIComponent(t)}/description`;
3372
3375
  i == null || i(`${n}?serial_number=${encodeURIComponent(e)}`);
3373
3376
  try {
3374
- return (await de(o).get(
3377
+ return (await me(o).get(
3375
3378
  n,
3376
- _t(o, { params: { serial_number: e } })
3379
+ Ct(o, { params: { serial_number: e } })
3377
3380
  )).data.name;
3378
3381
  } catch (s) {
3379
- if (!Ht(s) || ((r = s.response) == null ? void 0 : r.status) !== 404)
3382
+ if (!Zt(s) || ((r = s.response) == null ? void 0 : r.status) !== 404)
3380
3383
  throw s;
3381
3384
  return t;
3382
3385
  }
3383
3386
  }
3384
- async function zo(o, t, e, i, n) {
3387
+ async function Zo(o, t, e, i, n) {
3385
3388
  var h;
3386
- const r = de(o), s = `/motion-group-models/${encodeURIComponent(t)}/${i}`, a = {};
3389
+ const r = me(o), s = `/motion-group-models/${encodeURIComponent(t)}/${i}`, a = {};
3387
3390
  if (e) {
3388
3391
  const c = `/experimental${s}`;
3389
3392
  n == null || n(
@@ -3392,22 +3395,22 @@ async function zo(o, t, e, i, n) {
3392
3395
  try {
3393
3396
  return (await r.get(
3394
3397
  c,
3395
- _t(o, {
3398
+ Ct(o, {
3396
3399
  ...a,
3397
3400
  params: { serial_number: e }
3398
3401
  })
3399
3402
  )).data;
3400
3403
  } catch (m) {
3401
- if (!Ht(m) || ((h = m.response) == null ? void 0 : h.status) !== 404)
3404
+ if (!Zt(m) || ((h = m.response) == null ? void 0 : h.status) !== 404)
3402
3405
  throw m;
3403
3406
  }
3404
3407
  }
3405
3408
  return n == null || n(s), (await r.get(
3406
3409
  s,
3407
- _t(o, a)
3410
+ Ct(o, a)
3408
3411
  )).data;
3409
3412
  }
3410
- const Wo = [
3413
+ const Xo = [
3411
3414
  "motionGroupDescription",
3412
3415
  "controllerConfiguration",
3413
3416
  "kinematicModel",
@@ -3417,15 +3420,15 @@ const Wo = [
3417
3420
  "motionStateStream",
3418
3421
  "controllerStateStream"
3419
3422
  ];
3420
- class ge extends Error {
3423
+ class pe extends Error {
3421
3424
  constructor(t, e, i) {
3422
3425
  super(i), this.stepId = t, this.cause = e, this.name = "RobotLoadStepError";
3423
3426
  }
3424
3427
  }
3425
- function mt(o) {
3426
- return o instanceof ge;
3428
+ function pt(o) {
3429
+ return o instanceof pe;
3427
3430
  }
3428
- class Yo {
3431
+ class ti {
3429
3432
  /**
3430
3433
  * One instance tracks one load. Concurrent loads must not share one — a load
3431
3434
  * that has been superseded keeps reporting for a step or two before it
@@ -3433,12 +3436,12 @@ class Yo {
3433
3436
  * that replaced it (clearing a recorded failure, for instance).
3434
3437
  */
3435
3438
  constructor(t = null, e = null) {
3436
- this.motionGroupId = null, this.controllerId = null, this.steps = [], this.retryAttempt = 0, this.fatalError = null, this.currentStepStartedAt = null, this.motionGroupId = t, this.controllerId = e, this.steps = Wo.map((i) => ({
3439
+ this.motionGroupId = null, this.controllerId = null, this.steps = [], this.retryAttempt = 0, this.fatalError = null, this.currentStepStartedAt = null, this.motionGroupId = t, this.controllerId = e, this.steps = Xo.map((i) => ({
3437
3440
  id: i,
3438
3441
  status: "pending",
3439
3442
  url: null,
3440
3443
  error: null
3441
- })), $(this, {}, { autoBind: !0 });
3444
+ })), L(this, {}, { autoBind: !0 });
3442
3445
  }
3443
3446
  /** Reset the step states for another attempt at the same robot */
3444
3447
  beginRetry(t) {
@@ -3488,8 +3491,8 @@ class Yo {
3488
3491
  return this.steps.length > 0 && this.steps.every((t) => t.status === "succeeded");
3489
3492
  }
3490
3493
  }
3491
- const Ho = 1e4;
3492
- async function $t(o, t, e) {
3494
+ const ei = 1e4;
3495
+ async function Ft(o, t, e) {
3493
3496
  let i;
3494
3497
  o.catch(() => {
3495
3498
  });
@@ -3504,7 +3507,7 @@ async function $t(o, t, e) {
3504
3507
  clearTimeout(i);
3505
3508
  }
3506
3509
  }
3507
- async function Qo({
3510
+ async function oi({
3508
3511
  nova: o,
3509
3512
  cellId: t,
3510
3513
  controllerId: e,
@@ -3512,7 +3515,7 @@ async function Qo({
3512
3515
  progress: n,
3513
3516
  createStateSource: r,
3514
3517
  isStale: s = () => !1,
3515
- socketTimeoutMs: a = Ho
3518
+ socketTimeoutMs: a = ei
3516
3519
  }) {
3517
3520
  let d, h, c = !1;
3518
3521
  function m() {
@@ -3521,10 +3524,10 @@ async function Qo({
3521
3524
  async function u(l, p, f) {
3522
3525
  n.startStep(l, p);
3523
3526
  try {
3524
- const v = await f();
3525
- return n.succeedStep(l), v;
3526
- } catch (v) {
3527
- throw n.failStep(l, v), new ge(l, v, z(v));
3527
+ const _ = await f();
3528
+ return n.succeedStep(l), _;
3529
+ } catch (_) {
3530
+ throw n.failStep(l, _), new pe(l, _, H(_));
3528
3531
  }
3529
3532
  }
3530
3533
  try {
@@ -3539,34 +3542,34 @@ async function Qo({
3539
3542
  )
3540
3543
  );
3541
3544
  if (s()) return null;
3542
- const { configuration: v } = await u(
3545
+ const { configuration: _ } = await u(
3543
3546
  "controllerConfiguration",
3544
3547
  p,
3545
3548
  () => o.api.controller.getRobotController(t, e)
3546
3549
  );
3547
3550
  if (s()) return null;
3548
- const w = {
3551
+ const E = {
3549
3552
  model: f.motion_group_model,
3550
3553
  serialNumber: f.serial_number
3551
- }, E = w.serialNumber ? `?serial_number=${encodeURIComponent(w.serialNumber)}` : "", T = await u(
3554
+ }, w = E.serialNumber ? `?serial_number=${encodeURIComponent(E.serialNumber)}` : "", j = await u(
3552
3555
  "kinematicModel",
3553
- `/experimental/motion-group-models/${encodeURIComponent(w.model)}/kinematic${E}`,
3554
- () => zo(
3556
+ `/experimental/motion-group-models/${encodeURIComponent(E.model)}/kinematic${w}`,
3557
+ () => Zo(
3555
3558
  o,
3556
- w.model,
3557
- w.serialNumber,
3559
+ E.model,
3560
+ E.serialNumber,
3558
3561
  "kinematic",
3559
3562
  (y) => n.updateStepUrl("kinematicModel", y)
3560
3563
  )
3561
3564
  );
3562
3565
  if (s()) return null;
3563
- const j = await u(
3566
+ const T = await u(
3564
3567
  "motionGroupModel",
3565
- `/experimental/motion-group-models/${encodeURIComponent(w.model)}/description${E}`,
3566
- () => Uo(
3568
+ `/experimental/motion-group-models/${encodeURIComponent(E.model)}/description${w}`,
3569
+ () => qo(
3567
3570
  o,
3568
- w.model,
3569
- w.serialNumber,
3571
+ E.model,
3572
+ E.serialNumber,
3570
3573
  (y) => n.updateStepUrl("motionGroupModel", y)
3571
3574
  )
3572
3575
  );
@@ -3581,7 +3584,7 @@ async function Qo({
3581
3584
  ) ?? []
3582
3585
  );
3583
3586
  if (s()) return null;
3584
- const { controllerState: M, motionGroupState: O } = await u(
3587
+ const { controllerState: I, motionGroupState: O } = await u(
3585
3588
  "controllerState",
3586
3589
  `${p}/state`,
3587
3590
  async () => {
@@ -3599,18 +3602,18 @@ async function Qo({
3599
3602
  }
3600
3603
  );
3601
3604
  if (s()) return null;
3602
- const L = `${l}/state-stream`, { socket: B, initialMotionState: J } = await u(
3605
+ const $ = `${l}/state-stream`, { socket: G, initialMotionState: P } = await u(
3603
3606
  "motionStateStream",
3604
- L,
3607
+ $,
3605
3608
  async () => {
3606
- var K;
3607
- const y = o.openReconnectingWebsocket(L);
3609
+ var Q;
3610
+ const y = o.openReconnectingWebsocket($);
3608
3611
  d = y;
3609
- const k = await $t(
3612
+ const k = await Ft(
3610
3613
  y.firstMessage(),
3611
3614
  a,
3612
- `No motion state received from ${L} within ${a / 1e3}s`
3613
- ), R = (K = Yt(k.data)) == null ? void 0 : K.result;
3615
+ `No motion state received from ${$} within ${a / 1e3}s`
3616
+ ), R = (Q = qt(k.data)) == null ? void 0 : Q.result;
3614
3617
  if (!R)
3615
3618
  throw new Error(
3616
3619
  `Unable to parse initial motion state message ${k.data}`
@@ -3623,10 +3626,10 @@ async function Qo({
3623
3626
  "controllerStateStream",
3624
3627
  `${p}/state`,
3625
3628
  async () => {
3626
- var K;
3629
+ var Q;
3627
3630
  const y = r({ cellId: t, controllerId: e });
3628
3631
  h = y, n.updateStepUrl("controllerStateStream", y.url);
3629
- const k = await $t(
3632
+ const k = await Ft(
3630
3633
  y.firstMessage(),
3631
3634
  a,
3632
3635
  `No controller state received from ${y.url} within ${a / 1e3}s`
@@ -3635,7 +3638,7 @@ async function Qo({
3635
3638
  throw new Error(
3636
3639
  `Unable to parse initial controller state message ${k.data}`
3637
3640
  );
3638
- if (!((K = R.motion_groups) != null && K.some((ue) => ue.motion_group === i)))
3641
+ if (!((Q = R.motion_groups) != null && Q.some((fe) => fe.motion_group === i)))
3639
3642
  throw new Error(
3640
3643
  `Controller state from ${y.url} does not list motion group ${i} yet`
3641
3644
  );
@@ -3644,14 +3647,14 @@ async function Qo({
3644
3647
  );
3645
3648
  return s() ? null : (c = !0, {
3646
3649
  motionGroupDescription: f,
3647
- controllerConfiguration: v,
3648
- kinematicModel: T,
3649
- motionGroupModelName: j,
3650
+ controllerConfiguration: _,
3651
+ kinematicModel: j,
3652
+ motionGroupModelName: T,
3650
3653
  coordinateSystems: x,
3651
- controllerState: M,
3654
+ controllerState: I,
3652
3655
  motionGroupState: O,
3653
- initialMotionState: J,
3654
- motionStateSocket: B,
3656
+ initialMotionState: P,
3657
+ motionStateSocket: G,
3655
3658
  stateSource: D,
3656
3659
  initialControllerState: it,
3657
3660
  dispose: m
@@ -3660,14 +3663,14 @@ async function Qo({
3660
3663
  c || m();
3661
3664
  }
3662
3665
  }
3663
- class Ko {
3666
+ class ii {
3664
3667
  constructor(t) {
3665
- this.options = t, this.plannedTrajectory = null, this.trajectoryState = "idle", this.lastError = null, this.disposers = [], this.logger = t.logger ?? console, $(
3668
+ this.options = t, this.plannedTrajectory = null, this.trajectoryState = "idle", this.lastError = null, this.disposers = [], this.logger = t.logger ?? console, L(
3666
3669
  this,
3667
3670
  { socket: !1, disposers: !1, logger: !1, options: !1 },
3668
3671
  { autoBind: !0 }
3669
3672
  ), this.socket = this.openSocket(), this.disposers.push(
3670
- pt(
3673
+ yt(
3671
3674
  () => this.executionState,
3672
3675
  (e) => {
3673
3676
  e === "END_OF_TRAJECTORY" && this.reset();
@@ -3696,29 +3699,29 @@ class Ko {
3696
3699
  * the robot and when the planner cannot be reached.
3697
3700
  */
3698
3701
  async planTrajectory(t) {
3699
- var w, E, T, j, x;
3700
- if ((E = (w = this.options).isLocked) != null && E.call(w))
3702
+ var E, w, j, T, x;
3703
+ if ((w = (E = this.options).isLocked) != null && w.call(E))
3701
3704
  throw this.reset(), new Error("Cannot plan trajectory: the robot is locked");
3702
3705
  await this.ensureMovementOwnership();
3703
- const e = this.motionStream.rapidlyChangingMotionState.joint_position ?? [], { cycle_time: i, mounting: n, motion_group_model: r, tcps: s } = this.motionStream.description, a = this.joggingStore.selectedTcpId, d = a ? (T = s == null ? void 0 : s[a]) == null ? void 0 : T.pose : void 0, h = {
3706
+ const e = this.motionStream.rapidlyChangingMotionState.joint_position ?? [], { cycle_time: i, mounting: n, motion_group_model: r, tcps: s } = this.motionStream.description, a = this.joggingStore.selectedTcpId, d = a ? (j = s == null ? void 0 : s[a]) == null ? void 0 : j.pose : void 0, h = {
3704
3707
  // The model the jogger plans step jogs with: the custom copy that holds
3705
3708
  // this robot's data, if the app gave one
3706
- motion_group_model: ((j = this.jogger.options) == null ? void 0 : j.motionGroupModel) ?? r,
3709
+ motion_group_model: ((T = this.jogger.options) == null ? void 0 : T.motionGroupModel) ?? r,
3707
3710
  cycle_time: i ?? 0,
3708
3711
  mounting: n,
3709
3712
  ...d && { tcp_offset: d }
3710
3713
  };
3711
3714
  let c;
3712
3715
  if (t.type === "cartesian") {
3713
- let M = t.pose;
3716
+ let I = t.pose;
3714
3717
  const O = t.coordinateSystemId || "world";
3715
3718
  if (O !== "world")
3716
3719
  try {
3717
- M = ct(
3720
+ I = ct(
3718
3721
  {
3719
3722
  pose: {
3720
- position: M.position ?? [0, 0, 0],
3721
- orientation: M.orientation ?? [0, 0, 0]
3723
+ position: I.position ?? [0, 0, 0],
3724
+ orientation: I.orientation ?? [0, 0, 0]
3722
3725
  },
3723
3726
  coordinateSystemId: O
3724
3727
  },
@@ -3733,7 +3736,7 @@ class Ko {
3733
3736
  tcp_velocity_limit: this.joggingStore.translationVelocityMmPerSec
3734
3737
  },
3735
3738
  path: {
3736
- target_pose: M,
3739
+ target_pose: I,
3737
3740
  path_definition_name: "PathCartesianPTP"
3738
3741
  }
3739
3742
  };
@@ -3762,18 +3765,18 @@ class Ko {
3762
3765
  motion_commands: [c]
3763
3766
  }
3764
3767
  );
3765
- } catch (M) {
3766
- throw this.reset(), M;
3768
+ } catch (I) {
3769
+ throw this.reset(), I;
3767
3770
  }
3768
3771
  const u = m.response;
3769
3772
  if ("error_feedback" in u) {
3770
- const M = ((x = u.error_feedback) == null ? void 0 : x.error_feedback_name) ?? "FeedbackUnknown";
3771
- return this.reset(), { ok: !1, errorFeedbackName: M };
3773
+ const I = ((x = u.error_feedback) == null ? void 0 : x.error_feedback_name) ?? "FeedbackUnknown";
3774
+ return this.reset(), { ok: !1, errorFeedbackName: I };
3772
3775
  }
3773
3776
  const l = u.joint_positions, p = l[0], f = l[l.length - 1];
3774
3777
  if (!p || !f)
3775
3778
  throw this.reset(), new Error("Trajectory returned invalid joint positions");
3776
- const v = {
3779
+ const _ = {
3777
3780
  message_type: "InitializeMovementRequest",
3778
3781
  trajectory: {
3779
3782
  message_type: "TrajectoryData",
@@ -3782,7 +3785,7 @@ class Ko {
3782
3785
  data: u
3783
3786
  }
3784
3787
  };
3785
- return this.socket.sendJson(v), S(() => {
3788
+ return this.socket.sendJson(_), S(() => {
3786
3789
  this.plannedTrajectory = { startJoints: p, endJoints: f };
3787
3790
  }), { ok: !0 };
3788
3791
  }
@@ -3867,7 +3870,7 @@ class Ko {
3867
3870
  }
3868
3871
  handleMessage(t) {
3869
3872
  var i, n;
3870
- const e = (i = P(t.data)) == null ? void 0 : i.result;
3873
+ const e = (i = J(t.data)) == null ? void 0 : i.result;
3871
3874
  if (e)
3872
3875
  switch (e.kind) {
3873
3876
  case "INITIALIZE_RECEIVED":
@@ -3894,117 +3897,20 @@ class Ko {
3894
3897
  this.socket.removeEventListener("message", this.handleMessage), this.socket.dispose();
3895
3898
  }
3896
3899
  }
3897
- class he extends Error {
3900
+ const ni = {
3901
+ a: 0,
3902
+ d: 0,
3903
+ alpha: 0,
3904
+ theta: 0,
3905
+ reverse_rotation_direction: !1
3906
+ };
3907
+ class ri {
3898
3908
  /** @internal The session makes it, see RobotSession */
3899
- constructor(t, e, i) {
3900
- super(t), this.url = e, this.cause = i, this.name = "RobotModeChangeError";
3901
- }
3902
- }
3903
- class qo {
3904
3909
  constructor(t, e, i, n, r) {
3905
- this.nova = t, this.ids = e, this.live = i, this.safety = n, this.logger = r, this.state = "inactive", this.disposers = [], i.controllerState.mode === "MODE_CONTROL" && (this.state = "active"), $(
3906
- this,
3907
- {
3908
- nova: !1,
3909
- ids: !1,
3910
- live: !1,
3911
- safety: !1,
3912
- logger: !1,
3913
- disposers: !1
3914
- },
3915
- { autoBind: !0 }
3916
- ), this.disposers.push(
3917
- pt(
3918
- () => this.live.controllerState.mode,
3919
- (s) => {
3920
- this.state = s === "MODE_CONTROL" ? "active" : "inactive";
3921
- }
3922
- )
3923
- ), this.disposers.push(
3924
- pt(
3925
- () => this.live.connectionQuality,
3926
- (s) => {
3927
- s === "critical" && (this.state = "inactive");
3928
- }
3929
- )
3910
+ this.motionGroupDescription = t, this.controllerConfiguration = e, this.kinematicModel = i, this.resolvedMotionGroupModel = n, this.coordinateSystems = r, this.dhParameters = (t.dh_parameters ?? []).map(
3911
+ (s) => ({ ...ni, ...s })
3930
3912
  );
3931
3913
  }
3932
- /**
3933
- * Switches the controller to control mode. Does nothing while a mode change
3934
- * is in progress, or when the safety state or operation mode would make
3935
- * NOVA refuse it (see {@link RobotSafety.activationBlockedReason}). Rejects
3936
- * with a {@link RobotModeChangeError} when NOVA refuses it.
3937
- */
3938
- async activate() {
3939
- if (this.state !== "inactive") {
3940
- this.logger.warn("Tried to activate while already activating");
3941
- return;
3942
- }
3943
- const t = this.safety().activationBlockedReason;
3944
- if (t) {
3945
- this.logger.warn(
3946
- `Not enabling control mode for controller "${this.ids.controllerId}" because ${t}`
3947
- );
3948
- return;
3949
- }
3950
- this.state = "activating";
3951
- try {
3952
- await this.setMode("ROBOT_SYSTEM_MODE_CONTROL"), S(() => {
3953
- this.live.controllerState.mode === "MODE_CONTROL" && (this.state = "active");
3954
- });
3955
- } catch (e) {
3956
- throw S(() => {
3957
- this.state = "inactive";
3958
- }), e;
3959
- }
3960
- }
3961
- /**
3962
- * Switches the controller to monitor mode. Rejects with a
3963
- * {@link RobotModeChangeError} when NOVA refuses it.
3964
- */
3965
- async deactivate() {
3966
- if (this.state !== "active") {
3967
- this.logger.warn("Tried to deactivate while already deactivating");
3968
- return;
3969
- }
3970
- this.state = "deactivating";
3971
- try {
3972
- await this.setMode("ROBOT_SYSTEM_MODE_MONITOR"), S(() => {
3973
- this.live.controllerState.mode !== "MODE_CONTROL" && (this.state = "inactive");
3974
- });
3975
- } catch (t) {
3976
- throw S(() => {
3977
- this.state = "active";
3978
- }), t;
3979
- }
3980
- }
3981
- /** Activates an inactive robot, deactivates an active one */
3982
- async toggle() {
3983
- this.state === "inactive" ? await this.activate() : this.state === "active" && await this.deactivate();
3984
- }
3985
- dispose() {
3986
- for (const t of this.disposers)
3987
- t();
3988
- }
3989
- async setMode(t) {
3990
- const { cellId: e, controllerId: i } = this.ids;
3991
- try {
3992
- await this.nova.api.controller.setDefaultMode(e, i, t);
3993
- } catch (n) {
3994
- const r = (typeof n == "object" && n !== null && "url" in n && typeof n.url == "string" ? n.url : void 0) ?? `/cells/${e}/controllers/${i}/mode`;
3995
- throw new he(
3996
- `Failed to set controller "${i}" to ${t}: ${z(n)}`,
3997
- r,
3998
- n
3999
- );
4000
- }
4001
- }
4002
- }
4003
- class Zo {
4004
- /** @internal The session makes it, see RobotSession */
4005
- constructor(t, e, i, n, r) {
4006
- this.motionGroupDescription = t, this.controllerConfiguration = e, this.kinematicModel = i, this.resolvedMotionGroupModel = n, this.coordinateSystems = r;
4007
- }
4008
3914
  /** A virtual robot of NOVA's simulation, not a physical one */
4009
3915
  get isVirtual() {
4010
3916
  return this.controllerConfiguration.kind === "VirtualController";
@@ -4026,10 +3932,7 @@ class Zo {
4026
3932
  /** Revolute, or prismatic for a linear axis */
4027
3933
  get jointType() {
4028
3934
  var t, e;
4029
- return ((e = (t = this.motionGroupDescription.dh_parameters) == null ? void 0 : t[0]) == null ? void 0 : e.type) ?? N.RevoluteJoint;
4030
- }
4031
- get dhParameters() {
4032
- return this.motionGroupDescription.dh_parameters ?? [];
3935
+ return ((e = (t = this.motionGroupDescription.dh_parameters) == null ? void 0 : t[0]) == null ? void 0 : e.type) ?? V.RevoluteJoint;
4033
3936
  }
4034
3937
  /** The joints' limits in automatic mode, one per joint */
4035
3938
  get jointLimits() {
@@ -4083,11 +3986,11 @@ class Zo {
4083
3986
  return this.motionGroupDescription.tcps ?? {};
4084
3987
  }
4085
3988
  }
4086
- const Lt = (o) => Array.isArray(o) && o.length === 3 && o.every((t) => typeof t == "number");
4087
- class Xo {
3989
+ const Bt = (o) => Array.isArray(o) && o.length === 3 && o.every((t) => typeof t == "number"), si = 1e-3, ai = 0.5, li = 0.01, ft = (o, t, e) => !!(o && t && gt([...o], [...t], e));
3990
+ class ci {
4088
3991
  /** @internal The session makes it, see RobotSession */
4089
3992
  constructor(t, e, i) {
4090
- this.stream = t, this.description = e, this.jogging = i, $(
3993
+ this.stream = t, this.description = e, this.jogging = i, L(
4091
3994
  this,
4092
3995
  { stream: !1, description: !1, jogging: !1 },
4093
3996
  { autoBind: !0 }
@@ -4136,6 +4039,39 @@ class Xo {
4136
4039
  get displayedTcpPose() {
4137
4040
  return this.inSelectedFrame(this.tcpPoseReferenceOf(this.readoutState)).pose;
4138
4041
  }
4042
+ /**
4043
+ * Whether the robot stands at a pose: its joints within 0.001, or its TCP
4044
+ * within 0.5 mm and 0.01 rad of the pose in the pose's TCP and coordinate
4045
+ * system. Not at a pose of a TCP or coordinate system it does not know.
4046
+ */
4047
+ isAt(t) {
4048
+ if (t.type === "joint")
4049
+ return ft(
4050
+ t.joints,
4051
+ this.rapidlyChangingMotionState.joint_position,
4052
+ si
4053
+ );
4054
+ try {
4055
+ const e = Lt({
4056
+ inputPose: this.measuredTcpPoseReference,
4057
+ selectedTcpId: t.tcpPose.tcpId,
4058
+ selectedCoordinateSystemId: t.tcpPose.coordSystemId,
4059
+ tcpOffsetsById: this.description.tcpOffsetsById,
4060
+ coordinateSystems: this.jogging.coordSystems
4061
+ });
4062
+ return ft(
4063
+ t.tcpPose.pose.position,
4064
+ e.pose.position,
4065
+ ai
4066
+ ) && ft(
4067
+ t.tcpPose.pose.orientation,
4068
+ e.pose.orientation,
4069
+ li
4070
+ );
4071
+ } catch {
4072
+ return !1;
4073
+ }
4074
+ }
4139
4075
  /** The motion state in the stream's next message */
4140
4076
  nextMotionState() {
4141
4077
  return this.stream.nextMotionState();
@@ -4143,21 +4079,21 @@ class Xo {
4143
4079
  /** Resolves once two messages in a row show the joints standing still */
4144
4080
  async waitUntilStopped() {
4145
4081
  let t = await this.stream.nextMotionState(), e = await this.stream.nextMotionState();
4146
- for (; !Ct(
4082
+ for (; !gt(
4147
4083
  t.joint_position,
4148
4084
  e.joint_position,
4149
- ce
4085
+ ue
4150
4086
  ); )
4151
4087
  t = e, e = await this.stream.nextMotionState();
4152
4088
  }
4153
4089
  tcpPoseReferenceOf(t) {
4154
4090
  var n, r;
4155
4091
  const e = (n = t.tcp_pose) == null ? void 0 : n.position, i = (r = t.tcp_pose) == null ? void 0 : r.orientation;
4156
- if (!e || !Lt(e))
4092
+ if (!e || !Bt(e))
4157
4093
  throw new Error(
4158
4094
  `Invalid current TCP pose position for motion group ${this.stream.motionGroupId}`
4159
4095
  );
4160
- if (!i || !Lt(i))
4096
+ if (!i || !Bt(i))
4161
4097
  throw new Error(
4162
4098
  `Invalid current TCP pose orientation for motion group ${this.stream.motionGroupId}`
4163
4099
  );
@@ -4168,7 +4104,7 @@ class Xo {
4168
4104
  };
4169
4105
  }
4170
4106
  inSelectedFrame(t) {
4171
- return bo({
4107
+ return Lt({
4172
4108
  inputPose: t,
4173
4109
  selectedTcpId: this.jogging.selectedTcpId,
4174
4110
  selectedCoordinateSystemId: this.jogging.selectedCoordSystemId,
@@ -4177,24 +4113,24 @@ class Xo {
4177
4113
  });
4178
4114
  }
4179
4115
  }
4180
- const ti = [
4116
+ const di = [
4181
4117
  "SAFETY_STATE_ROBOT_EMERGENCY_STOP",
4182
4118
  "SAFETY_STATE_DEVICE_EMERGENCY_STOP"
4183
- ], ei = ["SAFETY_STATE_NORMAL", "SAFETY_STATE_REDUCED"], oi = [
4119
+ ], gi = ["SAFETY_STATE_NORMAL", "SAFETY_STATE_REDUCED"], hi = [
4184
4120
  "SAFETY_STATE_STOP",
4185
4121
  "SAFETY_STATE_STOP_0",
4186
4122
  "SAFETY_STATE_STOP_1",
4187
4123
  "SAFETY_STATE_STOP_2"
4188
- ], ii = [
4124
+ ], ui = [
4189
4125
  "OPERATION_MODE_AUTO",
4190
4126
  "OPERATION_MODE_MANUAL",
4191
4127
  "OPERATION_MODE_MANUAL_T1",
4192
4128
  "OPERATION_MODE_MANUAL_T2"
4193
4129
  ];
4194
- class ni {
4130
+ class mi {
4195
4131
  /** @internal The session makes it, see RobotSession */
4196
4132
  constructor(t, e) {
4197
- this.state = t, this.activationState = e, $(
4133
+ this.state = t, this.activationState = e, L(
4198
4134
  this,
4199
4135
  { state: !1, activationState: !1 },
4200
4136
  { autoBind: !0 }
@@ -4208,22 +4144,22 @@ class ni {
4208
4144
  }
4209
4145
  /** Whether an emergency stop is active */
4210
4146
  get isEstopActive() {
4211
- return ti.includes(this.safetyState);
4147
+ return di.includes(this.safetyState);
4212
4148
  }
4213
4149
  /** Whether the safety state allows movement */
4214
4150
  get isMoveableSafetyState() {
4215
- return ei.includes(this.safetyState);
4151
+ return gi.includes(this.safetyState);
4216
4152
  }
4217
4153
  /** Whether the operation mode allows movement */
4218
4154
  get isMoveableOperationMode() {
4219
- return ii.includes(this.operationMode);
4155
+ return ui.includes(this.operationMode);
4220
4156
  }
4221
4157
  /**
4222
4158
  * Whether the safety state allows switching to control mode: the moveable
4223
4159
  * ones and the stop states (RPS-1296)
4224
4160
  */
4225
4161
  get isActivatableSafetyState() {
4226
- return this.isMoveableSafetyState || oi.includes(this.safetyState);
4162
+ return this.isMoveableSafetyState || hi.includes(this.safetyState);
4227
4163
  }
4228
4164
  /**
4229
4165
  * Why the controller cannot be switched to control mode now, or null. NOVA
@@ -4249,12 +4185,163 @@ class ni {
4249
4185
  return this.isMoveableSafetyState && this.isMoveableOperationMode && this.activationState() === "active" && this.state.connectionQuality !== "critical";
4250
4186
  }
4251
4187
  }
4252
- const ri = {
4188
+ function pi(o) {
4189
+ return o.type === "joint" ? { type: "joint", joints: o.joints } : {
4190
+ type: "cartesian",
4191
+ pose: o.tcpPose.pose,
4192
+ coordinateSystemId: o.tcpPose.coordSystemId
4193
+ };
4194
+ }
4195
+ class fi {
4196
+ /** @internal The session makes it, see RobotSession */
4197
+ constructor(t, e) {
4198
+ this.robot = t, this.logger = e, this.editing = !1, this.draft = "", this.confirming = !1, this.staged = null, this.moveStarted = !1, this.disposers = [], L(
4199
+ this,
4200
+ { robot: !1, logger: !1, disposers: !1, onBeforePlan: !1 },
4201
+ { autoBind: !0 }
4202
+ ), this.disposers.push(
4203
+ yt(
4204
+ () => this.robot.jogging.selectedTabId,
4205
+ () => {
4206
+ (this.editing || this.staged) && this.resetToLive();
4207
+ }
4208
+ )
4209
+ ), this.disposers.push(
4210
+ yt(
4211
+ () => ({
4212
+ trajectoryState: this.robot.trajectory.trajectoryState,
4213
+ executionState: this.robot.trajectory.executionState,
4214
+ isRobotAtStagedPose: this.isRobotAtStagedPose
4215
+ }),
4216
+ ({ trajectoryState: i, executionState: n, isRobotAtStagedPose: r }) => {
4217
+ if (!this.stagedPose) return;
4218
+ if (i === "moving") {
4219
+ this.moveStarted = !0;
4220
+ return;
4221
+ }
4222
+ (n === "END_OF_TRAJECTORY" || this.moveStarted && r && i !== "stopping") && this.resetToLive();
4223
+ }
4224
+ )
4225
+ );
4226
+ }
4227
+ dispose() {
4228
+ for (const t of this.disposers)
4229
+ t();
4230
+ }
4231
+ get phase() {
4232
+ return this.editing ? "editing" : this.staged ? this.staged.errorKey ? "error" : "staged" : "view";
4233
+ }
4234
+ get isJointTab() {
4235
+ return this.robot.jogging.selectedTabId === "joint";
4236
+ }
4237
+ /** The live pose as text: the joints on the joint tab, else the TCP pose */
4238
+ get liveDisplayString() {
4239
+ return this.isJointTab ? Ot(this.robot.state.jointPose) : kt(this.robot.state.displayedTcpPose);
4240
+ }
4241
+ /** What the field shows outside of edit mode: staged value or live pose */
4242
+ get displayString() {
4243
+ var t;
4244
+ return ((t = this.staged) == null ? void 0 : t.displayString) ?? this.liveDisplayString;
4245
+ }
4246
+ /** Parsed form of the draft, or null while it is not a valid pose */
4247
+ get parsedDraft() {
4248
+ const { state: t, motionGroupId: e } = this.robot;
4249
+ if (this.isJointTab) {
4250
+ const r = to(this.draft, t.jointPose.length);
4251
+ return r ? { type: "joint", motionGroupId: e, joints: r } : null;
4252
+ }
4253
+ const i = eo(this.draft);
4254
+ if (!i) return null;
4255
+ const n = t.displayedTcpPoseReference;
4256
+ return {
4257
+ type: "cartesian",
4258
+ motionGroupId: e,
4259
+ tcpPose: {
4260
+ pose: { position: i.position, orientation: i.orientation },
4261
+ coordSystemId: n.coordinateSystemId,
4262
+ tcpId: n.tcpId
4263
+ }
4264
+ };
4265
+ }
4266
+ get draftValid() {
4267
+ return this.parsedDraft !== null;
4268
+ }
4269
+ beginEdit() {
4270
+ this.draft = this.displayString, this.editing = !0;
4271
+ }
4272
+ setDraft(t) {
4273
+ this.draft = t;
4274
+ }
4275
+ cancelEdit() {
4276
+ this.editing = !1, this.draft = "";
4277
+ }
4278
+ /**
4279
+ * Validates the typed pose against the backend by planning a trajectory to
4280
+ * it. On success the trajectory is left initialized on the execution
4281
+ * socket, so Move to is armed immediately; on a planner rejection the pose
4282
+ * stays staged with the failure explanation. Does nothing while the robot
4283
+ * may not move.
4284
+ */
4285
+ async confirmEdit() {
4286
+ var i;
4287
+ const t = this.parsedDraft;
4288
+ if (!t || this.confirming || this.robot.notMoveableReason()) return;
4289
+ const e = t.type === "joint" ? Ot(t.joints) : kt(t.tcpPose.pose);
4290
+ this.confirming = !0;
4291
+ try {
4292
+ await ((i = this.onBeforePlan) == null ? void 0 : i.call(this));
4293
+ const n = await this.robot.trajectory.planTrajectory(
4294
+ pi(t)
4295
+ );
4296
+ S(() => {
4297
+ this.staged = {
4298
+ pose: t,
4299
+ displayString: e,
4300
+ errorKey: n.ok ? null : Qo(n.errorFeedbackName)
4301
+ }, this.editing = !1, this.draft = "";
4302
+ });
4303
+ } catch (n) {
4304
+ this.logger.warn("Failed to plan trajectory to typed pose", n), S(() => {
4305
+ this.staged = {
4306
+ pose: t,
4307
+ displayString: e,
4308
+ errorKey: "Jogging.TargetPose.Error.PlanningFailed.lb"
4309
+ }, this.editing = !1, this.draft = "";
4310
+ });
4311
+ } finally {
4312
+ S(() => {
4313
+ this.confirming = !1;
4314
+ });
4315
+ }
4316
+ }
4317
+ /** Discards the staged pose and shows the live pose again */
4318
+ async resetToLive() {
4319
+ const t = this.staged !== null && !this.staged.errorKey;
4320
+ this.staged = null, this.moveStarted = !1, this.editing = !1, this.draft = "", t && await this.robot.trajectory.stopAndReset();
4321
+ }
4322
+ /**
4323
+ * Drops the staged pose and the edit without touching the trajectory: for
4324
+ * when another flow has just planned its own (RobotPad: a saved pose that
4325
+ * the user selected)
4326
+ */
4327
+ clear() {
4328
+ this.editing = !1, this.staged = null;
4329
+ }
4330
+ /** The staged pose, if it is valid to store or move to */
4331
+ get stagedPose() {
4332
+ return !this.staged || this.staged.errorKey ? null : this.staged.pose;
4333
+ }
4334
+ /** True when the robot has arrived at (or already was at) the staged pose */
4335
+ get isRobotAtStagedPose() {
4336
+ return this.stagedPose ? this.robot.state.isAt(this.stagedPose) : !1;
4337
+ }
4338
+ }
4339
+ const yi = {
4253
4340
  getItem: () => null,
4254
4341
  setItem: () => {
4255
4342
  }
4256
4343
  };
4257
- class si {
4344
+ class Si {
4258
4345
  /**
4259
4346
  * @internal Use {@link loadRobotSession}, which loads the resources and
4260
4347
  * makes the session
@@ -4262,8 +4349,8 @@ class si {
4262
4349
  constructor(t, e, i, n = {}) {
4263
4350
  const r = n.logger ?? console;
4264
4351
  this.onError = n.onError ?? (() => {
4265
- }), this.motionGroupId = e.motionGroupId, this.controllerId = e.controllerId, this.cellId = e.cellId, this.stateSource = i.stateSource, this.motionStateSocket = i.motionStateSocket;
4266
- const s = new gt(
4352
+ }), this.nova = t, this.motionGroupId = e.motionGroupId, this.controllerId = e.controllerId, this.cellId = e.cellId, this.stateSource = i.stateSource, this.motionStateSocket = i.motionStateSocket;
4353
+ const s = new ht(
4267
4354
  t,
4268
4355
  i.controllerState,
4269
4356
  i.motionGroupState,
@@ -4272,13 +4359,13 @@ class si {
4272
4359
  i.motionStateSocket,
4273
4360
  e.cellId,
4274
4361
  { logger: r }
4275
- ), a = new ht(s, {
4362
+ ), a = new ut(s, {
4276
4363
  cellId: e.cellId,
4277
4364
  motionGroupModel: i.motionGroupModelName,
4278
4365
  logger: r,
4279
4366
  onError: (h) => this.onError({
4280
4367
  kind: "jog",
4281
- message: z(h),
4368
+ message: H(h),
4282
4369
  url: a.motionStream.motionStateSocket.url,
4283
4370
  cause: h
4284
4371
  })
@@ -4290,15 +4377,15 @@ class si {
4290
4377
  description: i.motionGroupDescription,
4291
4378
  kinematicModel: i.kinematicModel
4292
4379
  },
4293
- { storage: n.storage ?? ri }
4294
- ), this.description = new Zo(
4380
+ { storage: n.storage ?? yi }
4381
+ ), this.description = new ri(
4295
4382
  i.motionGroupDescription,
4296
4383
  i.controllerConfiguration,
4297
4384
  i.kinematicModel,
4298
4385
  i.motionGroupModelName,
4299
4386
  this.jogging.coordSystems
4300
4387
  );
4301
- const d = new Vo(
4388
+ const d = new Wo(
4302
4389
  i.stateSource,
4303
4390
  e.motionGroupId,
4304
4391
  i.initialControllerState,
@@ -4307,26 +4394,51 @@ class si {
4307
4394
  onError: (h) => this.onError({ kind: "stream", ...h })
4308
4395
  }
4309
4396
  );
4310
- this.state = new Xo(d, this.description, this.jogging), this.activation = new qo(
4397
+ this.state = new ci(d, this.description, this.jogging), this.activation = new Ze(
4311
4398
  t,
4312
4399
  e,
4313
4400
  this.state,
4314
4401
  () => this.safety,
4315
4402
  r
4316
- ), this.safety = new ni(this.state, () => this.activation.state), this.trajectory = new Ko({
4403
+ ), this.safety = new mi(this.state, () => this.activation.state), this.trajectory = new ii({
4317
4404
  joggingStore: this.jogging,
4318
4405
  isLocked: n.isLocked,
4319
4406
  ensureMovementOwnership: () => this.ensureMovementOwnership("trajectory"),
4320
4407
  logger: r
4321
- }), n.autoActivateVirtual && this.description.isVirtual && this.activation.state === "inactive" && this.activation.activate().catch((h) => {
4408
+ }), this.targetPose = new fi(
4409
+ {
4410
+ motionGroupId: e.motionGroupId,
4411
+ state: this.state,
4412
+ jogging: this.jogging,
4413
+ trajectory: this.trajectory,
4414
+ // A typed pose plans nothing while the robot may not move, or while
4415
+ // the app is locked
4416
+ notMoveableReason: () => {
4417
+ var h;
4418
+ return this.safety.notMoveableReason ?? ((h = n.isLocked) != null && h.call(n) ? { code: "locked" } : null);
4419
+ }
4420
+ },
4421
+ r
4422
+ ), this.jogging.onBeforeActivate = async () => {
4423
+ this.targetPose.staged && await this.targetPose.resetToLive();
4424
+ }, n.autoActivateVirtual && this.description.isVirtual && this.activation.state === "inactive" && this.activation.activate().catch((h) => {
4322
4425
  this.onError({
4323
4426
  kind: "mode",
4324
- message: z(h),
4325
- url: h instanceof he ? h.url : void 0,
4427
+ message: H(h),
4428
+ url: h instanceof Xe ? h.url : void 0,
4326
4429
  cause: h
4327
4430
  });
4328
4431
  });
4329
4432
  }
4433
+ /**
4434
+ * Reports what went wrong in a call that a connected component made for
4435
+ * the user, e.g. a jog: such a component has nobody to reject to, so it
4436
+ * goes to the app's `onError` like the session's own background problems
4437
+ * @internal
4438
+ */
4439
+ reportError(t) {
4440
+ this.onError(t);
4441
+ }
4330
4442
  /** Which motion owns the robot: jogging, a trajectory, or none ("off") */
4331
4443
  get movementOwner() {
4332
4444
  return this.jogging.jogger.mode;
@@ -4340,14 +4452,14 @@ class si {
4340
4452
  }
4341
4453
  /** Closes the session's connections and stops following the robot */
4342
4454
  dispose() {
4343
- this.activation.dispose(), this.state.stream.dispose(), this.trajectory.dispose(), this.stateSource.close(), this.jogging.dispose(), this.motionStateSocket.dispose();
4455
+ this.activation.dispose(), this.targetPose.dispose(), this.state.stream.dispose(), this.trajectory.dispose(), this.stateSource.close(), this.jogging.dispose(), this.motionStateSocket.dispose();
4344
4456
  }
4345
4457
  }
4346
- const ai = [1e3, 2e3], li = (o) => new Promise((t) => setTimeout(t, o));
4347
- class ci {
4458
+ const _i = [1e3, 2e3], vi = (o) => new Promise((t) => setTimeout(t, o));
4459
+ class bi {
4348
4460
  /** @internal Use {@link loadRobotSession} */
4349
4461
  constructor(t, e, i, n) {
4350
- this.nova = t, this.motionGroupId = e, this.ids = i, this.options = n, this.state = "loading", this.session = null, this.error = null, this.attempt = 0, this.disposed = !1, this.progress = new Yo(e, i.controllerId), $(
4462
+ this.nova = t, this.motionGroupId = e, this.ids = i, this.options = n, this.state = "loading", this.session = null, this.error = null, this.attempt = 0, this.disposed = !1, this.progress = new ti(e, i.controllerId), L(
4351
4463
  this,
4352
4464
  {
4353
4465
  nova: !1,
@@ -4393,10 +4505,10 @@ class ci {
4393
4505
  }
4394
4506
  async run(t) {
4395
4507
  var a, d;
4396
- const { cellId: e, controllerId: i } = this.ids, n = this.options.retryDelaysMs ?? ai, r = this.options.logger ?? console, s = this.options.stateSource ?? ((h) => Go(this.nova, h));
4508
+ const { cellId: e, controllerId: i } = this.ids, n = this.options.retryDelaysMs ?? _i, r = this.options.logger ?? console, s = this.options.stateSource ?? ((h) => Yo(this.nova, h));
4397
4509
  for (let h = 0; ; h++)
4398
4510
  try {
4399
- const c = await Qo({
4511
+ const c = await oi({
4400
4512
  nova: this.nova,
4401
4513
  cellId: e,
4402
4514
  controllerId: i,
@@ -4413,7 +4525,7 @@ class ci {
4413
4525
  }
4414
4526
  let m;
4415
4527
  try {
4416
- m = new si(
4528
+ m = new Si(
4417
4529
  this.nova,
4418
4530
  { cellId: e, controllerId: i, motionGroupId: this.motionGroupId },
4419
4531
  c,
@@ -4432,36 +4544,36 @@ class ci {
4432
4544
  return;
4433
4545
  } catch (c) {
4434
4546
  if (this.isStale(t)) return;
4435
- const m = mt(c) ? n[h] : void 0;
4547
+ const m = pt(c) ? n[h] : void 0;
4436
4548
  if (m === void 0) {
4437
4549
  S(() => {
4438
- mt(c) ? this.progress.failStep(c.stepId, c.cause) : this.progress.failWith(c), this.state = "failed", this.error = c;
4550
+ pt(c) ? this.progress.failStep(c.stepId, c.cause) : this.progress.failWith(c), this.state = "failed", this.error = c;
4439
4551
  }), (d = (a = this.options).onEvent) == null || d.call(a, {
4440
4552
  type: "loadFailed",
4441
4553
  motionGroupId: this.motionGroupId,
4442
- step: mt(c) ? c.stepId : "unknown",
4443
- message: z(c),
4554
+ step: pt(c) ? c.stepId : "unknown",
4555
+ message: H(c),
4444
4556
  attempts: h + 1
4445
4557
  }), this.settle.reject(c);
4446
4558
  return;
4447
4559
  }
4448
4560
  if (r.warn(
4449
- `Retrying load of robot "${this.motionGroupId}" after: ${z(c)}`
4561
+ `Retrying load of robot "${this.motionGroupId}" after: ${H(c)}`
4450
4562
  ), S(() => {
4451
4563
  this.progress.beginRetry(h + 1);
4452
- }), await li(m), this.isStale(t)) return;
4564
+ }), await vi(m), this.isStale(t)) return;
4453
4565
  }
4454
4566
  }
4455
4567
  }
4456
- function Sn(o, t, e = {}) {
4457
- return di(U(o), t, {
4568
+ function Rn(o, t, e = {}) {
4569
+ return Ci(U(o), t, {
4458
4570
  ...e,
4459
4571
  cellId: e.cellId ?? Z(o)
4460
4572
  });
4461
4573
  }
4462
- function di(o, t, e = {}) {
4574
+ function Ci(o, t, e = {}) {
4463
4575
  const i = e.cellId ?? "cell", n = e.controllerId ?? t.split("@")[1] ?? "";
4464
- return new ci(
4576
+ return new bi(
4465
4577
  o,
4466
4578
  t,
4467
4579
  { cellId: i, controllerId: n },
@@ -4469,44 +4581,44 @@ function di(o, t, e = {}) {
4469
4581
  );
4470
4582
  }
4471
4583
  export {
4472
- mn as A,
4473
- te as B,
4474
- vt as C,
4475
- _o as D,
4476
- qt as E,
4584
+ xn as A,
4585
+ jo as B,
4586
+ bt as C,
4587
+ ee as D,
4588
+ pi as E,
4477
4589
  ct as F,
4478
- Zt as G,
4479
- ht as J,
4480
- so as L,
4481
- ce as M,
4482
- fn as N,
4483
- Wo as R,
4484
- Ko as T,
4485
- Ro as V,
4486
- Vo as a,
4487
- xt as b,
4488
- Xe as c,
4489
- pn as d,
4590
+ oe as G,
4591
+ ut as J,
4592
+ mo as L,
4593
+ ue as M,
4594
+ kn as N,
4595
+ Xo as R,
4596
+ ii as T,
4597
+ $o as V,
4598
+ Wo as a,
4599
+ Rt as b,
4600
+ so as c,
4601
+ On as d,
4490
4602
  tt as e,
4491
- ao as f,
4492
- gt as g,
4493
- qo as h,
4494
- Zo as i,
4495
- Xo as j,
4496
- Yo as k,
4497
- ge as l,
4498
- he as m,
4499
- ni as n,
4500
- si as o,
4501
- ci as p,
4502
- se as q,
4503
- Go as r,
4504
- bo as s,
4505
- mt as t,
4506
- Ct as u,
4507
- Qt as v,
4508
- Sn as w,
4509
- yn as x,
4510
- eo as y,
4511
- Xt as z
4603
+ po as f,
4604
+ ht as g,
4605
+ ri as h,
4606
+ ci as i,
4607
+ ti as j,
4608
+ pe as k,
4609
+ mi as l,
4610
+ Si as m,
4611
+ bi as n,
4612
+ fi as o,
4613
+ de as p,
4614
+ Yo as q,
4615
+ Lt as r,
4616
+ pt as s,
4617
+ gt as t,
4618
+ Xt as u,
4619
+ Rn as v,
4620
+ Qo as w,
4621
+ lo as x,
4622
+ ie as y,
4623
+ ne as z
4512
4624
  };