@esrf/daiquiri-lib 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +117 -93
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +903 -733
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/scss/_monitorpanel.scss +1 -1
- package/src/scss/_numericstep.scss +23 -2
- package/src/scss/_panel.scss +5 -1
- package/src/index.ts +0 -66
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { map as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
function
|
|
1
|
+
import { jsxs as c, jsx as r, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { map as S, each as Ae } from "lodash";
|
|
3
|
+
import { Badge as A, ButtonGroup as ue, Button as y, OverlayTrigger as R, Popover as b, Container as L, Row as V, Col as O, Form as C, Tooltip as he, InputGroup as I, Alert as M, Tab as Me, Tabs as oe } from "react-bootstrap";
|
|
4
|
+
import { useMemo as te, forwardRef as De, useRef as F, useState as k, useEffect as P, Component as fe, Fragment as Ie, Children as ke, isValidElement as $e, cloneElement as Fe, Suspense as se } from "react";
|
|
5
|
+
import Y from "classnames";
|
|
6
|
+
import Re from "debug";
|
|
7
|
+
function Te(e) {
|
|
8
8
|
const {
|
|
9
9
|
activeMessage: t = "Online",
|
|
10
10
|
inactiveMessage: n = "Offline",
|
|
@@ -18,14 +18,14 @@ function Ie(e) {
|
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function T(e) {
|
|
22
22
|
const { name: t, icon: n } = e;
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ c("div", { className: "icon", title: t, children: [
|
|
24
24
|
/* @__PURE__ */ r("i", { className: `fa ${n}` }),
|
|
25
|
-
/* @__PURE__ */ r(
|
|
25
|
+
/* @__PURE__ */ r(Te, { ...e })
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function _e(e) {
|
|
29
29
|
const t = {
|
|
30
30
|
24: "Y",
|
|
31
31
|
21: "Z",
|
|
@@ -50,35 +50,33 @@ function De(e) {
|
|
|
50
50
|
multiplier: 10 ** -a
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function He(e) {
|
|
54
54
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function me(e) {
|
|
57
57
|
if (e < 60)
|
|
58
58
|
return `${Math.round(e)} sec`;
|
|
59
59
|
const t = Math.round(e / 60), n = t % 60, i = Math.floor(t / 60);
|
|
60
60
|
return i ? `${i} hr ${n} min` : `${n} min`;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Le(e) {
|
|
63
63
|
return e > 0 ? (662607004e-42 * 299792458 / (e * 1e-10) / 160218e-24 * 1e-3).toFixed(4) : 0;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ve(e, t) {
|
|
66
66
|
return Number.parseFloat(e.toFixed(t));
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
69
69
|
__proto__: null,
|
|
70
|
-
formatEng:
|
|
71
|
-
round:
|
|
72
|
-
toEnergy:
|
|
73
|
-
toHoursMins:
|
|
74
|
-
ucfirst:
|
|
70
|
+
formatEng: _e,
|
|
71
|
+
round: Ve,
|
|
72
|
+
toEnergy: Le,
|
|
73
|
+
toHoursMins: me,
|
|
74
|
+
ucfirst: He
|
|
75
75
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
76
|
-
function
|
|
76
|
+
function Pe(e) {
|
|
77
77
|
const { hardware: t } = e;
|
|
78
|
-
function n(
|
|
79
|
-
t.
|
|
80
|
-
function: "reset"
|
|
81
|
-
});
|
|
78
|
+
function n() {
|
|
79
|
+
t.actions.call("reset");
|
|
82
80
|
}
|
|
83
81
|
const i = {
|
|
84
82
|
"Front End": "feitlk",
|
|
@@ -87,50 +85,50 @@ function Te(e) {
|
|
|
87
85
|
}, a = {
|
|
88
86
|
Current: `${t.properties.current.toFixed(1)} mA`,
|
|
89
87
|
Mode: t.properties.mode,
|
|
90
|
-
Refill:
|
|
88
|
+
Refill: me(t.properties.refill),
|
|
91
89
|
Message: /* @__PURE__ */ r("pre", { children: t.properties.message })
|
|
92
90
|
};
|
|
93
|
-
function o(
|
|
94
|
-
if (!(
|
|
91
|
+
function o(l) {
|
|
92
|
+
if (!(l in t.properties))
|
|
95
93
|
return "UNKNOWN";
|
|
96
|
-
const
|
|
97
|
-
return !
|
|
94
|
+
const s = t.properties[l];
|
|
95
|
+
return !s || typeof s != "string" ? "UNKNOWN" : s;
|
|
98
96
|
}
|
|
99
97
|
return /* @__PURE__ */ r(
|
|
100
98
|
R,
|
|
101
99
|
{
|
|
102
100
|
trigger: "click",
|
|
103
101
|
rootClose: !0,
|
|
104
|
-
overlay: /* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
102
|
+
overlay: /* @__PURE__ */ c(b, { id: "popid", children: [
|
|
103
|
+
/* @__PURE__ */ c(b.Header, { children: [
|
|
106
104
|
t.name,
|
|
107
105
|
" Details"
|
|
108
106
|
] }),
|
|
109
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ c(b.Body, { children: [
|
|
110
108
|
/* @__PURE__ */ r("h6", { children: "Status" }),
|
|
111
109
|
/* @__PURE__ */ r("pre", { children: t.properties.status }),
|
|
112
110
|
/* @__PURE__ */ r("h6", { children: "Interlocks" }),
|
|
113
|
-
/* @__PURE__ */ r(
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
111
|
+
/* @__PURE__ */ r(L, { children: S(i, (l, s) => /* @__PURE__ */ c(V, { children: [
|
|
112
|
+
/* @__PURE__ */ c(O, { children: [
|
|
113
|
+
s,
|
|
116
114
|
":"
|
|
117
115
|
] }),
|
|
118
|
-
/* @__PURE__ */ r(
|
|
119
|
-
|
|
116
|
+
/* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(
|
|
117
|
+
A,
|
|
120
118
|
{
|
|
121
|
-
bg: o(
|
|
122
|
-
children: o(
|
|
119
|
+
bg: o(l) === "ON" ? "success" : "danger",
|
|
120
|
+
children: o(l)
|
|
123
121
|
}
|
|
124
122
|
) })
|
|
125
|
-
] },
|
|
123
|
+
] }, s)) }),
|
|
126
124
|
/* @__PURE__ */ r("h6", { children: "Ring Status" }),
|
|
127
|
-
/* @__PURE__ */ r(
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
125
|
+
/* @__PURE__ */ r(L, { children: S(a, (l, s) => /* @__PURE__ */ c(V, { children: [
|
|
126
|
+
/* @__PURE__ */ c(O, { children: [
|
|
127
|
+
s,
|
|
130
128
|
":"
|
|
131
129
|
] }),
|
|
132
|
-
/* @__PURE__ */ r(
|
|
133
|
-
] },
|
|
130
|
+
/* @__PURE__ */ r(O, { children: l })
|
|
131
|
+
] }, s)) }),
|
|
134
132
|
/* @__PURE__ */ r("div", { className: "d-grid gap-2", children: /* @__PURE__ */ r(y, { disabled: e.disabled, onClick: n, children: "Reset" }) })
|
|
135
133
|
] })
|
|
136
134
|
] }),
|
|
@@ -138,17 +136,17 @@ function Te(e) {
|
|
|
138
136
|
}
|
|
139
137
|
);
|
|
140
138
|
}
|
|
141
|
-
function
|
|
139
|
+
function zt(e) {
|
|
142
140
|
const { hardware: t, options: n = {} } = e;
|
|
143
|
-
function i(
|
|
144
|
-
t.
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
function i() {
|
|
142
|
+
t.actions.call(
|
|
143
|
+
t.properties.frontend === "FE open" ? "close" : "open"
|
|
144
|
+
);
|
|
147
145
|
}
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ c("div", { className: "hw-component", children: [
|
|
147
|
+
/* @__PURE__ */ c("div", { className: "hw-head", children: [
|
|
150
148
|
/* @__PURE__ */ r(
|
|
151
|
-
|
|
149
|
+
T,
|
|
152
150
|
{
|
|
153
151
|
name: "Frontend",
|
|
154
152
|
icon: "fam-hardware-frontend",
|
|
@@ -157,14 +155,14 @@ function Pt(e) {
|
|
|
157
155
|
),
|
|
158
156
|
/* @__PURE__ */ r("div", { className: "name", children: t.name }),
|
|
159
157
|
/* @__PURE__ */ r(
|
|
160
|
-
|
|
158
|
+
A,
|
|
161
159
|
{
|
|
162
160
|
bg: t.properties.state === "OPEN" || t.properties.state === "RUNNING" ? "success" : "danger",
|
|
163
161
|
children: t.properties.state
|
|
164
162
|
}
|
|
165
163
|
)
|
|
166
164
|
] }),
|
|
167
|
-
/* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */ c(ue, { className: "d-flex", children: [
|
|
168
166
|
/* @__PURE__ */ r(
|
|
169
167
|
y,
|
|
170
168
|
{
|
|
@@ -174,11 +172,11 @@ function Pt(e) {
|
|
|
174
172
|
children: t.properties.frontend === "FE open" ? "Close" : "Open"
|
|
175
173
|
}
|
|
176
174
|
),
|
|
177
|
-
/* @__PURE__ */ r(
|
|
175
|
+
/* @__PURE__ */ r(Pe, { ...e })
|
|
178
176
|
] }) })
|
|
179
177
|
] });
|
|
180
178
|
}
|
|
181
|
-
function
|
|
179
|
+
function Bt(e) {
|
|
182
180
|
const { hardware: t, options: n = {} } = e;
|
|
183
181
|
function i() {
|
|
184
182
|
const a = n.property;
|
|
@@ -187,14 +185,14 @@ function Vt(e) {
|
|
|
187
185
|
if (a === null)
|
|
188
186
|
return "property is null";
|
|
189
187
|
let o = t;
|
|
190
|
-
for (const
|
|
191
|
-
if (o = o[
|
|
188
|
+
for (const l of a.split("/"))
|
|
189
|
+
if (o = o[l], o === void 0)
|
|
192
190
|
return `property '${a}' not found`;
|
|
193
191
|
return `${o}`;
|
|
194
192
|
}
|
|
195
193
|
return /* @__PURE__ */ r(v, { children: i() });
|
|
196
194
|
}
|
|
197
|
-
function
|
|
195
|
+
function G(e) {
|
|
198
196
|
const { headerMode: t, hardware: n } = e;
|
|
199
197
|
function i() {
|
|
200
198
|
return n.alias ? n.alias : n.name ? n.name : n.id;
|
|
@@ -202,7 +200,7 @@ function Y(e) {
|
|
|
202
200
|
const a = i();
|
|
203
201
|
switch (t) {
|
|
204
202
|
case "front":
|
|
205
|
-
return /* @__PURE__ */ r("div", { className: "hw-component", children: /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ r("div", { className: "hw-component", children: /* @__PURE__ */ c("div", { className: "hw-single", children: [
|
|
206
204
|
e.widgetIcon,
|
|
207
205
|
/* @__PURE__ */ r("div", { className: "name", children: a }),
|
|
208
206
|
/* @__PURE__ */ r("div", { className: "d-inline-block", children: e.widgetContent })
|
|
@@ -212,10 +210,10 @@ function Y(e) {
|
|
|
212
210
|
case "state":
|
|
213
211
|
return e.widgetState;
|
|
214
212
|
default:
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ c("div", { className: "hw-component", children: [
|
|
214
|
+
/* @__PURE__ */ c("div", { className: "hw-head", children: [
|
|
217
215
|
e.widgetIcon,
|
|
218
|
-
/* @__PURE__ */ r("div", { className: "name", children: /* @__PURE__ */ r(
|
|
216
|
+
/* @__PURE__ */ r("div", { className: "name", children: /* @__PURE__ */ r(C.Label, { htmlFor: n.id, children: a }) }),
|
|
219
217
|
e.widgetState,
|
|
220
218
|
e.hardware.errors && e.hardware.errors.length > 0 && /* @__PURE__ */ r(
|
|
221
219
|
R,
|
|
@@ -223,14 +221,14 @@ function Y(e) {
|
|
|
223
221
|
trigger: "click",
|
|
224
222
|
placement: "bottom",
|
|
225
223
|
rootClose: !0,
|
|
226
|
-
overlay: /* @__PURE__ */
|
|
224
|
+
overlay: /* @__PURE__ */ c(b, { id: e.hardware.id, style: { maxWidth: 500 }, children: [
|
|
227
225
|
/* @__PURE__ */ r(b.Header, { children: "Device Errors" }),
|
|
228
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ c(b.Body, { children: [
|
|
229
227
|
"There were errors with properties on this device:",
|
|
230
|
-
/* @__PURE__ */ r("ul", { children: e.hardware.errors.map((o) => /* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ r("ul", { children: e.hardware.errors.map((o) => /* @__PURE__ */ c("li", { children: [
|
|
231
229
|
o.property,
|
|
232
230
|
":",
|
|
233
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ c("span", { className: "stack-trace", children: [
|
|
234
232
|
o.traceback,
|
|
235
233
|
/* @__PURE__ */ r("br", {}),
|
|
236
234
|
o.exception
|
|
@@ -246,143 +244,270 @@ function Y(e) {
|
|
|
246
244
|
] });
|
|
247
245
|
}
|
|
248
246
|
}
|
|
249
|
-
function
|
|
247
|
+
function U(e) {
|
|
250
248
|
const t = {
|
|
251
249
|
display: "inline-block",
|
|
252
250
|
minWidth: ""
|
|
253
251
|
};
|
|
254
|
-
return e.minWidth && (t.minWidth = `${e.minWidth}em`), /* @__PURE__ */ r("div", { style: t, children: /* @__PURE__ */ r(
|
|
252
|
+
return e.minWidth && (t.minWidth = `${e.minWidth}em`), /* @__PURE__ */ r("div", { style: t, children: /* @__PURE__ */ r(A, { bg: e.variant, title: e.description, children: e.state }) });
|
|
255
253
|
}
|
|
256
|
-
function
|
|
257
|
-
const {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
254
|
+
function pe(e) {
|
|
255
|
+
const { states: t, variants: n = {}, descriptions: i = {}, minWidth: a } = e, o = t[0] ?? "";
|
|
256
|
+
if (t.length === 0)
|
|
257
|
+
return /* @__PURE__ */ r(
|
|
258
|
+
U,
|
|
259
|
+
{
|
|
260
|
+
state: "NoState",
|
|
261
|
+
variant: "fatal",
|
|
262
|
+
description: "The device no not expose any state",
|
|
263
|
+
minWidth: a
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
if (t.length === 1)
|
|
267
|
+
return /* @__PURE__ */ r(
|
|
268
|
+
U,
|
|
269
|
+
{
|
|
270
|
+
state: o,
|
|
271
|
+
variant: n[o] ?? "fatal",
|
|
272
|
+
description: i[o],
|
|
273
|
+
minWidth: a
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
const l = {
|
|
277
|
+
display: "inline-block",
|
|
278
|
+
minWidth: a ? `${a}em` : ""
|
|
279
|
+
};
|
|
280
|
+
function s(u) {
|
|
281
|
+
return /* @__PURE__ */ r(he, { id: "device-state", ...u, children: t.map((h, f) => {
|
|
282
|
+
const d = i[h], m = h.startsWith("_") ? h.slice(1) : h;
|
|
283
|
+
return /* @__PURE__ */ c(V, { className: "gx-0", children: [
|
|
284
|
+
/* @__PURE__ */ r(O, { sm: "3", className: "text-end", children: /* @__PURE__ */ r(A, { className: "text-right", bg: n[h] ?? "fatal", children: m }) }),
|
|
285
|
+
/* @__PURE__ */ r(O, { sm: "9", className: "text-start lh-1 my-auto ps-1", children: d })
|
|
286
|
+
] });
|
|
287
|
+
}) });
|
|
263
288
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
J,
|
|
289
|
+
return /* @__PURE__ */ r("div", { style: l, children: /* @__PURE__ */ r(
|
|
290
|
+
R,
|
|
267
291
|
{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
292
|
+
placement: "top",
|
|
293
|
+
delay: { show: 250, hide: 400 },
|
|
294
|
+
overlay: s,
|
|
295
|
+
children: /* @__PURE__ */ c("span", { className: "text-nowrap", children: [
|
|
296
|
+
/* @__PURE__ */ r(A, { className: "rounded-end-0", bg: n[o] ?? "fatal", children: o }),
|
|
297
|
+
/* @__PURE__ */ c(A, { className: "rounded-start-0", bg: "secondary", children: [
|
|
298
|
+
"+",
|
|
299
|
+
t.length - 1
|
|
300
|
+
] })
|
|
301
|
+
] })
|
|
271
302
|
}
|
|
272
|
-
);
|
|
303
|
+
) });
|
|
273
304
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
305
|
+
const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
306
|
+
__proto__: null,
|
|
307
|
+
HardwareMultiState: pe,
|
|
308
|
+
HardwareState: U
|
|
309
|
+
}, Symbol.toStringTag, { value: "Module" })), Z = {
|
|
310
|
+
description: "Unknown state is exposed",
|
|
311
|
+
variant: "fatal",
|
|
312
|
+
priority: 100
|
|
313
|
+
}, j = {
|
|
314
|
+
// Reserved by Daiquiri
|
|
315
|
+
OFFLINE: {
|
|
316
|
+
description: "Axis is offline",
|
|
317
|
+
variant: "secondary",
|
|
318
|
+
priority: 0
|
|
319
|
+
},
|
|
320
|
+
// Real hardware state
|
|
321
|
+
MOVING: {
|
|
322
|
+
description: "Axis is moving",
|
|
323
|
+
variant: "warning",
|
|
324
|
+
priority: 10
|
|
325
|
+
},
|
|
326
|
+
FAULT: {
|
|
327
|
+
description: "Axis is in fault",
|
|
328
|
+
variant: "danger",
|
|
329
|
+
priority: 20
|
|
330
|
+
},
|
|
331
|
+
// Reserved by Daiquiri
|
|
332
|
+
LOCKED: {
|
|
333
|
+
description: "Axis is locked",
|
|
334
|
+
variant: "warning",
|
|
335
|
+
priority: 25
|
|
336
|
+
},
|
|
337
|
+
OFF: {
|
|
338
|
+
description: "Power is off",
|
|
339
|
+
variant: "secondary",
|
|
340
|
+
priority: 30
|
|
341
|
+
},
|
|
342
|
+
DISABLED: {
|
|
343
|
+
description: "Axis is disabled",
|
|
344
|
+
variant: "warning",
|
|
345
|
+
priority: 40
|
|
346
|
+
},
|
|
347
|
+
LOWLIMIT: {
|
|
348
|
+
description: "Low limit is reached",
|
|
349
|
+
variant: "warning",
|
|
350
|
+
priority: 50
|
|
351
|
+
},
|
|
352
|
+
HIGHLIMIT: {
|
|
353
|
+
description: "High limit is reached",
|
|
354
|
+
variant: "warning",
|
|
355
|
+
priority: 51
|
|
356
|
+
},
|
|
357
|
+
HOME: {
|
|
358
|
+
description: "Home signal active",
|
|
359
|
+
variant: "info",
|
|
360
|
+
priority: 52
|
|
361
|
+
},
|
|
362
|
+
READY: {
|
|
363
|
+
description: "Ready to handle request",
|
|
364
|
+
variant: "success",
|
|
365
|
+
priority: 60
|
|
366
|
+
},
|
|
367
|
+
// Reserved by Daiquiri
|
|
368
|
+
NOT_READY: {
|
|
369
|
+
description: "Not ready",
|
|
370
|
+
variant: "warning",
|
|
371
|
+
priority: 100
|
|
372
|
+
},
|
|
373
|
+
// Reserved by Daiquiri
|
|
374
|
+
UNKNOWN: Z
|
|
375
|
+
};
|
|
376
|
+
function Ye(e) {
|
|
377
|
+
const { hardware: t } = e, { locked: n = null } = t, { state: i = ["UNKNOWN"] } = t.properties, [a, o] = te(() => {
|
|
277
378
|
if (!t.online)
|
|
278
|
-
return "OFFLINE";
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
const i = n();
|
|
283
|
-
function a() {
|
|
284
|
-
switch (i) {
|
|
285
|
-
case "READY":
|
|
286
|
-
return "success";
|
|
287
|
-
case "OPEN":
|
|
288
|
-
return "success";
|
|
289
|
-
case "CLOSED":
|
|
290
|
-
return "danger";
|
|
291
|
-
case "DISABLED":
|
|
292
|
-
return "secondary";
|
|
293
|
-
case "MOVING":
|
|
294
|
-
case "STANDBY":
|
|
295
|
-
case "OFFLINE":
|
|
296
|
-
return "warning";
|
|
297
|
-
case "FAULT":
|
|
298
|
-
return "fatal";
|
|
299
|
-
default:
|
|
300
|
-
return "fatal";
|
|
379
|
+
return [["OFFLINE"], void 0];
|
|
380
|
+
function l(d, m) {
|
|
381
|
+
const N = j[d] ?? Z, $ = j[m] ?? Z;
|
|
382
|
+
return N.priority - $.priority;
|
|
301
383
|
}
|
|
302
|
-
|
|
303
|
-
|
|
384
|
+
const s = [
|
|
385
|
+
...i,
|
|
386
|
+
...n !== null ? ["LOCKED"] : [],
|
|
387
|
+
...i.length === 0 ? ["NOT_READY"] : []
|
|
388
|
+
];
|
|
389
|
+
s.sort(l);
|
|
390
|
+
function u(d) {
|
|
391
|
+
const m = d.split(":", 2);
|
|
392
|
+
return m.length === 1 ? [d, void 0] : m;
|
|
393
|
+
}
|
|
394
|
+
const h = {};
|
|
395
|
+
return [s.map((d) => {
|
|
396
|
+
if (d.startsWith("_")) {
|
|
397
|
+
const m = u(d);
|
|
398
|
+
return m[1] !== void 0 && (h[m[0]] = m[1]), m[0];
|
|
399
|
+
}
|
|
400
|
+
return d === "LOCKED" ? h[d] = `Locked by ${n}` : h[d] = j[d].description ?? "", d;
|
|
401
|
+
}), h];
|
|
402
|
+
}, [i, t.online, n]);
|
|
403
|
+
return /* @__PURE__ */ r(
|
|
404
|
+
pe,
|
|
405
|
+
{
|
|
406
|
+
states: a,
|
|
407
|
+
descriptions: o,
|
|
408
|
+
minWidth: 6,
|
|
409
|
+
variants: Object.fromEntries(
|
|
410
|
+
Object.entries(j).map(([l, s]) => [l, s.variant])
|
|
411
|
+
)
|
|
412
|
+
}
|
|
413
|
+
);
|
|
304
414
|
}
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
MotorState: ce,
|
|
309
|
-
ShutterState: de
|
|
310
|
-
}, Symbol.toStringTag, { value: "Module" })), He = Oe((e, t) => {
|
|
311
|
-
const n = T(null), [i, a] = I(e.step), o = (w) => {
|
|
312
|
-
const z = t;
|
|
415
|
+
const je = De((e, t) => {
|
|
416
|
+
const n = F(null), i = F(), [a, o] = k(e.step), [l, s] = k(!1), u = (p) => {
|
|
417
|
+
const q = t;
|
|
313
418
|
if (n.current === null)
|
|
314
419
|
return;
|
|
315
|
-
let
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
420
|
+
let _ = Number.parseFloat(q.current.value);
|
|
421
|
+
if (n.current.value.startsWith("*")) {
|
|
422
|
+
const H = Number.parseFloat(
|
|
423
|
+
n.current.value.replace("*", "")
|
|
424
|
+
);
|
|
425
|
+
_ = p ? _ * H : _ / H;
|
|
426
|
+
} else {
|
|
427
|
+
const H = Number.parseFloat(n.current.value);
|
|
428
|
+
_ += p ? H : -H;
|
|
429
|
+
}
|
|
430
|
+
q.current.value = `${_}`, e.onStep && e.onStep({
|
|
431
|
+
target: q.current
|
|
319
432
|
});
|
|
320
433
|
}, {
|
|
321
|
-
onStep:
|
|
322
|
-
step:
|
|
323
|
-
overlay:
|
|
324
|
-
incIcon:
|
|
325
|
-
decIcon:
|
|
326
|
-
swapIncDec:
|
|
327
|
-
onKeyDown:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
434
|
+
onStep: h,
|
|
435
|
+
step: f,
|
|
436
|
+
overlay: d,
|
|
437
|
+
incIcon: m,
|
|
438
|
+
decIcon: N,
|
|
439
|
+
swapIncDec: $,
|
|
440
|
+
onKeyDown: x,
|
|
441
|
+
onBlur: ne,
|
|
442
|
+
horizontalArrows: Se,
|
|
443
|
+
largeArrows: Ee,
|
|
444
|
+
...re
|
|
445
|
+
} = e, ie = (p) => {
|
|
446
|
+
p.key === "ArrowUp" ? (p.preventDefault(), s(!0), u(!0)) : p.key === "ArrowDown" ? (p.preventDefault(), s(!0), u(!1)) : x && x(p);
|
|
447
|
+
};
|
|
448
|
+
l && (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
449
|
+
var p;
|
|
450
|
+
(p = t == null ? void 0 : t.current) == null || p.focus();
|
|
451
|
+
}, 100)), P(() => () => {
|
|
452
|
+
i.current && clearTimeout(i.current);
|
|
453
|
+
}, []);
|
|
454
|
+
const ae = () => {
|
|
455
|
+
i.current && clearTimeout(i.current), s(!1), ne && ne();
|
|
333
456
|
};
|
|
334
457
|
if (!e.step)
|
|
335
458
|
return /* @__PURE__ */ r(
|
|
336
|
-
|
|
459
|
+
C.Control,
|
|
337
460
|
{
|
|
338
461
|
ref: t,
|
|
339
462
|
type: "number",
|
|
340
463
|
step: "any",
|
|
341
|
-
onKeyDown:
|
|
342
|
-
|
|
464
|
+
onKeyDown: ie,
|
|
465
|
+
onBlur: ae,
|
|
466
|
+
...re
|
|
343
467
|
}
|
|
344
468
|
);
|
|
345
|
-
const
|
|
469
|
+
const xe = S(e.steps || [e.step], (p) => /* @__PURE__ */ r("option", { value: p, children: p }, p));
|
|
346
470
|
return /* @__PURE__ */ r(
|
|
347
471
|
"div",
|
|
348
472
|
{
|
|
349
|
-
className:
|
|
350
|
-
"numeric-step-large":
|
|
351
|
-
"numeric-step-horizontal":
|
|
473
|
+
className: Y("numeric-step", {
|
|
474
|
+
"numeric-step-large": Ee,
|
|
475
|
+
"numeric-step-horizontal": Se
|
|
352
476
|
}),
|
|
353
|
-
children: /* @__PURE__ */
|
|
477
|
+
children: /* @__PURE__ */ c(I, { children: [
|
|
354
478
|
/* @__PURE__ */ r(
|
|
355
|
-
|
|
479
|
+
C.Control,
|
|
356
480
|
{
|
|
357
|
-
onKeyDown:
|
|
481
|
+
onKeyDown: ie,
|
|
482
|
+
onBlur: ae,
|
|
358
483
|
ref: t,
|
|
359
484
|
type: "number",
|
|
360
485
|
step: "any",
|
|
361
|
-
...
|
|
486
|
+
...re
|
|
362
487
|
}
|
|
363
488
|
),
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
|
|
366
|
-
!
|
|
489
|
+
/* @__PURE__ */ c(v, { children: [
|
|
490
|
+
d,
|
|
491
|
+
!d && /* @__PURE__ */ c(I.Text, { className: "d-flex flex-column", children: [
|
|
367
492
|
/* @__PURE__ */ r(
|
|
368
|
-
|
|
493
|
+
C.Control,
|
|
369
494
|
{
|
|
370
495
|
ref: n,
|
|
371
496
|
as: "select",
|
|
372
497
|
className: "step-size",
|
|
373
|
-
defaultValue:
|
|
374
|
-
onChange: (
|
|
375
|
-
children:
|
|
498
|
+
defaultValue: a,
|
|
499
|
+
onChange: (p) => o(Number.parseFloat(p.target.value)),
|
|
500
|
+
children: xe
|
|
376
501
|
}
|
|
377
502
|
),
|
|
378
503
|
e.unit && /* @__PURE__ */ r("div", { children: e.unit }),
|
|
379
|
-
!
|
|
504
|
+
!m && !N && /* @__PURE__ */ c(v, { children: [
|
|
380
505
|
/* @__PURE__ */ r(
|
|
381
506
|
y,
|
|
382
507
|
{
|
|
383
508
|
className: "step step-up",
|
|
384
509
|
disabled: e.disabled,
|
|
385
|
-
onClick: (
|
|
510
|
+
onClick: (p) => u(!0)
|
|
386
511
|
}
|
|
387
512
|
),
|
|
388
513
|
/* @__PURE__ */ r(
|
|
@@ -390,64 +515,70 @@ const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
390
515
|
{
|
|
391
516
|
className: "step step-down",
|
|
392
517
|
disabled: e.disabled,
|
|
393
|
-
onClick: (
|
|
518
|
+
onClick: (p) => u(!1)
|
|
394
519
|
}
|
|
395
520
|
)
|
|
396
521
|
] })
|
|
397
522
|
] }),
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
523
|
+
N && $ && /* @__PURE__ */ r(y, { disabled: e.disabled, onClick: (p) => u(!1), children: /* @__PURE__ */ r("i", { className: `fa fa-fw fa-${N}` }) }),
|
|
524
|
+
m && /* @__PURE__ */ r(y, { disabled: e.disabled, onClick: (p) => u(!0), children: /* @__PURE__ */ r("i", { className: `fa fa-fw fa-${m}` }) }),
|
|
525
|
+
N && !$ && /* @__PURE__ */ r(y, { disabled: e.disabled, onClick: (p) => u(!1), children: /* @__PURE__ */ r("i", { className: `fa fa-fw fa-${N}` }) })
|
|
401
526
|
] })
|
|
402
527
|
] })
|
|
403
528
|
}
|
|
404
529
|
);
|
|
405
|
-
}),
|
|
406
|
-
function
|
|
407
|
-
const t =
|
|
408
|
-
|
|
409
|
-
t.current && (e.hardwareValue === null ? t.current.value = "" : t.current.value = e.hardwareValue.toString(), i(!1));
|
|
530
|
+
}), Ke = je;
|
|
531
|
+
function Ue(e) {
|
|
532
|
+
const t = F(null), [n, i] = k(!1), [a, o] = k(!1);
|
|
533
|
+
P(() => {
|
|
534
|
+
t.current && (e.hardwareValue === null ? t.current.value = "" : e.precision !== void 0 ? t.current.value = e.hardwareValue.toFixed(e.precision) : t.current.value = e.hardwareValue.toString(), i(!1));
|
|
410
535
|
}, [e.hardwareValue]);
|
|
411
|
-
function d
|
|
412
|
-
let m =
|
|
536
|
+
function l(d) {
|
|
537
|
+
let m = d;
|
|
413
538
|
e.precision !== void 0 && (m = Number.parseFloat(m).toFixed(e.precision)), t != null && t.current && (t.current.value = m);
|
|
414
539
|
}
|
|
415
|
-
function
|
|
540
|
+
function s() {
|
|
416
541
|
n && setTimeout(() => {
|
|
417
|
-
|
|
542
|
+
l(e.hardwareValue), i(!1);
|
|
418
543
|
}, 3e3);
|
|
419
544
|
}
|
|
420
|
-
function
|
|
421
|
-
e.hardwareValue !== null &&
|
|
545
|
+
function u(d) {
|
|
546
|
+
e.hardwareValue !== null && i(d.target.value !== e.hardwareValue.toString());
|
|
422
547
|
}
|
|
423
|
-
function
|
|
424
|
-
i(!1)
|
|
548
|
+
function h(d) {
|
|
549
|
+
i(!1);
|
|
550
|
+
const m = e.onMoveRequested(d.target.value);
|
|
551
|
+
m && m.catch(() => {
|
|
552
|
+
o(!0), setTimeout(() => {
|
|
553
|
+
l(e.hardwareValue), o(!1);
|
|
554
|
+
}, 2e3);
|
|
555
|
+
});
|
|
425
556
|
}
|
|
426
|
-
function
|
|
427
|
-
switch (
|
|
557
|
+
function f(d) {
|
|
558
|
+
switch (d.key) {
|
|
428
559
|
case "Enter":
|
|
429
560
|
{
|
|
430
561
|
i(!1);
|
|
431
|
-
const m = Number.parseFloat(
|
|
432
|
-
|
|
562
|
+
const m = Number.parseFloat(d.target.value), N = e.onMoveRequested(m);
|
|
563
|
+
N && N.catch(() => {
|
|
433
564
|
o(!0), setTimeout(() => {
|
|
434
|
-
|
|
565
|
+
l(e.hardwareValue), o(!1);
|
|
435
566
|
}, 2e3);
|
|
436
567
|
});
|
|
437
568
|
}
|
|
438
|
-
|
|
569
|
+
d.preventDefault(), d.stopPropagation();
|
|
439
570
|
break;
|
|
440
571
|
case "Esc":
|
|
441
572
|
case "Escape":
|
|
442
|
-
n && (o(!1), i(!1),
|
|
573
|
+
n && (o(!1), i(!1), l(e.hardwareValue)), d.target.blur(), d.preventDefault(), d.stopPropagation();
|
|
443
574
|
break;
|
|
444
575
|
}
|
|
445
576
|
}
|
|
446
577
|
return /* @__PURE__ */ r(
|
|
447
|
-
|
|
578
|
+
Ke,
|
|
448
579
|
{
|
|
449
580
|
id: e.id,
|
|
450
|
-
className:
|
|
581
|
+
className: Y({
|
|
451
582
|
"form-control-edited": n,
|
|
452
583
|
"form-control-error": a,
|
|
453
584
|
"hw-moving": e.hardwareIsMoving
|
|
@@ -455,10 +586,10 @@ function Pe(e) {
|
|
|
455
586
|
type: e.readOnly ? "text" : "number",
|
|
456
587
|
ref: t,
|
|
457
588
|
precision: e.precision,
|
|
458
|
-
onChange:
|
|
459
|
-
onBlur:
|
|
460
|
-
onStep:
|
|
461
|
-
onKeyDown:
|
|
589
|
+
onChange: u,
|
|
590
|
+
onBlur: s,
|
|
591
|
+
onStep: h,
|
|
592
|
+
onKeyDown: f,
|
|
462
593
|
disabled: e.hardwareIsDisabled || e.readOnly || !e.hardwareIsReady,
|
|
463
594
|
step: e.step,
|
|
464
595
|
steps: e.steps,
|
|
@@ -471,106 +602,112 @@ function Pe(e) {
|
|
|
471
602
|
}
|
|
472
603
|
);
|
|
473
604
|
}
|
|
474
|
-
function
|
|
475
|
-
const t =
|
|
476
|
-
function
|
|
477
|
-
return e.precision !== void 0 ? Number.parseFloat(
|
|
605
|
+
function le(e) {
|
|
606
|
+
const t = F(null), [n, i] = k(!1), [a, o] = k(!1);
|
|
607
|
+
function l(f) {
|
|
608
|
+
return e.precision !== void 0 ? Number.parseFloat(f).toFixed(e.precision) : f;
|
|
478
609
|
}
|
|
479
|
-
|
|
480
|
-
var
|
|
481
|
-
t.current && (t.current.value =
|
|
610
|
+
P(() => {
|
|
611
|
+
var f;
|
|
612
|
+
t.current && (t.current.value = l((f = e.hardwareValue) == null ? void 0 : f.toString()), i(!1));
|
|
482
613
|
}, [e.hardwareValue, e.precision]);
|
|
483
|
-
function
|
|
484
|
-
const
|
|
485
|
-
t != null && t.current && (t.current.value =
|
|
614
|
+
function s(f) {
|
|
615
|
+
const d = l(f);
|
|
616
|
+
t != null && t.current && (t.current.value = d);
|
|
486
617
|
}
|
|
487
|
-
function
|
|
488
|
-
switch (
|
|
618
|
+
function u(f) {
|
|
619
|
+
switch (f.key) {
|
|
489
620
|
case "Enter": {
|
|
490
621
|
i(!1);
|
|
491
|
-
const
|
|
622
|
+
const d = Number.parseFloat(f.target.value), m = e.onMoveRequested(d);
|
|
492
623
|
m && m.catch(() => {
|
|
493
624
|
o(!0), setTimeout(() => {
|
|
494
|
-
|
|
625
|
+
s(e.hardwareValue), o(!1);
|
|
495
626
|
}, 2e3);
|
|
496
|
-
}),
|
|
627
|
+
}), f.preventDefault(), f.stopPropagation();
|
|
497
628
|
break;
|
|
498
629
|
}
|
|
499
630
|
case "Esc":
|
|
500
631
|
case "Escape":
|
|
501
|
-
n && (o(!1), i(!1),
|
|
632
|
+
n && (o(!1), i(!1), s(e.hardwareValue)), f.target.blur(), f.preventDefault(), f.stopPropagation();
|
|
502
633
|
break;
|
|
503
634
|
}
|
|
504
635
|
}
|
|
505
|
-
function
|
|
506
|
-
i(
|
|
636
|
+
function h(f) {
|
|
637
|
+
i(f.target.value !== e.hardwareValue.toString());
|
|
507
638
|
}
|
|
508
639
|
return /* @__PURE__ */ r(
|
|
509
|
-
|
|
640
|
+
C.Control,
|
|
510
641
|
{
|
|
511
|
-
className:
|
|
642
|
+
className: Y({
|
|
512
643
|
"form-control-edited": n,
|
|
513
644
|
"form-control-error": a,
|
|
514
645
|
"hw-moving": e.hardwareIsMoving
|
|
515
646
|
}),
|
|
516
647
|
type: "number",
|
|
517
648
|
ref: t,
|
|
518
|
-
onChange:
|
|
519
|
-
onKeyDown:
|
|
649
|
+
onChange: h,
|
|
650
|
+
onKeyDown: u,
|
|
520
651
|
disabled: e.readOnly || e.hardwareIsMoving || e.hardwareIsDisabled,
|
|
521
652
|
step: e.step
|
|
522
653
|
}
|
|
523
654
|
);
|
|
524
655
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
656
|
+
function ze(e, t = []) {
|
|
657
|
+
return te(() => {
|
|
658
|
+
const n = t.includes("auto_ready"), i = t.includes("auto_on");
|
|
659
|
+
if (e === void 0)
|
|
660
|
+
return { UNKNOWN: !0 };
|
|
661
|
+
if ((e == null ? void 0 : e.length) === 0)
|
|
662
|
+
return n ? { READY: !0 } : { NOT_READY: !0 };
|
|
663
|
+
const a = e.reduce((o, l) => (o[l] = !0, o), {});
|
|
664
|
+
return a.READY === void 0 && i && a.OFF && (a.READY = !0), a;
|
|
665
|
+
}, [e, t]);
|
|
666
|
+
}
|
|
667
|
+
function Be(e) {
|
|
668
|
+
var a, o;
|
|
669
|
+
const { states: t } = e;
|
|
670
|
+
function n(l) {
|
|
671
|
+
return e.hardware.actions.setProperty("velocity", l);
|
|
531
672
|
}
|
|
532
|
-
function
|
|
533
|
-
return e.hardware.
|
|
534
|
-
property: "acceleration",
|
|
535
|
-
value: a
|
|
536
|
-
});
|
|
673
|
+
function i(l) {
|
|
674
|
+
return e.hardware.actions.setProperty("acceleration", l);
|
|
537
675
|
}
|
|
538
|
-
|
|
539
|
-
return e.hardware.properties.state && ([i] = e.hardware.properties.state), /* @__PURE__ */ r(
|
|
676
|
+
return /* @__PURE__ */ r(
|
|
540
677
|
R,
|
|
541
678
|
{
|
|
542
679
|
trigger: "click",
|
|
543
680
|
rootClose: !0,
|
|
544
|
-
overlay: /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
681
|
+
overlay: /* @__PURE__ */ c(b, { id: "popid", children: [
|
|
682
|
+
/* @__PURE__ */ c(b.Header, { children: [
|
|
546
683
|
e.hardware.name,
|
|
547
684
|
" details"
|
|
548
685
|
] }),
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
/* @__PURE__ */ r(
|
|
686
|
+
/* @__PURE__ */ c(b.Body, { children: [
|
|
687
|
+
/* @__PURE__ */ c(C.Group, { children: [
|
|
688
|
+
/* @__PURE__ */ r(C.Label, { children: "Velocity" }),
|
|
552
689
|
/* @__PURE__ */ r(
|
|
553
|
-
|
|
690
|
+
le,
|
|
554
691
|
{
|
|
555
|
-
hardwareValue: e.hardware.properties.velocity,
|
|
556
|
-
onMoveRequested:
|
|
692
|
+
hardwareValue: ((a = e.hardware.properties) == null ? void 0 : a.velocity) ?? 0,
|
|
693
|
+
onMoveRequested: n,
|
|
557
694
|
hardwareIsDisabled: e.disabled,
|
|
558
|
-
hardwareIsReady:
|
|
559
|
-
hardwareIsMoving:
|
|
695
|
+
hardwareIsReady: t.READY,
|
|
696
|
+
hardwareIsMoving: t.MOVING,
|
|
560
697
|
readOnly: e.readOnly
|
|
561
698
|
}
|
|
562
699
|
)
|
|
563
700
|
] }),
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */ r(
|
|
701
|
+
/* @__PURE__ */ c(C.Group, { children: [
|
|
702
|
+
/* @__PURE__ */ r(C.Label, { children: "Acceleration" }),
|
|
566
703
|
/* @__PURE__ */ r(
|
|
567
|
-
|
|
704
|
+
le,
|
|
568
705
|
{
|
|
569
|
-
hardwareValue: e.hardware.properties.acceleration,
|
|
570
|
-
onMoveRequested:
|
|
706
|
+
hardwareValue: ((o = e.hardware.properties) == null ? void 0 : o.acceleration) ?? 0,
|
|
707
|
+
onMoveRequested: i,
|
|
571
708
|
hardwareIsDisabled: e.disabled,
|
|
572
|
-
hardwareIsReady:
|
|
573
|
-
hardwareIsMoving:
|
|
709
|
+
hardwareIsReady: t.READY,
|
|
710
|
+
hardwareIsMoving: t.MOVING,
|
|
574
711
|
readOnly: e.readOnly
|
|
575
712
|
}
|
|
576
713
|
)
|
|
@@ -581,41 +718,33 @@ function Ve(e) {
|
|
|
581
718
|
}
|
|
582
719
|
);
|
|
583
720
|
}
|
|
584
|
-
function
|
|
585
|
-
const { hardware: t, options: n = {} } = e;
|
|
586
|
-
function
|
|
587
|
-
t.
|
|
588
|
-
function: "stop"
|
|
589
|
-
});
|
|
721
|
+
function Wt(e) {
|
|
722
|
+
const { hardware: t, options: n = {} } = e, { properties: i, user_tags: a } = t;
|
|
723
|
+
function o() {
|
|
724
|
+
t.actions.call("stop");
|
|
590
725
|
}
|
|
591
|
-
function
|
|
592
|
-
return t.
|
|
593
|
-
property: "position",
|
|
594
|
-
value: u,
|
|
595
|
-
function: "move"
|
|
596
|
-
});
|
|
726
|
+
function l(d) {
|
|
727
|
+
return t.actions.call("move", d);
|
|
597
728
|
}
|
|
598
|
-
|
|
599
|
-
e.hardware.properties.state && ([o] = e.hardware.properties.state);
|
|
600
|
-
const d = /* @__PURE__ */ r(D, { name: "Motor", icon: "fam-hardware-motor", online: t.online }), l = /* @__PURE__ */ r(ce, { hardware: t }), h = e.options ? e.options.header : "top";
|
|
729
|
+
const s = ze(i.state, a), u = /* @__PURE__ */ r(T, { name: "Motor", icon: "fam-hardware-motor", online: t.online }), h = /* @__PURE__ */ r(Ye, { hardware: t }), f = e.options ? e.options.header : "top";
|
|
601
730
|
return /* @__PURE__ */ r(
|
|
602
|
-
|
|
731
|
+
G,
|
|
603
732
|
{
|
|
604
733
|
hardware: t,
|
|
605
|
-
widgetIcon:
|
|
606
|
-
widgetState:
|
|
607
|
-
widgetContent: /* @__PURE__ */
|
|
734
|
+
widgetIcon: u,
|
|
735
|
+
widgetState: h,
|
|
736
|
+
widgetContent: /* @__PURE__ */ c(I, { children: [
|
|
608
737
|
/* @__PURE__ */ r(
|
|
609
|
-
|
|
738
|
+
Ue,
|
|
610
739
|
{
|
|
611
740
|
id: t.id,
|
|
612
|
-
hardwareValue:
|
|
741
|
+
hardwareValue: (i == null ? void 0 : i.position) ?? null,
|
|
613
742
|
hardwareIsDisabled: e.disabled,
|
|
614
|
-
hardwareIsReady:
|
|
615
|
-
hardwareIsMoving:
|
|
616
|
-
onMoveRequested:
|
|
617
|
-
onAbortRequested:
|
|
618
|
-
precision: n.precision,
|
|
743
|
+
hardwareIsReady: s.READY ?? !1,
|
|
744
|
+
hardwareIsMoving: s.MOVING ?? !1,
|
|
745
|
+
onMoveRequested: l,
|
|
746
|
+
onAbortRequested: o,
|
|
747
|
+
precision: n.precision ?? i.display_digits ?? void 0,
|
|
619
748
|
readOnly: n.readOnly,
|
|
620
749
|
step: n.step,
|
|
621
750
|
steps: n.steps,
|
|
@@ -626,50 +755,46 @@ function jt(e) {
|
|
|
626
755
|
largeArrows: n.largearrows
|
|
627
756
|
}
|
|
628
757
|
),
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
758
|
+
i.unit && /* @__PURE__ */ r(I.Text, { children: i.unit }),
|
|
759
|
+
!s.MOVING && n.extended && /* @__PURE__ */ r(
|
|
760
|
+
Be,
|
|
632
761
|
{
|
|
633
762
|
hardware: t,
|
|
634
763
|
disabled: e.disabled,
|
|
635
|
-
readOnly: n.readOnly
|
|
764
|
+
readOnly: n.readOnly,
|
|
765
|
+
states: s
|
|
636
766
|
}
|
|
637
767
|
),
|
|
638
|
-
|
|
768
|
+
s.MOVING && !e.disabled && !n.step && /* @__PURE__ */ r(y, { variant: "danger", onClick: o, children: /* @__PURE__ */ r("i", { className: "fa fa-times" }) })
|
|
639
769
|
] }),
|
|
640
|
-
headerMode:
|
|
770
|
+
headerMode: f
|
|
641
771
|
}
|
|
642
772
|
);
|
|
643
773
|
}
|
|
644
|
-
function
|
|
645
|
-
const { hardware: t, options: n = {} } = e, i =
|
|
646
|
-
|
|
774
|
+
function qt(e) {
|
|
775
|
+
const { hardware: t, options: n = {} } = e, i = F(null);
|
|
776
|
+
P(() => {
|
|
647
777
|
if (!i.current) {
|
|
648
778
|
console.error("selectionRef ref is unset");
|
|
649
779
|
return;
|
|
650
780
|
}
|
|
651
781
|
i.current.value = t.properties.position;
|
|
652
782
|
}, [t.properties.position]);
|
|
653
|
-
function a(
|
|
654
|
-
if (console.debug("change",
|
|
783
|
+
function a(s) {
|
|
784
|
+
if (console.debug("change", s), !i || !i.current) {
|
|
655
785
|
console.error("selection ref is unset");
|
|
656
786
|
return;
|
|
657
787
|
}
|
|
658
|
-
t.
|
|
659
|
-
value: i.current.value,
|
|
660
|
-
function: "move"
|
|
661
|
-
});
|
|
788
|
+
t.actions.call("move", i.current.value);
|
|
662
789
|
}
|
|
663
|
-
function o(
|
|
664
|
-
t.
|
|
665
|
-
function: "stop"
|
|
666
|
-
});
|
|
790
|
+
function o(s) {
|
|
791
|
+
t.actions.call("stop");
|
|
667
792
|
}
|
|
668
|
-
const
|
|
669
|
-
return /* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
793
|
+
const l = S(t.properties.positions, (s) => /* @__PURE__ */ r("option", { title: s.description, children: s.position }, s.position));
|
|
794
|
+
return /* @__PURE__ */ c("div", { className: "hw-component", children: [
|
|
795
|
+
/* @__PURE__ */ c("div", { className: "hw-head", children: [
|
|
671
796
|
/* @__PURE__ */ r(
|
|
672
|
-
|
|
797
|
+
T,
|
|
673
798
|
{
|
|
674
799
|
name: "Multiposition",
|
|
675
800
|
icon: "fam-hardware-multiposition",
|
|
@@ -678,16 +803,16 @@ function Yt(e) {
|
|
|
678
803
|
),
|
|
679
804
|
/* @__PURE__ */ r("div", { className: "name", children: t.name }),
|
|
680
805
|
/* @__PURE__ */ r(
|
|
681
|
-
|
|
806
|
+
A,
|
|
682
807
|
{
|
|
683
808
|
bg: t.properties.state === "READY" ? "success" : "warning",
|
|
684
809
|
children: t.properties.state
|
|
685
810
|
}
|
|
686
811
|
)
|
|
687
812
|
] }),
|
|
688
|
-
/* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
|
|
813
|
+
/* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */ c(I, { children: [
|
|
814
|
+
/* @__PURE__ */ c(
|
|
815
|
+
C.Control,
|
|
691
816
|
{
|
|
692
817
|
className: "custom-select",
|
|
693
818
|
as: "select",
|
|
@@ -696,7 +821,7 @@ function Yt(e) {
|
|
|
696
821
|
defaultValue: t.properties.position,
|
|
697
822
|
children: [
|
|
698
823
|
/* @__PURE__ */ r("option", { disabled: !0, children: "unknown" }),
|
|
699
|
-
|
|
824
|
+
l
|
|
700
825
|
]
|
|
701
826
|
}
|
|
702
827
|
),
|
|
@@ -705,95 +830,98 @@ function Yt(e) {
|
|
|
705
830
|
] }) })
|
|
706
831
|
] });
|
|
707
832
|
}
|
|
708
|
-
|
|
709
|
-
function Ut(e) {
|
|
710
|
-
if (e.options.emptyifnone)
|
|
711
|
-
return Le(
|
|
712
|
-
'Component id:"%s" name:"%s" not displayed cause setup with emptyifnone.',
|
|
713
|
-
e.id,
|
|
714
|
-
e.name
|
|
715
|
-
), /* @__PURE__ */ r(v, {});
|
|
716
|
-
const t = /* @__PURE__ */ r(D, { name: "NoObject", icon: "fam-hardware-any", online: !1 }), n = /* @__PURE__ */ r(v, {}), i = /* @__PURE__ */ r(v, { children: "Missing" }), a = e.options ? e.options.header : "top", o = {
|
|
717
|
-
id: e.id,
|
|
718
|
-
name: e.name ?? "",
|
|
719
|
-
alias: null,
|
|
720
|
-
online: !1,
|
|
721
|
-
properties: {},
|
|
722
|
-
type: ""
|
|
723
|
-
};
|
|
724
|
-
return /* @__PURE__ */ r(
|
|
725
|
-
Y,
|
|
726
|
-
{
|
|
727
|
-
hardware: o,
|
|
728
|
-
widgetIcon: t,
|
|
729
|
-
widgetState: n,
|
|
730
|
-
widgetContent: i,
|
|
731
|
-
headerMode: a
|
|
732
|
-
}
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
function je(e) {
|
|
833
|
+
function Ge(e) {
|
|
736
834
|
const t = e.online ? "READY" : "OFFLINE";
|
|
737
|
-
return /* @__PURE__ */ r(
|
|
835
|
+
return /* @__PURE__ */ r(A, { bg: t === "READY" ? "success" : "warning", children: t });
|
|
738
836
|
}
|
|
739
|
-
function
|
|
740
|
-
const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(
|
|
837
|
+
function Zt(e) {
|
|
838
|
+
const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(T, { name: "Optic", icon: "fa-cog", online: t.online }), a = /* @__PURE__ */ r(Ge, { ...t });
|
|
741
839
|
function o() {
|
|
742
|
-
const
|
|
743
|
-
if (
|
|
840
|
+
const f = n.property;
|
|
841
|
+
if (f === void 0)
|
|
744
842
|
return "property is not set";
|
|
745
|
-
if (
|
|
843
|
+
if (f === null)
|
|
746
844
|
return "property is null";
|
|
747
|
-
let
|
|
748
|
-
for (const m of
|
|
749
|
-
if (
|
|
750
|
-
return `property '${
|
|
751
|
-
return `${
|
|
845
|
+
let d = t;
|
|
846
|
+
for (const m of f.split("/"))
|
|
847
|
+
if (d = d[m], d === void 0)
|
|
848
|
+
return `property '${f}' not found`;
|
|
849
|
+
return `${d}`;
|
|
752
850
|
}
|
|
753
|
-
function
|
|
754
|
-
const
|
|
755
|
-
if (!
|
|
851
|
+
function l() {
|
|
852
|
+
const f = n.unit;
|
|
853
|
+
if (!f)
|
|
756
854
|
return null;
|
|
757
|
-
if (!
|
|
758
|
-
return
|
|
759
|
-
let
|
|
760
|
-
for (const m of
|
|
761
|
-
if (
|
|
855
|
+
if (!f.includes("properties"))
|
|
856
|
+
return f;
|
|
857
|
+
let d = e;
|
|
858
|
+
for (const m of f.split("/"))
|
|
859
|
+
if (d = d[m], d === void 0)
|
|
762
860
|
return null;
|
|
763
|
-
return `${
|
|
861
|
+
return `${d}`;
|
|
764
862
|
}
|
|
765
|
-
const
|
|
766
|
-
/* @__PURE__ */ r(
|
|
767
|
-
|
|
768
|
-
] }),
|
|
863
|
+
const s = l(), u = /* @__PURE__ */ c(I, { children: [
|
|
864
|
+
/* @__PURE__ */ r(C.Control, { value: o(), readOnly: !0 }),
|
|
865
|
+
s && /* @__PURE__ */ r(I.Text, { children: s })
|
|
866
|
+
] }), h = e.options.header || "top";
|
|
769
867
|
return /* @__PURE__ */ r(
|
|
770
|
-
|
|
868
|
+
G,
|
|
771
869
|
{
|
|
772
870
|
hardware: t,
|
|
773
871
|
widgetIcon: i,
|
|
774
872
|
widgetState: a,
|
|
775
|
-
widgetContent:
|
|
776
|
-
headerMode:
|
|
873
|
+
widgetContent: u,
|
|
874
|
+
headerMode: h
|
|
777
875
|
}
|
|
778
876
|
);
|
|
779
877
|
}
|
|
780
|
-
function
|
|
781
|
-
const { hardware: t } = e
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
878
|
+
function We(e) {
|
|
879
|
+
const { hardware: t } = e;
|
|
880
|
+
function n() {
|
|
881
|
+
if (!t.online)
|
|
882
|
+
return "OFFLINE";
|
|
883
|
+
const o = t.properties.state;
|
|
884
|
+
return e.useReadyState && (o === "OPEN" || o === "CLOSED") ? "READY" : o;
|
|
885
|
+
}
|
|
886
|
+
const i = n();
|
|
887
|
+
function a() {
|
|
888
|
+
switch (i) {
|
|
889
|
+
case "READY":
|
|
890
|
+
return "success";
|
|
891
|
+
case "OPEN":
|
|
892
|
+
return "success";
|
|
893
|
+
case "CLOSED":
|
|
894
|
+
return "danger";
|
|
895
|
+
case "DISABLED":
|
|
896
|
+
return "secondary";
|
|
897
|
+
case "MOVING":
|
|
898
|
+
case "STANDBY":
|
|
899
|
+
case "OFFLINE":
|
|
900
|
+
return "warning";
|
|
901
|
+
case "FAULT":
|
|
902
|
+
return "fatal";
|
|
903
|
+
default:
|
|
904
|
+
return "fatal";
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return /* @__PURE__ */ r(U, { state: i, minWidth: 6, variant: a() });
|
|
908
|
+
}
|
|
909
|
+
function qe(e) {
|
|
910
|
+
const { hardware: t } = e;
|
|
911
|
+
function n() {
|
|
912
|
+
t.actions.call("reset");
|
|
913
|
+
}
|
|
786
914
|
return /* @__PURE__ */ r(
|
|
787
915
|
R,
|
|
788
916
|
{
|
|
789
917
|
trigger: "click",
|
|
790
918
|
rootClose: !0,
|
|
791
|
-
overlay: /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
919
|
+
overlay: /* @__PURE__ */ c(b, { id: "popid", children: [
|
|
920
|
+
/* @__PURE__ */ c(b.Header, { children: [
|
|
793
921
|
t.name,
|
|
794
922
|
" Details"
|
|
795
923
|
] }),
|
|
796
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ c(b.Body, { children: [
|
|
797
925
|
/* @__PURE__ */ r("h6", { children: "Status" }),
|
|
798
926
|
/* @__PURE__ */ r("pre", { children: t.properties.status }),
|
|
799
927
|
/* @__PURE__ */ r("div", { className: "d-grid gap-2", children: /* @__PURE__ */ r(y, { onClick: n, disabled: e.disabled, children: "Reset" }) })
|
|
@@ -803,22 +931,22 @@ function Ye(e) {
|
|
|
803
931
|
}
|
|
804
932
|
);
|
|
805
933
|
}
|
|
806
|
-
function
|
|
934
|
+
function Jt(e) {
|
|
807
935
|
const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(
|
|
808
|
-
|
|
936
|
+
T,
|
|
809
937
|
{
|
|
810
938
|
name: "Shutter",
|
|
811
939
|
icon: "fam-hardware-shutter",
|
|
812
940
|
online: t.online
|
|
813
941
|
}
|
|
814
|
-
), a = /* @__PURE__ */ r(
|
|
942
|
+
), a = /* @__PURE__ */ r(We, { hardware: t });
|
|
815
943
|
function o() {
|
|
816
944
|
return t.properties ? t.properties.state : "UNKNOWN";
|
|
817
945
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
946
|
+
function l(x) {
|
|
947
|
+
return x === "OPEN" ? ["Close", "close"] : x === "CLOSED" ? ["Open", "open"] : x === "DISABLED" || x === "STANDBY" || x === "FAULT" ? ["Closed", ""] : x === "MOVING" ? ["...", ""] : ["Unknown", ""];
|
|
820
948
|
}
|
|
821
|
-
const
|
|
949
|
+
const s = o(), [u, h] = l(s), d = {
|
|
822
950
|
OPEN: "danger",
|
|
823
951
|
CLOSED: "success",
|
|
824
952
|
MOVING: "warning",
|
|
@@ -826,36 +954,34 @@ function zt(e) {
|
|
|
826
954
|
STANDBY: "danger",
|
|
827
955
|
FAULT: "fatal",
|
|
828
956
|
UNKNOWN: "warning"
|
|
829
|
-
}[
|
|
957
|
+
}[s] || "danger";
|
|
830
958
|
function m() {
|
|
831
|
-
t.
|
|
832
|
-
function: u
|
|
833
|
-
});
|
|
959
|
+
t.actions.call(h);
|
|
834
960
|
}
|
|
835
|
-
const
|
|
961
|
+
const N = /* @__PURE__ */ c(ue, { className: "d-flex flex-nowrap", children: [
|
|
836
962
|
/* @__PURE__ */ r(
|
|
837
963
|
y,
|
|
838
964
|
{
|
|
839
|
-
variant:
|
|
965
|
+
variant: d,
|
|
840
966
|
onClick: m,
|
|
841
|
-
disabled: e.disabled ||
|
|
842
|
-
children:
|
|
967
|
+
disabled: e.disabled || h === "",
|
|
968
|
+
children: u
|
|
843
969
|
}
|
|
844
970
|
),
|
|
845
|
-
n.extended && /* @__PURE__ */ r(
|
|
846
|
-
] }),
|
|
971
|
+
n.extended && /* @__PURE__ */ r(qe, { ...e })
|
|
972
|
+
] }), $ = e.options.header || "top";
|
|
847
973
|
return /* @__PURE__ */ r(
|
|
848
|
-
|
|
974
|
+
G,
|
|
849
975
|
{
|
|
850
976
|
hardware: t,
|
|
851
977
|
widgetIcon: i,
|
|
852
978
|
widgetState: a,
|
|
853
|
-
widgetContent:
|
|
854
|
-
headerMode:
|
|
979
|
+
widgetContent: N,
|
|
980
|
+
headerMode: $
|
|
855
981
|
}
|
|
856
982
|
);
|
|
857
983
|
}
|
|
858
|
-
class
|
|
984
|
+
class Qt extends fe {
|
|
859
985
|
constructor() {
|
|
860
986
|
super(...arguments), this.variants = {};
|
|
861
987
|
}
|
|
@@ -864,9 +990,38 @@ class qt extends se {
|
|
|
864
990
|
return this.props.options.variant in this.variants && (t = this.variants[this.props.options.variant]), /* @__PURE__ */ r(t, { ...this.props });
|
|
865
991
|
}
|
|
866
992
|
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
993
|
+
const Ze = Re("daiquiri.components.hardware.NoObject");
|
|
994
|
+
function Xt(e) {
|
|
995
|
+
if (e.options.emptyifnone)
|
|
996
|
+
return Ze(
|
|
997
|
+
'Component id:"%s" name:"%s" not displayed cause setup with emptyifnone.',
|
|
998
|
+
e.id,
|
|
999
|
+
e.name
|
|
1000
|
+
), /* @__PURE__ */ r(v, {});
|
|
1001
|
+
const t = /* @__PURE__ */ r(T, { name: "NoObject", icon: "fam-hardware-any", online: !1 }), n = /* @__PURE__ */ r(v, {}), i = /* @__PURE__ */ r(v, { children: "Missing" }), a = e.options ? e.options.header : "top", o = {
|
|
1002
|
+
id: e.id,
|
|
1003
|
+
name: e.name ?? "",
|
|
1004
|
+
alias: null,
|
|
1005
|
+
user_tags: [],
|
|
1006
|
+
online: !1,
|
|
1007
|
+
locked: null,
|
|
1008
|
+
properties: {},
|
|
1009
|
+
type: ""
|
|
1010
|
+
};
|
|
1011
|
+
return /* @__PURE__ */ r(
|
|
1012
|
+
G,
|
|
1013
|
+
{
|
|
1014
|
+
hardware: o,
|
|
1015
|
+
widgetIcon: t,
|
|
1016
|
+
widgetState: n,
|
|
1017
|
+
widgetContent: i,
|
|
1018
|
+
headerMode: a
|
|
1019
|
+
}
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
function Je(e) {
|
|
1023
|
+
const [t, n] = k({}), i = F(null);
|
|
1024
|
+
return P(() => {
|
|
870
1025
|
if (i.current) {
|
|
871
1026
|
const a = i.current;
|
|
872
1027
|
n({
|
|
@@ -895,75 +1050,75 @@ function Ue(e) {
|
|
|
895
1050
|
}
|
|
896
1051
|
);
|
|
897
1052
|
}
|
|
898
|
-
function
|
|
1053
|
+
function Qe(e) {
|
|
899
1054
|
return /* @__PURE__ */ r("div", { className: "panel-header", style: e.style, children: e.children });
|
|
900
1055
|
}
|
|
901
|
-
function
|
|
902
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1056
|
+
function Xe(e) {
|
|
1057
|
+
return /* @__PURE__ */ r("div", { className: `panel-contents ${e.className}`, style: e.style, children: e.children });
|
|
903
1058
|
}
|
|
904
|
-
function
|
|
905
|
-
const t = e.scroll ?
|
|
1059
|
+
function g(e) {
|
|
1060
|
+
const t = e.scroll ? Je : Ie;
|
|
906
1061
|
return /* @__PURE__ */ r("div", { className: `panel ${e.className ?? ""}`, style: e.style, children: /* @__PURE__ */ r(t, { children: e.children }) });
|
|
907
1062
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
const
|
|
1063
|
+
g.Header = Qe;
|
|
1064
|
+
g.Contents = Xe;
|
|
1065
|
+
const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
911
1066
|
__proto__: null
|
|
912
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1067
|
+
}, Symbol.toStringTag, { value: "Module" })), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
913
1068
|
__proto__: null
|
|
914
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
915
|
-
function
|
|
916
|
-
|
|
1069
|
+
}, Symbol.toStringTag, { value: "Module" })), K = {};
|
|
1070
|
+
function et(e, t) {
|
|
1071
|
+
K[e] = t;
|
|
917
1072
|
}
|
|
918
|
-
function
|
|
1073
|
+
function E(e, t, n = !0) {
|
|
919
1074
|
if (!e)
|
|
920
1075
|
return /* @__PURE__ */ r(v, {});
|
|
921
|
-
const { type: i } = e, a = i && i in
|
|
1076
|
+
const { type: i } = e, a = i && i in K ? K[i] : K.component;
|
|
922
1077
|
return /* @__PURE__ */ r(a, { yamlNode: e, panel: n }, t);
|
|
923
1078
|
}
|
|
924
|
-
function
|
|
1079
|
+
function tt({
|
|
925
1080
|
children: e,
|
|
926
1081
|
key: t,
|
|
927
1082
|
panel: n,
|
|
928
1083
|
options: i
|
|
929
1084
|
}) {
|
|
930
|
-
return n ? /* @__PURE__ */ r(
|
|
1085
|
+
return n ? /* @__PURE__ */ r(g, { style: i.style, scroll: i.scroll, children: /* @__PURE__ */ r(g.Contents, { children: e }) }, t) : /* @__PURE__ */ r(v, { children: ke.map(
|
|
931
1086
|
e,
|
|
932
|
-
(a) =>
|
|
1087
|
+
(a) => $e(a) ? Fe(a, { key: t, ...a.props }) : void 0
|
|
933
1088
|
) });
|
|
934
1089
|
}
|
|
935
|
-
function
|
|
1090
|
+
function ge(e, t) {
|
|
936
1091
|
const { _parentNode: n, _indexFromParent: i, ...a } = t;
|
|
937
1092
|
if (e && Object.keys(a).length > 0)
|
|
938
|
-
throw new
|
|
1093
|
+
throw new z(e, Object.keys(a));
|
|
939
1094
|
}
|
|
940
|
-
class
|
|
1095
|
+
class D extends Error {
|
|
941
1096
|
constructor(t, n) {
|
|
942
1097
|
super(t), this.yamlNode = n;
|
|
943
1098
|
}
|
|
944
1099
|
}
|
|
945
|
-
class
|
|
1100
|
+
class z extends D {
|
|
946
1101
|
constructor(t, n) {
|
|
947
1102
|
super(`Unexpected keys: ${n.join(", ")}`, t), this.keys = n;
|
|
948
1103
|
}
|
|
949
1104
|
}
|
|
950
|
-
class
|
|
1105
|
+
class B extends D {
|
|
951
1106
|
constructor(t, n) {
|
|
952
1107
|
super(`Keys ${n.join(", ")} are missing`, t), this.keys = n;
|
|
953
1108
|
}
|
|
954
1109
|
}
|
|
955
|
-
class
|
|
1110
|
+
class w extends D {
|
|
956
1111
|
constructor(t, n, i) {
|
|
957
1112
|
super(`Key ${n} error: ${i}`, t), this.key = n, this.keyMessage = i;
|
|
958
1113
|
}
|
|
959
1114
|
}
|
|
960
|
-
function
|
|
1115
|
+
function nt(e) {
|
|
961
1116
|
let t = e;
|
|
962
1117
|
for (; t._parentNode; )
|
|
963
1118
|
t = t._parentNode;
|
|
964
1119
|
return t;
|
|
965
1120
|
}
|
|
966
|
-
function
|
|
1121
|
+
function rt(e) {
|
|
967
1122
|
const t = [];
|
|
968
1123
|
let n = e;
|
|
969
1124
|
for (; n; )
|
|
@@ -973,7 +1128,7 @@ function Be(e) {
|
|
|
973
1128
|
}), n = n._parentNode;
|
|
974
1129
|
return t.reverse(), t;
|
|
975
1130
|
}
|
|
976
|
-
function
|
|
1131
|
+
function we(e, t = null, n = null) {
|
|
977
1132
|
if (e._parentNode)
|
|
978
1133
|
throw new Error(
|
|
979
1134
|
"Attribute _parentNode was already defined by the yml layout."
|
|
@@ -985,62 +1140,62 @@ function he(e, t = null, n = null) {
|
|
|
985
1140
|
};
|
|
986
1141
|
if (e.children) {
|
|
987
1142
|
const a = [...e.children];
|
|
988
|
-
Object.freeze(a), i.children = a.map((o,
|
|
1143
|
+
Object.freeze(a), i.children = a.map((o, l) => we(o, i, l));
|
|
989
1144
|
}
|
|
990
1145
|
return Object.freeze(i), i;
|
|
991
1146
|
}
|
|
992
|
-
function
|
|
1147
|
+
function ye(e) {
|
|
993
1148
|
var t;
|
|
994
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ c(M, { variant: "danger", children: [
|
|
995
1150
|
e.message,
|
|
996
1151
|
/* @__PURE__ */ r("br", {}),
|
|
997
1152
|
/* @__PURE__ */ r("pre", { children: (t = e.error) == null ? void 0 : t.stack })
|
|
998
1153
|
] });
|
|
999
1154
|
}
|
|
1000
|
-
function
|
|
1155
|
+
function it(e) {
|
|
1001
1156
|
const { error: t } = e;
|
|
1002
|
-
if (!(t instanceof
|
|
1157
|
+
if (!(t instanceof D))
|
|
1003
1158
|
return /* @__PURE__ */ r(v, {});
|
|
1004
|
-
function n(o,
|
|
1005
|
-
const
|
|
1006
|
-
let
|
|
1007
|
-
for (let
|
|
1008
|
-
const { node:
|
|
1009
|
-
|
|
1010
|
-
`${
|
|
1011
|
-
`${
|
|
1012
|
-
`${
|
|
1013
|
-
),
|
|
1159
|
+
function n(o, l = 3) {
|
|
1160
|
+
const s = rt(o.yamlNode), u = [];
|
|
1161
|
+
let h = "";
|
|
1162
|
+
for (let f = 1; f < s.length; f++) {
|
|
1163
|
+
const { node: d, indexFromParent: m } = s[f];
|
|
1164
|
+
u.push(`${h}children:`), h += " ".repeat(l), m === 1 ? u.push(`${h}- type: ...`) : (m ?? 0 > 1) && u.push(
|
|
1165
|
+
`${h}...`,
|
|
1166
|
+
`${h}...`,
|
|
1167
|
+
`${h}# children number ${m ?? 0 + 1}`
|
|
1168
|
+
), u.push(`${h}- type: ${d.type}`), h += " ".repeat(2);
|
|
1014
1169
|
}
|
|
1015
|
-
return o instanceof
|
|
1016
|
-
|
|
1017
|
-
`${
|
|
1018
|
-
50 -
|
|
1170
|
+
return o instanceof z ? o.keys.forEach((f) => {
|
|
1171
|
+
u.push(
|
|
1172
|
+
`${h}${f}: ... ${" ".repeat(
|
|
1173
|
+
50 - h.length - f.length
|
|
1019
1174
|
)}<-- unexpected key`
|
|
1020
1175
|
);
|
|
1021
|
-
}) : o instanceof
|
|
1022
|
-
|
|
1023
|
-
`${
|
|
1024
|
-
50 -
|
|
1025
|
-
)}<-- key **${
|
|
1176
|
+
}) : o instanceof B ? o.keys.forEach((f) => {
|
|
1177
|
+
u.push(
|
|
1178
|
+
`${h}???: ${" ".repeat(
|
|
1179
|
+
50 - h.length - f.length
|
|
1180
|
+
)}<-- key **${f}** is expected`
|
|
1026
1181
|
);
|
|
1027
|
-
}) : o instanceof
|
|
1028
|
-
`${
|
|
1029
|
-
50 -
|
|
1182
|
+
}) : o instanceof w && u.push(
|
|
1183
|
+
`${h}${o.key}: ${" ".repeat(
|
|
1184
|
+
50 - h.length - o.key.length
|
|
1030
1185
|
)}<-- ${o.keyMessage}`
|
|
1031
|
-
),
|
|
1186
|
+
), u.join(`
|
|
1032
1187
|
`);
|
|
1033
1188
|
}
|
|
1034
|
-
const a =
|
|
1035
|
-
if (t instanceof
|
|
1189
|
+
const a = nt(t.yamlNode).name;
|
|
1190
|
+
if (t instanceof z) {
|
|
1036
1191
|
const o = t.keys.length === 1 ? "key" : "keys";
|
|
1037
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ c(M, { variant: "danger", children: [
|
|
1038
1193
|
"Unexpected ",
|
|
1039
1194
|
o,
|
|
1040
1195
|
" ",
|
|
1041
|
-
t.keys.map((
|
|
1042
|
-
|
|
1043
|
-
/* @__PURE__ */ r("b", { children:
|
|
1196
|
+
t.keys.map((l, s) => /* @__PURE__ */ c(v, { children: [
|
|
1197
|
+
s !== 0 && ", ",
|
|
1198
|
+
/* @__PURE__ */ r("b", { children: l })
|
|
1044
1199
|
] })),
|
|
1045
1200
|
" ",
|
|
1046
1201
|
"from the layout name ",
|
|
@@ -1051,15 +1206,15 @@ function Ze(e) {
|
|
|
1051
1206
|
/* @__PURE__ */ r("br", {})
|
|
1052
1207
|
] });
|
|
1053
1208
|
}
|
|
1054
|
-
if (t instanceof
|
|
1209
|
+
if (t instanceof B) {
|
|
1055
1210
|
const o = t.keys.length === 1 ? "Key" : "Keys";
|
|
1056
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ c(M, { variant: "danger", children: [
|
|
1057
1212
|
"Expected ",
|
|
1058
1213
|
o,
|
|
1059
1214
|
" ",
|
|
1060
|
-
t.keys.map((
|
|
1061
|
-
|
|
1062
|
-
/* @__PURE__ */ r("b", { children:
|
|
1215
|
+
t.keys.map((l, s) => /* @__PURE__ */ c(v, { children: [
|
|
1216
|
+
s !== 0 && ", ",
|
|
1217
|
+
/* @__PURE__ */ r("b", { children: l })
|
|
1063
1218
|
] })),
|
|
1064
1219
|
" ",
|
|
1065
1220
|
"from the layout name ",
|
|
@@ -1070,7 +1225,7 @@ function Ze(e) {
|
|
|
1070
1225
|
/* @__PURE__ */ r("br", {})
|
|
1071
1226
|
] });
|
|
1072
1227
|
}
|
|
1073
|
-
return t instanceof
|
|
1228
|
+
return t instanceof w ? /* @__PURE__ */ c(M, { variant: "danger", children: [
|
|
1074
1229
|
"Error on key ",
|
|
1075
1230
|
/* @__PURE__ */ r("b", { children: t.key }),
|
|
1076
1231
|
" from the layout name ",
|
|
@@ -1079,25 +1234,25 @@ function Ze(e) {
|
|
|
1079
1234
|
/* @__PURE__ */ r("br", {}),
|
|
1080
1235
|
/* @__PURE__ */ r("pre", { className: "mt-3", children: n(t) }),
|
|
1081
1236
|
/* @__PURE__ */ r("br", {})
|
|
1082
|
-
] }) : /* @__PURE__ */ r(
|
|
1237
|
+
] }) : /* @__PURE__ */ r(ye, { ...e });
|
|
1083
1238
|
}
|
|
1084
|
-
const
|
|
1239
|
+
const ce = {
|
|
1085
1240
|
hasError: !1,
|
|
1086
1241
|
message: "",
|
|
1087
1242
|
error: void 0
|
|
1088
1243
|
};
|
|
1089
|
-
class
|
|
1244
|
+
class at extends fe {
|
|
1090
1245
|
constructor(t) {
|
|
1091
1246
|
super(t), this.reload = () => {
|
|
1092
1247
|
window.location.reload();
|
|
1093
|
-
}, this.state =
|
|
1248
|
+
}, this.state = ce;
|
|
1094
1249
|
}
|
|
1095
1250
|
static getDerivedStateFromError() {
|
|
1096
1251
|
return { hasError: !0 };
|
|
1097
1252
|
}
|
|
1098
1253
|
componentDidCatch(t) {
|
|
1099
1254
|
var n, i;
|
|
1100
|
-
if (t instanceof
|
|
1255
|
+
if (t instanceof D || !this.props.unhandledComponentDidCatch) {
|
|
1101
1256
|
this.setState({
|
|
1102
1257
|
hasError: !0,
|
|
1103
1258
|
message: t.message,
|
|
@@ -1116,31 +1271,31 @@ class Je extends se {
|
|
|
1116
1271
|
}
|
|
1117
1272
|
// https://github.com/bvaughn/react-error-boundary/blob/23a4d779744f3079dfe0960acaa4bdfd5dede87b/src/ErrorBoundary.ts#L53
|
|
1118
1273
|
componentDidUpdate(t, n) {
|
|
1119
|
-
this.state.hasError && n.error !== void 0 && t.resetKey !== this.props.resetKey && this.setState(
|
|
1274
|
+
this.state.hasError && n.error !== void 0 && t.resetKey !== this.props.resetKey && this.setState(ce);
|
|
1120
1275
|
}
|
|
1121
1276
|
render() {
|
|
1122
1277
|
if (this.state.hasError) {
|
|
1123
1278
|
const { UnhandledErrorComponent: t } = this.props, { hasError: n, ...i } = this.state;
|
|
1124
|
-
return /* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ c(L, { className: "mt-2", children: [
|
|
1125
1280
|
/* @__PURE__ */ r("h4", { children: "Something went wrong" }),
|
|
1126
|
-
this.state.error instanceof
|
|
1127
|
-
|
|
1281
|
+
this.state.error instanceof D && /* @__PURE__ */ r(
|
|
1282
|
+
it,
|
|
1128
1283
|
{
|
|
1129
1284
|
message: this.state.message,
|
|
1130
1285
|
error: this.state.error
|
|
1131
1286
|
}
|
|
1132
1287
|
),
|
|
1133
|
-
!(this.state.error instanceof
|
|
1134
|
-
|
|
1288
|
+
!(this.state.error instanceof D) && /* @__PURE__ */ r(v, { children: t ? /* @__PURE__ */ r(t, { ...i }) : /* @__PURE__ */ r(
|
|
1289
|
+
ye,
|
|
1135
1290
|
{
|
|
1136
1291
|
message: this.state.message,
|
|
1137
1292
|
error: this.state.error
|
|
1138
1293
|
}
|
|
1139
1294
|
) }),
|
|
1140
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ c("p", { children: [
|
|
1141
1296
|
"This error has been logged. Please",
|
|
1142
1297
|
" ",
|
|
1143
|
-
/* @__PURE__ */
|
|
1298
|
+
/* @__PURE__ */ c(y, { size: "sm", onClick: this.reload, children: [
|
|
1144
1299
|
/* @__PURE__ */ r("i", { className: "fa fa-refresh" }),
|
|
1145
1300
|
" Reload"
|
|
1146
1301
|
] }),
|
|
@@ -1152,49 +1307,49 @@ class Je extends se {
|
|
|
1152
1307
|
return this.props.children;
|
|
1153
1308
|
}
|
|
1154
1309
|
}
|
|
1155
|
-
function
|
|
1310
|
+
function ot(e, t, n) {
|
|
1156
1311
|
if (e && n === void 0)
|
|
1157
|
-
throw new
|
|
1312
|
+
throw new B(e, [t]);
|
|
1158
1313
|
}
|
|
1159
|
-
function
|
|
1314
|
+
function st(e, t, n) {
|
|
1160
1315
|
if (typeof n != "string")
|
|
1161
|
-
throw new
|
|
1316
|
+
throw new w(e, t, "A string is expected");
|
|
1162
1317
|
}
|
|
1163
|
-
function
|
|
1318
|
+
function lt(e, t, n) {
|
|
1164
1319
|
if (typeof n != "boolean")
|
|
1165
|
-
throw new
|
|
1320
|
+
throw new w(e, t, "A boolean is expected");
|
|
1166
1321
|
}
|
|
1167
|
-
function
|
|
1322
|
+
function ct(e, t, n) {
|
|
1168
1323
|
if (typeof n != "number")
|
|
1169
|
-
throw new
|
|
1324
|
+
throw new w(e, t, "A number is expected");
|
|
1170
1325
|
}
|
|
1171
|
-
function
|
|
1326
|
+
function J(e, t, n) {
|
|
1172
1327
|
if (n !== void 0 && typeof n != "boolean")
|
|
1173
|
-
throw new
|
|
1328
|
+
throw new w(e, t, "An optional boolean is expected");
|
|
1174
1329
|
}
|
|
1175
|
-
function
|
|
1330
|
+
function ve(e, t, n) {
|
|
1176
1331
|
if (n !== void 0 && typeof n != "string")
|
|
1177
|
-
throw new
|
|
1332
|
+
throw new w(e, t, "An optional string is expected");
|
|
1178
1333
|
}
|
|
1179
|
-
function
|
|
1334
|
+
function dt(e, t, n) {
|
|
1180
1335
|
if (!Array.isArray(n))
|
|
1181
|
-
throw new
|
|
1336
|
+
throw new w(e, t, "A list of string is expected");
|
|
1182
1337
|
n.forEach((i) => {
|
|
1183
1338
|
if (typeof i != "string")
|
|
1184
|
-
throw new
|
|
1339
|
+
throw new w(e, t, "A list of string is expected");
|
|
1185
1340
|
});
|
|
1186
1341
|
}
|
|
1187
|
-
function
|
|
1342
|
+
function ut(e, t, n) {
|
|
1188
1343
|
if (n !== void 0 && typeof n != "string") {
|
|
1189
1344
|
if (!Array.isArray(n))
|
|
1190
|
-
throw new
|
|
1345
|
+
throw new w(
|
|
1191
1346
|
e,
|
|
1192
1347
|
t,
|
|
1193
1348
|
"An optional string or list of string is expected"
|
|
1194
1349
|
);
|
|
1195
1350
|
n.forEach((i) => {
|
|
1196
1351
|
if (typeof i != "string")
|
|
1197
|
-
throw new
|
|
1352
|
+
throw new w(
|
|
1198
1353
|
e,
|
|
1199
1354
|
t,
|
|
1200
1355
|
"An optional string or list of string is expected"
|
|
@@ -1202,13 +1357,13 @@ function rt(e, t, n) {
|
|
|
1202
1357
|
});
|
|
1203
1358
|
}
|
|
1204
1359
|
}
|
|
1205
|
-
function
|
|
1360
|
+
function ht(e, t, n) {
|
|
1206
1361
|
if (n !== void 0) {
|
|
1207
1362
|
if (!Array.isArray(n))
|
|
1208
|
-
throw new
|
|
1363
|
+
throw new w(e, t, "An optional list of string is expected");
|
|
1209
1364
|
n.forEach((i) => {
|
|
1210
1365
|
if (typeof i != "string")
|
|
1211
|
-
throw new
|
|
1366
|
+
throw new w(
|
|
1212
1367
|
e,
|
|
1213
1368
|
t,
|
|
1214
1369
|
"A optional list of string is expected"
|
|
@@ -1216,21 +1371,21 @@ function it(e, t, n) {
|
|
|
1216
1371
|
});
|
|
1217
1372
|
}
|
|
1218
1373
|
}
|
|
1219
|
-
function
|
|
1374
|
+
function Ne(e, t, n) {
|
|
1220
1375
|
if (n !== void 0 && typeof n != "number")
|
|
1221
|
-
throw new
|
|
1376
|
+
throw new w(e, t, "An optional number is expected");
|
|
1222
1377
|
}
|
|
1223
|
-
function
|
|
1378
|
+
function ft(e, t, n) {
|
|
1224
1379
|
if (n !== void 0) {
|
|
1225
1380
|
if (!Array.isArray(n))
|
|
1226
|
-
throw new
|
|
1381
|
+
throw new w(
|
|
1227
1382
|
e,
|
|
1228
1383
|
t,
|
|
1229
1384
|
"An optional list of numbers is expected"
|
|
1230
1385
|
);
|
|
1231
1386
|
n.forEach((i) => {
|
|
1232
1387
|
if (typeof i != "number")
|
|
1233
|
-
throw new
|
|
1388
|
+
throw new w(
|
|
1234
1389
|
e,
|
|
1235
1390
|
t,
|
|
1236
1391
|
"An optional list of numbers is expected"
|
|
@@ -1238,182 +1393,182 @@ function at(e, t, n) {
|
|
|
1238
1393
|
});
|
|
1239
1394
|
}
|
|
1240
1395
|
}
|
|
1241
|
-
function
|
|
1396
|
+
function W(e, t) {
|
|
1242
1397
|
const { _parentNode: n, _indexFromParent: i, ...a } = t;
|
|
1243
1398
|
if (e && Object.keys(a).length > 0)
|
|
1244
|
-
throw new
|
|
1399
|
+
throw new z(e, Object.keys(a));
|
|
1245
1400
|
}
|
|
1246
|
-
function
|
|
1401
|
+
function mt(e, t, n) {
|
|
1247
1402
|
if (n !== "last" && typeof n != "number")
|
|
1248
|
-
throw new
|
|
1403
|
+
throw new w(e, t, '"last" or a number is expected');
|
|
1249
1404
|
}
|
|
1250
|
-
function
|
|
1405
|
+
function pt(e, t, n) {
|
|
1251
1406
|
if (n !== void 0 && n !== "h5web" && n !== "plotly")
|
|
1252
|
-
throw new
|
|
1407
|
+
throw new w(e, t, '"h5web" or "plotly" string is expected');
|
|
1253
1408
|
}
|
|
1254
|
-
const
|
|
1409
|
+
const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1255
1410
|
__proto__: null,
|
|
1256
|
-
assertBoolean:
|
|
1257
|
-
assertDataCollectionId:
|
|
1258
|
-
assertKeyExpected:
|
|
1259
|
-
assertNoUnknownKeys:
|
|
1260
|
-
assertNumber:
|
|
1261
|
-
assertOptionalBackend:
|
|
1262
|
-
assertOptionalBoolean:
|
|
1263
|
-
assertOptionalNumber:
|
|
1264
|
-
assertOptionalNumberList:
|
|
1265
|
-
assertOptionalString:
|
|
1266
|
-
assertOptionalStringList:
|
|
1267
|
-
assertOptionalStringOrStringList:
|
|
1268
|
-
assertString:
|
|
1269
|
-
assertStringList:
|
|
1411
|
+
assertBoolean: lt,
|
|
1412
|
+
assertDataCollectionId: mt,
|
|
1413
|
+
assertKeyExpected: ot,
|
|
1414
|
+
assertNoUnknownKeys: W,
|
|
1415
|
+
assertNumber: ct,
|
|
1416
|
+
assertOptionalBackend: pt,
|
|
1417
|
+
assertOptionalBoolean: J,
|
|
1418
|
+
assertOptionalNumber: Ne,
|
|
1419
|
+
assertOptionalNumberList: ft,
|
|
1420
|
+
assertOptionalString: ve,
|
|
1421
|
+
assertOptionalStringList: ht,
|
|
1422
|
+
assertOptionalStringOrStringList: ut,
|
|
1423
|
+
assertString: st,
|
|
1424
|
+
assertStringList: dt
|
|
1270
1425
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1271
|
-
function
|
|
1426
|
+
function gt({ yamlNode: e, panel: t }) {
|
|
1272
1427
|
const { type: n, style: i, children: a, ...o } = e;
|
|
1273
|
-
return
|
|
1428
|
+
return W(e, o), /* @__PURE__ */ r(V, { className: "ymllayout-row gx-0", style: i, children: S(a, (l, s) => E(l, s, t)) });
|
|
1274
1429
|
}
|
|
1275
|
-
function
|
|
1276
|
-
const { type: n, style: i, xs: a, children: o, ...
|
|
1277
|
-
return
|
|
1278
|
-
|
|
1430
|
+
function wt({ yamlNode: e, panel: t }) {
|
|
1431
|
+
const { type: n, style: i, xs: a, children: o, ...l } = e;
|
|
1432
|
+
return W(e, l), Ne(e, "xs", a), /* @__PURE__ */ r(
|
|
1433
|
+
O,
|
|
1279
1434
|
{
|
|
1280
|
-
className:
|
|
1435
|
+
className: Y("yamymllayout-col", { col: !!a }),
|
|
1281
1436
|
style: i,
|
|
1282
1437
|
xs: a,
|
|
1283
|
-
children:
|
|
1438
|
+
children: S(e.children, (s, u) => E(s, u, t))
|
|
1284
1439
|
}
|
|
1285
1440
|
);
|
|
1286
1441
|
}
|
|
1287
|
-
const
|
|
1288
|
-
function
|
|
1289
|
-
|
|
1442
|
+
const Q = {};
|
|
1443
|
+
function rn(e, t) {
|
|
1444
|
+
Q[e] = t;
|
|
1290
1445
|
}
|
|
1291
|
-
function
|
|
1446
|
+
function yt(e, t) {
|
|
1292
1447
|
if (t === void 0)
|
|
1293
|
-
throw new
|
|
1448
|
+
throw new B(e, ["id"]);
|
|
1294
1449
|
if (typeof t.id != "string")
|
|
1295
|
-
throw new
|
|
1450
|
+
throw new w(e, "id", "A string is expected");
|
|
1296
1451
|
}
|
|
1297
|
-
function
|
|
1452
|
+
function vt(e, t, n) {
|
|
1298
1453
|
if (n !== void 0) {
|
|
1299
1454
|
if (!Array.isArray(n))
|
|
1300
|
-
throw new
|
|
1455
|
+
throw new w(e, t, "A option list is expected");
|
|
1301
1456
|
n.forEach((i, a) => {
|
|
1302
1457
|
try {
|
|
1303
|
-
|
|
1458
|
+
yt(e, i);
|
|
1304
1459
|
} catch {
|
|
1305
|
-
throw new
|
|
1460
|
+
throw new w(
|
|
1306
1461
|
e,
|
|
1307
|
-
|
|
1462
|
+
t,
|
|
1308
1463
|
`The hardware description ${a} is wrong`
|
|
1309
1464
|
);
|
|
1310
1465
|
}
|
|
1311
1466
|
});
|
|
1312
1467
|
}
|
|
1313
1468
|
}
|
|
1314
|
-
function
|
|
1469
|
+
function Nt(e) {
|
|
1315
1470
|
const {
|
|
1316
1471
|
providers: t = {},
|
|
1317
1472
|
yamlNode: n,
|
|
1318
1473
|
ids: i,
|
|
1319
1474
|
groupid: a,
|
|
1320
1475
|
even: o,
|
|
1321
|
-
nowrap:
|
|
1322
|
-
...
|
|
1476
|
+
nowrap: l,
|
|
1477
|
+
...s
|
|
1323
1478
|
} = e;
|
|
1324
|
-
if (
|
|
1325
|
-
return /* @__PURE__ */ r(
|
|
1326
|
-
const
|
|
1479
|
+
if (vt(n, "ids", i), ve(n, "groupid", a), J(n, "even", o), J(n, "nowrap", l), W(n, s), !Q.HardwareGroup)
|
|
1480
|
+
return /* @__PURE__ */ r(M, { variant: "warning", children: "No `HardwareGroup` component registered" });
|
|
1481
|
+
const u = Q.HardwareGroup;
|
|
1327
1482
|
return /* @__PURE__ */ r(
|
|
1328
|
-
|
|
1483
|
+
u,
|
|
1329
1484
|
{
|
|
1330
1485
|
providers: t,
|
|
1331
1486
|
ids: i,
|
|
1332
1487
|
groupid: a,
|
|
1333
|
-
nowrap:
|
|
1488
|
+
nowrap: l || !1,
|
|
1334
1489
|
even: o || !1
|
|
1335
1490
|
}
|
|
1336
1491
|
);
|
|
1337
1492
|
}
|
|
1338
|
-
const
|
|
1339
|
-
hardwaregroup:
|
|
1493
|
+
const X = {
|
|
1494
|
+
hardwaregroup: Nt
|
|
1340
1495
|
};
|
|
1341
|
-
function
|
|
1342
|
-
|
|
1496
|
+
function bt(e, t) {
|
|
1497
|
+
X[e] = t;
|
|
1343
1498
|
}
|
|
1344
|
-
function
|
|
1499
|
+
function an(e) {
|
|
1345
1500
|
Object.entries(e).forEach(
|
|
1346
|
-
([t, n]) =>
|
|
1501
|
+
([t, n]) => bt(t, n)
|
|
1347
1502
|
);
|
|
1348
1503
|
}
|
|
1349
|
-
function
|
|
1350
|
-
const { yamlNode: t, panel: n } = e, { type: i, style: a, scroll: o, title:
|
|
1351
|
-
if (!(i in
|
|
1352
|
-
return /* @__PURE__ */ r(
|
|
1504
|
+
function Ot(e) {
|
|
1505
|
+
const { yamlNode: t, panel: n } = e, { type: i, style: a, scroll: o, title: l, ...s } = t;
|
|
1506
|
+
if (!(i in X))
|
|
1507
|
+
return /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(g.Contents, { children: /* @__PURE__ */ c(M, { variant: "warning", children: [
|
|
1353
1508
|
'Unknown component "',
|
|
1354
1509
|
i,
|
|
1355
1510
|
'"'
|
|
1356
1511
|
] }) }) });
|
|
1357
|
-
const
|
|
1358
|
-
return n ? /* @__PURE__ */ r(
|
|
1359
|
-
|
|
1360
|
-
/* @__PURE__ */ r(
|
|
1361
|
-
] }) }) : /* @__PURE__ */ r(
|
|
1512
|
+
const u = X[t.type];
|
|
1513
|
+
return n ? /* @__PURE__ */ r(g, { style: a, scroll: o, children: /* @__PURE__ */ c(se, { fallback: /* @__PURE__ */ r("p", { children: "Loading..." }), children: [
|
|
1514
|
+
l && /* @__PURE__ */ r(g.Header, { children: l }),
|
|
1515
|
+
/* @__PURE__ */ r(g.Contents, { children: /* @__PURE__ */ r(u, { ...s, yamlNode: t }) })
|
|
1516
|
+
] }) }) : /* @__PURE__ */ r(se, { fallback: /* @__PURE__ */ r("p", { children: "Loading..." }), children: /* @__PURE__ */ r(u, { ...s, yamlNode: t }) });
|
|
1362
1517
|
}
|
|
1363
|
-
function
|
|
1518
|
+
function Ct({ yamlNode: e, panel: t }) {
|
|
1364
1519
|
const n = e.options || {};
|
|
1365
|
-
return /* @__PURE__ */ r(
|
|
1520
|
+
return /* @__PURE__ */ r(L, { className: "ymllayout-container", ...n, children: S(e.children, (i, a) => E(i, a, t)) });
|
|
1366
1521
|
}
|
|
1367
|
-
function
|
|
1522
|
+
function St(e) {
|
|
1368
1523
|
const { yamlNode: t } = e, n = t.options || {}, i = {};
|
|
1369
|
-
return n.centerContent && (i.margin = "auto"), /* @__PURE__ */
|
|
1370
|
-
t.title && /* @__PURE__ */ r(
|
|
1371
|
-
/* @__PURE__ */ r(
|
|
1524
|
+
return n.centerContent && (i.margin = "auto"), /* @__PURE__ */ c(g, { className: "ymllayout-panel", ...n, children: [
|
|
1525
|
+
t.title && /* @__PURE__ */ r(g.Header, { children: t.title }),
|
|
1526
|
+
/* @__PURE__ */ r(g.Contents, { style: i, children: S(
|
|
1372
1527
|
t.children,
|
|
1373
|
-
(a, o) =>
|
|
1528
|
+
(a, o) => E(a, o, !1)
|
|
1374
1529
|
) })
|
|
1375
1530
|
] });
|
|
1376
1531
|
}
|
|
1377
|
-
const
|
|
1378
|
-
function
|
|
1532
|
+
const Et = () => Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15);
|
|
1533
|
+
function xt({ yamlNode: e, panel: t }) {
|
|
1379
1534
|
const n = [];
|
|
1380
|
-
return
|
|
1535
|
+
return Ae(e.children, (i, a) => {
|
|
1381
1536
|
n.push(
|
|
1382
|
-
/* @__PURE__ */ r(
|
|
1537
|
+
/* @__PURE__ */ r(Me, { eventKey: Et(), title: i.title, children: E(i, 0, !1) }, a)
|
|
1383
1538
|
);
|
|
1384
|
-
}), t ? /* @__PURE__ */
|
|
1385
|
-
e.title && /* @__PURE__ */ r(
|
|
1386
|
-
/* @__PURE__ */ r(
|
|
1387
|
-
] }) : /* @__PURE__ */ r(
|
|
1539
|
+
}), t ? /* @__PURE__ */ c(g, { className: "ymllayout-tabs", children: [
|
|
1540
|
+
e.title && /* @__PURE__ */ r(g.Header, { children: e.title }),
|
|
1541
|
+
/* @__PURE__ */ r(g.Contents, { children: /* @__PURE__ */ r(oe, { mountOnEnter: !0, children: n }) })
|
|
1542
|
+
] }) : /* @__PURE__ */ r(oe, { children: n });
|
|
1388
1543
|
}
|
|
1389
|
-
function
|
|
1544
|
+
function At(e) {
|
|
1390
1545
|
const { node: t } = e, { type: n, title: i, ...a } = t;
|
|
1391
|
-
return
|
|
1546
|
+
return ge(t, a), /* @__PURE__ */ r("div", { className: "ymllayout-form-header", style: { gridColumn: "1 / 3" }, children: /* @__PURE__ */ r("h3", { children: i }) });
|
|
1392
1547
|
}
|
|
1393
|
-
function
|
|
1548
|
+
function Mt(e) {
|
|
1394
1549
|
const { node: t, state: n, row: i } = e, { title: a } = t;
|
|
1395
1550
|
function o() {
|
|
1396
1551
|
if (t.id)
|
|
1397
1552
|
return t.id;
|
|
1398
1553
|
}
|
|
1399
|
-
function
|
|
1554
|
+
function l() {
|
|
1400
1555
|
if (a !== void 0)
|
|
1401
1556
|
return a;
|
|
1402
1557
|
if (t.type === "hardware") {
|
|
1403
|
-
const
|
|
1558
|
+
const u = o(), h = {
|
|
1404
1559
|
_parentNode: t._parentNode,
|
|
1405
1560
|
_indexFromParent: t._indexFromParent,
|
|
1406
1561
|
type: "hardware",
|
|
1407
|
-
id:
|
|
1562
|
+
id: u,
|
|
1408
1563
|
variant: "name",
|
|
1409
1564
|
emptyifnone: !0
|
|
1410
1565
|
};
|
|
1411
|
-
return
|
|
1566
|
+
return E(h, "a", !1);
|
|
1412
1567
|
}
|
|
1413
1568
|
return "";
|
|
1414
1569
|
}
|
|
1415
|
-
const
|
|
1416
|
-
return /* @__PURE__ */
|
|
1570
|
+
const s = l();
|
|
1571
|
+
return /* @__PURE__ */ c(
|
|
1417
1572
|
"div",
|
|
1418
1573
|
{
|
|
1419
1574
|
style: {
|
|
@@ -1427,7 +1582,7 @@ function bt(e) {
|
|
|
1427
1582
|
margin: "0px",
|
|
1428
1583
|
whiteSpace: "nowrap"
|
|
1429
1584
|
},
|
|
1430
|
-
children:
|
|
1585
|
+
children: s
|
|
1431
1586
|
}
|
|
1432
1587
|
),
|
|
1433
1588
|
n && /* @__PURE__ */ r("div", { style: { position: "relative", top: -5 }, children: n })
|
|
@@ -1435,34 +1590,34 @@ function bt(e) {
|
|
|
1435
1590
|
}
|
|
1436
1591
|
);
|
|
1437
1592
|
}
|
|
1438
|
-
function
|
|
1593
|
+
function Dt(e) {
|
|
1439
1594
|
const { node: t, row: n } = e, {
|
|
1440
1595
|
titlealign: i,
|
|
1441
1596
|
title: a,
|
|
1442
1597
|
stateinheader: o = !1,
|
|
1443
|
-
variant:
|
|
1444
|
-
id:
|
|
1445
|
-
...
|
|
1598
|
+
variant: l,
|
|
1599
|
+
id: s,
|
|
1600
|
+
...u
|
|
1446
1601
|
} = t;
|
|
1447
|
-
let
|
|
1448
|
-
if (
|
|
1449
|
-
if (
|
|
1450
|
-
...
|
|
1451
|
-
id:
|
|
1452
|
-
variant:
|
|
1602
|
+
let h, f;
|
|
1603
|
+
if (u.type === "hardware")
|
|
1604
|
+
if (h = {
|
|
1605
|
+
...u,
|
|
1606
|
+
id: s,
|
|
1607
|
+
variant: l
|
|
1453
1608
|
}, o) {
|
|
1454
|
-
const
|
|
1455
|
-
...
|
|
1456
|
-
id:
|
|
1609
|
+
const d = {
|
|
1610
|
+
...u,
|
|
1611
|
+
id: s,
|
|
1457
1612
|
variant: "state",
|
|
1458
1613
|
emptyifnone: !0
|
|
1459
1614
|
};
|
|
1460
|
-
|
|
1615
|
+
f = E(d, "k", !1);
|
|
1461
1616
|
} else
|
|
1462
|
-
|
|
1617
|
+
f = null;
|
|
1463
1618
|
else
|
|
1464
|
-
|
|
1465
|
-
return /* @__PURE__ */
|
|
1619
|
+
h = u, f = null;
|
|
1620
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
1466
1621
|
/* @__PURE__ */ r(
|
|
1467
1622
|
"div",
|
|
1468
1623
|
{
|
|
@@ -1470,38 +1625,38 @@ function Nt(e) {
|
|
|
1470
1625
|
gridColumn: 1,
|
|
1471
1626
|
alignSelf: i ?? "center"
|
|
1472
1627
|
},
|
|
1473
|
-
children: /* @__PURE__ */ r(
|
|
1628
|
+
children: /* @__PURE__ */ r(Mt, { node: t, state: f, row: n })
|
|
1474
1629
|
}
|
|
1475
1630
|
),
|
|
1476
|
-
/* @__PURE__ */ r("div", { style: { gridColumn: 2 }, children:
|
|
1631
|
+
/* @__PURE__ */ r("div", { style: { gridColumn: 2, alignSelf: "center" }, children: E(h, "k", !1) })
|
|
1477
1632
|
] });
|
|
1478
1633
|
}
|
|
1479
|
-
function
|
|
1480
|
-
const { yamlNode: t, panel: n } = e, { type: i, children: a, options: o = {}, title:
|
|
1481
|
-
return
|
|
1482
|
-
t.title && /* @__PURE__ */ r(
|
|
1483
|
-
/* @__PURE__ */ r(
|
|
1634
|
+
function It(e) {
|
|
1635
|
+
const { yamlNode: t, panel: n } = e, { type: i, children: a, options: o = {}, title: l, ...s } = t;
|
|
1636
|
+
return ge(t, s), /* @__PURE__ */ c(g, { className: "ymllayout-form", ...o, children: [
|
|
1637
|
+
t.title && /* @__PURE__ */ r(g.Header, { children: t.title }),
|
|
1638
|
+
/* @__PURE__ */ r(g.Contents, { className: "full-sizer", style: { overflow: "auto" }, children: /* @__PURE__ */ r(
|
|
1484
1639
|
"div",
|
|
1485
1640
|
{
|
|
1486
1641
|
style: {
|
|
1487
1642
|
display: "grid",
|
|
1488
1643
|
gridTemplateColumns: "min-content auto"
|
|
1489
1644
|
},
|
|
1490
|
-
children:
|
|
1491
|
-
|
|
1645
|
+
children: S(a, (u, h) => u.type === "formheader" ? /* @__PURE__ */ r(
|
|
1646
|
+
At,
|
|
1492
1647
|
{
|
|
1493
|
-
node:
|
|
1494
|
-
row:
|
|
1648
|
+
node: u,
|
|
1649
|
+
row: h
|
|
1495
1650
|
},
|
|
1496
|
-
|
|
1497
|
-
) : /* @__PURE__ */ r(
|
|
1651
|
+
h
|
|
1652
|
+
) : /* @__PURE__ */ r(Dt, { node: u, row: h }, h))
|
|
1498
1653
|
}
|
|
1499
1654
|
) })
|
|
1500
1655
|
] });
|
|
1501
1656
|
}
|
|
1502
|
-
function
|
|
1657
|
+
function kt(e) {
|
|
1503
1658
|
const { yamlNode: t, panel: n } = e;
|
|
1504
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ c(
|
|
1505
1660
|
"div",
|
|
1506
1661
|
{
|
|
1507
1662
|
className: "ymllayout-grid",
|
|
@@ -1510,17 +1665,17 @@ function Ot(e) {
|
|
|
1510
1665
|
gridTemplateRows: t.rows
|
|
1511
1666
|
},
|
|
1512
1667
|
children: [
|
|
1513
|
-
|
|
1514
|
-
const { columnSpan: o = 1, rowSpan:
|
|
1668
|
+
S(t.children, (i, a) => {
|
|
1669
|
+
const { columnSpan: o = 1, rowSpan: l = 1, ...s } = i, u = o > 1 ? `span ${o}` : void 0, h = l > 1 ? `span ${l}` : void 0;
|
|
1515
1670
|
return /* @__PURE__ */ r(
|
|
1516
1671
|
"div",
|
|
1517
1672
|
{
|
|
1518
1673
|
className: "ymllayout-grid-cell",
|
|
1519
1674
|
style: {
|
|
1520
|
-
gridColumn:
|
|
1521
|
-
gridRow:
|
|
1675
|
+
gridColumn: u,
|
|
1676
|
+
gridRow: h
|
|
1522
1677
|
},
|
|
1523
|
-
children:
|
|
1678
|
+
children: E(s, a, n)
|
|
1524
1679
|
},
|
|
1525
1680
|
a
|
|
1526
1681
|
);
|
|
@@ -1530,57 +1685,71 @@ function Ot(e) {
|
|
|
1530
1685
|
}
|
|
1531
1686
|
);
|
|
1532
1687
|
}
|
|
1533
|
-
function
|
|
1688
|
+
function $t({ yamlNode: e, panel: t }) {
|
|
1534
1689
|
const n = e.options || {};
|
|
1535
|
-
return /* @__PURE__ */ r(
|
|
1536
|
-
}
|
|
1537
|
-
const
|
|
1538
|
-
row:
|
|
1539
|
-
col:
|
|
1540
|
-
container:
|
|
1541
|
-
component:
|
|
1542
|
-
panel:
|
|
1543
|
-
tabs:
|
|
1544
|
-
form:
|
|
1545
|
-
grid:
|
|
1546
|
-
label:
|
|
1690
|
+
return /* @__PURE__ */ r(tt, { panel: t, options: n, children: /* @__PURE__ */ r("div", { children: e.label }) });
|
|
1691
|
+
}
|
|
1692
|
+
const Ft = {
|
|
1693
|
+
row: gt,
|
|
1694
|
+
col: wt,
|
|
1695
|
+
container: Ct,
|
|
1696
|
+
component: Ot,
|
|
1697
|
+
panel: St,
|
|
1698
|
+
tabs: xt,
|
|
1699
|
+
form: It,
|
|
1700
|
+
grid: kt,
|
|
1701
|
+
label: $t
|
|
1547
1702
|
};
|
|
1548
|
-
Object.entries(
|
|
1549
|
-
|
|
1703
|
+
Object.entries(Ft).forEach(([e, t]) => {
|
|
1704
|
+
et(e, t);
|
|
1550
1705
|
});
|
|
1551
|
-
function
|
|
1706
|
+
function on(e) {
|
|
1552
1707
|
var n;
|
|
1553
|
-
const t =
|
|
1554
|
-
return t.error ? /* @__PURE__ */ r(
|
|
1555
|
-
|
|
1556
|
-
/* @__PURE__ */ s(p.Contents, { children: [
|
|
1557
|
-
/* @__PURE__ */ s("p", { children: [
|
|
1558
|
-
"File: ",
|
|
1559
|
-
t.name
|
|
1560
|
-
] }),
|
|
1561
|
-
/* @__PURE__ */ r(x, { variant: "warning", children: /* @__PURE__ */ r("pre", { className: "mb-0", children: t.error }) })
|
|
1562
|
-
] })
|
|
1563
|
-
] }) }) : /* @__PURE__ */ r("div", { className: `${e.className ?? ""} ymllayout-main`, id: e.id, children: /* @__PURE__ */ r(
|
|
1564
|
-
Je,
|
|
1708
|
+
const t = te(() => we(e.layout), [e.layout]);
|
|
1709
|
+
return t.error ? /* @__PURE__ */ r(
|
|
1710
|
+
"div",
|
|
1565
1711
|
{
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1712
|
+
className: `${e.className ?? ""} ymllayout-main`,
|
|
1713
|
+
"data-testid": e.testid,
|
|
1714
|
+
children: /* @__PURE__ */ c(g, { children: [
|
|
1715
|
+
/* @__PURE__ */ r(g.Header, { children: "Layout Error" }),
|
|
1716
|
+
/* @__PURE__ */ c(g.Contents, { children: [
|
|
1717
|
+
/* @__PURE__ */ c("p", { children: [
|
|
1718
|
+
"File: ",
|
|
1719
|
+
t.name
|
|
1720
|
+
] }),
|
|
1721
|
+
/* @__PURE__ */ r(M, { variant: "warning", children: /* @__PURE__ */ r("pre", { className: "mb-0", children: t.error }) })
|
|
1722
|
+
] })
|
|
1723
|
+
] })
|
|
1570
1724
|
}
|
|
1571
|
-
)
|
|
1725
|
+
) : /* @__PURE__ */ r(
|
|
1726
|
+
"div",
|
|
1727
|
+
{
|
|
1728
|
+
className: `${e.className ?? ""} ymllayout-main`,
|
|
1729
|
+
"data-testid": e.testid,
|
|
1730
|
+
children: /* @__PURE__ */ r(
|
|
1731
|
+
at,
|
|
1732
|
+
{
|
|
1733
|
+
resetKey: t,
|
|
1734
|
+
unhandledComponentDidCatch: e.unhandledComponentDidCatch,
|
|
1735
|
+
UnhandledErrorComponent: e.UnhandledErrorComponent,
|
|
1736
|
+
children: (n = t.children) == null ? void 0 : n.map((i, a) => E(i, a))
|
|
1737
|
+
}
|
|
1738
|
+
)
|
|
1739
|
+
}
|
|
1740
|
+
);
|
|
1572
1741
|
}
|
|
1573
|
-
const
|
|
1742
|
+
const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1574
1743
|
__proto__: null
|
|
1575
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1576
|
-
hardware:
|
|
1744
|
+
}, Symbol.toStringTag, { value: "Module" })), be = {
|
|
1745
|
+
hardware: Ht
|
|
1577
1746
|
};
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1747
|
+
function ln(e, t) {
|
|
1748
|
+
be[e] = t;
|
|
1580
1749
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return /* @__PURE__ */
|
|
1583
|
-
|
|
1750
|
+
function Rt(e) {
|
|
1751
|
+
return /* @__PURE__ */ c(
|
|
1752
|
+
O,
|
|
1584
1753
|
{
|
|
1585
1754
|
className: "monitor-panel-item bg-fatal",
|
|
1586
1755
|
title: `Error from yaml configuration: ${e.message}`,
|
|
@@ -1591,11 +1760,11 @@ function xt(e) {
|
|
|
1591
1760
|
}
|
|
1592
1761
|
);
|
|
1593
1762
|
}
|
|
1594
|
-
function
|
|
1595
|
-
const t =
|
|
1596
|
-
const a = n.type ?? "hardware", o =
|
|
1763
|
+
function cn(e) {
|
|
1764
|
+
const t = S(e.monitors, (n, i) => {
|
|
1765
|
+
const a = n.type ?? "hardware", o = be[a];
|
|
1597
1766
|
return o === void 0 ? /* @__PURE__ */ r(
|
|
1598
|
-
|
|
1767
|
+
Rt,
|
|
1599
1768
|
{
|
|
1600
1769
|
monitor: n,
|
|
1601
1770
|
message: `Type ${a} unsupported`
|
|
@@ -1606,29 +1775,29 @@ function tn(e) {
|
|
|
1606
1775
|
return /* @__PURE__ */ r(
|
|
1607
1776
|
"div",
|
|
1608
1777
|
{
|
|
1609
|
-
className:
|
|
1778
|
+
className: Y(
|
|
1610
1779
|
{ "ms-auto": e.margin === "start" },
|
|
1611
1780
|
"me-auto",
|
|
1612
1781
|
"monitor-panel",
|
|
1613
1782
|
{ "monitor-panel-light": e.bg === "light" }
|
|
1614
1783
|
),
|
|
1615
|
-
children: /* @__PURE__ */ r(
|
|
1784
|
+
children: /* @__PURE__ */ r(L, { fluid: !0, children: /* @__PURE__ */ r(V, { className: "flex-nowrap", children: t }) })
|
|
1616
1785
|
}
|
|
1617
1786
|
);
|
|
1618
1787
|
}
|
|
1619
|
-
function
|
|
1620
|
-
return /* @__PURE__ */ r(
|
|
1788
|
+
function dn(e) {
|
|
1789
|
+
return /* @__PURE__ */ r(O, { className: "monitor-panel-item", children: e.children });
|
|
1621
1790
|
}
|
|
1622
|
-
const
|
|
1623
|
-
function
|
|
1624
|
-
|
|
1791
|
+
const ee = {};
|
|
1792
|
+
function un(e, t) {
|
|
1793
|
+
ee[e] = t;
|
|
1625
1794
|
}
|
|
1626
|
-
function
|
|
1627
|
-
if (!
|
|
1795
|
+
function Oe(e) {
|
|
1796
|
+
if (!ee.useHardware)
|
|
1628
1797
|
throw new Error("No `useHardware` hook registered");
|
|
1629
|
-
return
|
|
1798
|
+
return ee.useHardware(e);
|
|
1630
1799
|
}
|
|
1631
|
-
const
|
|
1800
|
+
const Tt = (e, t, n) => {
|
|
1632
1801
|
const i = {
|
|
1633
1802
|
">": (a, o) => a > o,
|
|
1634
1803
|
"<": (a, o) => a < o,
|
|
@@ -1641,87 +1810,88 @@ const At = (e, t, n) => {
|
|
|
1641
1810
|
if (e in i)
|
|
1642
1811
|
return i[e](t, n);
|
|
1643
1812
|
};
|
|
1644
|
-
function
|
|
1813
|
+
function Ce(e, t, n) {
|
|
1645
1814
|
const i = e.split(t);
|
|
1646
1815
|
return n ? [i.slice(0, -n).join(t)].concat(i.slice(-n)) : i;
|
|
1647
1816
|
}
|
|
1648
|
-
function
|
|
1649
|
-
const t = e !== void 0 ?
|
|
1817
|
+
function de(e) {
|
|
1818
|
+
const t = e !== void 0 ? Ce(e, ".", 1) : [null, ""], n = Oe(t[0]);
|
|
1650
1819
|
if (n && n.properties && t[1] !== null)
|
|
1651
1820
|
return Array.isArray(n.properties[t[1]]) ? n.properties[t[1]][0] : n.properties[t[1]];
|
|
1652
1821
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const t = e !== void 0 && !e.includes("."), n = e !== void 0 ?
|
|
1822
|
+
function _t(e) {
|
|
1823
|
+
const t = e !== void 0 && !e.includes("."), n = e !== void 0 ? Ce(e, ".", 1) : [null, ""], i = Oe(n[0]);
|
|
1655
1824
|
if (t)
|
|
1656
1825
|
return e;
|
|
1657
1826
|
if (i && i.properties && n[1] !== null)
|
|
1658
1827
|
return `${i.properties[n[1]]}`;
|
|
1659
1828
|
}
|
|
1660
|
-
function
|
|
1829
|
+
function Ht(e) {
|
|
1661
1830
|
const { monitor: t } = e;
|
|
1662
|
-
let n =
|
|
1663
|
-
const i =
|
|
1831
|
+
let n = de(t.value) ?? "-";
|
|
1832
|
+
const i = _t(t.unit), a = de(t.overlay), o = Number.parseFloat(`${n}`);
|
|
1664
1833
|
Number.isNaN(o) || String(o).length > 5 && (n = o.toPrecision(5));
|
|
1665
|
-
let
|
|
1666
|
-
t.comparator && t.comparison && (
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
`)
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1834
|
+
let l;
|
|
1835
|
+
if (t.comparator && t.comparison && (l = Tt(t.comparator, n, t.comparison) ? "valid" : "invalid"), Number.isNaN(o) || i !== void 0 && (n = `${n} ${i}`), a) {
|
|
1836
|
+
const s = `${a}`;
|
|
1837
|
+
return /* @__PURE__ */ r(
|
|
1838
|
+
R,
|
|
1839
|
+
{
|
|
1840
|
+
placement: "bottom",
|
|
1841
|
+
overlay: /* @__PURE__ */ r(he, { id: "tooltipid", className: "monitor-panel-tooltip", children: s.includes(`
|
|
1842
|
+
`) ? /* @__PURE__ */ r("pre", { children: s }) : s }),
|
|
1843
|
+
children: /* @__PURE__ */ c(O, { className: "monitor-panel-item", children: [
|
|
1844
|
+
/* @__PURE__ */ r("h1", { children: t.name }),
|
|
1845
|
+
/* @__PURE__ */ r("div", { className: l, children: `${n}` })
|
|
1846
|
+
] })
|
|
1847
|
+
},
|
|
1848
|
+
t.name
|
|
1849
|
+
);
|
|
1679
1850
|
}
|
|
1680
|
-
return (
|
|
1681
|
-
|
|
1682
|
-
/* @__PURE__ */
|
|
1683
|
-
|
|
1684
|
-
/* @__PURE__ */ r("div", { className: d, children: `${n}` })
|
|
1685
|
-
] }))
|
|
1686
|
-
);
|
|
1851
|
+
return /* @__PURE__ */ c(O, { className: "monitor-panel-item", children: [
|
|
1852
|
+
/* @__PURE__ */ r("h1", { children: t.name }),
|
|
1853
|
+
/* @__PURE__ */ r("div", { className: l, children: `${n}` })
|
|
1854
|
+
] }, t.name);
|
|
1687
1855
|
}
|
|
1688
1856
|
export {
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1857
|
+
Ut as Formatting,
|
|
1858
|
+
zt as Frontend,
|
|
1859
|
+
Je as FullSizer,
|
|
1860
|
+
sn as HWObject,
|
|
1861
|
+
le as HardwareInputNumber,
|
|
1862
|
+
Ue as HardwareNumericStep,
|
|
1863
|
+
tn as HardwareSchema,
|
|
1864
|
+
Gt as HardwareState,
|
|
1865
|
+
G as HardwareTemplate,
|
|
1866
|
+
en as HardwareTypes,
|
|
1867
|
+
Qt as HardwareVariant,
|
|
1868
|
+
Bt as Info,
|
|
1869
|
+
w as KeyError,
|
|
1870
|
+
B as MissingKeysError,
|
|
1871
|
+
Ht as MonitorHardware,
|
|
1872
|
+
cn as MonitorPanel,
|
|
1873
|
+
dn as MonitorPanelItem,
|
|
1874
|
+
Wt as MotorDefault,
|
|
1875
|
+
Ye as MotorState,
|
|
1876
|
+
qt as Multiposition,
|
|
1877
|
+
Xt as NoObject,
|
|
1878
|
+
Ke as NumericStep,
|
|
1879
|
+
g as Panel,
|
|
1880
|
+
Zt as Property,
|
|
1881
|
+
Jt as ShutterDefault,
|
|
1882
|
+
We as ShutterState,
|
|
1883
|
+
T as TypeIcon,
|
|
1884
|
+
at as YAMLErrorBoundary,
|
|
1885
|
+
on as YAMLLayout,
|
|
1886
|
+
nn as YamlAsserts,
|
|
1887
|
+
Tt as dynamicOp,
|
|
1888
|
+
rn as registerHardwareComponent,
|
|
1889
|
+
ln as registerMonitorComponent,
|
|
1890
|
+
un as registerRuntimeHook,
|
|
1891
|
+
bt as registerYamlComponent,
|
|
1892
|
+
an as registerYamlComponents,
|
|
1893
|
+
et as registerYamlType,
|
|
1894
|
+
E as renderYamlNode,
|
|
1895
|
+
Ft as yamlMap
|
|
1726
1896
|
};
|
|
1727
1897
|
//# sourceMappingURL=index.mjs.map
|