@nice2dev/ui-iot 1.1.10 → 1.2.1
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.cjs +1 -27
- package/dist/index.mjs +836 -2428
- package/dist/ui-iot.css +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const a =
|
|
6
|
-
return { t: a, lang:
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as I, createContext as x, useState as g, useCallback as f } from "react";
|
|
3
|
+
const K = (a, r) => r, Y = /* @__PURE__ */ x(K), J = /* @__PURE__ */ x("en");
|
|
4
|
+
function b() {
|
|
5
|
+
const a = I(Y), r = I(J);
|
|
6
|
+
return { t: a, lang: r };
|
|
7
7
|
}
|
|
8
|
-
const
|
|
9
|
-
radius: "md",
|
|
10
|
-
shadow: "md",
|
|
11
|
-
fill: "solid",
|
|
12
|
-
buttonStyle: "flat",
|
|
13
|
-
inputStyle: "bordered",
|
|
14
|
-
cardStyle: "elevated",
|
|
15
|
-
badgeStyle: "solid",
|
|
16
|
-
tabStyle: "underline",
|
|
17
|
-
toggleStyle: "default",
|
|
18
|
-
tooltipStyle: "dark",
|
|
19
|
-
modalStyle: "default",
|
|
20
|
-
tableStyle: "default",
|
|
21
|
-
menuStyle: "default",
|
|
22
|
-
animation: "normal",
|
|
23
|
-
density: "normal"
|
|
24
|
-
};
|
|
25
|
-
M({
|
|
26
|
-
displayStyle: "default",
|
|
27
|
-
variantConfig: fe,
|
|
28
|
-
setDisplayStyle: () => {
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const me = {
|
|
8
|
+
const X = {
|
|
32
9
|
// Navigation
|
|
33
10
|
"chevron-down": "M6 9l6 6 6-6",
|
|
34
11
|
"chevron-up": "M18 15l-6-6-6 6",
|
|
@@ -78,6 +55,8 @@ const me = {
|
|
|
78
55
|
link: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
|
|
79
56
|
mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",
|
|
80
57
|
phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
|
|
58
|
+
// the device, as `phone` is the handset
|
|
59
|
+
smartphone: "M7 2h10a2 2 0 012 2v16a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2z M11 18h2",
|
|
81
60
|
user: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
|
|
82
61
|
users: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
|
|
83
62
|
home: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
|
|
@@ -224,41 +203,52 @@ const me = {
|
|
|
224
203
|
keyboard: "M4 6h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M8 14h8",
|
|
225
204
|
"page-break": "M6 3v5h12V3 M6 21v-5h12v5 M2 12h3 M8 12h3 M13 12h3 M19 12h3",
|
|
226
205
|
shield: "M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z",
|
|
227
|
-
repeat: "M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3"
|
|
228
|
-
|
|
206
|
+
repeat: "M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3",
|
|
207
|
+
// 1.2.1: for the controls that drew these as inline <svg>
|
|
208
|
+
pin: "M12 17v5 M5 17h14l-1.5-3V8a2 2 0 00-2-2h-7a2 2 0 00-2 2v6z",
|
|
209
|
+
"mic-off": "M1 1l22 22 M9 9v3a3 3 0 005.12 2.12 M15 9.34V4a3 3 0 00-5.94-.6 M17 16.95A7 7 0 015 12v-2 M19 10v2a7 7 0 01-.11 1.23 M12 19v4 M8 23h8",
|
|
210
|
+
"log-out": "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4 M16 17l5-5-5-5 M21 12H9",
|
|
211
|
+
"chevrons-left": "M11 17l-5-5 5-5 M18 17l-5-5 5-5",
|
|
212
|
+
"chevrons-right": "M13 17l5-5-5-5 M6 17l5-5-5-5",
|
|
213
|
+
"zoom-in": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M11 8v6 M8 11h6",
|
|
214
|
+
"zoom-out": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",
|
|
215
|
+
navigation: "M12 2l7 19-7-4-7 4z",
|
|
216
|
+
"refresh-ccw": "M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",
|
|
217
|
+
minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7"
|
|
218
|
+
}, Z = {
|
|
229
219
|
xs: 12,
|
|
230
220
|
sm: 16,
|
|
231
221
|
md: 20,
|
|
232
222
|
lg: 24,
|
|
233
223
|
xl: 32
|
|
234
|
-
},
|
|
235
|
-
function
|
|
224
|
+
}, ee = /* @__PURE__ */ x({});
|
|
225
|
+
function ae({
|
|
236
226
|
path: a,
|
|
237
|
-
size:
|
|
238
|
-
className:
|
|
227
|
+
size: r,
|
|
228
|
+
className: l,
|
|
239
229
|
style: n,
|
|
240
|
-
color:
|
|
230
|
+
color: c,
|
|
241
231
|
title: t,
|
|
242
|
-
onClick:
|
|
232
|
+
onClick: o
|
|
243
233
|
}) {
|
|
244
|
-
return /* @__PURE__ */
|
|
234
|
+
return /* @__PURE__ */ i(
|
|
245
235
|
"svg",
|
|
246
236
|
{
|
|
247
237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
248
|
-
width:
|
|
249
|
-
height:
|
|
238
|
+
width: r,
|
|
239
|
+
height: r,
|
|
250
240
|
viewBox: "0 0 24 24",
|
|
251
241
|
fill: "none",
|
|
252
|
-
stroke:
|
|
242
|
+
stroke: c || "currentColor",
|
|
253
243
|
strokeWidth: 2,
|
|
254
244
|
strokeLinecap: "round",
|
|
255
245
|
strokeLinejoin: "round",
|
|
256
|
-
className: `nice-icon ${
|
|
246
|
+
className: `nice-icon ${l || ""}`,
|
|
257
247
|
style: n,
|
|
258
248
|
role: t ? "img" : "presentation",
|
|
259
249
|
"aria-label": t,
|
|
260
250
|
"aria-hidden": !t,
|
|
261
|
-
onClick:
|
|
251
|
+
onClick: o,
|
|
262
252
|
children: [
|
|
263
253
|
t && /* @__PURE__ */ e("title", { children: t }),
|
|
264
254
|
/* @__PURE__ */ e("path", { d: a })
|
|
@@ -266,1729 +256,70 @@ function ye({
|
|
|
266
256
|
}
|
|
267
257
|
);
|
|
268
258
|
}
|
|
269
|
-
const
|
|
259
|
+
const m = ({
|
|
270
260
|
name: a,
|
|
271
|
-
size:
|
|
272
|
-
className:
|
|
261
|
+
size: r = "md",
|
|
262
|
+
className: l,
|
|
273
263
|
style: n,
|
|
274
|
-
color:
|
|
264
|
+
color: c,
|
|
275
265
|
title: t,
|
|
276
|
-
onClick:
|
|
266
|
+
onClick: o
|
|
277
267
|
}) => {
|
|
278
|
-
const { resolver:
|
|
279
|
-
if (
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
return /* @__PURE__ */ e("span", { className: `nice-icon-wrap ${
|
|
268
|
+
const { resolver: s } = I(ee), h = typeof r == "number" ? r : Z[r];
|
|
269
|
+
if (s) {
|
|
270
|
+
const u = s(a, h);
|
|
271
|
+
if (u)
|
|
272
|
+
return /* @__PURE__ */ e("span", { className: `nice-icon-wrap ${l || ""}`, style: n, onClick: o, children: u });
|
|
283
273
|
}
|
|
284
|
-
const
|
|
285
|
-
return
|
|
286
|
-
|
|
274
|
+
const p = X[a];
|
|
275
|
+
return p ? /* @__PURE__ */ e(
|
|
276
|
+
ae,
|
|
287
277
|
{
|
|
288
|
-
path:
|
|
289
|
-
size:
|
|
290
|
-
className:
|
|
278
|
+
path: p,
|
|
279
|
+
size: h,
|
|
280
|
+
className: l,
|
|
291
281
|
style: n,
|
|
292
|
-
color:
|
|
282
|
+
color: c,
|
|
293
283
|
title: t,
|
|
294
|
-
onClick:
|
|
284
|
+
onClick: o
|
|
295
285
|
}
|
|
296
286
|
) : null;
|
|
297
287
|
};
|
|
298
|
-
M({
|
|
299
|
-
direction: "ltr",
|
|
300
|
-
isRTL: !1,
|
|
301
|
-
flip: (a) => a,
|
|
302
|
-
flipStyle: (a, i) => ({ [a]: i })
|
|
303
|
-
});
|
|
304
|
-
M({
|
|
305
|
-
permissions: {},
|
|
306
|
-
getAccessMode: () => "full"
|
|
307
|
-
});
|
|
308
|
-
M(null);
|
|
309
|
-
M(null);
|
|
310
|
-
const Y = {
|
|
311
|
-
space1: "4px",
|
|
312
|
-
space2: "8px",
|
|
313
|
-
space3: "12px",
|
|
314
|
-
space4: "16px",
|
|
315
|
-
space5: "20px",
|
|
316
|
-
space6: "24px",
|
|
317
|
-
space8: "32px"
|
|
318
|
-
}, Z = {
|
|
319
|
-
fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
|
|
320
|
-
fontSizeXs: "0.75rem",
|
|
321
|
-
fontSizeSm: "0.8125rem",
|
|
322
|
-
fontSizeMd: "0.875rem",
|
|
323
|
-
fontSizeLg: "1rem",
|
|
324
|
-
fontSizeXl: "1.125rem",
|
|
325
|
-
fontWeightNormal: 400,
|
|
326
|
-
fontWeightMedium: 500,
|
|
327
|
-
fontWeightSemibold: 600,
|
|
328
|
-
fontWeightBold: 700,
|
|
329
|
-
lineHeight: 1.5
|
|
330
|
-
}, ee = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, ae = (a) => ({
|
|
331
|
-
color: a,
|
|
332
|
-
radiusSm: "4px",
|
|
333
|
-
radiusMd: "6px",
|
|
334
|
-
radiusLg: "8px",
|
|
335
|
-
radiusXl: "12px",
|
|
336
|
-
radiusFull: "9999px"
|
|
337
|
-
}), ue = {
|
|
338
|
-
sm: "0 1px 2px rgba(0,0,0,0.05)",
|
|
339
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
340
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
341
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
342
|
-
}, ve = {
|
|
343
|
-
sm: "0 1px 2px rgba(0,0,0,0.3)",
|
|
344
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.4)",
|
|
345
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
|
|
346
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
|
|
347
|
-
};
|
|
348
|
-
function s(a, i, c, n, o) {
|
|
349
|
-
return {
|
|
350
|
-
name: a,
|
|
351
|
-
darkMode: "light",
|
|
352
|
-
colors: {
|
|
353
|
-
...i,
|
|
354
|
-
surface: i.surface ?? c.primary,
|
|
355
|
-
surfaceHover: i.surfaceHover ?? c.secondary
|
|
356
|
-
},
|
|
357
|
-
backgrounds: {
|
|
358
|
-
...c,
|
|
359
|
-
elevated: c.elevated ?? c.primary,
|
|
360
|
-
inset: c.inset ?? c.tertiary,
|
|
361
|
-
canvas: c.canvas ?? c.primary
|
|
362
|
-
},
|
|
363
|
-
text: { ...n, inverse: n.inverse ?? "#ffffff" },
|
|
364
|
-
borders: ae(o),
|
|
365
|
-
shadows: ue,
|
|
366
|
-
spacing: Y,
|
|
367
|
-
typography: Z,
|
|
368
|
-
transitions: ee
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
function h(a, i, c, n, o) {
|
|
372
|
-
return {
|
|
373
|
-
name: a,
|
|
374
|
-
darkMode: "dark",
|
|
375
|
-
colors: {
|
|
376
|
-
...i,
|
|
377
|
-
surface: i.surface ?? c.secondary,
|
|
378
|
-
surfaceHover: i.surfaceHover ?? c.tertiary
|
|
379
|
-
},
|
|
380
|
-
backgrounds: {
|
|
381
|
-
...c,
|
|
382
|
-
elevated: c.elevated ?? c.secondary,
|
|
383
|
-
inset: c.inset ?? c.primary,
|
|
384
|
-
canvas: c.canvas ?? c.primary
|
|
385
|
-
},
|
|
386
|
-
text: { ...n, inverse: n.inverse ?? "#0f172a" },
|
|
387
|
-
borders: ae(o),
|
|
388
|
-
shadows: ve,
|
|
389
|
-
spacing: Y,
|
|
390
|
-
typography: Z,
|
|
391
|
-
transitions: ee
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
s(
|
|
395
|
-
"Slate",
|
|
396
|
-
{
|
|
397
|
-
primary: "#64748b",
|
|
398
|
-
primaryHover: "#475569",
|
|
399
|
-
success: "#10b981",
|
|
400
|
-
warning: "#f59e0b",
|
|
401
|
-
error: "#ef4444",
|
|
402
|
-
info: "#06b6d4"
|
|
403
|
-
},
|
|
404
|
-
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
405
|
-
{ primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
|
|
406
|
-
"#cbd5e1"
|
|
407
|
-
);
|
|
408
|
-
s(
|
|
409
|
-
"Zinc",
|
|
410
|
-
{
|
|
411
|
-
primary: "#71717a",
|
|
412
|
-
primaryHover: "#52525b",
|
|
413
|
-
success: "#22c55e",
|
|
414
|
-
warning: "#eab308",
|
|
415
|
-
error: "#ef4444",
|
|
416
|
-
info: "#06b6d4"
|
|
417
|
-
},
|
|
418
|
-
{ primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
|
|
419
|
-
{ primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
|
|
420
|
-
"#d4d4d8"
|
|
421
|
-
);
|
|
422
|
-
s(
|
|
423
|
-
"Stone",
|
|
424
|
-
{
|
|
425
|
-
primary: "#78716c",
|
|
426
|
-
primaryHover: "#57534e",
|
|
427
|
-
success: "#16a34a",
|
|
428
|
-
warning: "#ca8a04",
|
|
429
|
-
error: "#dc2626",
|
|
430
|
-
info: "#0891b2"
|
|
431
|
-
},
|
|
432
|
-
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
433
|
-
{ primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
|
|
434
|
-
"#d6d3d1"
|
|
435
|
-
);
|
|
436
|
-
s(
|
|
437
|
-
"Cool Gray",
|
|
438
|
-
{
|
|
439
|
-
primary: "#6b7280",
|
|
440
|
-
primaryHover: "#4b5563",
|
|
441
|
-
success: "#10b981",
|
|
442
|
-
warning: "#f59e0b",
|
|
443
|
-
error: "#ef4444",
|
|
444
|
-
info: "#3b82f6"
|
|
445
|
-
},
|
|
446
|
-
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
447
|
-
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
448
|
-
"#d1d5db"
|
|
449
|
-
);
|
|
450
|
-
s(
|
|
451
|
-
"Warm Gray",
|
|
452
|
-
{
|
|
453
|
-
primary: "#7c7568",
|
|
454
|
-
primaryHover: "#5c564c",
|
|
455
|
-
success: "#4d7c0f",
|
|
456
|
-
warning: "#a16207",
|
|
457
|
-
error: "#b91c1c",
|
|
458
|
-
info: "#0e7490"
|
|
459
|
-
},
|
|
460
|
-
{ primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
|
|
461
|
-
{ primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
|
|
462
|
-
"#d4d0c8"
|
|
463
|
-
);
|
|
464
|
-
s(
|
|
465
|
-
"Silver",
|
|
466
|
-
{
|
|
467
|
-
primary: "#94a3b8",
|
|
468
|
-
primaryHover: "#64748b",
|
|
469
|
-
success: "#10b981",
|
|
470
|
-
warning: "#f59e0b",
|
|
471
|
-
error: "#ef4444",
|
|
472
|
-
info: "#38bdf8"
|
|
473
|
-
},
|
|
474
|
-
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
475
|
-
{ primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
|
|
476
|
-
"#cbd5e1"
|
|
477
|
-
);
|
|
478
|
-
s(
|
|
479
|
-
"Charcoal",
|
|
480
|
-
{
|
|
481
|
-
primary: "#374151",
|
|
482
|
-
primaryHover: "#1f2937",
|
|
483
|
-
success: "#059669",
|
|
484
|
-
warning: "#d97706",
|
|
485
|
-
error: "#dc2626",
|
|
486
|
-
info: "#0284c7"
|
|
487
|
-
},
|
|
488
|
-
{ primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
|
|
489
|
-
{ primary: "#111827", secondary: "#374151", muted: "#6b7280" },
|
|
490
|
-
"#d1d5db"
|
|
491
|
-
);
|
|
492
|
-
s(
|
|
493
|
-
"Ivory",
|
|
494
|
-
{
|
|
495
|
-
primary: "#92876d",
|
|
496
|
-
primaryHover: "#7a6f55",
|
|
497
|
-
success: "#4d7c0f",
|
|
498
|
-
warning: "#a16207",
|
|
499
|
-
error: "#b91c1c",
|
|
500
|
-
info: "#0e7490"
|
|
501
|
-
},
|
|
502
|
-
{ primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
|
|
503
|
-
{ primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
|
|
504
|
-
"#ddd8c4"
|
|
505
|
-
);
|
|
506
|
-
s(
|
|
507
|
-
"Rose",
|
|
508
|
-
{
|
|
509
|
-
primary: "#e11d48",
|
|
510
|
-
primaryHover: "#be123c",
|
|
511
|
-
success: "#16a34a",
|
|
512
|
-
warning: "#ea580c",
|
|
513
|
-
error: "#dc2626",
|
|
514
|
-
info: "#0891b2"
|
|
515
|
-
},
|
|
516
|
-
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
517
|
-
{ primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
|
|
518
|
-
"#fda4af"
|
|
519
|
-
);
|
|
520
|
-
s(
|
|
521
|
-
"Emerald",
|
|
522
|
-
{
|
|
523
|
-
primary: "#059669",
|
|
524
|
-
primaryHover: "#047857",
|
|
525
|
-
success: "#16a34a",
|
|
526
|
-
warning: "#d97706",
|
|
527
|
-
error: "#dc2626",
|
|
528
|
-
info: "#0891b2"
|
|
529
|
-
},
|
|
530
|
-
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
531
|
-
{ primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
|
|
532
|
-
"#6ee7b7"
|
|
533
|
-
);
|
|
534
|
-
s(
|
|
535
|
-
"Amber",
|
|
536
|
-
{
|
|
537
|
-
primary: "#d97706",
|
|
538
|
-
primaryHover: "#b45309",
|
|
539
|
-
success: "#16a34a",
|
|
540
|
-
warning: "#ca8a04",
|
|
541
|
-
error: "#dc2626",
|
|
542
|
-
info: "#0284c7"
|
|
543
|
-
},
|
|
544
|
-
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
545
|
-
{ primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
|
|
546
|
-
"#fcd34d"
|
|
547
|
-
);
|
|
548
|
-
s(
|
|
549
|
-
"Violet",
|
|
550
|
-
{
|
|
551
|
-
primary: "#7c3aed",
|
|
552
|
-
primaryHover: "#6d28d9",
|
|
553
|
-
success: "#10b981",
|
|
554
|
-
warning: "#f59e0b",
|
|
555
|
-
error: "#ef4444",
|
|
556
|
-
info: "#06b6d4"
|
|
557
|
-
},
|
|
558
|
-
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
559
|
-
{ primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
560
|
-
"#c4b5fd"
|
|
561
|
-
);
|
|
562
|
-
s(
|
|
563
|
-
"Teal",
|
|
564
|
-
{
|
|
565
|
-
primary: "#0d9488",
|
|
566
|
-
primaryHover: "#0f766e",
|
|
567
|
-
success: "#16a34a",
|
|
568
|
-
warning: "#d97706",
|
|
569
|
-
error: "#dc2626",
|
|
570
|
-
info: "#0284c7"
|
|
571
|
-
},
|
|
572
|
-
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
573
|
-
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
574
|
-
"#5eead4"
|
|
575
|
-
);
|
|
576
|
-
s(
|
|
577
|
-
"Indigo",
|
|
578
|
-
{
|
|
579
|
-
primary: "#4f46e5",
|
|
580
|
-
primaryHover: "#4338ca",
|
|
581
|
-
success: "#10b981",
|
|
582
|
-
warning: "#f59e0b",
|
|
583
|
-
error: "#ef4444",
|
|
584
|
-
info: "#06b6d4"
|
|
585
|
-
},
|
|
586
|
-
{ primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
|
|
587
|
-
{ primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
|
|
588
|
-
"#a5b4fc"
|
|
589
|
-
);
|
|
590
|
-
s(
|
|
591
|
-
"Cyan",
|
|
592
|
-
{
|
|
593
|
-
primary: "#0891b2",
|
|
594
|
-
primaryHover: "#0e7490",
|
|
595
|
-
success: "#10b981",
|
|
596
|
-
warning: "#f59e0b",
|
|
597
|
-
error: "#ef4444",
|
|
598
|
-
info: "#0284c7"
|
|
599
|
-
},
|
|
600
|
-
{ primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
|
|
601
|
-
{ primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
|
|
602
|
-
"#67e8f9"
|
|
603
|
-
);
|
|
604
|
-
s(
|
|
605
|
-
"Lime",
|
|
606
|
-
{
|
|
607
|
-
primary: "#65a30d",
|
|
608
|
-
primaryHover: "#4d7c0f",
|
|
609
|
-
success: "#16a34a",
|
|
610
|
-
warning: "#ca8a04",
|
|
611
|
-
error: "#dc2626",
|
|
612
|
-
info: "#0891b2"
|
|
613
|
-
},
|
|
614
|
-
{ primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
|
|
615
|
-
{ primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
|
|
616
|
-
"#bef264"
|
|
617
|
-
);
|
|
618
|
-
s(
|
|
619
|
-
"Pink",
|
|
620
|
-
{
|
|
621
|
-
primary: "#db2777",
|
|
622
|
-
primaryHover: "#be185d",
|
|
623
|
-
success: "#10b981",
|
|
624
|
-
warning: "#f59e0b",
|
|
625
|
-
error: "#dc2626",
|
|
626
|
-
info: "#06b6d4"
|
|
627
|
-
},
|
|
628
|
-
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
629
|
-
{ primary: "#500724", secondary: "#831843", muted: "#f472b6" },
|
|
630
|
-
"#f9a8d4"
|
|
631
|
-
);
|
|
632
|
-
s(
|
|
633
|
-
"Orange",
|
|
634
|
-
{
|
|
635
|
-
primary: "#ea580c",
|
|
636
|
-
primaryHover: "#c2410c",
|
|
637
|
-
success: "#16a34a",
|
|
638
|
-
warning: "#ca8a04",
|
|
639
|
-
error: "#dc2626",
|
|
640
|
-
info: "#0891b2"
|
|
641
|
-
},
|
|
642
|
-
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
643
|
-
{ primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
|
|
644
|
-
"#fdba74"
|
|
645
|
-
);
|
|
646
|
-
s(
|
|
647
|
-
"Fuchsia",
|
|
648
|
-
{
|
|
649
|
-
primary: "#c026d3",
|
|
650
|
-
primaryHover: "#a21caf",
|
|
651
|
-
success: "#10b981",
|
|
652
|
-
warning: "#eab308",
|
|
653
|
-
error: "#ef4444",
|
|
654
|
-
info: "#06b6d4"
|
|
655
|
-
},
|
|
656
|
-
{ primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
|
|
657
|
-
{ primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
|
|
658
|
-
"#e879f9"
|
|
659
|
-
);
|
|
660
|
-
s(
|
|
661
|
-
"Sky",
|
|
662
|
-
{
|
|
663
|
-
primary: "#0284c7",
|
|
664
|
-
primaryHover: "#0369a1",
|
|
665
|
-
success: "#10b981",
|
|
666
|
-
warning: "#f59e0b",
|
|
667
|
-
error: "#ef4444",
|
|
668
|
-
info: "#06b6d4"
|
|
669
|
-
},
|
|
670
|
-
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
671
|
-
{ primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
|
|
672
|
-
"#7dd3fc"
|
|
673
|
-
);
|
|
674
|
-
s(
|
|
675
|
-
"Ruby",
|
|
676
|
-
{
|
|
677
|
-
primary: "#be123c",
|
|
678
|
-
primaryHover: "#9f1239",
|
|
679
|
-
success: "#059669",
|
|
680
|
-
warning: "#d97706",
|
|
681
|
-
error: "#dc2626",
|
|
682
|
-
info: "#0284c7"
|
|
683
|
-
},
|
|
684
|
-
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
685
|
-
{ primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
|
|
686
|
-
"#fda4af"
|
|
687
|
-
);
|
|
688
|
-
s(
|
|
689
|
-
"Coral",
|
|
690
|
-
{
|
|
691
|
-
primary: "#f97316",
|
|
692
|
-
primaryHover: "#ea580c",
|
|
693
|
-
success: "#10b981",
|
|
694
|
-
warning: "#eab308",
|
|
695
|
-
error: "#ef4444",
|
|
696
|
-
info: "#06b6d4"
|
|
697
|
-
},
|
|
698
|
-
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
699
|
-
{ primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
|
|
700
|
-
"#fdba74"
|
|
701
|
-
);
|
|
702
|
-
h(
|
|
703
|
-
"Midnight",
|
|
704
|
-
{
|
|
705
|
-
primary: "#818cf8",
|
|
706
|
-
primaryHover: "#6366f1",
|
|
707
|
-
success: "#34d399",
|
|
708
|
-
warning: "#fbbf24",
|
|
709
|
-
error: "#f87171",
|
|
710
|
-
info: "#22d3ee"
|
|
711
|
-
},
|
|
712
|
-
{ primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
|
|
713
|
-
{ primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
|
|
714
|
-
"#1e293b"
|
|
715
|
-
);
|
|
716
|
-
h(
|
|
717
|
-
"Obsidian",
|
|
718
|
-
{
|
|
719
|
-
primary: "#a78bfa",
|
|
720
|
-
primaryHover: "#8b5cf6",
|
|
721
|
-
success: "#4ade80",
|
|
722
|
-
warning: "#facc15",
|
|
723
|
-
error: "#fb7185",
|
|
724
|
-
info: "#38bdf8"
|
|
725
|
-
},
|
|
726
|
-
{ primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
|
|
727
|
-
{ primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
|
|
728
|
-
"#3f3f46"
|
|
729
|
-
);
|
|
730
|
-
h(
|
|
731
|
-
"Eclipse",
|
|
732
|
-
{
|
|
733
|
-
primary: "#c084fc",
|
|
734
|
-
primaryHover: "#a855f7",
|
|
735
|
-
success: "#34d399",
|
|
736
|
-
warning: "#fbbf24",
|
|
737
|
-
error: "#f87171",
|
|
738
|
-
info: "#67e8f9"
|
|
739
|
-
},
|
|
740
|
-
{ primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
|
|
741
|
-
{ primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
|
|
742
|
-
"#3b3266"
|
|
743
|
-
);
|
|
744
|
-
h(
|
|
745
|
-
"Onyx",
|
|
746
|
-
{
|
|
747
|
-
primary: "#60a5fa",
|
|
748
|
-
primaryHover: "#3b82f6",
|
|
749
|
-
success: "#4ade80",
|
|
750
|
-
warning: "#fbbf24",
|
|
751
|
-
error: "#f87171",
|
|
752
|
-
info: "#22d3ee"
|
|
753
|
-
},
|
|
754
|
-
{ primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
|
|
755
|
-
{ primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
|
|
756
|
-
"#262626"
|
|
757
|
-
);
|
|
758
|
-
h(
|
|
759
|
-
"Carbon",
|
|
760
|
-
{
|
|
761
|
-
primary: "#38bdf8",
|
|
762
|
-
primaryHover: "#0ea5e9",
|
|
763
|
-
success: "#4ade80",
|
|
764
|
-
warning: "#facc15",
|
|
765
|
-
error: "#f87171",
|
|
766
|
-
info: "#67e8f9"
|
|
767
|
-
},
|
|
768
|
-
{ primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
|
|
769
|
-
{ primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
|
|
770
|
-
"#525252"
|
|
771
|
-
);
|
|
772
|
-
h(
|
|
773
|
-
"Cosmos",
|
|
774
|
-
{
|
|
775
|
-
primary: "#6366f1",
|
|
776
|
-
primaryHover: "#4f46e5",
|
|
777
|
-
success: "#34d399",
|
|
778
|
-
warning: "#fbbf24",
|
|
779
|
-
error: "#f87171",
|
|
780
|
-
info: "#22d3ee"
|
|
781
|
-
},
|
|
782
|
-
{ primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
|
|
783
|
-
{ primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
|
|
784
|
-
"#374151"
|
|
785
|
-
);
|
|
786
|
-
h(
|
|
787
|
-
"Nebula",
|
|
788
|
-
{
|
|
789
|
-
primary: "#e879f9",
|
|
790
|
-
primaryHover: "#d946ef",
|
|
791
|
-
success: "#4ade80",
|
|
792
|
-
warning: "#fbbf24",
|
|
793
|
-
error: "#fb7185",
|
|
794
|
-
info: "#67e8f9"
|
|
795
|
-
},
|
|
796
|
-
{ primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
|
|
797
|
-
{ primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
|
|
798
|
-
"#581c87"
|
|
799
|
-
);
|
|
800
|
-
h(
|
|
801
|
-
"Abyss",
|
|
802
|
-
{
|
|
803
|
-
primary: "#22d3ee",
|
|
804
|
-
primaryHover: "#06b6d4",
|
|
805
|
-
success: "#34d399",
|
|
806
|
-
warning: "#fbbf24",
|
|
807
|
-
error: "#f87171",
|
|
808
|
-
info: "#38bdf8"
|
|
809
|
-
},
|
|
810
|
-
{ primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
|
|
811
|
-
{ primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
|
|
812
|
-
"#075985"
|
|
813
|
-
);
|
|
814
|
-
h(
|
|
815
|
-
"Shadow",
|
|
816
|
-
{
|
|
817
|
-
primary: "#a3a3a3",
|
|
818
|
-
primaryHover: "#737373",
|
|
819
|
-
success: "#4ade80",
|
|
820
|
-
warning: "#facc15",
|
|
821
|
-
error: "#f87171",
|
|
822
|
-
info: "#38bdf8"
|
|
823
|
-
},
|
|
824
|
-
{ primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
|
|
825
|
-
{ primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
|
|
826
|
-
"#404040"
|
|
827
|
-
);
|
|
828
|
-
h(
|
|
829
|
-
"Emerald Dark",
|
|
830
|
-
{
|
|
831
|
-
primary: "#34d399",
|
|
832
|
-
primaryHover: "#10b981",
|
|
833
|
-
success: "#4ade80",
|
|
834
|
-
warning: "#fbbf24",
|
|
835
|
-
error: "#f87171",
|
|
836
|
-
info: "#22d3ee"
|
|
837
|
-
},
|
|
838
|
-
{ primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
|
|
839
|
-
{ primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
|
|
840
|
-
"#047857"
|
|
841
|
-
);
|
|
842
|
-
s(
|
|
843
|
-
"Forest",
|
|
844
|
-
{
|
|
845
|
-
primary: "#166534",
|
|
846
|
-
primaryHover: "#14532d",
|
|
847
|
-
success: "#22c55e",
|
|
848
|
-
warning: "#ca8a04",
|
|
849
|
-
error: "#dc2626",
|
|
850
|
-
info: "#0891b2"
|
|
851
|
-
},
|
|
852
|
-
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
853
|
-
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
854
|
-
"#86efac"
|
|
855
|
-
);
|
|
856
|
-
s(
|
|
857
|
-
"Ocean",
|
|
858
|
-
{
|
|
859
|
-
primary: "#0369a1",
|
|
860
|
-
primaryHover: "#075985",
|
|
861
|
-
success: "#059669",
|
|
862
|
-
warning: "#d97706",
|
|
863
|
-
error: "#dc2626",
|
|
864
|
-
info: "#0284c7"
|
|
865
|
-
},
|
|
866
|
-
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
867
|
-
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
|
|
868
|
-
"#7dd3fc"
|
|
869
|
-
);
|
|
870
|
-
s(
|
|
871
|
-
"Desert",
|
|
872
|
-
{
|
|
873
|
-
primary: "#b45309",
|
|
874
|
-
primaryHover: "#92400e",
|
|
875
|
-
success: "#4d7c0f",
|
|
876
|
-
warning: "#a16207",
|
|
877
|
-
error: "#b91c1c",
|
|
878
|
-
info: "#0e7490"
|
|
879
|
-
},
|
|
880
|
-
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
881
|
-
{ primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
|
|
882
|
-
"#fde047"
|
|
883
|
-
);
|
|
884
|
-
s(
|
|
885
|
-
"Sunset",
|
|
886
|
-
{
|
|
887
|
-
primary: "#ea580c",
|
|
888
|
-
primaryHover: "#c2410c",
|
|
889
|
-
success: "#16a34a",
|
|
890
|
-
warning: "#d97706",
|
|
891
|
-
error: "#dc2626",
|
|
892
|
-
info: "#0891b2"
|
|
893
|
-
},
|
|
894
|
-
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
895
|
-
{ primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
|
|
896
|
-
"#fdba74"
|
|
897
|
-
);
|
|
898
|
-
s(
|
|
899
|
-
"Aurora",
|
|
900
|
-
{
|
|
901
|
-
primary: "#0d9488",
|
|
902
|
-
primaryHover: "#0f766e",
|
|
903
|
-
success: "#22c55e",
|
|
904
|
-
warning: "#eab308",
|
|
905
|
-
error: "#ef4444",
|
|
906
|
-
info: "#06b6d4"
|
|
907
|
-
},
|
|
908
|
-
{ primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
|
|
909
|
-
{ primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
|
|
910
|
-
"#5eead4"
|
|
911
|
-
);
|
|
912
|
-
s(
|
|
913
|
-
"Lavender",
|
|
914
|
-
{
|
|
915
|
-
primary: "#7e22ce",
|
|
916
|
-
primaryHover: "#6b21a8",
|
|
917
|
-
success: "#16a34a",
|
|
918
|
-
warning: "#d97706",
|
|
919
|
-
error: "#dc2626",
|
|
920
|
-
info: "#0891b2"
|
|
921
|
-
},
|
|
922
|
-
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
923
|
-
{ primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
|
|
924
|
-
"#d8b4fe"
|
|
925
|
-
);
|
|
926
|
-
s(
|
|
927
|
-
"Autumn",
|
|
928
|
-
{
|
|
929
|
-
primary: "#c2410c",
|
|
930
|
-
primaryHover: "#9a3412",
|
|
931
|
-
success: "#4d7c0f",
|
|
932
|
-
warning: "#a16207",
|
|
933
|
-
error: "#b91c1c",
|
|
934
|
-
info: "#0e7490"
|
|
935
|
-
},
|
|
936
|
-
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
937
|
-
{ primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
|
|
938
|
-
"#fca5a5"
|
|
939
|
-
);
|
|
940
|
-
s(
|
|
941
|
-
"Spring",
|
|
942
|
-
{
|
|
943
|
-
primary: "#16a34a",
|
|
944
|
-
primaryHover: "#15803d",
|
|
945
|
-
success: "#22c55e",
|
|
946
|
-
warning: "#eab308",
|
|
947
|
-
error: "#ef4444",
|
|
948
|
-
info: "#06b6d4"
|
|
949
|
-
},
|
|
950
|
-
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
951
|
-
{ primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
|
|
952
|
-
"#86efac"
|
|
953
|
-
);
|
|
954
|
-
s(
|
|
955
|
-
"Arctic",
|
|
956
|
-
{
|
|
957
|
-
primary: "#0ea5e9",
|
|
958
|
-
primaryHover: "#0284c7",
|
|
959
|
-
success: "#10b981",
|
|
960
|
-
warning: "#f59e0b",
|
|
961
|
-
error: "#ef4444",
|
|
962
|
-
info: "#06b6d4"
|
|
963
|
-
},
|
|
964
|
-
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
965
|
-
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
966
|
-
"#bae6fd"
|
|
967
|
-
);
|
|
968
|
-
s(
|
|
969
|
-
"Tropical",
|
|
970
|
-
{
|
|
971
|
-
primary: "#0d9488",
|
|
972
|
-
primaryHover: "#0f766e",
|
|
973
|
-
success: "#16a34a",
|
|
974
|
-
warning: "#f59e0b",
|
|
975
|
-
error: "#ef4444",
|
|
976
|
-
info: "#06b6d4"
|
|
977
|
-
},
|
|
978
|
-
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
979
|
-
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
980
|
-
"#a7f3d0"
|
|
981
|
-
);
|
|
982
|
-
s(
|
|
983
|
-
"Pastel Rose",
|
|
984
|
-
{
|
|
985
|
-
primary: "#f472b6",
|
|
986
|
-
primaryHover: "#ec4899",
|
|
987
|
-
success: "#4ade80",
|
|
988
|
-
warning: "#fcd34d",
|
|
989
|
-
error: "#fb7185",
|
|
990
|
-
info: "#67e8f9"
|
|
991
|
-
},
|
|
992
|
-
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
993
|
-
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
994
|
-
"#f9a8d4"
|
|
995
|
-
);
|
|
996
|
-
s(
|
|
997
|
-
"Pastel Sky",
|
|
998
|
-
{
|
|
999
|
-
primary: "#38bdf8",
|
|
1000
|
-
primaryHover: "#0ea5e9",
|
|
1001
|
-
success: "#4ade80",
|
|
1002
|
-
warning: "#fcd34d",
|
|
1003
|
-
error: "#fb7185",
|
|
1004
|
-
info: "#67e8f9"
|
|
1005
|
-
},
|
|
1006
|
-
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1007
|
-
{ primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1008
|
-
"#bae6fd"
|
|
1009
|
-
);
|
|
1010
|
-
s(
|
|
1011
|
-
"Pastel Mint",
|
|
1012
|
-
{
|
|
1013
|
-
primary: "#34d399",
|
|
1014
|
-
primaryHover: "#10b981",
|
|
1015
|
-
success: "#4ade80",
|
|
1016
|
-
warning: "#fcd34d",
|
|
1017
|
-
error: "#fb7185",
|
|
1018
|
-
info: "#67e8f9"
|
|
1019
|
-
},
|
|
1020
|
-
{ primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1021
|
-
{ primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
|
|
1022
|
-
"#a7f3d0"
|
|
1023
|
-
);
|
|
1024
|
-
s(
|
|
1025
|
-
"Pastel Peach",
|
|
1026
|
-
{
|
|
1027
|
-
primary: "#fb923c",
|
|
1028
|
-
primaryHover: "#f97316",
|
|
1029
|
-
success: "#4ade80",
|
|
1030
|
-
warning: "#fcd34d",
|
|
1031
|
-
error: "#fb7185",
|
|
1032
|
-
info: "#67e8f9"
|
|
1033
|
-
},
|
|
1034
|
-
{ primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
|
|
1035
|
-
{ primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
|
|
1036
|
-
"#fed7aa"
|
|
1037
|
-
);
|
|
1038
|
-
s(
|
|
1039
|
-
"Pastel Lavender",
|
|
1040
|
-
{
|
|
1041
|
-
primary: "#a78bfa",
|
|
1042
|
-
primaryHover: "#8b5cf6",
|
|
1043
|
-
success: "#4ade80",
|
|
1044
|
-
warning: "#fcd34d",
|
|
1045
|
-
error: "#fb7185",
|
|
1046
|
-
info: "#67e8f9"
|
|
1047
|
-
},
|
|
1048
|
-
{ primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
|
|
1049
|
-
{ primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
|
|
1050
|
-
"#ddd6fe"
|
|
1051
|
-
);
|
|
1052
|
-
s(
|
|
1053
|
-
"Pastel Lemon",
|
|
1054
|
-
{
|
|
1055
|
-
primary: "#facc15",
|
|
1056
|
-
primaryHover: "#eab308",
|
|
1057
|
-
success: "#4ade80",
|
|
1058
|
-
warning: "#fcd34d",
|
|
1059
|
-
error: "#fb7185",
|
|
1060
|
-
info: "#67e8f9"
|
|
1061
|
-
},
|
|
1062
|
-
{ primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
|
|
1063
|
-
{ primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
|
|
1064
|
-
"#fef08a"
|
|
1065
|
-
);
|
|
1066
|
-
s(
|
|
1067
|
-
"Pastel Sage",
|
|
1068
|
-
{
|
|
1069
|
-
primary: "#86efac",
|
|
1070
|
-
primaryHover: "#4ade80",
|
|
1071
|
-
success: "#22c55e",
|
|
1072
|
-
warning: "#fcd34d",
|
|
1073
|
-
error: "#fb7185",
|
|
1074
|
-
info: "#67e8f9"
|
|
1075
|
-
},
|
|
1076
|
-
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1077
|
-
{ primary: "#166534", secondary: "#15803d", muted: "#86efac" },
|
|
1078
|
-
"#bbf7d0"
|
|
1079
|
-
);
|
|
1080
|
-
s(
|
|
1081
|
-
"Pastel Coral",
|
|
1082
|
-
{
|
|
1083
|
-
primary: "#fb7185",
|
|
1084
|
-
primaryHover: "#f43f5e",
|
|
1085
|
-
success: "#4ade80",
|
|
1086
|
-
warning: "#fcd34d",
|
|
1087
|
-
error: "#ef4444",
|
|
1088
|
-
info: "#67e8f9"
|
|
1089
|
-
},
|
|
1090
|
-
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1091
|
-
{ primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
|
|
1092
|
-
"#fecdd3"
|
|
1093
|
-
);
|
|
1094
|
-
s(
|
|
1095
|
-
"Banking",
|
|
1096
|
-
{
|
|
1097
|
-
primary: "#1e3a5f",
|
|
1098
|
-
primaryHover: "#152c4a",
|
|
1099
|
-
success: "#059669",
|
|
1100
|
-
warning: "#d97706",
|
|
1101
|
-
error: "#dc2626",
|
|
1102
|
-
info: "#0891b2"
|
|
1103
|
-
},
|
|
1104
|
-
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1105
|
-
{ primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
|
|
1106
|
-
"#cbd5e1"
|
|
1107
|
-
);
|
|
1108
|
-
s(
|
|
1109
|
-
"Healthcare",
|
|
1110
|
-
{
|
|
1111
|
-
primary: "#0891b2",
|
|
1112
|
-
primaryHover: "#0e7490",
|
|
1113
|
-
success: "#059669",
|
|
1114
|
-
warning: "#d97706",
|
|
1115
|
-
error: "#dc2626",
|
|
1116
|
-
info: "#0284c7"
|
|
1117
|
-
},
|
|
1118
|
-
{ primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
|
|
1119
|
-
{ primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
|
|
1120
|
-
"#b2dfdb"
|
|
1121
|
-
);
|
|
1122
|
-
s(
|
|
1123
|
-
"Legal",
|
|
1124
|
-
{
|
|
1125
|
-
primary: "#1e293b",
|
|
1126
|
-
primaryHover: "#0f172a",
|
|
1127
|
-
success: "#059669",
|
|
1128
|
-
warning: "#d97706",
|
|
1129
|
-
error: "#dc2626",
|
|
1130
|
-
info: "#0284c7"
|
|
1131
|
-
},
|
|
1132
|
-
{ primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
|
|
1133
|
-
{ primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
|
|
1134
|
-
"#d6d3d1"
|
|
1135
|
-
);
|
|
1136
|
-
s(
|
|
1137
|
-
"Tech Startup",
|
|
1138
|
-
{
|
|
1139
|
-
primary: "#7c3aed",
|
|
1140
|
-
primaryHover: "#6d28d9",
|
|
1141
|
-
success: "#10b981",
|
|
1142
|
-
warning: "#f59e0b",
|
|
1143
|
-
error: "#ef4444",
|
|
1144
|
-
info: "#06b6d4"
|
|
1145
|
-
},
|
|
1146
|
-
{ primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
|
|
1147
|
-
{ primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
|
|
1148
|
-
"#c4b5fd"
|
|
1149
|
-
);
|
|
1150
|
-
s(
|
|
1151
|
-
"Enterprise",
|
|
1152
|
-
{
|
|
1153
|
-
primary: "#1e40af",
|
|
1154
|
-
primaryHover: "#1e3a8a",
|
|
1155
|
-
success: "#059669",
|
|
1156
|
-
warning: "#d97706",
|
|
1157
|
-
error: "#dc2626",
|
|
1158
|
-
info: "#0891b2"
|
|
1159
|
-
},
|
|
1160
|
-
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
1161
|
-
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
|
|
1162
|
-
"#93c5fd"
|
|
1163
|
-
);
|
|
1164
|
-
s(
|
|
1165
|
-
"Government",
|
|
1166
|
-
{
|
|
1167
|
-
primary: "#1d4ed8",
|
|
1168
|
-
primaryHover: "#1e40af",
|
|
1169
|
-
success: "#059669",
|
|
1170
|
-
warning: "#d97706",
|
|
1171
|
-
error: "#dc2626",
|
|
1172
|
-
info: "#0891b2"
|
|
1173
|
-
},
|
|
1174
|
-
{ primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
|
|
1175
|
-
{ primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
|
|
1176
|
-
"#cbd5e1"
|
|
1177
|
-
);
|
|
1178
|
-
s(
|
|
1179
|
-
"Education",
|
|
1180
|
-
{
|
|
1181
|
-
primary: "#059669",
|
|
1182
|
-
primaryHover: "#047857",
|
|
1183
|
-
success: "#16a34a",
|
|
1184
|
-
warning: "#f59e0b",
|
|
1185
|
-
error: "#ef4444",
|
|
1186
|
-
info: "#0891b2"
|
|
1187
|
-
},
|
|
1188
|
-
{ primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
|
|
1189
|
-
{ primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
|
|
1190
|
-
"#a7f3d0"
|
|
1191
|
-
);
|
|
1192
|
-
s(
|
|
1193
|
-
"Real Estate",
|
|
1194
|
-
{
|
|
1195
|
-
primary: "#92400e",
|
|
1196
|
-
primaryHover: "#78350f",
|
|
1197
|
-
success: "#059669",
|
|
1198
|
-
warning: "#b45309",
|
|
1199
|
-
error: "#dc2626",
|
|
1200
|
-
info: "#0891b2"
|
|
1201
|
-
},
|
|
1202
|
-
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1203
|
-
{ primary: "#422006", secondary: "#713f12", muted: "#d97706" },
|
|
1204
|
-
"#fcd34d"
|
|
1205
|
-
);
|
|
1206
|
-
s(
|
|
1207
|
-
"Nord",
|
|
1208
|
-
{
|
|
1209
|
-
primary: "#5e81ac",
|
|
1210
|
-
primaryHover: "#4c6b90",
|
|
1211
|
-
success: "#a3be8c",
|
|
1212
|
-
warning: "#ebcb8b",
|
|
1213
|
-
error: "#bf616a",
|
|
1214
|
-
info: "#88c0d0"
|
|
1215
|
-
},
|
|
1216
|
-
{ primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
|
|
1217
|
-
{ primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
|
|
1218
|
-
"#d8dee9"
|
|
1219
|
-
);
|
|
1220
|
-
h(
|
|
1221
|
-
"Dracula",
|
|
1222
|
-
{
|
|
1223
|
-
primary: "#bd93f9",
|
|
1224
|
-
primaryHover: "#9d79d9",
|
|
1225
|
-
success: "#50fa7b",
|
|
1226
|
-
warning: "#f1fa8c",
|
|
1227
|
-
error: "#ff5555",
|
|
1228
|
-
info: "#8be9fd"
|
|
1229
|
-
},
|
|
1230
|
-
{ primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
|
|
1231
|
-
{ primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
|
|
1232
|
-
"#44475a"
|
|
1233
|
-
);
|
|
1234
|
-
s(
|
|
1235
|
-
"Solarized Light",
|
|
1236
|
-
{
|
|
1237
|
-
primary: "#268bd2",
|
|
1238
|
-
primaryHover: "#1a6da0",
|
|
1239
|
-
success: "#859900",
|
|
1240
|
-
warning: "#b58900",
|
|
1241
|
-
error: "#dc322f",
|
|
1242
|
-
info: "#2aa198"
|
|
1243
|
-
},
|
|
1244
|
-
{ primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
|
|
1245
|
-
{ primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
|
|
1246
|
-
"#eee8d5"
|
|
1247
|
-
);
|
|
1248
|
-
h(
|
|
1249
|
-
"Solarized Dark",
|
|
1250
|
-
{
|
|
1251
|
-
primary: "#268bd2",
|
|
1252
|
-
primaryHover: "#3d98db",
|
|
1253
|
-
success: "#859900",
|
|
1254
|
-
warning: "#b58900",
|
|
1255
|
-
error: "#dc322f",
|
|
1256
|
-
info: "#2aa198"
|
|
1257
|
-
},
|
|
1258
|
-
{ primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
|
|
1259
|
-
{ primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
|
|
1260
|
-
"#073642"
|
|
1261
|
-
);
|
|
1262
|
-
h(
|
|
1263
|
-
"Monokai",
|
|
1264
|
-
{
|
|
1265
|
-
primary: "#66d9ef",
|
|
1266
|
-
primaryHover: "#45c0d6",
|
|
1267
|
-
success: "#a6e22e",
|
|
1268
|
-
warning: "#e6db74",
|
|
1269
|
-
error: "#f92672",
|
|
1270
|
-
info: "#66d9ef"
|
|
1271
|
-
},
|
|
1272
|
-
{ primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
|
|
1273
|
-
{ primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
|
|
1274
|
-
"#3e3d32"
|
|
1275
|
-
);
|
|
1276
|
-
h(
|
|
1277
|
-
"One Dark",
|
|
1278
|
-
{
|
|
1279
|
-
primary: "#61afef",
|
|
1280
|
-
primaryHover: "#4b9ee0",
|
|
1281
|
-
success: "#98c379",
|
|
1282
|
-
warning: "#e5c07b",
|
|
1283
|
-
error: "#e06c75",
|
|
1284
|
-
info: "#56b6c2"
|
|
1285
|
-
},
|
|
1286
|
-
{ primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
|
|
1287
|
-
{ primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
|
|
1288
|
-
"#3e4452"
|
|
1289
|
-
);
|
|
1290
|
-
h(
|
|
1291
|
-
"Synthwave",
|
|
1292
|
-
{
|
|
1293
|
-
primary: "#ff7edb",
|
|
1294
|
-
primaryHover: "#e660c2",
|
|
1295
|
-
success: "#72f1b8",
|
|
1296
|
-
warning: "#fede5d",
|
|
1297
|
-
error: "#fe4450",
|
|
1298
|
-
info: "#36f9f6"
|
|
1299
|
-
},
|
|
1300
|
-
{ primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
|
|
1301
|
-
{ primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
|
|
1302
|
-
"#4a3866"
|
|
1303
|
-
);
|
|
1304
|
-
s(
|
|
1305
|
-
"Vaporwave",
|
|
1306
|
-
{
|
|
1307
|
-
primary: "#ff71ce",
|
|
1308
|
-
primaryHover: "#e655b5",
|
|
1309
|
-
success: "#78dcca",
|
|
1310
|
-
warning: "#ffb86c",
|
|
1311
|
-
error: "#ff5555",
|
|
1312
|
-
info: "#76e8fc"
|
|
1313
|
-
},
|
|
1314
|
-
{ primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
|
|
1315
|
-
{ primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
|
|
1316
|
-
"#d8a8e8"
|
|
1317
|
-
);
|
|
1318
|
-
h(
|
|
1319
|
-
"Terminal Green",
|
|
1320
|
-
{
|
|
1321
|
-
primary: "#00ff41",
|
|
1322
|
-
primaryHover: "#00cc34",
|
|
1323
|
-
success: "#00ff41",
|
|
1324
|
-
warning: "#ffff00",
|
|
1325
|
-
error: "#ff0000",
|
|
1326
|
-
info: "#00ffff"
|
|
1327
|
-
},
|
|
1328
|
-
{ primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
|
|
1329
|
-
{ primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
|
|
1330
|
-
"#003300"
|
|
1331
|
-
);
|
|
1332
|
-
s(
|
|
1333
|
-
"Sepia",
|
|
1334
|
-
{
|
|
1335
|
-
primary: "#8b6914",
|
|
1336
|
-
primaryHover: "#704f10",
|
|
1337
|
-
success: "#6b8e23",
|
|
1338
|
-
warning: "#cd853f",
|
|
1339
|
-
error: "#b22222",
|
|
1340
|
-
info: "#5f9ea0"
|
|
1341
|
-
},
|
|
1342
|
-
{ primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
|
|
1343
|
-
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
1344
|
-
"#d7ccc8"
|
|
1345
|
-
);
|
|
1346
|
-
s(
|
|
1347
|
-
"Vintage",
|
|
1348
|
-
{
|
|
1349
|
-
primary: "#8d6e63",
|
|
1350
|
-
primaryHover: "#6d4c41",
|
|
1351
|
-
success: "#66bb6a",
|
|
1352
|
-
warning: "#ffb300",
|
|
1353
|
-
error: "#e53935",
|
|
1354
|
-
info: "#29b6f6"
|
|
1355
|
-
},
|
|
1356
|
-
{ primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
|
|
1357
|
-
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
1358
|
-
"#bcaaa4"
|
|
1359
|
-
);
|
|
1360
|
-
h(
|
|
1361
|
-
"Cyberpunk",
|
|
1362
|
-
{
|
|
1363
|
-
primary: "#00f0ff",
|
|
1364
|
-
primaryHover: "#00c8d4",
|
|
1365
|
-
success: "#39ff14",
|
|
1366
|
-
warning: "#ffff00",
|
|
1367
|
-
error: "#ff003c",
|
|
1368
|
-
info: "#bf00ff"
|
|
1369
|
-
},
|
|
1370
|
-
{ primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
|
|
1371
|
-
{ primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
|
|
1372
|
-
"#1c3a44"
|
|
1373
|
-
);
|
|
1374
|
-
h(
|
|
1375
|
-
"Neon",
|
|
1376
|
-
{
|
|
1377
|
-
primary: "#ff00ff",
|
|
1378
|
-
primaryHover: "#cc00cc",
|
|
1379
|
-
success: "#00ff00",
|
|
1380
|
-
warning: "#ffff00",
|
|
1381
|
-
error: "#ff0000",
|
|
1382
|
-
info: "#00ffff"
|
|
1383
|
-
},
|
|
1384
|
-
{ primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
|
|
1385
|
-
{ primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
|
|
1386
|
-
"#333333"
|
|
1387
|
-
);
|
|
1388
|
-
h(
|
|
1389
|
-
"Retrowave",
|
|
1390
|
-
{
|
|
1391
|
-
primary: "#f77fbe",
|
|
1392
|
-
primaryHover: "#e462a3",
|
|
1393
|
-
success: "#72f1b8",
|
|
1394
|
-
warning: "#ffe261",
|
|
1395
|
-
error: "#ff4444",
|
|
1396
|
-
info: "#79e8fb"
|
|
1397
|
-
},
|
|
1398
|
-
{ primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
|
|
1399
|
-
{ primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
|
|
1400
|
-
"#4a2d66"
|
|
1401
|
-
);
|
|
1402
|
-
s(
|
|
1403
|
-
"Christmas",
|
|
1404
|
-
{
|
|
1405
|
-
primary: "#c41e3a",
|
|
1406
|
-
primaryHover: "#a01830",
|
|
1407
|
-
success: "#228b22",
|
|
1408
|
-
warning: "#ffd700",
|
|
1409
|
-
error: "#dc2626",
|
|
1410
|
-
info: "#0891b2"
|
|
1411
|
-
},
|
|
1412
|
-
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
1413
|
-
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
1414
|
-
"#e8a0a0"
|
|
1415
|
-
);
|
|
1416
|
-
h(
|
|
1417
|
-
"Halloween",
|
|
1418
|
-
{
|
|
1419
|
-
primary: "#ff6600",
|
|
1420
|
-
primaryHover: "#e05500",
|
|
1421
|
-
success: "#4ade80",
|
|
1422
|
-
warning: "#fbbf24",
|
|
1423
|
-
error: "#ff0000",
|
|
1424
|
-
info: "#9333ea"
|
|
1425
|
-
},
|
|
1426
|
-
{ primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
|
|
1427
|
-
{ primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
|
|
1428
|
-
"#5c3400"
|
|
1429
|
-
);
|
|
1430
|
-
s(
|
|
1431
|
-
"Valentine",
|
|
1432
|
-
{
|
|
1433
|
-
primary: "#e11d48",
|
|
1434
|
-
primaryHover: "#be123c",
|
|
1435
|
-
success: "#10b981",
|
|
1436
|
-
warning: "#f59e0b",
|
|
1437
|
-
error: "#dc2626",
|
|
1438
|
-
info: "#ec4899"
|
|
1439
|
-
},
|
|
1440
|
-
{ primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
|
|
1441
|
-
{ primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
|
|
1442
|
-
"#fda4af"
|
|
1443
|
-
);
|
|
1444
|
-
s(
|
|
1445
|
-
"Easter",
|
|
1446
|
-
{
|
|
1447
|
-
primary: "#a78bfa",
|
|
1448
|
-
primaryHover: "#8b5cf6",
|
|
1449
|
-
success: "#4ade80",
|
|
1450
|
-
warning: "#fcd34d",
|
|
1451
|
-
error: "#fb7185",
|
|
1452
|
-
info: "#67e8f9"
|
|
1453
|
-
},
|
|
1454
|
-
{ primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
|
|
1455
|
-
{ primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
|
|
1456
|
-
"#ddd6fe"
|
|
1457
|
-
);
|
|
1458
|
-
s(
|
|
1459
|
-
"Summer Beach",
|
|
1460
|
-
{
|
|
1461
|
-
primary: "#0ea5e9",
|
|
1462
|
-
primaryHover: "#0284c7",
|
|
1463
|
-
success: "#10b981",
|
|
1464
|
-
warning: "#f59e0b",
|
|
1465
|
-
error: "#ef4444",
|
|
1466
|
-
info: "#06b6d4"
|
|
1467
|
-
},
|
|
1468
|
-
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1469
|
-
{ primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
|
|
1470
|
-
"#fcd34d"
|
|
1471
|
-
);
|
|
1472
|
-
s(
|
|
1473
|
-
"Winter Frost",
|
|
1474
|
-
{
|
|
1475
|
-
primary: "#3b82f6",
|
|
1476
|
-
primaryHover: "#2563eb",
|
|
1477
|
-
success: "#10b981",
|
|
1478
|
-
warning: "#f59e0b",
|
|
1479
|
-
error: "#ef4444",
|
|
1480
|
-
info: "#06b6d4"
|
|
1481
|
-
},
|
|
1482
|
-
{ primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
|
|
1483
|
-
{ primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
|
|
1484
|
-
"#bfdbfe"
|
|
1485
|
-
);
|
|
1486
|
-
s(
|
|
1487
|
-
"Cherry Blossom",
|
|
1488
|
-
{
|
|
1489
|
-
primary: "#ec4899",
|
|
1490
|
-
primaryHover: "#db2777",
|
|
1491
|
-
success: "#10b981",
|
|
1492
|
-
warning: "#f59e0b",
|
|
1493
|
-
error: "#ef4444",
|
|
1494
|
-
info: "#06b6d4"
|
|
1495
|
-
},
|
|
1496
|
-
{ primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
|
|
1497
|
-
{ primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
|
|
1498
|
-
"#fbcfe8"
|
|
1499
|
-
);
|
|
1500
|
-
s(
|
|
1501
|
-
"Harvest",
|
|
1502
|
-
{
|
|
1503
|
-
primary: "#b45309",
|
|
1504
|
-
primaryHover: "#92400e",
|
|
1505
|
-
success: "#4d7c0f",
|
|
1506
|
-
warning: "#a16207",
|
|
1507
|
-
error: "#b91c1c",
|
|
1508
|
-
info: "#0e7490"
|
|
1509
|
-
},
|
|
1510
|
-
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1511
|
-
{ primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
|
|
1512
|
-
"#fcd34d"
|
|
1513
|
-
);
|
|
1514
|
-
s(
|
|
1515
|
-
"Japanese Zen",
|
|
1516
|
-
{
|
|
1517
|
-
primary: "#6b7280",
|
|
1518
|
-
primaryHover: "#4b5563",
|
|
1519
|
-
success: "#6b8e23",
|
|
1520
|
-
warning: "#d4a017",
|
|
1521
|
-
error: "#c0392b",
|
|
1522
|
-
info: "#5f9ea0"
|
|
1523
|
-
},
|
|
1524
|
-
{ primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
|
|
1525
|
-
{ primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
|
|
1526
|
-
"#d5cec0"
|
|
1527
|
-
);
|
|
1528
|
-
s(
|
|
1529
|
-
"Moroccan",
|
|
1530
|
-
{
|
|
1531
|
-
primary: "#c2410c",
|
|
1532
|
-
primaryHover: "#9a3412",
|
|
1533
|
-
success: "#15803d",
|
|
1534
|
-
warning: "#ca8a04",
|
|
1535
|
-
error: "#b91c1c",
|
|
1536
|
-
info: "#0e7490"
|
|
1537
|
-
},
|
|
1538
|
-
{ primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
|
|
1539
|
-
{ primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
|
|
1540
|
-
"#f5d0a0"
|
|
1541
|
-
);
|
|
1542
|
-
s(
|
|
1543
|
-
"Scandinavian",
|
|
1544
|
-
{
|
|
1545
|
-
primary: "#4b5563",
|
|
1546
|
-
primaryHover: "#374151",
|
|
1547
|
-
success: "#059669",
|
|
1548
|
-
warning: "#d97706",
|
|
1549
|
-
error: "#dc2626",
|
|
1550
|
-
info: "#0891b2"
|
|
1551
|
-
},
|
|
1552
|
-
{ primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
|
|
1553
|
-
{ primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
|
|
1554
|
-
"#e5e7eb"
|
|
1555
|
-
);
|
|
1556
|
-
s(
|
|
1557
|
-
"Mediterranean",
|
|
1558
|
-
{
|
|
1559
|
-
primary: "#1e40af",
|
|
1560
|
-
primaryHover: "#1e3a8a",
|
|
1561
|
-
success: "#059669",
|
|
1562
|
-
warning: "#d97706",
|
|
1563
|
-
error: "#dc2626",
|
|
1564
|
-
info: "#0891b2"
|
|
1565
|
-
},
|
|
1566
|
-
{ primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
|
|
1567
|
-
{ primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
|
|
1568
|
-
"#bfdbfe"
|
|
1569
|
-
);
|
|
1570
|
-
s(
|
|
1571
|
-
"Chinese New Year",
|
|
1572
|
-
{
|
|
1573
|
-
primary: "#dc2626",
|
|
1574
|
-
primaryHover: "#b91c1c",
|
|
1575
|
-
success: "#16a34a",
|
|
1576
|
-
warning: "#d4a017",
|
|
1577
|
-
error: "#ef4444",
|
|
1578
|
-
info: "#0891b2"
|
|
1579
|
-
},
|
|
1580
|
-
{ primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
|
|
1581
|
-
{ primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
|
|
1582
|
-
"#fca5a5"
|
|
1583
|
-
);
|
|
1584
|
-
s(
|
|
1585
|
-
"Indian Festive",
|
|
1586
|
-
{
|
|
1587
|
-
primary: "#d97706",
|
|
1588
|
-
primaryHover: "#b45309",
|
|
1589
|
-
success: "#16a34a",
|
|
1590
|
-
warning: "#ca8a04",
|
|
1591
|
-
error: "#dc2626",
|
|
1592
|
-
info: "#7c3aed"
|
|
1593
|
-
},
|
|
1594
|
-
{ primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
|
|
1595
|
-
{ primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
|
|
1596
|
-
"#fcd34d"
|
|
1597
|
-
);
|
|
1598
|
-
s(
|
|
1599
|
-
"Brazilian Carnival",
|
|
1600
|
-
{
|
|
1601
|
-
primary: "#16a34a",
|
|
1602
|
-
primaryHover: "#15803d",
|
|
1603
|
-
success: "#22c55e",
|
|
1604
|
-
warning: "#facc15",
|
|
1605
|
-
error: "#ef4444",
|
|
1606
|
-
info: "#0ea5e9"
|
|
1607
|
-
},
|
|
1608
|
-
{ primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
|
|
1609
|
-
{ primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
|
|
1610
|
-
"#86efac"
|
|
1611
|
-
);
|
|
1612
|
-
s(
|
|
1613
|
-
"African Earth",
|
|
1614
|
-
{
|
|
1615
|
-
primary: "#92400e",
|
|
1616
|
-
primaryHover: "#78350f",
|
|
1617
|
-
success: "#4d7c0f",
|
|
1618
|
-
warning: "#a16207",
|
|
1619
|
-
error: "#b91c1c",
|
|
1620
|
-
info: "#0e7490"
|
|
1621
|
-
},
|
|
1622
|
-
{ primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
|
|
1623
|
-
{ primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
|
|
1624
|
-
"#d4b896"
|
|
1625
|
-
);
|
|
1626
|
-
h(
|
|
1627
|
-
"High Contrast Dark",
|
|
1628
|
-
{
|
|
1629
|
-
primary: "#ffff00",
|
|
1630
|
-
primaryHover: "#cccc00",
|
|
1631
|
-
success: "#00ff00",
|
|
1632
|
-
warning: "#ff8c00",
|
|
1633
|
-
error: "#ff0000",
|
|
1634
|
-
info: "#00ffff"
|
|
1635
|
-
},
|
|
1636
|
-
{ primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
|
|
1637
|
-
{ primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
|
|
1638
|
-
"#ffffff"
|
|
1639
|
-
);
|
|
1640
|
-
s(
|
|
1641
|
-
"Monochrome",
|
|
1642
|
-
{
|
|
1643
|
-
primary: "#404040",
|
|
1644
|
-
primaryHover: "#262626",
|
|
1645
|
-
success: "#4d7c0f",
|
|
1646
|
-
warning: "#a16207",
|
|
1647
|
-
error: "#b91c1c",
|
|
1648
|
-
info: "#0e7490"
|
|
1649
|
-
},
|
|
1650
|
-
{ primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
|
|
1651
|
-
{ primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
|
|
1652
|
-
"#c0c0c0"
|
|
1653
|
-
);
|
|
1654
|
-
s(
|
|
1655
|
-
"Enhanced Contrast",
|
|
1656
|
-
{
|
|
1657
|
-
primary: "#0050b3",
|
|
1658
|
-
primaryHover: "#003d8c",
|
|
1659
|
-
success: "#006400",
|
|
1660
|
-
warning: "#cc7000",
|
|
1661
|
-
error: "#cc0000",
|
|
1662
|
-
info: "#006680"
|
|
1663
|
-
},
|
|
1664
|
-
{ primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
|
|
1665
|
-
{ primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
|
|
1666
|
-
"#8c8c8c"
|
|
1667
|
-
);
|
|
1668
|
-
s(
|
|
1669
|
-
"Minimalist",
|
|
1670
|
-
{
|
|
1671
|
-
primary: "#18181b",
|
|
1672
|
-
primaryHover: "#27272a",
|
|
1673
|
-
success: "#22c55e",
|
|
1674
|
-
warning: "#eab308",
|
|
1675
|
-
error: "#ef4444",
|
|
1676
|
-
info: "#3b82f6"
|
|
1677
|
-
},
|
|
1678
|
-
{ primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
|
|
1679
|
-
{ primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
|
|
1680
|
-
"#e5e5e5"
|
|
1681
|
-
);
|
|
1682
|
-
h(
|
|
1683
|
-
"Warm Dark",
|
|
1684
|
-
{
|
|
1685
|
-
primary: "#f59e0b",
|
|
1686
|
-
primaryHover: "#d97706",
|
|
1687
|
-
success: "#10b981",
|
|
1688
|
-
warning: "#fbbf24",
|
|
1689
|
-
error: "#f87171",
|
|
1690
|
-
info: "#38bdf8"
|
|
1691
|
-
},
|
|
1692
|
-
{ primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
|
|
1693
|
-
{ primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
|
|
1694
|
-
"#57534e"
|
|
1695
|
-
);
|
|
1696
|
-
h(
|
|
1697
|
-
"Soft Dark",
|
|
1698
|
-
{
|
|
1699
|
-
primary: "#a78bfa",
|
|
1700
|
-
primaryHover: "#8b5cf6",
|
|
1701
|
-
success: "#34d399",
|
|
1702
|
-
warning: "#fcd34d",
|
|
1703
|
-
error: "#fb7185",
|
|
1704
|
-
info: "#67e8f9"
|
|
1705
|
-
},
|
|
1706
|
-
{ primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
|
|
1707
|
-
{ primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
|
|
1708
|
-
"#3e3e58"
|
|
1709
|
-
);
|
|
1710
|
-
s(
|
|
1711
|
-
"Coffee",
|
|
1712
|
-
{
|
|
1713
|
-
primary: "#6f4e37",
|
|
1714
|
-
primaryHover: "#5c3d28",
|
|
1715
|
-
success: "#4d7c0f",
|
|
1716
|
-
warning: "#a16207",
|
|
1717
|
-
error: "#b91c1c",
|
|
1718
|
-
info: "#0e7490"
|
|
1719
|
-
},
|
|
1720
|
-
{ primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
|
|
1721
|
-
{ primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
|
|
1722
|
-
"#d4c4a8"
|
|
1723
|
-
);
|
|
1724
|
-
s(
|
|
1725
|
-
"Wine",
|
|
1726
|
-
{
|
|
1727
|
-
primary: "#7f1d1d",
|
|
1728
|
-
primaryHover: "#641717",
|
|
1729
|
-
success: "#059669",
|
|
1730
|
-
warning: "#d97706",
|
|
1731
|
-
error: "#dc2626",
|
|
1732
|
-
info: "#0891b2"
|
|
1733
|
-
},
|
|
1734
|
-
{ primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
|
|
1735
|
-
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
1736
|
-
"#e8a0a0"
|
|
1737
|
-
);
|
|
1738
|
-
const be = process.env.NODE_ENV === "development";
|
|
1739
|
-
let re = {
|
|
1740
|
-
enabled: be,
|
|
1741
|
-
slowRenderThreshold: 16
|
|
1742
|
-
};
|
|
1743
|
-
const ie = [], O = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
|
|
1744
|
-
function ge() {
|
|
1745
|
-
ie.length = 0, O.clear(), ce.clear();
|
|
1746
|
-
}
|
|
1747
|
-
function Me(a) {
|
|
1748
|
-
const i = re.slowRenderThreshold;
|
|
1749
|
-
return ie.filter((c) => c.actualDuration > i);
|
|
1750
|
-
}
|
|
1751
|
-
function V(a) {
|
|
1752
|
-
return a < 1 ? `${(a * 1e3).toFixed(0)}μs` : a < 1e3 ? `${a.toFixed(2)}ms` : `${(a / 1e3).toFixed(2)}s`;
|
|
1753
|
-
}
|
|
1754
|
-
function _e() {
|
|
1755
|
-
const a = Array.from(O.values()), i = Me(), c = a.reduce((t, d) => t + d.renderCount, 0), n = a.length > 0 ? a.reduce((t, d) => t + d.avgRenderTime, 0) / a.length : 0, o = Array.from(ce.values());
|
|
1756
|
-
return { stats: a, slowRenders: i, totalRenders: c, avgRenderTime: n, marks: o };
|
|
1757
|
-
}
|
|
1758
|
-
function Ne() {
|
|
1759
|
-
const a = _e();
|
|
1760
|
-
console.group(
|
|
1761
|
-
"%c[Nice2Dev Performance Report]",
|
|
1762
|
-
"color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
|
|
1763
|
-
), console.log(`Total renders: ${a.totalRenders}`), console.log(`Average render time: ${V(a.avgRenderTime)}`), console.log(`Slow renders: ${a.slowRenders.length}`), console.group("Component Stats"), console.table(
|
|
1764
|
-
a.stats.sort((i, c) => c.totalRenderTime - i.totalRenderTime).map((i) => ({
|
|
1765
|
-
Name: i.componentName,
|
|
1766
|
-
Renders: i.renderCount,
|
|
1767
|
-
"Avg Time": V(i.avgRenderTime),
|
|
1768
|
-
"Max Time": V(i.maxRenderTime),
|
|
1769
|
-
"Total Time": V(i.totalRenderTime),
|
|
1770
|
-
"Slow Renders": i.slowRenderCount
|
|
1771
|
-
}))
|
|
1772
|
-
), console.groupEnd(), a.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
|
|
1773
|
-
a.slowRenders.slice(-10).map((i) => ({
|
|
1774
|
-
Component: i.componentName,
|
|
1775
|
-
Phase: i.phase,
|
|
1776
|
-
Duration: V(i.actualDuration),
|
|
1777
|
-
Time: new Date(i.timestamp).toLocaleTimeString()
|
|
1778
|
-
}))
|
|
1779
|
-
), console.groupEnd()), a.marks.length > 0 && (console.group("Custom Marks"), console.table(
|
|
1780
|
-
a.marks.filter((i) => i.duration).map((i) => ({
|
|
1781
|
-
Name: i.name,
|
|
1782
|
-
Duration: V(i.duration)
|
|
1783
|
-
}))
|
|
1784
|
-
), console.groupEnd()), console.groupEnd();
|
|
1785
|
-
}
|
|
1786
|
-
const we = oe(
|
|
1787
|
-
({ position: a = "bottom-right", defaultCollapsed: i = !0 }) => {
|
|
1788
|
-
const [c, n] = y(i), [o, t] = y([]), [d, l] = y({ used: 0, total: 0 });
|
|
1789
|
-
if (te(() => {
|
|
1790
|
-
const m = () => {
|
|
1791
|
-
const w = Array.from(O.values());
|
|
1792
|
-
t(w.sort((v, N) => N.totalRenderTime - v.totalRenderTime).slice(0, 10));
|
|
1793
|
-
const g = window.performance;
|
|
1794
|
-
g.memory && l({
|
|
1795
|
-
used: g.memory.usedJSHeapSize / 1024 / 1024,
|
|
1796
|
-
total: g.memory.totalJSHeapSize / 1024 / 1024
|
|
1797
|
-
});
|
|
1798
|
-
};
|
|
1799
|
-
m();
|
|
1800
|
-
const _ = setInterval(m, 2e3);
|
|
1801
|
-
return () => clearInterval(_);
|
|
1802
|
-
}, []), !re.enabled)
|
|
1803
|
-
return null;
|
|
1804
|
-
const b = {
|
|
1805
|
-
position: "fixed",
|
|
1806
|
-
zIndex: 99999,
|
|
1807
|
-
...a.includes("top") ? { top: 8 } : { bottom: 8 },
|
|
1808
|
-
...a.includes("left") ? { left: 8 } : { right: 8 }
|
|
1809
|
-
};
|
|
1810
|
-
return /* @__PURE__ */ r(
|
|
1811
|
-
"div",
|
|
1812
|
-
{
|
|
1813
|
-
style: {
|
|
1814
|
-
...b,
|
|
1815
|
-
background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
|
|
1816
|
-
color: "var(--nice-text-on-primary, #fff)",
|
|
1817
|
-
borderRadius: 8,
|
|
1818
|
-
fontSize: 11,
|
|
1819
|
-
fontFamily: "Monaco, Consolas, monospace",
|
|
1820
|
-
padding: c ? "4px 8px" : 8,
|
|
1821
|
-
maxWidth: c ? "auto" : 300,
|
|
1822
|
-
maxHeight: c ? "auto" : 400,
|
|
1823
|
-
overflow: "auto"
|
|
1824
|
-
},
|
|
1825
|
-
children: [
|
|
1826
|
-
/* @__PURE__ */ r(
|
|
1827
|
-
"div",
|
|
1828
|
-
{
|
|
1829
|
-
style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
|
|
1830
|
-
onClick: () => n((m) => !m),
|
|
1831
|
-
children: [
|
|
1832
|
-
/* @__PURE__ */ e(
|
|
1833
|
-
"span",
|
|
1834
|
-
{
|
|
1835
|
-
"aria-hidden": "true",
|
|
1836
|
-
style: {
|
|
1837
|
-
width: 8,
|
|
1838
|
-
height: 8,
|
|
1839
|
-
borderRadius: "50%",
|
|
1840
|
-
background: "var(--nice-color-success, #22c55e)"
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
),
|
|
1844
|
-
/* @__PURE__ */ e("span", { children: "Profiler" }),
|
|
1845
|
-
d.used > 0 && /* @__PURE__ */ r(
|
|
1846
|
-
"span",
|
|
1847
|
-
{
|
|
1848
|
-
style: {
|
|
1849
|
-
color: d.used > 100 ? "var(--nice-color-warning, #f59e0b)" : "var(--nice-text-muted, #64748b)"
|
|
1850
|
-
},
|
|
1851
|
-
children: [
|
|
1852
|
-
d.used.toFixed(0),
|
|
1853
|
-
"MB"
|
|
1854
|
-
]
|
|
1855
|
-
}
|
|
1856
|
-
),
|
|
1857
|
-
/* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5, display: "inline-flex" }, children: /* @__PURE__ */ e(u, { name: c ? "chevron-down" : "chevron-up", size: 12 }) })
|
|
1858
|
-
]
|
|
1859
|
-
}
|
|
1860
|
-
),
|
|
1861
|
-
!c && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: [
|
|
1862
|
-
/* @__PURE__ */ e(
|
|
1863
|
-
"div",
|
|
1864
|
-
{
|
|
1865
|
-
style: {
|
|
1866
|
-
borderBottom: "1px solid var(--nice-border-color, #333)",
|
|
1867
|
-
paddingBottom: 4,
|
|
1868
|
-
marginBottom: 8
|
|
1869
|
-
},
|
|
1870
|
-
children: /* @__PURE__ */ e("strong", { children: "Top Components" })
|
|
1871
|
-
}
|
|
1872
|
-
),
|
|
1873
|
-
o.map((m) => /* @__PURE__ */ r("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
|
|
1874
|
-
/* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: m.componentName }),
|
|
1875
|
-
/* @__PURE__ */ e(
|
|
1876
|
-
"span",
|
|
1877
|
-
{
|
|
1878
|
-
style: {
|
|
1879
|
-
color: m.avgRenderTime > 16 ? "var(--nice-color-warning, #f59e0b)" : "var(--nice-color-success, #22c55e)"
|
|
1880
|
-
},
|
|
1881
|
-
children: V(m.avgRenderTime)
|
|
1882
|
-
}
|
|
1883
|
-
),
|
|
1884
|
-
/* @__PURE__ */ r(
|
|
1885
|
-
"span",
|
|
1886
|
-
{
|
|
1887
|
-
style: {
|
|
1888
|
-
color: "var(--nice-text-muted, #64748b)",
|
|
1889
|
-
minWidth: 30,
|
|
1890
|
-
textAlign: "right"
|
|
1891
|
-
},
|
|
1892
|
-
children: [
|
|
1893
|
-
"x",
|
|
1894
|
-
m.renderCount
|
|
1895
|
-
]
|
|
1896
|
-
}
|
|
1897
|
-
)
|
|
1898
|
-
] }, m.componentName)),
|
|
1899
|
-
/* @__PURE__ */ r("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
|
|
1900
|
-
/* @__PURE__ */ e(
|
|
1901
|
-
"button",
|
|
1902
|
-
{
|
|
1903
|
-
onClick: Ne,
|
|
1904
|
-
style: {
|
|
1905
|
-
flex: 1,
|
|
1906
|
-
padding: "4px 8px",
|
|
1907
|
-
background: "var(--nice-bg-tertiary, #333)",
|
|
1908
|
-
border: "none",
|
|
1909
|
-
borderRadius: 4,
|
|
1910
|
-
color: "var(--nice-text-primary, #fff)",
|
|
1911
|
-
cursor: "pointer",
|
|
1912
|
-
fontSize: 10
|
|
1913
|
-
},
|
|
1914
|
-
children: "Print Report"
|
|
1915
|
-
}
|
|
1916
|
-
),
|
|
1917
|
-
/* @__PURE__ */ e(
|
|
1918
|
-
"button",
|
|
1919
|
-
{
|
|
1920
|
-
onClick: ge,
|
|
1921
|
-
style: {
|
|
1922
|
-
flex: 1,
|
|
1923
|
-
padding: "4px 8px",
|
|
1924
|
-
background: "var(--nice-bg-tertiary, #333)",
|
|
1925
|
-
border: "none",
|
|
1926
|
-
borderRadius: 4,
|
|
1927
|
-
color: "var(--nice-text-primary, #fff)",
|
|
1928
|
-
cursor: "pointer",
|
|
1929
|
-
fontSize: 10
|
|
1930
|
-
},
|
|
1931
|
-
children: "Clear"
|
|
1932
|
-
}
|
|
1933
|
-
)
|
|
1934
|
-
] })
|
|
1935
|
-
] })
|
|
1936
|
-
]
|
|
1937
|
-
}
|
|
1938
|
-
);
|
|
1939
|
-
}
|
|
1940
|
-
);
|
|
1941
|
-
we.displayName = "ProfilerOverlay";
|
|
1942
288
|
process.env.NODE_ENV;
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
const
|
|
1953
|
-
a
|
|
1954
|
-
.
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
border-radius: var(--nice-radius-full, 9999px);
|
|
1962
|
-
cursor: help;
|
|
1963
|
-
font-weight: 700;
|
|
1964
|
-
line-height: 1;
|
|
1965
|
-
padding: 0;
|
|
1966
|
-
transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
|
|
1967
|
-
}
|
|
1968
|
-
.nice-tutorial-button:hover {
|
|
1969
|
-
background: var(--nice-primary, #2563eb);
|
|
1970
|
-
border-color: var(--nice-primary, #2563eb);
|
|
1971
|
-
color: var(--nice-text-inverse, #fff);
|
|
1972
|
-
}
|
|
1973
|
-
.nice-tutorial-button:focus-visible {
|
|
1974
|
-
outline: none;
|
|
1975
|
-
box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
|
|
1976
|
-
}
|
|
1977
|
-
.nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
|
|
1978
|
-
.nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
|
|
1979
|
-
`, document.head.appendChild(a);
|
|
289
|
+
process.env.NODE_ENV;
|
|
290
|
+
process.env.NODE_ENV;
|
|
291
|
+
process.env.NODE_ENV;
|
|
292
|
+
process.env.NODE_ENV;
|
|
293
|
+
process.env.NODE_ENV;
|
|
294
|
+
function ie() {
|
|
295
|
+
const a = globalThis.crypto;
|
|
296
|
+
if (typeof (a == null ? void 0 : a.randomUUID) == "function")
|
|
297
|
+
return a.randomUUID();
|
|
298
|
+
const r = new Uint8Array(16);
|
|
299
|
+
if (typeof (a == null ? void 0 : a.getRandomValues) == "function")
|
|
300
|
+
a.getRandomValues(r);
|
|
301
|
+
else
|
|
302
|
+
for (let n = 0; n < r.length; n++)
|
|
303
|
+
r[n] = Math.floor(Math.random() * 256);
|
|
304
|
+
r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128;
|
|
305
|
+
const l = Array.from(r, (n) => n.toString(16).padStart(2, "0")).join("");
|
|
306
|
+
return `${l.slice(0, 8)}-${l.slice(8, 12)}-${l.slice(12, 16)}-${l.slice(16, 20)}-${l.slice(20)}`;
|
|
1980
307
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
308
|
+
process.env.NODE_ENV;
|
|
309
|
+
process.env.NODE_ENV;
|
|
310
|
+
process.env.NODE_ENV;
|
|
311
|
+
process.env.NODE_ENV;
|
|
312
|
+
process.env.NODE_ENV;
|
|
313
|
+
process.env.NODE_ENV;
|
|
314
|
+
process.env.NODE_ENV;
|
|
315
|
+
process.env.NODE_ENV;
|
|
316
|
+
const R = {
|
|
1986
317
|
display: "inline-block",
|
|
1987
318
|
width: 10,
|
|
1988
319
|
height: 10,
|
|
1989
320
|
borderRadius: "50%",
|
|
1990
321
|
background: "currentColor"
|
|
1991
|
-
},
|
|
322
|
+
}, $ = [
|
|
1992
323
|
{ type: "device-list", label: "Device List", icon: "list" },
|
|
1993
324
|
{ type: "device-status", label: "Device Status", icon: "success" },
|
|
1994
325
|
{ type: "telemetry-chart", label: "Telemetry Chart", icon: "bar-chart" },
|
|
@@ -2000,199 +331,222 @@ const G = {
|
|
|
2000
331
|
{ type: "kpi", label: "KPI Card", icon: "target" },
|
|
2001
332
|
{ type: "camera-feed", label: "Camera Feed", icon: "video" }
|
|
2002
333
|
];
|
|
2003
|
-
function
|
|
334
|
+
function Ne({
|
|
2004
335
|
devices: a = [],
|
|
2005
|
-
widgets:
|
|
2006
|
-
alarms:
|
|
336
|
+
widgets: r = [],
|
|
337
|
+
alarms: l = [],
|
|
2007
338
|
onDeviceSelect: n,
|
|
2008
|
-
onWidgetChange:
|
|
339
|
+
onWidgetChange: c,
|
|
2009
340
|
onCommand: t,
|
|
2010
|
-
onAlarmAcknowledge:
|
|
2011
|
-
fetchTelemetry:
|
|
2012
|
-
className:
|
|
341
|
+
onAlarmAcknowledge: o,
|
|
342
|
+
fetchTelemetry: s,
|
|
343
|
+
className: h = ""
|
|
2013
344
|
}) {
|
|
2014
|
-
const [
|
|
2015
|
-
(
|
|
2016
|
-
|
|
2017
|
-
const
|
|
2018
|
-
return
|
|
345
|
+
const { t: p } = b(), [u, H] = g(r), [N, k] = g(null), [M, w] = g("dashboard"), [_, V] = g(!1), [y, L] = g(""), v = f(
|
|
346
|
+
(d) => {
|
|
347
|
+
H((C) => {
|
|
348
|
+
const z = d(C);
|
|
349
|
+
return c == null || c(z), z;
|
|
2019
350
|
});
|
|
2020
351
|
},
|
|
2021
|
-
[
|
|
2022
|
-
),
|
|
2023
|
-
(
|
|
2024
|
-
var
|
|
2025
|
-
const
|
|
2026
|
-
id:
|
|
2027
|
-
type:
|
|
2028
|
-
title: ((
|
|
2029
|
-
position: { x: 0, y:
|
|
352
|
+
[c]
|
|
353
|
+
), D = f(
|
|
354
|
+
(d) => {
|
|
355
|
+
var z;
|
|
356
|
+
const C = {
|
|
357
|
+
id: ie(),
|
|
358
|
+
type: d,
|
|
359
|
+
title: ((z = $.find((U) => U.type === d)) == null ? void 0 : z.label) || d,
|
|
360
|
+
position: { x: 0, y: ne(u), width: 4, height: 3 },
|
|
2030
361
|
config: {}
|
|
2031
362
|
};
|
|
2032
|
-
|
|
363
|
+
v((U) => [...U, C]);
|
|
2033
364
|
},
|
|
2034
|
-
[
|
|
2035
|
-
),
|
|
2036
|
-
(
|
|
2037
|
-
|
|
365
|
+
[u, v]
|
|
366
|
+
), P = f(
|
|
367
|
+
(d) => {
|
|
368
|
+
k(d), n == null || n(d);
|
|
2038
369
|
},
|
|
2039
370
|
[n]
|
|
2040
|
-
),
|
|
2041
|
-
(
|
|
2042
|
-
|
|
371
|
+
), T = f(
|
|
372
|
+
(d) => {
|
|
373
|
+
o == null || o(d);
|
|
2043
374
|
},
|
|
2044
|
-
[
|
|
2045
|
-
),
|
|
2046
|
-
(
|
|
2047
|
-
),
|
|
2048
|
-
(
|
|
375
|
+
[o]
|
|
376
|
+
), j = a.filter(
|
|
377
|
+
(d) => !y || d.name.toLowerCase().includes(y.toLowerCase()) || d.type.toLowerCase().includes(y.toLowerCase())
|
|
378
|
+
), S = l.filter((d) => !d.cleared), O = S.filter(
|
|
379
|
+
(d) => d.severity === "critical" || d.severity === "high"
|
|
2049
380
|
);
|
|
2050
|
-
return /* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2052
|
-
/* @__PURE__ */ e("h1", { children: "IoT Dashboard" }),
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(
|
|
2056
|
-
|
|
2057
|
-
|
|
381
|
+
return /* @__PURE__ */ i("div", { className: `nice-iot-dashboard ${h}`, children: [
|
|
382
|
+
/* @__PURE__ */ i("header", { className: "nice-iot-dashboard__header", children: [
|
|
383
|
+
/* @__PURE__ */ e("h1", { children: p("ioTDashboard.iotDashboard", "IoT Dashboard") }),
|
|
384
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__stats", children: [
|
|
385
|
+
/* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat", children: [
|
|
386
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(m, { name: "wifi", size: 14 }) }),
|
|
387
|
+
p("ioTDashboard.devices", "{devices} Devices").replace(
|
|
388
|
+
"{devices}",
|
|
389
|
+
String(a.length)
|
|
390
|
+
)
|
|
2058
391
|
] }),
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style:
|
|
2061
|
-
|
|
2062
|
-
|
|
392
|
+
/* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--online", children: [
|
|
393
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: R }),
|
|
394
|
+
p("ioTDashboard.online", "{online} Online").replace(
|
|
395
|
+
"{online}",
|
|
396
|
+
String(a.filter((d) => d.status === "online").length)
|
|
397
|
+
)
|
|
2063
398
|
] }),
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style:
|
|
2066
|
-
|
|
2067
|
-
|
|
399
|
+
/* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--offline", children: [
|
|
400
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: R }),
|
|
401
|
+
p("ioTDashboard.offline", "{offline} Offline").replace(
|
|
402
|
+
"{offline}",
|
|
403
|
+
String(a.filter((d) => d.status === "offline").length)
|
|
404
|
+
)
|
|
2068
405
|
] }),
|
|
2069
|
-
|
|
2070
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(
|
|
2071
|
-
|
|
2072
|
-
|
|
406
|
+
O.length > 0 && /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms", children: [
|
|
407
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(m, { name: "bell", size: 14 }) }),
|
|
408
|
+
p("ioTDashboard.alarms", "{criticalAlarms} Alarms").replace(
|
|
409
|
+
"{criticalAlarms}",
|
|
410
|
+
String(O.length)
|
|
411
|
+
)
|
|
2073
412
|
] })
|
|
2074
413
|
] }),
|
|
2075
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ i("nav", { className: "nice-iot-dashboard__nav", children: [
|
|
2076
415
|
/* @__PURE__ */ e(
|
|
2077
416
|
"button",
|
|
2078
417
|
{
|
|
2079
|
-
className:
|
|
2080
|
-
onClick: () =>
|
|
2081
|
-
children: "Dashboard"
|
|
418
|
+
className: `nice-iot-dashboard__nav-button ${M === "dashboard" ? "nice-iot-dashboard__nav-button--active" : ""}`,
|
|
419
|
+
onClick: () => w("dashboard"),
|
|
420
|
+
children: p("ioTDashboard.dashboard", "Dashboard")
|
|
2082
421
|
}
|
|
2083
422
|
),
|
|
2084
|
-
/* @__PURE__ */ e(
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
423
|
+
/* @__PURE__ */ e(
|
|
424
|
+
"button",
|
|
425
|
+
{
|
|
426
|
+
className: `nice-iot-dashboard__nav-button ${M === "devices" ? "nice-iot-dashboard__nav-button--active" : ""}`,
|
|
427
|
+
onClick: () => w("devices"),
|
|
428
|
+
children: p("ioTDashboard.devices2", "Devices")
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ i(
|
|
432
|
+
"button",
|
|
433
|
+
{
|
|
434
|
+
className: `nice-iot-dashboard__nav-button ${M === "alarms" ? "nice-iot-dashboard__nav-button--active" : ""}`,
|
|
435
|
+
onClick: () => w("alarms"),
|
|
436
|
+
children: [
|
|
437
|
+
p("ioTDashboard.alarms2", "Alarms"),
|
|
438
|
+
" ",
|
|
439
|
+
S.length > 0 && `(${S.length})`
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
)
|
|
2089
443
|
] }),
|
|
2090
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children:
|
|
2091
|
-
/* @__PURE__ */ e(
|
|
444
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children: M === "dashboard" && /* @__PURE__ */ i("button", { onClick: () => V(!_), children: [
|
|
445
|
+
/* @__PURE__ */ e(m, { name: _ ? "check" : "edit", size: 14 }),
|
|
2092
446
|
" ",
|
|
2093
|
-
|
|
447
|
+
_ ? "Done" : "Edit"
|
|
2094
448
|
] }) })
|
|
2095
449
|
] }),
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
/* @__PURE__ */ e("h4", { children: "Add Widget" }),
|
|
2099
|
-
|
|
450
|
+
M === "dashboard" && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__main", children: [
|
|
451
|
+
_ && /* @__PURE__ */ i("aside", { className: "nice-iot-dashboard__palette", children: [
|
|
452
|
+
/* @__PURE__ */ e("h4", { children: p("ioTDashboard.addWidget", "Add Widget") }),
|
|
453
|
+
$.map((d) => /* @__PURE__ */ i(
|
|
2100
454
|
"button",
|
|
2101
455
|
{
|
|
2102
456
|
className: "nice-iot-dashboard__palette-item",
|
|
2103
|
-
onClick: () =>
|
|
457
|
+
onClick: () => D(d.type),
|
|
2104
458
|
children: [
|
|
2105
|
-
/* @__PURE__ */ e(
|
|
2106
|
-
/* @__PURE__ */ e("span", { children:
|
|
459
|
+
/* @__PURE__ */ e(m, { name: d.icon, size: 16 }),
|
|
460
|
+
/* @__PURE__ */ e("span", { children: d.label })
|
|
2107
461
|
]
|
|
2108
462
|
},
|
|
2109
|
-
|
|
463
|
+
d.type
|
|
2110
464
|
))
|
|
2111
465
|
] }),
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
|
|
2114
|
-
|
|
466
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__grid", children: [
|
|
467
|
+
u.map((d) => /* @__PURE__ */ e(
|
|
468
|
+
le,
|
|
2115
469
|
{
|
|
2116
|
-
widget:
|
|
470
|
+
widget: d,
|
|
2117
471
|
devices: a,
|
|
2118
|
-
alarms:
|
|
2119
|
-
isEditing:
|
|
472
|
+
alarms: l,
|
|
473
|
+
isEditing: _,
|
|
2120
474
|
onCommand: t,
|
|
2121
|
-
onDelete: () =>
|
|
475
|
+
onDelete: () => v((C) => C.filter((z) => z.id !== d.id))
|
|
2122
476
|
},
|
|
2123
|
-
|
|
477
|
+
d.id
|
|
2124
478
|
)),
|
|
2125
|
-
|
|
479
|
+
u.length === 0 && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__empty", children: _ ? "Add widgets from the palette" : "No widgets configured. Click Edit to add widgets." })
|
|
2126
480
|
] })
|
|
2127
481
|
] }),
|
|
2128
|
-
|
|
482
|
+
M === "devices" && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__devices", children: [
|
|
2129
483
|
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__devices-toolbar", children: /* @__PURE__ */ e(
|
|
2130
484
|
"input",
|
|
2131
485
|
{
|
|
2132
486
|
type: "search",
|
|
2133
|
-
placeholder: "Search devices...",
|
|
2134
|
-
value:
|
|
2135
|
-
onChange: (
|
|
487
|
+
placeholder: p("ioTDashboard.searchDevices", "Search devices..."),
|
|
488
|
+
value: y,
|
|
489
|
+
onChange: (d) => L(d.target.value)
|
|
2136
490
|
}
|
|
2137
491
|
) }),
|
|
2138
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children:
|
|
2139
|
-
|
|
492
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children: j.map((d) => /* @__PURE__ */ e(
|
|
493
|
+
te,
|
|
2140
494
|
{
|
|
2141
|
-
device:
|
|
2142
|
-
isSelected: (
|
|
2143
|
-
onSelect: () =>
|
|
495
|
+
device: d,
|
|
496
|
+
isSelected: (N == null ? void 0 : N.id) === d.id,
|
|
497
|
+
onSelect: () => P(d)
|
|
2144
498
|
},
|
|
2145
|
-
|
|
499
|
+
d.id
|
|
2146
500
|
)) }),
|
|
2147
|
-
|
|
2148
|
-
|
|
501
|
+
N && /* @__PURE__ */ e(
|
|
502
|
+
oe,
|
|
2149
503
|
{
|
|
2150
|
-
device:
|
|
504
|
+
device: N,
|
|
2151
505
|
onCommand: t,
|
|
2152
|
-
onClose: () =>
|
|
506
|
+
onClose: () => k(null)
|
|
2153
507
|
}
|
|
2154
508
|
)
|
|
2155
509
|
] }),
|
|
2156
|
-
|
|
2157
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */ e("th", { children: "Severity" }),
|
|
2159
|
-
/* @__PURE__ */ e("th", { children: "Device" }),
|
|
2160
|
-
/* @__PURE__ */ e("th", { children: "Message" }),
|
|
2161
|
-
/* @__PURE__ */ e("th", { children: "Time" }),
|
|
2162
|
-
/* @__PURE__ */ e("th", { children: "Status" }),
|
|
2163
|
-
/* @__PURE__ */ e("th", { children: "Actions" })
|
|
510
|
+
M === "alarms" && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarms", children: /* @__PURE__ */ i("table", { className: "nice-iot-dashboard__alarm-table", children: [
|
|
511
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
512
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.severity", "Severity") }),
|
|
513
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.device", "Device") }),
|
|
514
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.message", "Message") }),
|
|
515
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.time", "Time") }),
|
|
516
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.status", "Status") }),
|
|
517
|
+
/* @__PURE__ */ e("th", { children: p("ioTDashboard.actions", "Actions") })
|
|
2164
518
|
] }) }),
|
|
2165
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
2166
|
-
const
|
|
2167
|
-
return /* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ e("tbody", { children: S.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, className: "nice-iot-dashboard__no-alarms", children: p("ioTDashboard.noActiveAlarms", "No active alarms") }) }) : S.map((d) => {
|
|
520
|
+
const C = a.find((z) => z.id === d.deviceId);
|
|
521
|
+
return /* @__PURE__ */ i(
|
|
2168
522
|
"tr",
|
|
2169
523
|
{
|
|
2170
|
-
className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${
|
|
524
|
+
className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${d.severity}`,
|
|
2171
525
|
children: [
|
|
2172
526
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
2173
527
|
"span",
|
|
2174
528
|
{
|
|
2175
|
-
className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${
|
|
2176
|
-
children:
|
|
529
|
+
className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${d.severity}`,
|
|
530
|
+
children: d.severity
|
|
2177
531
|
}
|
|
2178
532
|
) }),
|
|
2179
|
-
/* @__PURE__ */ e("td", { children: (
|
|
2180
|
-
/* @__PURE__ */ e("td", { children:
|
|
2181
|
-
/* @__PURE__ */ e("td", { children:
|
|
2182
|
-
/* @__PURE__ */ e("td", { children:
|
|
2183
|
-
/* @__PURE__ */ e("td", { children: !
|
|
533
|
+
/* @__PURE__ */ e("td", { children: (C == null ? void 0 : C.name) || d.deviceId }),
|
|
534
|
+
/* @__PURE__ */ e("td", { children: d.message }),
|
|
535
|
+
/* @__PURE__ */ e("td", { children: d.timestamp.toLocaleString() }),
|
|
536
|
+
/* @__PURE__ */ e("td", { children: d.acknowledged ? "Acknowledged" : "Active" }),
|
|
537
|
+
/* @__PURE__ */ e("td", { children: !d.acknowledged && /* @__PURE__ */ e("button", { onClick: () => T(d.id), children: p("ioTDashboard.acknowledge", "Acknowledge") }) })
|
|
2184
538
|
]
|
|
2185
539
|
},
|
|
2186
|
-
|
|
540
|
+
d.id
|
|
2187
541
|
);
|
|
2188
542
|
}) })
|
|
2189
543
|
] }) })
|
|
2190
544
|
] });
|
|
2191
545
|
}
|
|
2192
|
-
function
|
|
2193
|
-
return a.length === 0 ? 0 : Math.max(...a.map((
|
|
546
|
+
function ne(a) {
|
|
547
|
+
return a.length === 0 ? 0 : Math.max(...a.map((r) => r.position.y + r.position.height));
|
|
2194
548
|
}
|
|
2195
|
-
function
|
|
549
|
+
function E(a) {
|
|
2196
550
|
switch (a) {
|
|
2197
551
|
case "online":
|
|
2198
552
|
return "var(--nice-success, #28a745)";
|
|
@@ -2208,16 +562,16 @@ function I(a) {
|
|
|
2208
562
|
return "var(--nice-text-secondary, #6c757d)";
|
|
2209
563
|
}
|
|
2210
564
|
}
|
|
2211
|
-
function
|
|
565
|
+
function le({
|
|
2212
566
|
widget: a,
|
|
2213
|
-
devices:
|
|
2214
|
-
alarms:
|
|
567
|
+
devices: r,
|
|
568
|
+
alarms: l,
|
|
2215
569
|
isEditing: n,
|
|
2216
|
-
onCommand:
|
|
570
|
+
onCommand: c,
|
|
2217
571
|
onDelete: t
|
|
2218
572
|
}) {
|
|
2219
|
-
const
|
|
2220
|
-
return /* @__PURE__ */
|
|
573
|
+
const { t: o } = b(), s = $.find((h) => h.type === a.type);
|
|
574
|
+
return /* @__PURE__ */ i(
|
|
2221
575
|
"div",
|
|
2222
576
|
{
|
|
2223
577
|
className: `nice-iot-dashboard__widget nice-iot-dashboard__widget--${a.type}`,
|
|
@@ -2226,58 +580,67 @@ function He({
|
|
|
2226
580
|
gridRow: `span ${a.position.height}`
|
|
2227
581
|
},
|
|
2228
582
|
children: [
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children: /* @__PURE__ */ e(
|
|
583
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__widget-header", children: [
|
|
584
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children: /* @__PURE__ */ e(m, { name: (s == null ? void 0 : s.icon) ?? "box", size: 14 }) }),
|
|
2231
585
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-title", children: a.title }),
|
|
2232
|
-
n && /* @__PURE__ */ e(
|
|
586
|
+
n && /* @__PURE__ */ e(
|
|
587
|
+
"button",
|
|
588
|
+
{
|
|
589
|
+
"aria-label": o("ioTDashboard.close", "Close"),
|
|
590
|
+
className: "nice-iot-dashboard__widget-delete",
|
|
591
|
+
onClick: t,
|
|
592
|
+
children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
|
|
593
|
+
}
|
|
594
|
+
)
|
|
2233
595
|
] }),
|
|
2234
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(
|
|
596
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(re, { widget: a, devices: r, alarms: l, onCommand: c }) })
|
|
2235
597
|
]
|
|
2236
598
|
}
|
|
2237
599
|
);
|
|
2238
600
|
}
|
|
2239
|
-
function
|
|
601
|
+
function re({
|
|
2240
602
|
widget: a,
|
|
2241
|
-
devices:
|
|
2242
|
-
alarms:
|
|
603
|
+
devices: r,
|
|
604
|
+
alarms: l,
|
|
2243
605
|
onCommand: n
|
|
2244
606
|
}) {
|
|
607
|
+
const { t: c } = b();
|
|
2245
608
|
switch (a.type) {
|
|
2246
609
|
case "device-list":
|
|
2247
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children:
|
|
610
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children: r.slice(0, 10).map((t) => /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-list-item", children: [
|
|
2248
611
|
/* @__PURE__ */ e(
|
|
2249
612
|
"span",
|
|
2250
613
|
{
|
|
2251
614
|
className: "nice-iot-dashboard__device-status",
|
|
2252
|
-
style: { background:
|
|
615
|
+
style: { background: E(t.status) }
|
|
2253
616
|
}
|
|
2254
617
|
),
|
|
2255
|
-
/* @__PURE__ */ e("span", { children:
|
|
2256
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-type", children:
|
|
2257
|
-
] },
|
|
618
|
+
/* @__PURE__ */ e("span", { children: t.name }),
|
|
619
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-type", children: t.type })
|
|
620
|
+
] }, t.id)) });
|
|
2258
621
|
case "device-status":
|
|
2259
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__status-grid", children: ["online", "offline", "warning", "error"].map((
|
|
2260
|
-
const
|
|
2261
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__status-grid", children: ["online", "offline", "warning", "error"].map((t) => {
|
|
623
|
+
const o = r.filter((s) => s.status === t).length;
|
|
624
|
+
return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__status-card", children: [
|
|
2262
625
|
/* @__PURE__ */ e(
|
|
2263
626
|
"span",
|
|
2264
627
|
{
|
|
2265
628
|
className: "nice-iot-dashboard__status-indicator",
|
|
2266
|
-
style: { background:
|
|
629
|
+
style: { background: E(t) }
|
|
2267
630
|
}
|
|
2268
631
|
),
|
|
2269
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-count", children:
|
|
2270
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-label", children:
|
|
2271
|
-
] },
|
|
632
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-count", children: o }),
|
|
633
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-label", children: t })
|
|
634
|
+
] }, t);
|
|
2272
635
|
}) });
|
|
2273
636
|
case "telemetry-chart":
|
|
2274
|
-
return /* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */ e(
|
|
2276
|
-
/* @__PURE__ */ e("span", { children: "Telemetry Chart" }),
|
|
2277
|
-
/* @__PURE__ */ e("small", { children: "Configure device and capability" })
|
|
637
|
+
return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__chart-placeholder", children: [
|
|
638
|
+
/* @__PURE__ */ e(m, { name: "bar-chart", size: 32 }),
|
|
639
|
+
/* @__PURE__ */ e("span", { children: c("ioTDashboard.telemetryChart", "Telemetry Chart") }),
|
|
640
|
+
/* @__PURE__ */ e("small", { children: c("ioTDashboard.configureDeviceAndCapability", "Configure device and capability") })
|
|
2278
641
|
] });
|
|
2279
642
|
case "gauge":
|
|
2280
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */ i("svg", { viewBox: "0 0 100 60", children: [
|
|
2281
644
|
/* @__PURE__ */ e(
|
|
2282
645
|
"path",
|
|
2283
646
|
{
|
|
@@ -2300,78 +663,78 @@ function ze({
|
|
|
2300
663
|
/* @__PURE__ */ e("text", { x: "50", y: "50", textAnchor: "middle", fontSize: "14", fontWeight: "bold", children: "50%" })
|
|
2301
664
|
] }) });
|
|
2302
665
|
case "map":
|
|
2303
|
-
return /* @__PURE__ */
|
|
2304
|
-
/* @__PURE__ */ e(
|
|
2305
|
-
/* @__PURE__ */ e("span", { children: "Device Map" }),
|
|
2306
|
-
/* @__PURE__ */
|
|
2307
|
-
|
|
666
|
+
return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__map-placeholder", children: [
|
|
667
|
+
/* @__PURE__ */ e(m, { name: "map-pin", size: 32 }),
|
|
668
|
+
/* @__PURE__ */ e("span", { children: c("ioTDashboard.deviceMap", "Device Map") }),
|
|
669
|
+
/* @__PURE__ */ i("small", { children: [
|
|
670
|
+
r.filter((t) => t.location).length,
|
|
2308
671
|
" devices with location"
|
|
2309
672
|
] })
|
|
2310
673
|
] });
|
|
2311
674
|
case "alarms": {
|
|
2312
|
-
const
|
|
2313
|
-
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children:
|
|
675
|
+
const t = l.filter((o) => !o.cleared).slice(0, 5);
|
|
676
|
+
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-empty", children: c("ioTDashboard.noActiveAlarms", "No active alarms") }) : t.map((o) => /* @__PURE__ */ i(
|
|
2314
677
|
"div",
|
|
2315
678
|
{
|
|
2316
|
-
className: `nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${
|
|
679
|
+
className: `nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${o.severity}`,
|
|
2317
680
|
children: [
|
|
2318
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-severity", children:
|
|
2319
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-message", children:
|
|
681
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-severity", children: o.severity }),
|
|
682
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__alarm-message", children: o.message })
|
|
2320
683
|
]
|
|
2321
684
|
},
|
|
2322
|
-
|
|
685
|
+
o.id
|
|
2323
686
|
)) });
|
|
2324
687
|
}
|
|
2325
688
|
case "control-panel":
|
|
2326
|
-
return /* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */ e(
|
|
2328
|
-
/* @__PURE__ */ e("span", { children: "Control Panel" }),
|
|
2329
|
-
/* @__PURE__ */ e("small", { children: "Configure device controls" })
|
|
689
|
+
return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__control-placeholder", children: [
|
|
690
|
+
/* @__PURE__ */ e(m, { name: "settings", size: 32 }),
|
|
691
|
+
/* @__PURE__ */ e("span", { children: c("ioTDashboard.controlPanel", "Control Panel") }),
|
|
692
|
+
/* @__PURE__ */ e("small", { children: c("ioTDashboard.configureDeviceControls", "Configure device controls") })
|
|
2330
693
|
] });
|
|
2331
694
|
case "kpi":
|
|
2332
|
-
return /* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children:
|
|
2334
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-label", children: "Total Devices" })
|
|
695
|
+
return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__kpi", children: [
|
|
696
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children: r.length }),
|
|
697
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-label", children: c("ioTDashboard.totalDevices", "Total Devices") })
|
|
2335
698
|
] });
|
|
2336
699
|
default:
|
|
2337
700
|
return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-placeholder", children: a.type });
|
|
2338
701
|
}
|
|
2339
702
|
}
|
|
2340
|
-
function
|
|
2341
|
-
return /* @__PURE__ */
|
|
703
|
+
function te({ device: a, isSelected: r, onSelect: l }) {
|
|
704
|
+
return /* @__PURE__ */ i(
|
|
2342
705
|
"div",
|
|
2343
706
|
{
|
|
2344
|
-
className: `nice-iot-dashboard__device-card ${
|
|
2345
|
-
onClick:
|
|
707
|
+
className: `nice-iot-dashboard__device-card ${r ? "nice-iot-dashboard__device-card--selected" : ""}`,
|
|
708
|
+
onClick: l,
|
|
2346
709
|
children: [
|
|
2347
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-card-header", children: [
|
|
2348
711
|
/* @__PURE__ */ e(
|
|
2349
712
|
"span",
|
|
2350
713
|
{
|
|
2351
714
|
className: "nice-iot-dashboard__device-status",
|
|
2352
|
-
style: { background:
|
|
715
|
+
style: { background: E(a.status) }
|
|
2353
716
|
}
|
|
2354
717
|
),
|
|
2355
718
|
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-name", children: a.name })
|
|
2356
719
|
] }),
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2359
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-card-body", children: [
|
|
721
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-info", children: [
|
|
722
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2360
723
|
"Type: ",
|
|
2361
724
|
a.type
|
|
2362
725
|
] }),
|
|
2363
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2364
727
|
"Protocol: ",
|
|
2365
728
|
a.protocol
|
|
2366
729
|
] })
|
|
2367
730
|
] }),
|
|
2368
|
-
a.lastSeen && /* @__PURE__ */
|
|
731
|
+
a.lastSeen && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-lastseen", children: [
|
|
2369
732
|
"Last seen: ",
|
|
2370
733
|
a.lastSeen.toLocaleString()
|
|
2371
734
|
] }),
|
|
2372
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-capabilities", children: [
|
|
2373
736
|
a.capabilities.slice(0, 3).map((n) => /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-badge", children: n.name }, n.id)),
|
|
2374
|
-
a.capabilities.length > 3 && /* @__PURE__ */
|
|
737
|
+
a.capabilities.length > 3 && /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__capability-more", children: [
|
|
2375
738
|
"+",
|
|
2376
739
|
a.capabilities.length - 3
|
|
2377
740
|
] })
|
|
@@ -2381,80 +744,81 @@ function ke({ device: a, isSelected: i, onSelect: c }) {
|
|
|
2381
744
|
}
|
|
2382
745
|
);
|
|
2383
746
|
}
|
|
2384
|
-
function
|
|
747
|
+
function oe({
|
|
2385
748
|
device: a,
|
|
2386
|
-
onCommand:
|
|
2387
|
-
onClose:
|
|
749
|
+
onCommand: r,
|
|
750
|
+
onClose: l
|
|
2388
751
|
}) {
|
|
2389
|
-
|
|
2390
|
-
|
|
752
|
+
const { t: n } = b();
|
|
753
|
+
return /* @__PURE__ */ i("aside", { className: "nice-iot-dashboard__device-detail", children: [
|
|
754
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-detail-header", children: [
|
|
2391
755
|
/* @__PURE__ */ e("h3", { children: a.name }),
|
|
2392
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
756
|
+
/* @__PURE__ */ e("button", { "aria-label": n("ioTDashboard.close", "Close"), onClick: l, children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
|
|
2393
757
|
] }),
|
|
2394
|
-
/* @__PURE__ */
|
|
2395
|
-
/* @__PURE__ */
|
|
2396
|
-
/* @__PURE__ */ e("h4", { children: "Status" }),
|
|
2397
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-detail-content", children: [
|
|
759
|
+
/* @__PURE__ */ i("section", { children: [
|
|
760
|
+
/* @__PURE__ */ e("h4", { children: n("ioTDashboard.status", "Status") }),
|
|
761
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2398
762
|
/* @__PURE__ */ e("span", { children: "Status:" }),
|
|
2399
763
|
/* @__PURE__ */ e(
|
|
2400
764
|
"span",
|
|
2401
765
|
{
|
|
2402
766
|
className: "nice-iot-dashboard__status-badge",
|
|
2403
|
-
style: { background:
|
|
767
|
+
style: { background: E(a.status) },
|
|
2404
768
|
children: a.status
|
|
2405
769
|
}
|
|
2406
770
|
)
|
|
2407
771
|
] }),
|
|
2408
|
-
a.lastSeen && /* @__PURE__ */
|
|
772
|
+
a.lastSeen && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2409
773
|
/* @__PURE__ */ e("span", { children: "Last Seen:" }),
|
|
2410
774
|
/* @__PURE__ */ e("span", { children: a.lastSeen.toLocaleString() })
|
|
2411
775
|
] })
|
|
2412
776
|
] }),
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */ e("h4", { children: "Connection" }),
|
|
2415
|
-
/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */ i("section", { children: [
|
|
778
|
+
/* @__PURE__ */ e("h4", { children: n("ioTDashboard.connection", "Connection") }),
|
|
779
|
+
/* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2416
780
|
/* @__PURE__ */ e("span", { children: "Protocol:" }),
|
|
2417
781
|
/* @__PURE__ */ e("span", { children: a.protocol })
|
|
2418
782
|
] }),
|
|
2419
|
-
a.connectionInfo.host && /* @__PURE__ */
|
|
783
|
+
a.connectionInfo.host && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2420
784
|
/* @__PURE__ */ e("span", { children: "Host:" }),
|
|
2421
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2422
786
|
a.connectionInfo.host,
|
|
2423
787
|
":",
|
|
2424
788
|
a.connectionInfo.port
|
|
2425
789
|
] })
|
|
2426
790
|
] })
|
|
2427
791
|
] }),
|
|
2428
|
-
a.metadata && /* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */ e("h4", { children: "Metadata" }),
|
|
2430
|
-
a.metadata.manufacturer && /* @__PURE__ */
|
|
792
|
+
a.metadata && /* @__PURE__ */ i("section", { children: [
|
|
793
|
+
/* @__PURE__ */ e("h4", { children: n("ioTDashboard.metadata", "Metadata") }),
|
|
794
|
+
a.metadata.manufacturer && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2431
795
|
/* @__PURE__ */ e("span", { children: "Manufacturer:" }),
|
|
2432
796
|
/* @__PURE__ */ e("span", { children: a.metadata.manufacturer })
|
|
2433
797
|
] }),
|
|
2434
|
-
a.metadata.model && /* @__PURE__ */
|
|
798
|
+
a.metadata.model && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
|
|
2435
799
|
/* @__PURE__ */ e("span", { children: "Model:" }),
|
|
2436
800
|
/* @__PURE__ */ e("span", { children: a.metadata.model })
|
|
2437
801
|
] })
|
|
2438
802
|
] }),
|
|
2439
|
-
/* @__PURE__ */
|
|
2440
|
-
/* @__PURE__ */ e("h4", { children: "Capabilities" }),
|
|
2441
|
-
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children: a.capabilities.map((
|
|
2442
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children:
|
|
2443
|
-
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children:
|
|
2444
|
-
|
|
803
|
+
/* @__PURE__ */ i("section", { children: [
|
|
804
|
+
/* @__PURE__ */ e("h4", { children: n("ioTDashboard.capabilities", "Capabilities") }),
|
|
805
|
+
/* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children: a.capabilities.map((c) => /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__capability-item", children: [
|
|
806
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children: c.name }),
|
|
807
|
+
/* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children: c.type }),
|
|
808
|
+
c.writable && r && /* @__PURE__ */ e(
|
|
2445
809
|
"button",
|
|
2446
810
|
{
|
|
2447
811
|
className: "nice-iot-dashboard__capability-control",
|
|
2448
|
-
onClick: () =>
|
|
2449
|
-
children: "Control"
|
|
812
|
+
onClick: () => r(a.id, c.id, !0),
|
|
813
|
+
children: n("ioTDashboard.control", "Control")
|
|
2450
814
|
}
|
|
2451
815
|
)
|
|
2452
|
-
] },
|
|
816
|
+
] }, c.id)) })
|
|
2453
817
|
] })
|
|
2454
818
|
] })
|
|
2455
819
|
] });
|
|
2456
820
|
}
|
|
2457
|
-
const
|
|
821
|
+
const ce = [
|
|
2458
822
|
{ name: "MQTT Broker", image: "eclipse-mosquitto:latest" },
|
|
2459
823
|
{ name: "Node-RED", image: "nodered/node-red:latest" },
|
|
2460
824
|
{ name: "InfluxDB", image: "influxdb:latest" },
|
|
@@ -2462,109 +826,126 @@ const Se = [
|
|
|
2462
826
|
{ name: "Telegraf", image: "telegraf:latest" },
|
|
2463
827
|
{ name: "Protocol Adapter", image: "nice2dev/protocol-adapter:latest" }
|
|
2464
828
|
];
|
|
2465
|
-
function
|
|
829
|
+
function fe({
|
|
2466
830
|
nodes: a = [],
|
|
2467
|
-
modules:
|
|
2468
|
-
onNodeSelect:
|
|
831
|
+
modules: r = [],
|
|
832
|
+
onNodeSelect: l,
|
|
2469
833
|
onModuleDeploy: n,
|
|
2470
|
-
onModuleAction:
|
|
834
|
+
onModuleAction: c,
|
|
2471
835
|
onNodeSync: t,
|
|
2472
|
-
className:
|
|
836
|
+
className: o = ""
|
|
2473
837
|
}) {
|
|
2474
|
-
const [
|
|
838
|
+
const { t: s } = b(), [h, p] = g(null), [u, H] = g("nodes"), [N, k] = g(!1), [M, w] = g({
|
|
2475
839
|
name: "",
|
|
2476
840
|
image: "",
|
|
2477
841
|
status: "pending"
|
|
2478
|
-
}),
|
|
2479
|
-
(
|
|
2480
|
-
|
|
842
|
+
}), _ = f(
|
|
843
|
+
(v) => {
|
|
844
|
+
p(v), l == null || l(v);
|
|
2481
845
|
},
|
|
2482
|
-
[
|
|
2483
|
-
),
|
|
2484
|
-
!
|
|
2485
|
-
}, [
|
|
2486
|
-
async (
|
|
2487
|
-
|
|
846
|
+
[l]
|
|
847
|
+
), V = f(async () => {
|
|
848
|
+
!h || !M.name || !M.image || (await (n == null ? void 0 : n(h.id, M)), k(!1), w({ name: "", image: "", status: "pending" }));
|
|
849
|
+
}, [h, M, n]), y = f(
|
|
850
|
+
async (v, D) => {
|
|
851
|
+
h && await (c == null ? void 0 : c(h.id, v, D));
|
|
2488
852
|
},
|
|
2489
|
-
[
|
|
2490
|
-
),
|
|
2491
|
-
|
|
2492
|
-
}, [
|
|
2493
|
-
return /* @__PURE__ */
|
|
2494
|
-
/* @__PURE__ */
|
|
2495
|
-
/* @__PURE__ */ e("h1", { children: "Edge Manager" }),
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
"
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
853
|
+
[h, c]
|
|
854
|
+
), L = f(async () => {
|
|
855
|
+
h && await (t == null ? void 0 : t(h.id));
|
|
856
|
+
}, [h, t]);
|
|
857
|
+
return /* @__PURE__ */ i("div", { className: `nice-edge-manager ${o}`, children: [
|
|
858
|
+
/* @__PURE__ */ i("header", { className: "nice-edge-manager__header", children: [
|
|
859
|
+
/* @__PURE__ */ e("h1", { children: s("edgeManager.edgeManager", "Edge Manager") }),
|
|
860
|
+
/* @__PURE__ */ i("nav", { className: "nice-edge-manager__nav", children: [
|
|
861
|
+
/* @__PURE__ */ i(
|
|
862
|
+
"button",
|
|
863
|
+
{
|
|
864
|
+
className: `nice-edge-manager__nav-button ${u === "nodes" ? "nice-edge-manager__nav-button--active" : ""}`,
|
|
865
|
+
onClick: () => H("nodes"),
|
|
866
|
+
children: [
|
|
867
|
+
"Nodes (",
|
|
868
|
+
a.length,
|
|
869
|
+
")"
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
),
|
|
873
|
+
/* @__PURE__ */ e(
|
|
874
|
+
"button",
|
|
875
|
+
{
|
|
876
|
+
className: `nice-edge-manager__nav-button ${u === "modules" ? "nice-edge-manager__nav-button--active" : ""}`,
|
|
877
|
+
onClick: () => H("modules"),
|
|
878
|
+
children: s("edgeManager.modules", "Modules")
|
|
879
|
+
}
|
|
880
|
+
)
|
|
2503
881
|
] })
|
|
2504
882
|
] }),
|
|
2505
|
-
/* @__PURE__ */
|
|
2506
|
-
|
|
2507
|
-
a.map((
|
|
2508
|
-
|
|
883
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__main", children: [
|
|
884
|
+
u === "nodes" && /* @__PURE__ */ e("div", { className: "nice-edge-manager__nodes", children: /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-grid", children: [
|
|
885
|
+
a.map((v) => /* @__PURE__ */ e(
|
|
886
|
+
de,
|
|
2509
887
|
{
|
|
2510
|
-
node:
|
|
2511
|
-
isSelected: (
|
|
2512
|
-
onSelect: () =>
|
|
888
|
+
node: v,
|
|
889
|
+
isSelected: (h == null ? void 0 : h.id) === v.id,
|
|
890
|
+
onSelect: () => _(v)
|
|
2513
891
|
},
|
|
2514
|
-
|
|
892
|
+
v.id
|
|
2515
893
|
)),
|
|
2516
|
-
a.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: "No edge nodes configured" })
|
|
894
|
+
a.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: s("edgeManager.noEdgeNodesConfigured", "No edge nodes configured") })
|
|
2517
895
|
] }) }),
|
|
2518
|
-
|
|
2519
|
-
/* @__PURE__ */
|
|
2520
|
-
/* @__PURE__ */
|
|
2521
|
-
"
|
|
2522
|
-
|
|
2523
|
-
|
|
896
|
+
u === "modules" && h && /* @__PURE__ */ i("div", { className: "nice-edge-manager__modules", children: [
|
|
897
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__modules-header", children: [
|
|
898
|
+
/* @__PURE__ */ e("h3", { children: s("edgeManager.modulesOn", "Modules on {name}").replace(
|
|
899
|
+
"{name}",
|
|
900
|
+
String(h.name)
|
|
901
|
+
) }),
|
|
2524
902
|
/* @__PURE__ */ e(
|
|
2525
903
|
"button",
|
|
2526
904
|
{
|
|
2527
905
|
className: "nice-edge-manager__deploy-btn",
|
|
2528
|
-
onClick: () =>
|
|
906
|
+
onClick: () => k(!0),
|
|
2529
907
|
children: "+ Deploy Module"
|
|
2530
908
|
}
|
|
2531
909
|
)
|
|
2532
910
|
] }),
|
|
2533
|
-
/* @__PURE__ */
|
|
2534
|
-
|
|
2535
|
-
|
|
911
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__module-grid", children: [
|
|
912
|
+
h.deployedModules.map((v) => /* @__PURE__ */ e(
|
|
913
|
+
he,
|
|
2536
914
|
{
|
|
2537
|
-
module:
|
|
2538
|
-
onAction: (
|
|
915
|
+
module: v,
|
|
916
|
+
onAction: (D) => y(v.id, D)
|
|
2539
917
|
},
|
|
2540
|
-
|
|
918
|
+
v.id
|
|
2541
919
|
)),
|
|
2542
|
-
|
|
920
|
+
h.deployedModules.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: s("edgeManager.noModulesDeployedOnThis", "No modules deployed on this node") })
|
|
2543
921
|
] })
|
|
2544
922
|
] }),
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
923
|
+
u === "modules" && !h && /* @__PURE__ */ e("div", { className: "nice-edge-manager__no-selection", children: s(
|
|
924
|
+
"edgeManager.selectANodeFromThe",
|
|
925
|
+
"Select a node from the Nodes tab to manage modules"
|
|
926
|
+
) }),
|
|
927
|
+
h && /* @__PURE__ */ e(
|
|
928
|
+
me,
|
|
2548
929
|
{
|
|
2549
|
-
node:
|
|
2550
|
-
onSync:
|
|
2551
|
-
onClose: () =>
|
|
930
|
+
node: h,
|
|
931
|
+
onSync: L,
|
|
932
|
+
onClose: () => p(null)
|
|
2552
933
|
}
|
|
2553
934
|
)
|
|
2554
935
|
] }),
|
|
2555
|
-
|
|
2556
|
-
|
|
936
|
+
N && /* @__PURE__ */ e(
|
|
937
|
+
pe,
|
|
2557
938
|
{
|
|
2558
|
-
config:
|
|
2559
|
-
templates:
|
|
2560
|
-
onChange:
|
|
2561
|
-
onDeploy:
|
|
2562
|
-
onClose: () =>
|
|
939
|
+
config: M,
|
|
940
|
+
templates: ce,
|
|
941
|
+
onChange: w,
|
|
942
|
+
onDeploy: V,
|
|
943
|
+
onClose: () => k(!1)
|
|
2563
944
|
}
|
|
2564
945
|
)
|
|
2565
946
|
] });
|
|
2566
947
|
}
|
|
2567
|
-
function
|
|
948
|
+
function Q(a) {
|
|
2568
949
|
switch (a) {
|
|
2569
950
|
case "running":
|
|
2570
951
|
return "var(--nice-success, #28a745)";
|
|
@@ -2580,47 +961,47 @@ function ne(a) {
|
|
|
2580
961
|
return "var(--nice-text-secondary, #6c757d)";
|
|
2581
962
|
}
|
|
2582
963
|
}
|
|
2583
|
-
function
|
|
964
|
+
function B(a) {
|
|
2584
965
|
return a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : a < 1024 * 1024 * 1024 ? `${(a / 1024 / 1024).toFixed(1)} MB` : `${(a / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
2585
966
|
}
|
|
2586
|
-
function
|
|
2587
|
-
const
|
|
2588
|
-
return
|
|
967
|
+
function se(a) {
|
|
968
|
+
const r = Math.floor(a / 86400), l = Math.floor(a % 86400 / 3600), n = Math.floor(a % 3600 / 60);
|
|
969
|
+
return r > 0 ? `${r}d ${l}h` : l > 0 ? `${l}h ${n}m` : `${n}m`;
|
|
2589
970
|
}
|
|
2590
|
-
function
|
|
2591
|
-
return /* @__PURE__ */
|
|
971
|
+
function de({ node: a, isSelected: r, onSelect: l }) {
|
|
972
|
+
return /* @__PURE__ */ i(
|
|
2592
973
|
"div",
|
|
2593
974
|
{
|
|
2594
|
-
className: `nice-edge-manager__node-card ${
|
|
2595
|
-
onClick:
|
|
975
|
+
className: `nice-edge-manager__node-card ${r ? "nice-edge-manager__node-card--selected" : ""}`,
|
|
976
|
+
onClick: l,
|
|
2596
977
|
children: [
|
|
2597
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__node-header", children: [
|
|
2598
979
|
/* @__PURE__ */ e(
|
|
2599
980
|
"span",
|
|
2600
981
|
{
|
|
2601
982
|
className: "nice-edge-manager__node-status",
|
|
2602
|
-
style: { background:
|
|
983
|
+
style: { background: Q(a.status) }
|
|
2603
984
|
}
|
|
2604
985
|
),
|
|
2605
986
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-name", children: a.name }),
|
|
2606
987
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__node-type", children: a.type })
|
|
2607
988
|
] }),
|
|
2608
|
-
/* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2610
|
-
/* @__PURE__ */
|
|
2611
|
-
/* @__PURE__ */ e(
|
|
989
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__node-body", children: [
|
|
990
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__node-info", children: [
|
|
991
|
+
/* @__PURE__ */ i("span", { children: [
|
|
992
|
+
/* @__PURE__ */ e(m, { name: "server", size: 12 }),
|
|
2612
993
|
" ",
|
|
2613
994
|
a.hardware.cpu
|
|
2614
995
|
] }),
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */ e(
|
|
996
|
+
/* @__PURE__ */ i("span", { children: [
|
|
997
|
+
/* @__PURE__ */ e(m, { name: "database", size: 12 }),
|
|
2617
998
|
" ",
|
|
2618
999
|
(a.hardware.memoryMB / 1024).toFixed(1),
|
|
2619
1000
|
" GB"
|
|
2620
1001
|
] })
|
|
2621
1002
|
] }),
|
|
2622
|
-
/* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children: a.metrics && /* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children: a.metrics && /* @__PURE__ */ i(A, { children: [
|
|
1004
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__metric", children: [
|
|
2624
1005
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "CPU" }),
|
|
2625
1006
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
|
|
2626
1007
|
"div",
|
|
@@ -2629,12 +1010,12 @@ function Te({ node: a, isSelected: i, onSelect: c }) {
|
|
|
2629
1010
|
style: { width: `${a.metrics.cpuUsage}%` }
|
|
2630
1011
|
}
|
|
2631
1012
|
) }),
|
|
2632
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ i("span", { className: "nice-edge-manager__metric-value", children: [
|
|
2633
1014
|
a.metrics.cpuUsage.toFixed(0),
|
|
2634
1015
|
"%"
|
|
2635
1016
|
] })
|
|
2636
1017
|
] }),
|
|
2637
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__metric", children: [
|
|
2638
1019
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "MEM" }),
|
|
2639
1020
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
|
|
2640
1021
|
"div",
|
|
@@ -2643,13 +1024,13 @@ function Te({ node: a, isSelected: i, onSelect: c }) {
|
|
|
2643
1024
|
style: { width: `${a.metrics.memoryUsage}%` }
|
|
2644
1025
|
}
|
|
2645
1026
|
) }),
|
|
2646
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ i("span", { className: "nice-edge-manager__metric-value", children: [
|
|
2647
1028
|
a.metrics.memoryUsage.toFixed(0),
|
|
2648
1029
|
"%"
|
|
2649
1030
|
] })
|
|
2650
1031
|
] })
|
|
2651
1032
|
] }) }),
|
|
2652
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__node-modules", children: [
|
|
2653
1034
|
a.deployedModules.length,
|
|
2654
1035
|
" modules deployed"
|
|
2655
1036
|
] })
|
|
@@ -2658,9 +1039,10 @@ function Te({ node: a, isSelected: i, onSelect: c }) {
|
|
|
2658
1039
|
}
|
|
2659
1040
|
);
|
|
2660
1041
|
}
|
|
2661
|
-
function
|
|
2662
|
-
|
|
2663
|
-
|
|
1042
|
+
function he({ module: a, onAction: r }) {
|
|
1043
|
+
const { t: l } = b();
|
|
1044
|
+
return /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-card", children: [
|
|
1045
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__module-header", children: [
|
|
2664
1046
|
/* @__PURE__ */ e(
|
|
2665
1047
|
"span",
|
|
2666
1048
|
{
|
|
@@ -2676,154 +1058,156 @@ function Ve({ module: a, onAction: i }) {
|
|
|
2676
1058
|
}
|
|
2677
1059
|
),
|
|
2678
1060
|
/* @__PURE__ */ e("span", { className: "nice-edge-manager__module-name", children: a.name }),
|
|
2679
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ i("span", { className: "nice-edge-manager__module-version", children: [
|
|
2680
1062
|
"v",
|
|
2681
1063
|
a.version
|
|
2682
1064
|
] })
|
|
2683
1065
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__module-body", children: [
|
|
2685
1067
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__module-image", children: a.image }),
|
|
2686
|
-
a.resources && /* @__PURE__ */
|
|
2687
|
-
a.resources.cpuLimit && /* @__PURE__ */
|
|
1068
|
+
a.resources && /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-resources", children: [
|
|
1069
|
+
a.resources.cpuLimit && /* @__PURE__ */ i("span", { children: [
|
|
2688
1070
|
"CPU: ",
|
|
2689
1071
|
a.resources.cpuLimit
|
|
2690
1072
|
] }),
|
|
2691
|
-
a.resources.memoryLimitMB && /* @__PURE__ */
|
|
1073
|
+
a.resources.memoryLimitMB && /* @__PURE__ */ i("span", { children: [
|
|
2692
1074
|
"RAM: ",
|
|
2693
1075
|
a.resources.memoryLimitMB,
|
|
2694
1076
|
" MB"
|
|
2695
1077
|
] })
|
|
2696
1078
|
] }),
|
|
2697
|
-
a.ports && a.ports.length > 0 && /* @__PURE__ */
|
|
1079
|
+
a.ports && a.ports.length > 0 && /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-ports", children: [
|
|
2698
1080
|
"Ports: ",
|
|
2699
|
-
a.ports.map((
|
|
1081
|
+
a.ports.map((c) => `${c.host}:${c.container}`).join(", ")
|
|
2700
1082
|
] })
|
|
2701
1083
|
] }),
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
a.status === "running" && /* @__PURE__ */
|
|
2704
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
2705
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
1084
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__module-actions", children: [
|
|
1085
|
+
a.status === "running" && /* @__PURE__ */ i(A, { children: [
|
|
1086
|
+
/* @__PURE__ */ e("button", { onClick: () => r("stop"), children: l("edgeManager.stop", "Stop") }),
|
|
1087
|
+
/* @__PURE__ */ e("button", { onClick: () => r("restart"), children: l("edgeManager.restart", "Restart") })
|
|
2706
1088
|
] }),
|
|
2707
|
-
a.status === "stopped" && /* @__PURE__ */ e("button", { onClick: () =>
|
|
2708
|
-
/* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () =>
|
|
1089
|
+
a.status === "stopped" && /* @__PURE__ */ e("button", { onClick: () => r("start"), children: l("edgeManager.start", "Start") }),
|
|
1090
|
+
/* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () => r("remove"), children: l("edgeManager.remove", "Remove") })
|
|
2709
1091
|
] })
|
|
2710
1092
|
] });
|
|
2711
1093
|
}
|
|
2712
|
-
function
|
|
2713
|
-
|
|
2714
|
-
|
|
1094
|
+
function me({ node: a, onSync: r, onClose: l }) {
|
|
1095
|
+
const { t: n } = b();
|
|
1096
|
+
return /* @__PURE__ */ i("aside", { className: "nice-edge-manager__detail", children: [
|
|
1097
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-header", children: [
|
|
2715
1098
|
/* @__PURE__ */ e("h3", { children: a.name }),
|
|
2716
|
-
/* @__PURE__ */
|
|
2717
|
-
/* @__PURE__ */
|
|
2718
|
-
/* @__PURE__ */ e(
|
|
2719
|
-
"
|
|
1099
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-actions", children: [
|
|
1100
|
+
/* @__PURE__ */ i("button", { onClick: r, children: [
|
|
1101
|
+
/* @__PURE__ */ e(m, { name: "refresh", size: 14 }),
|
|
1102
|
+
" ",
|
|
1103
|
+
n("edgeManager.sync", "Sync")
|
|
2720
1104
|
] }),
|
|
2721
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1105
|
+
/* @__PURE__ */ e("button", { onClick: l, "aria-label": n("edgeManager.close", "Close"), children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
|
|
2722
1106
|
] })
|
|
2723
1107
|
] }),
|
|
2724
|
-
/* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */ e("h4", { children: "Status" }),
|
|
2727
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-content", children: [
|
|
1109
|
+
/* @__PURE__ */ i("section", { children: [
|
|
1110
|
+
/* @__PURE__ */ e("h4", { children: n("edgeManager.status", "Status") }),
|
|
1111
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2728
1112
|
/* @__PURE__ */ e("span", { children: "Status:" }),
|
|
2729
1113
|
/* @__PURE__ */ e(
|
|
2730
1114
|
"span",
|
|
2731
1115
|
{
|
|
2732
1116
|
className: "nice-edge-manager__status-badge",
|
|
2733
|
-
style: { background:
|
|
1117
|
+
style: { background: Q(a.status) },
|
|
2734
1118
|
children: a.status
|
|
2735
1119
|
}
|
|
2736
1120
|
)
|
|
2737
1121
|
] }),
|
|
2738
|
-
a.metrics && /* @__PURE__ */
|
|
1122
|
+
a.metrics && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2739
1123
|
/* @__PURE__ */ e("span", { children: "Uptime:" }),
|
|
2740
|
-
/* @__PURE__ */ e("span", { children:
|
|
1124
|
+
/* @__PURE__ */ e("span", { children: se(a.metrics.uptime) })
|
|
2741
1125
|
] })
|
|
2742
1126
|
] }),
|
|
2743
|
-
/* @__PURE__ */
|
|
2744
|
-
/* @__PURE__ */ e("h4", { children: "Hardware" }),
|
|
2745
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ i("section", { children: [
|
|
1128
|
+
/* @__PURE__ */ e("h4", { children: n("edgeManager.hardware", "Hardware") }),
|
|
1129
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2746
1130
|
/* @__PURE__ */ e("span", { children: "CPU:" }),
|
|
2747
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2748
1132
|
a.hardware.cpu,
|
|
2749
1133
|
" (",
|
|
2750
1134
|
a.hardware.cores,
|
|
2751
1135
|
" cores)"
|
|
2752
1136
|
] })
|
|
2753
1137
|
] }),
|
|
2754
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2755
1139
|
/* @__PURE__ */ e("span", { children: "Memory:" }),
|
|
2756
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2757
1141
|
(a.hardware.memoryMB / 1024).toFixed(1),
|
|
2758
1142
|
" GB"
|
|
2759
1143
|
] })
|
|
2760
1144
|
] }),
|
|
2761
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2762
1146
|
/* @__PURE__ */ e("span", { children: "Storage:" }),
|
|
2763
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2764
1148
|
(a.hardware.storageMB / 1024).toFixed(1),
|
|
2765
1149
|
" GB"
|
|
2766
1150
|
] })
|
|
2767
1151
|
] }),
|
|
2768
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2769
1153
|
/* @__PURE__ */ e("span", { children: "Architecture:" }),
|
|
2770
1154
|
/* @__PURE__ */ e("span", { children: a.hardware.architecture })
|
|
2771
1155
|
] })
|
|
2772
1156
|
] }),
|
|
2773
|
-
/* @__PURE__ */
|
|
2774
|
-
/* @__PURE__ */ e("h4", { children: "Software" }),
|
|
2775
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ i("section", { children: [
|
|
1158
|
+
/* @__PURE__ */ e("h4", { children: n("edgeManager.software", "Software") }),
|
|
1159
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2776
1160
|
/* @__PURE__ */ e("span", { children: "OS:" }),
|
|
2777
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2778
1162
|
a.software.os,
|
|
2779
1163
|
" ",
|
|
2780
1164
|
a.software.osVersion
|
|
2781
1165
|
] })
|
|
2782
1166
|
] }),
|
|
2783
|
-
/* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2784
1168
|
/* @__PURE__ */ e("span", { children: "Runtime:" }),
|
|
2785
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2786
1170
|
a.software.runtime,
|
|
2787
1171
|
" ",
|
|
2788
1172
|
a.software.runtimeVersion
|
|
2789
1173
|
] })
|
|
2790
1174
|
] }),
|
|
2791
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2792
1176
|
/* @__PURE__ */ e("span", { children: "Agent:" }),
|
|
2793
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2794
1178
|
a.software.agent,
|
|
2795
1179
|
" v",
|
|
2796
1180
|
a.software.agentVersion
|
|
2797
1181
|
] })
|
|
2798
1182
|
] })
|
|
2799
1183
|
] }),
|
|
2800
|
-
/* @__PURE__ */
|
|
2801
|
-
/* @__PURE__ */ e("h4", { children: "Connectivity" }),
|
|
2802
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ i("section", { children: [
|
|
1185
|
+
/* @__PURE__ */ e("h4", { children: n("edgeManager.connectivity", "Connectivity") }),
|
|
1186
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2803
1187
|
/* @__PURE__ */ e("span", { children: "Cloud:" }),
|
|
2804
|
-
/* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */ e(
|
|
1188
|
+
/* @__PURE__ */ i("span", { children: [
|
|
1189
|
+
/* @__PURE__ */ e(m, { name: a.connectivity.cloudConnected ? "check" : "close", size: 12 }),
|
|
2806
1190
|
" ",
|
|
2807
1191
|
a.connectivity.cloudConnected ? "Connected" : "Disconnected"
|
|
2808
1192
|
] })
|
|
2809
1193
|
] }),
|
|
2810
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2811
1195
|
/* @__PURE__ */ e("span", { children: "Network:" }),
|
|
2812
1196
|
/* @__PURE__ */ e("span", { children: a.connectivity.localNetwork })
|
|
2813
1197
|
] }),
|
|
2814
|
-
a.connectivity.publicIP && /* @__PURE__ */
|
|
1198
|
+
a.connectivity.publicIP && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2815
1199
|
/* @__PURE__ */ e("span", { children: "Public IP:" }),
|
|
2816
1200
|
/* @__PURE__ */ e("span", { children: a.connectivity.publicIP })
|
|
2817
1201
|
] }),
|
|
2818
|
-
a.connectivity.lastSync && /* @__PURE__ */
|
|
1202
|
+
a.connectivity.lastSync && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
|
|
2819
1203
|
/* @__PURE__ */ e("span", { children: "Last Sync:" }),
|
|
2820
1204
|
/* @__PURE__ */ e("span", { children: a.connectivity.lastSync.toLocaleString() })
|
|
2821
1205
|
] })
|
|
2822
1206
|
] }),
|
|
2823
|
-
a.metrics && /* @__PURE__ */
|
|
2824
|
-
/* @__PURE__ */ e("h4", { children: "Resource Usage" }),
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
/* @__PURE__ */
|
|
1207
|
+
a.metrics && /* @__PURE__ */ i("section", { children: [
|
|
1208
|
+
/* @__PURE__ */ e("h4", { children: n("edgeManager.resourceUsage", "Resource Usage") }),
|
|
1209
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-chart", children: [
|
|
1210
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
|
|
2827
1211
|
/* @__PURE__ */ e("span", { children: "CPU" }),
|
|
2828
1212
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
2829
1213
|
"div",
|
|
@@ -2832,13 +1216,13 @@ function Ae({ node: a, onSync: i, onClose: c }) {
|
|
|
2832
1216
|
style: { width: `${a.metrics.cpuUsage}%` }
|
|
2833
1217
|
}
|
|
2834
1218
|
) }),
|
|
2835
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2836
1220
|
a.metrics.cpuUsage.toFixed(1),
|
|
2837
1221
|
"%"
|
|
2838
1222
|
] })
|
|
2839
1223
|
] }),
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
/* @__PURE__ */ e("span", { children: "Memory" }),
|
|
1224
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
|
|
1225
|
+
/* @__PURE__ */ e("span", { children: n("edgeManager.memory", "Memory") }),
|
|
2842
1226
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
2843
1227
|
"div",
|
|
2844
1228
|
{
|
|
@@ -2846,13 +1230,13 @@ function Ae({ node: a, onSync: i, onClose: c }) {
|
|
|
2846
1230
|
style: { width: `${a.metrics.memoryUsage}%` }
|
|
2847
1231
|
}
|
|
2848
1232
|
) }),
|
|
2849
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2850
1234
|
a.metrics.memoryUsage.toFixed(1),
|
|
2851
1235
|
"%"
|
|
2852
1236
|
] })
|
|
2853
1237
|
] }),
|
|
2854
|
-
/* @__PURE__ */
|
|
2855
|
-
/* @__PURE__ */ e("span", { children: "Disk" }),
|
|
1238
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
|
|
1239
|
+
/* @__PURE__ */ e("span", { children: n("edgeManager.disk", "Disk") }),
|
|
2856
1240
|
/* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
|
|
2857
1241
|
"div",
|
|
2858
1242
|
{
|
|
@@ -2860,103 +1244,106 @@ function Ae({ node: a, onSync: i, onClose: c }) {
|
|
|
2860
1244
|
style: { width: `${a.metrics.diskUsage}%` }
|
|
2861
1245
|
}
|
|
2862
1246
|
) }),
|
|
2863
|
-
/* @__PURE__ */
|
|
1247
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2864
1248
|
a.metrics.diskUsage.toFixed(1),
|
|
2865
1249
|
"%"
|
|
2866
1250
|
] })
|
|
2867
1251
|
] })
|
|
2868
1252
|
] }),
|
|
2869
|
-
/* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
|
|
2872
|
-
|
|
1253
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__network-stats", children: [
|
|
1254
|
+
/* @__PURE__ */ i("span", { children: [
|
|
1255
|
+
/* @__PURE__ */ e(m, { name: "arrow-down", size: 12 }),
|
|
1256
|
+
" ",
|
|
1257
|
+
B(a.metrics.networkIn)
|
|
2873
1258
|
] }),
|
|
2874
|
-
/* @__PURE__ */
|
|
2875
|
-
|
|
2876
|
-
|
|
1259
|
+
/* @__PURE__ */ i("span", { children: [
|
|
1260
|
+
/* @__PURE__ */ e(m, { name: "arrow-up", size: 12 }),
|
|
1261
|
+
" ",
|
|
1262
|
+
B(a.metrics.networkOut)
|
|
2877
1263
|
] })
|
|
2878
1264
|
] })
|
|
2879
1265
|
] })
|
|
2880
1266
|
] })
|
|
2881
1267
|
] });
|
|
2882
1268
|
}
|
|
2883
|
-
function
|
|
1269
|
+
function pe({
|
|
2884
1270
|
config: a,
|
|
2885
|
-
templates:
|
|
2886
|
-
onChange:
|
|
1271
|
+
templates: r,
|
|
1272
|
+
onChange: l,
|
|
2887
1273
|
onDeploy: n,
|
|
2888
|
-
onClose:
|
|
1274
|
+
onClose: c
|
|
2889
1275
|
}) {
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
/* @__PURE__ */ e("
|
|
1276
|
+
const { t } = b();
|
|
1277
|
+
return /* @__PURE__ */ e("div", { className: "nice-edge-manager__dialog-overlay", children: /* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog", children: [
|
|
1278
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-header", children: [
|
|
1279
|
+
/* @__PURE__ */ e("h3", { children: t("edgeManager.deployModule", "Deploy Module") }),
|
|
1280
|
+
/* @__PURE__ */ e("button", { onClick: c, "aria-label": t("edgeManager.close", "Close"), children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
|
|
2894
1281
|
] }),
|
|
2895
|
-
/* @__PURE__ */
|
|
2896
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-content", children: [
|
|
1283
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
|
|
2897
1284
|
/* @__PURE__ */ e("label", { children: "Template (optional)" }),
|
|
2898
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ i(
|
|
2899
1286
|
"select",
|
|
2900
1287
|
{
|
|
2901
1288
|
value: "",
|
|
2902
|
-
onChange: (
|
|
2903
|
-
const
|
|
2904
|
-
|
|
1289
|
+
onChange: (o) => {
|
|
1290
|
+
const s = r.find((h) => h.image === o.target.value);
|
|
1291
|
+
s && l({
|
|
2905
1292
|
...a,
|
|
2906
|
-
name:
|
|
2907
|
-
image:
|
|
1293
|
+
name: s.name,
|
|
1294
|
+
image: s.image
|
|
2908
1295
|
});
|
|
2909
1296
|
},
|
|
2910
1297
|
children: [
|
|
2911
|
-
/* @__PURE__ */ e("option", { value: "", children: "Select a template..." }),
|
|
2912
|
-
|
|
1298
|
+
/* @__PURE__ */ e("option", { value: "", children: t("edgeManager.selectATemplate", "Select a template...") }),
|
|
1299
|
+
r.map((o) => /* @__PURE__ */ e("option", { value: o.image, children: o.name }, o.image))
|
|
2913
1300
|
]
|
|
2914
1301
|
}
|
|
2915
1302
|
)
|
|
2916
1303
|
] }),
|
|
2917
|
-
/* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */ e("label", { children: "Module Name" }),
|
|
1304
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
|
|
1305
|
+
/* @__PURE__ */ e("label", { children: t("edgeManager.moduleName", "Module Name") }),
|
|
2919
1306
|
/* @__PURE__ */ e(
|
|
2920
1307
|
"input",
|
|
2921
1308
|
{
|
|
2922
1309
|
type: "text",
|
|
2923
1310
|
value: a.name || "",
|
|
2924
|
-
onChange: (
|
|
2925
|
-
placeholder: "e.g., my-module"
|
|
1311
|
+
onChange: (o) => l({ ...a, name: o.target.value }),
|
|
1312
|
+
placeholder: t("edgeManager.eGMyModule", "e.g., my-module")
|
|
2926
1313
|
}
|
|
2927
1314
|
)
|
|
2928
1315
|
] }),
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */ e("label", { children: "Container Image" }),
|
|
1316
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
|
|
1317
|
+
/* @__PURE__ */ e("label", { children: t("edgeManager.containerImage", "Container Image") }),
|
|
2931
1318
|
/* @__PURE__ */ e(
|
|
2932
1319
|
"input",
|
|
2933
1320
|
{
|
|
2934
1321
|
type: "text",
|
|
2935
1322
|
value: a.image || "",
|
|
2936
|
-
onChange: (
|
|
2937
|
-
placeholder: "e.g., nginx:latest"
|
|
1323
|
+
onChange: (o) => l({ ...a, image: o.target.value }),
|
|
1324
|
+
placeholder: t("edgeManager.eGNginxLatest", "e.g., nginx:latest")
|
|
2938
1325
|
}
|
|
2939
1326
|
)
|
|
2940
1327
|
] }),
|
|
2941
|
-
/* @__PURE__ */
|
|
2942
|
-
/* @__PURE__ */ e("label", { children: "Version" }),
|
|
1328
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
|
|
1329
|
+
/* @__PURE__ */ e("label", { children: t("edgeManager.version", "Version") }),
|
|
2943
1330
|
/* @__PURE__ */ e(
|
|
2944
1331
|
"input",
|
|
2945
1332
|
{
|
|
2946
1333
|
type: "text",
|
|
2947
1334
|
value: a.version || "1.0.0",
|
|
2948
|
-
onChange: (
|
|
1335
|
+
onChange: (o) => l({ ...a, version: o.target.value })
|
|
2949
1336
|
}
|
|
2950
1337
|
)
|
|
2951
1338
|
] })
|
|
2952
1339
|
] }),
|
|
2953
|
-
/* @__PURE__ */
|
|
2954
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
2955
|
-
/* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick: n, children: "Deploy" })
|
|
1340
|
+
/* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-footer", children: [
|
|
1341
|
+
/* @__PURE__ */ e("button", { onClick: c, children: t("edgeManager.cancel", "Cancel") }),
|
|
1342
|
+
/* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick: n, children: t("edgeManager.deploy", "Deploy") })
|
|
2956
1343
|
] })
|
|
2957
1344
|
] }) });
|
|
2958
1345
|
}
|
|
2959
|
-
const
|
|
1346
|
+
const F = {
|
|
2960
1347
|
broker: "localhost",
|
|
2961
1348
|
port: 1883,
|
|
2962
1349
|
clientId: `nice2dev-${Date.now()}`,
|
|
@@ -2964,75 +1351,75 @@ const Q = {
|
|
|
2964
1351
|
keepAlive: 60,
|
|
2965
1352
|
cleanSession: !0,
|
|
2966
1353
|
topics: []
|
|
2967
|
-
},
|
|
1354
|
+
}, q = {
|
|
2968
1355
|
host: "localhost",
|
|
2969
1356
|
port: 5683,
|
|
2970
1357
|
useDTLS: !1,
|
|
2971
1358
|
resources: []
|
|
2972
|
-
},
|
|
1359
|
+
}, W = {
|
|
2973
1360
|
type: "tcp",
|
|
2974
1361
|
host: "localhost",
|
|
2975
1362
|
port: 502,
|
|
2976
1363
|
slaveId: 1,
|
|
2977
1364
|
timeout: 1e3,
|
|
2978
1365
|
registers: []
|
|
2979
|
-
},
|
|
1366
|
+
}, G = {
|
|
2980
1367
|
endpointUrl: "opc.tcp://localhost:4840",
|
|
2981
1368
|
securityMode: "None",
|
|
2982
1369
|
authentication: "anonymous",
|
|
2983
1370
|
applicationName: "Nice2Dev IoT Client",
|
|
2984
1371
|
nodes: []
|
|
2985
1372
|
};
|
|
2986
|
-
function
|
|
1373
|
+
function ye({
|
|
2987
1374
|
protocol: a = "mqtt",
|
|
2988
|
-
config:
|
|
2989
|
-
onSave:
|
|
1375
|
+
config: r,
|
|
1376
|
+
onSave: l,
|
|
2990
1377
|
onTest: n,
|
|
2991
|
-
className:
|
|
1378
|
+
className: c = ""
|
|
2992
1379
|
}) {
|
|
2993
|
-
const { t } =
|
|
2994
|
-
(
|
|
2995
|
-
), [
|
|
2996
|
-
(
|
|
2997
|
-
), [
|
|
2998
|
-
(
|
|
2999
|
-
), [
|
|
3000
|
-
(
|
|
3001
|
-
), [
|
|
3002
|
-
switch (
|
|
1380
|
+
const { t } = b(), [o, s] = g(a), [h, p] = g(
|
|
1381
|
+
(r == null ? void 0 : r.type) === "mqtt" ? { ...F, ...r.config } : F
|
|
1382
|
+
), [u, H] = g(
|
|
1383
|
+
(r == null ? void 0 : r.type) === "coap" ? { ...q, ...r.config } : q
|
|
1384
|
+
), [N, k] = g(
|
|
1385
|
+
(r == null ? void 0 : r.type) === "modbus" ? { ...W, ...r.config } : W
|
|
1386
|
+
), [M, w] = g(
|
|
1387
|
+
(r == null ? void 0 : r.type) === "opcua" ? { ...G, ...r.config } : G
|
|
1388
|
+
), [_, V] = g(null), [y, L] = g(!1), v = f(() => {
|
|
1389
|
+
switch (o) {
|
|
3003
1390
|
case "mqtt":
|
|
3004
|
-
return
|
|
1391
|
+
return h;
|
|
3005
1392
|
case "coap":
|
|
3006
|
-
return
|
|
1393
|
+
return u;
|
|
3007
1394
|
case "modbus-tcp":
|
|
3008
1395
|
case "modbus-rtu":
|
|
3009
|
-
return g;
|
|
3010
|
-
case "opcua":
|
|
3011
1396
|
return N;
|
|
1397
|
+
case "opcua":
|
|
1398
|
+
return M;
|
|
3012
1399
|
default:
|
|
3013
|
-
return
|
|
1400
|
+
return h;
|
|
3014
1401
|
}
|
|
3015
|
-
}, [
|
|
3016
|
-
|
|
3017
|
-
}, [
|
|
1402
|
+
}, [o, h, u, N, M]), D = f(() => {
|
|
1403
|
+
l == null || l(v());
|
|
1404
|
+
}, [v, l]), P = f(async () => {
|
|
3018
1405
|
if (n) {
|
|
3019
|
-
|
|
1406
|
+
L(!0), V(null);
|
|
3020
1407
|
try {
|
|
3021
|
-
const T = await n(
|
|
3022
|
-
|
|
1408
|
+
const T = await n(v());
|
|
1409
|
+
V(T);
|
|
3023
1410
|
} catch (T) {
|
|
3024
|
-
|
|
1411
|
+
V({ success: !1, message: String(T) });
|
|
3025
1412
|
} finally {
|
|
3026
|
-
|
|
1413
|
+
L(!1);
|
|
3027
1414
|
}
|
|
3028
1415
|
}
|
|
3029
|
-
}, [
|
|
3030
|
-
return /* @__PURE__ */
|
|
3031
|
-
/* @__PURE__ */
|
|
1416
|
+
}, [v, n]);
|
|
1417
|
+
return /* @__PURE__ */ i("div", { className: `nice-protocol-config ${c}`, children: [
|
|
1418
|
+
/* @__PURE__ */ i("header", { className: "nice-protocol-config__header", children: [
|
|
3032
1419
|
/* @__PURE__ */ e("h2", { children: t("protocolConfig.title", "Protocol Configuration") }),
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */ e("label", { children: "Protocol:" }),
|
|
3035
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__protocol-selector", children: [
|
|
1421
|
+
/* @__PURE__ */ e("label", { children: t("protocolConfig.protocol", "Protocol:") }),
|
|
1422
|
+
/* @__PURE__ */ i("select", { value: o, onChange: (T) => s(T.target.value), children: [
|
|
3036
1423
|
/* @__PURE__ */ e("option", { value: "mqtt", children: t("protocolConfig.mqtt", "MQTT") }),
|
|
3037
1424
|
/* @__PURE__ */ e("option", { value: "coap", children: t("protocolConfig.coap", "CoAP") }),
|
|
3038
1425
|
/* @__PURE__ */ e("option", { value: "modbus-tcp", children: t("protocolConfig.modbusTcp", "Modbus TCP") }),
|
|
@@ -3041,209 +1428,212 @@ function Oe({
|
|
|
3041
1428
|
] })
|
|
3042
1429
|
] })
|
|
3043
1430
|
] }),
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
(
|
|
3048
|
-
|
|
1431
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__content", children: [
|
|
1432
|
+
o === "mqtt" && /* @__PURE__ */ e(ve, { config: h, onChange: p }),
|
|
1433
|
+
o === "coap" && /* @__PURE__ */ e(ue, { config: u, onChange: H }),
|
|
1434
|
+
(o === "modbus-tcp" || o === "modbus-rtu") && /* @__PURE__ */ e(
|
|
1435
|
+
Me,
|
|
3049
1436
|
{
|
|
3050
|
-
config:
|
|
3051
|
-
type:
|
|
3052
|
-
onChange:
|
|
1437
|
+
config: N,
|
|
1438
|
+
type: o === "modbus-rtu" ? "rtu" : "tcp",
|
|
1439
|
+
onChange: k
|
|
3053
1440
|
}
|
|
3054
1441
|
),
|
|
3055
|
-
|
|
1442
|
+
o === "opcua" && /* @__PURE__ */ e(ge, { config: M, onChange: w })
|
|
3056
1443
|
] }),
|
|
3057
|
-
|
|
1444
|
+
_ && /* @__PURE__ */ i(
|
|
3058
1445
|
"div",
|
|
3059
1446
|
{
|
|
3060
|
-
className: `nice-protocol-config__test-result nice-protocol-config__test-result--${
|
|
1447
|
+
className: `nice-protocol-config__test-result nice-protocol-config__test-result--${_.success ? "success" : "error"}`,
|
|
3061
1448
|
children: [
|
|
3062
|
-
/* @__PURE__ */ e(
|
|
1449
|
+
/* @__PURE__ */ e(m, { name: _.success ? "check" : "close", size: 14 }),
|
|
3063
1450
|
" ",
|
|
3064
|
-
|
|
1451
|
+
_.message
|
|
3065
1452
|
]
|
|
3066
1453
|
}
|
|
3067
1454
|
),
|
|
3068
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ i("footer", { className: "nice-protocol-config__footer", children: [
|
|
3069
1456
|
/* @__PURE__ */ e(
|
|
3070
1457
|
"button",
|
|
3071
1458
|
{
|
|
3072
1459
|
className: "nice-protocol-config__test-btn",
|
|
3073
|
-
onClick:
|
|
3074
|
-
disabled:
|
|
3075
|
-
children:
|
|
3076
|
-
/* @__PURE__ */ e(
|
|
3077
|
-
"
|
|
1460
|
+
onClick: P,
|
|
1461
|
+
disabled: y || !n,
|
|
1462
|
+
children: y ? t("protocolConfig.testing", "Testing...") : /* @__PURE__ */ i(A, { children: [
|
|
1463
|
+
/* @__PURE__ */ e(m, { name: "plug", size: 14 }),
|
|
1464
|
+
" ",
|
|
1465
|
+
t("protocolConfig.testConnection", "Test Connection")
|
|
3078
1466
|
] })
|
|
3079
1467
|
}
|
|
3080
1468
|
),
|
|
3081
|
-
/* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */ e(
|
|
3083
|
-
"
|
|
1469
|
+
/* @__PURE__ */ i("button", { className: "nice-protocol-config__save-btn", onClick: D, children: [
|
|
1470
|
+
/* @__PURE__ */ e(m, { name: "save", size: 14 }),
|
|
1471
|
+
" ",
|
|
1472
|
+
t("save", "Save")
|
|
3084
1473
|
] })
|
|
3085
1474
|
] })
|
|
3086
1475
|
] });
|
|
3087
1476
|
}
|
|
3088
|
-
function
|
|
3089
|
-
const { t:
|
|
3090
|
-
return /* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */ e("h3", { children:
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3094
|
-
/* @__PURE__ */ e("label", { children:
|
|
1477
|
+
function ve({ config: a, onChange: r }) {
|
|
1478
|
+
const { t: l } = b();
|
|
1479
|
+
return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
|
|
1480
|
+
/* @__PURE__ */ e("h3", { children: l("protocolConfig.mqttConfiguration", "MQTT Configuration") }),
|
|
1481
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
|
|
1482
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1483
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.broker", "Broker") }),
|
|
3095
1484
|
/* @__PURE__ */ e(
|
|
3096
1485
|
"input",
|
|
3097
1486
|
{
|
|
3098
1487
|
type: "text",
|
|
3099
1488
|
value: a.broker,
|
|
3100
|
-
onChange: (n) =>
|
|
1489
|
+
onChange: (n) => r({ ...a, broker: n.target.value }),
|
|
3101
1490
|
placeholder: "localhost"
|
|
3102
1491
|
}
|
|
3103
1492
|
)
|
|
3104
1493
|
] }),
|
|
3105
|
-
/* @__PURE__ */
|
|
3106
|
-
/* @__PURE__ */ e("label", { children:
|
|
1494
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1495
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.port", "Port") }),
|
|
3107
1496
|
/* @__PURE__ */ e(
|
|
3108
1497
|
"input",
|
|
3109
1498
|
{
|
|
3110
1499
|
type: "number",
|
|
3111
1500
|
value: a.port,
|
|
3112
|
-
onChange: (n) =>
|
|
1501
|
+
onChange: (n) => r({ ...a, port: parseInt(n.target.value, 10) || 1883 })
|
|
3113
1502
|
}
|
|
3114
1503
|
)
|
|
3115
1504
|
] }),
|
|
3116
|
-
/* @__PURE__ */
|
|
3117
|
-
/* @__PURE__ */ e("label", { children:
|
|
1505
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1506
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.clientId", "Client ID") }),
|
|
3118
1507
|
/* @__PURE__ */ e(
|
|
3119
1508
|
"input",
|
|
3120
1509
|
{
|
|
3121
1510
|
type: "text",
|
|
3122
1511
|
value: a.clientId,
|
|
3123
|
-
onChange: (n) =>
|
|
1512
|
+
onChange: (n) => r({ ...a, clientId: n.target.value })
|
|
3124
1513
|
}
|
|
3125
1514
|
)
|
|
3126
1515
|
] }),
|
|
3127
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
|
|
3128
1517
|
/* @__PURE__ */ e(
|
|
3129
1518
|
"input",
|
|
3130
1519
|
{
|
|
3131
1520
|
type: "checkbox",
|
|
3132
1521
|
checked: a.useTLS,
|
|
3133
|
-
onChange: (n) =>
|
|
1522
|
+
onChange: (n) => r({ ...a, useTLS: n.target.checked })
|
|
3134
1523
|
}
|
|
3135
1524
|
),
|
|
3136
|
-
|
|
1525
|
+
l("protocolConfig.useTls", "Use TLS")
|
|
3137
1526
|
] }) }),
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */ e("label", { children:
|
|
1527
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1528
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.username", "Username") }),
|
|
3140
1529
|
/* @__PURE__ */ e(
|
|
3141
1530
|
"input",
|
|
3142
1531
|
{
|
|
3143
1532
|
type: "text",
|
|
3144
1533
|
value: a.username || "",
|
|
3145
|
-
onChange: (n) =>
|
|
1534
|
+
onChange: (n) => r({ ...a, username: n.target.value })
|
|
3146
1535
|
}
|
|
3147
1536
|
)
|
|
3148
1537
|
] }),
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */ e("label", { children:
|
|
1538
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1539
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.password", "Password") }),
|
|
3151
1540
|
/* @__PURE__ */ e(
|
|
3152
1541
|
"input",
|
|
3153
1542
|
{
|
|
3154
1543
|
type: "password",
|
|
3155
1544
|
value: a.password || "",
|
|
3156
|
-
onChange: (n) =>
|
|
1545
|
+
onChange: (n) => r({ ...a, password: n.target.value })
|
|
3157
1546
|
}
|
|
3158
1547
|
)
|
|
3159
1548
|
] }),
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */ e("label", { children: "Keep Alive (seconds)" }),
|
|
1549
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1550
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.keepAlive", "Keep Alive (seconds)") }),
|
|
3162
1551
|
/* @__PURE__ */ e(
|
|
3163
1552
|
"input",
|
|
3164
1553
|
{
|
|
3165
1554
|
type: "number",
|
|
3166
1555
|
value: a.keepAlive,
|
|
3167
|
-
onChange: (n) =>
|
|
1556
|
+
onChange: (n) => r({ ...a, keepAlive: parseInt(n.target.value, 10) || 60 })
|
|
3168
1557
|
}
|
|
3169
1558
|
)
|
|
3170
1559
|
] }),
|
|
3171
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
|
|
3172
1561
|
/* @__PURE__ */ e(
|
|
3173
1562
|
"input",
|
|
3174
1563
|
{
|
|
3175
1564
|
type: "checkbox",
|
|
3176
1565
|
checked: a.cleanSession,
|
|
3177
|
-
onChange: (n) =>
|
|
1566
|
+
onChange: (n) => r({ ...a, cleanSession: n.target.checked })
|
|
3178
1567
|
}
|
|
3179
1568
|
),
|
|
3180
|
-
|
|
1569
|
+
l("protocolConfig.cleanSession", "Clean Session")
|
|
3181
1570
|
] }) })
|
|
3182
1571
|
] }),
|
|
3183
|
-
/* @__PURE__ */ e("h4", { children:
|
|
3184
|
-
/* @__PURE__ */
|
|
3185
|
-
a.topics.map((n,
|
|
1572
|
+
/* @__PURE__ */ e("h4", { children: l("protocolConfig.topics", "Topics") }),
|
|
1573
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__topics", children: [
|
|
1574
|
+
a.topics.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__topic-row", children: [
|
|
3186
1575
|
/* @__PURE__ */ e(
|
|
3187
1576
|
"input",
|
|
3188
1577
|
{
|
|
3189
1578
|
type: "text",
|
|
3190
1579
|
value: n.pattern,
|
|
3191
1580
|
onChange: (t) => {
|
|
3192
|
-
const
|
|
3193
|
-
|
|
1581
|
+
const o = [...a.topics];
|
|
1582
|
+
o[c] = { ...o[c], pattern: t.target.value }, r({ ...a, topics: o });
|
|
3194
1583
|
},
|
|
3195
|
-
placeholder:
|
|
1584
|
+
placeholder: l("protocolConfig.topicPatternPlaceholder", "e.g., sensors/+/data")
|
|
3196
1585
|
}
|
|
3197
1586
|
),
|
|
3198
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ i(
|
|
3199
1588
|
"select",
|
|
3200
1589
|
{
|
|
3201
1590
|
value: n.qos,
|
|
3202
1591
|
onChange: (t) => {
|
|
3203
|
-
const
|
|
3204
|
-
|
|
1592
|
+
const o = [...a.topics];
|
|
1593
|
+
o[c] = { ...o[c], qos: parseInt(t.target.value, 10) }, r({ ...a, topics: o });
|
|
3205
1594
|
},
|
|
3206
1595
|
children: [
|
|
3207
|
-
/* @__PURE__ */ e("option", { value: 0, children:
|
|
3208
|
-
/* @__PURE__ */ e("option", { value: 1, children:
|
|
3209
|
-
/* @__PURE__ */ e("option", { value: 2, children:
|
|
1596
|
+
/* @__PURE__ */ e("option", { value: 0, children: l("protocolConfig.qos0", "QoS 0") }),
|
|
1597
|
+
/* @__PURE__ */ e("option", { value: 1, children: l("protocolConfig.qos1", "QoS 1") }),
|
|
1598
|
+
/* @__PURE__ */ e("option", { value: 2, children: l("protocolConfig.qos2", "QoS 2") })
|
|
3210
1599
|
]
|
|
3211
1600
|
}
|
|
3212
1601
|
),
|
|
3213
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ i(
|
|
3214
1603
|
"select",
|
|
3215
1604
|
{
|
|
3216
1605
|
value: n.direction,
|
|
3217
1606
|
onChange: (t) => {
|
|
3218
|
-
const
|
|
3219
|
-
|
|
3220
|
-
...
|
|
1607
|
+
const o = [...a.topics];
|
|
1608
|
+
o[c] = {
|
|
1609
|
+
...o[c],
|
|
3221
1610
|
direction: t.target.value
|
|
3222
|
-
},
|
|
1611
|
+
}, r({ ...a, topics: o });
|
|
3223
1612
|
},
|
|
3224
1613
|
children: [
|
|
3225
|
-
/* @__PURE__ */ e("option", { value: "subscribe", children:
|
|
3226
|
-
/* @__PURE__ */ e("option", { value: "publish", children:
|
|
3227
|
-
/* @__PURE__ */ e("option", { value: "both", children:
|
|
1614
|
+
/* @__PURE__ */ e("option", { value: "subscribe", children: l("protocolConfig.subscribe", "Subscribe") }),
|
|
1615
|
+
/* @__PURE__ */ e("option", { value: "publish", children: l("protocolConfig.publish", "Publish") }),
|
|
1616
|
+
/* @__PURE__ */ e("option", { value: "both", children: l("protocolConfig.both", "Both") })
|
|
3228
1617
|
]
|
|
3229
1618
|
}
|
|
3230
1619
|
),
|
|
3231
1620
|
/* @__PURE__ */ e(
|
|
3232
1621
|
"button",
|
|
3233
1622
|
{
|
|
1623
|
+
"aria-label": l("protocolConfig.close", "Close"),
|
|
3234
1624
|
onClick: () => {
|
|
3235
|
-
const t = a.topics.filter((
|
|
3236
|
-
|
|
1625
|
+
const t = a.topics.filter((o, s) => s !== c);
|
|
1626
|
+
r({ ...a, topics: t });
|
|
3237
1627
|
},
|
|
3238
|
-
children: "
|
|
1628
|
+
children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
|
|
3239
1629
|
}
|
|
3240
1630
|
)
|
|
3241
|
-
] },
|
|
3242
|
-
/* @__PURE__ */
|
|
1631
|
+
] }, c)),
|
|
1632
|
+
/* @__PURE__ */ i(
|
|
3243
1633
|
"button",
|
|
3244
1634
|
{
|
|
3245
1635
|
onClick: () => {
|
|
3246
|
-
|
|
1636
|
+
r({
|
|
3247
1637
|
...a,
|
|
3248
1638
|
topics: [
|
|
3249
1639
|
...a.topics,
|
|
@@ -3251,73 +1641,77 @@ function Pe({ config: a, onChange: i }) {
|
|
|
3251
1641
|
]
|
|
3252
1642
|
});
|
|
3253
1643
|
},
|
|
3254
|
-
children:
|
|
1644
|
+
children: [
|
|
1645
|
+
/* @__PURE__ */ e(m, { name: "plus", size: 14 }),
|
|
1646
|
+
" ",
|
|
1647
|
+
l("protocolConfig.addTopic", "Add Topic")
|
|
1648
|
+
]
|
|
3255
1649
|
}
|
|
3256
1650
|
)
|
|
3257
1651
|
] })
|
|
3258
1652
|
] });
|
|
3259
1653
|
}
|
|
3260
|
-
function
|
|
3261
|
-
const { t:
|
|
3262
|
-
return /* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */ e("h3", { children:
|
|
3264
|
-
/* @__PURE__ */
|
|
3265
|
-
/* @__PURE__ */
|
|
3266
|
-
/* @__PURE__ */ e("label", { children:
|
|
1654
|
+
function ue({ config: a, onChange: r }) {
|
|
1655
|
+
const { t: l } = b();
|
|
1656
|
+
return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
|
|
1657
|
+
/* @__PURE__ */ e("h3", { children: l("protocolConfig.coapConfiguration", "CoAP Configuration") }),
|
|
1658
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
|
|
1659
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1660
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.host", "Host") }),
|
|
3267
1661
|
/* @__PURE__ */ e(
|
|
3268
1662
|
"input",
|
|
3269
1663
|
{
|
|
3270
1664
|
type: "text",
|
|
3271
1665
|
value: a.host,
|
|
3272
|
-
onChange: (n) =>
|
|
1666
|
+
onChange: (n) => r({ ...a, host: n.target.value })
|
|
3273
1667
|
}
|
|
3274
1668
|
)
|
|
3275
1669
|
] }),
|
|
3276
|
-
/* @__PURE__ */
|
|
3277
|
-
/* @__PURE__ */ e("label", { children:
|
|
1670
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1671
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.port", "Port") }),
|
|
3278
1672
|
/* @__PURE__ */ e(
|
|
3279
1673
|
"input",
|
|
3280
1674
|
{
|
|
3281
1675
|
type: "number",
|
|
3282
1676
|
value: a.port,
|
|
3283
|
-
onChange: (n) =>
|
|
1677
|
+
onChange: (n) => r({ ...a, port: parseInt(n.target.value, 10) || 5683 })
|
|
3284
1678
|
}
|
|
3285
1679
|
)
|
|
3286
1680
|
] }),
|
|
3287
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
|
|
3288
1682
|
/* @__PURE__ */ e(
|
|
3289
1683
|
"input",
|
|
3290
1684
|
{
|
|
3291
1685
|
type: "checkbox",
|
|
3292
1686
|
checked: a.useDTLS,
|
|
3293
|
-
onChange: (n) =>
|
|
1687
|
+
onChange: (n) => r({ ...a, useDTLS: n.target.checked })
|
|
3294
1688
|
}
|
|
3295
1689
|
),
|
|
3296
|
-
|
|
1690
|
+
l("protocolConfig.useDtls", "Use DTLS")
|
|
3297
1691
|
] }) }),
|
|
3298
|
-
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
|
|
3299
1693
|
/* @__PURE__ */ e(
|
|
3300
1694
|
"input",
|
|
3301
1695
|
{
|
|
3302
1696
|
type: "checkbox",
|
|
3303
1697
|
checked: a.observe || !1,
|
|
3304
|
-
onChange: (n) =>
|
|
1698
|
+
onChange: (n) => r({ ...a, observe: n.target.checked })
|
|
3305
1699
|
}
|
|
3306
1700
|
),
|
|
3307
|
-
|
|
1701
|
+
l("protocolConfig.enableObserve", "Enable Observe")
|
|
3308
1702
|
] }) })
|
|
3309
1703
|
] }),
|
|
3310
|
-
/* @__PURE__ */ e("h4", { children:
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
a.resources.map((n,
|
|
1704
|
+
/* @__PURE__ */ e("h4", { children: l("protocolConfig.resources", "Resources") }),
|
|
1705
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__resources", children: [
|
|
1706
|
+
a.resources.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__resource-row", children: [
|
|
3313
1707
|
/* @__PURE__ */ e(
|
|
3314
1708
|
"input",
|
|
3315
1709
|
{
|
|
3316
1710
|
type: "text",
|
|
3317
1711
|
value: n.path,
|
|
3318
1712
|
onChange: (t) => {
|
|
3319
|
-
const
|
|
3320
|
-
|
|
1713
|
+
const o = [...a.resources];
|
|
1714
|
+
o[c] = { ...o[c], path: t.target.value }, r({ ...a, resources: o });
|
|
3321
1715
|
},
|
|
3322
1716
|
placeholder: "/sensors/temperature"
|
|
3323
1717
|
}
|
|
@@ -3325,19 +1719,20 @@ function Re({ config: a, onChange: i }) {
|
|
|
3325
1719
|
/* @__PURE__ */ e(
|
|
3326
1720
|
"button",
|
|
3327
1721
|
{
|
|
1722
|
+
"aria-label": l("protocolConfig.close", "Close"),
|
|
3328
1723
|
onClick: () => {
|
|
3329
|
-
const t = a.resources.filter((
|
|
3330
|
-
|
|
1724
|
+
const t = a.resources.filter((o, s) => s !== c);
|
|
1725
|
+
r({ ...a, resources: t });
|
|
3331
1726
|
},
|
|
3332
|
-
children: "
|
|
1727
|
+
children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
|
|
3333
1728
|
}
|
|
3334
1729
|
)
|
|
3335
|
-
] },
|
|
3336
|
-
/* @__PURE__ */
|
|
1730
|
+
] }, c)),
|
|
1731
|
+
/* @__PURE__ */ i(
|
|
3337
1732
|
"button",
|
|
3338
1733
|
{
|
|
3339
1734
|
onClick: () => {
|
|
3340
|
-
|
|
1735
|
+
r({
|
|
3341
1736
|
...a,
|
|
3342
1737
|
resources: [
|
|
3343
1738
|
...a.resources,
|
|
@@ -3345,69 +1740,72 @@ function Re({ config: a, onChange: i }) {
|
|
|
3345
1740
|
]
|
|
3346
1741
|
});
|
|
3347
1742
|
},
|
|
3348
|
-
children:
|
|
1743
|
+
children: [
|
|
1744
|
+
/* @__PURE__ */ e(m, { name: "plus", size: 14 }),
|
|
1745
|
+
" ",
|
|
1746
|
+
l("protocolConfig.addResource", "Add Resource")
|
|
1747
|
+
]
|
|
3349
1748
|
}
|
|
3350
1749
|
)
|
|
3351
1750
|
] })
|
|
3352
1751
|
] });
|
|
3353
1752
|
}
|
|
3354
|
-
function
|
|
1753
|
+
function Me({
|
|
3355
1754
|
config: a,
|
|
3356
|
-
type:
|
|
3357
|
-
onChange:
|
|
1755
|
+
type: r,
|
|
1756
|
+
onChange: l
|
|
3358
1757
|
}) {
|
|
3359
|
-
const { t: n } =
|
|
3360
|
-
return /* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
"
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
/* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
|
|
1758
|
+
const { t: n } = b();
|
|
1759
|
+
return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
|
|
1760
|
+
/* @__PURE__ */ e("h3", { children: n("protocolConfig.modbusConfiguration", "Modbus {type} Configuration").replace(
|
|
1761
|
+
"{type}",
|
|
1762
|
+
String(r.toUpperCase())
|
|
1763
|
+
) }),
|
|
1764
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
|
|
1765
|
+
r === "tcp" && /* @__PURE__ */ i(A, { children: [
|
|
1766
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3369
1767
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.host", "Host") }),
|
|
3370
1768
|
/* @__PURE__ */ e(
|
|
3371
1769
|
"input",
|
|
3372
1770
|
{
|
|
3373
1771
|
type: "text",
|
|
3374
1772
|
value: a.host || "",
|
|
3375
|
-
onChange: (
|
|
1773
|
+
onChange: (c) => l({ ...a, host: c.target.value })
|
|
3376
1774
|
}
|
|
3377
1775
|
)
|
|
3378
1776
|
] }),
|
|
3379
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3380
1778
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.port", "Port") }),
|
|
3381
1779
|
/* @__PURE__ */ e(
|
|
3382
1780
|
"input",
|
|
3383
1781
|
{
|
|
3384
1782
|
type: "number",
|
|
3385
1783
|
value: a.port || 502,
|
|
3386
|
-
onChange: (
|
|
1784
|
+
onChange: (c) => l({ ...a, port: parseInt(c.target.value, 10) || 502 })
|
|
3387
1785
|
}
|
|
3388
1786
|
)
|
|
3389
1787
|
] })
|
|
3390
1788
|
] }),
|
|
3391
|
-
|
|
3392
|
-
/* @__PURE__ */
|
|
1789
|
+
r === "rtu" && /* @__PURE__ */ i(A, { children: [
|
|
1790
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3393
1791
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.serialPort", "Serial Port") }),
|
|
3394
1792
|
/* @__PURE__ */ e(
|
|
3395
1793
|
"input",
|
|
3396
1794
|
{
|
|
3397
1795
|
type: "text",
|
|
3398
1796
|
value: a.serialPort || "",
|
|
3399
|
-
onChange: (
|
|
1797
|
+
onChange: (c) => l({ ...a, serialPort: c.target.value }),
|
|
3400
1798
|
placeholder: n("protocolConfig.serialPortPlaceholder", "COM1 or /dev/ttyUSB0")
|
|
3401
1799
|
}
|
|
3402
1800
|
)
|
|
3403
1801
|
] }),
|
|
3404
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3405
1803
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.baudRate", "Baud Rate") }),
|
|
3406
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ i(
|
|
3407
1805
|
"select",
|
|
3408
1806
|
{
|
|
3409
1807
|
value: a.baudRate || 9600,
|
|
3410
|
-
onChange: (
|
|
1808
|
+
onChange: (c) => l({ ...a, baudRate: parseInt(c.target.value, 10) }),
|
|
3411
1809
|
children: [
|
|
3412
1810
|
/* @__PURE__ */ e("option", { value: 9600, children: "9600" }),
|
|
3413
1811
|
/* @__PURE__ */ e("option", { value: 19200, children: "19200" }),
|
|
@@ -3418,66 +1816,66 @@ function Ie({
|
|
|
3418
1816
|
}
|
|
3419
1817
|
)
|
|
3420
1818
|
] }),
|
|
3421
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3422
1820
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.parity", "Parity") }),
|
|
3423
|
-
/* @__PURE__ */
|
|
1821
|
+
/* @__PURE__ */ i(
|
|
3424
1822
|
"select",
|
|
3425
1823
|
{
|
|
3426
1824
|
value: a.parity || "none",
|
|
3427
|
-
onChange: (
|
|
1825
|
+
onChange: (c) => l({ ...a, parity: c.target.value }),
|
|
3428
1826
|
children: [
|
|
3429
1827
|
/* @__PURE__ */ e("option", { value: "none", children: n("protocolConfig.none", "None") }),
|
|
3430
1828
|
/* @__PURE__ */ e("option", { value: "even", children: n("protocolConfig.even", "Even") }),
|
|
3431
|
-
/* @__PURE__ */ e("option", { value: "odd", children: "Odd" })
|
|
1829
|
+
/* @__PURE__ */ e("option", { value: "odd", children: n("protocolConfig.odd", "Odd") })
|
|
3432
1830
|
]
|
|
3433
1831
|
}
|
|
3434
1832
|
)
|
|
3435
1833
|
] })
|
|
3436
1834
|
] }),
|
|
3437
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
3438
1836
|
/* @__PURE__ */ e("label", { children: n("protocolConfig.slaveId", "Slave ID") }),
|
|
3439
1837
|
/* @__PURE__ */ e(
|
|
3440
1838
|
"input",
|
|
3441
1839
|
{
|
|
3442
1840
|
type: "number",
|
|
3443
1841
|
value: a.slaveId,
|
|
3444
|
-
onChange: (
|
|
1842
|
+
onChange: (c) => l({ ...a, slaveId: parseInt(c.target.value, 10) || 1 }),
|
|
3445
1843
|
min: 1,
|
|
3446
1844
|
max: 247
|
|
3447
1845
|
}
|
|
3448
1846
|
)
|
|
3449
1847
|
] }),
|
|
3450
|
-
/* @__PURE__ */
|
|
3451
|
-
/* @__PURE__ */ e("label", { children: "Timeout (ms)" }),
|
|
1848
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
1849
|
+
/* @__PURE__ */ e("label", { children: n("protocolConfig.timeoutMs", "Timeout (ms)") }),
|
|
3452
1850
|
/* @__PURE__ */ e(
|
|
3453
1851
|
"input",
|
|
3454
1852
|
{
|
|
3455
1853
|
type: "number",
|
|
3456
1854
|
value: a.timeout,
|
|
3457
|
-
onChange: (
|
|
1855
|
+
onChange: (c) => l({ ...a, timeout: parseInt(c.target.value, 10) || 1e3 })
|
|
3458
1856
|
}
|
|
3459
1857
|
)
|
|
3460
1858
|
] })
|
|
3461
1859
|
] }),
|
|
3462
1860
|
/* @__PURE__ */ e("h4", { children: n("protocolConfig.registers", "Registers") }),
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ i("table", { className: "nice-protocol-config__registers-table", children: [
|
|
1862
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
3465
1863
|
/* @__PURE__ */ e("th", { children: n("protocolConfig.name", "Name") }),
|
|
3466
1864
|
/* @__PURE__ */ e("th", { children: n("protocolConfig.address", "Address") }),
|
|
3467
1865
|
/* @__PURE__ */ e("th", { children: n("protocolConfig.type", "Type") }),
|
|
3468
1866
|
/* @__PURE__ */ e("th", { children: n("protocolConfig.dataType", "Data Type") }),
|
|
3469
|
-
/* @__PURE__ */ e("th", { children: "R/W" }),
|
|
1867
|
+
/* @__PURE__ */ e("th", { children: n("protocolConfig.readWrite", "R/W") }),
|
|
3470
1868
|
/* @__PURE__ */ e("th", {})
|
|
3471
1869
|
] }) }),
|
|
3472
|
-
/* @__PURE__ */ e("tbody", { children: a.registers.map((
|
|
1870
|
+
/* @__PURE__ */ e("tbody", { children: a.registers.map((c, t) => /* @__PURE__ */ i("tr", { children: [
|
|
3473
1871
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
3474
1872
|
"input",
|
|
3475
1873
|
{
|
|
3476
1874
|
type: "text",
|
|
3477
|
-
value:
|
|
3478
|
-
onChange: (
|
|
3479
|
-
const
|
|
3480
|
-
|
|
1875
|
+
value: c.name,
|
|
1876
|
+
onChange: (o) => {
|
|
1877
|
+
const s = [...a.registers];
|
|
1878
|
+
s[t] = { ...s[t], name: o.target.value }, l({ ...a, registers: s });
|
|
3481
1879
|
}
|
|
3482
1880
|
}
|
|
3483
1881
|
) }),
|
|
@@ -3485,26 +1883,26 @@ function Ie({
|
|
|
3485
1883
|
"input",
|
|
3486
1884
|
{
|
|
3487
1885
|
type: "number",
|
|
3488
|
-
value:
|
|
3489
|
-
onChange: (
|
|
3490
|
-
const
|
|
3491
|
-
|
|
3492
|
-
...
|
|
3493
|
-
address: parseInt(
|
|
3494
|
-
},
|
|
1886
|
+
value: c.address,
|
|
1887
|
+
onChange: (o) => {
|
|
1888
|
+
const s = [...a.registers];
|
|
1889
|
+
s[t] = {
|
|
1890
|
+
...s[t],
|
|
1891
|
+
address: parseInt(o.target.value, 10) || 0
|
|
1892
|
+
}, l({ ...a, registers: s });
|
|
3495
1893
|
}
|
|
3496
1894
|
}
|
|
3497
1895
|
) }),
|
|
3498
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */
|
|
1896
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ i(
|
|
3499
1897
|
"select",
|
|
3500
1898
|
{
|
|
3501
|
-
value:
|
|
3502
|
-
onChange: (
|
|
3503
|
-
const
|
|
3504
|
-
|
|
3505
|
-
...
|
|
3506
|
-
type:
|
|
3507
|
-
},
|
|
1899
|
+
value: c.type,
|
|
1900
|
+
onChange: (o) => {
|
|
1901
|
+
const s = [...a.registers];
|
|
1902
|
+
s[t] = {
|
|
1903
|
+
...s[t],
|
|
1904
|
+
type: o.target.value
|
|
1905
|
+
}, l({ ...a, registers: s });
|
|
3508
1906
|
},
|
|
3509
1907
|
children: [
|
|
3510
1908
|
/* @__PURE__ */ e("option", { value: "coil", children: n("protocolConfig.coil", "Coil") }),
|
|
@@ -3514,16 +1912,16 @@ function Ie({
|
|
|
3514
1912
|
]
|
|
3515
1913
|
}
|
|
3516
1914
|
) }),
|
|
3517
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ i(
|
|
3518
1916
|
"select",
|
|
3519
1917
|
{
|
|
3520
|
-
value:
|
|
3521
|
-
onChange: (
|
|
3522
|
-
const
|
|
3523
|
-
|
|
3524
|
-
...
|
|
3525
|
-
dataType:
|
|
3526
|
-
},
|
|
1918
|
+
value: c.dataType,
|
|
1919
|
+
onChange: (o) => {
|
|
1920
|
+
const s = [...a.registers];
|
|
1921
|
+
s[t] = {
|
|
1922
|
+
...s[t],
|
|
1923
|
+
dataType: o.target.value
|
|
1924
|
+
}, l({ ...a, registers: s });
|
|
3527
1925
|
},
|
|
3528
1926
|
children: [
|
|
3529
1927
|
/* @__PURE__ */ e("option", { value: "bool", children: n("protocolConfig.bool", "Bool") }),
|
|
@@ -3535,15 +1933,15 @@ function Ie({
|
|
|
3535
1933
|
]
|
|
3536
1934
|
}
|
|
3537
1935
|
) }),
|
|
3538
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ i("td", { children: [
|
|
3539
1937
|
/* @__PURE__ */ e(
|
|
3540
1938
|
"input",
|
|
3541
1939
|
{
|
|
3542
1940
|
type: "checkbox",
|
|
3543
|
-
checked:
|
|
3544
|
-
onChange: (
|
|
3545
|
-
const
|
|
3546
|
-
|
|
1941
|
+
checked: c.readable,
|
|
1942
|
+
onChange: (o) => {
|
|
1943
|
+
const s = [...a.registers];
|
|
1944
|
+
s[t] = { ...s[t], readable: o.target.checked }, l({ ...a, registers: s });
|
|
3547
1945
|
},
|
|
3548
1946
|
title: n("protocolConfig.readable", "Readable")
|
|
3549
1947
|
}
|
|
@@ -3552,10 +1950,10 @@ function Ie({
|
|
|
3552
1950
|
"input",
|
|
3553
1951
|
{
|
|
3554
1952
|
type: "checkbox",
|
|
3555
|
-
checked:
|
|
3556
|
-
onChange: (
|
|
3557
|
-
const
|
|
3558
|
-
|
|
1953
|
+
checked: c.writable,
|
|
1954
|
+
onChange: (o) => {
|
|
1955
|
+
const s = [...a.registers];
|
|
1956
|
+
s[t] = { ...s[t], writable: o.target.checked }, l({ ...a, registers: s });
|
|
3559
1957
|
},
|
|
3560
1958
|
title: n("protocolConfig.writable", "Writable")
|
|
3561
1959
|
}
|
|
@@ -3564,20 +1962,21 @@ function Ie({
|
|
|
3564
1962
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
3565
1963
|
"button",
|
|
3566
1964
|
{
|
|
1965
|
+
"aria-label": n("protocolConfig.close", "Close"),
|
|
3567
1966
|
onClick: () => {
|
|
3568
|
-
const
|
|
3569
|
-
|
|
1967
|
+
const o = a.registers.filter((s, h) => h !== t);
|
|
1968
|
+
l({ ...a, registers: o });
|
|
3570
1969
|
},
|
|
3571
|
-
children: "
|
|
1970
|
+
children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
|
|
3572
1971
|
}
|
|
3573
1972
|
) })
|
|
3574
1973
|
] }, t)) })
|
|
3575
1974
|
] }),
|
|
3576
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ i(
|
|
3577
1976
|
"button",
|
|
3578
1977
|
{
|
|
3579
1978
|
onClick: () => {
|
|
3580
|
-
|
|
1979
|
+
l({
|
|
3581
1980
|
...a,
|
|
3582
1981
|
registers: [
|
|
3583
1982
|
...a.registers,
|
|
@@ -3592,113 +1991,117 @@ function Ie({
|
|
|
3592
1991
|
]
|
|
3593
1992
|
});
|
|
3594
1993
|
},
|
|
3595
|
-
children:
|
|
1994
|
+
children: [
|
|
1995
|
+
/* @__PURE__ */ e(m, { name: "plus", size: 14 }),
|
|
1996
|
+
" ",
|
|
1997
|
+
n("protocolConfig.addRegister", "Add Register")
|
|
1998
|
+
]
|
|
3596
1999
|
}
|
|
3597
2000
|
)
|
|
3598
2001
|
] });
|
|
3599
2002
|
}
|
|
3600
|
-
function
|
|
3601
|
-
const { t:
|
|
3602
|
-
return /* @__PURE__ */
|
|
3603
|
-
/* @__PURE__ */ e("h3", { children:
|
|
3604
|
-
/* @__PURE__ */
|
|
3605
|
-
/* @__PURE__ */
|
|
3606
|
-
/* @__PURE__ */ e("label", { children:
|
|
2003
|
+
function ge({ config: a, onChange: r }) {
|
|
2004
|
+
const { t: l } = b();
|
|
2005
|
+
return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
|
|
2006
|
+
/* @__PURE__ */ e("h3", { children: l("protocolConfig.opcUaConfiguration", "OPC-UA Configuration") }),
|
|
2007
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
|
|
2008
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
|
|
2009
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.endpointUrl", "Endpoint URL") }),
|
|
3607
2010
|
/* @__PURE__ */ e(
|
|
3608
2011
|
"input",
|
|
3609
2012
|
{
|
|
3610
2013
|
type: "text",
|
|
3611
2014
|
value: a.endpointUrl,
|
|
3612
|
-
onChange: (n) =>
|
|
3613
|
-
placeholder:
|
|
2015
|
+
onChange: (n) => r({ ...a, endpointUrl: n.target.value }),
|
|
2016
|
+
placeholder: l("protocolConfig.endpointUrlPlaceholder", "opc.tcp://localhost:4840")
|
|
3614
2017
|
}
|
|
3615
2018
|
)
|
|
3616
2019
|
] }),
|
|
3617
|
-
/* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */ e("label", { children:
|
|
3619
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
2021
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.securityMode", "Security Mode") }),
|
|
2022
|
+
/* @__PURE__ */ i(
|
|
3620
2023
|
"select",
|
|
3621
2024
|
{
|
|
3622
2025
|
value: a.securityMode,
|
|
3623
|
-
onChange: (n) =>
|
|
2026
|
+
onChange: (n) => r({
|
|
3624
2027
|
...a,
|
|
3625
2028
|
securityMode: n.target.value
|
|
3626
2029
|
}),
|
|
3627
2030
|
children: [
|
|
3628
|
-
/* @__PURE__ */ e("option", { value: "None", children:
|
|
3629
|
-
/* @__PURE__ */ e("option", { value: "Sign", children:
|
|
3630
|
-
/* @__PURE__ */ e("option", { value: "SignAndEncrypt", children:
|
|
2031
|
+
/* @__PURE__ */ e("option", { value: "None", children: l("protocolConfig.securityNone", "None") }),
|
|
2032
|
+
/* @__PURE__ */ e("option", { value: "Sign", children: l("protocolConfig.sign", "Sign") }),
|
|
2033
|
+
/* @__PURE__ */ e("option", { value: "SignAndEncrypt", children: l("protocolConfig.signAndEncrypt", "Sign and Encrypt") })
|
|
3631
2034
|
]
|
|
3632
2035
|
}
|
|
3633
2036
|
)
|
|
3634
2037
|
] }),
|
|
3635
|
-
/* @__PURE__ */
|
|
3636
|
-
/* @__PURE__ */ e("label", { children:
|
|
3637
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
2039
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.authentication", "Authentication") }),
|
|
2040
|
+
/* @__PURE__ */ i(
|
|
3638
2041
|
"select",
|
|
3639
2042
|
{
|
|
3640
2043
|
value: a.authentication,
|
|
3641
|
-
onChange: (n) =>
|
|
2044
|
+
onChange: (n) => r({
|
|
3642
2045
|
...a,
|
|
3643
2046
|
authentication: n.target.value
|
|
3644
2047
|
}),
|
|
3645
2048
|
children: [
|
|
3646
|
-
/* @__PURE__ */ e("option", { value: "anonymous", children:
|
|
3647
|
-
/* @__PURE__ */ e("option", { value: "username", children: "Username/Password" }),
|
|
3648
|
-
/* @__PURE__ */ e("option", { value: "certificate", children:
|
|
2049
|
+
/* @__PURE__ */ e("option", { value: "anonymous", children: l("protocolConfig.anonymous", "Anonymous") }),
|
|
2050
|
+
/* @__PURE__ */ e("option", { value: "username", children: l("protocolConfig.usernamePassword", "Username/Password") }),
|
|
2051
|
+
/* @__PURE__ */ e("option", { value: "certificate", children: l("protocolConfig.certificate", "Certificate") })
|
|
3649
2052
|
]
|
|
3650
2053
|
}
|
|
3651
2054
|
)
|
|
3652
2055
|
] }),
|
|
3653
|
-
a.authentication === "username" && /* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */ e("label", { children:
|
|
2056
|
+
a.authentication === "username" && /* @__PURE__ */ i(A, { children: [
|
|
2057
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
2058
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.username", "Username") }),
|
|
3656
2059
|
/* @__PURE__ */ e(
|
|
3657
2060
|
"input",
|
|
3658
2061
|
{
|
|
3659
2062
|
type: "text",
|
|
3660
2063
|
value: a.username || "",
|
|
3661
|
-
onChange: (n) =>
|
|
2064
|
+
onChange: (n) => r({ ...a, username: n.target.value })
|
|
3662
2065
|
}
|
|
3663
2066
|
)
|
|
3664
2067
|
] }),
|
|
3665
|
-
/* @__PURE__ */
|
|
3666
|
-
/* @__PURE__ */ e("label", { children:
|
|
2068
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
|
|
2069
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.password", "Password") }),
|
|
3667
2070
|
/* @__PURE__ */ e(
|
|
3668
2071
|
"input",
|
|
3669
2072
|
{
|
|
3670
2073
|
type: "password",
|
|
3671
2074
|
value: a.password || "",
|
|
3672
|
-
onChange: (n) =>
|
|
2075
|
+
onChange: (n) => r({ ...a, password: n.target.value })
|
|
3673
2076
|
}
|
|
3674
2077
|
)
|
|
3675
2078
|
] })
|
|
3676
2079
|
] }),
|
|
3677
|
-
/* @__PURE__ */
|
|
3678
|
-
/* @__PURE__ */ e("label", { children:
|
|
2080
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
|
|
2081
|
+
/* @__PURE__ */ e("label", { children: l("protocolConfig.applicationName", "Application Name") }),
|
|
3679
2082
|
/* @__PURE__ */ e(
|
|
3680
2083
|
"input",
|
|
3681
2084
|
{
|
|
3682
2085
|
type: "text",
|
|
3683
2086
|
value: a.applicationName,
|
|
3684
|
-
onChange: (n) =>
|
|
2087
|
+
onChange: (n) => r({ ...a, applicationName: n.target.value })
|
|
3685
2088
|
}
|
|
3686
2089
|
)
|
|
3687
2090
|
] })
|
|
3688
2091
|
] }),
|
|
3689
|
-
/* @__PURE__ */ e("h4", { children:
|
|
3690
|
-
/* @__PURE__ */
|
|
3691
|
-
a.nodes.map((n,
|
|
2092
|
+
/* @__PURE__ */ e("h4", { children: l("protocolConfig.nodes", "Nodes") }),
|
|
2093
|
+
/* @__PURE__ */ i("div", { className: "nice-protocol-config__nodes", children: [
|
|
2094
|
+
a.nodes.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__node-row", children: [
|
|
3692
2095
|
/* @__PURE__ */ e(
|
|
3693
2096
|
"input",
|
|
3694
2097
|
{
|
|
3695
2098
|
type: "text",
|
|
3696
2099
|
value: n.nodeId,
|
|
3697
2100
|
onChange: (t) => {
|
|
3698
|
-
const
|
|
3699
|
-
|
|
2101
|
+
const o = [...a.nodes];
|
|
2102
|
+
o[c] = { ...o[c], nodeId: t.target.value }, r({ ...a, nodes: o });
|
|
3700
2103
|
},
|
|
3701
|
-
placeholder:
|
|
2104
|
+
placeholder: l("protocolConfig.nodeIdPlaceholder", "ns=2;s=Temperature")
|
|
3702
2105
|
}
|
|
3703
2106
|
),
|
|
3704
2107
|
/* @__PURE__ */ e(
|
|
@@ -3707,28 +2110,29 @@ function Ee({ config: a, onChange: i }) {
|
|
|
3707
2110
|
type: "text",
|
|
3708
2111
|
value: n.displayName,
|
|
3709
2112
|
onChange: (t) => {
|
|
3710
|
-
const
|
|
3711
|
-
|
|
2113
|
+
const o = [...a.nodes];
|
|
2114
|
+
o[c] = { ...o[c], displayName: t.target.value }, r({ ...a, nodes: o });
|
|
3712
2115
|
},
|
|
3713
|
-
placeholder:
|
|
2116
|
+
placeholder: l("protocolConfig.displayNamePlaceholder", "Display Name")
|
|
3714
2117
|
}
|
|
3715
2118
|
),
|
|
3716
2119
|
/* @__PURE__ */ e(
|
|
3717
2120
|
"button",
|
|
3718
2121
|
{
|
|
2122
|
+
"aria-label": l("protocolConfig.close", "Close"),
|
|
3719
2123
|
onClick: () => {
|
|
3720
|
-
const t = a.nodes.filter((
|
|
3721
|
-
|
|
2124
|
+
const t = a.nodes.filter((o, s) => s !== c);
|
|
2125
|
+
r({ ...a, nodes: t });
|
|
3722
2126
|
},
|
|
3723
|
-
children: "
|
|
2127
|
+
children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
|
|
3724
2128
|
}
|
|
3725
2129
|
)
|
|
3726
|
-
] },
|
|
3727
|
-
/* @__PURE__ */
|
|
2130
|
+
] }, c)),
|
|
2131
|
+
/* @__PURE__ */ i(
|
|
3728
2132
|
"button",
|
|
3729
2133
|
{
|
|
3730
2134
|
onClick: () => {
|
|
3731
|
-
|
|
2135
|
+
r({
|
|
3732
2136
|
...a,
|
|
3733
2137
|
nodes: [
|
|
3734
2138
|
...a.nodes,
|
|
@@ -3736,14 +2140,18 @@ function Ee({ config: a, onChange: i }) {
|
|
|
3736
2140
|
]
|
|
3737
2141
|
});
|
|
3738
2142
|
},
|
|
3739
|
-
children:
|
|
2143
|
+
children: [
|
|
2144
|
+
/* @__PURE__ */ e(m, { name: "plus", size: 14 }),
|
|
2145
|
+
" ",
|
|
2146
|
+
l("protocolConfig.addNode", "Add Node")
|
|
2147
|
+
]
|
|
3740
2148
|
}
|
|
3741
2149
|
)
|
|
3742
2150
|
] })
|
|
3743
2151
|
] });
|
|
3744
2152
|
}
|
|
3745
2153
|
export {
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
2154
|
+
fe as NiceEdgeManager,
|
|
2155
|
+
Ne as NiceIoTDashboard,
|
|
2156
|
+
ye as NiceProtocolConfig
|
|
3749
2157
|
};
|