@nice2dev/ui-erp 1.3.8 → 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 +287 -287
  2. package/dist/index.mjs +287 -287
  3. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -7,7 +7,7 @@ function v() {
7
7
  const e = De$1.useContext(c), t = De$1.useContext(i);
8
8
  return { t: e, lang: t };
9
9
  }
10
- const gt = /* @__PURE__ */ new Set([
10
+ const Mt = /* @__PURE__ */ new Set([
11
11
  "",
12
12
  "text",
13
13
  "search",
@@ -15,7 +15,7 @@ const gt = /* @__PURE__ */ new Set([
15
15
  "url",
16
16
  "tel",
17
17
  "password"
18
- ]), Pe = /* @__PURE__ */ new Set([
18
+ ]), Te = /* @__PURE__ */ new Set([
19
19
  "number",
20
20
  "range",
21
21
  "date",
@@ -23,7 +23,7 @@ const gt = /* @__PURE__ */ new Set([
23
23
  "datetime-local",
24
24
  "month",
25
25
  "week"
26
- ]), Ut = /* @__PURE__ */ new Set([
26
+ ]), jt = /* @__PURE__ */ new Set([
27
27
  "checkbox",
28
28
  "radio",
29
29
  "button",
@@ -32,7 +32,7 @@ const gt = /* @__PURE__ */ new Set([
32
32
  "file",
33
33
  "image",
34
34
  "color"
35
- ]), Gt = /* @__PURE__ */ new Set([
35
+ ]), Ut = /* @__PURE__ */ new Set([
36
36
  "button",
37
37
  "link",
38
38
  "checkbox",
@@ -44,22 +44,22 @@ const gt = /* @__PURE__ */ new Set([
44
44
  "menuitemradio",
45
45
  "option",
46
46
  "treeitem"
47
- ]), bt = (n) => n instanceof HTMLInputElement && gt.has(n.type), De = (n) => n instanceof HTMLTextAreaElement, yt = (n) => n instanceof HTMLElement && n.isContentEditable;
48
- function qt(n, e) {
47
+ ]), gt = (n) => n instanceof HTMLInputElement && Mt.has(n.type), Pe = (n) => n instanceof HTMLTextAreaElement, bt = (n) => n instanceof HTMLElement && n.isContentEditable;
48
+ function Gt(n, e) {
49
49
  const { intent: t, direction: a2 } = e;
50
- 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;
50
+ 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;
51
51
  }
52
- function wt(n) {
52
+ function yt(n) {
53
53
  if (n instanceof HTMLButtonElement || n.tagName === "SUMMARY")
54
54
  return true;
55
55
  if (n instanceof HTMLAnchorElement)
56
56
  return n.hasAttribute("href");
57
57
  if (n instanceof HTMLInputElement)
58
- return Ut.has(n.type);
58
+ return jt.has(n.type);
59
59
  const e = n.getAttribute("role");
60
- return e !== null && Gt.has(e);
60
+ return e !== null && Ut.has(e);
61
61
  }
62
- function $t(n) {
62
+ function qt(n) {
63
63
  if (typeof n.click == "function") {
64
64
  n.click();
65
65
  return;
@@ -73,7 +73,7 @@ function $t(n) {
73
73
  })
74
74
  );
75
75
  }
76
- function Et(n) {
76
+ function wt(n) {
77
77
  if (n.defaultPrevented || n.repeat || n.target !== n.currentTarget || n.key !== "Enter" && n.key !== " " && n.key !== "Spacebar")
78
78
  return;
79
79
  const e = n.currentTarget;
@@ -93,34 +93,34 @@ function Et(n) {
93
93
  })
94
94
  );
95
95
  }
96
- function me(n) {
96
+ function ve(n) {
97
97
  const e = n.getAttribute("data-nice-engage");
98
98
  if (e === "value" || e === "text" || e === "popup" || e === "canvas")
99
99
  return e;
100
100
  if (e === "none")
101
101
  return null;
102
102
  const t = n.getAttribute("role");
103
- 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;
103
+ 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;
104
104
  }
105
- function kt(n, e) {
105
+ function Et(n, e) {
106
106
  return e === "popup" ? n.getAttribute("aria-expanded") === "true" : n.hasAttribute("data-nice-engaged");
107
107
  }
108
- function ce(n) {
109
- return n instanceof HTMLSelectElement || n instanceof HTMLInputElement && Pe.has(n.type);
108
+ function ie(n) {
109
+ return n instanceof HTMLSelectElement || n instanceof HTMLInputElement && Te.has(n.type);
110
110
  }
111
- function Me(n) {
111
+ function me(n) {
112
112
  n.dispatchEvent(new Event("input", { bubbles: true })), n.dispatchEvent(new Event("change", { bubbles: true }));
113
113
  }
114
- function Ie(n, e) {
114
+ function De(n, e) {
115
115
  var r;
116
116
  const t = Object.getPrototypeOf(n), a2 = (r = Object.getOwnPropertyDescriptor(t, "value")) == null ? void 0 : r.set;
117
117
  a2 ? a2.call(n, e) : n.value = e;
118
118
  }
119
- const be = (n) => n instanceof HTMLInputElement && n.type === "number";
120
- function Wt(n, e) {
121
- n.value !== e && (Ie(n, e), Me(n));
119
+ const ge = (n) => n instanceof HTMLInputElement && n.type === "number";
120
+ function Yt(n, e) {
121
+ n.value !== e && (De(n, e), me(n));
122
122
  }
123
- function le(n, e, t = "step") {
123
+ function ce(n, e, t = "step") {
124
124
  const a2 = e === "up" || e === "right";
125
125
  if (n instanceof HTMLSelectElement) {
126
126
  const s = n.selectedIndex, o = n.options.length - 1;
@@ -130,12 +130,12 @@ function le(n, e, t = "step") {
130
130
  const i2 = t === "big" ? 10 : 1;
131
131
  n.selectedIndex = Math.max(0, Math.min(o, s + (a2 ? i2 : -i2)));
132
132
  }
133
- return n.selectedIndex !== s ? (Me(n), true) : false;
133
+ return n.selectedIndex !== s ? (me(n), true) : false;
134
134
  }
135
135
  const r = n.value;
136
136
  try {
137
137
  if (t === "edge" && (n.min !== "" || n.max !== ""))
138
- Ie(n, a2 ? n.max || n.value : n.min || n.value);
138
+ De(n, a2 ? n.max || n.value : n.min || n.value);
139
139
  else {
140
140
  const s = t === "big" ? 10 : 1;
141
141
  a2 ? n.stepUp(s) : n.stepDown(s);
@@ -143,15 +143,15 @@ function le(n, e, t = "step") {
143
143
  } catch {
144
144
  return false;
145
145
  }
146
- return n.value !== r ? (Me(n), true) : false;
146
+ return n.value !== r ? (me(n), true) : false;
147
147
  }
148
- function Xt(n, e) {
149
- if (!(bt(n) || De(n)) || n.selectionStart === null || e !== "left" && e !== "right")
148
+ function Wt(n, e) {
149
+ if (!(gt(n) || Pe(n)) || n.selectionStart === null || e !== "left" && e !== "right")
150
150
  return false;
151
151
  const t = n.selectionStart + (e === "right" ? 1 : -1), a2 = Math.max(0, Math.min(n.value.length, t));
152
152
  return n.setSelectionRange(a2, a2), true;
153
153
  }
154
- const xt = {
154
+ const kt = {
155
155
  // Navigation
156
156
  "chevron-down": "M6 9l6 6 6-6",
157
157
  "chevron-up": "M18 15l-6-6-6 6",
@@ -417,14 +417,14 @@ const xt = {
417
417
  "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",
418
418
  "key-space": "M4 10v4h16v-4",
419
419
  "key-caps": "M12 4l-7 7h4v5h6v-5h4z M8 20h8"
420
- }, Jt = {
420
+ }, Xt = {
421
421
  xs: 12,
422
422
  sm: 16,
423
423
  md: 20,
424
424
  lg: 24,
425
425
  xl: 32
426
- }, Oe = /* @__PURE__ */ De$1.createContext({});
427
- function Zt({
426
+ }, Ie = /* @__PURE__ */ De$1.createContext({});
427
+ function Jt({
428
428
  path: n,
429
429
  size: e,
430
430
  className: t,
@@ -449,7 +449,7 @@ function Zt({
449
449
  style: a2,
450
450
  role: o ? "button" : s ? "img" : "presentation",
451
451
  tabIndex: o ? 0 : void 0,
452
- onKeyDown: o ? Et : void 0,
452
+ onKeyDown: o ? wt : void 0,
453
453
  "aria-label": s,
454
454
  "aria-hidden": o ? void 0 : !s,
455
455
  onClick: o,
@@ -460,7 +460,7 @@ function Zt({
460
460
  }
461
461
  );
462
462
  }
463
- const te = ({
463
+ const ee = ({
464
464
  name: n,
465
465
  size: e = "md",
466
466
  className: t,
@@ -469,7 +469,7 @@ const te = ({
469
469
  title: s,
470
470
  onClick: o
471
471
  }) => {
472
- const { resolver: i2 } = De$1.useContext(Oe), c2 = typeof e == "number" ? e : Jt[e];
472
+ const { resolver: i2 } = De$1.useContext(Ie), c2 = typeof e == "number" ? e : Xt[e];
473
473
  if (i2) {
474
474
  const u = i2(n, c2);
475
475
  if (u)
@@ -478,7 +478,7 @@ const te = ({
478
478
  {
479
479
  role: o ? "button" : void 0,
480
480
  tabIndex: o ? 0 : void 0,
481
- onKeyDown: o ? Et : void 0,
481
+ onKeyDown: o ? wt : void 0,
482
482
  className: `nice-icon-wrap ${t || ""}`,
483
483
  style: a2,
484
484
  onClick: o,
@@ -486,9 +486,9 @@ const te = ({
486
486
  }
487
487
  );
488
488
  }
489
- const d = xt[n];
489
+ const d = kt[n];
490
490
  return d ? /* @__PURE__ */ jsxRuntime.jsx(
491
- Zt,
491
+ Jt,
492
492
  {
493
493
  path: d,
494
494
  size: c2,
@@ -500,7 +500,7 @@ const te = ({
500
500
  }
501
501
  ) : null;
502
502
  };
503
- const zt = [
503
+ const xt = [
504
504
  "a[href]",
505
505
  "area[href]",
506
506
  "button",
@@ -515,7 +515,7 @@ const zt = [
515
515
  "[tabindex]",
516
516
  "[data-nice-focusable]"
517
517
  ].join(",");
518
- function J(n) {
518
+ function X(n) {
519
519
  const e = n.getBoundingClientRect();
520
520
  return {
521
521
  left: e.left,
@@ -526,18 +526,18 @@ function J(n) {
526
526
  height: e.height
527
527
  };
528
528
  }
529
- const _e = (n) => n instanceof HTMLButtonElement || n instanceof HTMLInputElement || n instanceof HTMLSelectElement || n instanceof HTMLTextAreaElement;
530
- function Qt(n) {
531
- if (_e(n) && n.disabled || n.getAttribute("aria-disabled") === "true" && !n.hasAttribute("data-nice-focusable"))
529
+ const Fe = (n) => n instanceof HTMLButtonElement || n instanceof HTMLInputElement || n instanceof HTMLSelectElement || n instanceof HTMLTextAreaElement;
530
+ function Zt(n) {
531
+ if (Fe(n) && n.disabled || n.getAttribute("aria-disabled") === "true" && !n.hasAttribute("data-nice-focusable"))
532
532
  return true;
533
533
  const e = n.closest("fieldset[disabled]");
534
- if (e && _e(n)) {
534
+ if (e && Fe(n)) {
535
535
  const t = e.querySelector(":scope > legend");
536
536
  return !(t && t.contains(n));
537
537
  }
538
538
  return false;
539
539
  }
540
- function en(n) {
540
+ function Qt(n) {
541
541
  var a2;
542
542
  if (n.closest("[hidden]"))
543
543
  return false;
@@ -550,7 +550,7 @@ function en(n) {
550
550
  const t = (a2 = n.ownerDocument.defaultView) == null ? void 0 : a2.getComputedStyle(n);
551
551
  return !t || t.display !== "none" && t.visibility !== "hidden" && t.visibility !== "collapse";
552
552
  }
553
- function tn(n) {
553
+ function en(n) {
554
554
  if (!(n instanceof HTMLInputElement) || n.type !== "radio" || !n.name || n.checked)
555
555
  return true;
556
556
  const t = [...(n.form ?? n.ownerDocument).querySelectorAll('input[type="radio"]')].filter(
@@ -558,29 +558,29 @@ function tn(n) {
558
558
  );
559
559
  return !t.some((a2) => a2.checked) && t[0] === n;
560
560
  }
561
- function ne(n) {
562
- if (!(n instanceof HTMLElement) || !n.matches(zt))
561
+ function te(n) {
562
+ if (!(n instanceof HTMLElement) || !n.matches(xt))
563
563
  return false;
564
564
  if (!n.hasAttribute("data-nice-focusable")) {
565
565
  const e = n.getAttribute("tabindex");
566
566
  if (e !== null && Number(e) < 0 || n instanceof HTMLAnchorElement && !n.hasAttribute("href") && e === null)
567
567
  return false;
568
568
  }
569
- return n.closest('[inert],[aria-hidden="true"]') || Qt(n) ? false : en(n) && tn(n);
569
+ return n.closest('[inert],[aria-hidden="true"]') || Zt(n) ? false : Qt(n) && en(n);
570
570
  }
571
571
  function U(n, e = []) {
572
572
  const t = [];
573
- for (const a2 of n.querySelectorAll(zt))
574
- e.some((r) => r && r.contains(a2)) || ne(a2) && t.push(a2);
573
+ for (const a2 of n.querySelectorAll(xt))
574
+ e.some((r) => r && r.contains(a2)) || te(a2) && t.push(a2);
575
575
  return t;
576
576
  }
577
- const Be = typeof window > "u" ? De$1.useEffect : De$1.useLayoutEffect;
578
- function _(n, e, t) {
577
+ const _e = typeof window > "u" ? De$1.useEffect : De$1.useLayoutEffect;
578
+ function B(n, e, t) {
579
579
  const a2 = De$1.useRef({ el: null, deps: [] }), r = De$1.useRef(e);
580
- r.current = e, Be(() => {
580
+ r.current = e, _e(() => {
581
581
  const s = (n == null ? void 0 : n.current) ?? null, o = a2.current;
582
582
  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);
583
- }), Be(
583
+ }), _e(
584
584
  () => () => {
585
585
  const s = a2.current;
586
586
  typeof s.cleanup == "function" && s.cleanup(), a2.current = { el: null, deps: [] };
@@ -588,21 +588,21 @@ function _(n, e, t) {
588
588
  []
589
589
  );
590
590
  }
591
- const Ue = {
591
+ const je = {
592
592
  "045e": "xbox",
593
593
  "054c": "playstation",
594
594
  "057e": "nintendo",
595
595
  "28de": "steam"
596
596
  };
597
- function on(n) {
597
+ function sn(n) {
598
598
  var a2, r, s;
599
599
  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"));
600
- 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";
600
+ 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";
601
601
  }
602
- function cn(n, e) {
602
+ function on(n, e) {
603
603
  return e !== "auto" ? e : n === "nintendo" ? "east" : "south";
604
604
  }
605
- const Ht = ["up", "down", "left", "right"], Ee = {
605
+ const Ct = ["up", "down", "left", "right"], we = {
606
606
  navigate: ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"],
607
607
  activate: ["Enter", "Space"],
608
608
  back: ["Escape"],
@@ -618,7 +618,7 @@ const Ht = ["up", "down", "left", "right"], Ee = {
618
618
  last: ["End"],
619
619
  scroll: [],
620
620
  toggleHints: ["Shift+?"]
621
- }, $e = {
621
+ }, qe = {
622
622
  navigate: ["dpadUp", "dpadDown", "dpadLeft", "dpadRight"],
623
623
  activate: ["south"],
624
624
  back: ["east"],
@@ -634,7 +634,7 @@ const Ht = ["up", "down", "left", "right"], Ee = {
634
634
  last: [],
635
635
  scroll: [],
636
636
  toggleHints: ["leftStick"]
637
- }, Mn = {
637
+ }, mn = {
638
638
  " ": "Space",
639
639
  Spacebar: "Space",
640
640
  Esc: "Escape",
@@ -644,63 +644,63 @@ const Ht = ["up", "down", "left", "right"], Ee = {
644
644
  Left: "ArrowLeft",
645
645
  Right: "ArrowRight"
646
646
  };
647
- function Ve(n) {
648
- return Mn[n] ?? n;
647
+ function Re(n) {
648
+ return mn[n] ?? n;
649
649
  }
650
- function Nt(n) {
650
+ function Ht(n) {
651
651
  const e = n.endsWith("++") ? [...n.slice(0, -2).split("+"), "+"] : n.split("+"), t = e.pop() ?? "", a2 = new Set(e.map((r) => r.toLowerCase()));
652
652
  return {
653
- key: Ve(t),
653
+ key: Re(t),
654
654
  primary: a2.has("ctrl") || a2.has("cmd") || a2.has("meta") || a2.has("mod"),
655
655
  alt: a2.has("alt") || a2.has("option"),
656
656
  shift: a2.has("shift")
657
657
  };
658
658
  }
659
- const gn = (n) => n.length === 1 && n.toLowerCase() === n.toUpperCase();
660
- function Tt(n, e) {
661
- const t = Ve(e.key);
662
- 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;
659
+ const Mn = (n) => n.length === 1 && n.toLowerCase() === n.toUpperCase();
660
+ function Nt(n, e) {
661
+ const t = Re(e.key);
662
+ 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;
663
663
  }
664
- function Ye(n) {
664
+ function $e(n) {
665
665
  const e = {};
666
- for (const t of Object.keys(Ee)) {
667
- const a2 = n.keyboardBindings[t] ?? Ee[t];
668
- e[t] = a2.map(Nt);
666
+ for (const t of Object.keys(we)) {
667
+ const a2 = n.keyboardBindings[t] ?? we[t];
668
+ e[t] = a2.map(Ht);
669
669
  }
670
670
  return e;
671
671
  }
672
- function bn(n, e) {
672
+ function gn(n, e) {
673
673
  for (const t of Object.keys(e)) {
674
674
  const a2 = e[t];
675
675
  for (let r = 0; r < a2.length; r++)
676
- if (Tt(a2[r], n))
677
- return t === "navigate" ? { intent: t, direction: Ht[r] } : t === "view" ? { intent: t, direction: a2[r].shift ? "up" : "down" } : { intent: t };
676
+ if (Nt(a2[r], n))
677
+ return t === "navigate" ? { intent: t, direction: Ct[r] } : t === "view" ? { intent: t, direction: a2[r].shift ? "up" : "down" } : { intent: t };
678
678
  }
679
679
  return null;
680
680
  }
681
- const yn = /* @__PURE__ */ new Set(["GoBack", "BrowserBack", "XF86Back"]), wn = /* @__PURE__ */ new Set([461, 10009]);
682
- function En(n) {
683
- return yn.has(n.key) || wn.has(n.keyCode) ? { intent: "back" } : n.key === "ChannelUp" ? { intent: "sectionNext" } : n.key === "ChannelDown" ? { intent: "sectionPrev" } : null;
681
+ const bn = /* @__PURE__ */ new Set(["GoBack", "BrowserBack", "XF86Back"]), yn = /* @__PURE__ */ new Set([461, 10009]);
682
+ function wn(n) {
683
+ return bn.has(n.key) || yn.has(n.keyCode) ? { intent: "back" } : n.key === "ChannelUp" ? { intent: "sectionNext" } : n.key === "ChannelDown" ? { intent: "sectionPrev" } : null;
684
684
  }
685
- function ke(n, e) {
686
- const t = cn(e, n.confirmButton), a2 = t === "south" ? "east" : "south", r = {};
687
- for (const s of Object.keys($e)) {
685
+ function Ee(n, e) {
686
+ const t = on(e, n.confirmButton), a2 = t === "south" ? "east" : "south", r = {};
687
+ for (const s of Object.keys(qe)) {
688
688
  const o = n.gamepadBindings[s];
689
- o ? r[s] = [...o] : s === "activate" ? r[s] = [t] : s === "back" ? r[s] = [a2] : r[s] = [...$e[s]];
689
+ o ? r[s] = [...o] : s === "activate" ? r[s] = [t] : s === "back" ? r[s] = [a2] : r[s] = [...qe[s]];
690
690
  }
691
691
  return r;
692
692
  }
693
- function kn(n) {
693
+ function En(n) {
694
694
  const e = /* @__PURE__ */ new Map();
695
695
  for (const t of Object.keys(n))
696
696
  n[t].forEach((a2, r) => {
697
- e.has(a2) || e.set(a2, t === "navigate" ? { intent: t, direction: Ht[r] } : { intent: t });
697
+ e.has(a2) || e.set(a2, t === "navigate" ? { intent: t, direction: Ct[r] } : { intent: t });
698
698
  });
699
699
  return e;
700
700
  }
701
- const se = "data-nice-focus-scope", xe = `[${se}]`;
702
- function Pt(n) {
703
- const e = n.getAttribute(se), t = n.getAttribute("data-nice-scope-enter");
701
+ const re = "data-nice-focus-scope", ke = `[${re}]`;
702
+ function Tt(n) {
703
+ const e = n.getAttribute(re), t = n.getAttribute("data-nice-scope-enter");
704
704
  return {
705
705
  nav: e === "vertical" || e === "horizontal" || e === "grid" || e === "none" ? e : "spatial",
706
706
  wrap: n.hasAttribute("data-nice-scope-wrap"),
@@ -708,25 +708,25 @@ function Pt(n) {
708
708
  enter: t === "selected" || t === "first" ? t : "last"
709
709
  };
710
710
  }
711
- function We(n, e) {
711
+ function Ye(n, e) {
712
712
  var a2;
713
- const t = (a2 = n.parentElement) == null ? void 0 : a2.closest(xe);
713
+ const t = (a2 = n.parentElement) == null ? void 0 : a2.closest(ke);
714
714
  return t && e.contains(t) && t !== e ? t : e;
715
715
  }
716
- function zn(n) {
716
+ function xn(n) {
717
717
  var t, a2;
718
718
  const e = [];
719
- for (let r = (t = n.parentElement) == null ? void 0 : t.closest(xe); r; r = (a2 = r.parentElement) == null ? void 0 : a2.closest(xe))
719
+ for (let r = (t = n.parentElement) == null ? void 0 : t.closest(ke); r; r = (a2 = r.parentElement) == null ? void 0 : a2.closest(ke))
720
720
  e.push(r);
721
721
  return e;
722
722
  }
723
- function An(n) {
723
+ function zn(n) {
724
724
  var t;
725
725
  const e = (t = n.closest("[data-nice-arrows]")) == null ? void 0 : t.getAttribute("data-nice-arrows");
726
726
  return e === "spatial" || e === "native" ? e : null;
727
727
  }
728
- 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));
729
- function Sn(n, e, t) {
728
+ 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));
729
+ function An(n, e, t) {
730
730
  switch (t) {
731
731
  case "right":
732
732
  return e.left >= n.right - G;
@@ -738,7 +738,7 @@ function Sn(n, e, t) {
738
738
  return e.bottom <= n.top + G;
739
739
  }
740
740
  }
741
- function Ln(n, e, t) {
741
+ function Sn(n, e, t) {
742
742
  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;
743
743
  switch (t) {
744
744
  case "right":
@@ -751,20 +751,20 @@ function Ln(n, e, t) {
751
751
  return o < r - G;
752
752
  }
753
753
  }
754
- function Cn(n, e, t) {
754
+ function Ln(n, e, t) {
755
755
  let a2, r, s;
756
- 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)));
757
- const o = Je(t) ? Xe.horizontal : Xe.vertical;
756
+ 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)));
757
+ const o = Xe(t) ? We.horizontal : We.vertical;
758
758
  return Math.max(0, a2) + r * o + s * 0.01;
759
759
  }
760
- function Dt(n, e, t, a2) {
760
+ function Pt(n, e, t, a2) {
761
761
  const r = e.map(t);
762
- for (const s of [Sn, Ln]) {
762
+ for (const s of [An, Sn]) {
763
763
  let o = -1, i2 = 1 / 0;
764
764
  for (let c2 = 0; c2 < r.length; c2++) {
765
765
  if (!s(n, r[c2], a2))
766
766
  continue;
767
- const d = Cn(n, r[c2], a2);
767
+ const d = Ln(n, r[c2], a2);
768
768
  d < i2 && (i2 = d, o = c2);
769
769
  }
770
770
  if (o >= 0)
@@ -772,11 +772,11 @@ function Dt(n, e, t, a2) {
772
772
  }
773
773
  return null;
774
774
  }
775
- const de = (n) => n === "left" || n === "right", Hn = (n) => {
775
+ const ue = (n) => n === "left" || n === "right", Cn = (n) => {
776
776
  var e;
777
777
  return ((e = n.ownerDocument.defaultView) == null ? void 0 : e.getComputedStyle(n).direction) === "rtl";
778
778
  };
779
- function Nn(n, e, t, a2) {
779
+ function Hn(n, e, t, a2) {
780
780
  if (n.length === 0)
781
781
  return null;
782
782
  const r = (s) => !!(e.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING);
@@ -787,51 +787,51 @@ function Nn(n, e, t, a2) {
787
787
  return n[s];
788
788
  return a2 ? n[n.length - 1] : null;
789
789
  }
790
- const Tn = '[aria-selected="true"],[aria-checked="true"],[aria-current]:not([aria-current="false"]),:checked';
791
- function Pn(n, e, t) {
790
+ const Nn = '[aria-selected="true"],[aria-checked="true"],[aria-current]:not([aria-current="false"]),:checked';
791
+ function Tn(n, e, t) {
792
792
  let a2 = null;
793
793
  for (let s = n.parentElement; s && !s.contains(e); s = s.parentElement)
794
- s.hasAttribute(se) && (a2 = s);
794
+ s.hasAttribute(re) && (a2 = s);
795
795
  if (!a2)
796
796
  return n;
797
- const r = Pt(a2).enter;
797
+ const r = Tt(a2).enter;
798
798
  if (r === "last") {
799
799
  const s = t.get(a2);
800
- return s && s.isConnected && a2.contains(s) && ne(s) ? s : n;
800
+ return s && s.isConnected && a2.contains(s) && te(s) ? s : n;
801
801
  }
802
- return r === "selected" ? [...a2.querySelectorAll(Tn)].find(ne) ?? n : U(a2)[0] ?? n;
802
+ return r === "selected" ? [...a2.querySelectorAll(Nn)].find(te) ?? n : U(a2)[0] ?? n;
803
803
  }
804
- function Dn(n, e, t) {
805
- const a2 = J(n);
806
- let r = We(n, t.root), s = null;
804
+ function Pn(n, e, t) {
805
+ const a2 = X(n);
806
+ let r = Ye(n, t.root), s = null;
807
807
  for (; ; ) {
808
- const o = Pt(r);
809
- if (o.nav === "spatial" || o.nav === "grid" || o.nav === "vertical" && !de(e) || o.nav === "horizontal" && de(e)) {
808
+ const o = Tt(r);
809
+ if (o.nav === "spatial" || o.nav === "grid" || o.nav === "vertical" && !ue(e) || o.nav === "horizontal" && ue(e)) {
810
810
  const c2 = U(r, [n, s]);
811
811
  let d;
812
812
  if (o.nav === "vertical" || o.nav === "horizontal") {
813
813
  let u = e === "down" || e === "right";
814
- de(e) && Hn(r) && (u = !u), d = Nn(c2, n, u, o.wrap);
814
+ ue(e) && Cn(r) && (u = !u), d = Hn(c2, n, u, o.wrap);
815
815
  } else
816
- d = Dt(a2, c2, J, e);
816
+ d = Pt(a2, c2, X, e);
817
817
  if (d)
818
- return Pn(d, n, t.memory);
818
+ return Tn(d, n, t.memory);
819
819
  }
820
820
  if (r === t.root || o.trap)
821
821
  return null;
822
- s = r, r = We(r, t.root);
822
+ s = r, r = Ye(r, t.root);
823
823
  }
824
824
  }
825
- function Qe(n, e) {
825
+ function Ze(n, e) {
826
826
  const t = e.left + e.width / 2, a2 = e.top + e.height / 2;
827
827
  let r = null, s = 1 / 0;
828
828
  for (const o of U(n)) {
829
- const i2 = J(o), c2 = Math.hypot(i2.left + i2.width / 2 - t, i2.top + i2.height / 2 - a2);
829
+ const i2 = X(o), c2 = Math.hypot(i2.left + i2.width / 2 - t, i2.top + i2.height / 2 - a2);
830
830
  c2 < s && (s = c2, r = o);
831
831
  }
832
832
  return r;
833
833
  }
834
- const It = [
834
+ const Dt = [
835
835
  "[data-nice-region]",
836
836
  "header",
837
837
  "nav",
@@ -847,9 +847,9 @@ const It = [
847
847
  '[role="region"][aria-label]',
848
848
  '[role="region"][aria-labelledby]'
849
849
  ].join(",");
850
- function In(n, e, t) {
851
- const a2 = [...t.root.querySelectorAll(It)], r = a2.filter(
852
- (u) => !a2.some((p) => p !== u && p.contains(u)) && U(u).length > 0
850
+ function Dn(n, e, t) {
851
+ const a2 = [...t.root.querySelectorAll(Dt)], r = a2.filter(
852
+ (u) => !a2.some((h) => h !== u && h.contains(u)) && U(u).length > 0
853
853
  );
854
854
  if (r.length === 0)
855
855
  return null;
@@ -857,9 +857,9 @@ function In(n, e, t) {
857
857
  if (c2 === r[s])
858
858
  return null;
859
859
  const d = t.memory.get(c2);
860
- return d && d.isConnected && c2.contains(d) && ne(d) ? d : U(c2)[0];
860
+ return d && d.isConnected && c2.contains(d) && te(d) ? d : U(c2)[0];
861
861
  }
862
- const he = [
862
+ const de = [
863
863
  "south",
864
864
  "east",
865
865
  "west",
@@ -877,7 +877,7 @@ const he = [
877
877
  "dpadLeft",
878
878
  "dpadRight",
879
879
  "home"
880
- ], ze = "nice-intent", ae = "nice-engagechange", W = {
880
+ ], xe = "nice-intent", ne = "nice-engagechange", Y = {
881
881
  confirmButton: "auto",
882
882
  gamepadBindings: {},
883
883
  keyboardBindings: {},
@@ -893,11 +893,11 @@ const he = [
893
893
  vibration: false,
894
894
  arrowNavigation: "auto",
895
895
  onScreenKeyboard: "auto"
896
- }, On = /* @__PURE__ */ new Set([4, 5, 6, 7, 12, 13, 14, 15]), Rn = 0.85;
897
- function Vn(n, e) {
896
+ }, In = /* @__PURE__ */ new Set([4, 5, 6, 7, 12, 13, 14, 15]), On = 0.85;
897
+ function Rn(n, e) {
898
898
  return Math.abs(n) > Math.abs(e) ? n > 0 ? "right" : "left" : e > 0 ? "down" : "up";
899
899
  }
900
- class Fn {
900
+ class Vn {
901
901
  constructor(e, t) {
902
902
  this.states = /* @__PURE__ */ new Map(), this.connected = /* @__PURE__ */ new Set(), this.warned = /* @__PURE__ */ new Set(), this.started = false, this.frameId = 0, this.onConnected = (a2) => {
903
903
  const r = a2.gamepad;
@@ -932,39 +932,39 @@ class Fn {
932
932
  }
933
933
  /** Read every pad once; public so tests can drive a frame. */
934
934
  poll(e) {
935
- var o, i2, c2, d, u, p;
935
+ var o, i2, c2, d, u, h;
936
936
  const t = this.opts.timing(), a2 = /* @__PURE__ */ new Set(), r = this.read();
937
937
  for (const l of r) {
938
938
  a2.add(l.index);
939
- let v2 = this.states.get(l.index);
940
- (!v2 || v2.info.id !== l.id) && (v2 = {
939
+ let p = this.states.get(l.index);
940
+ (!p || p.info.id !== l.id) && (p = {
941
941
  info: {
942
942
  index: l.index,
943
943
  id: l.id,
944
- family: on(l.id),
944
+ family: sn(l.id),
945
945
  mapping: l.mapping
946
946
  },
947
947
  pressed: [],
948
948
  stick: null,
949
949
  holds: /* @__PURE__ */ new Map()
950
- }, 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);
950
+ }, 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);
951
951
  }
952
952
  let s = false;
953
953
  for (const l of [...this.states.keys()])
954
954
  a2.has(l) || (this.states.delete(l), s = true);
955
- s && ((d = (c2 = this.opts).onPadsChange) == null || d.call(c2, this.pads)), (p = (u = this.opts).onFrame) == null || p.call(u, r, e);
955
+ s && ((d = (c2 = this.opts).onPadsChange) == null || d.call(c2, this.pads)), (h = (u = this.opts).onFrame) == null || h.call(u, r, e);
956
956
  }
957
957
  readButtons(e, t, a2, r) {
958
- for (let s = 0; s < he.length; s++) {
958
+ for (let s = 0; s < de.length; s++) {
959
959
  const o = t.buttons[s], i2 = !!(o && (o.pressed || o.value > 0.5)), c2 = `b${s}`;
960
- 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({
960
+ 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({
961
961
  pad: e.info,
962
- button: he[s],
962
+ button: de[s],
963
963
  pressed: i2,
964
964
  repeat: false
965
965
  })) : i2 && this.repeats(e, c2, a2, r) && this.opts.onButton({
966
966
  pad: e.info,
967
- button: he[s],
967
+ button: de[s],
968
968
  pressed: i2,
969
969
  repeat: true
970
970
  });
@@ -973,13 +973,13 @@ class Fn {
973
973
  readSticks(e, t, a2, r) {
974
974
  const s = t.axes[0] ?? 0, o = t.axes[1] ?? 0, i2 = Math.hypot(s, o);
975
975
  if (i2 >= r.stickThreshold) {
976
- const p = Vn(s, o);
977
- 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 });
976
+ const h = Rn(s, o);
977
+ 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 });
978
978
  } else e.stick && i2 < r.stickThreshold * 0.7 && (e.stick = null, e.holds.delete("stick"));
979
979
  const c2 = t.axes[2] ?? 0, d = t.axes[3] ?? 0, u = Math.hypot(c2, d);
980
980
  if (u > r.stickDeadzone) {
981
- const p = (u - r.stickDeadzone) / (1 - r.stickDeadzone) / u;
982
- this.opts.onScroll({ pad: e.info, x: c2 * p, y: d * p });
981
+ const h = (u - r.stickDeadzone) / (1 - r.stickDeadzone) / u;
982
+ this.opts.onScroll({ pad: e.info, x: c2 * h, y: d * h });
983
983
  }
984
984
  }
985
985
  repeats(e, t, a2, r) {
@@ -988,7 +988,7 @@ class Fn {
988
988
  return false;
989
989
  const o = Math.max(
990
990
  r.repeatIntervalMin,
991
- r.repeatInterval * Rn ** s.count
991
+ r.repeatInterval * On ** s.count
992
992
  );
993
993
  return a2 - s.last < o ? false : (s.last = a2, s.count++, true);
994
994
  }
@@ -1011,12 +1011,12 @@ class Fn {
1011
1011
  this.frameId !== 0 && (this.win.cancelAnimationFrame(this.frameId), this.frameId = 0);
1012
1012
  }
1013
1013
  }
1014
- const _n = {
1014
+ const Fn = {
1015
1015
  up: "ArrowUp",
1016
1016
  down: "ArrowDown",
1017
1017
  left: "ArrowLeft",
1018
1018
  right: "ArrowRight"
1019
- }, et = {
1019
+ }, Qe = {
1020
1020
  ArrowUp: 38,
1021
1021
  ArrowDown: 40,
1022
1022
  ArrowLeft: 37,
@@ -1027,20 +1027,20 @@ const _n = {
1027
1027
  End: 35,
1028
1028
  PageUp: 33,
1029
1029
  PageDown: 34
1030
- }, 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";
1031
- class Kn {
1030
+ }, 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";
1031
+ class Bn {
1032
1032
  constructor(e) {
1033
1033
  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) => {
1034
1034
  if (t.niceSource)
1035
1035
  return;
1036
- const a2 = En(t), r = this.tv || a2 ? "remote" : "keyboard";
1037
- if (tt.has(t.key) || this.setMethod(r), this.capture && !tt.has(t.key)) {
1036
+ const a2 = wn(t), r = this.tv || a2 ? "remote" : "keyboard";
1037
+ if (et.has(t.key) || this.setMethod(r), this.capture && !et.has(t.key)) {
1038
1038
  t.preventDefault();
1039
1039
  const c2 = [
1040
1040
  t.ctrlKey || t.metaKey ? "Ctrl" : "",
1041
1041
  t.altKey ? "Alt" : "",
1042
1042
  t.shiftKey ? "Shift" : ""
1043
- ], d = Ve(t.key);
1043
+ ], d = Re(t.key);
1044
1044
  this.capture({
1045
1045
  keys: [...c2, d.length === 1 ? d.toUpperCase() : d].filter(Boolean).join("+")
1046
1046
  });
@@ -1048,11 +1048,11 @@ class Kn {
1048
1048
  }
1049
1049
  if (t.defaultPrevented || t.isComposing)
1050
1050
  return;
1051
- const s = a2 ?? bn(t, this.keyTable);
1051
+ const s = a2 ?? gn(t, this.keyTable);
1052
1052
  if (!s)
1053
1053
  return;
1054
1054
  const o = this.targetOf(t);
1055
- if (qt(o, s))
1055
+ if (Gt(o, s))
1056
1056
  return;
1057
1057
  const i2 = {
1058
1058
  intent: s.intent,
@@ -1089,15 +1089,15 @@ class Kn {
1089
1089
  repeat: true,
1090
1090
  gamepad: t.pad
1091
1091
  };
1092
- this.dispatchIntent(i2, o) || rt(st(o, r, s), r * nt, s * nt);
1092
+ this.dispatchIntent(i2, o) || at(rt(o, r, s), r * tt, s * tt);
1093
1093
  }, this.onPointerDown = (t) => {
1094
1094
  this.setMethod(t.pointerType === "touch" ? "touch" : "pointer");
1095
1095
  }, this.onFocusIn = (t) => {
1096
1096
  const a2 = t.target;
1097
1097
  if (a2 instanceof HTMLElement) {
1098
1098
  for (let r = a2.parentElement; r; r = r.parentElement)
1099
- (r.hasAttribute(se) || r.matches(It) || r === this.doc.body) && this.memory.set(r, a2);
1100
- this.lastFocus = { el: a2, rect: J(a2), scope: zn(a2)[0] ?? null };
1099
+ (r.hasAttribute(re) || r.matches(Dt) || r === this.doc.body) && this.memory.set(r, a2);
1100
+ this.lastFocus = { el: a2, rect: X(a2), scope: xn(a2)[0] ?? null };
1101
1101
  }
1102
1102
  }, this.onFocusOut = (t) => {
1103
1103
  const a2 = t.target;
@@ -1110,15 +1110,15 @@ class Kn {
1110
1110
  const a2 = this.doc.activeElement;
1111
1111
  if (a2 && a2 !== this.doc.body)
1112
1112
  return;
1113
- 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);
1113
+ 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);
1114
1114
  o && this.focusElement(o);
1115
- }, this.win = e, this.doc = e.document, this.tv = Bn.test(e.navigator.userAgent), this.keyTable = Ye(W), this.state = {
1115
+ }, this.win = e, this.doc = e.document, this.tv = _n.test(e.navigator.userAgent), this.keyTable = $e(Y), this.state = {
1116
1116
  method: "pointer",
1117
1117
  family: null,
1118
1118
  pads: [],
1119
- preferences: W,
1120
- hintsVisible: W.hints === "always"
1121
- }, this.poller = new Fn(e, {
1119
+ preferences: Y,
1120
+ hintsVisible: Y.hints === "always"
1121
+ }, this.poller = new Vn(e, {
1122
1122
  timing: () => this.state.preferences,
1123
1123
  onButton: this.onPadButton,
1124
1124
  onStick: this.onPadStick,
@@ -1159,7 +1159,7 @@ class Kn {
1159
1159
  }
1160
1160
  setPreferences(e) {
1161
1161
  const t = { ...this.state.preferences, ...e };
1162
- this.keyTable = Ye(t), this.padMaps.clear(), this.update({ preferences: t });
1162
+ this.keyTable = $e(t), this.padMaps.clear(), this.update({ preferences: t });
1163
1163
  }
1164
1164
  /** Words of announcements and labels; the React provider passes the app's translator. */
1165
1165
  setTranslator(e) {
@@ -1172,7 +1172,7 @@ class Kn {
1172
1172
  }
1173
1173
  /** The buttons bound to an intent on a pad of the family (for prompts). */
1174
1174
  gamepadBinding(e, t = this.glyphFamily) {
1175
- return ke(this.state.preferences, t)[e];
1175
+ return Ee(this.state.preferences, t)[e];
1176
1176
  }
1177
1177
  /** The keys bound to an intent (for prompts), as written in the preferences. */
1178
1178
  keyboardBinding(e) {
@@ -1195,12 +1195,12 @@ class Kn {
1195
1195
  }
1196
1196
  update(e) {
1197
1197
  const t = { ...this.state, ...e }, { hints: a2 } = t.preferences;
1198
- let r = a2 === "always" ? true : a2 === "never" ? false : at(t.method);
1198
+ let r = a2 === "always" ? true : a2 === "never" ? false : nt(t.method);
1199
1199
  this.hintsToggled && (r = !r), t.hintsVisible = r, this.state = t, this.listeners.forEach((s) => s());
1200
1200
  }
1201
1201
  setMethod(e, t) {
1202
1202
  const a2 = this.doc.documentElement;
1203
- 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 }));
1203
+ 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 }));
1204
1204
  }
1205
1205
  /* ── Gamepad frames (games, device testers) ──────────────────── */
1206
1206
  /** Raw pads every polled frame while a pad is connected. */
@@ -1254,7 +1254,7 @@ class Kn {
1254
1254
  /* ── Intents ─────────────────────────────────────────────────── */
1255
1255
  /** Dispatches `nice-intent` on the target; returns whether a handler consumed it. */
1256
1256
  dispatchIntent(e, t = this.focused()) {
1257
- const a2 = new CustomEvent(ze, {
1257
+ const a2 = new CustomEvent(xe, {
1258
1258
  detail: e,
1259
1259
  bubbles: true,
1260
1260
  cancelable: true,
@@ -1267,12 +1267,12 @@ class Kn {
1267
1267
  const a2 = this.navigationRoot();
1268
1268
  if (t === this.doc.body || !a2.contains(t))
1269
1269
  return this.focusInitial(a2);
1270
- const r = Dn(t, e, { root: a2, memory: this.memory });
1270
+ const r = Pn(t, e, { root: a2, memory: this.memory });
1271
1271
  return r ? (this.focusElement(r), true) : false;
1272
1272
  }
1273
1273
  /** The `view` intent: next (`down`) or previous (`up`) region. */
1274
1274
  focusRegion(e, t = this.focused()) {
1275
- const a2 = In(t, e, {
1275
+ const a2 = Dn(t, e, {
1276
1276
  root: this.navigationRoot(),
1277
1277
  memory: this.memory
1278
1278
  });
@@ -1284,13 +1284,13 @@ class Kn {
1284
1284
  e.focus({ preventScroll: true, focusVisible: true }), (t = e.scrollIntoView) == null || t.call(e, { block: "nearest", inline: "nearest" });
1285
1285
  }
1286
1286
  /** Engages a control (ADR-005 § 6); popup controls open instead. */
1287
- engage(e, t, a2 = me(e)) {
1287
+ engage(e, t, a2 = ve(e)) {
1288
1288
  if (a2) {
1289
1289
  if (a2 === "popup") {
1290
1290
  this.emulateKey(e, "ArrowDown", t);
1291
1291
  return;
1292
1292
  }
1293
- 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"));
1293
+ 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"));
1294
1294
  }
1295
1295
  }
1296
1296
  /**
@@ -1302,7 +1302,7 @@ class Kn {
1302
1302
  return;
1303
1303
  e.removeAttribute("data-nice-engaged");
1304
1304
  const r = this.engagedValues.get(e);
1305
- 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"));
1305
+ 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"));
1306
1306
  }
1307
1307
  /** Defaults of trusted keys: the browser already clicks, types and scrolls. */
1308
1308
  keyDefault(e, t) {
@@ -1323,27 +1323,27 @@ class Kn {
1323
1323
  if (t !== "keyboard")
1324
1324
  return "spatial";
1325
1325
  const a2 = this.state.preferences.arrowNavigation;
1326
- return a2 !== "auto" ? a2 : An(e) ?? "native";
1326
+ return a2 !== "auto" ? a2 : zn(e) ?? "native";
1327
1327
  }
1328
1328
  /* ── Gamepad ─────────────────────────────────────────────────── */
1329
1329
  padMap(e) {
1330
1330
  let t = this.padMaps.get(e);
1331
- return t || (t = kn(ke(this.state.preferences, e)), this.padMaps.set(e, t)), t;
1331
+ return t || (t = En(Ee(this.state.preferences, e)), this.padMaps.set(e, t)), t;
1332
1332
  }
1333
1333
  /** A pad intent: the intent event, then engage rules, key emulation and the default action. */
1334
1334
  deviceIntent(e) {
1335
1335
  const t = this.focused();
1336
1336
  if (this.dispatchIntent(e, t))
1337
1337
  return;
1338
- const a2 = t === this.doc.body ? null : me(t), r = a2 !== null && kt(t, a2), s = t, o = e.source;
1338
+ const a2 = t === this.doc.body ? null : ve(t), r = a2 !== null && Et(t, a2), s = t, o = e.source;
1339
1339
  switch (e.intent) {
1340
1340
  case "navigate": {
1341
1341
  const i2 = e.direction ?? "down";
1342
- 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);
1342
+ 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);
1343
1343
  return;
1344
1344
  }
1345
1345
  case "activate":
1346
- 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));
1346
+ 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));
1347
1347
  return;
1348
1348
  case "back":
1349
1349
  r && a2 === "popup" ? this.emulateKey(t, "Escape", o) : r ? this.release(s, o, true) : this.emulateKey(t, "Escape", o) || this.closeTopOverlay(o);
@@ -1352,17 +1352,17 @@ class Kn {
1352
1352
  case "sectionNext":
1353
1353
  if (r && a2 === "value") {
1354
1354
  const i2 = e.intent === "sectionNext";
1355
- ce(t) ? le(t, i2 ? "up" : "down", "big") : this.emulateKey(t, i2 ? "PageUp" : "PageDown", o);
1355
+ ie(t) ? ce(t, i2 ? "up" : "down", "big") : this.emulateKey(t, i2 ? "PageUp" : "PageDown", o);
1356
1356
  }
1357
1357
  return;
1358
1358
  case "pagePrev":
1359
1359
  case "pageNext": {
1360
1360
  const i2 = e.intent === "pageNext";
1361
1361
  if (r && a2 === "value")
1362
- ce(t) ? le(t, i2 ? "up" : "down", "edge") : this.emulateKey(t, i2 ? "End" : "Home", o);
1362
+ ie(t) ? ce(t, i2 ? "up" : "down", "edge") : this.emulateKey(t, i2 ? "End" : "Home", o);
1363
1363
  else if (!this.emulateKey(t, i2 ? "PageDown" : "PageUp", o)) {
1364
- const c2 = st(t, 0, i2 ? 1 : -1);
1365
- rt(c2, 0, (i2 ? 1 : -1) * ((c2 == null ? void 0 : c2.clientHeight) ?? 0) * 0.9);
1364
+ const c2 = rt(t, 0, i2 ? 1 : -1);
1365
+ at(c2, 0, (i2 ? 1 : -1) * ((c2 == null ? void 0 : c2.clientHeight) ?? 0) * 0.9);
1366
1366
  }
1367
1367
  return;
1368
1368
  }
@@ -1396,7 +1396,7 @@ class Kn {
1396
1396
  cancelable: true,
1397
1397
  composed: true
1398
1398
  });
1399
- return Object.defineProperty(i2, "niceSource", { value: a2 }), Object.defineProperty(i2, "keyCode", { value: et[t] ?? 0 }), Object.defineProperty(i2, "which", { value: et[t] ?? 0 }), i2;
1399
+ return Object.defineProperty(i2, "niceSource", { value: a2 }), Object.defineProperty(i2, "keyCode", { value: Qe[t] ?? 0 }), Object.defineProperty(i2, "which", { value: Qe[t] ?? 0 }), i2;
1400
1400
  }, s = r("keydown");
1401
1401
  return e.dispatchEvent(s), e.dispatchEvent(r("keyup")), s.defaultPrevented;
1402
1402
  }
@@ -1435,11 +1435,11 @@ class Kn {
1435
1435
  }
1436
1436
  /** Nothing focused yet: the remembered element, else the first one of the main region. */
1437
1437
  focusInitial(e) {
1438
- 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];
1438
+ 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];
1439
1439
  return r ? (this.focusElement(r), true) : false;
1440
1440
  }
1441
1441
  fireEngage(e, t) {
1442
- e.dispatchEvent(new CustomEvent(ae, { detail: t, bubbles: true }));
1442
+ e.dispatchEvent(new CustomEvent(ne, { detail: t, bubbles: true }));
1443
1443
  }
1444
1444
  /** Polite announcement through the engine's own live region. */
1445
1445
  announce(e) {
@@ -1450,10 +1450,10 @@ class Kn {
1450
1450
  this.live.textContent = e;
1451
1451
  }
1452
1452
  }
1453
- function rt(n, e, t) {
1453
+ function at(n, e, t) {
1454
1454
  n && (typeof n.scrollBy == "function" ? n.scrollBy({ left: e, top: t }) : (n.scrollLeft += e, n.scrollTop += t));
1455
1455
  }
1456
- function st(n, e, t) {
1456
+ function rt(n, e, t) {
1457
1457
  const a2 = n.ownerDocument, r = a2.defaultView;
1458
1458
  for (let s = n; s && s !== a2.body; s = s.parentElement) {
1459
1459
  if (!(s instanceof HTMLElement) || !r)
@@ -1464,106 +1464,106 @@ function st(n, e, t) {
1464
1464
  }
1465
1465
  return a2.scrollingElement ?? a2.documentElement;
1466
1466
  }
1467
- const ot = /* @__PURE__ */ new WeakMap();
1468
- function jn(n = window, e = true) {
1469
- let t = ot.get(n);
1470
- return t || (t = new Kn(n), ot.set(n, t)), e && t.start(), t;
1467
+ const st = /* @__PURE__ */ new WeakMap();
1468
+ function Kn(n = window, e = true) {
1469
+ let t = st.get(n);
1470
+ return t || (t = new Bn(n), st.set(n, t)), e && t.start(), t;
1471
1471
  }
1472
- function B() {
1472
+ function K() {
1473
1473
  const [n] = De$1.useState(
1474
- () => typeof window > "u" ? null : jn(window, false)
1474
+ () => typeof window > "u" ? null : Kn(window, false)
1475
1475
  );
1476
1476
  return De$1.useEffect(() => {
1477
1477
  n == null || n.start();
1478
1478
  }, [n]), n;
1479
1479
  }
1480
- 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"])';
1481
- function Xa(n, e = {}) {
1482
- const { rowSelector: t = da, cellSelector: a2 = ha, pageSize: r = 10, enabled: s = true } = e, o = De$1.useRef(e);
1480
+ 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"])';
1481
+ function Wa(n, e = {}) {
1482
+ const { rowSelector: t = ua, cellSelector: a2 = da, pageSize: r = 10, enabled: s = true } = e, o = De$1.useRef(e);
1483
1483
  o.current = e;
1484
- const i2 = B();
1485
- _(
1484
+ const i2 = K();
1485
+ B(
1486
1486
  n,
1487
1487
  (c2) => {
1488
1488
  if (!s)
1489
1489
  return;
1490
- const d = c2.ownerDocument, u = (g) => {
1491
- var S;
1492
- return !!g && g.matches(t) && ((S = g.parentElement) == null ? void 0 : S.closest('[role="grid"],[role="treegrid"]')) === c2;
1493
- }, p = () => [...c2.querySelectorAll(t)].filter(u), l = (g) => [...g.children].filter((S) => S.matches(a2)), v2 = (g) => {
1494
- const S = g.querySelectorAll(fa);
1495
- return S.length === 1 ? S[0] : g;
1496
- }, y = () => p().flatMap((g) => l(g).map(v2)), k = (g) => {
1497
- const S = (g == null ? void 0 : g.closest(a2)) ?? null;
1498
- return S && u(S.parentElement) ? S : null;
1499
- }, E = () => {
1500
- const g = y();
1501
- if (g.length === 0)
1490
+ const d = c2.ownerDocument, u = (y) => {
1491
+ var L;
1492
+ return !!y && y.matches(t) && ((L = y.parentElement) == null ? void 0 : L.closest('[role="grid"],[role="treegrid"]')) === c2;
1493
+ }, h = () => [...c2.querySelectorAll(t)].filter(u), l = (y) => [...y.children].filter((L) => L.matches(a2)), p = (y) => {
1494
+ const L = y.querySelectorAll(ha);
1495
+ return L.length === 1 ? L[0] : y;
1496
+ }, w = () => h().flatMap((y) => l(y).map(p)), k = (y) => {
1497
+ const L = (y == null ? void 0 : y.closest(a2)) ?? null;
1498
+ return L && u(L.parentElement) ? L : null;
1499
+ }, x = () => {
1500
+ const y = w();
1501
+ if (y.length === 0)
1502
1502
  return;
1503
- const S = d.activeElement, N = g.find((w) => w === S || w.contains(S)) ?? g.find((w) => w.getAttribute("tabindex") === "0") ?? g[0];
1504
- for (const w of g) {
1505
- const b = w === N ? "0" : "-1";
1506
- w.getAttribute("tabindex") !== b && w.setAttribute("tabindex", b);
1503
+ const L = d.activeElement, T = y.find((E) => E === L || E.contains(L)) ?? y.find((E) => E.getAttribute("tabindex") === "0") ?? y[0];
1504
+ for (const E of y) {
1505
+ const g = E === T ? "0" : "-1";
1506
+ E.getAttribute("tabindex") !== g && E.setAttribute("tabindex", g);
1507
1507
  }
1508
- }, H = (g, S, N) => {
1509
- var b, T;
1510
- const w = v2(g);
1511
- for (const f of y())
1512
- f.setAttribute("tabindex", f === w ? "0" : "-1");
1513
- i2 ? i2.focusElement(w) : w.focus(), (T = (b = o.current).onMove) == null || T.call(b, g, S, N);
1514
- }, x = (g) => {
1515
- var D;
1516
- if (g.defaultPrevented || g.altKey || g.metaKey)
1508
+ }, C = (y, L, T) => {
1509
+ var g, v2;
1510
+ const E = p(y);
1511
+ for (const M of w())
1512
+ M.setAttribute("tabindex", M === E ? "0" : "-1");
1513
+ i2 ? i2.focusElement(E) : E.focus(), (v2 = (g = o.current).onMove) == null || v2.call(g, y, L, T);
1514
+ }, S = (y) => {
1515
+ var P;
1516
+ if (y.defaultPrevented || y.altKey || y.metaKey)
1517
1517
  return;
1518
- const S = g.target, N = k(S);
1519
- if (!N || v2(N) !== S || S !== N && S.matches(pa))
1518
+ const L = y.target, T = k(L);
1519
+ if (!T || p(T) !== L || L !== T && L.matches(fa))
1520
1520
  return;
1521
- const w = p(), b = w.indexOf(N.parentElement), T = l(w[b]).indexOf(N), f = (L, P) => {
1522
- const I = w[L] ? l(w[L]) : [];
1523
- if (I.length === 0)
1521
+ const E = h(), g = E.indexOf(T.parentElement), v2 = l(E[g]).indexOf(T), M = (H, D) => {
1522
+ const _ = E[H] ? l(E[H]) : [];
1523
+ if (_.length === 0)
1524
1524
  return null;
1525
- const $ = Math.min(P, I.length - 1);
1526
- return [I[$], L, $];
1525
+ const F = Math.min(D, _.length - 1);
1526
+ return [_[F], H, F];
1527
1527
  };
1528
- let h = null;
1529
- 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;
1530
- if (g.ctrlKey && (m === "Home" || m === "End"))
1531
- h = m === "Home" ? f(0, 0) : f(w.length - 1, Number.MAX_SAFE_INTEGER);
1528
+ let f = null;
1529
+ 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;
1530
+ if (y.ctrlKey && (b === "Home" || b === "End"))
1531
+ f = b === "Home" ? M(0, 0) : M(E.length - 1, Number.MAX_SAFE_INTEGER);
1532
1532
  else {
1533
- if (g.ctrlKey)
1533
+ if (y.ctrlKey)
1534
1534
  return;
1535
- if (m === "ArrowRight")
1536
- h = T + 1 < l(w[b]).length ? f(b, T + 1) : null;
1537
- else if (m === "ArrowLeft")
1538
- h = T > 0 ? f(b, T - 1) : null;
1539
- else if (m === "ArrowDown")
1540
- h = b + 1 < w.length ? f(b + 1, T) : null;
1541
- else if (m === "ArrowUp")
1542
- h = b > 0 ? f(b - 1, T) : null;
1543
- else if (m === "Home")
1544
- h = f(b, 0);
1545
- else if (m === "End")
1546
- h = f(b, Number.MAX_SAFE_INTEGER);
1547
- else if (m === "PageDown" || m === "PageUp") {
1548
- const L = m === "PageDown" ? Math.min(w.length - 1, b + r) : Math.max(0, b - r);
1549
- h = L !== b ? f(L, T) : null;
1550
- } else if ((m === "Enter" || m === " ") && S === N && !N.matches("button,a[href]")) {
1551
- g.preventDefault(), N.click();
1535
+ if (b === "ArrowRight")
1536
+ f = v2 + 1 < l(E[g]).length ? M(g, v2 + 1) : null;
1537
+ else if (b === "ArrowLeft")
1538
+ f = v2 > 0 ? M(g, v2 - 1) : null;
1539
+ else if (b === "ArrowDown")
1540
+ f = g + 1 < E.length ? M(g + 1, v2) : null;
1541
+ else if (b === "ArrowUp")
1542
+ f = g > 0 ? M(g - 1, v2) : null;
1543
+ else if (b === "Home")
1544
+ f = M(g, 0);
1545
+ else if (b === "End")
1546
+ f = M(g, Number.MAX_SAFE_INTEGER);
1547
+ else if (b === "PageDown" || b === "PageUp") {
1548
+ const H = b === "PageDown" ? Math.min(E.length - 1, g + r) : Math.max(0, g - r);
1549
+ f = H !== g ? M(H, v2) : null;
1550
+ } else if ((b === "Enter" || b === " ") && L === T && !T.matches("button,a[href]")) {
1551
+ y.preventDefault(), T.click();
1552
1552
  return;
1553
1553
  } else
1554
1554
  return;
1555
1555
  }
1556
- h && h[0] !== N && (g.preventDefault(), H(...h));
1557
- }, M = () => E();
1558
- E(), c2.addEventListener("keydown", x), c2.addEventListener("focusin", M);
1559
- const z = typeof MutationObserver > "u" ? null : new MutationObserver(() => E());
1560
- return z == null || z.observe(c2, {
1556
+ f && f[0] !== T && (y.preventDefault(), C(...f));
1557
+ }, m = () => x();
1558
+ x(), c2.addEventListener("keydown", S), c2.addEventListener("focusin", m);
1559
+ const A = typeof MutationObserver > "u" ? null : new MutationObserver(() => x());
1560
+ return A == null || A.observe(c2, {
1561
1561
  childList: true,
1562
1562
  subtree: true,
1563
1563
  attributes: true,
1564
1564
  attributeFilter: ["disabled"]
1565
1565
  }), () => {
1566
- c2.removeEventListener("keydown", x), c2.removeEventListener("focusin", M), z == null || z.disconnect();
1566
+ c2.removeEventListener("keydown", S), c2.removeEventListener("focusin", m), A == null || A.disconnect();
1567
1567
  };
1568
1568
  },
1569
1569
  [s, t, a2, r, i2]
@@ -1813,7 +1813,7 @@ const NiceCapacityPlanner = ({
1813
1813
  unit
1814
1814
  )) }) }),
1815
1815
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-resource-allocation__toolbar-right", children: config.showConflicts && conflicts.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-resource-allocation__conflicts-badge", children: [
1816
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "warning", size: 14 }) }),
1816
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__badge-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "warning", size: 14 }) }),
1817
1817
  (conflicts.length === 1 ? t("capacityPlanner.oneConflict", "1 Conflict") : t("capacityPlanner.conflicts", "{count} Conflicts")).replace("{count}", String(conflicts.length))
1818
1818
  ] }) })
1819
1819
  ] }),
@@ -1863,7 +1863,7 @@ const NiceCapacityPlanner = ({
1863
1863
  {
1864
1864
  role: onResourceClick ? "button" : void 0,
1865
1865
  tabIndex: onResourceClick ? 0 : void 0,
1866
- onKeyDown: onResourceClick ? Et : void 0,
1866
+ onKeyDown: onResourceClick ? wt : void 0,
1867
1867
  className: "nice-resource-allocation__resource-cell",
1868
1868
  onClick: () => onResourceClick == null ? void 0 : onResourceClick(resource),
1869
1869
  children: [
@@ -1876,7 +1876,7 @@ const NiceCapacityPlanner = ({
1876
1876
  toggleResource(resource.id);
1877
1877
  },
1878
1878
  children: /* @__PURE__ */ jsxRuntime.jsx(
1879
- te,
1879
+ ee,
1880
1880
  {
1881
1881
  name: expandedResources.has(resource.id) ? "chevron-down" : "chevron-right",
1882
1882
  size: 14
@@ -1884,7 +1884,7 @@ const NiceCapacityPlanner = ({
1884
1884
  )
1885
1885
  }
1886
1886
  ),
1887
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
1887
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: getResourceTypeIcon(resource.type), size: 16 }) }),
1888
1888
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-resource-allocation__resource-info", children: [
1889
1889
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-name", children: resource.name }),
1890
1890
  resource.department && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-resource-allocation__resource-dept", children: resource.department })
@@ -1907,7 +1907,7 @@ const NiceCapacityPlanner = ({
1907
1907
  role: readOnly ? void 0 : "button",
1908
1908
  tabIndex: readOnly ? void 0 : 0,
1909
1909
  "aria-label": readOnly ? void 0 : `${resource.name} ${formatDate(period)}`,
1910
- onKeyDown: readOnly ? void 0 : Et,
1910
+ onKeyDown: readOnly ? void 0 : wt,
1911
1911
  className: `nice-resource-allocation__time-cell ${isHovered ? "nice-resource-allocation__time-cell--hovered" : ""}`,
1912
1912
  style: { backgroundColor: getCellColor(resource.id, period) },
1913
1913
  onClick: () => handleCellClick(resource.id, period),
@@ -1959,7 +1959,7 @@ const NiceCapacityPlanner = ({
1959
1959
  {
1960
1960
  role: "button",
1961
1961
  tabIndex: 0,
1962
- onKeyDown: Et,
1962
+ onKeyDown: wt,
1963
1963
  className: `nice-resource-allocation__allocation-bar nice-resource-allocation__allocation-bar--${allocation.status} ${selectedAllocation === allocation.id ? "nice-resource-allocation__allocation-bar--selected" : ""}`,
1964
1964
  style: {
1965
1965
  left: `${leftPercent}%`,
@@ -1980,7 +1980,7 @@ const NiceCapacityPlanner = ({
1980
1980
  e.stopPropagation();
1981
1981
  onAllocationDelete == null ? void 0 : onAllocationDelete(allocation.id);
1982
1982
  },
1983
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "close", size: 14 })
1983
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "close", size: 14 })
1984
1984
  }
1985
1985
  )
1986
1986
  ]
@@ -2315,7 +2315,7 @@ const NiceInventoryManager = ({
2315
2315
  onChange: (e) => setFilters((prev) => ({ ...prev, searchQuery: e.target.value }))
2316
2316
  }
2317
2317
  ),
2318
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "search", size: 14 }) })
2318
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__search-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "search", size: 14 }) })
2319
2319
  ] }),
2320
2320
  /* @__PURE__ */ jsxRuntime.jsxs(
2321
2321
  "select",
@@ -2350,7 +2350,7 @@ const NiceInventoryManager = ({
2350
2350
  className: `nice-inventory-manager__view-button ${view === v2 ? "nice-inventory-manager__view-button--active" : ""}`,
2351
2351
  onClick: () => setView(v2),
2352
2352
  children: /* @__PURE__ */ jsxRuntime.jsx(
2353
- te,
2353
+ ee,
2354
2354
  {
2355
2355
  name: v2 === "grid" ? "grid" : v2 === "list" ? "list" : "table",
2356
2356
  size: 14
@@ -2424,7 +2424,7 @@ const NiceInventoryManager = ({
2424
2424
  {
2425
2425
  role: onItemClick ? "button" : void 0,
2426
2426
  tabIndex: onItemClick ? 0 : void 0,
2427
- onKeyDown: onItemClick ? Et : void 0,
2427
+ onKeyDown: onItemClick ? wt : void 0,
2428
2428
  className: `nice-inventory-manager__item-card ${selectedItems.has(item.id) ? "nice-inventory-manager__item-card--selected" : ""}`,
2429
2429
  onClick: () => onItemClick == null ? void 0 : onItemClick(item),
2430
2430
  children: [
@@ -2438,7 +2438,7 @@ const NiceInventoryManager = ({
2438
2438
  onClick: (e) => e.stopPropagation()
2439
2439
  }
2440
2440
  ),
2441
- config.showImages && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "box", size: 32 }) }) }),
2441
+ config.showImages && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__item-image", children: ((_a2 = item.images) == null ? void 0 : _a2[0]) ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.images[0], alt: item.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__placeholder-image", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "box", size: 32 }) }) }),
2442
2442
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__item-info", children: [
2443
2443
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__item-sku", children: item.sku }),
2444
2444
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "nice-inventory-manager__item-name", children: item.name }),
@@ -2459,7 +2459,7 @@ const NiceInventoryManager = ({
2459
2459
  item.unit
2460
2460
  ] }),
2461
2461
  item.quantity <= item.reorderLevel && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "nice-inventory-manager__reorder-alert", children: [
2462
- /* @__PURE__ */ jsxRuntime.jsx(te, { name: "warning", size: 12 }),
2462
+ /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "warning", size: 12 }),
2463
2463
  " ",
2464
2464
  t("inventoryManager.lowStock", "Low Stock")
2465
2465
  ] })
@@ -2484,7 +2484,7 @@ const NiceInventoryManager = ({
2484
2484
  t("inventoryManager.sku", "SKU"),
2485
2485
  " ",
2486
2486
  sortBy === "sku" && /* @__PURE__ */ jsxRuntime.jsx(
2487
- te,
2487
+ ee,
2488
2488
  {
2489
2489
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2490
2490
  size: 12
@@ -2504,7 +2504,7 @@ const NiceInventoryManager = ({
2504
2504
  t("inventoryManager.name", "Name"),
2505
2505
  " ",
2506
2506
  sortBy === "name" && /* @__PURE__ */ jsxRuntime.jsx(
2507
- te,
2507
+ ee,
2508
2508
  {
2509
2509
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2510
2510
  size: 12
@@ -2525,7 +2525,7 @@ const NiceInventoryManager = ({
2525
2525
  t("inventoryManager.qty", "Qty"),
2526
2526
  " ",
2527
2527
  sortBy === "quantity" && /* @__PURE__ */ jsxRuntime.jsx(
2528
- te,
2528
+ ee,
2529
2529
  {
2530
2530
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2531
2531
  size: 12
@@ -2547,7 +2547,7 @@ const NiceInventoryManager = ({
2547
2547
  t("inventoryManager.value", "Value"),
2548
2548
  " ",
2549
2549
  sortBy === "value" && /* @__PURE__ */ jsxRuntime.jsx(
2550
- te,
2550
+ ee,
2551
2551
  {
2552
2552
  name: sortOrder === "asc" ? "arrow-up" : "arrow-down",
2553
2553
  size: 12
@@ -2610,7 +2610,7 @@ const NiceInventoryManager = ({
2610
2610
  setEditingItem(item);
2611
2611
  setShowItemModal(true);
2612
2612
  },
2613
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "edit", size: 14 })
2613
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "edit", size: 14 })
2614
2614
  }
2615
2615
  ),
2616
2616
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2622,7 +2622,7 @@ const NiceInventoryManager = ({
2622
2622
  setNewTransaction({ itemId: item.id });
2623
2623
  setShowTransactionModal(true);
2624
2624
  },
2625
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "clipboard", size: 14 })
2625
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "clipboard", size: 14 })
2626
2626
  }
2627
2627
  ),
2628
2628
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2633,7 +2633,7 @@ const NiceInventoryManager = ({
2633
2633
  e.stopPropagation();
2634
2634
  onItemDelete == null ? void 0 : onItemDelete(item.id);
2635
2635
  },
2636
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "trash", size: 14 })
2636
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "trash", size: 14 })
2637
2637
  }
2638
2638
  )
2639
2639
  ] })
@@ -2666,7 +2666,7 @@ const NiceInventoryManager = ({
2666
2666
  {
2667
2667
  role: onItemClick ? "button" : void 0,
2668
2668
  tabIndex: onItemClick ? 0 : void 0,
2669
- onKeyDown: onItemClick ? Et : void 0,
2669
+ onKeyDown: onItemClick ? wt : void 0,
2670
2670
  className: "nice-inventory-manager__kanban-card",
2671
2671
  onClick: () => onItemClick == null ? void 0 : onItemClick(item),
2672
2672
  children: [
@@ -2700,7 +2700,7 @@ const NiceInventoryManager = ({
2700
2700
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__transactions-list", children: recentTransactions.map((tx) => {
2701
2701
  const item = items.find((i2) => i2.id === tx.itemId);
2702
2702
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__transaction-item", children: [
2703
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: getTransactionIcon(tx.type), size: 16 }) }),
2703
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: getTransactionIcon(tx.type), size: 16 }) }),
2704
2704
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__tx-info", children: [
2705
2705
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-type", children: tx.type }),
2706
2706
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__tx-item", children: (item == null ? void 0 : item.name) || tx.itemId })
@@ -2724,7 +2724,7 @@ const NiceInventoryManager = ({
2724
2724
  }) })
2725
2725
  ] }),
2726
2726
  activeTab === "reorder" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nice-inventory-manager__reorder-tab", children: reorderItems.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nice-inventory-manager__empty-state", children: [
2727
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "success", size: 32 }) }),
2727
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nice-inventory-manager__empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "success", size: 32 }) }),
2728
2728
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: t(
2729
2729
  "inventoryManager.allItemsAreSufficientlyStocked",
2730
2730
  "All items are sufficiently stocked"
@@ -3157,7 +3157,7 @@ const NiceInvoiceView = /* @__PURE__ */ De$1.forwardRef(
3157
3157
  onClick: () => onAction == null ? void 0 : onAction("download"),
3158
3158
  "aria-label": t("invoiceView.download", "Download"),
3159
3159
  title: t("invoiceView.download", "Download"),
3160
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "arrow-down", size: 12 })
3160
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "arrow-down", size: 12 })
3161
3161
  }
3162
3162
  ),
3163
3163
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3167,7 +3167,7 @@ const NiceInvoiceView = /* @__PURE__ */ De$1.forwardRef(
3167
3167
  onClick: () => onAction == null ? void 0 : onAction("print"),
3168
3168
  "aria-label": t("invoiceView.print", "Print"),
3169
3169
  title: t("invoiceView.print", "Print"),
3170
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "printer", size: 14 })
3170
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "printer", size: 14 })
3171
3171
  }
3172
3172
  ),
3173
3173
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3177,7 +3177,7 @@ const NiceInvoiceView = /* @__PURE__ */ De$1.forwardRef(
3177
3177
  onClick: () => onAction == null ? void 0 : onAction("send"),
3178
3178
  "aria-label": t("invoiceView.send", "Send"),
3179
3179
  title: t("invoiceView.send", "Send"),
3180
- children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "mail", size: 14 })
3180
+ children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "mail", size: 14 })
3181
3181
  }
3182
3182
  )
3183
3183
  ] })
@@ -3339,7 +3339,7 @@ const NiceWarehouseView = /* @__PURE__ */ De$1.forwardRef(
3339
3339
  return [...rows.entries()].map(([rowKey, arr]) => ({ rowKey, cells: arr }));
3340
3340
  }, [cells]);
3341
3341
  const gridRef = De$1.useRef(null);
3342
- Xa(gridRef);
3342
+ Wa(gridRef);
3343
3343
  return /* @__PURE__ */ jsxRuntime.jsxs(
3344
3344
  "div",
3345
3345
  {
@@ -3855,7 +3855,7 @@ const NiceVatTable = /* @__PURE__ */ De$1.forwardRef(
3855
3855
  };
3856
3856
  const removeRow = (idx) => {
3857
3857
  const code = internal[idx].code;
3858
- const next = internal.filter((_2, i2) => i2 !== idx);
3858
+ const next = internal.filter((_, i2) => i2 !== idx);
3859
3859
  update(next);
3860
3860
  onRemove == null ? void 0 : onRemove(code);
3861
3861
  };
@@ -3909,7 +3909,7 @@ const NiceVatTable = /* @__PURE__ */ De$1.forwardRef(
3909
3909
  onChange: (e) => onCellEdit(idx, "description", e.target.value)
3910
3910
  }
3911
3911
  ) : r.description ?? "" }),
3912
- editable && /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsxRuntime.jsx(te, { name: "close", size: 14 }) }) })
3912
+ editable && /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => removeRow(idx), "aria-label": L.remove, children: /* @__PURE__ */ jsxRuntime.jsx(ee, { name: "close", size: 14 }) }) })
3913
3913
  ] }, r.code)) })
3914
3914
  ] }),
3915
3915
  editable && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "nice-vat-table__add", onClick: addRow, children: L.add })