@wandelbots/wandelbots-js-react-components 5.6.1-pr.dev-new-nova-js-client.614.87ed9a2 → 5.6.1-pr.dev-new-nova-js-client.614.2bc5666
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{theming-CDIQLLiN.js → theming-0c4oqtVL.js} +880 -857
- package/dist/chunks/theming-yiP4EVro.cjs +4 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/ConnectedMotionGroup.d.ts +3 -2
- package/dist/lib/JoggerConnection.d.ts +4 -3
- package/dist/lib/MotionStreamConnection.d.ts +2 -1
- package/dist/lib/novaCompat.d.ts +16 -0
- package/package.json +1 -1
- package/dist/chunks/theming-CDWrELt_.cjs +0 -4
|
@@ -1,91 +1,91 @@
|
|
|
1
1
|
import { jsx as a, jsxs as S, Fragment as et } from "react/jsx-runtime";
|
|
2
2
|
import { alpha as Mt, useTheme as B, styled as ut, createTheme as Ft } from "@mui/material/styles";
|
|
3
|
-
import
|
|
3
|
+
import oe from "@mui/material/AppBar";
|
|
4
4
|
import Bt from "@mui/material/Backdrop";
|
|
5
5
|
import w from "@mui/material/Box";
|
|
6
6
|
import q from "@mui/material/IconButton";
|
|
7
|
-
import
|
|
7
|
+
import ne from "@mui/material/Menu";
|
|
8
8
|
import Y from "@mui/material/MenuItem";
|
|
9
|
-
import
|
|
9
|
+
import ie from "@mui/material/Toolbar";
|
|
10
10
|
import R from "@mui/material/Typography";
|
|
11
11
|
import { observer as J, useLocalObservable as Lt } from "mobx-react-lite";
|
|
12
|
-
import { useState as L, useRef as A, useCallback as
|
|
12
|
+
import { useState as L, useRef as A, useCallback as P, useEffect as F, useMemo as rt, useId as re } from "react";
|
|
13
13
|
import { e as $ } from "./externalizeComponent-EDymnaGR.js";
|
|
14
|
-
import
|
|
14
|
+
import ae from "@mui/material/SvgIcon";
|
|
15
15
|
import H from "@mui/material/Fade";
|
|
16
|
-
import { Gauge as
|
|
16
|
+
import { Gauge as se } from "@mui/x-charts/Gauge";
|
|
17
17
|
import { useTranslation as z } from "react-i18next";
|
|
18
18
|
import { f as $t, e as pt } from "./interpolation-DG8VTxzS.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import le from "@mui/icons-material/Clear";
|
|
20
|
+
import ce from "@mui/icons-material/FilterList";
|
|
21
21
|
import It from "@mui/icons-material/Search";
|
|
22
22
|
import U from "@mui/material/Divider";
|
|
23
|
-
import { useGridApiRef as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
23
|
+
import { useGridApiRef as de, DataGrid as ge, Toolbar as ue, FilterPanelTrigger as pe, ToolbarButton as lt, QuickFilter as me, QuickFilterTrigger as he, QuickFilterControl as fe, QuickFilterClear as be } from "@mui/x-data-grid";
|
|
24
|
+
import xe from "@mui/icons-material/OpenWith";
|
|
25
|
+
import ye from "@mui/icons-material/Share";
|
|
26
|
+
import _ from "@mui/material/Stack";
|
|
27
27
|
import zt from "@mui/material/Tab";
|
|
28
28
|
import Vt from "@mui/material/Tabs";
|
|
29
|
-
import { JointTypeEnum as G, Nova as
|
|
30
|
-
import { lowerFirst as
|
|
31
|
-
import { runInAction as D, makeAutoObservable as mt, when as at, autorun as kt, makeObservable as
|
|
32
|
-
import { radiansToDegrees as Nt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as
|
|
29
|
+
import { JointTypeEnum as G, Nova as Se, poseToWandelscriptString as ve } from "@wandelbots/nova-js/v2";
|
|
30
|
+
import { lowerFirst as Ce, countBy as we, isString as Te } from "lodash-es";
|
|
31
|
+
import { runInAction as D, makeAutoObservable as mt, when as at, autorun as kt, makeObservable as Me, action as Rt, observable as Ie } from "mobx";
|
|
32
|
+
import { radiansToDegrees as Nt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as ke } from "@wandelbots/nova-js";
|
|
33
33
|
import { Vector3 as ct } from "three/src/math/Vector3.js";
|
|
34
34
|
import Wt from "@mui/material/CircularProgress";
|
|
35
|
-
import { capitalize as
|
|
36
|
-
import { m as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
35
|
+
import { capitalize as Re } from "@mui/material/utils";
|
|
36
|
+
import { m as je } from "./SafetyBar-CxxIVVeR.js";
|
|
37
|
+
import Ee from "@mui/material/Alert";
|
|
38
|
+
import Pe from "@mui/material/AlertTitle";
|
|
39
39
|
import Z from "@mui/material/Button";
|
|
40
40
|
import jt from "@mui/material/ToggleButton";
|
|
41
|
-
import { c as _e, d as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
41
|
+
import { c as _e, d as Oe, F as De, a as Ae, b as Je, f as Fe, e as Be } from "./robot-Cy9ST5-m.js";
|
|
42
|
+
import Le from "lodash-es/isEqual.js";
|
|
43
|
+
import $e from "@mui/material/InputAdornment";
|
|
44
|
+
import ze from "@mui/material/FormControl";
|
|
45
|
+
import Ve from "@mui/material/InputLabel";
|
|
46
|
+
import Ne from "@mui/material/Select";
|
|
47
47
|
import nt from "lodash-es/keyBy.js";
|
|
48
|
-
import
|
|
49
|
-
import
|
|
48
|
+
import We from "lodash-es/uniqueId.js";
|
|
49
|
+
import Ge from "@mui/material/ToggleButtonGroup";
|
|
50
50
|
import Gt from "@mui/material/Slider";
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import { Gauge as
|
|
51
|
+
import Ue from "lodash-es/isNumber.js";
|
|
52
|
+
import He from "@mui/icons-material/ChevronLeft";
|
|
53
|
+
import qe from "@mui/icons-material/ChevronRight";
|
|
54
|
+
import Ye from "lodash-es/throttle.js";
|
|
55
|
+
import Ze from "@mui/material/Tooltip";
|
|
56
|
+
import Qe from "@mui/icons-material/ContentCopy";
|
|
57
|
+
import Xe from "@mui/icons-material/DescriptionOutlined";
|
|
58
|
+
import Ke from "@mui/icons-material/ExpandLess";
|
|
59
|
+
import to from "@mui/icons-material/ExpandMore";
|
|
60
|
+
import eo from "@mui/material/Paper";
|
|
61
|
+
import oo from "@mui/material/Dialog";
|
|
62
|
+
import no from "@mui/material/DialogActions";
|
|
63
|
+
import io from "@mui/material/DialogContent";
|
|
64
|
+
import ro from "@mui/material/DialogTitle";
|
|
65
|
+
import ao from "@mui/icons-material/Error";
|
|
66
|
+
import so from "@mui/material/Chip";
|
|
67
|
+
import lo from "@mui/material/Fab";
|
|
68
|
+
import co from "@mui/material/Badge";
|
|
69
|
+
import { Gauge as go } from "@mui/x-charts";
|
|
70
70
|
import * as Et from "three";
|
|
71
|
-
import { Vector3 as
|
|
72
|
-
const
|
|
71
|
+
import { Vector3 as Pt } from "three";
|
|
72
|
+
const uo = (t) => /* @__PURE__ */ a(ae, { ...t, viewBox: "0 0 10 8", children: /* @__PURE__ */ a(
|
|
73
73
|
"path",
|
|
74
74
|
{
|
|
75
75
|
d: "M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",
|
|
76
76
|
fill: "currentColor",
|
|
77
77
|
fillOpacity: "0.56"
|
|
78
78
|
}
|
|
79
|
-
) }),
|
|
80
|
-
J((
|
|
79
|
+
) }), pi = $(
|
|
80
|
+
J((t) => {
|
|
81
81
|
const {
|
|
82
|
-
appIcon:
|
|
82
|
+
appIcon: e,
|
|
83
83
|
appName: o,
|
|
84
84
|
apps: r = [],
|
|
85
85
|
onAppSelect: i,
|
|
86
86
|
disabled: n = !1,
|
|
87
87
|
sx: c
|
|
88
|
-
} =
|
|
88
|
+
} = t, [s, l] = L(null), d = !!s, m = (g) => {
|
|
89
89
|
l(g.currentTarget);
|
|
90
90
|
}, u = () => {
|
|
91
91
|
l(null);
|
|
@@ -94,7 +94,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
94
94
|
};
|
|
95
95
|
return /* @__PURE__ */ S(et, { children: [
|
|
96
96
|
/* @__PURE__ */ a(
|
|
97
|
-
|
|
97
|
+
oe,
|
|
98
98
|
{
|
|
99
99
|
position: "static",
|
|
100
100
|
sx: {
|
|
@@ -106,8 +106,8 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
106
106
|
},
|
|
107
107
|
...c
|
|
108
108
|
},
|
|
109
|
-
children: /* @__PURE__ */ S(
|
|
110
|
-
/* @__PURE__ */ a(w, { sx: { mr: 1, display: "flex", alignItems: "center" }, children:
|
|
109
|
+
children: /* @__PURE__ */ S(ie, { sx: { minHeight: "62px !important" }, children: [
|
|
110
|
+
/* @__PURE__ */ a(w, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: e }),
|
|
111
111
|
/* @__PURE__ */ S(w, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
|
|
112
112
|
/* @__PURE__ */ a(
|
|
113
113
|
R,
|
|
@@ -146,7 +146,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
146
146
|
height: "6px"
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
|
-
children: /* @__PURE__ */ a(
|
|
149
|
+
children: /* @__PURE__ */ a(uo, {})
|
|
150
150
|
}
|
|
151
151
|
)
|
|
152
152
|
] })
|
|
@@ -166,7 +166,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
/* @__PURE__ */ a(
|
|
169
|
-
|
|
169
|
+
ne,
|
|
170
170
|
{
|
|
171
171
|
id: "app-menu",
|
|
172
172
|
anchorEl: s,
|
|
@@ -195,26 +195,26 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
195
195
|
)
|
|
196
196
|
] });
|
|
197
197
|
})
|
|
198
|
-
),
|
|
199
|
-
const
|
|
200
|
-
return
|
|
201
|
-
}, N = (
|
|
202
|
-
const o = Math.floor(
|
|
198
|
+
), po = (t) => {
|
|
199
|
+
const e = Math.floor(t / 86400), o = Math.floor(t % 86400 / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, n = [];
|
|
200
|
+
return e > 0 ? (n.push(e.toString()), n.push(o.toString().padStart(2, "0")), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : o > 0 ? (n.push(o.toString()), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : (n.push(r.toString()), n.push(i.toString().padStart(2, "0"))), n.join(":");
|
|
201
|
+
}, N = (t, e) => {
|
|
202
|
+
const o = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60), n = t % 60;
|
|
203
203
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
204
204
|
try {
|
|
205
205
|
const s = {};
|
|
206
|
-
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(
|
|
206
|
+
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(s);
|
|
207
207
|
} catch {
|
|
208
208
|
}
|
|
209
209
|
const c = [];
|
|
210
210
|
return o > 0 && c.push(`${o}d`), r > 0 && c.push(`${r}h`), i > 0 && c.push(`${i}m`), (n > 0 || c.length === 0) && c.push(`${n}s`), c.join(" ");
|
|
211
|
-
},
|
|
212
|
-
timerState:
|
|
213
|
-
animationState:
|
|
211
|
+
}, mo = (t, e, o) => t === "countdown" && o !== null ? Math.min(100, e / o * 100) : t === "measuring" ? e / 60 % 1 * 100 : 0, ho = ({
|
|
212
|
+
timerState: t,
|
|
213
|
+
animationState: e,
|
|
214
214
|
hasError: o,
|
|
215
215
|
className: r
|
|
216
216
|
}) => {
|
|
217
|
-
const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime: d, currentProgress: m } =
|
|
217
|
+
const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime: d, currentProgress: m } = t, {
|
|
218
218
|
showErrorAnimation: u,
|
|
219
219
|
showPauseAnimation: p,
|
|
220
220
|
showPulsatingText: g,
|
|
@@ -223,7 +223,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
223
223
|
showMainText: b,
|
|
224
224
|
showIdlePulsating: h,
|
|
225
225
|
idleDotsCount: v
|
|
226
|
-
} =
|
|
226
|
+
} = e;
|
|
227
227
|
return /* @__PURE__ */ S(
|
|
228
228
|
w,
|
|
229
229
|
{
|
|
@@ -238,7 +238,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
238
238
|
},
|
|
239
239
|
children: [
|
|
240
240
|
/* @__PURE__ */ a(
|
|
241
|
-
|
|
241
|
+
se,
|
|
242
242
|
{
|
|
243
243
|
width: 264,
|
|
244
244
|
height: 264,
|
|
@@ -438,7 +438,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
438
438
|
opacity: 1,
|
|
439
439
|
transition: "opacity 2s ease-in-out"
|
|
440
440
|
},
|
|
441
|
-
children:
|
|
441
|
+
children: po(l)
|
|
442
442
|
}
|
|
443
443
|
)
|
|
444
444
|
}
|
|
@@ -496,21 +496,21 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
496
496
|
]
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
|
-
},
|
|
500
|
-
timerState:
|
|
501
|
-
animationState:
|
|
499
|
+
}, fo = ({
|
|
500
|
+
timerState: t,
|
|
501
|
+
animationState: e,
|
|
502
502
|
hasError: o,
|
|
503
503
|
compact: r,
|
|
504
504
|
className: i
|
|
505
505
|
}) => {
|
|
506
|
-
const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime: d, maxTime: m } =
|
|
506
|
+
const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime: d, maxTime: m } = t, {
|
|
507
507
|
showErrorAnimation: u,
|
|
508
508
|
showPauseAnimation: p,
|
|
509
509
|
showPulsatingText: g,
|
|
510
510
|
pulsatingFinished: f,
|
|
511
511
|
showIdlePulsating: y,
|
|
512
512
|
idleDotsCount: b
|
|
513
|
-
} =
|
|
513
|
+
} = e;
|
|
514
514
|
return r && l === "idle" ? /* @__PURE__ */ a(
|
|
515
515
|
w,
|
|
516
516
|
{
|
|
@@ -592,7 +592,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
592
592
|
strokeWidth: "2",
|
|
593
593
|
strokeLinecap: "round",
|
|
594
594
|
strokeDasharray: `${2 * Math.PI * 8}`,
|
|
595
|
-
strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 :
|
|
595
|
+
strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 : t.currentProgress) / 100)}`,
|
|
596
596
|
style: {
|
|
597
597
|
opacity: l === "measured" && f ? g ? 1 : 0.6 : 1,
|
|
598
598
|
transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
|
|
@@ -635,8 +635,8 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
635
635
|
]
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
|
-
},
|
|
639
|
-
const [
|
|
638
|
+
}, bo = () => {
|
|
639
|
+
const [t, e] = L({
|
|
640
640
|
showPauseAnimation: !1,
|
|
641
641
|
showErrorAnimation: !1,
|
|
642
642
|
showPulsatingText: !1,
|
|
@@ -653,84 +653,84 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
653
653
|
null
|
|
654
654
|
), n = A(null), c = A(0), s = A(null), l = A(
|
|
655
655
|
null
|
|
656
|
-
), d =
|
|
657
|
-
|
|
658
|
-
|
|
656
|
+
), d = P(() => {
|
|
657
|
+
e((x) => ({ ...x, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
658
|
+
e((x) => ({ ...x, showPauseAnimation: !1 }));
|
|
659
659
|
}, 800);
|
|
660
|
-
}, []), m =
|
|
661
|
-
|
|
662
|
-
|
|
660
|
+
}, []), m = P(() => {
|
|
661
|
+
e((x) => ({ ...x, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
662
|
+
e((x) => ({ ...x, showErrorAnimation: !1 }));
|
|
663
663
|
}, 600);
|
|
664
|
-
}, []), u =
|
|
665
|
-
|
|
666
|
-
}, []), p =
|
|
667
|
-
c.current = 0,
|
|
664
|
+
}, []), u = P(() => {
|
|
665
|
+
e((x) => ({ ...x, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
666
|
+
}, []), p = P((x) => {
|
|
667
|
+
c.current = 0, e((T) => ({
|
|
668
668
|
...T,
|
|
669
669
|
showPulsatingText: !0,
|
|
670
670
|
pulsatingFinished: !1
|
|
671
671
|
})), setTimeout(() => {
|
|
672
|
-
|
|
672
|
+
e((T) => ({
|
|
673
673
|
...T,
|
|
674
674
|
pulsatingFinished: !0
|
|
675
675
|
// This will keep the success color and start slow pulsating
|
|
676
676
|
})), i.current = setInterval(() => {
|
|
677
|
-
|
|
677
|
+
e((T) => ({
|
|
678
678
|
...T,
|
|
679
679
|
showPulsatingText: !T.showPulsatingText
|
|
680
680
|
}));
|
|
681
681
|
}, 2e3), x && x();
|
|
682
682
|
}, 800);
|
|
683
|
-
}, []), g =
|
|
684
|
-
i.current && (clearInterval(i.current), i.current = null),
|
|
683
|
+
}, []), g = P(() => {
|
|
684
|
+
i.current && (clearInterval(i.current), i.current = null), e((x) => ({
|
|
685
685
|
...x,
|
|
686
686
|
showPulsatingText: !1,
|
|
687
687
|
pulsatingFinished: !1
|
|
688
688
|
})), c.current = 0;
|
|
689
|
-
}, []), f =
|
|
690
|
-
|
|
689
|
+
}, []), f = P(() => {
|
|
690
|
+
e((x) => ({
|
|
691
691
|
...x,
|
|
692
692
|
showIdlePulsating: !0
|
|
693
693
|
})), s.current = setInterval(() => {
|
|
694
|
-
|
|
694
|
+
e((x) => ({
|
|
695
695
|
...x,
|
|
696
696
|
showIdlePulsating: !x.showIdlePulsating
|
|
697
697
|
}));
|
|
698
698
|
}, 2e3), l.current = setInterval(() => {
|
|
699
|
-
|
|
699
|
+
e((x) => ({
|
|
700
700
|
...x,
|
|
701
701
|
idleDotsCount: (x.idleDotsCount + 1) % 4
|
|
702
702
|
// Cycle through 0, 1, 2, 3
|
|
703
703
|
}));
|
|
704
704
|
}, 800);
|
|
705
|
-
}, []), y =
|
|
706
|
-
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null),
|
|
705
|
+
}, []), y = P(() => {
|
|
706
|
+
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), e((x) => ({
|
|
707
707
|
...x,
|
|
708
708
|
showIdlePulsating: !1,
|
|
709
709
|
idleDotsCount: 0
|
|
710
710
|
}));
|
|
711
|
-
}, []), b =
|
|
712
|
-
|
|
711
|
+
}, []), b = P(() => {
|
|
712
|
+
e((x) => ({
|
|
713
713
|
...x,
|
|
714
714
|
showLabels: !1,
|
|
715
715
|
showMainText: !1
|
|
716
716
|
})), n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
717
|
-
|
|
717
|
+
e((x) => ({
|
|
718
718
|
...x,
|
|
719
719
|
showLabels: !0,
|
|
720
720
|
showMainText: !0
|
|
721
721
|
}));
|
|
722
722
|
}, 200);
|
|
723
|
-
}, []), h =
|
|
724
|
-
|
|
723
|
+
}, []), h = P(() => {
|
|
724
|
+
e((x) => ({
|
|
725
725
|
...x,
|
|
726
726
|
showLabels: !0,
|
|
727
727
|
showMainText: !0
|
|
728
728
|
}));
|
|
729
|
-
}, []), v =
|
|
729
|
+
}, []), v = P(() => {
|
|
730
730
|
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), n.current && clearTimeout(n.current), i.current && clearInterval(i.current), s.current && clearInterval(s.current), l.current && clearInterval(l.current);
|
|
731
731
|
}, []);
|
|
732
732
|
return {
|
|
733
|
-
animationState:
|
|
733
|
+
animationState: t,
|
|
734
734
|
triggerPauseAnimation: d,
|
|
735
735
|
triggerErrorAnimation: m,
|
|
736
736
|
clearErrorAnimation: u,
|
|
@@ -742,9 +742,9 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
742
742
|
setInitialAnimationState: h,
|
|
743
743
|
cleanup: v
|
|
744
744
|
};
|
|
745
|
-
},
|
|
746
|
-
autoStart:
|
|
747
|
-
onCycleEnd:
|
|
745
|
+
}, xo = ({
|
|
746
|
+
autoStart: t,
|
|
747
|
+
onCycleEnd: e,
|
|
748
748
|
onMeasuringComplete: o,
|
|
749
749
|
hasError: r,
|
|
750
750
|
onPauseAnimation: i,
|
|
@@ -766,7 +766,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
766
766
|
onChange: ([C]) => {
|
|
767
767
|
d((M) => ({ ...M, currentProgress: C }));
|
|
768
768
|
}
|
|
769
|
-
}), f =
|
|
769
|
+
}), f = P(() => {
|
|
770
770
|
d((C) => ({
|
|
771
771
|
...C,
|
|
772
772
|
currentState: "idle",
|
|
@@ -777,40 +777,40 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
777
777
|
currentProgress: 0
|
|
778
778
|
// Reset progress to 0 for gauge
|
|
779
779
|
})), p.current = 0, u.current = null, g.setImmediate([0]);
|
|
780
|
-
}, [g]), y =
|
|
780
|
+
}, [g]), y = P(
|
|
781
781
|
(C = 0) => {
|
|
782
782
|
const M = C / 60 % 1 * 100;
|
|
783
|
-
d((
|
|
784
|
-
...
|
|
783
|
+
d((I) => ({
|
|
784
|
+
...I,
|
|
785
785
|
currentState: "measuring",
|
|
786
786
|
maxTime: null,
|
|
787
787
|
remainingTime: C,
|
|
788
788
|
isPausedState: !1,
|
|
789
789
|
currentProgress: M
|
|
790
790
|
// Immediately set progress
|
|
791
|
-
})), p.current = 0, g.setImmediate([M]),
|
|
791
|
+
})), p.current = 0, g.setImmediate([M]), t ? (u.current = Date.now() - C * 1e3, d((I) => ({ ...I, isRunning: !0 }))) : u.current = null;
|
|
792
792
|
},
|
|
793
|
-
[
|
|
794
|
-
), b =
|
|
793
|
+
[t, g]
|
|
794
|
+
), b = P(
|
|
795
795
|
(C, M = 0) => {
|
|
796
|
-
d((
|
|
797
|
-
...
|
|
796
|
+
d((k) => ({ ...k, isRunning: !1 })), u.current = null, d((k) => ({
|
|
797
|
+
...k,
|
|
798
798
|
currentState: "countdown",
|
|
799
799
|
maxTime: C,
|
|
800
800
|
isPausedState: !1
|
|
801
801
|
})), p.current = 0;
|
|
802
|
-
const
|
|
803
|
-
d((
|
|
804
|
-
...
|
|
805
|
-
remainingTime:
|
|
802
|
+
const I = Math.max(0, C - M), j = M > 0 ? M / C * 100 : 0;
|
|
803
|
+
d((k) => ({
|
|
804
|
+
...k,
|
|
805
|
+
remainingTime: I,
|
|
806
806
|
currentProgress: j
|
|
807
807
|
// Immediately set progress
|
|
808
|
-
})), g.setImmediate([j]),
|
|
809
|
-
u.current = Date.now() - M * 1e3, d((
|
|
808
|
+
})), g.setImmediate([j]), I === 0 ? (d((k) => ({ ...k, isRunning: !1 })), u.current = null, e && queueMicrotask(() => e())) : t ? setTimeout(() => {
|
|
809
|
+
u.current = Date.now() - M * 1e3, d((k) => ({ ...k, isRunning: !0 }));
|
|
810
810
|
}, 0) : u.current = null;
|
|
811
811
|
},
|
|
812
|
-
[
|
|
813
|
-
), h =
|
|
812
|
+
[t, e, g]
|
|
813
|
+
), h = P(() => {
|
|
814
814
|
d((C) => ({
|
|
815
815
|
...C,
|
|
816
816
|
isRunning: !1,
|
|
@@ -818,13 +818,13 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
818
818
|
})), u.current = null, s(() => {
|
|
819
819
|
o && o();
|
|
820
820
|
});
|
|
821
|
-
}, [s, o]), v =
|
|
821
|
+
}, [s, o]), v = P(() => {
|
|
822
822
|
if (u.current && l.isRunning) {
|
|
823
823
|
const M = Date.now() - u.current;
|
|
824
824
|
p.current += M;
|
|
825
|
-
const
|
|
825
|
+
const I = p.current / 1e3, j = mo(
|
|
826
826
|
l.currentState,
|
|
827
|
-
|
|
827
|
+
I,
|
|
828
828
|
l.maxTime
|
|
829
829
|
);
|
|
830
830
|
g.setTarget([j]);
|
|
@@ -840,7 +840,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
840
840
|
l.maxTime,
|
|
841
841
|
g,
|
|
842
842
|
i
|
|
843
|
-
]), x =
|
|
843
|
+
]), x = P(() => {
|
|
844
844
|
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (u.current = Date.now(), d((C) => ({
|
|
845
845
|
...C,
|
|
846
846
|
isRunning: !0,
|
|
@@ -850,7 +850,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
850
850
|
l.isPausedState,
|
|
851
851
|
l.remainingTime,
|
|
852
852
|
l.currentState
|
|
853
|
-
]), T =
|
|
853
|
+
]), T = P(() => l.isPausedState, [l.isPausedState]);
|
|
854
854
|
return F(() => {
|
|
855
855
|
r ? (l.isRunning && !l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !1 })), x()), c());
|
|
856
856
|
}, [
|
|
@@ -866,28 +866,28 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
866
866
|
if (l.isRunning) {
|
|
867
867
|
const C = () => {
|
|
868
868
|
if (u.current) {
|
|
869
|
-
const
|
|
869
|
+
const I = (Date.now() - u.current + p.current) / 1e3;
|
|
870
870
|
if (l.currentState === "countdown" && l.maxTime !== null) {
|
|
871
|
-
const j = Math.max(0, l.maxTime -
|
|
871
|
+
const j = Math.max(0, l.maxTime - I);
|
|
872
872
|
d((E) => ({
|
|
873
873
|
...E,
|
|
874
874
|
remainingTime: Math.ceil(j)
|
|
875
875
|
}));
|
|
876
|
-
const
|
|
877
|
-
if (g.setTarget([
|
|
876
|
+
const k = Math.min(100, I / l.maxTime * 100);
|
|
877
|
+
if (g.setTarget([k]), j <= 0) {
|
|
878
878
|
d((E) => ({
|
|
879
879
|
...E,
|
|
880
880
|
isRunning: !1,
|
|
881
881
|
remainingTime: 0
|
|
882
|
-
})), u.current = null, g.setTarget([100]),
|
|
882
|
+
})), u.current = null, g.setTarget([100]), e && queueMicrotask(() => e());
|
|
883
883
|
return;
|
|
884
884
|
}
|
|
885
885
|
} else if (l.currentState === "measuring") {
|
|
886
|
-
d((
|
|
887
|
-
...
|
|
888
|
-
remainingTime: Math.floor(
|
|
886
|
+
d((k) => ({
|
|
887
|
+
...k,
|
|
888
|
+
remainingTime: Math.floor(I)
|
|
889
889
|
}));
|
|
890
|
-
const j =
|
|
890
|
+
const j = I / 60 % 1 * 100;
|
|
891
891
|
g.setTarget([j]);
|
|
892
892
|
}
|
|
893
893
|
l.isRunning && (m.current = requestAnimationFrame(C));
|
|
@@ -901,7 +901,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
901
901
|
};
|
|
902
902
|
}, [
|
|
903
903
|
l.isRunning,
|
|
904
|
-
|
|
904
|
+
e,
|
|
905
905
|
l.currentState,
|
|
906
906
|
l.maxTime,
|
|
907
907
|
g
|
|
@@ -925,11 +925,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
925
925
|
isPaused: T
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
|
-
},
|
|
928
|
+
}, mi = $(
|
|
929
929
|
J(
|
|
930
930
|
({
|
|
931
|
-
onCycleComplete:
|
|
932
|
-
onCycleEnd:
|
|
931
|
+
onCycleComplete: t,
|
|
932
|
+
onCycleEnd: e,
|
|
933
933
|
onMeasuringComplete: o,
|
|
934
934
|
autoStart: r = !0,
|
|
935
935
|
variant: i = "default",
|
|
@@ -949,9 +949,9 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
949
949
|
triggerFadeTransition: h,
|
|
950
950
|
setInitialAnimationState: v,
|
|
951
951
|
cleanup: x
|
|
952
|
-
} =
|
|
952
|
+
} = bo(), { timerState: T, controls: C } = xo({
|
|
953
953
|
autoStart: r,
|
|
954
|
-
onCycleEnd:
|
|
954
|
+
onCycleEnd: e,
|
|
955
955
|
onMeasuringComplete: o,
|
|
956
956
|
hasError: s,
|
|
957
957
|
onPauseAnimation: m,
|
|
@@ -971,14 +971,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
971
971
|
v
|
|
972
972
|
]), F(() => {
|
|
973
973
|
let M = !0;
|
|
974
|
-
const
|
|
975
|
-
M &&
|
|
974
|
+
const I = setTimeout(() => {
|
|
975
|
+
M && t(C);
|
|
976
976
|
}, 0);
|
|
977
977
|
return () => {
|
|
978
|
-
M = !1, clearTimeout(
|
|
978
|
+
M = !1, clearTimeout(I);
|
|
979
979
|
};
|
|
980
|
-
}, [
|
|
981
|
-
|
|
980
|
+
}, [t, C]), F(() => x, [x]), i === "small" ? /* @__PURE__ */ a(
|
|
981
|
+
fo,
|
|
982
982
|
{
|
|
983
983
|
timerState: T,
|
|
984
984
|
animationState: d,
|
|
@@ -987,7 +987,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
987
987
|
className: c
|
|
988
988
|
}
|
|
989
989
|
) : /* @__PURE__ */ a(
|
|
990
|
-
|
|
990
|
+
ho,
|
|
991
991
|
{
|
|
992
992
|
timerState: T,
|
|
993
993
|
animationState: d,
|
|
@@ -997,11 +997,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
997
997
|
);
|
|
998
998
|
}
|
|
999
999
|
)
|
|
1000
|
-
),
|
|
1000
|
+
), yo = $(
|
|
1001
1001
|
J(
|
|
1002
1002
|
({
|
|
1003
|
-
data:
|
|
1004
|
-
columns:
|
|
1003
|
+
data: t,
|
|
1004
|
+
columns: e,
|
|
1005
1005
|
getRowData: o,
|
|
1006
1006
|
onRowClick: r,
|
|
1007
1007
|
selectedItem: i,
|
|
@@ -1015,46 +1015,46 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1015
1015
|
sx: p
|
|
1016
1016
|
}) => {
|
|
1017
1017
|
var j;
|
|
1018
|
-
const g = B(), f =
|
|
1018
|
+
const g = B(), f = de(), y = A(null), [b, h] = L(null), v = rt(() => t.map(o), [t, o]);
|
|
1019
1019
|
F(() => {
|
|
1020
1020
|
f.current && v.length > 0 && f.current.autosizeColumns({
|
|
1021
1021
|
includeOutliers: !0,
|
|
1022
1022
|
includeHeaders: !0,
|
|
1023
1023
|
expand: !0,
|
|
1024
|
-
columns:
|
|
1024
|
+
columns: e.map((k) => k.field)
|
|
1025
1025
|
});
|
|
1026
|
-
}, [v,
|
|
1026
|
+
}, [v, e, f]), F(() => {
|
|
1027
1027
|
if (!y.current || !f.current) return;
|
|
1028
|
-
const
|
|
1028
|
+
const k = new ResizeObserver(() => {
|
|
1029
1029
|
setTimeout(() => {
|
|
1030
1030
|
f.current && v.length > 0 && f.current.autosizeColumns({
|
|
1031
1031
|
includeOutliers: !0,
|
|
1032
1032
|
includeHeaders: !0,
|
|
1033
1033
|
expand: !0,
|
|
1034
|
-
columns:
|
|
1034
|
+
columns: e.map((E) => E.field)
|
|
1035
1035
|
});
|
|
1036
1036
|
}, 100);
|
|
1037
1037
|
});
|
|
1038
|
-
return
|
|
1039
|
-
|
|
1038
|
+
return k.observe(y.current), () => {
|
|
1039
|
+
k.disconnect();
|
|
1040
1040
|
};
|
|
1041
|
-
}, [f, v.length,
|
|
1041
|
+
}, [f, v.length, e]);
|
|
1042
1042
|
const x = rt(() => {
|
|
1043
1043
|
if (i !== void 0)
|
|
1044
1044
|
return i;
|
|
1045
1045
|
if (b !== null)
|
|
1046
1046
|
return b;
|
|
1047
|
-
if (u &&
|
|
1048
|
-
const
|
|
1049
|
-
return h(
|
|
1047
|
+
if (u && t.length > 0) {
|
|
1048
|
+
const k = t[0];
|
|
1049
|
+
return h(k), k;
|
|
1050
1050
|
}
|
|
1051
1051
|
return null;
|
|
1052
|
-
}, [u,
|
|
1053
|
-
const E =
|
|
1054
|
-
E && (i === void 0 && h(E), r && r(E,
|
|
1052
|
+
}, [u, t, i, b]), T = (k) => {
|
|
1053
|
+
const E = t.find((V) => o(V).id === k.id);
|
|
1054
|
+
E && (i === void 0 && h(E), r && r(E, k));
|
|
1055
1055
|
}, C = rt(() => !x || !n ? null : n(x), [x, n]);
|
|
1056
1056
|
function M() {
|
|
1057
|
-
return /* @__PURE__ */ a(
|
|
1057
|
+
return /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ S(
|
|
1058
1058
|
w,
|
|
1059
1059
|
{
|
|
1060
1060
|
sx: {
|
|
@@ -1075,7 +1075,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1075
1075
|
},
|
|
1076
1076
|
children: [
|
|
1077
1077
|
c,
|
|
1078
|
-
s && ` (${
|
|
1078
|
+
s && ` (${t.length})`
|
|
1079
1079
|
]
|
|
1080
1080
|
}
|
|
1081
1081
|
),
|
|
@@ -1091,9 +1091,9 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1091
1091
|
},
|
|
1092
1092
|
children: [
|
|
1093
1093
|
/* @__PURE__ */ a(
|
|
1094
|
-
|
|
1094
|
+
pe,
|
|
1095
1095
|
{
|
|
1096
|
-
render: /* @__PURE__ */ a(lt, { "aria-label": "Show filters", children: /* @__PURE__ */ a(
|
|
1096
|
+
render: /* @__PURE__ */ a(lt, { "aria-label": "Show filters", children: /* @__PURE__ */ a(ce, { fontSize: "small" }) })
|
|
1097
1097
|
}
|
|
1098
1098
|
),
|
|
1099
1099
|
/* @__PURE__ */ a(
|
|
@@ -1108,19 +1108,19 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1108
1108
|
}
|
|
1109
1109
|
),
|
|
1110
1110
|
/* @__PURE__ */ a(
|
|
1111
|
-
|
|
1111
|
+
me,
|
|
1112
1112
|
{
|
|
1113
|
-
render: (
|
|
1113
|
+
render: (k, E) => /* @__PURE__ */ S(
|
|
1114
1114
|
w,
|
|
1115
1115
|
{
|
|
1116
|
-
...
|
|
1116
|
+
...k,
|
|
1117
1117
|
sx: {
|
|
1118
1118
|
display: "flex",
|
|
1119
1119
|
overflow: "hidden"
|
|
1120
1120
|
},
|
|
1121
1121
|
children: [
|
|
1122
1122
|
!E.expanded && /* @__PURE__ */ a(
|
|
1123
|
-
|
|
1123
|
+
he,
|
|
1124
1124
|
{
|
|
1125
1125
|
render: /* @__PURE__ */ a(lt, { "aria-label": "Search", children: /* @__PURE__ */ a(It, { fontSize: "small" }) })
|
|
1126
1126
|
}
|
|
@@ -1236,12 +1236,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
),
|
|
1239
|
-
/* @__PURE__ */ a(
|
|
1239
|
+
/* @__PURE__ */ a(fe, { placeholder: l })
|
|
1240
1240
|
]
|
|
1241
1241
|
}
|
|
1242
1242
|
),
|
|
1243
1243
|
E.expanded && E.value !== "" && /* @__PURE__ */ a(
|
|
1244
|
-
|
|
1244
|
+
be,
|
|
1245
1245
|
{
|
|
1246
1246
|
render: /* @__PURE__ */ a(
|
|
1247
1247
|
w,
|
|
@@ -1266,7 +1266,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1266
1266
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1267
1267
|
}
|
|
1268
1268
|
},
|
|
1269
|
-
children: /* @__PURE__ */ a(lt, { "aria-label": "Clear", children: /* @__PURE__ */ a(
|
|
1269
|
+
children: /* @__PURE__ */ a(lt, { "aria-label": "Clear", children: /* @__PURE__ */ a(le, { fontSize: "small" }) })
|
|
1270
1270
|
}
|
|
1271
1271
|
)
|
|
1272
1272
|
}
|
|
@@ -1288,7 +1288,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1288
1288
|
}
|
|
1289
1289
|
) });
|
|
1290
1290
|
}
|
|
1291
|
-
const
|
|
1291
|
+
const I = m || M;
|
|
1292
1292
|
return /* @__PURE__ */ a(
|
|
1293
1293
|
w,
|
|
1294
1294
|
{
|
|
@@ -1327,11 +1327,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1327
1327
|
...p
|
|
1328
1328
|
},
|
|
1329
1329
|
children: /* @__PURE__ */ a(
|
|
1330
|
-
|
|
1330
|
+
ge,
|
|
1331
1331
|
{
|
|
1332
1332
|
apiRef: f,
|
|
1333
1333
|
rows: v,
|
|
1334
|
-
columns:
|
|
1334
|
+
columns: e,
|
|
1335
1335
|
onRowClick: T,
|
|
1336
1336
|
disableColumnMenu: !1,
|
|
1337
1337
|
disableRowSelectionOnClick: !0,
|
|
@@ -1342,7 +1342,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1342
1342
|
hideFooter: !1,
|
|
1343
1343
|
showToolbar: !0,
|
|
1344
1344
|
slots: {
|
|
1345
|
-
toolbar:
|
|
1345
|
+
toolbar: I
|
|
1346
1346
|
},
|
|
1347
1347
|
initialState: {
|
|
1348
1348
|
sorting: {
|
|
@@ -1365,7 +1365,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1365
1365
|
includeHeaders: !0,
|
|
1366
1366
|
expand: !0,
|
|
1367
1367
|
// Auto-size all columns by default (can be overridden by dataGridProps)
|
|
1368
|
-
columns: ((j = d == null ? void 0 : d.autosizeOptions) == null ? void 0 : j.columns) ||
|
|
1368
|
+
columns: ((j = d == null ? void 0 : d.autosizeOptions) == null ? void 0 : j.columns) || e.map((k) => k.field)
|
|
1369
1369
|
},
|
|
1370
1370
|
sx: {
|
|
1371
1371
|
border: "none",
|
|
@@ -1514,12 +1514,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1514
1514
|
}
|
|
1515
1515
|
)
|
|
1516
1516
|
);
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1517
|
+
yo.displayName = "WandelbotsDataGrid";
|
|
1518
|
+
const _t = $(
|
|
1519
1519
|
J(
|
|
1520
1520
|
({
|
|
1521
|
-
colors:
|
|
1522
|
-
label:
|
|
1521
|
+
colors: t,
|
|
1522
|
+
label: e,
|
|
1523
1523
|
getDisplayedValue: o,
|
|
1524
1524
|
startJogging: r,
|
|
1525
1525
|
stopJogging: i,
|
|
@@ -1527,7 +1527,7 @@ const Pt = $(
|
|
|
1527
1527
|
activeJoggingDirection: c,
|
|
1528
1528
|
...s
|
|
1529
1529
|
}) => {
|
|
1530
|
-
var x, T, C, M,
|
|
1530
|
+
var x, T, C, M, I, j, k;
|
|
1531
1531
|
pt(() => {
|
|
1532
1532
|
const E = o(), V = p.current;
|
|
1533
1533
|
V && (V.textContent = E);
|
|
@@ -1537,7 +1537,7 @@ const Pt = $(
|
|
|
1537
1537
|
n && v();
|
|
1538
1538
|
}, [n]);
|
|
1539
1539
|
const u = c || d, p = A(null);
|
|
1540
|
-
|
|
1540
|
+
t || (t = {
|
|
1541
1541
|
color: "#fff",
|
|
1542
1542
|
backgroundColor: "#000",
|
|
1543
1543
|
borderColor: "#000",
|
|
@@ -1549,10 +1549,10 @@ const Pt = $(
|
|
|
1549
1549
|
},
|
|
1550
1550
|
labelColor: "#000"
|
|
1551
1551
|
});
|
|
1552
|
-
const g = u ? (x =
|
|
1552
|
+
const g = u ? (x = t.buttonBackgroundColor) == null ? void 0 : x.pressed : t.borderColor, f = {
|
|
1553
1553
|
width: "55px",
|
|
1554
|
-
color:
|
|
1555
|
-
path: { fill:
|
|
1554
|
+
color: t.color,
|
|
1555
|
+
path: { fill: t.color },
|
|
1556
1556
|
alignContent: "center",
|
|
1557
1557
|
fontSize: "37px",
|
|
1558
1558
|
svg: {
|
|
@@ -1560,26 +1560,26 @@ const Pt = $(
|
|
|
1560
1560
|
}
|
|
1561
1561
|
}, y = {
|
|
1562
1562
|
...f,
|
|
1563
|
-
backgroundColor: (T =
|
|
1563
|
+
backgroundColor: (T = t.buttonBackgroundColor) == null ? void 0 : T.default,
|
|
1564
1564
|
":hover": {
|
|
1565
|
-
backgroundColor: (C =
|
|
1565
|
+
backgroundColor: (C = t.buttonBackgroundColor) == null ? void 0 : C.hovered
|
|
1566
1566
|
},
|
|
1567
1567
|
":active": {
|
|
1568
|
-
backgroundColor: (M =
|
|
1569
|
-
color:
|
|
1570
|
-
path: { fill:
|
|
1568
|
+
backgroundColor: (M = t.buttonBackgroundColor) == null ? void 0 : M.pressed,
|
|
1569
|
+
color: t.backgroundColor,
|
|
1570
|
+
path: { fill: t.backgroundColor }
|
|
1571
1571
|
},
|
|
1572
1572
|
":disabled": {
|
|
1573
|
-
backgroundColor: (
|
|
1573
|
+
backgroundColor: (I = t.buttonBackgroundColor) == null ? void 0 : I.disabled,
|
|
1574
1574
|
"svg path": { fill: l.palette.action.disabled }
|
|
1575
1575
|
}
|
|
1576
1576
|
}, b = {
|
|
1577
1577
|
...f,
|
|
1578
|
-
backgroundColor: (j =
|
|
1579
|
-
color:
|
|
1580
|
-
path: { fill:
|
|
1578
|
+
backgroundColor: (j = t.buttonBackgroundColor) == null ? void 0 : j.pressed,
|
|
1579
|
+
color: t.backgroundColor,
|
|
1580
|
+
path: { fill: t.backgroundColor },
|
|
1581
1581
|
":disabled": {
|
|
1582
|
-
backgroundColor: (
|
|
1582
|
+
backgroundColor: (k = t.buttonBackgroundColor) == null ? void 0 : k.pressed,
|
|
1583
1583
|
"svg path": { fill: l.palette.action.disabled }
|
|
1584
1584
|
}
|
|
1585
1585
|
};
|
|
@@ -1589,7 +1589,7 @@ const Pt = $(
|
|
|
1589
1589
|
function v() {
|
|
1590
1590
|
m(null), i();
|
|
1591
1591
|
}
|
|
1592
|
-
return /* @__PURE__ */ S(
|
|
1592
|
+
return /* @__PURE__ */ S(_, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
|
|
1593
1593
|
/* @__PURE__ */ a(
|
|
1594
1594
|
q,
|
|
1595
1595
|
{
|
|
@@ -1610,12 +1610,12 @@ const Pt = $(
|
|
|
1610
1610
|
}
|
|
1611
1611
|
),
|
|
1612
1612
|
/* @__PURE__ */ S(
|
|
1613
|
-
|
|
1613
|
+
_,
|
|
1614
1614
|
{
|
|
1615
1615
|
spacing: "6px",
|
|
1616
1616
|
sx: {
|
|
1617
1617
|
width: "150px",
|
|
1618
|
-
backgroundColor:
|
|
1618
|
+
backgroundColor: t.backgroundColor,
|
|
1619
1619
|
alignItems: "center",
|
|
1620
1620
|
justifyContent: "center",
|
|
1621
1621
|
opacity: "0.9",
|
|
@@ -1624,7 +1624,7 @@ const Pt = $(
|
|
|
1624
1624
|
},
|
|
1625
1625
|
children: [
|
|
1626
1626
|
/* @__PURE__ */ a(
|
|
1627
|
-
|
|
1627
|
+
_,
|
|
1628
1628
|
{
|
|
1629
1629
|
height: "22px",
|
|
1630
1630
|
direction: "row",
|
|
@@ -1633,14 +1633,14 @@ const Pt = $(
|
|
|
1633
1633
|
spacing: 1,
|
|
1634
1634
|
sx: {
|
|
1635
1635
|
userSelect: "none",
|
|
1636
|
-
color:
|
|
1636
|
+
color: t.color,
|
|
1637
1637
|
".MuiTypography-root": {
|
|
1638
1638
|
fontWeight: 700,
|
|
1639
1639
|
...n ? { color: l.palette.action.disabled } : {}
|
|
1640
1640
|
},
|
|
1641
1641
|
...n ? { "svg path": { fill: l.palette.action.disabled } } : {}
|
|
1642
1642
|
},
|
|
1643
|
-
children:
|
|
1643
|
+
children: e
|
|
1644
1644
|
}
|
|
1645
1645
|
),
|
|
1646
1646
|
/* @__PURE__ */ a(
|
|
@@ -1649,7 +1649,7 @@ const Pt = $(
|
|
|
1649
1649
|
height: "22px",
|
|
1650
1650
|
sx: {
|
|
1651
1651
|
fontSize: "15px",
|
|
1652
|
-
color: n ? l.palette.action.disabled :
|
|
1652
|
+
color: n ? l.palette.action.disabled : t.color,
|
|
1653
1653
|
fontWeight: 700,
|
|
1654
1654
|
fontVariantNumeric: "tabular-nums",
|
|
1655
1655
|
minWidth: "80px",
|
|
@@ -1678,17 +1678,17 @@ const Pt = $(
|
|
|
1678
1678
|
borderBottom: `2px solid ${g ?? "#fff"}`,
|
|
1679
1679
|
borderTop: `2px solid ${g ?? "#fff"}`
|
|
1680
1680
|
},
|
|
1681
|
-
children: /* @__PURE__ */ a(
|
|
1681
|
+
children: /* @__PURE__ */ a(Oe, {})
|
|
1682
1682
|
}
|
|
1683
1683
|
)
|
|
1684
1684
|
] });
|
|
1685
1685
|
}
|
|
1686
1686
|
)
|
|
1687
|
-
),
|
|
1687
|
+
), So = $(
|
|
1688
1688
|
J(
|
|
1689
1689
|
({
|
|
1690
|
-
startJogging:
|
|
1691
|
-
stopJogging:
|
|
1690
|
+
startJogging: t,
|
|
1691
|
+
stopJogging: e,
|
|
1692
1692
|
lowerLimit: o,
|
|
1693
1693
|
upperLimit: r,
|
|
1694
1694
|
useDegree: i,
|
|
@@ -1696,19 +1696,19 @@ const Pt = $(
|
|
|
1696
1696
|
disabled: c,
|
|
1697
1697
|
...s
|
|
1698
1698
|
}) => {
|
|
1699
|
-
var M,
|
|
1699
|
+
var M, I, j, k, E, V, Q, ot, xt, yt, St, vt, Ct, wt, Tt;
|
|
1700
1700
|
const { t: l } = z(), [d, m] = L(), u = B(), p = {
|
|
1701
1701
|
background: (M = u.palette.backgroundPaperElevation) == null ? void 0 : M[4],
|
|
1702
|
-
color: (
|
|
1702
|
+
color: (I = u.palette.backgroundPaperElevation) == null ? void 0 : I[11]
|
|
1703
1703
|
}, g = Lt(() => ({
|
|
1704
1704
|
activeJoggingDir: null,
|
|
1705
1705
|
startJogging(O) {
|
|
1706
|
-
this.activeJoggingDir = O,
|
|
1706
|
+
this.activeJoggingDir = O, t(O);
|
|
1707
1707
|
},
|
|
1708
1708
|
stopJogging() {
|
|
1709
|
-
this.activeJoggingDir = null,
|
|
1709
|
+
this.activeJoggingDir = null, e();
|
|
1710
1710
|
}
|
|
1711
|
-
})), f =
|
|
1711
|
+
})), f = Ye(() => {
|
|
1712
1712
|
const O = i ? y(n()) : n();
|
|
1713
1713
|
(O === void 0 || d === void 0 || Math.abs(d - O) > 1e-9) && m(O);
|
|
1714
1714
|
}, 50);
|
|
@@ -1744,7 +1744,7 @@ const Pt = $(
|
|
|
1744
1744
|
return O > 0 && X === 0 ? `+${K}` : K;
|
|
1745
1745
|
}
|
|
1746
1746
|
return /* @__PURE__ */ S(
|
|
1747
|
-
|
|
1747
|
+
_,
|
|
1748
1748
|
{
|
|
1749
1749
|
height: "64px",
|
|
1750
1750
|
width: "100%",
|
|
@@ -1762,7 +1762,7 @@ const Pt = $(
|
|
|
1762
1762
|
height: "42px"
|
|
1763
1763
|
},
|
|
1764
1764
|
"&.Mui-disabled": {
|
|
1765
|
-
backgroundColor: (
|
|
1765
|
+
backgroundColor: (k = u.palette.backgroundPaperElevation) == null ? void 0 : k[11],
|
|
1766
1766
|
color: u.palette.action.disabled,
|
|
1767
1767
|
opacity: 1
|
|
1768
1768
|
},
|
|
@@ -1788,7 +1788,7 @@ const Pt = $(
|
|
|
1788
1788
|
...g.activeJoggingDir === "-" ? p : {}
|
|
1789
1789
|
},
|
|
1790
1790
|
children: /* @__PURE__ */ a(
|
|
1791
|
-
|
|
1791
|
+
He,
|
|
1792
1792
|
{
|
|
1793
1793
|
sx: {
|
|
1794
1794
|
pointerEvents: "none",
|
|
@@ -1799,7 +1799,7 @@ const Pt = $(
|
|
|
1799
1799
|
}
|
|
1800
1800
|
),
|
|
1801
1801
|
/* @__PURE__ */ S(
|
|
1802
|
-
|
|
1802
|
+
_,
|
|
1803
1803
|
{
|
|
1804
1804
|
flexGrow: 1,
|
|
1805
1805
|
alignItems: "center",
|
|
@@ -1888,7 +1888,7 @@ const Pt = $(
|
|
|
1888
1888
|
...g.activeJoggingDir === "+" ? p : {}
|
|
1889
1889
|
},
|
|
1890
1890
|
children: /* @__PURE__ */ a(
|
|
1891
|
-
|
|
1891
|
+
qe,
|
|
1892
1892
|
{
|
|
1893
1893
|
sx: {
|
|
1894
1894
|
pointerEvents: "none",
|
|
@@ -1904,51 +1904,74 @@ const Pt = $(
|
|
|
1904
1904
|
}
|
|
1905
1905
|
)
|
|
1906
1906
|
);
|
|
1907
|
-
function Ut(
|
|
1908
|
-
if (
|
|
1907
|
+
function Ut(t, e, o) {
|
|
1908
|
+
if (e.length !== t.length)
|
|
1909
1909
|
return !0;
|
|
1910
|
-
for (let r = 0; r <
|
|
1910
|
+
for (let r = 0; r < e.length; r++)
|
|
1911
1911
|
if (
|
|
1912
1912
|
// biome-ignore lint/style/noNonNullAssertion: legacy code
|
|
1913
|
-
Math.abs(
|
|
1913
|
+
Math.abs(e[r] - t[r]) > o
|
|
1914
1914
|
)
|
|
1915
1915
|
return !1;
|
|
1916
1916
|
return !0;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1919
|
-
if (
|
|
1918
|
+
function vo(t, e, o) {
|
|
1919
|
+
if (t === void 0 && e || t && e === void 0 || (t == null ? void 0 : t.orientation) === void 0 || (e == null ? void 0 : e.orientation) === void 0 || (t == null ? void 0 : t.position) === void 0 || (e == null ? void 0 : e.position) === void 0)
|
|
1920
1920
|
return !1;
|
|
1921
|
-
if (
|
|
1921
|
+
if (t === void 0 || e === void 0)
|
|
1922
1922
|
return !0;
|
|
1923
1923
|
let r = 0;
|
|
1924
|
-
return r += Math.abs(
|
|
1924
|
+
return r += Math.abs(t.orientation[0] - e.orientation[0]), r += Math.abs(t.orientation[1] - e.orientation[1]), r += Math.abs(t.orientation[2] - e.orientation[2]), r += Math.abs(t.position[0] - e.position[0]), r += Math.abs(t.position[1] - e.position[1]), r += Math.abs(t.position[2] - e.position[2]), r <= o;
|
|
1925
1925
|
}
|
|
1926
|
-
function Ht(
|
|
1927
|
-
return
|
|
1928
|
-
e.tcp_pose,
|
|
1926
|
+
function Ht(t, e, o) {
|
|
1927
|
+
return t.coordinate_system === e.coordinate_system && t.tcp === e.tcp && vo(
|
|
1929
1928
|
t.tcp_pose,
|
|
1929
|
+
e.tcp_pose,
|
|
1930
1930
|
o
|
|
1931
1931
|
);
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1934
|
-
const o = new
|
|
1935
|
-
t[0],
|
|
1936
|
-
t[1],
|
|
1937
|
-
t[2]
|
|
1938
|
-
), r = new _t(
|
|
1933
|
+
function Co(t, e) {
|
|
1934
|
+
const o = new Pt(
|
|
1939
1935
|
e[0],
|
|
1940
1936
|
e[1],
|
|
1941
1937
|
e[2]
|
|
1938
|
+
), r = new Pt(
|
|
1939
|
+
t[0],
|
|
1940
|
+
t[1],
|
|
1941
|
+
t[2]
|
|
1942
1942
|
), i = o.length(), n = o.normalize();
|
|
1943
1943
|
let c = r.length(), s = r.normalize();
|
|
1944
1944
|
s.dot(n) < 0 && (c = -c, s = s.multiplyScalar(-1));
|
|
1945
1945
|
let l = c - i;
|
|
1946
1946
|
return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c = i + l, [...s.multiplyScalar(c)];
|
|
1947
1947
|
}
|
|
1948
|
+
function wo(t) {
|
|
1949
|
+
return "cellId" in t.api;
|
|
1950
|
+
}
|
|
1951
|
+
function qt(t) {
|
|
1952
|
+
if (!wo(t))
|
|
1953
|
+
return t;
|
|
1954
|
+
const e = t, o = new Proxy(e.api, {
|
|
1955
|
+
get(r, i) {
|
|
1956
|
+
const n = Reflect.get(r, i);
|
|
1957
|
+
return !n || typeof n != "object" ? n : new Proxy(n, {
|
|
1958
|
+
get(c, s) {
|
|
1959
|
+
const l = Reflect.get(c, s);
|
|
1960
|
+
return typeof l != "function" ? l : (d, ...m) => l.apply(c, m);
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
});
|
|
1965
|
+
return new Proxy(e, {
|
|
1966
|
+
get(r, i) {
|
|
1967
|
+
return i === "api" ? o : i === "openReconnectingWebsocket" ? (n) => r.openReconnectingWebsocket(n.replace(/^\/cells\/[^/]+/, "")) : Reflect.get(r, i);
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1948
1971
|
const Ot = 1e-4;
|
|
1949
1972
|
class ht {
|
|
1950
|
-
constructor(
|
|
1951
|
-
this.nova =
|
|
1973
|
+
constructor(e, o, r, i, n, c, s) {
|
|
1974
|
+
this.nova = e, this.cellId = o, this.controller = r, this.motionGroup = i, this.description = n, this.initialMotionState = c, this.motionStateSocket = s, this.rapidlyChangingMotionState = c, s.addEventListener("message", (l) => {
|
|
1952
1975
|
var p;
|
|
1953
1976
|
const d = (p = W(l.data)) == null ? void 0 : p.result;
|
|
1954
1977
|
if (!d)
|
|
@@ -1969,7 +1992,7 @@ class ht {
|
|
|
1969
1992
|
var g, f, y;
|
|
1970
1993
|
this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = d.tcp_pose : (g = d.tcp_pose) != null && g.orientation && ((f = d.tcp_pose) != null && f.position) && ((y = this.rapidlyChangingMotionState.tcp_pose) != null && y.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
|
|
1971
1994
|
position: d.tcp_pose.position,
|
|
1972
|
-
orientation:
|
|
1995
|
+
orientation: Co(
|
|
1973
1996
|
d.tcp_pose.orientation,
|
|
1974
1997
|
this.rapidlyChangingMotionState.tcp_pose.orientation
|
|
1975
1998
|
)
|
|
@@ -1990,43 +2013,43 @@ class ht {
|
|
|
1990
2013
|
});
|
|
1991
2014
|
}), mt(this);
|
|
1992
2015
|
}
|
|
1993
|
-
static async open(
|
|
1994
|
-
var
|
|
1995
|
-
const i = r.cellId ?? "cell", [
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
),
|
|
1999
|
-
(
|
|
2016
|
+
static async open(e, o, r = {}) {
|
|
2017
|
+
var f;
|
|
2018
|
+
const i = qt(e), n = r.cellId ?? "cell", [c, s] = o.split("@"), l = await i.api.controller.getCurrentRobotControllerState(
|
|
2019
|
+
n,
|
|
2020
|
+
s
|
|
2021
|
+
), d = l == null ? void 0 : l.motion_groups.find(
|
|
2022
|
+
(y) => y.motion_group === o
|
|
2000
2023
|
);
|
|
2001
|
-
if (!
|
|
2024
|
+
if (!l || !d)
|
|
2002
2025
|
throw new Error(
|
|
2003
|
-
`Controller ${
|
|
2026
|
+
`Controller ${s} or motion group ${o} not found`
|
|
2004
2027
|
);
|
|
2005
|
-
const
|
|
2006
|
-
`/cells/${
|
|
2007
|
-
),
|
|
2008
|
-
if (!
|
|
2028
|
+
const m = i.openReconnectingWebsocket(
|
|
2029
|
+
`/cells/${n}/controllers/${s}/motion-groups/${o}/state-stream`
|
|
2030
|
+
), u = await m.firstMessage(), p = (f = W(u.data)) == null ? void 0 : f.result;
|
|
2031
|
+
if (!p)
|
|
2009
2032
|
throw new Error(
|
|
2010
|
-
`Unable to parse initial motion state message ${
|
|
2033
|
+
`Unable to parse initial motion state message ${u.data}`
|
|
2011
2034
|
);
|
|
2012
2035
|
console.log(
|
|
2013
|
-
`Connected motion state websocket to motion group ${
|
|
2036
|
+
`Connected motion state websocket to motion group ${d.motion_group}. Initial state:
|
|
2014
2037
|
`,
|
|
2015
|
-
|
|
2038
|
+
p
|
|
2016
2039
|
);
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2040
|
+
const g = await i.api.motionGroup.getMotionGroupDescription(
|
|
2041
|
+
n,
|
|
2042
|
+
s,
|
|
2043
|
+
d.motion_group
|
|
2021
2044
|
);
|
|
2022
2045
|
return new ht(
|
|
2023
|
-
t,
|
|
2024
2046
|
i,
|
|
2025
|
-
|
|
2047
|
+
n,
|
|
2026
2048
|
l,
|
|
2049
|
+
d,
|
|
2050
|
+
g,
|
|
2027
2051
|
p,
|
|
2028
|
-
|
|
2029
|
-
d
|
|
2052
|
+
m
|
|
2030
2053
|
);
|
|
2031
2054
|
}
|
|
2032
2055
|
get motionGroupId() {
|
|
@@ -2036,7 +2059,7 @@ class ht {
|
|
|
2036
2059
|
return this.controller.controller;
|
|
2037
2060
|
}
|
|
2038
2061
|
get joints() {
|
|
2039
|
-
return this.initialMotionState.joint_position.map((
|
|
2062
|
+
return this.initialMotionState.joint_position.map((e, o) => ({
|
|
2040
2063
|
index: o
|
|
2041
2064
|
}));
|
|
2042
2065
|
}
|
|
@@ -2046,8 +2069,8 @@ class ht {
|
|
|
2046
2069
|
}
|
|
2047
2070
|
const Dt = "Movement request rejected. Another client is currently executing a 'Jogging' motion!";
|
|
2048
2071
|
class ft {
|
|
2049
|
-
constructor(
|
|
2050
|
-
this.motionStream =
|
|
2072
|
+
constructor(e, o = {}) {
|
|
2073
|
+
this.motionStream = e, this.options = o, 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.tcp = (o == null ? void 0 : o.tcp) || e.motionGroup.tcp || this.getDefaultTcp(e), this.orientation = (o == null ? void 0 : o.orientation) || this.DEFAULT_ORIENTATION, this.timeout = (o == null ? void 0 : o.timeout) || this.DEFAULT_INIT_TIMEOUT, this.mode = (o == null ? void 0 : o.mode) || this.DEFAULT_MODE, this.onError = o == null ? void 0 : o.onError;
|
|
2051
2074
|
}
|
|
2052
2075
|
/**
|
|
2053
2076
|
* Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
|
|
@@ -2066,9 +2089,9 @@ class ft {
|
|
|
2066
2089
|
* @param options.onError - Error handler for websocket errors
|
|
2067
2090
|
* @returns Promise resolving to initialized JoggerConnection instance
|
|
2068
2091
|
*/
|
|
2069
|
-
static async open(
|
|
2092
|
+
static async open(e, o, r = {}) {
|
|
2070
2093
|
const i = await ht.open(
|
|
2071
|
-
|
|
2094
|
+
e,
|
|
2072
2095
|
o,
|
|
2073
2096
|
{
|
|
2074
2097
|
cellId: r.cellId
|
|
@@ -2076,14 +2099,14 @@ class ft {
|
|
|
2076
2099
|
), n = new ft(i, r);
|
|
2077
2100
|
return await n.setJoggingMode(n.mode), n;
|
|
2078
2101
|
}
|
|
2079
|
-
getDefaultTcp(
|
|
2102
|
+
getDefaultTcp(e) {
|
|
2080
2103
|
var r, i;
|
|
2081
|
-
const o = (i = (r =
|
|
2082
|
-
return
|
|
2104
|
+
const o = (i = (r = e.description.dh_parameters) == null ? void 0 : r[0]) == null ? void 0 : i.type;
|
|
2105
|
+
return e.joints.length < 6 && (o === G.RevoluteJoint || o === G.PrismaticJoint) ? this.NO_TCP : this.DEFAULT_TCP;
|
|
2083
2106
|
}
|
|
2084
2107
|
// Set a new tcp or other options. If current mode is jogging, will reinitialize the jogging websocket
|
|
2085
|
-
async setOptions(
|
|
2086
|
-
|
|
2108
|
+
async setOptions(e) {
|
|
2109
|
+
e.tcp && (this.tcp = e.tcp), e.orientation && (this.orientation = e.orientation), e.timeout && (this.timeout = e.timeout), e.mode && (this.mode = e.mode), e.onError && (this.onError = e.onError), this.setJoggingMode(this.mode, !1);
|
|
2087
2110
|
}
|
|
2088
2111
|
get motionGroupId() {
|
|
2089
2112
|
return this.motionStream.motionGroupId;
|
|
@@ -2106,10 +2129,10 @@ class ft {
|
|
|
2106
2129
|
// Sends stop movement command to robot
|
|
2107
2130
|
async stop() {
|
|
2108
2131
|
if (this.joggingSocket) {
|
|
2109
|
-
const
|
|
2132
|
+
const e = new Array(this.numJoints).fill(0);
|
|
2110
2133
|
this.joggingSocket.sendJson({
|
|
2111
2134
|
message_type: "JointVelocityRequest",
|
|
2112
|
-
velocity:
|
|
2135
|
+
velocity: e
|
|
2113
2136
|
});
|
|
2114
2137
|
}
|
|
2115
2138
|
this.trajectorySocket && this.trajectorySocket.sendJson({
|
|
@@ -2118,23 +2141,23 @@ class ft {
|
|
|
2118
2141
|
}
|
|
2119
2142
|
// Dispose the jogger, closing all open websockets
|
|
2120
2143
|
async dispose() {
|
|
2121
|
-
const
|
|
2144
|
+
const e = [this.joggingSocket, this.trajectorySocket].filter(
|
|
2122
2145
|
(o) => o !== null
|
|
2123
2146
|
);
|
|
2124
|
-
return
|
|
2147
|
+
return e.forEach((o) => {
|
|
2125
2148
|
o.dispose();
|
|
2126
|
-
}), this.joggingSocket = null, this.trajectorySocket = null, Promise.all(
|
|
2149
|
+
}), this.joggingSocket = null, this.trajectorySocket = null, Promise.all(e.map((o) => o.closed()));
|
|
2127
2150
|
}
|
|
2128
2151
|
// Activate jogger in one of the supported modes
|
|
2129
2152
|
// Will iniitialize or close websockets as necessary
|
|
2130
2153
|
// If mode is unchanged, does nothing (unless skipReinitializeIfSameMode is false)
|
|
2131
|
-
async setJoggingMode(
|
|
2132
|
-
if (!(this.mode ===
|
|
2154
|
+
async setJoggingMode(e, o = !0) {
|
|
2155
|
+
if (!(this.mode === e && o) && (this.dispose(), this.mode = e, this.mode === "jogging"))
|
|
2133
2156
|
return this.initializeJoggingWebsocket();
|
|
2134
2157
|
}
|
|
2135
2158
|
// Initializes continuous jogging websocket, called by setJoggingMode("jogging")
|
|
2136
2159
|
async initializeJoggingWebsocket() {
|
|
2137
|
-
return new Promise((
|
|
2160
|
+
return new Promise((e, o) => {
|
|
2138
2161
|
const r = setTimeout(() => {
|
|
2139
2162
|
o(
|
|
2140
2163
|
new Error(
|
|
@@ -2148,7 +2171,7 @@ class ft {
|
|
|
2148
2171
|
var c, s, l, d;
|
|
2149
2172
|
const n = W(i.data);
|
|
2150
2173
|
if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
|
|
2151
|
-
clearTimeout(r),
|
|
2174
|
+
clearTimeout(r), e();
|
|
2152
2175
|
return;
|
|
2153
2176
|
}
|
|
2154
2177
|
if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
|
|
@@ -2167,7 +2190,7 @@ class ft {
|
|
|
2167
2190
|
* Jogging: Start rotation of a single robot joint at the specified velocity
|
|
2168
2191
|
*/
|
|
2169
2192
|
async rotateJoints({
|
|
2170
|
-
joint:
|
|
2193
|
+
joint: e,
|
|
2171
2194
|
direction: o,
|
|
2172
2195
|
velocityValue: r,
|
|
2173
2196
|
velocityUnit: i
|
|
@@ -2177,7 +2200,7 @@ class ft {
|
|
|
2177
2200
|
"Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2178
2201
|
);
|
|
2179
2202
|
const n = new Array(this.numJoints).fill(0);
|
|
2180
|
-
n[
|
|
2203
|
+
n[e] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2181
2204
|
message_type: "JointVelocityRequest",
|
|
2182
2205
|
velocity: n
|
|
2183
2206
|
});
|
|
@@ -2186,7 +2209,7 @@ class ft {
|
|
|
2186
2209
|
* Jogging: Start the TCP moving along a specified axis at a given velocity
|
|
2187
2210
|
*/
|
|
2188
2211
|
async translateTCP({
|
|
2189
|
-
axis:
|
|
2212
|
+
axis: e,
|
|
2190
2213
|
direction: o,
|
|
2191
2214
|
velocityMmPerSec: r
|
|
2192
2215
|
}) {
|
|
@@ -2195,7 +2218,7 @@ class ft {
|
|
|
2195
2218
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2196
2219
|
);
|
|
2197
2220
|
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2198
|
-
n[tt[
|
|
2221
|
+
n[tt[e]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2199
2222
|
message_type: "TcpVelocityRequest",
|
|
2200
2223
|
translation: n,
|
|
2201
2224
|
rotation: i,
|
|
@@ -2206,7 +2229,7 @@ class ft {
|
|
|
2206
2229
|
* Jogging: Start the TCP rotating around a specified axis at a given velocity
|
|
2207
2230
|
*/
|
|
2208
2231
|
async rotateTCP({
|
|
2209
|
-
axis:
|
|
2232
|
+
axis: e,
|
|
2210
2233
|
direction: o,
|
|
2211
2234
|
velocityRadsPerSec: r
|
|
2212
2235
|
}) {
|
|
@@ -2215,7 +2238,7 @@ class ft {
|
|
|
2215
2238
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2216
2239
|
);
|
|
2217
2240
|
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2218
|
-
i[tt[
|
|
2241
|
+
i[tt[e]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2219
2242
|
message_type: "TcpVelocityRequest",
|
|
2220
2243
|
translation: n,
|
|
2221
2244
|
rotation: i,
|
|
@@ -2230,7 +2253,7 @@ class ft {
|
|
|
2230
2253
|
* Promise resolves only after the motion has completed.
|
|
2231
2254
|
*/
|
|
2232
2255
|
async runIncrementalCartesianMotion({
|
|
2233
|
-
currentTcpPose:
|
|
2256
|
+
currentTcpPose: e,
|
|
2234
2257
|
currentJoints: o,
|
|
2235
2258
|
// coordSystemId,
|
|
2236
2259
|
velocityInRelevantUnits: r,
|
|
@@ -2244,11 +2267,11 @@ class ft {
|
|
|
2244
2267
|
"Set jogging mode to 'trajectory' to run incremental cartesian motions"
|
|
2245
2268
|
);
|
|
2246
2269
|
if (c.type === "translate") {
|
|
2247
|
-
if (!
|
|
2270
|
+
if (!e.position)
|
|
2248
2271
|
throw new Error(
|
|
2249
2272
|
"Current pose has no position, cannot perform translation"
|
|
2250
2273
|
);
|
|
2251
|
-
const b = [...
|
|
2274
|
+
const b = [...e.position];
|
|
2252
2275
|
b[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
|
|
2253
2276
|
limits_override: {
|
|
2254
2277
|
tcp_velocity_limit: r
|
|
@@ -2257,24 +2280,24 @@ class ft {
|
|
|
2257
2280
|
path_definition_name: "PathLine",
|
|
2258
2281
|
target_pose: {
|
|
2259
2282
|
position: b,
|
|
2260
|
-
orientation:
|
|
2283
|
+
orientation: e.orientation
|
|
2261
2284
|
}
|
|
2262
2285
|
}
|
|
2263
2286
|
});
|
|
2264
2287
|
} else if (c.type === "rotate") {
|
|
2265
|
-
if (!
|
|
2288
|
+
if (!e.orientation)
|
|
2266
2289
|
throw new Error(
|
|
2267
2290
|
"Current pose has no orientation, cannot perform rotation"
|
|
2268
2291
|
);
|
|
2269
2292
|
const b = new ct(
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2293
|
+
e.orientation[0],
|
|
2294
|
+
e.orientation[1],
|
|
2295
|
+
e.orientation[2]
|
|
2273
2296
|
), h = b.length(), v = b.clone().normalize(), x = c.distanceRads * (n === "-" ? -1 : 1), T = new ct(0, 0, 0);
|
|
2274
2297
|
T[i] = 1;
|
|
2275
|
-
const C = Math.cos(0.5 * x) * Math.cos(0.5 * h), M = Math.sin(0.5 * x) * Math.sin(0.5 * h),
|
|
2298
|
+
const C = Math.cos(0.5 * x) * Math.cos(0.5 * h), M = Math.sin(0.5 * x) * Math.sin(0.5 * h), I = Math.sin(0.5 * x) * Math.cos(0.5 * h), j = Math.cos(0.5 * x) * Math.sin(0.5 * h), k = T.dot(
|
|
2276
2299
|
v
|
|
2277
|
-
), E = T.clone().cross(v), V = 2 * Math.acos(C - M *
|
|
2300
|
+
), E = T.clone().cross(v), V = 2 * Math.acos(C - M * k), Q = V / Math.sin(0.5 * V), ot = new ct().addScaledVector(E, M).addScaledVector(T, I).addScaledVector(v, j).multiplyScalar(Q);
|
|
2278
2301
|
s.push({
|
|
2279
2302
|
limits_override: {
|
|
2280
2303
|
tcp_orientation_velocity_limit: r
|
|
@@ -2282,7 +2305,7 @@ class ft {
|
|
|
2282
2305
|
path: {
|
|
2283
2306
|
path_definition_name: "PathLine",
|
|
2284
2307
|
target_pose: {
|
|
2285
|
-
position:
|
|
2308
|
+
position: e.position,
|
|
2286
2309
|
orientation: [...ot]
|
|
2287
2310
|
}
|
|
2288
2311
|
}
|
|
@@ -2387,32 +2410,32 @@ class ft {
|
|
|
2387
2410
|
});
|
|
2388
2411
|
}
|
|
2389
2412
|
}
|
|
2390
|
-
const
|
|
2391
|
-
const
|
|
2413
|
+
const To = (t) => {
|
|
2414
|
+
const e = t.softTimeout || 3e3, [o, r] = L(!1), i = B();
|
|
2392
2415
|
return F(() => {
|
|
2393
2416
|
const n = setTimeout(() => {
|
|
2394
2417
|
r(!0);
|
|
2395
|
-
},
|
|
2418
|
+
}, e);
|
|
2396
2419
|
return () => clearTimeout(n);
|
|
2397
2420
|
}), /* @__PURE__ */ a(
|
|
2398
|
-
|
|
2421
|
+
_,
|
|
2399
2422
|
{
|
|
2400
2423
|
width: "100%",
|
|
2401
2424
|
height: "100%",
|
|
2402
2425
|
alignItems: "center",
|
|
2403
2426
|
justifyContent: "center",
|
|
2404
2427
|
sx: { color: i.palette.text.primary },
|
|
2405
|
-
children:
|
|
2406
|
-
|
|
2428
|
+
children: t.error ? /* @__PURE__ */ a(
|
|
2429
|
+
Mo,
|
|
2407
2430
|
{
|
|
2408
|
-
loadingMessage:
|
|
2409
|
-
error:
|
|
2431
|
+
loadingMessage: t.message,
|
|
2432
|
+
error: t.error
|
|
2410
2433
|
}
|
|
2411
2434
|
) : /* @__PURE__ */ S(et, { children: [
|
|
2412
2435
|
/* @__PURE__ */ a(Wt, { sx: { marginBottom: "24px" } }),
|
|
2413
|
-
!!
|
|
2436
|
+
!!t.message && /* @__PURE__ */ a("div", { children: t.message }),
|
|
2414
2437
|
/* @__PURE__ */ a(
|
|
2415
|
-
|
|
2438
|
+
_,
|
|
2416
2439
|
{
|
|
2417
2440
|
sx: {
|
|
2418
2441
|
visibility: o ? "visible" : "hidden",
|
|
@@ -2425,10 +2448,10 @@ const Co = (e) => {
|
|
|
2425
2448
|
] })
|
|
2426
2449
|
}
|
|
2427
2450
|
);
|
|
2428
|
-
},
|
|
2429
|
-
const
|
|
2451
|
+
}, Mo = (t) => {
|
|
2452
|
+
const e = je(t.error), o = t.error instanceof Error ? t.error.stack : null, r = B();
|
|
2430
2453
|
return /* @__PURE__ */ S(
|
|
2431
|
-
|
|
2454
|
+
_,
|
|
2432
2455
|
{
|
|
2433
2456
|
sx: {
|
|
2434
2457
|
maxHeight: "100%",
|
|
@@ -2443,14 +2466,14 @@ const Co = (e) => {
|
|
|
2443
2466
|
}
|
|
2444
2467
|
},
|
|
2445
2468
|
children: [
|
|
2446
|
-
(
|
|
2469
|
+
(t.loadingMessage ? `Error while ${Ce(Re(t.loadingMessage))} - ` : "") + e,
|
|
2447
2470
|
/* @__PURE__ */ a("br", {}),
|
|
2448
2471
|
o && /* @__PURE__ */ a("pre", { children: o })
|
|
2449
2472
|
]
|
|
2450
2473
|
}
|
|
2451
2474
|
);
|
|
2452
|
-
},
|
|
2453
|
-
const { t } = z();
|
|
2475
|
+
}, Io = J(({ store: t }) => {
|
|
2476
|
+
const { t: e } = z();
|
|
2454
2477
|
return /* @__PURE__ */ a(
|
|
2455
2478
|
Bt,
|
|
2456
2479
|
{
|
|
@@ -2465,31 +2488,31 @@ const Co = (e) => {
|
|
|
2465
2488
|
justifyContent: "flex-start",
|
|
2466
2489
|
alignItems: "flex-start"
|
|
2467
2490
|
},
|
|
2468
|
-
children: /* @__PURE__ */ S(
|
|
2469
|
-
/* @__PURE__ */ S(
|
|
2470
|
-
/* @__PURE__ */ a(
|
|
2471
|
-
|
|
2491
|
+
children: /* @__PURE__ */ S(_, { sx: { m: 2, width: "100%" }, children: [
|
|
2492
|
+
/* @__PURE__ */ S(Ee, { severity: "error", sx: { mb: 2 }, children: [
|
|
2493
|
+
/* @__PURE__ */ a(Pe, { children: e("Jogging.Blocked.ti") }),
|
|
2494
|
+
e("Jogging.Blocked.lb")
|
|
2472
2495
|
] }),
|
|
2473
2496
|
/* @__PURE__ */ a(
|
|
2474
2497
|
Z,
|
|
2475
2498
|
{
|
|
2476
2499
|
variant: "contained",
|
|
2477
2500
|
color: "secondary",
|
|
2478
|
-
onClick: () =>
|
|
2479
|
-
children:
|
|
2501
|
+
onClick: () => t.unblock(),
|
|
2502
|
+
children: e("Jogging.Blocked.Reenable.bt")
|
|
2480
2503
|
}
|
|
2481
2504
|
)
|
|
2482
2505
|
] })
|
|
2483
2506
|
}
|
|
2484
2507
|
);
|
|
2485
|
-
}),
|
|
2486
|
-
({ store:
|
|
2487
|
-
const { t } = z(), [o, r] = L(
|
|
2488
|
-
|
|
2508
|
+
}), Yt = J(
|
|
2509
|
+
({ store: t }) => {
|
|
2510
|
+
const { t: e } = z(), [o, r] = L(
|
|
2511
|
+
t.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached
|
|
2489
2512
|
), i = A(o);
|
|
2490
2513
|
pt(() => {
|
|
2491
|
-
const c =
|
|
2492
|
-
|
|
2514
|
+
const c = t.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;
|
|
2515
|
+
Le(i.current, c) || (i.current = c, r(c));
|
|
2493
2516
|
});
|
|
2494
2517
|
const n = [];
|
|
2495
2518
|
for (const [c, s] of o.entries())
|
|
@@ -2514,7 +2537,7 @@ const Co = (e) => {
|
|
|
2514
2537
|
lineHeight: 1.2,
|
|
2515
2538
|
visibility: n.length ? "visible" : "hidden"
|
|
2516
2539
|
},
|
|
2517
|
-
children:
|
|
2540
|
+
children: e("Jogging.JointLimitsReached.lb", {
|
|
2518
2541
|
jointNumbers: n.map((c) => c + 1).join(", ")
|
|
2519
2542
|
})
|
|
2520
2543
|
}
|
|
@@ -2522,7 +2545,7 @@ const Co = (e) => {
|
|
|
2522
2545
|
}
|
|
2523
2546
|
);
|
|
2524
2547
|
}
|
|
2525
|
-
),
|
|
2548
|
+
), ko = ut(ze)(({ theme: t }) => ({
|
|
2526
2549
|
"&.MuiFormControl-root": {
|
|
2527
2550
|
".MuiSelect-select": {
|
|
2528
2551
|
paddingTop: "20px",
|
|
@@ -2534,18 +2557,18 @@ const Co = (e) => {
|
|
|
2534
2557
|
},
|
|
2535
2558
|
".MuiInputLabel-root": {
|
|
2536
2559
|
"&.Mui-focused": {
|
|
2537
|
-
color:
|
|
2560
|
+
color: t.palette.text.primary
|
|
2538
2561
|
}
|
|
2539
2562
|
}
|
|
2540
2563
|
}
|
|
2541
2564
|
}));
|
|
2542
2565
|
function it({
|
|
2543
|
-
labelValue:
|
|
2544
|
-
...
|
|
2566
|
+
labelValue: t,
|
|
2567
|
+
...e
|
|
2545
2568
|
}) {
|
|
2546
|
-
return /* @__PURE__ */ S(
|
|
2547
|
-
/* @__PURE__ */ a(
|
|
2548
|
-
/* @__PURE__ */ a(
|
|
2569
|
+
return /* @__PURE__ */ S(ko, { fullWidth: !0, variant: "filled", children: [
|
|
2570
|
+
/* @__PURE__ */ a(Ve, { id: e.labelId, children: t }),
|
|
2571
|
+
/* @__PURE__ */ a(Ne, { ...e })
|
|
2549
2572
|
] });
|
|
2550
2573
|
}
|
|
2551
2574
|
const dt = [
|
|
@@ -2553,20 +2576,20 @@ const dt = [
|
|
|
2553
2576
|
{ id: "1", mm: 1, degrees: 0.5 },
|
|
2554
2577
|
{ id: "5", mm: 5, degrees: 2.5 },
|
|
2555
2578
|
{ id: "10", mm: 10, degrees: 5 }
|
|
2556
|
-
],
|
|
2579
|
+
], Ro = [
|
|
2557
2580
|
{ id: "continuous" },
|
|
2558
2581
|
...dt
|
|
2559
|
-
],
|
|
2582
|
+
], jo = ["coordsys", "tool"];
|
|
2560
2583
|
class bt {
|
|
2561
|
-
constructor(
|
|
2584
|
+
constructor(e, o, r, i, n) {
|
|
2562
2585
|
var c, s, l;
|
|
2563
|
-
this.jogger =
|
|
2586
|
+
this.jogger = e, this.coordSystems = o, this.motionGroupDescription = r, this.tcps = i, this.inverseSolverValue = n, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = G.RevoluteJoint;
|
|
2564
2587
|
for (const d of o)
|
|
2565
2588
|
if (d.coordinate_system === "") {
|
|
2566
2589
|
d.coordinate_system = "world";
|
|
2567
2590
|
break;
|
|
2568
2591
|
}
|
|
2569
|
-
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId =
|
|
2592
|
+
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = e.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = n, this.jointType = ((l = (s = r == null ? void 0 : r.dh_parameters) == null ? void 0 : s[0]) == null ? void 0 : l.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
|
|
2570
2593
|
this.block();
|
|
2571
2594
|
}, this.loadFromLocalStorage(), this.disposers.push(kt(() => this.saveToLocalStorage())), this.disposers.push(
|
|
2572
2595
|
kt(() => {
|
|
@@ -2581,19 +2604,19 @@ class bt {
|
|
|
2581
2604
|
* Load a jogging store with the relevant data it needs
|
|
2582
2605
|
* from the backend
|
|
2583
2606
|
*/
|
|
2584
|
-
static async loadFor(
|
|
2585
|
-
const { nova: o, cellId: r } =
|
|
2607
|
+
static async loadFor(e) {
|
|
2608
|
+
const { nova: o, cellId: r } = e, [i, n] = await Promise.all([
|
|
2586
2609
|
// Fetch coord systems so user can select between them
|
|
2587
2610
|
o.api.controller.listCoordinateSystems(
|
|
2588
2611
|
r,
|
|
2589
|
-
|
|
2612
|
+
e.motionStream.controllerId,
|
|
2590
2613
|
"ROTATION_VECTOR"
|
|
2591
2614
|
),
|
|
2592
2615
|
// Same for TCPs and other info from description
|
|
2593
2616
|
o.api.motionGroup.getMotionGroupDescription(
|
|
2594
2617
|
r,
|
|
2595
|
-
|
|
2596
|
-
|
|
2618
|
+
e.motionStream.controllerId,
|
|
2619
|
+
e.motionGroupId
|
|
2597
2620
|
)
|
|
2598
2621
|
]), c = await o.api.motionGroupModels.getMotionGroupKinematicModel(
|
|
2599
2622
|
n.motion_group_model
|
|
@@ -2604,7 +2627,7 @@ class bt {
|
|
|
2604
2627
|
orientation: d.pose.orientation
|
|
2605
2628
|
}));
|
|
2606
2629
|
return new bt(
|
|
2607
|
-
|
|
2630
|
+
e,
|
|
2608
2631
|
i || [],
|
|
2609
2632
|
n,
|
|
2610
2633
|
s,
|
|
@@ -2612,12 +2635,12 @@ class bt {
|
|
|
2612
2635
|
);
|
|
2613
2636
|
}
|
|
2614
2637
|
dispose() {
|
|
2615
|
-
for (const
|
|
2616
|
-
|
|
2638
|
+
for (const e of this.disposers)
|
|
2639
|
+
e();
|
|
2617
2640
|
this.jogger.dispose();
|
|
2618
2641
|
}
|
|
2619
2642
|
get coordSystemCountByName() {
|
|
2620
|
-
return
|
|
2643
|
+
return we(this.coordSystems, (e) => e.name);
|
|
2621
2644
|
}
|
|
2622
2645
|
async deactivate() {
|
|
2623
2646
|
this.jogger.mode === "jogging" && await this.jogger.setJoggingMode("off");
|
|
@@ -2630,8 +2653,8 @@ class bt {
|
|
|
2630
2653
|
}), this.activeDiscreteIncrement ? this.jogger.setJoggingMode("trajectory") : this.jogger.setJoggingMode("jogging")) : this.jogger.setJoggingMode("jogging"), this.jogger;
|
|
2631
2654
|
}
|
|
2632
2655
|
loadFromLocalStorage() {
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2656
|
+
const e = W(localStorage.getItem("joggingToolStore"));
|
|
2657
|
+
e && (this.tabsById[e.selectedTabId] && (this.selectedTabId = e.selectedTabId), this.coordSystemsById[e.selectedCoordSystemId] && (this.selectedCoordSystemId = e.selectedCoordSystemId), 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));
|
|
2635
2658
|
}
|
|
2636
2659
|
saveToLocalStorage() {
|
|
2637
2660
|
localStorage.setItem(
|
|
@@ -2652,28 +2675,28 @@ class bt {
|
|
|
2652
2675
|
};
|
|
2653
2676
|
}
|
|
2654
2677
|
get tabs() {
|
|
2655
|
-
const
|
|
2678
|
+
const e = [
|
|
2656
2679
|
{
|
|
2657
2680
|
id: "joint",
|
|
2658
2681
|
label: "Joints"
|
|
2659
2682
|
}
|
|
2660
2683
|
];
|
|
2661
|
-
return this.inverseSolver !== null &&
|
|
2684
|
+
return this.inverseSolver !== null && e.unshift({
|
|
2662
2685
|
id: "cartesian",
|
|
2663
2686
|
label: "Cartesian"
|
|
2664
|
-
}),
|
|
2687
|
+
}), e;
|
|
2665
2688
|
}
|
|
2666
2689
|
get incrementOptions() {
|
|
2667
|
-
return
|
|
2690
|
+
return Ro;
|
|
2668
2691
|
}
|
|
2669
2692
|
get discreteIncrementOptions() {
|
|
2670
2693
|
return dt;
|
|
2671
2694
|
}
|
|
2672
2695
|
get incrementOptionsById() {
|
|
2673
|
-
return nt(this.incrementOptions, (
|
|
2696
|
+
return nt(this.incrementOptions, (e) => e.id);
|
|
2674
2697
|
}
|
|
2675
2698
|
get tabsById() {
|
|
2676
|
-
return nt(this.tabs, (
|
|
2699
|
+
return nt(this.tabs, (e) => e.id);
|
|
2677
2700
|
}
|
|
2678
2701
|
get currentTab() {
|
|
2679
2702
|
return this.tabsById[this.selectedTabId] || this.tabs[0];
|
|
@@ -2682,7 +2705,7 @@ class bt {
|
|
|
2682
2705
|
return this.tabs.indexOf(this.currentTab);
|
|
2683
2706
|
}
|
|
2684
2707
|
get coordSystemsById() {
|
|
2685
|
-
return nt(this.coordSystems, (
|
|
2708
|
+
return nt(this.coordSystems, (e) => e.coordinate_system);
|
|
2686
2709
|
}
|
|
2687
2710
|
/**
|
|
2688
2711
|
* The id of the coordinate system to use for jogging.
|
|
@@ -2693,40 +2716,40 @@ class bt {
|
|
|
2693
2716
|
return this.selectedOrientation === "tool" ? "tool" : this.selectedCoordSystemId;
|
|
2694
2717
|
}
|
|
2695
2718
|
get tcpsById() {
|
|
2696
|
-
return nt(this.tcps, (
|
|
2719
|
+
return nt(this.tcps, (e) => e.id);
|
|
2697
2720
|
}
|
|
2698
2721
|
get activeDiscreteIncrement() {
|
|
2699
|
-
return this.selectedOrientation === "tool" ? void 0 : dt.find((
|
|
2722
|
+
return this.selectedOrientation === "tool" ? void 0 : dt.find((e) => e.id === this.selectedIncrementId);
|
|
2700
2723
|
}
|
|
2701
2724
|
/** The selected rotation velocity converted to radians per second */
|
|
2702
2725
|
get rotationVelocityRadsPerSec() {
|
|
2703
2726
|
return this.rotationVelocityDegPerSec * Math.PI / 180;
|
|
2704
2727
|
}
|
|
2705
2728
|
/** Selected velocity in mm/sec or deg/sec */
|
|
2706
|
-
velocityInDisplayUnits(
|
|
2707
|
-
return
|
|
2729
|
+
velocityInDisplayUnits(e) {
|
|
2730
|
+
return e ? this.rotationVelocityDegPerSec : this.translationVelocityMmPerSec;
|
|
2708
2731
|
}
|
|
2709
2732
|
/** Minimum selectable velocity in mm/sec or deg/sec */
|
|
2710
|
-
minVelocityInDisplayUnits(
|
|
2711
|
-
return
|
|
2733
|
+
minVelocityInDisplayUnits(e) {
|
|
2734
|
+
return e ? this.minRotationVelocityDegPerSec : this.minTranslationVelocityMmPerSec;
|
|
2712
2735
|
}
|
|
2713
2736
|
/** Maximum selectable velocity in mm/sec or deg/sec */
|
|
2714
|
-
maxVelocityInDisplayUnits(
|
|
2715
|
-
return
|
|
2737
|
+
maxVelocityInDisplayUnits(e) {
|
|
2738
|
+
return e ? this.maxRotationVelocityDegPerSec : this.maxTranslationVelocityMmPerSec;
|
|
2716
2739
|
}
|
|
2717
|
-
onTabChange(
|
|
2740
|
+
onTabChange(e, o) {
|
|
2718
2741
|
const r = this.tabs[o] || this.tabs[0];
|
|
2719
2742
|
this.selectedTabId = r.id;
|
|
2720
2743
|
}
|
|
2721
|
-
setSelectedCoordSystemId(
|
|
2722
|
-
this.selectedCoordSystemId =
|
|
2744
|
+
setSelectedCoordSystemId(e) {
|
|
2745
|
+
this.selectedCoordSystemId = e;
|
|
2723
2746
|
}
|
|
2724
2747
|
/**
|
|
2725
2748
|
* @deprecated Use {@link JoggingStore.requestTcpChange} instead. This method now delegates
|
|
2726
2749
|
* to `requestTcpChange` which properly communicates the TCP change to the server.
|
|
2727
2750
|
*/
|
|
2728
|
-
setSelectedTcpId(
|
|
2729
|
-
this.requestTcpChange(
|
|
2751
|
+
setSelectedTcpId(e) {
|
|
2752
|
+
this.requestTcpChange(e).catch((o) => {
|
|
2730
2753
|
console.error("Failed to change TCP:", o);
|
|
2731
2754
|
});
|
|
2732
2755
|
}
|
|
@@ -2739,15 +2762,15 @@ class bt {
|
|
|
2739
2762
|
* TCP change. The websocket is kept open until the state-stream confirms the
|
|
2740
2763
|
* change (or a 1s timeout), to ensure the backend has time to process it.
|
|
2741
2764
|
*/
|
|
2742
|
-
async requestTcpChange(
|
|
2743
|
-
if (
|
|
2765
|
+
async requestTcpChange(e) {
|
|
2766
|
+
if (e === this.selectedTcpId) return;
|
|
2744
2767
|
this.tcpChangeInProgress = !0;
|
|
2745
2768
|
const o = this.jogger.tcp, r = this.jogger.mode !== "jogging";
|
|
2746
2769
|
try {
|
|
2747
|
-
this.jogger.tcp =
|
|
2748
|
-
let i = await this.waitForTcpConfirmation(
|
|
2749
|
-
r && await this.jogger.setJoggingMode("off"), i || (i = await this.waitForTcpConfirmation(
|
|
2750
|
-
i ? this.selectedTcpId =
|
|
2770
|
+
this.jogger.tcp = e, r ? await this.jogger.setJoggingMode("jogging") : await this.jogger.setJoggingMode("jogging", !1);
|
|
2771
|
+
let i = await this.waitForTcpConfirmation(e, 1e3);
|
|
2772
|
+
r && await this.jogger.setJoggingMode("off"), i || (i = await this.waitForTcpConfirmation(e, 2e3)), D(() => {
|
|
2773
|
+
i ? this.selectedTcpId = e : (this.jogger.tcp = o, this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "");
|
|
2751
2774
|
});
|
|
2752
2775
|
} catch (i) {
|
|
2753
2776
|
throw r && await this.jogger.setJoggingMode("off").catch(() => {
|
|
@@ -2760,38 +2783,38 @@ class bt {
|
|
|
2760
2783
|
});
|
|
2761
2784
|
}
|
|
2762
2785
|
}
|
|
2763
|
-
waitForTcpConfirmation(
|
|
2786
|
+
waitForTcpConfirmation(e, o) {
|
|
2764
2787
|
return new Promise((r) => {
|
|
2765
2788
|
const i = setTimeout(() => {
|
|
2766
2789
|
n(), r(!1);
|
|
2767
2790
|
}, o), n = at(
|
|
2768
|
-
() => this.jogger.motionStream.rapidlyChangingMotionState.tcp ===
|
|
2791
|
+
() => this.jogger.motionStream.rapidlyChangingMotionState.tcp === e,
|
|
2769
2792
|
() => {
|
|
2770
2793
|
clearTimeout(i), r(!0);
|
|
2771
2794
|
}
|
|
2772
2795
|
);
|
|
2773
2796
|
});
|
|
2774
2797
|
}
|
|
2775
|
-
setSelectedOrientation(
|
|
2776
|
-
this.selectedOrientation =
|
|
2798
|
+
setSelectedOrientation(e) {
|
|
2799
|
+
this.selectedOrientation = e;
|
|
2777
2800
|
}
|
|
2778
|
-
setSelectedIncrementId(
|
|
2779
|
-
this.selectedIncrementId =
|
|
2801
|
+
setSelectedIncrementId(e) {
|
|
2802
|
+
this.selectedIncrementId = e;
|
|
2780
2803
|
}
|
|
2781
|
-
setCurrentIncrementJog(
|
|
2782
|
-
this.incrementJogInProgress =
|
|
2804
|
+
setCurrentIncrementJog(e) {
|
|
2805
|
+
this.incrementJogInProgress = e;
|
|
2783
2806
|
}
|
|
2784
|
-
setVelocityFromSlider(
|
|
2785
|
-
o ? this.rotationVelocityDegPerSec =
|
|
2807
|
+
setVelocityFromSlider(e, o) {
|
|
2808
|
+
o ? this.rotationVelocityDegPerSec = e : this.translationVelocityMmPerSec = e;
|
|
2786
2809
|
}
|
|
2787
|
-
setSelectedCartesianMotionType(
|
|
2788
|
-
this.selectedCartesianMotionType =
|
|
2810
|
+
setSelectedCartesianMotionType(e) {
|
|
2811
|
+
this.selectedCartesianMotionType = e;
|
|
2789
2812
|
}
|
|
2790
|
-
lock(
|
|
2791
|
-
this.locks.add(
|
|
2813
|
+
lock(e) {
|
|
2814
|
+
this.locks.add(e);
|
|
2792
2815
|
}
|
|
2793
|
-
unlock(
|
|
2794
|
-
this.locks.delete(
|
|
2816
|
+
unlock(e) {
|
|
2817
|
+
this.locks.delete(e);
|
|
2795
2818
|
}
|
|
2796
2819
|
block() {
|
|
2797
2820
|
this.blocked = !0;
|
|
@@ -2800,20 +2823,20 @@ class bt {
|
|
|
2800
2823
|
this.blocked = !1, this.jogger.mode === "jogging" && this.jogger.initializeJoggingWebsocket();
|
|
2801
2824
|
}
|
|
2802
2825
|
/** Lock the UI until the given async callback resolves */
|
|
2803
|
-
async withMotionLock(
|
|
2804
|
-
const o =
|
|
2826
|
+
async withMotionLock(e) {
|
|
2827
|
+
const o = We();
|
|
2805
2828
|
this.lock(o);
|
|
2806
2829
|
try {
|
|
2807
|
-
return await
|
|
2830
|
+
return await e();
|
|
2808
2831
|
} finally {
|
|
2809
2832
|
this.unlock(o);
|
|
2810
2833
|
}
|
|
2811
2834
|
}
|
|
2812
2835
|
}
|
|
2813
|
-
const
|
|
2814
|
-
({ store:
|
|
2836
|
+
const Eo = J(
|
|
2837
|
+
({ store: t, useDegree: e }) => {
|
|
2815
2838
|
var c;
|
|
2816
|
-
const { t: o } = z(), r =
|
|
2839
|
+
const { t: o } = z(), r = re(), i = [];
|
|
2817
2840
|
function n(s) {
|
|
2818
2841
|
switch (s) {
|
|
2819
2842
|
case "coordsys":
|
|
@@ -2824,57 +2847,57 @@ const Ro = J(
|
|
|
2824
2847
|
return s;
|
|
2825
2848
|
}
|
|
2826
2849
|
}
|
|
2827
|
-
return
|
|
2850
|
+
return t.showCoordSystemSelect && i.push(
|
|
2828
2851
|
/* @__PURE__ */ a(
|
|
2829
2852
|
it,
|
|
2830
2853
|
{
|
|
2831
2854
|
labelId: `jogging-coord-select-${r}`,
|
|
2832
2855
|
labelValue: o("Jogging.CoordinateSystem.hlb"),
|
|
2833
|
-
value:
|
|
2856
|
+
value: t.selectedCoordSystemId,
|
|
2834
2857
|
size: "small",
|
|
2835
2858
|
variant: "filled",
|
|
2836
2859
|
displayEmpty: !0,
|
|
2837
|
-
onChange: (s) =>
|
|
2838
|
-
disabled:
|
|
2839
|
-
children:
|
|
2860
|
+
onChange: (s) => t.setSelectedCoordSystemId(s.target.value),
|
|
2861
|
+
disabled: t.isLocked,
|
|
2862
|
+
children: t.coordSystems.map((s) => /* @__PURE__ */ a(Y, { value: s.coordinate_system, children: s.name && t.coordSystemCountByName[s.name] > 1 ? `${s.name} / ${s.coordinate_system}` : s.name || s.coordinate_system }, s.coordinate_system))
|
|
2840
2863
|
},
|
|
2841
2864
|
"coord"
|
|
2842
2865
|
)
|
|
2843
|
-
),
|
|
2866
|
+
), t.showTcpSelect && i.push(
|
|
2844
2867
|
/* @__PURE__ */ a(
|
|
2845
2868
|
it,
|
|
2846
2869
|
{
|
|
2847
2870
|
labelId: `jogging-tcp-select-${r}`,
|
|
2848
2871
|
labelValue: "TCP",
|
|
2849
|
-
value:
|
|
2872
|
+
value: t.selectedTcpId,
|
|
2850
2873
|
size: "small",
|
|
2851
2874
|
variant: "filled",
|
|
2852
|
-
displayEmpty:
|
|
2875
|
+
displayEmpty: t.tcpChangeInProgress,
|
|
2853
2876
|
onChange: (s) => {
|
|
2854
|
-
|
|
2877
|
+
t.requestTcpChange(s.target.value).catch((l) => {
|
|
2855
2878
|
console.error("Failed to change TCP:", l);
|
|
2856
2879
|
});
|
|
2857
2880
|
},
|
|
2858
|
-
disabled:
|
|
2859
|
-
endAdornment:
|
|
2860
|
-
children:
|
|
2881
|
+
disabled: t.isLocked || t.tcpChangeInProgress,
|
|
2882
|
+
endAdornment: t.tcpChangeInProgress ? /* @__PURE__ */ a($e, { position: "end", children: /* @__PURE__ */ a(Wt, { size: 16 }) }) : void 0,
|
|
2883
|
+
children: t.tcps.map((s) => /* @__PURE__ */ a(Y, { value: s.id, children: s.id }, s.id))
|
|
2861
2884
|
},
|
|
2862
2885
|
"tcp"
|
|
2863
2886
|
)
|
|
2864
|
-
),
|
|
2887
|
+
), t.showOrientationSelect && i.push(
|
|
2865
2888
|
/* @__PURE__ */ a(
|
|
2866
2889
|
it,
|
|
2867
2890
|
{
|
|
2868
2891
|
labelValue: o("Jogging.Cartesian.Orientation.lb"),
|
|
2869
2892
|
labelId: `orientation-select-${r}`,
|
|
2870
|
-
value:
|
|
2871
|
-
onChange: (s) =>
|
|
2872
|
-
disabled:
|
|
2873
|
-
children:
|
|
2893
|
+
value: t.selectedOrientation,
|
|
2894
|
+
onChange: (s) => t.setSelectedOrientation(s.target.value),
|
|
2895
|
+
disabled: t.isLocked,
|
|
2896
|
+
children: jo.map((s) => /* @__PURE__ */ a(Y, { value: s, children: n(s) }, s))
|
|
2874
2897
|
},
|
|
2875
2898
|
"orientation"
|
|
2876
2899
|
)
|
|
2877
|
-
),
|
|
2900
|
+
), t.showIncrementSelect && i.push(
|
|
2878
2901
|
/* @__PURE__ */ S(
|
|
2879
2902
|
it,
|
|
2880
2903
|
{
|
|
@@ -2882,14 +2905,14 @@ const Ro = J(
|
|
|
2882
2905
|
labelId: `jogging-increment-select-${r}`,
|
|
2883
2906
|
size: "small",
|
|
2884
2907
|
variant: "filled",
|
|
2885
|
-
value: ((c =
|
|
2886
|
-
onChange: (s) =>
|
|
2908
|
+
value: ((c = t.activeDiscreteIncrement) == null ? void 0 : c.id) || "continuous",
|
|
2909
|
+
onChange: (s) => t.setSelectedIncrementId(
|
|
2887
2910
|
s.target.value
|
|
2888
2911
|
),
|
|
2889
|
-
disabled:
|
|
2912
|
+
disabled: t.isLocked,
|
|
2890
2913
|
children: [
|
|
2891
2914
|
/* @__PURE__ */ a(Y, { value: "continuous", children: o("Jogging.Increment.Continuous.dd") }, "continuous"),
|
|
2892
|
-
|
|
2915
|
+
t.selectedOrientation === "tool" ? null : t.discreteIncrementOptions.map((s) => /* @__PURE__ */ a(Y, { value: s.id, children: e ? `${s.degrees}°` : `${s.mm}mm` }, s.id))
|
|
2893
2916
|
]
|
|
2894
2917
|
},
|
|
2895
2918
|
"increment"
|
|
@@ -2920,11 +2943,11 @@ const Ro = J(
|
|
|
2920
2943
|
}
|
|
2921
2944
|
);
|
|
2922
2945
|
}
|
|
2923
|
-
),
|
|
2924
|
-
var
|
|
2946
|
+
), Po = ut(Ge)(({ theme: t }) => {
|
|
2947
|
+
var e;
|
|
2925
2948
|
return {
|
|
2926
2949
|
"&.MuiToggleButtonGroup-root": {
|
|
2927
|
-
background: (
|
|
2950
|
+
background: (e = t.palette.backgroundPaperElevation) == null ? void 0 : e[8],
|
|
2928
2951
|
borderRadius: "8px",
|
|
2929
2952
|
padding: "4px",
|
|
2930
2953
|
gap: "4px",
|
|
@@ -2942,14 +2965,14 @@ const Ro = J(
|
|
|
2942
2965
|
}
|
|
2943
2966
|
}
|
|
2944
2967
|
};
|
|
2945
|
-
}),
|
|
2968
|
+
}), _o = J((t) => {
|
|
2946
2969
|
var n, c, s;
|
|
2947
|
-
const
|
|
2970
|
+
const e = B(), { store: o } = t, { t: r } = z();
|
|
2948
2971
|
function i(l, d) {
|
|
2949
|
-
d ===
|
|
2972
|
+
d === t.velocity || !Ue(d) || t.onVelocityChange(d, t.useDegree);
|
|
2950
2973
|
}
|
|
2951
2974
|
return /* @__PURE__ */ S(
|
|
2952
|
-
|
|
2975
|
+
_,
|
|
2953
2976
|
{
|
|
2954
2977
|
direction: "row",
|
|
2955
2978
|
gap: 2,
|
|
@@ -2961,7 +2984,7 @@ const Ro = J(
|
|
|
2961
2984
|
R,
|
|
2962
2985
|
{
|
|
2963
2986
|
sx: {
|
|
2964
|
-
color: (s = (c = (n =
|
|
2987
|
+
color: (s = (c = (n = e.componentsExt) == null ? void 0 : n.JoggingPanel) == null ? void 0 : c.VelocitySlider) == null ? void 0 : s.sliderLegendColor,
|
|
2965
2988
|
fontSize: "14px"
|
|
2966
2989
|
},
|
|
2967
2990
|
children: r("Jogging.Velocity.bt")
|
|
@@ -2970,13 +2993,13 @@ const Ro = J(
|
|
|
2970
2993
|
/* @__PURE__ */ a(
|
|
2971
2994
|
Gt,
|
|
2972
2995
|
{
|
|
2973
|
-
value:
|
|
2996
|
+
value: t.velocity,
|
|
2974
2997
|
color: "secondary",
|
|
2975
2998
|
onChange: i,
|
|
2976
|
-
min:
|
|
2977
|
-
max:
|
|
2999
|
+
min: t.min,
|
|
3000
|
+
max: t.max,
|
|
2978
3001
|
"aria-labelledby": "input-slider",
|
|
2979
|
-
disabled:
|
|
3002
|
+
disabled: t.disabled,
|
|
2980
3003
|
sx: {
|
|
2981
3004
|
"& .MuiSlider-valueLabelOpen": {
|
|
2982
3005
|
zIndex: 100,
|
|
@@ -2986,16 +3009,16 @@ const Ro = J(
|
|
|
2986
3009
|
}
|
|
2987
3010
|
}
|
|
2988
3011
|
),
|
|
2989
|
-
o.showVelocitySliderLabel && (
|
|
3012
|
+
o.showVelocitySliderLabel && (t.renderValue ? t.renderValue(t.velocity) : /* @__PURE__ */ a(Zt, { value: t.velocity.toString() }))
|
|
2990
3013
|
]
|
|
2991
3014
|
}
|
|
2992
3015
|
);
|
|
2993
3016
|
});
|
|
2994
|
-
function
|
|
3017
|
+
function Zt({ value: t, sx: e }) {
|
|
2995
3018
|
var r;
|
|
2996
3019
|
const o = B();
|
|
2997
3020
|
return /* @__PURE__ */ a(
|
|
2998
|
-
|
|
3021
|
+
_,
|
|
2999
3022
|
{
|
|
3000
3023
|
direction: "row",
|
|
3001
3024
|
justifyContent: "center",
|
|
@@ -3006,7 +3029,7 @@ function Yt({ value: e, sx: t }) {
|
|
|
3006
3029
|
background: (r = o.palette.backgroundPaperElevation) == null ? void 0 : r[8],
|
|
3007
3030
|
borderRadius: "10px",
|
|
3008
3031
|
minWidth: "111px",
|
|
3009
|
-
...
|
|
3032
|
+
...e
|
|
3010
3033
|
},
|
|
3011
3034
|
children: /* @__PURE__ */ a(
|
|
3012
3035
|
R,
|
|
@@ -3019,32 +3042,32 @@ function Yt({ value: e, sx: t }) {
|
|
|
3019
3042
|
color: o.palette.text.primary,
|
|
3020
3043
|
whiteSpace: "nowrap"
|
|
3021
3044
|
},
|
|
3022
|
-
children:
|
|
3045
|
+
children: t
|
|
3023
3046
|
}
|
|
3024
3047
|
)
|
|
3025
3048
|
}
|
|
3026
3049
|
);
|
|
3027
3050
|
}
|
|
3028
|
-
const
|
|
3029
|
-
({ store:
|
|
3051
|
+
const Qt = J(
|
|
3052
|
+
({ store: t, useDegree: e }) => {
|
|
3030
3053
|
const { t: o } = z();
|
|
3031
3054
|
function r(i, n) {
|
|
3032
3055
|
return n ? `ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: i })}` : `v = ${o("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: i })}`;
|
|
3033
3056
|
}
|
|
3034
3057
|
return /* @__PURE__ */ a(
|
|
3035
|
-
|
|
3058
|
+
_o,
|
|
3036
3059
|
{
|
|
3037
|
-
store:
|
|
3038
|
-
velocity:
|
|
3039
|
-
min:
|
|
3040
|
-
max:
|
|
3041
|
-
onVelocityChange:
|
|
3042
|
-
useDegree:
|
|
3043
|
-
disabled:
|
|
3060
|
+
store: t,
|
|
3061
|
+
velocity: t.velocityInDisplayUnits(e),
|
|
3062
|
+
min: t.minVelocityInDisplayUnits(e),
|
|
3063
|
+
max: t.maxVelocityInDisplayUnits(e),
|
|
3064
|
+
onVelocityChange: t.setVelocityFromSlider,
|
|
3065
|
+
useDegree: e,
|
|
3066
|
+
disabled: t.isLocked,
|
|
3044
3067
|
renderValue: (i) => /* @__PURE__ */ a(
|
|
3045
|
-
|
|
3068
|
+
Zt,
|
|
3046
3069
|
{
|
|
3047
|
-
value: r(i,
|
|
3070
|
+
value: r(i, e),
|
|
3048
3071
|
sx: {
|
|
3049
3072
|
minWidth: "111px",
|
|
3050
3073
|
span: {
|
|
@@ -3056,9 +3079,9 @@ const Zt = J(
|
|
|
3056
3079
|
}
|
|
3057
3080
|
);
|
|
3058
3081
|
}
|
|
3059
|
-
),
|
|
3082
|
+
), Xt = J(({ store: t }) => {
|
|
3060
3083
|
var i, n, c;
|
|
3061
|
-
const { t } = z(), o = B(), r = ((c = (n = (i =
|
|
3084
|
+
const { t: e } = z(), o = B(), r = ((c = (n = (i = t.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : i.details) == null ? void 0 : n.state) == null ? void 0 : c.kind) ?? "KIND_UNKNOWN";
|
|
3062
3085
|
return /* @__PURE__ */ S(
|
|
3063
3086
|
w,
|
|
3064
3087
|
{
|
|
@@ -3078,7 +3101,7 @@ const Zt = J(
|
|
|
3078
3101
|
// Smaller than body2
|
|
3079
3102
|
lineHeight: 1.2
|
|
3080
3103
|
},
|
|
3081
|
-
children:
|
|
3104
|
+
children: e("Jogging.StreamStateSection.lb")
|
|
3082
3105
|
}
|
|
3083
3106
|
),
|
|
3084
3107
|
/* @__PURE__ */ a(
|
|
@@ -3091,65 +3114,65 @@ const Zt = J(
|
|
|
3091
3114
|
lineHeight: 1.2
|
|
3092
3115
|
},
|
|
3093
3116
|
"data-testid": r,
|
|
3094
|
-
children:
|
|
3117
|
+
children: e(`Jogging.StreamStateSection.${r}.lb`)
|
|
3095
3118
|
}
|
|
3096
3119
|
)
|
|
3097
3120
|
]
|
|
3098
3121
|
}
|
|
3099
3122
|
);
|
|
3100
|
-
}),
|
|
3123
|
+
}), Oo = J(
|
|
3101
3124
|
({
|
|
3102
|
-
store:
|
|
3103
|
-
children:
|
|
3125
|
+
store: t,
|
|
3126
|
+
children: e
|
|
3104
3127
|
}) => {
|
|
3105
3128
|
const { t: o } = z(), r = B();
|
|
3106
3129
|
function i(p, g) {
|
|
3107
|
-
(g === "translate" || g === "rotate") &&
|
|
3130
|
+
(g === "translate" || g === "rotate") && t.setSelectedCartesianMotionType(g);
|
|
3108
3131
|
}
|
|
3109
3132
|
async function n(p, g) {
|
|
3110
|
-
const f = await
|
|
3111
|
-
y && await
|
|
3133
|
+
const f = await t.activate(), y = f.motionStream.rapidlyChangingMotionState.tcp_pose, b = f.motionStream.rapidlyChangingMotionState.joint_position;
|
|
3134
|
+
y && await t.withMotionLock(async () => {
|
|
3112
3135
|
try {
|
|
3113
|
-
|
|
3136
|
+
t.setCurrentIncrementJog({
|
|
3114
3137
|
axis: p.axis,
|
|
3115
3138
|
direction: p.direction
|
|
3116
|
-
}), await
|
|
3139
|
+
}), await t.jogger.runIncrementalCartesianMotion({
|
|
3117
3140
|
currentTcpPose: y,
|
|
3118
3141
|
currentJoints: b,
|
|
3119
|
-
coordSystemId:
|
|
3120
|
-
velocityInRelevantUnits:
|
|
3142
|
+
coordSystemId: t.activeCoordSystemId,
|
|
3143
|
+
velocityInRelevantUnits: t.selectedCartesianMotionType === "translate" ? t.translationVelocityMmPerSec : t.rotationVelocityRadsPerSec,
|
|
3121
3144
|
axis: p.axis,
|
|
3122
3145
|
direction: p.direction,
|
|
3123
|
-
motion:
|
|
3146
|
+
motion: t.selectedCartesianMotionType === "translate" ? {
|
|
3124
3147
|
type: "translate",
|
|
3125
3148
|
distanceMm: g.mm
|
|
3126
3149
|
} : {
|
|
3127
3150
|
type: "rotate",
|
|
3128
|
-
distanceRads:
|
|
3151
|
+
distanceRads: ke(g.degrees)
|
|
3129
3152
|
}
|
|
3130
3153
|
});
|
|
3131
3154
|
} finally {
|
|
3132
|
-
|
|
3155
|
+
t.setCurrentIncrementJog(null), await t.deactivate();
|
|
3133
3156
|
}
|
|
3134
3157
|
});
|
|
3135
3158
|
}
|
|
3136
3159
|
async function c(p) {
|
|
3137
|
-
if (!
|
|
3138
|
-
if (await
|
|
3139
|
-
return n(p,
|
|
3140
|
-
p.motionType === "translate" ? await
|
|
3160
|
+
if (!t.isLocked) {
|
|
3161
|
+
if (await t.activate(), t.activeDiscreteIncrement)
|
|
3162
|
+
return n(p, t.activeDiscreteIncrement);
|
|
3163
|
+
p.motionType === "translate" ? await t.jogger.translateTCP({
|
|
3141
3164
|
axis: p.axis,
|
|
3142
3165
|
direction: p.direction,
|
|
3143
|
-
velocityMmPerSec:
|
|
3144
|
-
}) : await
|
|
3166
|
+
velocityMmPerSec: t.translationVelocityMmPerSec
|
|
3167
|
+
}) : await t.jogger.rotateTCP({
|
|
3145
3168
|
axis: p.axis,
|
|
3146
3169
|
direction: p.direction,
|
|
3147
|
-
velocityRadsPerSec:
|
|
3170
|
+
velocityRadsPerSec: t.rotationVelocityRadsPerSec
|
|
3148
3171
|
});
|
|
3149
3172
|
}
|
|
3150
3173
|
}
|
|
3151
3174
|
async function s() {
|
|
3152
|
-
|
|
3175
|
+
t.isLocked || t.activeDiscreteIncrement || await t.deactivate();
|
|
3153
3176
|
}
|
|
3154
3177
|
function l(p, g, f) {
|
|
3155
3178
|
var b, h, v;
|
|
@@ -3160,18 +3183,18 @@ const Zt = J(
|
|
|
3160
3183
|
const d = [
|
|
3161
3184
|
{
|
|
3162
3185
|
id: "x",
|
|
3163
|
-
icon: /* @__PURE__ */ a(
|
|
3164
|
-
colors: l("X",
|
|
3186
|
+
icon: /* @__PURE__ */ a(De, {}),
|
|
3187
|
+
colors: l("X", t.selectedCartesianMotionType, r)
|
|
3165
3188
|
},
|
|
3166
3189
|
{
|
|
3167
3190
|
id: "y",
|
|
3168
|
-
icon: /* @__PURE__ */ a(
|
|
3169
|
-
colors: l("Y",
|
|
3191
|
+
icon: /* @__PURE__ */ a(Ae, {}),
|
|
3192
|
+
colors: l("Y", t.selectedCartesianMotionType, r)
|
|
3170
3193
|
},
|
|
3171
3194
|
{
|
|
3172
3195
|
id: "z",
|
|
3173
|
-
icon: /* @__PURE__ */ a(
|
|
3174
|
-
colors: l("Z",
|
|
3196
|
+
icon: /* @__PURE__ */ a(Je, {}),
|
|
3197
|
+
colors: l("Z", t.selectedCartesianMotionType, r)
|
|
3175
3198
|
}
|
|
3176
3199
|
];
|
|
3177
3200
|
function m(p) {
|
|
@@ -3183,7 +3206,7 @@ const Zt = J(
|
|
|
3183
3206
|
});
|
|
3184
3207
|
}
|
|
3185
3208
|
return /* @__PURE__ */ S(
|
|
3186
|
-
|
|
3209
|
+
_,
|
|
3187
3210
|
{
|
|
3188
3211
|
"data-testid": "jogging-cartesian-tab",
|
|
3189
3212
|
"aria-label": "jogging-cartesian-tab",
|
|
@@ -3191,25 +3214,25 @@ const Zt = J(
|
|
|
3191
3214
|
gap: 2,
|
|
3192
3215
|
sx: { padding: "18px 24px" },
|
|
3193
3216
|
children: [
|
|
3194
|
-
/* @__PURE__ */ S(
|
|
3217
|
+
/* @__PURE__ */ S(_, { gap: 2, children: [
|
|
3195
3218
|
/* @__PURE__ */ a(
|
|
3196
|
-
|
|
3219
|
+
Eo,
|
|
3197
3220
|
{
|
|
3198
|
-
store:
|
|
3199
|
-
useDegree:
|
|
3221
|
+
store: t,
|
|
3222
|
+
useDegree: t.selectedCartesianMotionType === "rotate"
|
|
3200
3223
|
}
|
|
3201
3224
|
),
|
|
3202
3225
|
/* @__PURE__ */ a(
|
|
3203
|
-
|
|
3226
|
+
Qt,
|
|
3204
3227
|
{
|
|
3205
|
-
store:
|
|
3206
|
-
useDegree:
|
|
3228
|
+
store: t,
|
|
3229
|
+
useDegree: t.selectedCartesianMotionType === "rotate"
|
|
3207
3230
|
}
|
|
3208
3231
|
),
|
|
3209
3232
|
/* @__PURE__ */ a(U, {})
|
|
3210
3233
|
] }),
|
|
3211
3234
|
/* @__PURE__ */ a(
|
|
3212
|
-
|
|
3235
|
+
_,
|
|
3213
3236
|
{
|
|
3214
3237
|
marginLeft: "auto",
|
|
3215
3238
|
marginRight: "auto",
|
|
@@ -3217,7 +3240,7 @@ const Zt = J(
|
|
|
3217
3240
|
justifyContent: "center",
|
|
3218
3241
|
sx: { flexGrow: "1" },
|
|
3219
3242
|
children: /* @__PURE__ */ S(
|
|
3220
|
-
|
|
3243
|
+
_,
|
|
3221
3244
|
{
|
|
3222
3245
|
alignItems: "center",
|
|
3223
3246
|
justifyContent: "center",
|
|
@@ -3225,9 +3248,9 @@ const Zt = J(
|
|
|
3225
3248
|
sx: { flexGrow: 1 },
|
|
3226
3249
|
children: [
|
|
3227
3250
|
/* @__PURE__ */ S(
|
|
3228
|
-
|
|
3251
|
+
Po,
|
|
3229
3252
|
{
|
|
3230
|
-
value:
|
|
3253
|
+
value: t.selectedCartesianMotionType,
|
|
3231
3254
|
onChange: i,
|
|
3232
3255
|
exclusive: !0,
|
|
3233
3256
|
"aria-label": o("Jogging.Cartesian.MotionType.lb"),
|
|
@@ -3238,16 +3261,16 @@ const Zt = J(
|
|
|
3238
3261
|
]
|
|
3239
3262
|
}
|
|
3240
3263
|
),
|
|
3241
|
-
|
|
3264
|
+
t.selectedCartesianMotionType === "translate" && d.map((p) => {
|
|
3242
3265
|
var g, f;
|
|
3243
3266
|
return /* @__PURE__ */ a(
|
|
3244
|
-
|
|
3267
|
+
_t,
|
|
3245
3268
|
{
|
|
3246
3269
|
"data-testid": `jogging-cartesian-axis-control-${p.id}`,
|
|
3247
3270
|
"aria-label": `jogging-cartesian-axis-control-${p.id}`,
|
|
3248
3271
|
colors: p.colors,
|
|
3249
|
-
disabled:
|
|
3250
|
-
activeJoggingDirection: ((g =
|
|
3272
|
+
disabled: t.isLocked,
|
|
3273
|
+
activeJoggingDirection: ((g = t.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? t.incrementJogInProgress.direction : void 0,
|
|
3251
3274
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3252
3275
|
p.icon,
|
|
3253
3276
|
/* @__PURE__ */ a(
|
|
@@ -3264,7 +3287,7 @@ const Zt = J(
|
|
|
3264
3287
|
getDisplayedValue: () => {
|
|
3265
3288
|
var y, b;
|
|
3266
3289
|
return m(
|
|
3267
|
-
((b = (y =
|
|
3290
|
+
((b = (y = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : b[tt[p.id]]) || 0
|
|
3268
3291
|
);
|
|
3269
3292
|
},
|
|
3270
3293
|
startJogging: (y) => c({
|
|
@@ -3277,18 +3300,18 @@ const Zt = J(
|
|
|
3277
3300
|
p.id
|
|
3278
3301
|
);
|
|
3279
3302
|
}),
|
|
3280
|
-
|
|
3303
|
+
t.selectedCartesianMotionType === "rotate" && d.map((p) => {
|
|
3281
3304
|
var g, f;
|
|
3282
3305
|
return /* @__PURE__ */ a(
|
|
3283
|
-
|
|
3306
|
+
_t,
|
|
3284
3307
|
{
|
|
3285
3308
|
"data-testid": `jogging-cartesian-axis-control-${p.id}`,
|
|
3286
3309
|
"aria-label": `jogging-cartesian-axis-control-${p.id}`,
|
|
3287
3310
|
colors: p.colors,
|
|
3288
|
-
disabled:
|
|
3289
|
-
activeJoggingDirection: ((g =
|
|
3311
|
+
disabled: t.isLocked,
|
|
3312
|
+
activeJoggingDirection: ((g = t.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? t.incrementJogInProgress.direction : void 0,
|
|
3290
3313
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3291
|
-
/* @__PURE__ */ a(
|
|
3314
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
3292
3315
|
/* @__PURE__ */ a(
|
|
3293
3316
|
R,
|
|
3294
3317
|
{
|
|
@@ -3303,7 +3326,7 @@ const Zt = J(
|
|
|
3303
3326
|
getDisplayedValue: () => {
|
|
3304
3327
|
var y, b;
|
|
3305
3328
|
return u(
|
|
3306
|
-
((b = (y =
|
|
3329
|
+
((b = (y = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : b[tt[p.id]]) || 0
|
|
3307
3330
|
);
|
|
3308
3331
|
},
|
|
3309
3332
|
startJogging: (y) => c({
|
|
@@ -3321,31 +3344,31 @@ const Zt = J(
|
|
|
3321
3344
|
)
|
|
3322
3345
|
}
|
|
3323
3346
|
),
|
|
3324
|
-
/* @__PURE__ */ a(
|
|
3347
|
+
/* @__PURE__ */ a(Yt, { store: t }),
|
|
3325
3348
|
/* @__PURE__ */ a(U, {}),
|
|
3326
|
-
/* @__PURE__ */ a(
|
|
3327
|
-
|
|
3328
|
-
|
|
3349
|
+
/* @__PURE__ */ a(Xt, { store: t }),
|
|
3350
|
+
e && /* @__PURE__ */ a(U, {}),
|
|
3351
|
+
e
|
|
3329
3352
|
]
|
|
3330
3353
|
}
|
|
3331
3354
|
);
|
|
3332
3355
|
}
|
|
3333
|
-
),
|
|
3334
|
-
({ store:
|
|
3356
|
+
), Do = J(
|
|
3357
|
+
({ store: t, children: e }) => {
|
|
3335
3358
|
const o = B();
|
|
3336
3359
|
async function r(n) {
|
|
3337
|
-
await
|
|
3360
|
+
await t.activate(), await t.jogger.rotateJoints({
|
|
3338
3361
|
joint: n.joint,
|
|
3339
3362
|
direction: n.direction,
|
|
3340
|
-
velocityUnit:
|
|
3341
|
-
velocityValue:
|
|
3363
|
+
velocityUnit: t.jointType === G.PrismaticJoint ? "mm/s" : "rad/s",
|
|
3364
|
+
velocityValue: t.jointType === G.PrismaticJoint ? t.translationVelocityMmPerSec : t.rotationVelocityRadsPerSec
|
|
3342
3365
|
});
|
|
3343
3366
|
}
|
|
3344
3367
|
async function i() {
|
|
3345
|
-
await
|
|
3368
|
+
await t.jogger.stop(), await t.deactivate();
|
|
3346
3369
|
}
|
|
3347
3370
|
return /* @__PURE__ */ S(
|
|
3348
|
-
|
|
3371
|
+
_,
|
|
3349
3372
|
{
|
|
3350
3373
|
"data-testid": "jogging-joint-tab",
|
|
3351
3374
|
"aria-label": "jogging-joint-tab",
|
|
@@ -3354,31 +3377,31 @@ const Zt = J(
|
|
|
3354
3377
|
sx: { padding: "18px 24px" },
|
|
3355
3378
|
children: [
|
|
3356
3379
|
/* @__PURE__ */ a(
|
|
3357
|
-
|
|
3380
|
+
Qt,
|
|
3358
3381
|
{
|
|
3359
|
-
store:
|
|
3360
|
-
useDegree:
|
|
3382
|
+
store: t,
|
|
3383
|
+
useDegree: t.jointType === G.RevoluteJoint
|
|
3361
3384
|
}
|
|
3362
3385
|
),
|
|
3363
3386
|
/* @__PURE__ */ a(U, {}),
|
|
3364
3387
|
/* @__PURE__ */ a(
|
|
3365
|
-
|
|
3388
|
+
_,
|
|
3366
3389
|
{
|
|
3367
3390
|
justifyContent: "center",
|
|
3368
3391
|
alignItems: "stretch",
|
|
3369
3392
|
sx: { flexGrow: "1" },
|
|
3370
3393
|
children: /* @__PURE__ */ a(
|
|
3371
|
-
|
|
3394
|
+
_,
|
|
3372
3395
|
{
|
|
3373
3396
|
"data-testid": "jogging-joint-value-controls-wrapper",
|
|
3374
3397
|
"aria-label": "jogging-joint-value-controls-wrapper",
|
|
3375
3398
|
alignItems: "center",
|
|
3376
3399
|
gap: "24px",
|
|
3377
|
-
children:
|
|
3400
|
+
children: t.jogger.motionStream.joints.map((n) => {
|
|
3378
3401
|
var s, l, d;
|
|
3379
|
-
const c = (d = (l = (s =
|
|
3402
|
+
const c = (d = (l = (s = t.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : d.position;
|
|
3380
3403
|
return /* @__PURE__ */ S(
|
|
3381
|
-
|
|
3404
|
+
_,
|
|
3382
3405
|
{
|
|
3383
3406
|
"data-testid": `jogging-joint-value-control-${n.index}`,
|
|
3384
3407
|
"aria-label": `jogging-joint-value-control-${n.index}`,
|
|
@@ -3388,22 +3411,22 @@ const Zt = J(
|
|
|
3388
3411
|
spacing: 1.5,
|
|
3389
3412
|
width: "100%",
|
|
3390
3413
|
children: [
|
|
3391
|
-
|
|
3414
|
+
t.showJointsLegend && /* @__PURE__ */ a(
|
|
3392
3415
|
R,
|
|
3393
3416
|
{
|
|
3394
|
-
color:
|
|
3417
|
+
color: t.isLocked ? o.palette.text.disabled : o.palette.text.secondary,
|
|
3395
3418
|
children: `G${n.index + 1}`
|
|
3396
3419
|
}
|
|
3397
3420
|
),
|
|
3398
3421
|
/* @__PURE__ */ a(
|
|
3399
|
-
|
|
3422
|
+
So,
|
|
3400
3423
|
{
|
|
3401
|
-
disabled:
|
|
3424
|
+
disabled: t.isLocked,
|
|
3402
3425
|
lowerLimit: c == null ? void 0 : c.lower_limit,
|
|
3403
3426
|
upperLimit: c == null ? void 0 : c.upper_limit,
|
|
3404
|
-
useDegree:
|
|
3427
|
+
useDegree: t.jointType === G.RevoluteJoint,
|
|
3405
3428
|
getValue: () => {
|
|
3406
|
-
const m =
|
|
3429
|
+
const m = t.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
|
|
3407
3430
|
return m !== void 0 ? m : void 0;
|
|
3408
3431
|
},
|
|
3409
3432
|
startJogging: (m) => r({
|
|
@@ -3422,18 +3445,18 @@ const Zt = J(
|
|
|
3422
3445
|
)
|
|
3423
3446
|
}
|
|
3424
3447
|
),
|
|
3425
|
-
/* @__PURE__ */ a(
|
|
3448
|
+
/* @__PURE__ */ a(Yt, { store: t }),
|
|
3426
3449
|
/* @__PURE__ */ a(U, {}),
|
|
3427
|
-
/* @__PURE__ */ a(
|
|
3428
|
-
|
|
3429
|
-
|
|
3450
|
+
/* @__PURE__ */ a(Xt, { store: t }),
|
|
3451
|
+
e && /* @__PURE__ */ a(U, {}),
|
|
3452
|
+
e
|
|
3430
3453
|
]
|
|
3431
3454
|
}
|
|
3432
3455
|
);
|
|
3433
3456
|
}
|
|
3434
|
-
),
|
|
3435
|
-
J((
|
|
3436
|
-
const
|
|
3457
|
+
), hi = $(
|
|
3458
|
+
J((t) => {
|
|
3459
|
+
const e = Te(t.nova) ? new Se({ instanceUrl: t.nova }) : t.nova, o = Lt(() => ({
|
|
3437
3460
|
joggingStore: null,
|
|
3438
3461
|
loadingError: null
|
|
3439
3462
|
}));
|
|
@@ -3442,32 +3465,32 @@ const Zt = J(
|
|
|
3442
3465
|
o.loadingError = null, o.joggingStore = null;
|
|
3443
3466
|
});
|
|
3444
3467
|
try {
|
|
3445
|
-
let i =
|
|
3468
|
+
let i = t.store;
|
|
3446
3469
|
if (!i) {
|
|
3447
3470
|
const n = await ft.open(
|
|
3448
|
-
|
|
3449
|
-
|
|
3471
|
+
e,
|
|
3472
|
+
t.motionGroupId,
|
|
3450
3473
|
{
|
|
3451
|
-
cellId:
|
|
3474
|
+
cellId: t.cellId
|
|
3452
3475
|
}
|
|
3453
3476
|
);
|
|
3454
3477
|
i = await bt.loadFor(n);
|
|
3455
3478
|
}
|
|
3456
3479
|
D(() => {
|
|
3457
3480
|
o.joggingStore = i;
|
|
3458
|
-
}),
|
|
3481
|
+
}), t.onSetup && t.onSetup(i);
|
|
3459
3482
|
} catch (i) {
|
|
3460
3483
|
o.loadingError = i;
|
|
3461
3484
|
}
|
|
3462
3485
|
}
|
|
3463
|
-
return F(() => (r(),
|
|
3486
|
+
return F(() => (r(), t.store ? () => null : () => {
|
|
3464
3487
|
var i;
|
|
3465
3488
|
(i = o.joggingStore) == null || i.dispose();
|
|
3466
|
-
}), [
|
|
3489
|
+
}), [t.store, t.nova, t.motionGroupId, t.cellId]), F(() => {
|
|
3467
3490
|
const i = o.joggingStore;
|
|
3468
|
-
i && (
|
|
3469
|
-
}, [o.joggingStore,
|
|
3470
|
-
|
|
3491
|
+
i && (t.locked ? i.lock("external") : i.unlock("external"));
|
|
3492
|
+
}, [o.joggingStore, t.locked]), /* @__PURE__ */ a(
|
|
3493
|
+
_,
|
|
3471
3494
|
{
|
|
3472
3495
|
"data-testid": "jogging-panel",
|
|
3473
3496
|
"aria-label": "jogging-panel",
|
|
@@ -3475,41 +3498,41 @@ const Zt = J(
|
|
|
3475
3498
|
maxWidth: "460px",
|
|
3476
3499
|
minWidth: "320px",
|
|
3477
3500
|
position: "relative",
|
|
3478
|
-
...
|
|
3501
|
+
...t.sx
|
|
3479
3502
|
},
|
|
3480
|
-
children: o.joggingStore ? /* @__PURE__ */ a(
|
|
3503
|
+
children: o.joggingStore ? /* @__PURE__ */ a(Ao, { store: o.joggingStore, children: t.children }) : /* @__PURE__ */ a(To, { message: "Loading jogging", error: o.loadingError })
|
|
3481
3504
|
}
|
|
3482
3505
|
);
|
|
3483
3506
|
})
|
|
3484
|
-
),
|
|
3507
|
+
), Ao = J(
|
|
3485
3508
|
({
|
|
3486
|
-
store:
|
|
3487
|
-
children:
|
|
3509
|
+
store: t,
|
|
3510
|
+
children: e
|
|
3488
3511
|
}) => {
|
|
3489
3512
|
const { t: o } = z();
|
|
3490
3513
|
function r() {
|
|
3491
|
-
if (
|
|
3492
|
-
return /* @__PURE__ */ a(
|
|
3493
|
-
if (
|
|
3494
|
-
return /* @__PURE__ */ a(
|
|
3514
|
+
if (t.currentTab.id === "cartesian")
|
|
3515
|
+
return /* @__PURE__ */ a(Oo, { store: t, children: e });
|
|
3516
|
+
if (t.currentTab.id === "joint")
|
|
3517
|
+
return /* @__PURE__ */ a(Do, { store: t, children: e });
|
|
3495
3518
|
}
|
|
3496
|
-
return /* @__PURE__ */ S(
|
|
3519
|
+
return /* @__PURE__ */ S(_, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
|
|
3497
3520
|
/* @__PURE__ */ a(
|
|
3498
3521
|
Vt,
|
|
3499
3522
|
{
|
|
3500
3523
|
"data-testid": "jogging-tabs",
|
|
3501
3524
|
"aria-label": "jogging-tabs",
|
|
3502
|
-
value:
|
|
3503
|
-
onChange:
|
|
3525
|
+
value: t.tabIndex,
|
|
3526
|
+
onChange: t.onTabChange,
|
|
3504
3527
|
variant: "fullWidth",
|
|
3505
|
-
children:
|
|
3506
|
-
const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ a(
|
|
3528
|
+
children: t.tabs.map((i) => {
|
|
3529
|
+
const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ a(xe, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ a(ye, { fontSize: "small", sx: { mr: 1 } });
|
|
3507
3530
|
return /* @__PURE__ */ a(
|
|
3508
3531
|
zt,
|
|
3509
3532
|
{
|
|
3510
3533
|
"data-testid": `jogging-tab-${i.id}`,
|
|
3511
3534
|
"aria-label": `jogging-tab-${i.id}`,
|
|
3512
|
-
label:
|
|
3535
|
+
label: t.showTabIcons ? /* @__PURE__ */ S(_, { direction: "row", alignItems: "center", children: [
|
|
3513
3536
|
c,
|
|
3514
3537
|
n
|
|
3515
3538
|
] }) : n,
|
|
@@ -3522,7 +3545,7 @@ const Zt = J(
|
|
|
3522
3545
|
}
|
|
3523
3546
|
),
|
|
3524
3547
|
/* @__PURE__ */ a(
|
|
3525
|
-
|
|
3548
|
+
_,
|
|
3526
3549
|
{
|
|
3527
3550
|
flexGrow: 1,
|
|
3528
3551
|
position: "relative",
|
|
@@ -3530,17 +3553,17 @@ const Zt = J(
|
|
|
3530
3553
|
children: r()
|
|
3531
3554
|
}
|
|
3532
3555
|
),
|
|
3533
|
-
|
|
3556
|
+
t.blocked && /* @__PURE__ */ a(Io, { store: t })
|
|
3534
3557
|
] });
|
|
3535
3558
|
}
|
|
3536
|
-
),
|
|
3559
|
+
), Kt = (t) => {
|
|
3537
3560
|
var s;
|
|
3538
|
-
const { value:
|
|
3561
|
+
const { value: e, ref: o } = t, r = B(), [i, n] = L(!1);
|
|
3539
3562
|
async function c() {
|
|
3540
3563
|
if (!o || !("current" in o))
|
|
3541
3564
|
return console.warn("No copy target found"), !1;
|
|
3542
3565
|
try {
|
|
3543
|
-
return await navigator.clipboard.writeText(
|
|
3566
|
+
return await navigator.clipboard.writeText(e), console.log("Copied!"), n(!0), !0;
|
|
3544
3567
|
} catch (l) {
|
|
3545
3568
|
console.error(l);
|
|
3546
3569
|
const d = window.getSelection();
|
|
@@ -3558,8 +3581,8 @@ const Zt = J(
|
|
|
3558
3581
|
return () => {
|
|
3559
3582
|
l && clearTimeout(l);
|
|
3560
3583
|
};
|
|
3561
|
-
}, [i]), /* @__PURE__ */ a(
|
|
3562
|
-
|
|
3584
|
+
}, [i]), /* @__PURE__ */ a(Ze, { open: i, title: "Copied!", children: /* @__PURE__ */ a(
|
|
3585
|
+
_,
|
|
3563
3586
|
{
|
|
3564
3587
|
justifyContent: "center",
|
|
3565
3588
|
sx: {
|
|
@@ -3587,16 +3610,16 @@ const Zt = J(
|
|
|
3587
3610
|
width: "100%",
|
|
3588
3611
|
overflow: "hidden"
|
|
3589
3612
|
},
|
|
3590
|
-
children:
|
|
3613
|
+
children: e
|
|
3591
3614
|
}
|
|
3592
3615
|
)
|
|
3593
3616
|
}
|
|
3594
3617
|
) });
|
|
3595
|
-
},
|
|
3596
|
-
J(({ tcpPose:
|
|
3597
|
-
const [o, r] = L(null), i =
|
|
3618
|
+
}, fi = $(
|
|
3619
|
+
J(({ tcpPose: t, showCopyButton: e = !1 }) => {
|
|
3620
|
+
const [o, r] = L(null), i = ve(t);
|
|
3598
3621
|
return /* @__PURE__ */ S(
|
|
3599
|
-
|
|
3622
|
+
_,
|
|
3600
3623
|
{
|
|
3601
3624
|
direction: "row",
|
|
3602
3625
|
alignItems: "center",
|
|
@@ -3604,8 +3627,8 @@ const Zt = J(
|
|
|
3604
3627
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3605
3628
|
"data-testid": "pose-cartesian-values",
|
|
3606
3629
|
children: [
|
|
3607
|
-
/* @__PURE__ */ a(
|
|
3608
|
-
|
|
3630
|
+
/* @__PURE__ */ a(Kt, { value: i }),
|
|
3631
|
+
e && /* @__PURE__ */ a(
|
|
3609
3632
|
Z,
|
|
3610
3633
|
{
|
|
3611
3634
|
variant: "contained",
|
|
@@ -3626,11 +3649,11 @@ const Zt = J(
|
|
|
3626
3649
|
}
|
|
3627
3650
|
);
|
|
3628
3651
|
})
|
|
3629
|
-
),
|
|
3630
|
-
J(({ joints:
|
|
3631
|
-
const [o, r] = L(null), i = `[${
|
|
3652
|
+
), bi = $(
|
|
3653
|
+
J(({ joints: t, showCopyButton: e = !1 }) => {
|
|
3654
|
+
const [o, r] = L(null), i = `[${t.map((c) => parseFloat(c.toFixed(4))).join(", ")}]`;
|
|
3632
3655
|
return /* @__PURE__ */ S(
|
|
3633
|
-
|
|
3656
|
+
_,
|
|
3634
3657
|
{
|
|
3635
3658
|
direction: "row",
|
|
3636
3659
|
alignItems: "center",
|
|
@@ -3638,8 +3661,8 @@ const Zt = J(
|
|
|
3638
3661
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3639
3662
|
"data-testid": "pose-joint-values",
|
|
3640
3663
|
children: [
|
|
3641
|
-
/* @__PURE__ */ a(
|
|
3642
|
-
|
|
3664
|
+
/* @__PURE__ */ a(Kt, { value: i }),
|
|
3665
|
+
e && /* @__PURE__ */ a(
|
|
3643
3666
|
Z,
|
|
3644
3667
|
{
|
|
3645
3668
|
variant: "contained",
|
|
@@ -3661,51 +3684,51 @@ const Zt = J(
|
|
|
3661
3684
|
);
|
|
3662
3685
|
})
|
|
3663
3686
|
);
|
|
3664
|
-
class
|
|
3687
|
+
class Jo {
|
|
3665
3688
|
constructor() {
|
|
3666
|
-
this.messages = [], this.addMessage = (
|
|
3689
|
+
this.messages = [], this.addMessage = (e, o = "info") => {
|
|
3667
3690
|
const r = {
|
|
3668
3691
|
id: Math.random().toString(36).substring(2, 11),
|
|
3669
3692
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3670
|
-
message:
|
|
3693
|
+
message: e,
|
|
3671
3694
|
level: o
|
|
3672
3695
|
};
|
|
3673
3696
|
this.messages.push(r);
|
|
3674
3697
|
}, this.clearMessages = () => {
|
|
3675
3698
|
this.messages = [];
|
|
3676
|
-
}, this.addInfo = (
|
|
3677
|
-
this.addMessage(
|
|
3678
|
-
}, this.addWarning = (
|
|
3679
|
-
this.addMessage(
|
|
3680
|
-
}, this.addError = (
|
|
3681
|
-
this.addMessage(
|
|
3682
|
-
}, this.addDebug = (
|
|
3683
|
-
this.addMessage(
|
|
3684
|
-
},
|
|
3685
|
-
messages:
|
|
3699
|
+
}, this.addInfo = (e) => {
|
|
3700
|
+
this.addMessage(e, "info");
|
|
3701
|
+
}, this.addWarning = (e) => {
|
|
3702
|
+
this.addMessage(e, "warning");
|
|
3703
|
+
}, this.addError = (e) => {
|
|
3704
|
+
this.addMessage(e, "error");
|
|
3705
|
+
}, this.addDebug = (e) => {
|
|
3706
|
+
this.addMessage(e, "debug");
|
|
3707
|
+
}, Me(this, {
|
|
3708
|
+
messages: Ie,
|
|
3686
3709
|
addMessage: Rt,
|
|
3687
3710
|
clearMessages: Rt
|
|
3688
3711
|
});
|
|
3689
3712
|
}
|
|
3690
3713
|
}
|
|
3691
|
-
const st = (
|
|
3714
|
+
const st = (t, e, o) => ({
|
|
3692
3715
|
id: o || `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`,
|
|
3693
3716
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3694
|
-
message:
|
|
3695
|
-
level:
|
|
3696
|
-
}),
|
|
3697
|
-
J((
|
|
3717
|
+
message: t,
|
|
3718
|
+
level: e
|
|
3719
|
+
}), xi = (t, e) => st(t, "debug", e), yi = (t, e) => st(t, "info", e), Si = (t, e) => st(t, "warning", e), vi = (t, e) => st(t, "error", e), Fo = $(
|
|
3720
|
+
J((t) => {
|
|
3698
3721
|
var m;
|
|
3699
|
-
const { messages:
|
|
3722
|
+
const { messages: e = [], onClear: o, height: r = 400, sx: i } = t, n = B(), c = A(null);
|
|
3700
3723
|
F(() => {
|
|
3701
|
-
if (
|
|
3724
|
+
if (e.length === 0) return;
|
|
3702
3725
|
const u = c.current;
|
|
3703
3726
|
if (!u) return;
|
|
3704
3727
|
const p = setTimeout(() => {
|
|
3705
3728
|
u.scrollTop = u.scrollHeight;
|
|
3706
3729
|
}, 10);
|
|
3707
3730
|
return () => clearTimeout(p);
|
|
3708
|
-
}, [
|
|
3731
|
+
}, [e.length]);
|
|
3709
3732
|
const s = (u) => u.toLocaleTimeString("en-US", {
|
|
3710
3733
|
hour12: !1,
|
|
3711
3734
|
hour: "2-digit",
|
|
@@ -3814,7 +3837,7 @@ const st = (e, t, o) => ({
|
|
|
3814
3837
|
}
|
|
3815
3838
|
},
|
|
3816
3839
|
title: f ? "Copied!" : "Copy message",
|
|
3817
|
-
children: /* @__PURE__ */ a(
|
|
3840
|
+
children: /* @__PURE__ */ a(Qe, { sx: { fontSize: 12 } })
|
|
3818
3841
|
}
|
|
3819
3842
|
),
|
|
3820
3843
|
v && /* @__PURE__ */ a(
|
|
@@ -3830,7 +3853,7 @@ const st = (e, t, o) => ({
|
|
|
3830
3853
|
}
|
|
3831
3854
|
},
|
|
3832
3855
|
title: p ? "Collapse" : "Expand",
|
|
3833
|
-
children: p ? /* @__PURE__ */ a(
|
|
3856
|
+
children: p ? /* @__PURE__ */ a(Ke, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(to, { sx: { fontSize: 12 } })
|
|
3834
3857
|
}
|
|
3835
3858
|
)
|
|
3836
3859
|
]
|
|
@@ -3842,7 +3865,7 @@ const st = (e, t, o) => ({
|
|
|
3842
3865
|
);
|
|
3843
3866
|
};
|
|
3844
3867
|
return /* @__PURE__ */ S(
|
|
3845
|
-
|
|
3868
|
+
eo,
|
|
3846
3869
|
{
|
|
3847
3870
|
sx: {
|
|
3848
3871
|
backgroundColor: ((m = n.palette.backgroundPaperElevation) == null ? void 0 : m[2]) || "#171927",
|
|
@@ -3867,7 +3890,7 @@ const st = (e, t, o) => ({
|
|
|
3867
3890
|
children: [
|
|
3868
3891
|
/* @__PURE__ */ S(w, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
3869
3892
|
/* @__PURE__ */ a(
|
|
3870
|
-
|
|
3893
|
+
Xe,
|
|
3871
3894
|
{
|
|
3872
3895
|
sx: {
|
|
3873
3896
|
fontSize: 16,
|
|
@@ -3943,7 +3966,7 @@ const st = (e, t, o) => ({
|
|
|
3943
3966
|
}
|
|
3944
3967
|
}
|
|
3945
3968
|
},
|
|
3946
|
-
children:
|
|
3969
|
+
children: e.length === 0 ? /* @__PURE__ */ a(
|
|
3947
3970
|
R,
|
|
3948
3971
|
{
|
|
3949
3972
|
sx: {
|
|
@@ -3955,28 +3978,28 @@ const st = (e, t, o) => ({
|
|
|
3955
3978
|
},
|
|
3956
3979
|
children: "No log messages"
|
|
3957
3980
|
}
|
|
3958
|
-
) :
|
|
3981
|
+
) : e.map((u) => /* @__PURE__ */ a(d, { message: u }, u.id))
|
|
3959
3982
|
}
|
|
3960
3983
|
)
|
|
3961
3984
|
]
|
|
3962
3985
|
}
|
|
3963
3986
|
);
|
|
3964
3987
|
})
|
|
3965
|
-
),
|
|
3966
|
-
J((
|
|
3967
|
-
const { store:
|
|
3988
|
+
), Ci = $(
|
|
3989
|
+
J((t) => {
|
|
3990
|
+
const { store: e, onStoreReady: o, ...r } = t, i = A(o);
|
|
3968
3991
|
F(() => {
|
|
3969
3992
|
i.current = o;
|
|
3970
3993
|
}, [o]);
|
|
3971
3994
|
const n = rt(() => {
|
|
3972
3995
|
var l;
|
|
3973
|
-
const s =
|
|
3996
|
+
const s = e || new Jo();
|
|
3974
3997
|
return (l = i.current) == null || l.call(i, s), s;
|
|
3975
|
-
}, [
|
|
3998
|
+
}, [e]), c = () => {
|
|
3976
3999
|
n.clearMessages();
|
|
3977
4000
|
};
|
|
3978
4001
|
return /* @__PURE__ */ a(
|
|
3979
|
-
|
|
4002
|
+
Fo,
|
|
3980
4003
|
{
|
|
3981
4004
|
...r,
|
|
3982
4005
|
messages: n.messages,
|
|
@@ -3985,19 +4008,19 @@ const st = (e, t, o) => ({
|
|
|
3985
4008
|
);
|
|
3986
4009
|
})
|
|
3987
4010
|
);
|
|
3988
|
-
function
|
|
3989
|
-
const
|
|
3990
|
-
return
|
|
4011
|
+
function Bo() {
|
|
4012
|
+
const t = window.location.href;
|
|
4013
|
+
return t.substring(
|
|
3991
4014
|
0,
|
|
3992
|
-
|
|
4015
|
+
t.indexOf("/", t.indexOf("//") + 2)
|
|
3993
4016
|
);
|
|
3994
4017
|
}
|
|
3995
|
-
function
|
|
3996
|
-
baseUrl:
|
|
3997
|
-
...
|
|
4018
|
+
function wi({
|
|
4019
|
+
baseUrl: t = Bo(),
|
|
4020
|
+
...e
|
|
3998
4021
|
}) {
|
|
3999
4022
|
return /* @__PURE__ */ S(
|
|
4000
|
-
|
|
4023
|
+
oo,
|
|
4001
4024
|
{
|
|
4002
4025
|
"aria-labelledby": "no-motion-group-modal-title",
|
|
4003
4026
|
open: !0,
|
|
@@ -4017,9 +4040,9 @@ function vi({
|
|
|
4017
4040
|
}
|
|
4018
4041
|
},
|
|
4019
4042
|
children: [
|
|
4020
|
-
/* @__PURE__ */ a(
|
|
4043
|
+
/* @__PURE__ */ a(ro, { id: "no-motion-group-modal-title", children: "No motion group found" }),
|
|
4021
4044
|
/* @__PURE__ */ S(
|
|
4022
|
-
|
|
4045
|
+
io,
|
|
4023
4046
|
{
|
|
4024
4047
|
sx: {
|
|
4025
4048
|
marginTop: "3rem",
|
|
@@ -4032,11 +4055,11 @@ function vi({
|
|
|
4032
4055
|
]
|
|
4033
4056
|
}
|
|
4034
4057
|
),
|
|
4035
|
-
/* @__PURE__ */ a(
|
|
4058
|
+
/* @__PURE__ */ a(no, { children: /* @__PURE__ */ S(_, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
|
|
4036
4059
|
/* @__PURE__ */ a(
|
|
4037
4060
|
Z,
|
|
4038
4061
|
{
|
|
4039
|
-
href: `${
|
|
4062
|
+
href: `${t}/settings`,
|
|
4040
4063
|
variant: "contained",
|
|
4041
4064
|
sx: {
|
|
4042
4065
|
borderRadius: "8px",
|
|
@@ -4048,7 +4071,7 @@ function vi({
|
|
|
4048
4071
|
/* @__PURE__ */ a(
|
|
4049
4072
|
Z,
|
|
4050
4073
|
{
|
|
4051
|
-
href: `${
|
|
4074
|
+
href: `${t}`,
|
|
4052
4075
|
variant: "text",
|
|
4053
4076
|
sx: {
|
|
4054
4077
|
marginTop: "1rem",
|
|
@@ -4064,12 +4087,12 @@ function vi({
|
|
|
4064
4087
|
}
|
|
4065
4088
|
);
|
|
4066
4089
|
}
|
|
4067
|
-
var
|
|
4068
|
-
const
|
|
4069
|
-
J(({ setupState:
|
|
4090
|
+
var te = /* @__PURE__ */ ((t) => (t.PRECONDITION_NOT_FULFILLED = "PRECONDITION_NOT_FULFILLED", t.ROBOT_DISCONNECTED = "ROBOT_DISCONNECTED", t.CELL_OPEN = "CELL_OPEN", t.E_STOP = "E_STOP", t.MANUAL_MODE = "MANUAL_MODE", t.READY = "READY", t))(te || {});
|
|
4091
|
+
const Lo = $(
|
|
4092
|
+
J(({ setupState: t, className: e }) => {
|
|
4070
4093
|
const o = B(), { t: r } = z(), i = () => {
|
|
4071
4094
|
var d, m, u, p, g, f, y;
|
|
4072
|
-
switch (
|
|
4095
|
+
switch (t) {
|
|
4073
4096
|
case "READY":
|
|
4074
4097
|
return {
|
|
4075
4098
|
label: r("RobotSetupReadinessIndicator.Ready.lb"),
|
|
@@ -4117,9 +4140,9 @@ const Fo = $(
|
|
|
4117
4140
|
}
|
|
4118
4141
|
}, { label: n, indicatorColor: c, backgroundColor: s, textColor: l } = i();
|
|
4119
4142
|
return /* @__PURE__ */ a(
|
|
4120
|
-
|
|
4143
|
+
so,
|
|
4121
4144
|
{
|
|
4122
|
-
className:
|
|
4145
|
+
className: e,
|
|
4123
4146
|
label: /* @__PURE__ */ S(
|
|
4124
4147
|
w,
|
|
4125
4148
|
{
|
|
@@ -4171,17 +4194,17 @@ const Fo = $(
|
|
|
4171
4194
|
}
|
|
4172
4195
|
);
|
|
4173
4196
|
})
|
|
4174
|
-
),
|
|
4197
|
+
), Ti = $(
|
|
4175
4198
|
J(
|
|
4176
4199
|
({
|
|
4177
|
-
robotName:
|
|
4178
|
-
robotType:
|
|
4200
|
+
robotName: t,
|
|
4201
|
+
robotType: e,
|
|
4179
4202
|
setupState: o,
|
|
4180
|
-
PreconditionComponent: r =
|
|
4203
|
+
PreconditionComponent: r = Lo,
|
|
4181
4204
|
className: i
|
|
4182
4205
|
}) => {
|
|
4183
4206
|
var l;
|
|
4184
|
-
const n = B(), c =
|
|
4207
|
+
const n = B(), c = e || "Robot", s = o === te.READY;
|
|
4185
4208
|
return /* @__PURE__ */ S(
|
|
4186
4209
|
w,
|
|
4187
4210
|
{
|
|
@@ -4224,10 +4247,10 @@ const Fo = $(
|
|
|
4224
4247
|
fill: `${n.palette.primary.main} !important`
|
|
4225
4248
|
}
|
|
4226
4249
|
},
|
|
4227
|
-
children: /* @__PURE__ */ a(
|
|
4250
|
+
children: /* @__PURE__ */ a(Be, {})
|
|
4228
4251
|
}
|
|
4229
4252
|
) : /* @__PURE__ */ a(
|
|
4230
|
-
|
|
4253
|
+
ao,
|
|
4231
4254
|
{
|
|
4232
4255
|
sx: {
|
|
4233
4256
|
color: n.palette.error.main,
|
|
@@ -4243,7 +4266,7 @@ const Fo = $(
|
|
|
4243
4266
|
fontWeight: 500,
|
|
4244
4267
|
color: n.palette.text.primary
|
|
4245
4268
|
},
|
|
4246
|
-
children:
|
|
4269
|
+
children: t
|
|
4247
4270
|
}
|
|
4248
4271
|
),
|
|
4249
4272
|
/* @__PURE__ */ a(
|
|
@@ -4277,21 +4300,21 @@ const Fo = $(
|
|
|
4277
4300
|
);
|
|
4278
4301
|
}
|
|
4279
4302
|
)
|
|
4280
|
-
),
|
|
4281
|
-
shouldForwardProp: (
|
|
4282
|
-
})(({ theme:
|
|
4283
|
-
var
|
|
4303
|
+
), $o = ut(lo, {
|
|
4304
|
+
shouldForwardProp: (t) => t !== "selected"
|
|
4305
|
+
})(({ theme: t }) => {
|
|
4306
|
+
var e, o, r;
|
|
4284
4307
|
return {
|
|
4285
4308
|
borderRadius: "20px",
|
|
4286
4309
|
"&:hover": {
|
|
4287
|
-
background: (
|
|
4310
|
+
background: (e = t.palette.backgroundPaperElevation) == null ? void 0 : e[7]
|
|
4288
4311
|
},
|
|
4289
4312
|
variants: [
|
|
4290
4313
|
{
|
|
4291
4314
|
props: ({ selected: i }) => !i,
|
|
4292
4315
|
style: {
|
|
4293
|
-
background: (o =
|
|
4294
|
-
color:
|
|
4316
|
+
background: (o = t.palette.backgroundPaperElevation) == null ? void 0 : o[0],
|
|
4317
|
+
color: t.palette.action.disabled,
|
|
4295
4318
|
"> img": {
|
|
4296
4319
|
opacity: 0.4
|
|
4297
4320
|
}
|
|
@@ -4300,28 +4323,28 @@ const Fo = $(
|
|
|
4300
4323
|
{
|
|
4301
4324
|
props: ({ selected: i }) => i,
|
|
4302
4325
|
style: {
|
|
4303
|
-
background: (r =
|
|
4304
|
-
border: `1px solid ${
|
|
4305
|
-
color:
|
|
4326
|
+
background: (r = t.palette.backgroundPaperElevation) == null ? void 0 : r[11],
|
|
4327
|
+
border: `1px solid ${t.palette.divider}`,
|
|
4328
|
+
color: t.palette.primary.contrastText
|
|
4306
4329
|
}
|
|
4307
4330
|
}
|
|
4308
4331
|
]
|
|
4309
4332
|
};
|
|
4310
|
-
}),
|
|
4311
|
-
const { ref:
|
|
4333
|
+
}), Mi = (t) => {
|
|
4334
|
+
const { ref: e, ...o } = t;
|
|
4312
4335
|
return /* @__PURE__ */ a(
|
|
4313
|
-
|
|
4336
|
+
$o,
|
|
4314
4337
|
{
|
|
4315
|
-
ref:
|
|
4316
|
-
selected:
|
|
4338
|
+
ref: e,
|
|
4339
|
+
selected: t.selected,
|
|
4317
4340
|
...o,
|
|
4318
4341
|
color: "secondary",
|
|
4319
4342
|
variant: "circular"
|
|
4320
4343
|
}
|
|
4321
4344
|
);
|
|
4322
4345
|
};
|
|
4323
|
-
function
|
|
4324
|
-
const { children:
|
|
4346
|
+
function zo(t) {
|
|
4347
|
+
const { children: e, value: o, index: r, ...i } = t;
|
|
4325
4348
|
return /* @__PURE__ */ a(
|
|
4326
4349
|
"div",
|
|
4327
4350
|
{
|
|
@@ -4330,11 +4353,11 @@ function Lo(e) {
|
|
|
4330
4353
|
id: `tabpanel-${r}`,
|
|
4331
4354
|
"aria-labelledby": `tab-${r}`,
|
|
4332
4355
|
...i,
|
|
4333
|
-
children: o === r && /* @__PURE__ */ a(w, { children:
|
|
4356
|
+
children: o === r && /* @__PURE__ */ a(w, { children: e })
|
|
4334
4357
|
}
|
|
4335
4358
|
);
|
|
4336
4359
|
}
|
|
4337
|
-
function
|
|
4360
|
+
function Vo({ children: t, ...e }) {
|
|
4338
4361
|
const {
|
|
4339
4362
|
fullWidth: o,
|
|
4340
4363
|
indicator: r,
|
|
@@ -4346,22 +4369,22 @@ function $o({ children: e, ...t }) {
|
|
|
4346
4369
|
value: d,
|
|
4347
4370
|
variant: m,
|
|
4348
4371
|
...u
|
|
4349
|
-
} =
|
|
4350
|
-
return /* @__PURE__ */ a(w, { ...u, children:
|
|
4372
|
+
} = e;
|
|
4373
|
+
return /* @__PURE__ */ a(w, { ...u, children: t });
|
|
4351
4374
|
}
|
|
4352
|
-
const
|
|
4353
|
-
J((
|
|
4375
|
+
const Ii = $(
|
|
4376
|
+
J((t) => {
|
|
4354
4377
|
const {
|
|
4355
|
-
items:
|
|
4378
|
+
items: e,
|
|
4356
4379
|
activeTab: o,
|
|
4357
4380
|
defaultActiveTab: r = 0,
|
|
4358
4381
|
onTabChange: i,
|
|
4359
4382
|
sx: n,
|
|
4360
4383
|
ref: c
|
|
4361
|
-
} =
|
|
4384
|
+
} = t, s = o !== void 0, [l, d] = L(r), m = s ? o : l;
|
|
4362
4385
|
F(() => {
|
|
4363
|
-
s ||
|
|
4364
|
-
}, [
|
|
4386
|
+
s || e.length !== 0 && (l < 0 || l > e.length - 1) && d(0);
|
|
4387
|
+
}, [e.length, s, l]);
|
|
4365
4388
|
const u = (p, g) => {
|
|
4366
4389
|
s || d(g), i == null || i(g);
|
|
4367
4390
|
};
|
|
@@ -4413,16 +4436,16 @@ const Ti = $(
|
|
|
4413
4436
|
overflow: "visible"
|
|
4414
4437
|
}
|
|
4415
4438
|
},
|
|
4416
|
-
children:
|
|
4439
|
+
children: e.map((p, g) => {
|
|
4417
4440
|
var T, C, M;
|
|
4418
4441
|
const f = () => {
|
|
4419
4442
|
if (!p.badge) return;
|
|
4420
|
-
const
|
|
4421
|
-
return typeof
|
|
4443
|
+
const I = p.badge.content, j = p.badge.max;
|
|
4444
|
+
return typeof I == "number" && j && I > j ? `${j}+` : I;
|
|
4422
4445
|
}, y = () => {
|
|
4423
4446
|
if (!p.badge) return !1;
|
|
4424
|
-
const
|
|
4425
|
-
return !(
|
|
4447
|
+
const I = p.badge.content, j = p.badge.showZero;
|
|
4448
|
+
return !(I === 0 && !j);
|
|
4426
4449
|
}, b = f(), h = y(), v = () => {
|
|
4427
4450
|
s || d(g), i == null || i(g);
|
|
4428
4451
|
}, x = /* @__PURE__ */ a(
|
|
@@ -4438,9 +4461,9 @@ const Ti = $(
|
|
|
4438
4461
|
height: "32px",
|
|
4439
4462
|
padding: "0px 10px",
|
|
4440
4463
|
borderRadius: "12px",
|
|
4441
|
-
backgroundColor: (
|
|
4464
|
+
backgroundColor: (I) => {
|
|
4442
4465
|
var j;
|
|
4443
|
-
return ((j =
|
|
4466
|
+
return ((j = I.palette.backgroundPaperElevation) == null ? void 0 : j[11]) || "#32344B";
|
|
4444
4467
|
},
|
|
4445
4468
|
color: "text.primary",
|
|
4446
4469
|
opacity: m === g ? 1 : 0.38,
|
|
@@ -4453,9 +4476,9 @@ const Ti = $(
|
|
|
4453
4476
|
},
|
|
4454
4477
|
"&.Mui-selected": {
|
|
4455
4478
|
opacity: 1,
|
|
4456
|
-
backgroundColor: (
|
|
4479
|
+
backgroundColor: (I) => {
|
|
4457
4480
|
var j;
|
|
4458
|
-
return ((j =
|
|
4481
|
+
return ((j = I.palette.backgroundPaperElevation) == null ? void 0 : j[11]) || "#32344B";
|
|
4459
4482
|
},
|
|
4460
4483
|
color: "text.primary"
|
|
4461
4484
|
},
|
|
@@ -4470,12 +4493,12 @@ const Ti = $(
|
|
|
4470
4493
|
p.id
|
|
4471
4494
|
);
|
|
4472
4495
|
return h ? /* @__PURE__ */ a(
|
|
4473
|
-
|
|
4496
|
+
Vo,
|
|
4474
4497
|
{
|
|
4475
4498
|
component: "span",
|
|
4476
4499
|
sx: { display: "inline-flex" },
|
|
4477
4500
|
children: /* @__PURE__ */ a(
|
|
4478
|
-
|
|
4501
|
+
co,
|
|
4479
4502
|
{
|
|
4480
4503
|
badgeContent: b,
|
|
4481
4504
|
color: ((T = p.badge) == null ? void 0 : T.color) || "error",
|
|
@@ -4513,31 +4536,31 @@ const Ti = $(
|
|
|
4513
4536
|
}
|
|
4514
4537
|
}
|
|
4515
4538
|
),
|
|
4516
|
-
/* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children:
|
|
4539
|
+
/* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children: e.map((p, g) => /* @__PURE__ */ a(zo, { value: m, index: g, children: p.content }, p.id)) })
|
|
4517
4540
|
]
|
|
4518
4541
|
}
|
|
4519
4542
|
);
|
|
4520
4543
|
})
|
|
4521
|
-
),
|
|
4522
|
-
const
|
|
4523
|
-
return
|
|
4524
|
-
}, At = (
|
|
4525
|
-
const o = Math.floor(
|
|
4544
|
+
), No = (t) => {
|
|
4545
|
+
const e = Math.floor(t / 86400), o = Math.floor(t % 86400 / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, n = [];
|
|
4546
|
+
return e > 0 ? (n.push(e.toString()), n.push(o.toString().padStart(2, "0")), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : o > 0 ? (n.push(o.toString()), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : (n.push(r.toString()), n.push(i.toString().padStart(2, "0"))), n.join(":");
|
|
4547
|
+
}, At = (t, e) => {
|
|
4548
|
+
const o = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60), n = t % 60;
|
|
4526
4549
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
4527
4550
|
try {
|
|
4528
4551
|
const s = {};
|
|
4529
|
-
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(
|
|
4552
|
+
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(s);
|
|
4530
4553
|
} catch {
|
|
4531
4554
|
}
|
|
4532
4555
|
const c = [];
|
|
4533
4556
|
return o > 0 && c.push(`${o}d`), r > 0 && c.push(`${r}h`), i > 0 && c.push(`${i}m`), (n > 0 || c.length === 0) && c.push(`${n}s`), c.join(" ");
|
|
4534
|
-
},
|
|
4535
|
-
timerState:
|
|
4536
|
-
animationState:
|
|
4557
|
+
}, Wo = ({
|
|
4558
|
+
timerState: t,
|
|
4559
|
+
animationState: e,
|
|
4537
4560
|
hasError: o,
|
|
4538
4561
|
className: r
|
|
4539
4562
|
}) => {
|
|
4540
|
-
const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } =
|
|
4563
|
+
const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } = t, { showErrorAnimation: l, showPauseAnimation: d, showMainText: m } = e;
|
|
4541
4564
|
return /* @__PURE__ */ S(
|
|
4542
4565
|
w,
|
|
4543
4566
|
{
|
|
@@ -4552,7 +4575,7 @@ const Ti = $(
|
|
|
4552
4575
|
},
|
|
4553
4576
|
children: [
|
|
4554
4577
|
/* @__PURE__ */ a(
|
|
4555
|
-
|
|
4578
|
+
go,
|
|
4556
4579
|
{
|
|
4557
4580
|
width: 264,
|
|
4558
4581
|
height: 264,
|
|
@@ -4643,7 +4666,7 @@ const Ti = $(
|
|
|
4643
4666
|
lineHeight: 1,
|
|
4644
4667
|
letterSpacing: "-0.5px"
|
|
4645
4668
|
},
|
|
4646
|
-
children:
|
|
4669
|
+
children: No(c)
|
|
4647
4670
|
}
|
|
4648
4671
|
) })
|
|
4649
4672
|
]
|
|
@@ -4654,14 +4677,14 @@ const Ti = $(
|
|
|
4654
4677
|
]
|
|
4655
4678
|
}
|
|
4656
4679
|
);
|
|
4657
|
-
},
|
|
4658
|
-
timerState:
|
|
4659
|
-
animationState:
|
|
4680
|
+
}, Go = ({
|
|
4681
|
+
timerState: t,
|
|
4682
|
+
animationState: e,
|
|
4660
4683
|
hasError: o,
|
|
4661
4684
|
compact: r,
|
|
4662
4685
|
className: i
|
|
4663
4686
|
}) => {
|
|
4664
|
-
const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress: d } =
|
|
4687
|
+
const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress: d } = t, { showErrorAnimation: m, showPauseAnimation: u } = e;
|
|
4665
4688
|
return r ? /* @__PURE__ */ a(
|
|
4666
4689
|
w,
|
|
4667
4690
|
{
|
|
@@ -4771,8 +4794,8 @@ const Ti = $(
|
|
|
4771
4794
|
]
|
|
4772
4795
|
}
|
|
4773
4796
|
);
|
|
4774
|
-
},
|
|
4775
|
-
const [
|
|
4797
|
+
}, Uo = () => {
|
|
4798
|
+
const [t, e] = L({
|
|
4776
4799
|
showPauseAnimation: !1,
|
|
4777
4800
|
showErrorAnimation: !1,
|
|
4778
4801
|
showMainText: !0
|
|
@@ -4780,36 +4803,36 @@ const Ti = $(
|
|
|
4780
4803
|
null
|
|
4781
4804
|
), r = A(
|
|
4782
4805
|
null
|
|
4783
|
-
), i = A(null), n =
|
|
4784
|
-
|
|
4785
|
-
|
|
4806
|
+
), i = A(null), n = P(() => {
|
|
4807
|
+
e((u) => ({ ...u, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4808
|
+
e((u) => ({ ...u, showPauseAnimation: !1 }));
|
|
4786
4809
|
}, 800);
|
|
4787
|
-
}, []), c =
|
|
4788
|
-
|
|
4789
|
-
|
|
4810
|
+
}, []), c = P(() => {
|
|
4811
|
+
e((u) => ({ ...u, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
4812
|
+
e((u) => ({ ...u, showErrorAnimation: !1 }));
|
|
4790
4813
|
}, 600);
|
|
4791
|
-
}, []), s =
|
|
4792
|
-
|
|
4793
|
-
}, []), l =
|
|
4794
|
-
|
|
4814
|
+
}, []), s = P(() => {
|
|
4815
|
+
e((u) => ({ ...u, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
4816
|
+
}, []), l = P(() => {
|
|
4817
|
+
e((u) => ({
|
|
4795
4818
|
...u,
|
|
4796
4819
|
showMainText: !1
|
|
4797
4820
|
})), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4798
|
-
|
|
4821
|
+
e((u) => ({
|
|
4799
4822
|
...u,
|
|
4800
4823
|
showMainText: !0
|
|
4801
4824
|
}));
|
|
4802
4825
|
}, 200);
|
|
4803
|
-
}, []), d =
|
|
4804
|
-
|
|
4826
|
+
}, []), d = P(() => {
|
|
4827
|
+
e((u) => ({
|
|
4805
4828
|
...u,
|
|
4806
4829
|
showMainText: !0
|
|
4807
4830
|
}));
|
|
4808
|
-
}, []), m =
|
|
4831
|
+
}, []), m = P(() => {
|
|
4809
4832
|
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
|
|
4810
4833
|
}, []);
|
|
4811
4834
|
return {
|
|
4812
|
-
animationState:
|
|
4835
|
+
animationState: t,
|
|
4813
4836
|
triggerPauseAnimation: n,
|
|
4814
4837
|
triggerErrorAnimation: c,
|
|
4815
4838
|
clearErrorAnimation: s,
|
|
@@ -4817,9 +4840,9 @@ const Ti = $(
|
|
|
4817
4840
|
setInitialAnimationState: d,
|
|
4818
4841
|
cleanup: m
|
|
4819
4842
|
};
|
|
4820
|
-
},
|
|
4821
|
-
autoStart:
|
|
4822
|
-
hasError:
|
|
4843
|
+
}, Ho = ({
|
|
4844
|
+
autoStart: t,
|
|
4845
|
+
hasError: e,
|
|
4823
4846
|
onPauseAnimation: o,
|
|
4824
4847
|
onErrorAnimation: r,
|
|
4825
4848
|
onClearErrorAnimation: i
|
|
@@ -4836,7 +4859,7 @@ const Ti = $(
|
|
|
4836
4859
|
onChange: ([h]) => {
|
|
4837
4860
|
c((v) => ({ ...v, currentProgress: h }));
|
|
4838
4861
|
}
|
|
4839
|
-
}), p =
|
|
4862
|
+
}), p = P(
|
|
4840
4863
|
(h = 0) => {
|
|
4841
4864
|
const v = h / 60 % 1 * 100;
|
|
4842
4865
|
c((x) => ({
|
|
@@ -4844,10 +4867,10 @@ const Ti = $(
|
|
|
4844
4867
|
elapsedTime: h,
|
|
4845
4868
|
isPausedState: !1,
|
|
4846
4869
|
currentProgress: v
|
|
4847
|
-
})), d.current = 0, m.current = v, u.setImmediate([v]),
|
|
4870
|
+
})), d.current = 0, m.current = v, u.setImmediate([v]), t ? (l.current = Date.now() - h * 1e3, c((x) => ({ ...x, isRunning: !0 }))) : l.current = null;
|
|
4848
4871
|
},
|
|
4849
|
-
[
|
|
4850
|
-
), g =
|
|
4872
|
+
[t, u]
|
|
4873
|
+
), g = P(() => {
|
|
4851
4874
|
if (l.current && n.isRunning) {
|
|
4852
4875
|
const v = (Date.now() - l.current) / 1e3 + d.current, x = v / 60 % 1 * 100;
|
|
4853
4876
|
u.setTarget([x]), c((T) => ({
|
|
@@ -4860,13 +4883,13 @@ const Ti = $(
|
|
|
4860
4883
|
isRunning: !1,
|
|
4861
4884
|
isPausedState: !0
|
|
4862
4885
|
})), o();
|
|
4863
|
-
}, [n.isRunning, u, o]), f =
|
|
4886
|
+
}, [n.isRunning, u, o]), f = P(() => {
|
|
4864
4887
|
n.isPausedState && (d.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
|
|
4865
4888
|
...h,
|
|
4866
4889
|
isRunning: !0,
|
|
4867
4890
|
isPausedState: !1
|
|
4868
4891
|
})));
|
|
4869
|
-
}, [n.isPausedState, n.elapsedTime]), y =
|
|
4892
|
+
}, [n.isPausedState, n.elapsedTime]), y = P(() => {
|
|
4870
4893
|
c((h) => ({
|
|
4871
4894
|
...h,
|
|
4872
4895
|
elapsedTime: 0,
|
|
@@ -4874,11 +4897,11 @@ const Ti = $(
|
|
|
4874
4897
|
isPausedState: !1,
|
|
4875
4898
|
currentProgress: 0
|
|
4876
4899
|
})), d.current = 0, l.current = null, m.current = 0, u.setImmediate([0]);
|
|
4877
|
-
}, [u]), b =
|
|
4900
|
+
}, [u]), b = P(() => n.isPausedState, [n.isPausedState]);
|
|
4878
4901
|
return F(() => {
|
|
4879
|
-
|
|
4902
|
+
e ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), g()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), f()), i());
|
|
4880
4903
|
}, [
|
|
4881
|
-
|
|
4904
|
+
e,
|
|
4882
4905
|
n.isRunning,
|
|
4883
4906
|
n.wasRunningBeforeError,
|
|
4884
4907
|
g,
|
|
@@ -4923,11 +4946,11 @@ const Ti = $(
|
|
|
4923
4946
|
isPaused: b
|
|
4924
4947
|
}
|
|
4925
4948
|
};
|
|
4926
|
-
},
|
|
4949
|
+
}, ki = $(
|
|
4927
4950
|
J(
|
|
4928
4951
|
({
|
|
4929
|
-
onTimerReady:
|
|
4930
|
-
autoStart:
|
|
4952
|
+
onTimerReady: t,
|
|
4953
|
+
autoStart: e = !0,
|
|
4931
4954
|
variant: o = "default",
|
|
4932
4955
|
compact: r = !1,
|
|
4933
4956
|
className: i,
|
|
@@ -4940,8 +4963,8 @@ const Ti = $(
|
|
|
4940
4963
|
clearErrorAnimation: d,
|
|
4941
4964
|
setInitialAnimationState: m,
|
|
4942
4965
|
cleanup: u
|
|
4943
|
-
} =
|
|
4944
|
-
autoStart:
|
|
4966
|
+
} = Uo(), { timerState: p, controls: g } = Ho({
|
|
4967
|
+
autoStart: e,
|
|
4945
4968
|
hasError: n,
|
|
4946
4969
|
onPauseAnimation: s,
|
|
4947
4970
|
onErrorAnimation: l,
|
|
@@ -4952,13 +4975,13 @@ const Ti = $(
|
|
|
4952
4975
|
}, [m]), F(() => {
|
|
4953
4976
|
let f = !0;
|
|
4954
4977
|
const y = setTimeout(() => {
|
|
4955
|
-
f &&
|
|
4978
|
+
f && t(g);
|
|
4956
4979
|
}, 0);
|
|
4957
4980
|
return () => {
|
|
4958
4981
|
f = !1, clearTimeout(y);
|
|
4959
4982
|
};
|
|
4960
|
-
}, [
|
|
4961
|
-
|
|
4983
|
+
}, [t, g]), F(() => u, [u]), o === "small" ? /* @__PURE__ */ a(
|
|
4984
|
+
Go,
|
|
4962
4985
|
{
|
|
4963
4986
|
timerState: p,
|
|
4964
4987
|
animationState: c,
|
|
@@ -4967,7 +4990,7 @@ const Ti = $(
|
|
|
4967
4990
|
className: i
|
|
4968
4991
|
}
|
|
4969
4992
|
) : /* @__PURE__ */ a(
|
|
4970
|
-
|
|
4993
|
+
Wo,
|
|
4971
4994
|
{
|
|
4972
4995
|
timerState: p,
|
|
4973
4996
|
animationState: c,
|
|
@@ -4977,7 +5000,7 @@ const Ti = $(
|
|
|
4977
5000
|
);
|
|
4978
5001
|
}
|
|
4979
5002
|
)
|
|
4980
|
-
), Jt = 1e-4,
|
|
5003
|
+
), Jt = 1e-4, qo = {
|
|
4981
5004
|
a: 0,
|
|
4982
5005
|
d: 0,
|
|
4983
5006
|
alpha: 0,
|
|
@@ -4985,8 +5008,8 @@ const Ti = $(
|
|
|
4985
5008
|
reverse_rotation_direction: !1
|
|
4986
5009
|
};
|
|
4987
5010
|
class gt {
|
|
4988
|
-
constructor(
|
|
4989
|
-
this.nova =
|
|
5011
|
+
constructor(e, o, r, i, n, c, s, l, d, m, u) {
|
|
5012
|
+
this.nova = e, this.cellId = o, this.controller = r, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = c, this.isVirtual = s, this.tcps = l, this.description = d, this.initialControllerState = m, this.controllerStateSocket = u, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = n, this.controllerState = m, u.addEventListener("message", (p) => {
|
|
4990
5013
|
var f;
|
|
4991
5014
|
const g = (f = W(p.data)) == null ? void 0 : f.result;
|
|
4992
5015
|
g && D(() => {
|
|
@@ -5018,74 +5041,74 @@ class gt {
|
|
|
5018
5041
|
});
|
|
5019
5042
|
}), mt(this);
|
|
5020
5043
|
}
|
|
5021
|
-
static async connectMultiple(
|
|
5044
|
+
static async connectMultiple(e, o, r = {}) {
|
|
5022
5045
|
return Promise.all(
|
|
5023
5046
|
o.map(
|
|
5024
|
-
(i) => gt.connect(
|
|
5047
|
+
(i) => gt.connect(e, i, r)
|
|
5025
5048
|
)
|
|
5026
5049
|
);
|
|
5027
5050
|
}
|
|
5028
|
-
static async connect(
|
|
5029
|
-
var
|
|
5030
|
-
const i = r.cellId ?? "cell", [
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
),
|
|
5034
|
-
(
|
|
5051
|
+
static async connect(e, o, r = {}) {
|
|
5052
|
+
var T, C;
|
|
5053
|
+
const i = qt(e), n = r.cellId ?? "cell", [c, s] = o.split("@"), l = await i.api.controller.getCurrentRobotControllerState(
|
|
5054
|
+
n,
|
|
5055
|
+
s
|
|
5056
|
+
), d = l == null ? void 0 : l.motion_groups.find(
|
|
5057
|
+
(M) => M.motion_group === o
|
|
5035
5058
|
);
|
|
5036
|
-
if (!
|
|
5059
|
+
if (!l || !d)
|
|
5037
5060
|
throw new Error(
|
|
5038
|
-
`Controller ${
|
|
5061
|
+
`Controller ${s} or motion group ${o} not found`
|
|
5039
5062
|
);
|
|
5040
|
-
const
|
|
5041
|
-
`/cells/${
|
|
5042
|
-
),
|
|
5043
|
-
if (!
|
|
5063
|
+
const m = i.openReconnectingWebsocket(
|
|
5064
|
+
`/cells/${n}/controllers/${s}/motion-groups/${o}/state-stream`
|
|
5065
|
+
), u = await m.firstMessage(), p = (T = W(u.data)) == null ? void 0 : T.result;
|
|
5066
|
+
if (!p)
|
|
5044
5067
|
throw new Error(
|
|
5045
|
-
`Unable to parse initial motion state message ${
|
|
5068
|
+
`Unable to parse initial motion state message ${u.data}`
|
|
5046
5069
|
);
|
|
5047
5070
|
console.log(
|
|
5048
|
-
`Connected motion state websocket to motion group ${
|
|
5071
|
+
`Connected motion state websocket to motion group ${d.motion_group}. Initial state:
|
|
5049
5072
|
`,
|
|
5050
|
-
|
|
5073
|
+
p
|
|
5051
5074
|
);
|
|
5052
|
-
const
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
)).configuration.kind === "VirtualController",
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
),
|
|
5060
|
-
([
|
|
5061
|
-
id:
|
|
5062
|
-
readable_name:
|
|
5063
|
-
position:
|
|
5064
|
-
orientation:
|
|
5075
|
+
const f = (await i.api.controller.getRobotController(
|
|
5076
|
+
n,
|
|
5077
|
+
l.controller
|
|
5078
|
+
)).configuration.kind === "VirtualController", y = await i.api.motionGroup.getMotionGroupDescription(
|
|
5079
|
+
n,
|
|
5080
|
+
s,
|
|
5081
|
+
d.motion_group
|
|
5082
|
+
), b = Object.entries(y.tcps || {}).map(
|
|
5083
|
+
([M, I]) => ({
|
|
5084
|
+
id: M,
|
|
5085
|
+
readable_name: I.name,
|
|
5086
|
+
position: I.pose.position,
|
|
5087
|
+
orientation: I.pose.orientation
|
|
5065
5088
|
})
|
|
5066
|
-
),
|
|
5067
|
-
`/cells/${
|
|
5068
|
-
),
|
|
5069
|
-
if (!
|
|
5089
|
+
), h = i.openReconnectingWebsocket(
|
|
5090
|
+
`/cells/${n}/controllers/${l.controller}/state-stream?response_rate=1000`
|
|
5091
|
+
), v = await h.firstMessage(), x = (C = W(v.data)) == null ? void 0 : C.result;
|
|
5092
|
+
if (!x)
|
|
5070
5093
|
throw new Error(
|
|
5071
|
-
`Unable to parse initial controller state message ${
|
|
5094
|
+
`Unable to parse initial controller state message ${v.data}`
|
|
5072
5095
|
);
|
|
5073
5096
|
return console.log(
|
|
5074
|
-
`Connected controller state websocket to controller ${
|
|
5097
|
+
`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
5075
5098
|
`,
|
|
5076
|
-
|
|
5099
|
+
x
|
|
5077
5100
|
), new gt(
|
|
5078
|
-
t,
|
|
5079
5101
|
i,
|
|
5080
|
-
|
|
5102
|
+
n,
|
|
5081
5103
|
l,
|
|
5082
|
-
u,
|
|
5083
5104
|
d,
|
|
5084
|
-
|
|
5085
|
-
|
|
5105
|
+
p,
|
|
5106
|
+
m,
|
|
5086
5107
|
f,
|
|
5087
|
-
|
|
5088
|
-
|
|
5108
|
+
b,
|
|
5109
|
+
y,
|
|
5110
|
+
x,
|
|
5111
|
+
h
|
|
5089
5112
|
);
|
|
5090
5113
|
}
|
|
5091
5114
|
get motionGroupId() {
|
|
@@ -5102,16 +5125,16 @@ class gt {
|
|
|
5102
5125
|
return this.joggingVelocity * Math.PI / 180;
|
|
5103
5126
|
}
|
|
5104
5127
|
get joints() {
|
|
5105
|
-
return this.initialMotionState.joint_position.map((
|
|
5128
|
+
return this.initialMotionState.joint_position.map((e, o) => ({
|
|
5106
5129
|
index: o
|
|
5107
5130
|
}));
|
|
5108
5131
|
}
|
|
5109
5132
|
// Please note that API v2 omits 0 values
|
|
5110
5133
|
get dhParameters() {
|
|
5111
5134
|
if (this.description.dh_parameters !== void 0)
|
|
5112
|
-
return this.description.dh_parameters.map((
|
|
5113
|
-
...
|
|
5114
|
-
...
|
|
5135
|
+
return this.description.dh_parameters.map((e) => ({
|
|
5136
|
+
...qo,
|
|
5137
|
+
...e
|
|
5115
5138
|
}));
|
|
5116
5139
|
}
|
|
5117
5140
|
get safetyZones() {
|
|
@@ -5119,9 +5142,9 @@ class gt {
|
|
|
5119
5142
|
}
|
|
5120
5143
|
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
5121
5144
|
get mountingPosition() {
|
|
5122
|
-
var
|
|
5145
|
+
var e, o, r;
|
|
5123
5146
|
return this.description.mounting ? [
|
|
5124
|
-
(((
|
|
5147
|
+
(((e = this.description.mounting.position) == null ? void 0 : e[0]) || 0) / 1e3,
|
|
5125
5148
|
(((o = this.description.mounting.position) == null ? void 0 : o[1]) || 0) / 1e3,
|
|
5126
5149
|
(((r = this.description.mounting.position) == null ? void 0 : r[2]) || 0) / 1e3
|
|
5127
5150
|
] : [0, 0, 0];
|
|
@@ -5129,11 +5152,11 @@ class gt {
|
|
|
5129
5152
|
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
5130
5153
|
get mountingQuaternion() {
|
|
5131
5154
|
var i, n, c, s, l, d;
|
|
5132
|
-
const
|
|
5155
|
+
const e = new Et.Vector3(
|
|
5133
5156
|
((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
|
|
5134
5157
|
((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
|
|
5135
5158
|
((d = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : d[2]) || 0
|
|
5136
|
-
), o =
|
|
5159
|
+
), o = e.length(), r = e.normalize();
|
|
5137
5160
|
return new Et.Quaternion().setFromAxisAngle(r, o);
|
|
5138
5161
|
}
|
|
5139
5162
|
/**
|
|
@@ -5190,10 +5213,10 @@ class gt {
|
|
|
5190
5213
|
), D(() => {
|
|
5191
5214
|
this.activationState = "inactive";
|
|
5192
5215
|
});
|
|
5193
|
-
} catch (
|
|
5216
|
+
} catch (e) {
|
|
5194
5217
|
throw D(() => {
|
|
5195
5218
|
this.activationState = "active";
|
|
5196
|
-
}),
|
|
5219
|
+
}), e;
|
|
5197
5220
|
}
|
|
5198
5221
|
}
|
|
5199
5222
|
async activate() {
|
|
@@ -5212,10 +5235,10 @@ class gt {
|
|
|
5212
5235
|
), D(() => {
|
|
5213
5236
|
this.activationState = "active";
|
|
5214
5237
|
});
|
|
5215
|
-
} catch (
|
|
5238
|
+
} catch (e) {
|
|
5216
5239
|
throw D(() => {
|
|
5217
5240
|
this.activationState = "inactive";
|
|
5218
|
-
}),
|
|
5241
|
+
}), e;
|
|
5219
5242
|
}
|
|
5220
5243
|
}
|
|
5221
5244
|
toggleActivation() {
|
|
@@ -5224,13 +5247,13 @@ class gt {
|
|
|
5224
5247
|
dispose() {
|
|
5225
5248
|
this.motionStateSocket.close(), this.connectedJoggingSocket && this.connectedJoggingSocket.close();
|
|
5226
5249
|
}
|
|
5227
|
-
setJoggingVelocity(
|
|
5228
|
-
this.joggingVelocity =
|
|
5250
|
+
setJoggingVelocity(e) {
|
|
5251
|
+
this.joggingVelocity = e;
|
|
5229
5252
|
}
|
|
5230
5253
|
}
|
|
5231
|
-
function
|
|
5232
|
-
var
|
|
5233
|
-
const
|
|
5254
|
+
function ee() {
|
|
5255
|
+
var e, o, r, i, n, c;
|
|
5256
|
+
const t = Ft({
|
|
5234
5257
|
palette: {
|
|
5235
5258
|
mode: "dark",
|
|
5236
5259
|
text: {
|
|
@@ -5324,7 +5347,7 @@ function te() {
|
|
|
5324
5347
|
}
|
|
5325
5348
|
});
|
|
5326
5349
|
return {
|
|
5327
|
-
...
|
|
5350
|
+
...t,
|
|
5328
5351
|
components: {
|
|
5329
5352
|
MuiCssBaseline: {
|
|
5330
5353
|
styleOverrides: {
|
|
@@ -5334,7 +5357,7 @@ function te() {
|
|
|
5334
5357
|
},
|
|
5335
5358
|
"html:hover, body:hover, *:hover": {
|
|
5336
5359
|
scrollbarWidth: "thin",
|
|
5337
|
-
scrollbarColor: `${
|
|
5360
|
+
scrollbarColor: `${t.palette.divider} transparent`
|
|
5338
5361
|
},
|
|
5339
5362
|
// Global styles for DataGrid filter popup
|
|
5340
5363
|
".MuiDataGrid-panelContent": {
|
|
@@ -5422,14 +5445,14 @@ function te() {
|
|
|
5422
5445
|
{
|
|
5423
5446
|
props: { color: "secondary", variant: "contained" },
|
|
5424
5447
|
style: {
|
|
5425
|
-
border: `1px solid ${
|
|
5426
|
-
background: (r = (o = (
|
|
5448
|
+
border: `1px solid ${t.palette.divider}`,
|
|
5449
|
+
background: (r = (o = (e = t.paletteExt) == null ? void 0 : e.secondary) == null ? void 0 : o.tonal) == null ? void 0 : r.toString()
|
|
5427
5450
|
}
|
|
5428
5451
|
},
|
|
5429
5452
|
{
|
|
5430
5453
|
props: { color: "secondary", variant: "outlined" },
|
|
5431
5454
|
style: {
|
|
5432
|
-
border: `1px solid ${
|
|
5455
|
+
border: `1px solid ${t.palette.divider}`
|
|
5433
5456
|
}
|
|
5434
5457
|
}
|
|
5435
5458
|
]
|
|
@@ -5438,9 +5461,9 @@ function te() {
|
|
|
5438
5461
|
styleOverrides: {
|
|
5439
5462
|
root: {
|
|
5440
5463
|
textTransform: "none",
|
|
5441
|
-
color:
|
|
5464
|
+
color: t.palette.text.secondary,
|
|
5442
5465
|
"&.Mui-selected": {
|
|
5443
|
-
color:
|
|
5466
|
+
color: t.palette.text.primary
|
|
5444
5467
|
}
|
|
5445
5468
|
}
|
|
5446
5469
|
}
|
|
@@ -5448,7 +5471,7 @@ function te() {
|
|
|
5448
5471
|
MuiTabs: {
|
|
5449
5472
|
styleOverrides: {
|
|
5450
5473
|
root: {
|
|
5451
|
-
background: (i =
|
|
5474
|
+
background: (i = t.palette.backgroundPaperElevation) == null ? void 0 : i[1]
|
|
5452
5475
|
}
|
|
5453
5476
|
}
|
|
5454
5477
|
},
|
|
@@ -5500,14 +5523,14 @@ function te() {
|
|
|
5500
5523
|
MuiFab: {
|
|
5501
5524
|
styleOverrides: {
|
|
5502
5525
|
root: {
|
|
5503
|
-
background: (c = (n =
|
|
5526
|
+
background: (c = (n = t.paletteExt) == null ? void 0 : n.secondary) == null ? void 0 : c.tonal
|
|
5504
5527
|
}
|
|
5505
5528
|
},
|
|
5506
5529
|
variants: [
|
|
5507
5530
|
{
|
|
5508
5531
|
props: { color: "primary" },
|
|
5509
5532
|
style: {
|
|
5510
|
-
background:
|
|
5533
|
+
background: t.palette.primary.main
|
|
5511
5534
|
}
|
|
5512
5535
|
}
|
|
5513
5536
|
]
|
|
@@ -5527,7 +5550,7 @@ function te() {
|
|
|
5527
5550
|
disabled: "rgba(241, 77, 66, 1)"
|
|
5528
5551
|
},
|
|
5529
5552
|
color: "rgba(255, 198, 198, 1)",
|
|
5530
|
-
labelColor:
|
|
5553
|
+
labelColor: t.palette.text.primary
|
|
5531
5554
|
},
|
|
5532
5555
|
Y: {
|
|
5533
5556
|
backgroundColor: "rgba(20, 151, 108, 1)",
|
|
@@ -5539,7 +5562,7 @@ function te() {
|
|
|
5539
5562
|
hovered: "rgba(28, 188, 135, 1)"
|
|
5540
5563
|
},
|
|
5541
5564
|
color: "rgba(215, 255, 242, 1)",
|
|
5542
|
-
labelColor:
|
|
5565
|
+
labelColor: t.palette.text.primary
|
|
5543
5566
|
},
|
|
5544
5567
|
Z: {
|
|
5545
5568
|
backgroundColor: "rgba(1, 87, 155, 1)",
|
|
@@ -5551,68 +5574,68 @@ function te() {
|
|
|
5551
5574
|
hovered: "rgba(2, 136, 209, 1)"
|
|
5552
5575
|
},
|
|
5553
5576
|
color: "rgba(210, 239, 255, 1)",
|
|
5554
|
-
labelColor:
|
|
5577
|
+
labelColor: t.palette.text.primary
|
|
5555
5578
|
}
|
|
5556
5579
|
}
|
|
5557
5580
|
},
|
|
5558
5581
|
JoggingJoint: {
|
|
5559
5582
|
Joint: {
|
|
5560
|
-
arrowColor:
|
|
5583
|
+
arrowColor: t.palette.text.primary
|
|
5561
5584
|
}
|
|
5562
5585
|
},
|
|
5563
5586
|
VelocitySlider: {
|
|
5564
|
-
sliderLegendColor:
|
|
5587
|
+
sliderLegendColor: t.palette.text.primary
|
|
5565
5588
|
}
|
|
5566
5589
|
}
|
|
5567
5590
|
}
|
|
5568
5591
|
};
|
|
5569
5592
|
}
|
|
5570
|
-
function
|
|
5571
|
-
const
|
|
5572
|
-
return
|
|
5593
|
+
function Yo() {
|
|
5594
|
+
const t = ee();
|
|
5595
|
+
return t.palette.mode = "light", t;
|
|
5573
5596
|
}
|
|
5574
|
-
function
|
|
5597
|
+
function Ri(t) {
|
|
5575
5598
|
var r, i, n, c;
|
|
5576
|
-
let
|
|
5577
|
-
((r =
|
|
5578
|
-
const o =
|
|
5579
|
-
return Ft(o,
|
|
5599
|
+
let e = !0;
|
|
5600
|
+
((r = t.palette) == null ? void 0 : r.mode) === "light" ? e = !1 : ((i = t.palette) == null ? void 0 : i.mode) !== "dark" && (e = !(typeof window < "u" && ((c = (n = window.matchMedia) == null ? void 0 : n.call(window, "(prefers-color-scheme: light)")) == null ? void 0 : c.matches)));
|
|
5601
|
+
const o = e ? ee() : Yo();
|
|
5602
|
+
return Ft(o, t);
|
|
5580
5603
|
}
|
|
5581
5604
|
export {
|
|
5582
|
-
|
|
5583
|
-
|
|
5605
|
+
pi as A,
|
|
5606
|
+
mi as C,
|
|
5584
5607
|
bt as J,
|
|
5585
|
-
|
|
5608
|
+
Jo as L,
|
|
5586
5609
|
ht as M,
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5610
|
+
wi as N,
|
|
5611
|
+
fi as P,
|
|
5612
|
+
Ti as R,
|
|
5613
|
+
Mi as S,
|
|
5614
|
+
Ii as T,
|
|
5615
|
+
_o as V,
|
|
5616
|
+
yo as W,
|
|
5617
|
+
_t as a,
|
|
5618
|
+
So as b,
|
|
5619
|
+
Ri as c,
|
|
5620
|
+
hi as d,
|
|
5621
|
+
bi as e,
|
|
5622
|
+
To as f,
|
|
5623
|
+
Mo as g,
|
|
5624
|
+
Ci as h,
|
|
5602
5625
|
st as i,
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5626
|
+
xi as j,
|
|
5627
|
+
yi as k,
|
|
5628
|
+
Si as l,
|
|
5629
|
+
vi as m,
|
|
5630
|
+
Fo as n,
|
|
5631
|
+
te as o,
|
|
5632
|
+
Lo as p,
|
|
5633
|
+
ki as q,
|
|
5634
|
+
Zt as r,
|
|
5612
5635
|
gt as s,
|
|
5613
5636
|
ft as t,
|
|
5614
5637
|
Ut as u,
|
|
5615
|
-
|
|
5638
|
+
vo as v,
|
|
5616
5639
|
Ht as w,
|
|
5617
|
-
|
|
5640
|
+
Co as x
|
|
5618
5641
|
};
|