@nice2dev/ui-erp 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +434 -401
  2. package/dist/index.mjs +434 -401
  3. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ function v() {
5
5
  const e = useContext(c), t = useContext(i);
6
6
  return { t: e, lang: t };
7
7
  }
8
- const gt = /* @__PURE__ */ new Set([
8
+ const Mt = /* @__PURE__ */ new Set([
9
9
  "",
10
10
  "text",
11
11
  "search",
@@ -13,7 +13,7 @@ const gt = /* @__PURE__ */ new Set([
13
13
  "url",
14
14
  "tel",
15
15
  "password"
16
- ]), Pe = /* @__PURE__ */ new Set([
16
+ ]), Te = /* @__PURE__ */ new Set([
17
17
  "number",
18
18
  "range",
19
19
  "date",
@@ -21,7 +21,7 @@ const gt = /* @__PURE__ */ new Set([
21
21
  "datetime-local",
22
22
  "month",
23
23
  "week"
24
- ]), Ut = /* @__PURE__ */ new Set([
24
+ ]), jt = /* @__PURE__ */ new Set([
25
25
  "checkbox",
26
26
  "radio",
27
27
  "button",
@@ -30,7 +30,7 @@ const gt = /* @__PURE__ */ new Set([
30
30
  "file",
31
31
  "image",
32
32
  "color"
33
- ]), Gt = /* @__PURE__ */ new Set([
33
+ ]), Ut = /* @__PURE__ */ new Set([
34
34
  "button",
35
35
  "link",
36
36
  "checkbox",
@@ -42,22 +42,22 @@ const gt = /* @__PURE__ */ new Set([
42
42
  "menuitemradio",
43
43
  "option",
44
44
  "treeitem"
45
- ]), bt = (n) => n instanceof HTMLInputElement && gt.has(n.type), De = (n) => n instanceof HTMLTextAreaElement, yt = (n) => n instanceof HTMLElement && n.isContentEditable;
46
- function qt(n, e) {
45
+ ]), gt = (n) => n instanceof HTMLInputElement && Mt.has(n.type), Pe = (n) => n instanceof HTMLTextAreaElement, bt = (n) => n instanceof HTMLElement && n.isContentEditable;
46
+ function Gt(n, e) {
47
47
  const { intent: t, direction: a2 } = e;
48
- return bt(n) ? t === "navigate" ? a2 === "left" || a2 === "right" : t === "first" || t === "last" || t === "activate" || t === "toggleHints" : De(n) || yt(n) ? t !== "back" && t !== "view" && t !== "menu" && t !== "secondary" : n instanceof HTMLSelectElement ? t !== "back" && t !== "view" && t !== "menu" : n instanceof HTMLInputElement ? Pe.has(n.type) ? t === "navigate" || t === "first" || t === "last" || t === "pagePrev" || t === "pageNext" : n.type === "radio" && t === "navigate" : false;
48
+ return gt(n) ? t === "navigate" ? a2 === "left" || a2 === "right" : t === "first" || t === "last" || t === "activate" || t === "toggleHints" : Pe(n) || bt(n) ? t !== "back" && t !== "view" && t !== "menu" && t !== "secondary" : n instanceof HTMLSelectElement ? t !== "back" && t !== "view" && t !== "menu" : n instanceof HTMLInputElement ? Te.has(n.type) ? t === "navigate" || t === "first" || t === "last" || t === "pagePrev" || t === "pageNext" : n.type === "radio" && t === "navigate" : false;
49
49
  }
50
- function wt(n) {
50
+ function yt(n) {
51
51
  if (n instanceof HTMLButtonElement || n.tagName === "SUMMARY")
52
52
  return true;
53
53
  if (n instanceof HTMLAnchorElement)
54
54
  return n.hasAttribute("href");
55
55
  if (n instanceof HTMLInputElement)
56
- return Ut.has(n.type);
56
+ return jt.has(n.type);
57
57
  const e = n.getAttribute("role");
58
- return e !== null && Gt.has(e);
58
+ return e !== null && Ut.has(e);
59
59
  }
60
- function $t(n) {
60
+ function qt(n) {
61
61
  if (typeof n.click == "function") {
62
62
  n.click();
63
63
  return;
@@ -71,7 +71,7 @@ function $t(n) {
71
71
  })
72
72
  );
73
73
  }
74
- function Et(n) {
74
+ function wt(n) {
75
75
  if (n.defaultPrevented || n.repeat || n.target !== n.currentTarget || n.key !== "Enter" && n.key !== " " && n.key !== "Spacebar")
76
76
  return;
77
77
  const e = n.currentTarget;
@@ -91,34 +91,34 @@ function Et(n) {
91
91
  })
92
92
  );
93
93
  }
94
- function me(n) {
94
+ function ve(n) {
95
95
  const e = n.getAttribute("data-nice-engage");
96
96
  if (e === "value" || e === "text" || e === "popup" || e === "canvas")
97
97
  return e;
98
98
  if (e === "none")
99
99
  return null;
100
100
  const t = n.getAttribute("role");
101
- return t === "combobox" ? "popup" : t === "slider" || t === "spinbutton" || n instanceof HTMLSelectElement ? "value" : n instanceof HTMLInputElement ? gt.has(n.type) ? n.readOnly ? null : "text" : Pe.has(n.type) && !n.readOnly ? "value" : null : De(n) ? n.readOnly ? null : "text" : yt(n) ? "text" : null;
101
+ return t === "combobox" ? "popup" : t === "slider" || t === "spinbutton" || n instanceof HTMLSelectElement ? "value" : n instanceof HTMLInputElement ? Mt.has(n.type) ? n.readOnly ? null : "text" : Te.has(n.type) && !n.readOnly ? "value" : null : Pe(n) ? n.readOnly ? null : "text" : bt(n) ? "text" : null;
102
102
  }
103
- function kt(n, e) {
103
+ function Et(n, e) {
104
104
  return e === "popup" ? n.getAttribute("aria-expanded") === "true" : n.hasAttribute("data-nice-engaged");
105
105
  }
106
- function ce(n) {
107
- return n instanceof HTMLSelectElement || n instanceof HTMLInputElement && Pe.has(n.type);
106
+ function ie(n) {
107
+ return n instanceof HTMLSelectElement || n instanceof HTMLInputElement && Te.has(n.type);
108
108
  }
109
- function Me(n) {
109
+ function me(n) {
110
110
  n.dispatchEvent(new Event("input", { bubbles: true })), n.dispatchEvent(new Event("change", { bubbles: true }));
111
111
  }
112
- function Ie(n, e) {
112
+ function De(n, e) {
113
113
  var r;
114
114
  const t = Object.getPrototypeOf(n), a2 = (r = Object.getOwnPropertyDescriptor(t, "value")) == null ? void 0 : r.set;
115
115
  a2 ? a2.call(n, e) : n.value = e;
116
116
  }
117
- const be = (n) => n instanceof HTMLInputElement && n.type === "number";
118
- function Wt(n, e) {
119
- n.value !== e && (Ie(n, e), Me(n));
117
+ const ge = (n) => n instanceof HTMLInputElement && n.type === "number";
118
+ function Yt(n, e) {
119
+ n.value !== e && (De(n, e), me(n));
120
120
  }
121
- function le(n, e, t = "step") {
121
+ function ce(n, e, t = "step") {
122
122
  const a2 = e === "up" || e === "right";
123
123
  if (n instanceof HTMLSelectElement) {
124
124
  const s = n.selectedIndex, o = n.options.length - 1;
@@ -128,12 +128,12 @@ function le(n, e, t = "step") {
128
128
  const i2 = t === "big" ? 10 : 1;
129
129
  n.selectedIndex = Math.max(0, Math.min(o, s + (a2 ? i2 : -i2)));
130
130
  }
131
- return n.selectedIndex !== s ? (Me(n), true) : false;
131
+ return n.selectedIndex !== s ? (me(n), true) : false;
132
132
  }
133
133
  const r = n.value;
134
134
  try {
135
135
  if (t === "edge" && (n.min !== "" || n.max !== ""))
136
- Ie(n, a2 ? n.max || n.value : n.min || n.value);
136
+ De(n, a2 ? n.max || n.value : n.min || n.value);
137
137
  else {
138
138
  const s = t === "big" ? 10 : 1;
139
139
  a2 ? n.stepUp(s) : n.stepDown(s);
@@ -141,15 +141,15 @@ function le(n, e, t = "step") {
141
141
  } catch {
142
142
  return false;
143
143
  }
144
- return n.value !== r ? (Me(n), true) : false;
144
+ return n.value !== r ? (me(n), true) : false;
145
145
  }
146
- function Xt(n, e) {
147
- if (!(bt(n) || De(n)) || n.selectionStart === null || e !== "left" && e !== "right")
146
+ function Wt(n, e) {
147
+ if (!(gt(n) || Pe(n)) || n.selectionStart === null || e !== "left" && e !== "right")
148
148
  return false;
149
149
  const t = n.selectionStart + (e === "right" ? 1 : -1), a2 = Math.max(0, Math.min(n.value.length, t));
150
150
  return n.setSelectionRange(a2, a2), true;
151
151
  }
152
- const xt = {
152
+ const kt = {
153
153
  // Navigation
154
154
  "chevron-down": "M6 9l6 6 6-6",
155
155
  "chevron-up": "M18 15l-6-6-6 6",
@@ -415,14 +415,14 @@ const xt = {
415
415
  "key-backspace": "M21 5H9l-6 7 6 7h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z M17 9l-6 6 M11 9l6 6",
416
416
  "key-space": "M4 10v4h16v-4",
417
417
  "key-caps": "M12 4l-7 7h4v5h6v-5h4z M8 20h8"
418
- }, Jt = {
418
+ }, Xt = {
419
419
  xs: 12,
420
420
  sm: 16,
421
421
  md: 20,
422
422
  lg: 24,
423
423
  xl: 32
424
- }, Oe = /* @__PURE__ */ createContext({});
425
- function Zt({
424
+ }, Ie = /* @__PURE__ */ createContext({});
425
+ function Jt({
426
426
  path: n,
427
427
  size: e,
428
428
  className: t,
@@ -447,7 +447,7 @@ function Zt({
447
447
  style: a2,
448
448
  role: o ? "button" : s ? "img" : "presentation",
449
449
  tabIndex: o ? 0 : void 0,
450
- onKeyDown: o ? Et : void 0,
450
+ onKeyDown: o ? wt : void 0,
451
451
  "aria-label": s,
452
452
  "aria-hidden": o ? void 0 : !s,
453
453
  onClick: o,
@@ -458,7 +458,7 @@ function Zt({
458
458
  }
459
459
  );
460
460
  }
461
- const te = ({
461
+ const ee = ({
462
462
  name: n,
463
463
  size: e = "md",
464
464
  className: t,
@@ -467,7 +467,7 @@ const te = ({
467
467
  title: s,
468
468
  onClick: o
469
469
  }) => {
470
- const { resolver: i2 } = useContext(Oe), c2 = typeof e == "number" ? e : Jt[e];
470
+ const { resolver: i2 } = useContext(Ie), c2 = typeof e == "number" ? e : Xt[e];
471
471
  if (i2) {
472
472
  const u = i2(n, c2);
473
473
  if (u)
@@ -476,7 +476,7 @@ const te = ({
476
476
  {
477
477
  role: o ? "button" : void 0,
478
478
  tabIndex: o ? 0 : void 0,
479
- onKeyDown: o ? Et : void 0,
479
+ onKeyDown: o ? wt : void 0,
480
480
  className: `nice-icon-wrap ${t || ""}`,
481
481
  style: a2,
482
482
  onClick: o,
@@ -484,9 +484,9 @@ const te = ({
484
484
  }
485
485
  );
486
486
  }
487
- const d = xt[n];
487
+ const d = kt[n];
488
488
  return d ? /* @__PURE__ */ jsx(
489
- Zt,
489
+ Jt,
490
490
  {
491
491
  path: d,
492
492
  size: c2,
@@ -498,7 +498,7 @@ const te = ({
498
498
  }
499
499
  ) : null;
500
500
  };
501
- const zt = [
501
+ const xt = [
502
502
  "a[href]",
503
503
  "area[href]",
504
504
  "button",
@@ -513,7 +513,7 @@ const zt = [
513
513
  "[tabindex]",
514
514
  "[data-nice-focusable]"
515
515
  ].join(",");
516
- function J(n) {
516
+ function X(n) {
517
517
  const e = n.getBoundingClientRect();
518
518
  return {
519
519
  left: e.left,
@@ -524,18 +524,18 @@ function J(n) {
524
524
  height: e.height
525
525
  };
526
526
  }
527
- const _e = (n) => n instanceof HTMLButtonElement || n instanceof HTMLInputElement || n instanceof HTMLSelectElement || n instanceof HTMLTextAreaElement;
528
- function Qt(n) {
529
- if (_e(n) && n.disabled || n.getAttribute("aria-disabled") === "true" && !n.hasAttribute("data-nice-focusable"))
527
+ const Fe = (n) => n instanceof HTMLButtonElement || n instanceof HTMLInputElement || n instanceof HTMLSelectElement || n instanceof HTMLTextAreaElement;
528
+ function Zt(n) {
529
+ if (Fe(n) && n.disabled || n.getAttribute("aria-disabled") === "true" && !n.hasAttribute("data-nice-focusable"))
530
530
  return true;
531
531
  const e = n.closest("fieldset[disabled]");
532
- if (e && _e(n)) {
532
+ if (e && Fe(n)) {
533
533
  const t = e.querySelector(":scope > legend");
534
534
  return !(t && t.contains(n));
535
535
  }
536
536
  return false;
537
537
  }
538
- function en(n) {
538
+ function Qt(n) {
539
539
  var a2;
540
540
  if (n.closest("[hidden]"))
541
541
  return false;
@@ -548,7 +548,7 @@ function en(n) {
548
548
  const t = (a2 = n.ownerDocument.defaultView) == null ? void 0 : a2.getComputedStyle(n);
549
549
  return !t || t.display !== "none" && t.visibility !== "hidden" && t.visibility !== "collapse";
550
550
  }
551
- function tn(n) {
551
+ function en(n) {
552
552
  if (!(n instanceof HTMLInputElement) || n.type !== "radio" || !n.name || n.checked)
553
553
  return true;
554
554
  const t = [...(n.form ?? n.ownerDocument).querySelectorAll('input[type="radio"]')].filter(
@@ -556,29 +556,29 @@ function tn(n) {
556
556
  );
557
557
  return !t.some((a2) => a2.checked) && t[0] === n;
558
558
  }
559
- function ne(n) {
560
- if (!(n instanceof HTMLElement) || !n.matches(zt))
559
+ function te(n) {
560
+ if (!(n instanceof HTMLElement) || !n.matches(xt))
561
561
  return false;
562
562
  if (!n.hasAttribute("data-nice-focusable")) {
563
563
  const e = n.getAttribute("tabindex");
564
564
  if (e !== null && Number(e) < 0 || n instanceof HTMLAnchorElement && !n.hasAttribute("href") && e === null)
565
565
  return false;
566
566
  }
567
- return n.closest('[inert],[aria-hidden="true"]') || Qt(n) ? false : en(n) && tn(n);
567
+ return n.closest('[inert],[aria-hidden="true"]') || Zt(n) ? false : Qt(n) && en(n);
568
568
  }
569
569
  function U(n, e = []) {
570
570
  const t = [];
571
- for (const a2 of n.querySelectorAll(zt))
572
- e.some((r) => r && r.contains(a2)) || ne(a2) && t.push(a2);
571
+ for (const a2 of n.querySelectorAll(xt))
572
+ e.some((r) => r && r.contains(a2)) || te(a2) && t.push(a2);
573
573
  return t;
574
574
  }
575
- const Be = typeof window > "u" ? useEffect : useLayoutEffect;
576
- function _(n, e, t) {
575
+ const _e = typeof window > "u" ? useEffect : useLayoutEffect;
576
+ function B(n, e, t) {
577
577
  const a2 = useRef({ el: null, deps: [] }), r = useRef(e);
578
- r.current = e, Be(() => {
578
+ r.current = e, _e(() => {
579
579
  const s = (n == null ? void 0 : n.current) ?? null, o = a2.current;
580
580
  s === o.el && t.length === o.deps.length && t.every((c2, d) => Object.is(c2, o.deps[d])) || (typeof o.cleanup == "function" && o.cleanup(), o.el = s, o.deps = [...t], o.cleanup = s ? r.current(s) : void 0);
581
- }), Be(
581
+ }), _e(
582
582
  () => () => {
583
583
  const s = a2.current;
584
584
  typeof s.cleanup == "function" && s.cleanup(), a2.current = { el: null, deps: [] };
@@ -586,21 +586,21 @@ function _(n, e, t) {
586
586
  []
587
587
  );
588
588
  }
589
- const Ue = {
589
+ const je = {
590
590
  "045e": "xbox",
591
591
  "054c": "playstation",
592
592
  "057e": "nintendo",
593
593
  "28de": "steam"
594
594
  };
595
- function on(n) {
595
+ function sn(n) {
596
596
  var a2, r, s;
597
597
  const e = n.toLowerCase(), t = ((a2 = /vendor:\s*([0-9a-f]{4})/.exec(e)) == null ? void 0 : a2[1]) ?? ((s = (r = /^([0-9a-f]{1,4})-[0-9a-f]{1,4}-/.exec(e)) == null ? void 0 : r[1]) == null ? void 0 : s.padStart(4, "0"));
598
- return t && Ue[t] ? Ue[t] : /xbox|xinput|x-box/.test(e) ? "xbox" : /dualsense|dualshock|playstation/.test(e) ? "playstation" : /nintendo|pro controller|joy-con|switch/.test(e) ? "nintendo" : /steam|valve/.test(e) ? "steam" : "generic";
598
+ return t && je[t] ? je[t] : /xbox|xinput|x-box/.test(e) ? "xbox" : /dualsense|dualshock|playstation/.test(e) ? "playstation" : /nintendo|pro controller|joy-con|switch/.test(e) ? "nintendo" : /steam|valve/.test(e) ? "steam" : "generic";
599
599
  }
600
- function cn(n, e) {
600
+ function on(n, e) {
601
601
  return e !== "auto" ? e : n === "nintendo" ? "east" : "south";
602
602
  }
603
- const Ht = ["up", "down", "left", "right"], Ee = {
603
+ const Ct = ["up", "down", "left", "right"], we = {
604
604
  navigate: ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"],
605
605
  activate: ["Enter", "Space"],
606
606
  back: ["Escape"],
@@ -616,7 +616,7 @@ const Ht = ["up", "down", "left", "right"], Ee = {
616
616
  last: ["End"],
617
617
  scroll: [],
618
618
  toggleHints: ["Shift+?"]
619
- }, $e = {
619
+ }, qe = {
620
620
  navigate: ["dpadUp", "dpadDown", "dpadLeft", "dpadRight"],
621
621
  activate: ["south"],
622
622
  back: ["east"],
@@ -632,7 +632,7 @@ const Ht = ["up", "down", "left", "right"], Ee = {
632
632
  last: [],
633
633
  scroll: [],
634
634
  toggleHints: ["leftStick"]
635
- }, Mn = {
635
+ }, mn = {
636
636
  " ": "Space",
637
637
  Spacebar: "Space",
638
638
  Esc: "Escape",
@@ -642,63 +642,63 @@ const Ht = ["up", "down", "left", "right"], Ee = {
642
642
  Left: "ArrowLeft",
643
643
  Right: "ArrowRight"
644
644
  };
645
- function Ve(n) {
646
- return Mn[n] ?? n;
645
+ function Re(n) {
646
+ return mn[n] ?? n;
647
647
  }
648
- function Nt(n) {
648
+ function Ht(n) {
649
649
  const e = n.endsWith("++") ? [...n.slice(0, -2).split("+"), "+"] : n.split("+"), t = e.pop() ?? "", a2 = new Set(e.map((r) => r.toLowerCase()));
650
650
  return {
651
- key: Ve(t),
651
+ key: Re(t),
652
652
  primary: a2.has("ctrl") || a2.has("cmd") || a2.has("meta") || a2.has("mod"),
653
653
  alt: a2.has("alt") || a2.has("option"),
654
654
  shift: a2.has("shift")
655
655
  };
656
656
  }
657
- const gn = (n) => n.length === 1 && n.toLowerCase() === n.toUpperCase();
658
- function Tt(n, e) {
659
- const t = Ve(e.key);
660
- return !(t.length === 1 ? t.toLowerCase() === n.key.toLowerCase() : t === n.key) || n.primary !== (e.ctrlKey || e.metaKey) || n.alt !== e.altKey ? false : gn(n.key) || n.shift === e.shiftKey;
657
+ const Mn = (n) => n.length === 1 && n.toLowerCase() === n.toUpperCase();
658
+ function Nt(n, e) {
659
+ const t = Re(e.key);
660
+ return !(t.length === 1 ? t.toLowerCase() === n.key.toLowerCase() : t === n.key) || n.primary !== (e.ctrlKey || e.metaKey) || n.alt !== e.altKey ? false : Mn(n.key) || n.shift === e.shiftKey;
661
661
  }
662
- function Ye(n) {
662
+ function $e(n) {
663
663
  const e = {};
664
- for (const t of Object.keys(Ee)) {
665
- const a2 = n.keyboardBindings[t] ?? Ee[t];
666
- e[t] = a2.map(Nt);
664
+ for (const t of Object.keys(we)) {
665
+ const a2 = n.keyboardBindings[t] ?? we[t];
666
+ e[t] = a2.map(Ht);
667
667
  }
668
668
  return e;
669
669
  }
670
- function bn(n, e) {
670
+ function gn(n, e) {
671
671
  for (const t of Object.keys(e)) {
672
672
  const a2 = e[t];
673
673
  for (let r = 0; r < a2.length; r++)
674
- if (Tt(a2[r], n))
675
- return t === "navigate" ? { intent: t, direction: Ht[r] } : t === "view" ? { intent: t, direction: a2[r].shift ? "up" : "down" } : { intent: t };
674
+ if (Nt(a2[r], n))
675
+ return t === "navigate" ? { intent: t, direction: Ct[r] } : t === "view" ? { intent: t, direction: a2[r].shift ? "up" : "down" } : { intent: t };
676
676
  }
677
677
  return null;
678
678
  }
679
- const yn = /* @__PURE__ */ new Set(["GoBack", "BrowserBack", "XF86Back"]), wn = /* @__PURE__ */ new Set([461, 10009]);
680
- function En(n) {
681
- return yn.has(n.key) || wn.has(n.keyCode) ? { intent: "back" } : n.key === "ChannelUp" ? { intent: "sectionNext" } : n.key === "ChannelDown" ? { intent: "sectionPrev" } : null;
679
+ const bn = /* @__PURE__ */ new Set(["GoBack", "BrowserBack", "XF86Back"]), yn = /* @__PURE__ */ new Set([461, 10009]);
680
+ function wn(n) {
681
+ return bn.has(n.key) || yn.has(n.keyCode) ? { intent: "back" } : n.key === "ChannelUp" ? { intent: "sectionNext" } : n.key === "ChannelDown" ? { intent: "sectionPrev" } : null;
682
682
  }
683
- function ke(n, e) {
684
- const t = cn(e, n.confirmButton), a2 = t === "south" ? "east" : "south", r = {};
685
- for (const s of Object.keys($e)) {
683
+ function Ee(n, e) {
684
+ const t = on(e, n.confirmButton), a2 = t === "south" ? "east" : "south", r = {};
685
+ for (const s of Object.keys(qe)) {
686
686
  const o = n.gamepadBindings[s];
687
- o ? r[s] = [...o] : s === "activate" ? r[s] = [t] : s === "back" ? r[s] = [a2] : r[s] = [...$e[s]];
687
+ o ? r[s] = [...o] : s === "activate" ? r[s] = [t] : s === "back" ? r[s] = [a2] : r[s] = [...qe[s]];
688
688
  }
689
689
  return r;
690
690
  }
691
- function kn(n) {
691
+ function En(n) {
692
692
  const e = /* @__PURE__ */ new Map();
693
693
  for (const t of Object.keys(n))
694
694
  n[t].forEach((a2, r) => {
695
- e.has(a2) || e.set(a2, t === "navigate" ? { intent: t, direction: Ht[r] } : { intent: t });
695
+ e.has(a2) || e.set(a2, t === "navigate" ? { intent: t, direction: Ct[r] } : { intent: t });
696
696
  });
697
697
  return e;
698
698
  }
699
- const se = "data-nice-focus-scope", xe = `[${se}]`;
700
- function Pt(n) {
701
- const e = n.getAttribute(se), t = n.getAttribute("data-nice-scope-enter");
699
+ const re = "data-nice-focus-scope", ke = `[${re}]`;
700
+ function Tt(n) {
701
+ const e = n.getAttribute(re), t = n.getAttribute("data-nice-scope-enter");
702
702
  return {
703
703
  nav: e === "vertical" || e === "horizontal" || e === "grid" || e === "none" ? e : "spatial",
704
704
  wrap: n.hasAttribute("data-nice-scope-wrap"),
@@ -706,25 +706,25 @@ function Pt(n) {
706
706
  enter: t === "selected" || t === "first" ? t : "last"
707
707
  };
708
708
  }
709
- function We(n, e) {
709
+ function Ye(n, e) {
710
710
  var a2;
711
- const t = (a2 = n.parentElement) == null ? void 0 : a2.closest(xe);
711
+ const t = (a2 = n.parentElement) == null ? void 0 : a2.closest(ke);
712
712
  return t && e.contains(t) && t !== e ? t : e;
713
713
  }
714
- function zn(n) {
714
+ function xn(n) {
715
715
  var t, a2;
716
716
  const e = [];
717
- for (let r = (t = n.parentElement) == null ? void 0 : t.closest(xe); r; r = (a2 = r.parentElement) == null ? void 0 : a2.closest(xe))
717
+ for (let r = (t = n.parentElement) == null ? void 0 : t.closest(ke); r; r = (a2 = r.parentElement) == null ? void 0 : a2.closest(ke))
718
718
  e.push(r);
719
719
  return e;
720
720
  }
721
- function An(n) {
721
+ function zn(n) {
722
722
  var t;
723
723
  const e = (t = n.closest("[data-nice-arrows]")) == null ? void 0 : t.getAttribute("data-nice-arrows");
724
724
  return e === "spatial" || e === "native" ? e : null;
725
725
  }
726
- const Xe = { horizontal: 30, vertical: 2 }, G = 1, Je = (n) => n === "left" || n === "right", Ze = (n, e, t, a2) => Math.max(0, Math.max(n, t) - Math.min(e, a2));
727
- function Sn(n, e, t) {
726
+ const We = { horizontal: 30, vertical: 2 }, G = 1, Xe = (n) => n === "left" || n === "right", Je = (n, e, t, a2) => Math.max(0, Math.max(n, t) - Math.min(e, a2));
727
+ function An(n, e, t) {
728
728
  switch (t) {
729
729
  case "right":
730
730
  return e.left >= n.right - G;
@@ -736,7 +736,7 @@ function Sn(n, e, t) {
736
736
  return e.bottom <= n.top + G;
737
737
  }
738
738
  }
739
- function Ln(n, e, t) {
739
+ function Sn(n, e, t) {
740
740
  const a2 = n.left + n.width / 2, r = n.top + n.height / 2, s = e.left + e.width / 2, o = e.top + e.height / 2;
741
741
  switch (t) {
742
742
  case "right":
@@ -749,20 +749,20 @@ function Ln(n, e, t) {
749
749
  return o < r - G;
750
750
  }
751
751
  }
752
- function Cn(n, e, t) {
752
+ function Ln(n, e, t) {
753
753
  let a2, r, s;
754
- Je(t) ? (a2 = t === "right" ? e.left - n.right : n.left - e.right, r = Ze(n.top, n.bottom, e.top, e.bottom), s = Math.abs(e.top + e.height / 2 - (n.top + n.height / 2))) : (a2 = t === "down" ? e.top - n.bottom : n.top - e.bottom, r = Ze(n.left, n.right, e.left, e.right), s = Math.abs(e.left + e.width / 2 - (n.left + n.width / 2)));
755
- const o = Je(t) ? Xe.horizontal : Xe.vertical;
754
+ Xe(t) ? (a2 = t === "right" ? e.left - n.right : n.left - e.right, r = Je(n.top, n.bottom, e.top, e.bottom), s = Math.abs(e.top + e.height / 2 - (n.top + n.height / 2))) : (a2 = t === "down" ? e.top - n.bottom : n.top - e.bottom, r = Je(n.left, n.right, e.left, e.right), s = Math.abs(e.left + e.width / 2 - (n.left + n.width / 2)));
755
+ const o = Xe(t) ? We.horizontal : We.vertical;
756
756
  return Math.max(0, a2) + r * o + s * 0.01;
757
757
  }
758
- function Dt(n, e, t, a2) {
758
+ function Pt(n, e, t, a2) {
759
759
  const r = e.map(t);
760
- for (const s of [Sn, Ln]) {
760
+ for (const s of [An, Sn]) {
761
761
  let o = -1, i2 = 1 / 0;
762
762
  for (let c2 = 0; c2 < r.length; c2++) {
763
763
  if (!s(n, r[c2], a2))
764
764
  continue;
765
- const d = Cn(n, r[c2], a2);
765
+ const d = Ln(n, r[c2], a2);
766
766
  d < i2 && (i2 = d, o = c2);
767
767
  }
768
768
  if (o >= 0)
@@ -770,11 +770,11 @@ function Dt(n, e, t, a2) {
770
770
  }
771
771
  return null;
772
772
  }
773
- const de = (n) => n === "left" || n === "right", Hn = (n) => {
773
+ const ue = (n) => n === "left" || n === "right", Cn = (n) => {
774
774
  var e;
775
775
  return ((e = n.ownerDocument.defaultView) == null ? void 0 : e.getComputedStyle(n).direction) === "rtl";
776
776
  };
777
- function Nn(n, e, t, a2) {
777
+ function Hn(n, e, t, a2) {
778
778
  if (n.length === 0)
779
779
  return null;
780
780
  const r = (s) => !!(e.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING);
@@ -785,51 +785,51 @@ function Nn(n, e, t, a2) {
785
785
  return n[s];
786
786
  return a2 ? n[n.length - 1] : null;
787
787
  }
788
- const Tn = '[aria-selected="true"],[aria-checked="true"],[aria-current]:not([aria-current="false"]),:checked';
789
- function Pn(n, e, t) {
788
+ const Nn = '[aria-selected="true"],[aria-checked="true"],[aria-current]:not([aria-current="false"]),:checked';
789
+ function Tn(n, e, t) {
790
790
  let a2 = null;
791
791
  for (let s = n.parentElement; s && !s.contains(e); s = s.parentElement)
792
- s.hasAttribute(se) && (a2 = s);
792
+ s.hasAttribute(re) && (a2 = s);
793
793
  if (!a2)
794
794
  return n;
795
- const r = Pt(a2).enter;
795
+ const r = Tt(a2).enter;
796
796
  if (r === "last") {
797
797
  const s = t.get(a2);
798
- return s && s.isConnected && a2.contains(s) && ne(s) ? s : n;
798
+ return s && s.isConnected && a2.contains(s) && te(s) ? s : n;
799
799
  }
800
- return r === "selected" ? [...a2.querySelectorAll(Tn)].find(ne) ?? n : U(a2)[0] ?? n;
800
+ return r === "selected" ? [...a2.querySelectorAll(Nn)].find(te) ?? n : U(a2)[0] ?? n;
801
801
  }
802
- function Dn(n, e, t) {
803
- const a2 = J(n);
804
- let r = We(n, t.root), s = null;
802
+ function Pn(n, e, t) {
803
+ const a2 = X(n);
804
+ let r = Ye(n, t.root), s = null;
805
805
  for (; ; ) {
806
- const o = Pt(r);
807
- if (o.nav === "spatial" || o.nav === "grid" || o.nav === "vertical" && !de(e) || o.nav === "horizontal" && de(e)) {
806
+ const o = Tt(r);
807
+ if (o.nav === "spatial" || o.nav === "grid" || o.nav === "vertical" && !ue(e) || o.nav === "horizontal" && ue(e)) {
808
808
  const c2 = U(r, [n, s]);
809
809
  let d;
810
810
  if (o.nav === "vertical" || o.nav === "horizontal") {
811
811
  let u = e === "down" || e === "right";
812
- de(e) && Hn(r) && (u = !u), d = Nn(c2, n, u, o.wrap);
812
+ ue(e) && Cn(r) && (u = !u), d = Hn(c2, n, u, o.wrap);
813
813
  } else
814
- d = Dt(a2, c2, J, e);
814
+ d = Pt(a2, c2, X, e);
815
815
  if (d)
816
- return Pn(d, n, t.memory);
816
+ return Tn(d, n, t.memory);
817
817
  }
818
818
  if (r === t.root || o.trap)
819
819
  return null;
820
- s = r, r = We(r, t.root);
820
+ s = r, r = Ye(r, t.root);
821
821
  }
822
822
  }
823
- function Qe(n, e) {
823
+ function Ze(n, e) {
824
824
  const t = e.left + e.width / 2, a2 = e.top + e.height / 2;
825
825
  let r = null, s = 1 / 0;
826
826
  for (const o of U(n)) {
827
- const i2 = J(o), c2 = Math.hypot(i2.left + i2.width / 2 - t, i2.top + i2.height / 2 - a2);
827
+ const i2 = X(o), c2 = Math.hypot(i2.left + i2.width / 2 - t, i2.top + i2.height / 2 - a2);
828
828
  c2 < s && (s = c2, r = o);
829
829
  }
830
830
  return r;
831
831
  }
832
- const It = [
832
+ const Dt = [
833
833
  "[data-nice-region]",
834
834
  "header",
835
835
  "nav",
@@ -845,9 +845,9 @@ const It = [
845
845
  '[role="region"][aria-label]',
846
846
  '[role="region"][aria-labelledby]'
847
847
  ].join(",");
848
- function In(n, e, t) {
849
- const a2 = [...t.root.querySelectorAll(It)], r = a2.filter(
850
- (u) => !a2.some((p) => p !== u && p.contains(u)) && U(u).length > 0
848
+ function Dn(n, e, t) {
849
+ const a2 = [...t.root.querySelectorAll(Dt)], r = a2.filter(
850
+ (u) => !a2.some((h) => h !== u && h.contains(u)) && U(u).length > 0
851
851
  );
852
852
  if (r.length === 0)
853
853
  return null;
@@ -855,9 +855,9 @@ function In(n, e, t) {
855
855
  if (c2 === r[s])
856
856
  return null;
857
857
  const d = t.memory.get(c2);
858
- return d && d.isConnected && c2.contains(d) && ne(d) ? d : U(c2)[0];
858
+ return d && d.isConnected && c2.contains(d) && te(d) ? d : U(c2)[0];
859
859
  }
860
- const he = [
860
+ const de = [
861
861
  "south",
862
862
  "east",
863
863
  "west",
@@ -875,7 +875,7 @@ const he = [
875
875
  "dpadLeft",
876
876
  "dpadRight",
877
877
  "home"
878
- ], ze = "nice-intent", ae = "nice-engagechange", W = {
878
+ ], xe = "nice-intent", ne = "nice-engagechange", Y = {
879
879
  confirmButton: "auto",
880
880
  gamepadBindings: {},
881
881
  keyboardBindings: {},
@@ -891,11 +891,11 @@ const he = [
891
891
  vibration: false,
892
892
  arrowNavigation: "auto",
893
893
  onScreenKeyboard: "auto"
894
- }, On = /* @__PURE__ */ new Set([4, 5, 6, 7, 12, 13, 14, 15]), Rn = 0.85;
895
- function Vn(n, e) {
894
+ }, In = /* @__PURE__ */ new Set([4, 5, 6, 7, 12, 13, 14, 15]), On = 0.85;
895
+ function Rn(n, e) {
896
896
  return Math.abs(n) > Math.abs(e) ? n > 0 ? "right" : "left" : e > 0 ? "down" : "up";
897
897
  }
898
- class Fn {
898
+ class Vn {
899
899
  constructor(e, t) {
900
900
  this.states = /* @__PURE__ */ new Map(), this.connected = /* @__PURE__ */ new Set(), this.warned = /* @__PURE__ */ new Set(), this.started = false, this.frameId = 0, this.onConnected = (a2) => {
901
901
  const r = a2.gamepad;
@@ -930,39 +930,39 @@ class Fn {
930
930
  }
931
931
  /** Read every pad once; public so tests can drive a frame. */
932
932
  poll(e) {
933
- var o, i2, c2, d, u, p;
933
+ var o, i2, c2, d, u, h;
934
934
  const t = this.opts.timing(), a2 = /* @__PURE__ */ new Set(), r = this.read();
935
935
  for (const l of r) {
936
936
  a2.add(l.index);
937
- let v2 = this.states.get(l.index);
938
- (!v2 || v2.info.id !== l.id) && (v2 = {
937
+ let p = this.states.get(l.index);
938
+ (!p || p.info.id !== l.id) && (p = {
939
939
  info: {
940
940
  index: l.index,
941
941
  id: l.id,
942
- family: on(l.id),
942
+ family: sn(l.id),
943
943
  mapping: l.mapping
944
944
  },
945
945
  pressed: [],
946
946
  stick: null,
947
947
  holds: /* @__PURE__ */ new Map()
948
- }, this.states.set(l.index, v2), this.warnMapping(l), (i2 = (o = this.opts).onPadsChange) == null || i2.call(o, this.pads)), this.readButtons(v2, l, e, t), this.readSticks(v2, l, e, t);
948
+ }, this.states.set(l.index, p), this.warnMapping(l), (i2 = (o = this.opts).onPadsChange) == null || i2.call(o, this.pads)), this.readButtons(p, l, e, t), this.readSticks(p, l, e, t);
949
949
  }
950
950
  let s = false;
951
951
  for (const l of [...this.states.keys()])
952
952
  a2.has(l) || (this.states.delete(l), s = true);
953
- s && ((d = (c2 = this.opts).onPadsChange) == null || d.call(c2, this.pads)), (p = (u = this.opts).onFrame) == null || p.call(u, r, e);
953
+ s && ((d = (c2 = this.opts).onPadsChange) == null || d.call(c2, this.pads)), (h = (u = this.opts).onFrame) == null || h.call(u, r, e);
954
954
  }
955
955
  readButtons(e, t, a2, r) {
956
- for (let s = 0; s < he.length; s++) {
956
+ for (let s = 0; s < de.length; s++) {
957
957
  const o = t.buttons[s], i2 = !!(o && (o.pressed || o.value > 0.5)), c2 = `b${s}`;
958
- i2 !== !!e.pressed[s] ? (e.pressed[s] = i2, i2 && On.has(s) ? e.holds.set(c2, { since: a2, last: a2, count: 0 }) : e.holds.delete(c2), this.opts.onButton({
958
+ i2 !== !!e.pressed[s] ? (e.pressed[s] = i2, i2 && In.has(s) ? e.holds.set(c2, { since: a2, last: a2, count: 0 }) : e.holds.delete(c2), this.opts.onButton({
959
959
  pad: e.info,
960
- button: he[s],
960
+ button: de[s],
961
961
  pressed: i2,
962
962
  repeat: false
963
963
  })) : i2 && this.repeats(e, c2, a2, r) && this.opts.onButton({
964
964
  pad: e.info,
965
- button: he[s],
965
+ button: de[s],
966
966
  pressed: i2,
967
967
  repeat: true
968
968
  });
@@ -971,13 +971,13 @@ class Fn {
971
971
  readSticks(e, t, a2, r) {
972
972
  const s = t.axes[0] ?? 0, o = t.axes[1] ?? 0, i2 = Math.hypot(s, o);
973
973
  if (i2 >= r.stickThreshold) {
974
- const p = Vn(s, o);
975
- p !== e.stick ? (e.stick = p, e.holds.set("stick", { since: a2, last: a2, count: 0 }), this.opts.onStick({ pad: e.info, direction: p, repeat: false })) : this.repeats(e, "stick", a2, r) && this.opts.onStick({ pad: e.info, direction: p, repeat: true });
974
+ const h = Rn(s, o);
975
+ h !== e.stick ? (e.stick = h, e.holds.set("stick", { since: a2, last: a2, count: 0 }), this.opts.onStick({ pad: e.info, direction: h, repeat: false })) : this.repeats(e, "stick", a2, r) && this.opts.onStick({ pad: e.info, direction: h, repeat: true });
976
976
  } else e.stick && i2 < r.stickThreshold * 0.7 && (e.stick = null, e.holds.delete("stick"));
977
977
  const c2 = t.axes[2] ?? 0, d = t.axes[3] ?? 0, u = Math.hypot(c2, d);
978
978
  if (u > r.stickDeadzone) {
979
- const p = (u - r.stickDeadzone) / (1 - r.stickDeadzone) / u;
980
- this.opts.onScroll({ pad: e.info, x: c2 * p, y: d * p });
979
+ const h = (u - r.stickDeadzone) / (1 - r.stickDeadzone) / u;
980
+ this.opts.onScroll({ pad: e.info, x: c2 * h, y: d * h });
981
981
  }
982
982
  }
983
983
  repeats(e, t, a2, r) {
@@ -986,7 +986,7 @@ class Fn {
986
986
  return false;
987
987
  const o = Math.max(
988
988
  r.repeatIntervalMin,
989
- r.repeatInterval * Rn ** s.count
989
+ r.repeatInterval * On ** s.count
990
990
  );
991
991
  return a2 - s.last < o ? false : (s.last = a2, s.count++, true);
992
992
  }
@@ -1009,12 +1009,12 @@ class Fn {
1009
1009
  this.frameId !== 0 && (this.win.cancelAnimationFrame(this.frameId), this.frameId = 0);
1010
1010
  }
1011
1011
  }
1012
- const _n = {
1012
+ const Fn = {
1013
1013
  up: "ArrowUp",
1014
1014
  down: "ArrowDown",
1015
1015
  left: "ArrowLeft",
1016
1016
  right: "ArrowRight"
1017
- }, et = {
1017
+ }, Qe = {
1018
1018
  ArrowUp: 38,
1019
1019
  ArrowDown: 40,
1020
1020
  ArrowLeft: 37,
@@ -1025,20 +1025,20 @@ const _n = {
1025
1025
  End: 35,
1026
1026
  PageUp: 33,
1027
1027
  PageDown: 34
1028
- }, tt = /* @__PURE__ */ new Set(["Shift", "Control", "Alt", "Meta", "AltGraph", "OS"]), Bn = /Web0S|webOS|Tizen|SMART-TV|SmartTV|HbbTV|NetCast|Android TV|AFT|BRAVIA|CrKey/i, nt = 18, at = (n) => n === "keyboard" || n === "gamepad" || n === "remote";
1029
- class Kn {
1028
+ }, et = /* @__PURE__ */ new Set(["Shift", "Control", "Alt", "Meta", "AltGraph", "OS"]), _n = /Web0S|webOS|Tizen|SMART-TV|SmartTV|HbbTV|NetCast|Android TV|AFT|BRAVIA|CrKey/i, tt = 18, nt = (n) => n === "keyboard" || n === "gamepad" || n === "remote";
1029
+ class Bn {
1030
1030
  constructor(e) {
1031
1031
  this.started = false, this.listeners = /* @__PURE__ */ new Set(), this.frameListeners = /* @__PURE__ */ new Set(), this.padMaps = /* @__PURE__ */ new Map(), this.memory = /* @__PURE__ */ new WeakMap(), this.engagedValues = /* @__PURE__ */ new WeakMap(), this.overlays = [], this.hintsToggled = false, this.activePad = null, this.lastFocus = null, this.observer = null, this.live = null, this.snapshot = [], this.capture = null, this.translate = (t, a2) => a2, this.onKeyDown = (t) => {
1032
1032
  if (t.niceSource)
1033
1033
  return;
1034
- const a2 = En(t), r = this.tv || a2 ? "remote" : "keyboard";
1035
- if (tt.has(t.key) || this.setMethod(r), this.capture && !tt.has(t.key)) {
1034
+ const a2 = wn(t), r = this.tv || a2 ? "remote" : "keyboard";
1035
+ if (et.has(t.key) || this.setMethod(r), this.capture && !et.has(t.key)) {
1036
1036
  t.preventDefault();
1037
1037
  const c2 = [
1038
1038
  t.ctrlKey || t.metaKey ? "Ctrl" : "",
1039
1039
  t.altKey ? "Alt" : "",
1040
1040
  t.shiftKey ? "Shift" : ""
1041
- ], d = Ve(t.key);
1041
+ ], d = Re(t.key);
1042
1042
  this.capture({
1043
1043
  keys: [...c2, d.length === 1 ? d.toUpperCase() : d].filter(Boolean).join("+")
1044
1044
  });
@@ -1046,11 +1046,11 @@ class Kn {
1046
1046
  }
1047
1047
  if (t.defaultPrevented || t.isComposing)
1048
1048
  return;
1049
- const s = a2 ?? bn(t, this.keyTable);
1049
+ const s = a2 ?? gn(t, this.keyTable);
1050
1050
  if (!s)
1051
1051
  return;
1052
1052
  const o = this.targetOf(t);
1053
- if (qt(o, s))
1053
+ if (Gt(o, s))
1054
1054
  return;
1055
1055
  const i2 = {
1056
1056
  intent: s.intent,
@@ -1087,15 +1087,15 @@ class Kn {
1087
1087
  repeat: true,
1088
1088
  gamepad: t.pad
1089
1089
  };
1090
- this.dispatchIntent(i2, o) || rt(st(o, r, s), r * nt, s * nt);
1090
+ this.dispatchIntent(i2, o) || at(rt(o, r, s), r * tt, s * tt);
1091
1091
  }, this.onPointerDown = (t) => {
1092
1092
  this.setMethod(t.pointerType === "touch" ? "touch" : "pointer");
1093
1093
  }, this.onFocusIn = (t) => {
1094
1094
  const a2 = t.target;
1095
1095
  if (a2 instanceof HTMLElement) {
1096
1096
  for (let r = a2.parentElement; r; r = r.parentElement)
1097
- (r.hasAttribute(se) || r.matches(It) || r === this.doc.body) && this.memory.set(r, a2);
1098
- this.lastFocus = { el: a2, rect: J(a2), scope: zn(a2)[0] ?? null };
1097
+ (r.hasAttribute(re) || r.matches(Dt) || r === this.doc.body) && this.memory.set(r, a2);
1098
+ this.lastFocus = { el: a2, rect: X(a2), scope: xn(a2)[0] ?? null };
1099
1099
  }
1100
1100
  }, this.onFocusOut = (t) => {
1101
1101
  const a2 = t.target;
@@ -1108,15 +1108,15 @@ class Kn {
1108
1108
  const a2 = this.doc.activeElement;
1109
1109
  if (a2 && a2 !== this.doc.body)
1110
1110
  return;
1111
- const r = this.navigationRoot(), s = t.scope && t.scope.isConnected && r.contains(t.scope) ? t.scope : r, o = Qe(s, t.rect) ?? (s !== r ? Qe(r, t.rect) : null);
1111
+ const r = this.navigationRoot(), s = t.scope && t.scope.isConnected && r.contains(t.scope) ? t.scope : r, o = Ze(s, t.rect) ?? (s !== r ? Ze(r, t.rect) : null);
1112
1112
  o && this.focusElement(o);
1113
- }, this.win = e, this.doc = e.document, this.tv = Bn.test(e.navigator.userAgent), this.keyTable = Ye(W), this.state = {
1113
+ }, this.win = e, this.doc = e.document, this.tv = _n.test(e.navigator.userAgent), this.keyTable = $e(Y), this.state = {
1114
1114
  method: "pointer",
1115
1115
  family: null,
1116
1116
  pads: [],
1117
- preferences: W,
1118
- hintsVisible: W.hints === "always"
1119
- }, this.poller = new Fn(e, {
1117
+ preferences: Y,
1118
+ hintsVisible: Y.hints === "always"
1119
+ }, this.poller = new Vn(e, {
1120
1120
  timing: () => this.state.preferences,
1121
1121
  onButton: this.onPadButton,
1122
1122
  onStick: this.onPadStick,
@@ -1157,7 +1157,7 @@ class Kn {
1157
1157
  }
1158
1158
  setPreferences(e) {
1159
1159
  const t = { ...this.state.preferences, ...e };
1160
- this.keyTable = Ye(t), this.padMaps.clear(), this.update({ preferences: t });
1160
+ this.keyTable = $e(t), this.padMaps.clear(), this.update({ preferences: t });
1161
1161
  }
1162
1162
  /** Words of announcements and labels; the React provider passes the app's translator. */
1163
1163
  setTranslator(e) {
@@ -1170,7 +1170,7 @@ class Kn {
1170
1170
  }
1171
1171
  /** The buttons bound to an intent on a pad of the family (for prompts). */
1172
1172
  gamepadBinding(e, t = this.glyphFamily) {
1173
- return ke(this.state.preferences, t)[e];
1173
+ return Ee(this.state.preferences, t)[e];
1174
1174
  }
1175
1175
  /** The keys bound to an intent (for prompts), as written in the preferences. */
1176
1176
  keyboardBinding(e) {
@@ -1193,12 +1193,12 @@ class Kn {
1193
1193
  }
1194
1194
  update(e) {
1195
1195
  const t = { ...this.state, ...e }, { hints: a2 } = t.preferences;
1196
- let r = a2 === "always" ? true : a2 === "never" ? false : at(t.method);
1196
+ let r = a2 === "always" ? true : a2 === "never" ? false : nt(t.method);
1197
1197
  this.hintsToggled && (r = !r), t.hintsVisible = r, this.state = t, this.listeners.forEach((s) => s());
1198
1198
  }
1199
1199
  setMethod(e, t) {
1200
1200
  const a2 = this.doc.documentElement;
1201
- t && a2.getAttribute("data-nice-gamepad") !== t && a2.setAttribute("data-nice-gamepad", t), !(e === this.state.method && (t === void 0 || t === this.state.family)) && (a2.setAttribute("data-nice-input", e), this.watchRecovery(at(e)), this.update(t ? { method: e, family: t } : { method: e }));
1201
+ t && a2.getAttribute("data-nice-gamepad") !== t && a2.setAttribute("data-nice-gamepad", t), !(e === this.state.method && (t === void 0 || t === this.state.family)) && (a2.setAttribute("data-nice-input", e), this.watchRecovery(nt(e)), this.update(t ? { method: e, family: t } : { method: e }));
1202
1202
  }
1203
1203
  /* ── Gamepad frames (games, device testers) ──────────────────── */
1204
1204
  /** Raw pads every polled frame while a pad is connected. */
@@ -1252,7 +1252,7 @@ class Kn {
1252
1252
  /* ── Intents ─────────────────────────────────────────────────── */
1253
1253
  /** Dispatches `nice-intent` on the target; returns whether a handler consumed it. */
1254
1254
  dispatchIntent(e, t = this.focused()) {
1255
- const a2 = new CustomEvent(ze, {
1255
+ const a2 = new CustomEvent(xe, {
1256
1256
  detail: e,
1257
1257
  bubbles: true,
1258
1258
  cancelable: true,
@@ -1265,12 +1265,12 @@ class Kn {
1265
1265
  const a2 = this.navigationRoot();
1266
1266
  if (t === this.doc.body || !a2.contains(t))
1267
1267
  return this.focusInitial(a2);
1268
- const r = Dn(t, e, { root: a2, memory: this.memory });
1268
+ const r = Pn(t, e, { root: a2, memory: this.memory });
1269
1269
  return r ? (this.focusElement(r), true) : false;
1270
1270
  }
1271
1271
  /** The `view` intent: next (`down`) or previous (`up`) region. */
1272
1272
  focusRegion(e, t = this.focused()) {
1273
- const a2 = In(t, e, {
1273
+ const a2 = Dn(t, e, {
1274
1274
  root: this.navigationRoot(),
1275
1275
  memory: this.memory
1276
1276
  });
@@ -1282,13 +1282,13 @@ class Kn {
1282
1282
  e.focus({ preventScroll: true, focusVisible: true }), (t = e.scrollIntoView) == null || t.call(e, { block: "nearest", inline: "nearest" });
1283
1283
  }
1284
1284
  /** Engages a control (ADR-005 § 6); popup controls open instead. */
1285
- engage(e, t, a2 = me(e)) {
1285
+ engage(e, t, a2 = ve(e)) {
1286
1286
  if (a2) {
1287
1287
  if (a2 === "popup") {
1288
1288
  this.emulateKey(e, "ArrowDown", t);
1289
1289
  return;
1290
1290
  }
1291
- e.setAttribute("data-nice-engaged", ""), be(e) && this.engagedValues.set(e, e.value), this.fireEngage(e, { engaged: true, cancelled: false, source: t }), this.announce(this.translate("input.engaged", "Editing"));
1291
+ e.setAttribute("data-nice-engaged", ""), ge(e) && this.engagedValues.set(e, e.value), this.fireEngage(e, { engaged: true, cancelled: false, source: t }), this.announce(this.translate("input.engaged", "Editing"));
1292
1292
  }
1293
1293
  }
1294
1294
  /**
@@ -1300,7 +1300,7 @@ class Kn {
1300
1300
  return;
1301
1301
  e.removeAttribute("data-nice-engaged");
1302
1302
  const r = this.engagedValues.get(e);
1303
- this.engagedValues.delete(e), a2 && r !== void 0 && be(e) && Wt(e, r), this.fireEngage(e, { engaged: false, cancelled: a2, source: t }), this.announce(this.translate("input.released", "Done editing"));
1303
+ this.engagedValues.delete(e), a2 && r !== void 0 && ge(e) && Yt(e, r), this.fireEngage(e, { engaged: false, cancelled: a2, source: t }), this.announce(this.translate("input.released", "Done editing"));
1304
1304
  }
1305
1305
  /** Defaults of trusted keys: the browser already clicks, types and scrolls. */
1306
1306
  keyDefault(e, t) {
@@ -1321,27 +1321,27 @@ class Kn {
1321
1321
  if (t !== "keyboard")
1322
1322
  return "spatial";
1323
1323
  const a2 = this.state.preferences.arrowNavigation;
1324
- return a2 !== "auto" ? a2 : An(e) ?? "native";
1324
+ return a2 !== "auto" ? a2 : zn(e) ?? "native";
1325
1325
  }
1326
1326
  /* ── Gamepad ─────────────────────────────────────────────────── */
1327
1327
  padMap(e) {
1328
1328
  let t = this.padMaps.get(e);
1329
- return t || (t = kn(ke(this.state.preferences, e)), this.padMaps.set(e, t)), t;
1329
+ return t || (t = En(Ee(this.state.preferences, e)), this.padMaps.set(e, t)), t;
1330
1330
  }
1331
1331
  /** A pad intent: the intent event, then engage rules, key emulation and the default action. */
1332
1332
  deviceIntent(e) {
1333
1333
  const t = this.focused();
1334
1334
  if (this.dispatchIntent(e, t))
1335
1335
  return;
1336
- const a2 = t === this.doc.body ? null : me(t), r = a2 !== null && kt(t, a2), s = t, o = e.source;
1336
+ const a2 = t === this.doc.body ? null : ve(t), r = a2 !== null && Et(t, a2), s = t, o = e.source;
1337
1337
  switch (e.intent) {
1338
1338
  case "navigate": {
1339
1339
  const i2 = e.direction ?? "down";
1340
- a2 && !r ? this.moveFocus(i2, t) : r && ce(t) ? le(t, i2) : r && a2 === "text" ? Xt(t, i2) : this.emulateKey(t, _n[i2], o) || this.moveFocus(i2, t);
1340
+ a2 && !r ? this.moveFocus(i2, t) : r && ie(t) ? ce(t, i2) : r && a2 === "text" ? Wt(t, i2) : this.emulateKey(t, Fn[i2], o) || this.moveFocus(i2, t);
1341
1341
  return;
1342
1342
  }
1343
1343
  case "activate":
1344
- a2 && !r ? this.engage(s, o, a2) : r && a2 === "popup" ? this.emulateKey(t, "Enter", o) : r && (a2 === "value" || a2 === "canvas") ? this.release(s, o, false) : r || (wt(t) ? $t(t) : this.emulateKey(t, "Enter", o));
1344
+ a2 && !r ? this.engage(s, o, a2) : r && a2 === "popup" ? this.emulateKey(t, "Enter", o) : r && (a2 === "value" || a2 === "canvas") ? this.release(s, o, false) : r || (yt(t) ? qt(t) : this.emulateKey(t, "Enter", o));
1345
1345
  return;
1346
1346
  case "back":
1347
1347
  r && a2 === "popup" ? this.emulateKey(t, "Escape", o) : r ? this.release(s, o, true) : this.emulateKey(t, "Escape", o) || this.closeTopOverlay(o);
@@ -1350,17 +1350,17 @@ class Kn {
1350
1350
  case "sectionNext":
1351
1351
  if (r && a2 === "value") {
1352
1352
  const i2 = e.intent === "sectionNext";
1353
- ce(t) ? le(t, i2 ? "up" : "down", "big") : this.emulateKey(t, i2 ? "PageUp" : "PageDown", o);
1353
+ ie(t) ? ce(t, i2 ? "up" : "down", "big") : this.emulateKey(t, i2 ? "PageUp" : "PageDown", o);
1354
1354
  }
1355
1355
  return;
1356
1356
  case "pagePrev":
1357
1357
  case "pageNext": {
1358
1358
  const i2 = e.intent === "pageNext";
1359
1359
  if (r && a2 === "value")
1360
- ce(t) ? le(t, i2 ? "up" : "down", "edge") : this.emulateKey(t, i2 ? "End" : "Home", o);
1360
+ ie(t) ? ce(t, i2 ? "up" : "down", "edge") : this.emulateKey(t, i2 ? "End" : "Home", o);
1361
1361
  else if (!this.emulateKey(t, i2 ? "PageDown" : "PageUp", o)) {
1362
- const c2 = st(t, 0, i2 ? 1 : -1);
1363
- rt(c2, 0, (i2 ? 1 : -1) * ((c2 == null ? void 0 : c2.clientHeight) ?? 0) * 0.9);
1362
+ const c2 = rt(t, 0, i2 ? 1 : -1);
1363
+ at(c2, 0, (i2 ? 1 : -1) * ((c2 == null ? void 0 : c2.clientHeight) ?? 0) * 0.9);
1364
1364
  }
1365
1365
  return;
1366
1366
  }
@@ -1394,7 +1394,7 @@ class Kn {
1394
1394
  cancelable: true,
1395
1395
  composed: true
1396
1396
  });
1397
- return Object.defineProperty(i2, "niceSource", { value: a2 }), Object.defineProperty(i2, "keyCode", { value: et[t] ?? 0 }), Object.defineProperty(i2, "which", { value: et[t] ?? 0 }), i2;
1397
+ return Object.defineProperty(i2, "niceSource", { value: a2 }), Object.defineProperty(i2, "keyCode", { value: Qe[t] ?? 0 }), Object.defineProperty(i2, "which", { value: Qe[t] ?? 0 }), i2;
1398
1398
  }, s = r("keydown");
1399
1399
  return e.dispatchEvent(s), e.dispatchEvent(r("keyup")), s.defaultPrevented;
1400
1400
  }
@@ -1433,11 +1433,11 @@ class Kn {
1433
1433
  }
1434
1434
  /** Nothing focused yet: the remembered element, else the first one of the main region. */
1435
1435
  focusInitial(e) {
1436
- const t = this.memory.get(e), a2 = e.querySelector('main,[role="main"]'), r = (t && t.isConnected && e.contains(t) && ne(t) ? t : null) ?? (a2 ? U(a2)[0] : void 0) ?? U(e)[0];
1436
+ const t = this.memory.get(e), a2 = e.querySelector('main,[role="main"]'), r = (t && t.isConnected && e.contains(t) && te(t) ? t : null) ?? (a2 ? U(a2)[0] : void 0) ?? U(e)[0];
1437
1437
  return r ? (this.focusElement(r), true) : false;
1438
1438
  }
1439
1439
  fireEngage(e, t) {
1440
- e.dispatchEvent(new CustomEvent(ae, { detail: t, bubbles: true }));
1440
+ e.dispatchEvent(new CustomEvent(ne, { detail: t, bubbles: true }));
1441
1441
  }
1442
1442
  /** Polite announcement through the engine's own live region. */
1443
1443
  announce(e) {
@@ -1448,10 +1448,10 @@ class Kn {
1448
1448
  this.live.textContent = e;
1449
1449
  }
1450
1450
  }
1451
- function rt(n, e, t) {
1451
+ function at(n, e, t) {
1452
1452
  n && (typeof n.scrollBy == "function" ? n.scrollBy({ left: e, top: t }) : (n.scrollLeft += e, n.scrollTop += t));
1453
1453
  }
1454
- function st(n, e, t) {
1454
+ function rt(n, e, t) {
1455
1455
  const a2 = n.ownerDocument, r = a2.defaultView;
1456
1456
  for (let s = n; s && s !== a2.body; s = s.parentElement) {
1457
1457
  if (!(s instanceof HTMLElement) || !r)
@@ -1462,106 +1462,106 @@ function st(n, e, t) {
1462
1462
  }
1463
1463
  return a2.scrollingElement ?? a2.documentElement;
1464
1464
  }
1465
- const ot = /* @__PURE__ */ new WeakMap();
1466
- function jn(n = window, e = true) {
1467
- let t = ot.get(n);
1468
- return t || (t = new Kn(n), ot.set(n, t)), e && t.start(), t;
1465
+ const st = /* @__PURE__ */ new WeakMap();
1466
+ function Kn(n = window, e = true) {
1467
+ let t = st.get(n);
1468
+ return t || (t = new Bn(n), st.set(n, t)), e && t.start(), t;
1469
1469
  }
1470
- function B() {
1470
+ function K() {
1471
1471
  const [n] = useState(
1472
- () => typeof window > "u" ? null : jn(window, false)
1472
+ () => typeof window > "u" ? null : Kn(window, false)
1473
1473
  );
1474
1474
  return useEffect(() => {
1475
1475
  n == null || n.start();
1476
1476
  }, [n]), n;
1477
1477
  }
1478
- const da = '[role="row"],tr', ha = '[role="gridcell"],[role="columnheader"],[role="rowheader"],td,th', fa = 'button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', pa = 'textarea,select,input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])';
1479
- function Xa(n, e = {}) {
1480
- const { rowSelector: t = da, cellSelector: a2 = ha, pageSize: r = 10, enabled: s = true } = e, o = useRef(e);
1478
+ const ua = '[role="row"],tr', da = '[role="gridcell"],[role="columnheader"],[role="rowheader"],td,th', ha = 'button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', fa = 'textarea,select,input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])';
1479
+ function Wa(n, e = {}) {
1480
+ const { rowSelector: t = ua, cellSelector: a2 = da, pageSize: r = 10, enabled: s = true } = e, o = useRef(e);
1481
1481
  o.current = e;
1482
- const i2 = B();
1483
- _(
1482
+ const i2 = K();
1483
+ B(
1484
1484
  n,
1485
1485
  (c2) => {
1486
1486
  if (!s)
1487
1487
  return;
1488
- const d = c2.ownerDocument, u = (g) => {
1489
- var S;
1490
- return !!g && g.matches(t) && ((S = g.parentElement) == null ? void 0 : S.closest('[role="grid"],[role="treegrid"]')) === c2;
1491
- }, p = () => [...c2.querySelectorAll(t)].filter(u), l = (g) => [...g.children].filter((S) => S.matches(a2)), v2 = (g) => {
1492
- const S = g.querySelectorAll(fa);
1493
- return S.length === 1 ? S[0] : g;
1494
- }, y = () => p().flatMap((g) => l(g).map(v2)), k = (g) => {
1495
- const S = (g == null ? void 0 : g.closest(a2)) ?? null;
1496
- return S && u(S.parentElement) ? S : null;
1497
- }, E = () => {
1498
- const g = y();
1499
- if (g.length === 0)
1488
+ const d = c2.ownerDocument, u = (y) => {
1489
+ var L;
1490
+ return !!y && y.matches(t) && ((L = y.parentElement) == null ? void 0 : L.closest('[role="grid"],[role="treegrid"]')) === c2;
1491
+ }, h = () => [...c2.querySelectorAll(t)].filter(u), l = (y) => [...y.children].filter((L) => L.matches(a2)), p = (y) => {
1492
+ const L = y.querySelectorAll(ha);
1493
+ return L.length === 1 ? L[0] : y;
1494
+ }, w = () => h().flatMap((y) => l(y).map(p)), k = (y) => {
1495
+ const L = (y == null ? void 0 : y.closest(a2)) ?? null;
1496
+ return L && u(L.parentElement) ? L : null;
1497
+ }, x = () => {
1498
+ const y = w();
1499
+ if (y.length === 0)
1500
1500
  return;
1501
- const S = d.activeElement, N = g.find((w) => w === S || w.contains(S)) ?? g.find((w) => w.getAttribute("tabindex") === "0") ?? g[0];
1502
- for (const w of g) {
1503
- const b = w === N ? "0" : "-1";
1504
- w.getAttribute("tabindex") !== b && w.setAttribute("tabindex", b);
1501
+ const L = d.activeElement, T = y.find((E) => E === L || E.contains(L)) ?? y.find((E) => E.getAttribute("tabindex") === "0") ?? y[0];
1502
+ for (const E of y) {
1503
+ const g = E === T ? "0" : "-1";
1504
+ E.getAttribute("tabindex") !== g && E.setAttribute("tabindex", g);
1505
1505
  }
1506
- }, H = (g, S, N) => {
1507
- var b, T;
1508
- const w = v2(g);
1509
- for (const f of y())
1510
- f.setAttribute("tabindex", f === w ? "0" : "-1");
1511
- i2 ? i2.focusElement(w) : w.focus(), (T = (b = o.current).onMove) == null || T.call(b, g, S, N);
1512
- }, x = (g) => {
1513
- var D;
1514
- if (g.defaultPrevented || g.altKey || g.metaKey)
1506
+ }, C = (y, L, T) => {
1507
+ var g, v2;
1508
+ const E = p(y);
1509
+ for (const M of w())
1510
+ M.setAttribute("tabindex", M === E ? "0" : "-1");
1511
+ i2 ? i2.focusElement(E) : E.focus(), (v2 = (g = o.current).onMove) == null || v2.call(g, y, L, T);
1512
+ }, S = (y) => {
1513
+ var P;
1514
+ if (y.defaultPrevented || y.altKey || y.metaKey)
1515
1515
  return;
1516
- const S = g.target, N = k(S);
1517
- if (!N || v2(N) !== S || S !== N && S.matches(pa))
1516
+ const L = y.target, T = k(L);
1517
+ if (!T || p(T) !== L || L !== T && L.matches(fa))
1518
1518
  return;
1519
- const w = p(), b = w.indexOf(N.parentElement), T = l(w[b]).indexOf(N), f = (L, P) => {
1520
- const I = w[L] ? l(w[L]) : [];
1521
- if (I.length === 0)
1519
+ const E = h(), g = E.indexOf(T.parentElement), v2 = l(E[g]).indexOf(T), M = (H, D) => {
1520
+ const _ = E[H] ? l(E[H]) : [];
1521
+ if (_.length === 0)
1522
1522
  return null;
1523
- const $ = Math.min(P, I.length - 1);
1524
- return [I[$], L, $];
1523
+ const F = Math.min(D, _.length - 1);
1524
+ return [_[F], H, F];
1525
1525
  };
1526
- let h = null;
1527
- const A = ((D = d.defaultView) == null ? void 0 : D.getComputedStyle(c2).direction) === "rtl", m = A && g.key === "ArrowLeft" ? "ArrowRight" : A && g.key === "ArrowRight" ? "ArrowLeft" : g.key;
1528
- if (g.ctrlKey && (m === "Home" || m === "End"))
1529
- h = m === "Home" ? f(0, 0) : f(w.length - 1, Number.MAX_SAFE_INTEGER);
1526
+ let f = null;
1527
+ const z = ((P = d.defaultView) == null ? void 0 : P.getComputedStyle(c2).direction) === "rtl", b = z && y.key === "ArrowLeft" ? "ArrowRight" : z && y.key === "ArrowRight" ? "ArrowLeft" : y.key;
1528
+ if (y.ctrlKey && (b === "Home" || b === "End"))
1529
+ f = b === "Home" ? M(0, 0) : M(E.length - 1, Number.MAX_SAFE_INTEGER);
1530
1530
  else {
1531
- if (g.ctrlKey)
1531
+ if (y.ctrlKey)
1532
1532
  return;
1533
- if (m === "ArrowRight")
1534
- h = T + 1 < l(w[b]).length ? f(b, T + 1) : null;
1535
- else if (m === "ArrowLeft")
1536
- h = T > 0 ? f(b, T - 1) : null;
1537
- else if (m === "ArrowDown")
1538
- h = b + 1 < w.length ? f(b + 1, T) : null;
1539
- else if (m === "ArrowUp")
1540
- h = b > 0 ? f(b - 1, T) : null;
1541
- else if (m === "Home")
1542
- h = f(b, 0);
1543
- else if (m === "End")
1544
- h = f(b, Number.MAX_SAFE_INTEGER);
1545
- else if (m === "PageDown" || m === "PageUp") {
1546
- const L = m === "PageDown" ? Math.min(w.length - 1, b + r) : Math.max(0, b - r);
1547
- h = L !== b ? f(L, T) : null;
1548
- } else if ((m === "Enter" || m === " ") && S === N && !N.matches("button,a[href]")) {
1549
- g.preventDefault(), N.click();
1533
+ if (b === "ArrowRight")
1534
+ f = v2 + 1 < l(E[g]).length ? M(g, v2 + 1) : null;
1535
+ else if (b === "ArrowLeft")
1536
+ f = v2 > 0 ? M(g, v2 - 1) : null;
1537
+ else if (b === "ArrowDown")
1538
+ f = g + 1 < E.length ? M(g + 1, v2) : null;
1539
+ else if (b === "ArrowUp")
1540
+ f = g > 0 ? M(g - 1, v2) : null;
1541
+ else if (b === "Home")
1542
+ f = M(g, 0);
1543
+ else if (b === "End")
1544
+ f = M(g, Number.MAX_SAFE_INTEGER);
1545
+ else if (b === "PageDown" || b === "PageUp") {
1546
+ const H = b === "PageDown" ? Math.min(E.length - 1, g + r) : Math.max(0, g - r);
1547
+ f = H !== g ? M(H, v2) : null;
1548
+ } else if ((b === "Enter" || b === " ") && L === T && !T.matches("button,a[href]")) {
1549
+ y.preventDefault(), T.click();
1550
1550
  return;
1551
1551
  } else
1552
1552
  return;
1553
1553
  }
1554
- h && h[0] !== N && (g.preventDefault(), H(...h));
1555
- }, M = () => E();
1556
- E(), c2.addEventListener("keydown", x), c2.addEventListener("focusin", M);
1557
- const z = typeof MutationObserver > "u" ? null : new MutationObserver(() => E());
1558
- return z == null || z.observe(c2, {
1554
+ f && f[0] !== T && (y.preventDefault(), C(...f));
1555
+ }, m = () => x();
1556
+ x(), c2.addEventListener("keydown", S), c2.addEventListener("focusin", m);
1557
+ const A = typeof MutationObserver > "u" ? null : new MutationObserver(() => x());
1558
+ return A == null || A.observe(c2, {
1559
1559
  childList: true,
1560
1560
  subtree: true,
1561
1561
  attributes: true,
1562
1562
  attributeFilter: ["disabled"]
1563
1563
  }), () => {
1564
- c2.removeEventListener("keydown", x), c2.removeEventListener("focusin", M), z == null || z.disconnect();
1564
+ c2.removeEventListener("keydown", S), c2.removeEventListener("focusin", m), A == null || A.disconnect();
1565
1565
  };
1566
1566
  },
1567
1567
  [s, t, a2, r, i2]
@@ -1811,7 +1811,7 @@ const NiceCapacityPlanner = ({
1811
1811
  unit
1812
1812
  )) }) }),
1813
1813
  /* @__PURE__ */ jsx("div", { className: "nice-resource-allocation__toolbar-right", children: config.showConflicts && conflicts.length > 0 && /* @__PURE__ */ jsxs("div", { className: "nice-resource-allocation__conflicts-badge", children: [
1814
- /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsx(te, { name: "warning", size: 14 }) }),
1814
+ /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsx(ee, { name: "warning", size: 14 }) }),
1815
1815
  (conflicts.length === 1 ? t("capacityPlanner.oneConflict", "1 Conflict") : t("capacityPlanner.conflicts", "{count} Conflicts")).replace("{count}", String(conflicts.length))
1816
1816
  ] }) })
1817
1817
  ] }),
@@ -1861,7 +1861,7 @@ const NiceCapacityPlanner = ({
1861
1861
  {
1862
1862
  role: onResourceClick ? "button" : void 0,
1863
1863
  tabIndex: onResourceClick ? 0 : void 0,
1864
- onKeyDown: onResourceClick ? Et : void 0,
1864
+ onKeyDown: onResourceClick ? wt : void 0,
1865
1865
  className: "nice-resource-allocation__resource-cell",
1866
1866
  onClick: () => onResourceClick == null ? void 0 : onResourceClick(resource),
1867
1867
  children: [
@@ -1874,7 +1874,7 @@ const NiceCapacityPlanner = ({
1874
1874
  toggleResource(resource.id);
1875
1875
  },
1876
1876
  children: /* @__PURE__ */ jsx(
1877
- te,
1877
+ ee,
1878
1878
  {
1879
1879
  name: expandedResources.has(resource.id) ? "chevron-down" : "chevron-right",
1880
1880
  size: 14
@@ -1882,7 +1882,7 @@ const NiceCapacityPlanner = ({
1882
1882
  )
1883
1883
  }
1884
1884
  ),
1885
- /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsx(te, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
1885
+ /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsx(ee, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
1886
1886
  /* @__PURE__ */ jsxs("div", { className: "nice-resource-allocation__resource-info", children: [
1887
1887
  /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-name", children: resource.name }),
1888
1888
  resource.department && /* @__PURE__ */ jsx("span", { className: "nice-resource-allocation__resource-dept", children: resource.department })
@@ -1905,7 +1905,7 @@ const NiceCapacityPlanner = ({
1905
1905
  role: readOnly ? void 0 : "button",
1906
1906
  tabIndex: readOnly ? void 0 : 0,
1907
1907
  "aria-label": readOnly ? void 0 : `${resource.name} ${formatDate(period)}`,
1908
- onKeyDown: readOnly ? void 0 : Et,
1908
+ onKeyDown: readOnly ? void 0 : wt,
1909
1909
  className: `nice-resource-allocation__time-cell ${isHovered ? "nice-resource-allocation__time-cell--hovered" : ""}`,
1910
1910
  style: { backgroundColor: getCellColor(resource.id, period) },
1911
1911
  onClick: () => handleCellClick(resource.id, period),
@@ -1957,7 +1957,7 @@ const NiceCapacityPlanner = ({
1957
1957
  {
1958
1958
  role: "button",
1959
1959
  tabIndex: 0,
1960
- onKeyDown: Et,
1960
+ onKeyDown: wt,
1961
1961
  className: `nice-resource-allocation__allocation-bar nice-resource-allocation__allocation-bar--${allocation.status} ${selectedAllocation === allocation.id ? "nice-resource-allocation__allocation-bar--selected" : ""}`,
1962
1962
  style: {
1963
1963
  left: `${leftPercent}%`,
@@ -1978,7 +1978,7 @@ const NiceCapacityPlanner = ({
1978
1978
  e.stopPropagation();
1979
1979
  onAllocationDelete == null ? void 0 : onAllocationDelete(allocation.id);
1980
1980
  },
1981
- children: /* @__PURE__ */ jsx(te, { name: "close", size: 14 })
1981
+ children: /* @__PURE__ */ jsx(ee, { name: "close", size: 14 })
1982
1982
  }
1983
1983
  )
1984
1984
  ]
@@ -2313,7 +2313,7 @@ const NiceInventoryManager = ({
2313
2313
  onChange: (e) => setFilters((prev) => ({ ...prev, searchQuery: e.target.value }))
2314
2314
  }
2315
2315
  ),
2316
- /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsx(te, { name: "search", size: 14 }) })
2316
+ /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsx(ee, { name: "search", size: 14 }) })
2317
2317
  ] }),
2318
2318
  /* @__PURE__ */ jsxs(
2319
2319
  "select",
@@ -2348,7 +2348,7 @@ const NiceInventoryManager = ({
2348
2348
  className: `nice-inventory-manager__view-button ${view === v2 ? "nice-inventory-manager__view-button--active" : ""}`,
2349
2349
  onClick: () => setView(v2),
2350
2350
  children: /* @__PURE__ */ jsx(
2351
- te,
2351
+ ee,
2352
2352
  {
2353
2353
  name: v2 === "grid" ? "grid" : v2 === "list" ? "list" : "table",
2354
2354
  size: 14
@@ -2422,7 +2422,7 @@ const NiceInventoryManager = ({
2422
2422
  {
2423
2423
  role: onItemClick ? "button" : void 0,
2424
2424
  tabIndex: onItemClick ? 0 : void 0,
2425
- onKeyDown: onItemClick ? Et : void 0,
2425
+ onKeyDown: onItemClick ? wt : void 0,
2426
2426
  className: `nice-inventory-manager__item-card ${selectedItems.has(item.id) ? "nice-inventory-manager__item-card--selected" : ""}`,
2427
2427
  onClick: () => onItemClick == null ? void 0 : onItemClick(item),
2428
2428
  children: [
@@ -2436,7 +2436,7 @@ const NiceInventoryManager = ({
2436
2436
  onClick: (e) => e.stopPropagation()
2437
2437
  }
2438
2438
  ),
2439
- config.showImages && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsx(te, { name: "box", size: 32 }) }) }),
2439
+ config.showImages && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsx(ee, { name: "box", size: 32 }) }) }),
2440
2440
  /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__item-info", children: [
2441
2441
  /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__item-sku", children: item.sku }),
2442
2442
  /* @__PURE__ */ jsx("h4", { className: "nice-inventory-manager__item-name", children: item.name }),
@@ -2457,7 +2457,7 @@ const NiceInventoryManager = ({
2457
2457
  item.unit
2458
2458
  ] }),
2459
2459
  item.quantity <= item.reorderLevel && /* @__PURE__ */ jsxs("span", { className: "nice-inventory-manager__reorder-alert", children: [
2460
- /* @__PURE__ */ jsx(te, { name: "warning", size: 12 }),
2460
+ /* @__PURE__ */ jsx(ee, { name: "warning", size: 12 }),
2461
2461
  " ",
2462
2462
  t("inventoryManager.lowStock", "Low Stock")
2463
2463
  ] })
@@ -2482,7 +2482,7 @@ const NiceInventoryManager = ({
2482
2482
  t("inventoryManager.sku", "SKU"),
2483
2483
  " ",
2484
2484
  sortBy === "sku" && /* @__PURE__ */ jsx(
2485
- te,
2485
+ ee,
2486
2486
  {
2487
2487
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2488
2488
  size: 12
@@ -2502,7 +2502,7 @@ const NiceInventoryManager = ({
2502
2502
  t("inventoryManager.name", "Name"),
2503
2503
  " ",
2504
2504
  sortBy === "name" && /* @__PURE__ */ jsx(
2505
- te,
2505
+ ee,
2506
2506
  {
2507
2507
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2508
2508
  size: 12
@@ -2523,7 +2523,7 @@ const NiceInventoryManager = ({
2523
2523
  t("inventoryManager.qty", "Qty"),
2524
2524
  " ",
2525
2525
  sortBy === "quantity" && /* @__PURE__ */ jsx(
2526
- te,
2526
+ ee,
2527
2527
  {
2528
2528
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2529
2529
  size: 12
@@ -2545,7 +2545,7 @@ const NiceInventoryManager = ({
2545
2545
  t("inventoryManager.value", "Value"),
2546
2546
  " ",
2547
2547
  sortBy === "value" && /* @__PURE__ */ jsx(
2548
- te,
2548
+ ee,
2549
2549
  {
2550
2550
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2551
2551
  size: 12
@@ -2608,7 +2608,7 @@ const NiceInventoryManager = ({
2608
2608
  setEditingItem(item);
2609
2609
  setShowItemModal(true);
2610
2610
  },
2611
- children: /* @__PURE__ */ jsx(te, { name: "edit", size: 14 })
2611
+ children: /* @__PURE__ */ jsx(ee, { name: "edit", size: 14 })
2612
2612
  }
2613
2613
  ),
2614
2614
  /* @__PURE__ */ jsx(
@@ -2620,7 +2620,7 @@ const NiceInventoryManager = ({
2620
2620
  setNewTransaction({ itemId: item.id });
2621
2621
  setShowTransactionModal(true);
2622
2622
  },
2623
- children: /* @__PURE__ */ jsx(te, { name: "clipboard", size: 14 })
2623
+ children: /* @__PURE__ */ jsx(ee, { name: "clipboard", size: 14 })
2624
2624
  }
2625
2625
  ),
2626
2626
  /* @__PURE__ */ jsx(
@@ -2631,7 +2631,7 @@ const NiceInventoryManager = ({
2631
2631
  e.stopPropagation();
2632
2632
  onItemDelete == null ? void 0 : onItemDelete(item.id);
2633
2633
  },
2634
- children: /* @__PURE__ */ jsx(te, { name: "trash", size: 14 })
2634
+ children: /* @__PURE__ */ jsx(ee, { name: "trash", size: 14 })
2635
2635
  }
2636
2636
  )
2637
2637
  ] })
@@ -2664,7 +2664,7 @@ const NiceInventoryManager = ({
2664
2664
  {
2665
2665
  role: onItemClick ? "button" : void 0,
2666
2666
  tabIndex: onItemClick ? 0 : void 0,
2667
- onKeyDown: onItemClick ? Et : void 0,
2667
+ onKeyDown: onItemClick ? wt : void 0,
2668
2668
  className: "nice-inventory-manager__kanban-card",
2669
2669
  onClick: () => onItemClick == null ? void 0 : onItemClick(item),
2670
2670
  children: [
@@ -2698,7 +2698,7 @@ const NiceInventoryManager = ({
2698
2698
  /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__transactions-list", children: recentTransactions.map((tx) => {
2699
2699
  const item = items.find((i2) => i2.id === tx.itemId);
2700
2700
  return /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__transaction-item", children: [
2701
- /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsx(te, { name: getTransactionIcon(tx.type), size: 16 }) }),
2701
+ /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsx(ee, { name: getTransactionIcon(tx.type), size: 16 }) }),
2702
2702
  /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__tx-info", children: [
2703
2703
  /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-type", children: tx.type }),
2704
2704
  /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__tx-item", children: (item == null ? void 0 : item.name) || tx.itemId })
@@ -2722,7 +2722,7 @@ const NiceInventoryManager = ({
2722
2722
  }) })
2723
2723
  ] }),
2724
2724
  activeTab === "reorder" && /* @__PURE__ */ jsx("div", { className: "nice-inventory-manager__reorder-tab", children: reorderItems.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "nice-inventory-manager__empty-state", children: [
2725
- /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsx(te, { name: "success", size: 32 }) }),
2725
+ /* @__PURE__ */ jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsx(ee, { name: "success", size: 32 }) }),
2726
2726
  /* @__PURE__ */ jsx("p", { children: t(
2727
2727
  "inventoryManager.allItemsAreSufficientlyStocked",
2728
2728
  "All items are sufficiently stocked"
@@ -3061,7 +3061,9 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3061
3061
  density = "comfortable",
3062
3062
  className,
3063
3063
  style,
3064
- id
3064
+ id,
3065
+ testId,
3066
+ "data-testid": dataTestId
3065
3067
  }, ref) {
3066
3068
  var _a;
3067
3069
  const { t } = v();
@@ -3111,6 +3113,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3111
3113
  className: `nice-invoice-view nice-invoice-view--${density} ${className ?? ""}`,
3112
3114
  style,
3113
3115
  "aria-label": `${L.invoiceNumber} ${invoice.invoiceNumber}`,
3116
+ "data-testid": dataTestId ?? testId,
3114
3117
  children: [
3115
3118
  !(hideSections == null ? void 0 : hideSections.header) && /* @__PURE__ */ jsxs("header", { className: "nice-invoice-view__header", children: [
3116
3119
  /* @__PURE__ */ jsxs("div", { children: [
@@ -3152,7 +3155,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3152
3155
  onClick: () => onAction == null ? void 0 : onAction("download"),
3153
3156
  "aria-label": t("invoiceView.download", "Download"),
3154
3157
  title: t("invoiceView.download", "Download"),
3155
- children: /* @__PURE__ */ jsx(te, { name: "arrow-down", size: 12 })
3158
+ children: /* @__PURE__ */ jsx(ee, { name: "arrow-down", size: 12 })
3156
3159
  }
3157
3160
  ),
3158
3161
  /* @__PURE__ */ jsx(
@@ -3162,7 +3165,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3162
3165
  onClick: () => onAction == null ? void 0 : onAction("print"),
3163
3166
  "aria-label": t("invoiceView.print", "Print"),
3164
3167
  title: t("invoiceView.print", "Print"),
3165
- children: /* @__PURE__ */ jsx(te, { name: "printer", size: 14 })
3168
+ children: /* @__PURE__ */ jsx(ee, { name: "printer", size: 14 })
3166
3169
  }
3167
3170
  ),
3168
3171
  /* @__PURE__ */ jsx(
@@ -3172,7 +3175,7 @@ const NiceInvoiceView = /* @__PURE__ */ forwardRef(
3172
3175
  onClick: () => onAction == null ? void 0 : onAction("send"),
3173
3176
  "aria-label": t("invoiceView.send", "Send"),
3174
3177
  title: t("invoiceView.send", "Send"),
3175
- children: /* @__PURE__ */ jsx(te, { name: "mail", size: 14 })
3178
+ children: /* @__PURE__ */ jsx(ee, { name: "mail", size: 14 })
3176
3179
  }
3177
3180
  )
3178
3181
  ] })
@@ -3314,7 +3317,9 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
3314
3317
  aisleEvery = 4,
3315
3318
  className,
3316
3319
  style,
3317
- id
3320
+ id,
3321
+ testId,
3322
+ "data-testid": dataTestId
3318
3323
  }, ref) {
3319
3324
  const { t } = v();
3320
3325
  const [hovered, setHovered] = useState(null);
@@ -3332,87 +3337,97 @@ const NiceWarehouseView = /* @__PURE__ */ forwardRef(
3332
3337
  return [...rows.entries()].map(([rowKey, arr]) => ({ rowKey, cells: arr }));
3333
3338
  }, [cells]);
3334
3339
  const gridRef = useRef(null);
3335
- Xa(gridRef);
3336
- return /* @__PURE__ */ jsxs("div", { ref, id, className: `nice-warehouse-view ${className ?? ""}`, style, children: [
3337
- /* @__PURE__ */ jsxs("header", { className: "nice-warehouse-view__header", children: [
3338
- /* @__PURE__ */ jsx("h3", { children: warehouseName }),
3339
- showLegend && /* @__PURE__ */ jsxs(
3340
- "div",
3341
- {
3342
- className: "nice-warehouse-view__legend",
3343
- "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3344
- children: [
3345
- /* @__PURE__ */ jsx("span", { style: { background: colors.low } }),
3346
- " ",
3347
- t("warehouseView.low", "low"),
3348
- /* @__PURE__ */ jsx("span", { style: { background: colors.mid } }),
3349
- " ",
3350
- t("warehouseView.mid", "mid"),
3351
- /* @__PURE__ */ jsx("span", { style: { background: colors.high } }),
3352
- " ",
3353
- t("warehouseView.high", "high")
3354
- ]
3355
- }
3356
- )
3357
- ] }),
3358
- /* @__PURE__ */ jsx(
3359
- "div",
3360
- {
3361
- ref: gridRef,
3362
- className: "nice-warehouse-view__grid",
3363
- role: "grid",
3364
- "aria-label": warehouseName,
3365
- children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3366
- const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3367
- const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3368
- return /* @__PURE__ */ jsxs(De$1.Fragment, { children: [
3369
- aisleBreak && /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3370
- /* @__PURE__ */ jsx(
3371
- "button",
3372
- {
3373
- type: "button",
3374
- role: "gridcell",
3375
- className: "nice-warehouse-view__cell",
3376
- style: {
3377
- width: cellSize,
3378
- height: cellSize,
3379
- background: colorFor(c2.occupancy, colors)
3380
- },
3381
- title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3382
- onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3383
- onMouseEnter: () => setHovered(c2),
3384
- onMouseLeave: () => setHovered(null),
3385
- onFocus: () => setHovered(c2),
3386
- onBlur: () => setHovered(null),
3387
- children: /* @__PURE__ */ jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3388
- }
3389
- )
3390
- ] }, key);
3391
- }) }, rowKey))
3392
- }
3393
- ),
3394
- hovered && /* @__PURE__ */ jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3395
- /* @__PURE__ */ jsxs("strong", { children: [
3396
- hovered.location.rack,
3397
- "/",
3398
- hovered.location.shelf,
3399
- "/",
3400
- hovered.location.bin
3401
- ] }),
3402
- /* @__PURE__ */ jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3403
- /* @__PURE__ */ jsxs("ul", { children: [
3404
- hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxs("li", { children: [
3405
- it.sku,
3406
- " — ",
3407
- it.name
3408
- ] }, it.id)),
3409
- hovered.items.length > 5 && /* @__PURE__ */ jsxs("li", { children: [
3410
- "…+",
3411
- hovered.items.length - 5
3340
+ Wa(gridRef);
3341
+ return /* @__PURE__ */ jsxs(
3342
+ "div",
3343
+ {
3344
+ ref,
3345
+ id,
3346
+ className: `nice-warehouse-view ${className ?? ""}`,
3347
+ style,
3348
+ "data-testid": dataTestId ?? testId,
3349
+ children: [
3350
+ /* @__PURE__ */ jsxs("header", { className: "nice-warehouse-view__header", children: [
3351
+ /* @__PURE__ */ jsx("h3", { children: warehouseName }),
3352
+ showLegend && /* @__PURE__ */ jsxs(
3353
+ "div",
3354
+ {
3355
+ className: "nice-warehouse-view__legend",
3356
+ "aria-label": t("warehouseView.occupancyLegend", "Occupancy legend"),
3357
+ children: [
3358
+ /* @__PURE__ */ jsx("span", { style: { background: colors.low } }),
3359
+ " ",
3360
+ t("warehouseView.low", "low"),
3361
+ /* @__PURE__ */ jsx("span", { style: { background: colors.mid } }),
3362
+ " ",
3363
+ t("warehouseView.mid", "mid"),
3364
+ /* @__PURE__ */ jsx("span", { style: { background: colors.high } }),
3365
+ " ",
3366
+ t("warehouseView.high", "high")
3367
+ ]
3368
+ }
3369
+ )
3370
+ ] }),
3371
+ /* @__PURE__ */ jsx(
3372
+ "div",
3373
+ {
3374
+ ref: gridRef,
3375
+ className: "nice-warehouse-view__grid",
3376
+ role: "grid",
3377
+ "aria-label": warehouseName,
3378
+ children: grid.map(({ rowKey, cells: row }) => /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__row", role: "row", children: row.map((c2, idx) => {
3379
+ const key = [c2.location.rack, c2.location.aisle, c2.location.shelf, c2.location.bin].filter(Boolean).join("-") || String(idx);
3380
+ const aisleBreak = aisleEvery > 0 && idx > 0 && idx % aisleEvery === 0;
3381
+ return /* @__PURE__ */ jsxs(De$1.Fragment, { children: [
3382
+ aisleBreak && /* @__PURE__ */ jsx("div", { className: "nice-warehouse-view__aisle", "aria-hidden": true }),
3383
+ /* @__PURE__ */ jsx(
3384
+ "button",
3385
+ {
3386
+ type: "button",
3387
+ role: "gridcell",
3388
+ className: "nice-warehouse-view__cell",
3389
+ style: {
3390
+ width: cellSize,
3391
+ height: cellSize,
3392
+ background: colorFor(c2.occupancy, colors)
3393
+ },
3394
+ title: t("warehouseView.items", "{key} — {occupancy}% ({items} items)").replace("{key}", String(key)).replace("{occupancy}", String((c2.occupancy * 100).toFixed(0))).replace("{items}", String(c2.items.length)),
3395
+ onClick: () => onCellClick == null ? void 0 : onCellClick(c2),
3396
+ onMouseEnter: () => setHovered(c2),
3397
+ onMouseLeave: () => setHovered(null),
3398
+ onFocus: () => setHovered(c2),
3399
+ onBlur: () => setHovered(null),
3400
+ children: /* @__PURE__ */ jsx("span", { className: "nice-warehouse-view__bin", children: c2.location.bin ?? c2.location.shelf ?? "" })
3401
+ }
3402
+ )
3403
+ ] }, key);
3404
+ }) }, rowKey))
3405
+ }
3406
+ ),
3407
+ hovered && /* @__PURE__ */ jsxs("aside", { className: "nice-warehouse-view__details", "aria-live": "polite", children: [
3408
+ /* @__PURE__ */ jsxs("strong", { children: [
3409
+ hovered.location.rack,
3410
+ "/",
3411
+ hovered.location.shelf,
3412
+ "/",
3413
+ hovered.location.bin
3414
+ ] }),
3415
+ /* @__PURE__ */ jsx("div", { children: t("warehouseView.itemsFull", "{items} items · {occupancy}% full").replace("{items}", String(hovered.items.length)).replace("{occupancy}", String((hovered.occupancy * 100).toFixed(0))) }),
3416
+ /* @__PURE__ */ jsxs("ul", { children: [
3417
+ hovered.items.slice(0, 5).map((it) => /* @__PURE__ */ jsxs("li", { children: [
3418
+ it.sku,
3419
+ " — ",
3420
+ it.name
3421
+ ] }, it.id)),
3422
+ hovered.items.length > 5 && /* @__PURE__ */ jsxs("li", { children: [
3423
+ "…+",
3424
+ hovered.items.length - 5
3425
+ ] })
3426
+ ] })
3412
3427
  ] })
3413
- ] })
3414
- ] })
3415
- ] });
3428
+ ]
3429
+ }
3430
+ );
3416
3431
  }
3417
3432
  );
3418
3433
  const EMPTY_ORDERS = [];
@@ -3596,7 +3611,9 @@ const NiceHRDashboard = /* @__PURE__ */ forwardRef(
3596
3611
  onWidgetClick,
3597
3612
  className,
3598
3613
  style,
3599
- id
3614
+ id,
3615
+ testId,
3616
+ "data-testid": dataTestId
3600
3617
  }, ref) {
3601
3618
  const { t } = v();
3602
3619
  const L = {
@@ -3650,6 +3667,7 @@ const NiceHRDashboard = /* @__PURE__ */ forwardRef(
3650
3667
  style,
3651
3668
  role: "group",
3652
3669
  "aria-label": t("hrDashboard.hrDashboard", "HR dashboard"),
3670
+ "data-testid": dataTestId ?? testId,
3653
3671
  children: [
3654
3672
  !(hideWidgets == null ? void 0 : hideWidgets.headcount) && /* @__PURE__ */ jsx(
3655
3673
  Widget,
@@ -3793,7 +3811,9 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3793
3811
  density = "comfortable",
3794
3812
  className,
3795
3813
  style,
3796
- id
3814
+ id,
3815
+ testId,
3816
+ "data-testid": dataTestId
3797
3817
  }, ref) {
3798
3818
  const { t } = v();
3799
3819
  const [internal, setInternal] = useState(rates ?? NICE_VAT_PRESETS[country]);
@@ -3833,7 +3853,7 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3833
3853
  };
3834
3854
  const removeRow = (idx) => {
3835
3855
  const code = internal[idx].code;
3836
- const next = internal.filter((_2, i2) => i2 !== idx);
3856
+ const next = internal.filter((_, i2) => i2 !== idx);
3837
3857
  update(next);
3838
3858
  onRemove == null ? void 0 : onRemove(code);
3839
3859
  };
@@ -3844,6 +3864,7 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3844
3864
  id,
3845
3865
  className: `nice-vat-table nice-vat-table--${density} ${className ?? ""}`,
3846
3866
  style,
3867
+ "data-testid": dataTestId ?? testId,
3847
3868
  children: [
3848
3869
  /* @__PURE__ */ jsxs("table", { children: [
3849
3870
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
@@ -3886,7 +3907,7 @@ const NiceVatTable = /* @__PURE__ */ forwardRef(
3886
3907
  onChange: (e) => onCellEdit(idx, "description", e.target.value)
3887
3908
  }
3888
3909
  ) : r.description ?? "" }),
3889
- editable && /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsx(te, { name: "close", size: 14 }) }) })
3910
+ editable && /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsx(ee, { name: "close", size: 14 }) }) })
3890
3911
  ] }, r.code)) })
3891
3912
  ] }),
3892
3913
  editable && /* @__PURE__ */ jsx("button", { type: "button", className: "nice-vat-table__add", onClick: addRow, children: L.add })
@@ -3960,7 +3981,9 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
3960
3981
  labels,
3961
3982
  className,
3962
3983
  style,
3963
- id
3984
+ id,
3985
+ testId,
3986
+ "data-testid": dataTestId
3964
3987
  }, ref) {
3965
3988
  const { t } = v();
3966
3989
  const today = /* @__PURE__ */ new Date();
@@ -4000,36 +4023,46 @@ const NiceJpkExporter = /* @__PURE__ */ forwardRef(
4000
4023
  URL.revokeObjectURL(url);
4001
4024
  }
4002
4025
  }, [format, from, to, taxpayer, invoices, buildXml, onExport, filenameFor]);
4003
- return /* @__PURE__ */ jsxs("div", { ref, id, className: `nice-jpk-exporter ${className ?? ""}`, style, children: [
4004
- /* @__PURE__ */ jsxs("label", { children: [
4005
- L.format,
4006
- /* @__PURE__ */ jsxs(
4007
- "select",
4008
- {
4009
- value: format,
4010
- onChange: (e) => setFormat(e.target.value),
4011
- children: [
4012
- /* @__PURE__ */ jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4013
- /* @__PURE__ */ jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4014
- /* @__PURE__ */ jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4015
- ]
4016
- }
4017
- )
4018
- ] }),
4019
- /* @__PURE__ */ jsxs("label", { children: [
4020
- L.from,
4021
- /* @__PURE__ */ jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4022
- ] }),
4023
- /* @__PURE__ */ jsxs("label", { children: [
4024
- L.to,
4025
- /* @__PURE__ */ jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4026
- ] }),
4027
- /* @__PURE__ */ jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4028
- /* @__PURE__ */ jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4029
- "{invoices}",
4030
- String(invoices.length)
4031
- ) })
4032
- ] });
4026
+ return /* @__PURE__ */ jsxs(
4027
+ "div",
4028
+ {
4029
+ ref,
4030
+ id,
4031
+ className: `nice-jpk-exporter ${className ?? ""}`,
4032
+ style,
4033
+ "data-testid": dataTestId ?? testId,
4034
+ children: [
4035
+ /* @__PURE__ */ jsxs("label", { children: [
4036
+ L.format,
4037
+ /* @__PURE__ */ jsxs(
4038
+ "select",
4039
+ {
4040
+ value: format,
4041
+ onChange: (e) => setFormat(e.target.value),
4042
+ children: [
4043
+ /* @__PURE__ */ jsx("option", { value: "JPK_V7M", children: "JPK_V7M" }),
4044
+ /* @__PURE__ */ jsx("option", { value: "JPK_V7K", children: "JPK_V7K" }),
4045
+ /* @__PURE__ */ jsx("option", { value: "JPK_FA", children: "JPK_FA" })
4046
+ ]
4047
+ }
4048
+ )
4049
+ ] }),
4050
+ /* @__PURE__ */ jsxs("label", { children: [
4051
+ L.from,
4052
+ /* @__PURE__ */ jsx("input", { type: "date", value: from, onChange: (e) => setFrom(e.target.value) })
4053
+ ] }),
4054
+ /* @__PURE__ */ jsxs("label", { children: [
4055
+ L.to,
4056
+ /* @__PURE__ */ jsx("input", { type: "date", value: to, onChange: (e) => setTo(e.target.value) })
4057
+ ] }),
4058
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: exportNow, children: L.export }),
4059
+ /* @__PURE__ */ jsx("small", { children: t("jpkExporter.invoicesReady", "{invoices} invoices ready").replace(
4060
+ "{invoices}",
4061
+ String(invoices.length)
4062
+ ) })
4063
+ ]
4064
+ }
4065
+ );
4033
4066
  }
4034
4067
  );
4035
4068
  export {