@nice2dev/ui-iot 1.2.0 → 1.2.2

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