@alfadocs/ui-kit 0.65.0 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/_chunks/{agenda-card-Bl-SBiCh.js → agenda-card-BxSFkqgY.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-Bh1KfEOG.js → agenda-tray-T-BumlGZ.js} +2 -2
  3. package/dist/_chunks/{ai-consent-banner-Btzmk8OH.js → ai-consent-banner-Dxtx_WAh.js} +2 -2
  4. package/dist/_chunks/{ai-tools-rail-JnlTqfS4.js → ai-tools-rail-DfmewPUN.js} +92 -76
  5. package/dist/_chunks/{alia-sidebar-CN8pA6c-.js → alia-sidebar-Ckv0yCKi.js} +2 -2
  6. package/dist/_chunks/{anamnesis-card-qeLYRG79.js → anamnesis-card-N8pIKWuS.js} +2 -2
  7. package/dist/_chunks/{antenatal-schedule-timeline-BfzFjEyb.js → antenatal-schedule-timeline-35ebkcZT.js} +2 -2
  8. package/dist/_chunks/{appointment-tray-BQnJEora.js → appointment-tray-CQJ3Nbi5.js} +4 -4
  9. package/dist/_chunks/{badge-zsf5i5bH.js → badge-CqGsX32l.js} +46 -42
  10. package/dist/_chunks/{bishop-score-x2fNqbuZ.js → bishop-score-CjsB9bM-.js} +3 -3
  11. package/dist/_chunks/{bmi-calculator-C3roxbqD.js → bmi-calculator-n-823_1V.js} +3 -3
  12. package/dist/_chunks/{care-plan-card-D42WD4-T.js → care-plan-card-CJei-nl9.js} +4 -4
  13. package/dist/_chunks/{care-plan-entry-card-BukNI7Uy.js → care-plan-entry-card-EmfrbHu8.js} +4 -4
  14. package/dist/_chunks/{clinical-note-card-BYo437dU.js → clinical-note-card-gtrxv6zn.js} +2 -2
  15. package/dist/_chunks/{color-picker-9tL7pz5y.js → color-picker-B7xsn6tX.js} +186 -167
  16. package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
  17. package/dist/_chunks/{contact-profile-card-CCeJmjbd.js → contact-profile-card-7BMB85T6.js} +2 -2
  18. package/dist/_chunks/{cycle-calculator-DrVXbIB4.js → cycle-calculator-BF0ointe.js} +3 -3
  19. package/dist/_chunks/{dependent-selector-CRWgieHm.js → dependent-selector-DpzGtr_J.js} +2 -2
  20. package/dist/_chunks/{document-scanner-biBS_f6c.js → document-scanner-D2qehl3-.js} +53 -53
  21. package/dist/_chunks/{due-date-calculator-D4K1BnE2.js → due-date-calculator-DU9AEWNy.js} +4 -4
  22. package/dist/_chunks/{editable-currency-cell-renderer-CFqQc56y.js → editable-currency-cell-renderer-BVJ04DkB.js} +914 -865
  23. package/dist/_chunks/{fetal-weight-B_pBjlO7.js → fetal-weight-BVSzOhuR.js} +3 -3
  24. package/dist/_chunks/{gestational-age-calculator-BETQAVkA.js → gestational-age-calculator-DBlFdoiP.js} +4 -4
  25. package/dist/_chunks/{hcg-doubling-8zXCJgAQ.js → hcg-doubling-if4Q8aSX.js} +3 -3
  26. package/dist/_chunks/{type-DZ5OMRA2.js → image-C6RM5hfF.js} +4 -16
  27. package/dist/_chunks/{insert-result-DIAG3ltJ.js → insert-result-njqBthzT.js} +68 -57
  28. package/dist/_chunks/{marketplace-app-shell-BXfRMiRk.js → marketplace-app-shell-Bu-HD3fy.js} +3 -3
  29. package/dist/_chunks/{message-card-Bgcvfj6-.js → message-card-Bx4GmLvf.js} +9 -9
  30. package/dist/_chunks/{message-tray-saAVMeHP.js → message-tray-CVyJajVJ.js} +2 -2
  31. package/dist/_chunks/{operator-hero-CM8949Hd.js → operator-hero-f_KaRhw5.js} +2 -2
  32. package/dist/_chunks/{patient-search-Bw9ONucF.js → patient-search-DR9XUYRQ.js} +2 -2
  33. package/dist/_chunks/{patient-shell-CF_qon7C.js → patient-shell-DrV_iekt.js} +2 -2
  34. package/dist/_chunks/{patient-summary-card-Bgso0p_l.js → patient-summary-card-ByfIU8N0.js} +4 -4
  35. package/dist/_chunks/{payment-request-card-DBz3hVDz.js → payment-request-card-yTjzKQCU.js} +3 -3
  36. package/dist/_chunks/{periodontal-chart-card-AYyHtU9K.js → periodontal-chart-card-Dh3KgvYG.js} +2 -2
  37. package/dist/_chunks/{practice-results-CVAgY2RZ.js → practice-results-DND2SAt7.js} +2 -2
  38. package/dist/_chunks/{pregnancy-dating-BuzLTwjy.js → pregnancy-dating-QY-sqpvj.js} +4 -4
  39. package/dist/_chunks/{pregnancy-weight-gain-aicn7qs7.js → pregnancy-weight-gain-DOJXXNYP.js} +3 -3
  40. package/dist/_chunks/rich-text-editor-BOQr5lHx.js +1970 -0
  41. package/dist/_chunks/{scroll-area-BWqCkEGz.js → scroll-area-eccd_Uf-.js} +38 -28
  42. package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-CGjIk_FQ.js} +36 -22
  43. package/dist/_chunks/{suggestion-chip-C4kxWUIs.js → suggestion-chip-Bk4PmYTg.js} +30 -30
  44. package/dist/_chunks/{tab-bar-Xetknddo.js → tab-bar-B1ovILzh.js} +2 -2
  45. package/dist/_chunks/{tag-CdA0s_VV.js → tag-BQXwuJq1.js} +41 -38
  46. package/dist/_chunks/{transaction-chip-BZCa6XDn.js → transaction-chip-BrW8P50O.js} +19 -19
  47. package/dist/_chunks/trash-2-rPAKaRgB.js +18 -0
  48. package/dist/_chunks/{unit-converter-CHN2cZ4b.js → unit-converter-C1V3ACM9.js} +2 -2
  49. package/dist/_chunks/{workflow-map-BX3JY1Bu.js → workflow-map-JAZryZJr.js} +137 -149
  50. package/dist/agent-catalog.json +1 -1
  51. package/dist/components/agenda-card/index.js +1 -1
  52. package/dist/components/agenda-tray/index.js +1 -1
  53. package/dist/components/ai-consent-banner/index.js +1 -1
  54. package/dist/components/ai-tools-rail/index.js +1 -1
  55. package/dist/components/anamnesis-card/index.js +1 -1
  56. package/dist/components/appointment-card/index.js +1 -1
  57. package/dist/components/badge/index.js +1 -1
  58. package/dist/components/bishop-score/index.js +1 -1
  59. package/dist/components/bmi-calculator/index.js +1 -1
  60. package/dist/components/care-plan-card/index.js +1 -1
  61. package/dist/components/care-plan-entry-card/index.js +1 -1
  62. package/dist/components/clinical-note-card/index.js +1 -1
  63. package/dist/components/color-picker/index.js +1 -1
  64. package/dist/components/contact-profile-card/index.js +1 -1
  65. package/dist/components/cycle-calculator/index.js +1 -1
  66. package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +16 -0
  67. package/dist/components/data-table/cell-renderers/tooth-cell-renderer.d.ts +12 -0
  68. package/dist/components/data-table/data-table.d.ts +1 -1
  69. package/dist/components/data-table/index.d.ts +2 -0
  70. package/dist/components/data-table/index.js +13 -12
  71. package/dist/components/data-table/toolbar.d.ts +5 -1
  72. package/dist/components/dependent-selector/index.js +1 -1
  73. package/dist/components/document-scanner/index.js +1 -1
  74. package/dist/components/due-date-calculator/index.js +2 -2
  75. package/dist/components/fetal-weight/index.js +1 -1
  76. package/dist/components/gestational-age-calculator/index.js +1 -1
  77. package/dist/components/hcg-doubling/index.js +1 -1
  78. package/dist/components/message-card/index.js +1 -1
  79. package/dist/components/message-tray/index.js +1 -1
  80. package/dist/components/operator-hero/index.js +1 -1
  81. package/dist/components/patient-search/index.js +1 -1
  82. package/dist/components/patient-summary-card/index.js +1 -1
  83. package/dist/components/payment-card/index.js +1 -1
  84. package/dist/components/periodontal-chart-card/index.js +1 -1
  85. package/dist/components/practice-results/index.js +1 -1
  86. package/dist/components/pregnancy-dating/index.js +1 -1
  87. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  88. package/dist/components/rich-text-editor/editor-toolbar.d.ts +36 -2
  89. package/dist/components/rich-text-editor/index.js +1 -1
  90. package/dist/components/rich-text-editor/rich-text-editor.d.ts +2 -0
  91. package/dist/components/scroll-area/index.js +1 -1
  92. package/dist/components/sidebar/index.js +1 -1
  93. package/dist/components/suggestion-chip/index.js +1 -1
  94. package/dist/components/tab-bar/index.js +1 -1
  95. package/dist/components/tag/index.js +1 -1
  96. package/dist/components/transaction-chip/index.js +1 -1
  97. package/dist/components/unit-converter/index.js +1 -1
  98. package/dist/components/workflow/index.js +1 -1
  99. package/dist/i18n/locales/ar.d.ts +26 -0
  100. package/dist/i18n/locales/ar.js +27 -1
  101. package/dist/i18n/locales/de.d.ts +26 -0
  102. package/dist/i18n/locales/de.js +27 -1
  103. package/dist/i18n/locales/el.d.ts +26 -0
  104. package/dist/i18n/locales/el.js +27 -1
  105. package/dist/i18n/locales/en.d.ts +26 -0
  106. package/dist/i18n/locales/en.js +27 -1
  107. package/dist/i18n/locales/es.d.ts +26 -0
  108. package/dist/i18n/locales/es.js +27 -1
  109. package/dist/i18n/locales/fr.d.ts +26 -0
  110. package/dist/i18n/locales/fr.js +27 -1
  111. package/dist/i18n/locales/hi.d.ts +26 -0
  112. package/dist/i18n/locales/hi.js +27 -1
  113. package/dist/i18n/locales/it.d.ts +26 -0
  114. package/dist/i18n/locales/it.js +27 -1
  115. package/dist/i18n/locales/ja.d.ts +26 -0
  116. package/dist/i18n/locales/ja.js +27 -1
  117. package/dist/i18n/locales/nl.d.ts +26 -0
  118. package/dist/i18n/locales/nl.js +25 -1
  119. package/dist/i18n/locales/pl.d.ts +26 -0
  120. package/dist/i18n/locales/pl.js +27 -1
  121. package/dist/i18n/locales/pt.d.ts +26 -0
  122. package/dist/i18n/locales/pt.js +27 -1
  123. package/dist/i18n/locales/ro.d.ts +26 -0
  124. package/dist/i18n/locales/ro.js +27 -1
  125. package/dist/i18n/locales/ru.d.ts +26 -0
  126. package/dist/i18n/locales/ru.js +27 -1
  127. package/dist/i18n/locales/sq.d.ts +26 -0
  128. package/dist/i18n/locales/sq.js +27 -1
  129. package/dist/i18n/locales/sv.d.ts +26 -0
  130. package/dist/i18n/locales/sv.js +25 -1
  131. package/dist/i18n/locales/tr.d.ts +26 -0
  132. package/dist/i18n/locales/tr.js +27 -1
  133. package/dist/i18n/locales/zh.d.ts +26 -0
  134. package/dist/i18n/locales/zh.js +25 -1
  135. package/dist/index.js +509 -508
  136. package/dist/locales/ar.json +27 -1
  137. package/dist/locales/de.json +27 -1
  138. package/dist/locales/el.json +27 -1
  139. package/dist/locales/en.json +27 -1
  140. package/dist/locales/es.json +27 -1
  141. package/dist/locales/fr.json +27 -1
  142. package/dist/locales/hi.json +27 -1
  143. package/dist/locales/it.json +27 -1
  144. package/dist/locales/ja.json +27 -1
  145. package/dist/locales/nl.json +27 -1
  146. package/dist/locales/pl.json +27 -1
  147. package/dist/locales/pt.json +27 -1
  148. package/dist/locales/ro.json +27 -1
  149. package/dist/locales/ru.json +27 -1
  150. package/dist/locales/sq.json +27 -1
  151. package/dist/locales/sv.json +27 -1
  152. package/dist/locales/tr.json +27 -1
  153. package/dist/locales/zh.json +27 -1
  154. package/dist/patterns/alia-assistant/index.js +1 -1
  155. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  156. package/dist/patterns/patient-shell/index.js +1 -1
  157. package/dist/tokens.css +6 -3
  158. package/package.json +1 -1
  159. package/dist/_chunks/rich-text-editor-u36FqSWz.js +0 -1190
@@ -1,69 +1,61 @@
1
- import { jsx as s, jsxs as E } from "react/jsx-runtime";
2
- import { useMemo as z, forwardRef as _, useState as R, useCallback as M, useEffect as P, useRef as X, createContext as Ne, useContext as Se, isValidElement as we, cloneElement as Fe, useImperativeHandle as yt } from "react";
3
- import { S as Tt } from "./skeleton-CZbwyJAA.js";
4
- import { E as Ct } from "./empty-state-BLy7tigq.js";
5
- import { c as xt } from "./index-D2ZczOXr.js";
6
- import { useTranslation as F } from "react-i18next";
7
- import { useGridFilter as J, AgGridReact as Nt } from "ag-grid-react";
8
- import { ModuleRegistry as St, AllCommunityModule as wt } from "ag-grid-community";
9
- import { B as j } from "./button-DD_0Xdmr.js";
10
- import { I as V } from "./icon-button-LqoiKcUN.js";
11
- import { P as Z } from "./popover-DTbfAuR0.js";
12
- import { C as Re } from "./checkbox-DRcOdmXv.js";
13
- import { T as fe } from "./text-input-BaClJL8Y.js";
14
- import { T as ae } from "./tag-CdA0s_VV.js";
15
- import { D as Y } from "./dropdown-menu-DwwPovMZ.js";
16
- import { X as De } from "./x-CCcI3eJp.js";
17
- import { R as Ft } from "./refresh-cw-CC8jSKMr.js";
18
- import { S as pe } from "./search-BonnQsHv.js";
19
- import { c as Rt } from "./createLucideIcon-CrFbzy84.js";
20
- import { G as Dt } from "./grip-vertical-Dlg0_k5C.js";
21
- import { P as kt } from "./printer-CeVEWfQq.js";
22
- import { F as ke } from "./file-text-DSNuv2B8.js";
1
+ import { jsx as s, jsxs as I } from "react/jsx-runtime";
2
+ import { useMemo as z, forwardRef as $, useState as D, useCallback as M, useEffect as P, useRef as Z, createContext as Se, useContext as we, isValidElement as Fe, cloneElement as Re, useImperativeHandle as Tt } from "react";
3
+ import { S as Ct } from "./skeleton-CZbwyJAA.js";
4
+ import { E as xt } from "./empty-state-BLy7tigq.js";
5
+ import { c as Nt } from "./index-D2ZczOXr.js";
6
+ import { useTranslation as R } from "react-i18next";
7
+ import { useGridFilter as Y, AgGridReact as St } from "ag-grid-react";
8
+ import { ModuleRegistry as wt, AllCommunityModule as Ft } from "ag-grid-community";
9
+ import { B as L } from "./button-DD_0Xdmr.js";
10
+ import { I as G } from "./icon-button-LqoiKcUN.js";
11
+ import { P as ee } from "./popover-DTbfAuR0.js";
12
+ import { C as De } from "./checkbox-DRcOdmXv.js";
13
+ import { T as pe } from "./text-input-BaClJL8Y.js";
14
+ import { T as J } from "./tag-BQXwuJq1.js";
15
+ import { D as B } from "./dropdown-menu-DwwPovMZ.js";
16
+ import { X as ke } from "./x-CCcI3eJp.js";
17
+ import { R as Rt } from "./refresh-cw-CC8jSKMr.js";
18
+ import { S as me } from "./search-BonnQsHv.js";
19
+ import { C as Dt } from "./columns-2-BTOBZbep.js";
20
+ import { G as kt } from "./grip-vertical-Dlg0_k5C.js";
21
+ import { P as It } from "./printer-CeVEWfQq.js";
22
+ import { F as Ie } from "./file-text-DSNuv2B8.js";
23
23
  import { D as ne } from "./download-CDF1sbL9.js";
24
24
  import { F as Et } from "./file-spreadsheet-zUkY8rJ2.js";
25
- import It from "i18next";
25
+ import zt from "i18next";
26
26
  import { S as Ee } from "./select-CEtRcon5.js";
27
- import { u as zt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
28
- import { u as At } from "./use-theme-CAuo6EYT.js";
29
- import { u as Pt } from "./registry-nPAVE19X.js";
30
- import { D as Ie } from "./date-range-picker-C5BWfH_T.js";
31
- import { M as Ot } from "./multi-select-BcPylvHR.js";
32
- import { A as ze } from "./autocomplete-CcCFlVf-.js";
33
- import { N as ee } from "./number-input-Dj5L3pXK.js";
34
- import { B as Mt } from "./badge-zsf5i5bH.js";
35
- import { A as Ae } from "./avatar-BNQNhoyL.js";
27
+ import { u as At } from "./use-prefers-reduced-motion-BMwIQRjB.js";
28
+ import { u as Pt } from "./use-theme-CAuo6EYT.js";
29
+ import { u as Ot } from "./registry-nPAVE19X.js";
30
+ import { D as ze } from "./date-range-picker-C5BWfH_T.js";
31
+ import { M as Mt } from "./multi-select-BcPylvHR.js";
32
+ import { A as Ae } from "./autocomplete-CcCFlVf-.js";
33
+ import { N as te } from "./number-input-Dj5L3pXK.js";
34
+ import { B as jt } from "./badge-CqGsX32l.js";
35
+ import { A as Pe } from "./avatar-BNQNhoyL.js";
36
36
  import { T as Lt } from "./tooltip-DvmfrNvB.js";
37
- import { T as he } from "./timestamp-BV2lC-wV.js";
38
- import { S as jt } from "./square-check-big-Jr-0202D.js";
39
- import { S as _t } from "./square-CZoGU14v.js";
40
- import { u as qt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
41
- import { c as Pe, a as Oe, b as Me, d as Le } from "./input-surface-xyERuLU_.js";
42
- /**
43
- * @license lucide-react v1.8.0 - ISC
44
- *
45
- * This source code is licensed under the ISC license.
46
- * See the LICENSE file in the root directory of this source tree.
47
- */
48
- const $t = [
49
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
50
- ["path", { d: "M12 3v18", key: "108xh3" }]
51
- ], Gt = Rt("columns-2", $t);
52
- function Bt(t) {
53
- if (!we(t)) return t;
37
+ import { T as ve } from "./timestamp-BV2lC-wV.js";
38
+ import { I as qt } from "./icon-button-group-C48khLE0.js";
39
+ import { E as $t } from "./ellipsis-rgGdiK_9.js";
40
+ import { S as _t } from "./square-check-big-Jr-0202D.js";
41
+ import { S as Bt } from "./square-CZoGU14v.js";
42
+ import { u as Gt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
43
+ import { c as Oe, a as Me, b as je, d as Le } from "./input-surface-xyERuLU_.js";
44
+ function Vt(t) {
45
+ if (!Fe(t)) return t;
54
46
  const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
55
- return Fe(e, { className: n, size: e.props.size ?? 16 });
47
+ return Re(e, { className: n, size: e.props.size ?? 16 });
56
48
  }
57
- const je = Ne(null);
58
- function q(t) {
59
- const e = Se(je);
49
+ const qe = Se(null);
50
+ function _(t) {
51
+ const e = we(qe);
60
52
  if (!e)
61
53
  throw new Error(
62
54
  `${t} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
63
55
  );
64
56
  return e;
65
57
  }
66
- function Vt({
58
+ function Ut({
67
59
  getApi: t,
68
60
  selectionCount: e,
69
61
  onPrint: a,
@@ -73,9 +65,9 @@ function Vt({
73
65
  () => ({ getApi: t, selectionCount: e, onPrint: a }),
74
66
  [t, e, a]
75
67
  );
76
- return /* @__PURE__ */ s(je.Provider, { value: r, children: n });
68
+ return /* @__PURE__ */ s(qe.Provider, { value: r, children: n });
77
69
  }
78
- const Ut = [
70
+ const Kt = [
79
71
  "data-table-toolbar",
80
72
  // Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
81
73
  // Actions cluster on narrow screens. From `sm` (≥640px) we switch to
@@ -94,20 +86,20 @@ const Ut = [
94
86
  "ds:border ds:border-[color:var(--card-border)]",
95
87
  "ds:shadow-[var(--shadow-sm)]",
96
88
  "ds:py-[var(--spacing-sm)] ds:px-[var(--spacing-md)]"
97
- ].join(" "), _e = _(
89
+ ].join(" "), $e = $(
98
90
  ({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
99
91
  "div",
100
92
  {
101
93
  ref: n,
102
94
  role: "toolbar",
103
- className: [Ut, t ?? ""].join(" ").trim(),
95
+ className: [Kt, t ?? ""].join(" ").trim(),
104
96
  ...a,
105
97
  children: e
106
98
  }
107
99
  )
108
100
  );
109
- _e.displayName = "DataTable.Toolbar";
110
- const qe = _(
101
+ $e.displayName = "DataTable.Toolbar";
102
+ const _e = $(
111
103
  ({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
112
104
  "div",
113
105
  {
@@ -126,8 +118,8 @@ const qe = _(
126
118
  }
127
119
  )
128
120
  );
129
- qe.displayName = "DataTable.Toolbar.FilterBar";
130
- const $e = _(
121
+ _e.displayName = "DataTable.Toolbar.FilterBar";
122
+ const Be = $(
131
123
  ({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
132
124
  "div",
133
125
  {
@@ -142,15 +134,15 @@ const $e = _(
142
134
  }
143
135
  )
144
136
  );
145
- $e.displayName = "DataTable.Toolbar.Actions";
146
- const Ge = _(
137
+ Be.displayName = "DataTable.Toolbar.Actions";
138
+ const Ge = $(
147
139
  ({ label: t, onExport: e, intent: a = "outline", ...n }, r) => {
148
- const { t: o } = F(), { getApi: l } = q("DataTable.Toolbar.ExportCsv"), u = M(() => {
149
- const d = l();
140
+ const { t: o } = R(), { getApi: i } = _("DataTable.Toolbar.ExportCsv"), u = M(() => {
141
+ const d = i();
150
142
  d && (e ? e(d) : d.exportDataAsCsv());
151
- }, [l, e]);
143
+ }, [i, e]);
152
144
  return /* @__PURE__ */ s(
153
- V,
145
+ G,
154
146
  {
155
147
  ref: r,
156
148
  type: "button",
@@ -164,7 +156,7 @@ const Ge = _(
164
156
  }
165
157
  );
166
158
  Ge.displayName = "DataTable.Toolbar.ExportCsv";
167
- function W(t, e = [30, 30, 30]) {
159
+ function H(t, e = [30, 30, 30]) {
168
160
  if (typeof document > "u") return e;
169
161
  const a = document.createElement("span");
170
162
  a.style.color = `hsl(var(${t}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
@@ -173,77 +165,77 @@ function W(t, e = [30, 30, 30]) {
173
165
  const r = n.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
174
166
  return r ? [Number(r[1]), Number(r[2]), Number(r[3])] : e;
175
167
  }
176
- async function Be(t, e) {
168
+ async function Ve(t, e) {
177
169
  if (!t) return;
178
170
  const [{ jsPDF: a }, { default: n }] = await Promise.all([
179
- import("./jspdf.es.min-DaapWjR1.js").then((g) => g.j),
171
+ import("./jspdf.es.min-DaapWjR1.js").then((b) => b.j),
180
172
  import("./jspdf.plugin.autotable-CSiDNyPn.js")
181
- ]), o = (t.getColumns() ?? []).filter((g) => g.isVisible()), l = [
182
- o.map((g) => t.getDisplayNameForColumn(g, null) ?? "")
173
+ ]), o = (t.getColumns() ?? []).filter((b) => b.isVisible()), i = [
174
+ o.map((b) => t.getDisplayNameForColumn(b, null) ?? "")
183
175
  ], u = [];
184
- t.forEachNodeAfterFilterAndSort((g) => {
185
- if (!g.data) return;
186
- const b = o.map((v) => {
187
- const y = t.getCellValue({
188
- rowNode: g,
189
- colKey: v,
176
+ t.forEachNodeAfterFilterAndSort((b) => {
177
+ if (!b.data) return;
178
+ const x = o.map((T) => {
179
+ const h = t.getCellValue({
180
+ rowNode: b,
181
+ colKey: T,
190
182
  useFormatter: !0
191
183
  });
192
- return y == null ? "" : String(y);
184
+ return h == null ? "" : String(h);
193
185
  });
194
- u.push(b);
186
+ u.push(x);
195
187
  });
196
- const d = W("--muted", [240, 240, 240]), c = W("--foreground", [30, 30, 30]), i = W("--card-foreground", [30, 30, 30]), p = W("--card", [250, 250, 250]), C = new a({ orientation: "landscape" });
197
- n(C, {
198
- head: l,
188
+ const d = H("--muted", [240, 240, 240]), c = H("--foreground", [30, 30, 30]), l = H("--card-foreground", [30, 30, 30]), f = H("--card", [250, 250, 250]), y = new a({ orientation: "landscape" });
189
+ n(y, {
190
+ head: i,
199
191
  body: u,
200
192
  headStyles: { fillColor: d, textColor: c },
201
- bodyStyles: { textColor: i },
202
- alternateRowStyles: { fillColor: p },
193
+ bodyStyles: { textColor: l },
194
+ alternateRowStyles: { fillColor: f },
203
195
  styles: {
204
196
  font: "helvetica",
205
197
  fontSize: 10,
206
198
  cellPadding: 4
207
199
  }
208
- }), C.save(e.fileName);
200
+ }), y.save(e.fileName);
209
201
  }
210
- const Ve = _(
202
+ const Ue = $(
211
203
  ({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r }, o) => {
212
- const { t: l } = F(), { getApi: u } = q("DataTable.Toolbar.ExportPdf"), d = M(() => {
204
+ const { t: i } = R(), { getApi: u } = _("DataTable.Toolbar.ExportPdf"), d = M(() => {
213
205
  const c = u();
214
206
  if (e) {
215
207
  e(c);
216
208
  return;
217
209
  }
218
- Be(c, {
210
+ Ve(c, {
219
211
  fileName: a ?? "data-table-export.pdf"
220
212
  });
221
213
  }, [u, e, a]);
222
214
  return /* @__PURE__ */ s(
223
- V,
215
+ G,
224
216
  {
225
217
  ref: o,
226
218
  type: "button",
227
219
  intent: n,
228
- icon: /* @__PURE__ */ s(ke, { "aria-hidden": !0 }),
229
- tooltip: t ?? l("dataTable.exportPdf"),
220
+ icon: /* @__PURE__ */ s(Ie, { "aria-hidden": !0 }),
221
+ tooltip: t ?? i("dataTable.exportPdf"),
230
222
  onClick: d,
231
223
  ...r
232
224
  }
233
225
  );
234
226
  }
235
227
  );
236
- Ve.displayName = "DataTable.Toolbar.ExportPdf";
237
- const Ue = _(
228
+ Ue.displayName = "DataTable.Toolbar.ExportPdf";
229
+ const Ke = $(
238
230
  ({ label: t, intent: e = "outline", ...a }, n) => {
239
- const { t: r } = F(), { onPrint: o } = q("DataTable.Toolbar.Print");
231
+ const { t: r } = R(), { onPrint: o } = _("DataTable.Toolbar.Print");
240
232
  return /* @__PURE__ */ s(
241
- V,
233
+ G,
242
234
  {
243
235
  ref: n,
244
236
  type: "button",
245
237
  intent: e,
246
- icon: /* @__PURE__ */ s(kt, { "aria-hidden": !0 }),
238
+ icon: /* @__PURE__ */ s(It, { "aria-hidden": !0 }),
247
239
  tooltip: t ?? r("dataTable.print"),
248
240
  onClick: o,
249
241
  ...a
@@ -251,14 +243,14 @@ const Ue = _(
251
243
  );
252
244
  }
253
245
  );
254
- Ue.displayName = "DataTable.Toolbar.Print";
255
- const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
256
- const { t: a } = F(), { getApi: n } = q("DataTable.Toolbar.QuickSearch"), [r, o] = R(""), l = X(void 0);
257
- return P(() => (l.current && window.clearTimeout(l.current), l.current = window.setTimeout(() => {
246
+ Ke.displayName = "DataTable.Toolbar.Print";
247
+ const We = ({ placeholder: t, debounceMs: e = 150 }) => {
248
+ const { t: a } = R(), { getApi: n } = _("DataTable.Toolbar.QuickSearch"), [r, o] = D(""), i = Z(void 0);
249
+ return P(() => (i.current && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
258
250
  const u = n();
259
251
  u && u.setGridOption("quickFilterText", r);
260
252
  }, e), () => {
261
- l.current && window.clearTimeout(l.current);
253
+ i.current && window.clearTimeout(i.current);
262
254
  }), [r, e, n]), // Slot wrapper caps the search at a sensible legible width on desktop —
263
255
  // without this, TextInput's `w-full` lets the QuickSearch absorb the
264
256
  // entire FilterBar row and push trailing Actions onto a second line at
@@ -267,31 +259,31 @@ const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
267
259
  // `--toolbar-search-max` token in the kit yet — see this component's
268
260
  // summary for a follow-up note recommending we add one.
269
261
  /* @__PURE__ */ s("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ s(
270
- fe,
262
+ pe,
271
263
  {
272
264
  type: "search",
273
265
  size: "sm",
274
266
  value: r,
275
267
  onChange: (u) => o(u.target.value),
276
268
  placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
277
- startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": !0, className: "ds:size-4" }),
269
+ startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": !0, className: "ds:size-4" }),
278
270
  clearable: !0,
279
271
  onClear: () => o(""),
280
272
  "aria-label": a("dataTable.quickSearch.label", "Quick search")
281
273
  }
282
274
  ) });
283
275
  };
284
- Ke.displayName = "DataTable.Toolbar.QuickSearch";
285
- const We = _(
276
+ We.displayName = "DataTable.Toolbar.QuickSearch";
277
+ const He = $(
286
278
  ({ onRefresh: t, label: e, intent: a = "outline", ...n }, r) => {
287
- const { t: o } = F();
279
+ const { t: o } = R();
288
280
  return /* @__PURE__ */ s(
289
- V,
281
+ G,
290
282
  {
291
283
  ref: r,
292
284
  type: "button",
293
285
  intent: a,
294
- icon: /* @__PURE__ */ s(Ft, { "aria-hidden": !0 }),
286
+ icon: /* @__PURE__ */ s(Rt, { "aria-hidden": !0 }),
295
287
  tooltip: e ?? o("dataTable.refresh", "Refresh"),
296
288
  onClick: t,
297
289
  ...n
@@ -299,8 +291,8 @@ const We = _(
299
291
  );
300
292
  }
301
293
  );
302
- We.displayName = "DataTable.Toolbar.Refresh";
303
- function Kt(t) {
294
+ He.displayName = "DataTable.Toolbar.Refresh";
295
+ function Wt(t) {
304
296
  if (!t || typeof t != "object") return "";
305
297
  const e = t;
306
298
  if (typeof e.filter == "string" || typeof e.filter == "number") {
@@ -309,43 +301,43 @@ function Kt(t) {
309
301
  }
310
302
  return typeof e.dateFrom == "string" ? typeof e.dateTo == "string" && e.dateTo ? `${e.dateFrom} – ${e.dateTo}` : String(e.dateFrom) : Array.isArray(e.values) ? e.values.map(String).join(", ") : "";
311
303
  }
312
- const He = () => {
313
- const { t } = F(), { getApi: e } = q("DataTable.Toolbar.FilterChips"), [a, n] = R([]), [r, o] = R(""), l = M(() => {
314
- const i = e();
315
- if (!i) {
304
+ const Qe = () => {
305
+ const { t } = R(), { getApi: e } = _("DataTable.Toolbar.FilterChips"), [a, n] = D([]), [r, o] = D(""), i = M(() => {
306
+ const l = e();
307
+ if (!l) {
316
308
  n([]), o("");
317
309
  return;
318
310
  }
319
- const p = i.getFilterModel() ?? {}, C = i.getColumns() ?? [], g = [];
320
- for (const v of Object.keys(p)) {
321
- const y = C.find((m) => m.getColId() === v), f = i.getDisplayNameForColumn(y, null) ?? v;
322
- g.push({
323
- colId: v,
324
- headerName: f,
325
- text: Kt(p[v])
311
+ const f = l.getFilterModel() ?? {}, y = l.getColumns() ?? [], b = [];
312
+ for (const T of Object.keys(f)) {
313
+ const h = y.find((g) => g.getColId() === T), p = l.getDisplayNameForColumn(h, null) ?? T;
314
+ b.push({
315
+ colId: T,
316
+ headerName: p,
317
+ text: Wt(f[T])
326
318
  });
327
319
  }
328
- n(g);
329
- const b = i.getGridOption("quickFilterText");
330
- o(typeof b == "string" ? b : "");
320
+ n(b);
321
+ const x = l.getGridOption("quickFilterText");
322
+ o(typeof x == "string" ? x : "");
331
323
  }, [e]);
332
324
  if (P(() => {
333
- const i = e();
334
- if (!i) return;
335
- const p = (C) => l();
336
- return i.addEventListener("filterChanged", p), l(), () => {
337
- i.removeEventListener("filterChanged", p);
325
+ const l = e();
326
+ if (!l) return;
327
+ const f = (y) => i();
328
+ return l.addEventListener("filterChanged", f), i(), () => {
329
+ l.removeEventListener("filterChanged", f);
338
330
  };
339
- }, [e, l]), a.length + (r ? 1 : 0) === 0) return null;
340
- function d(i) {
341
- const p = e();
342
- p && p.destroyFilter(i);
331
+ }, [e, i]), a.length + (r ? 1 : 0) === 0) return null;
332
+ function d(l) {
333
+ const f = e();
334
+ f && f.destroyFilter(l);
343
335
  }
344
336
  function c() {
345
- const i = e();
346
- i && (i.setFilterModel(null), i.setGridOption("quickFilterText", ""), o(""));
337
+ const l = e();
338
+ l && (l.setFilterModel(null), l.setGridOption("quickFilterText", ""), o(""));
347
339
  }
348
- return /* @__PURE__ */ E(
340
+ return /* @__PURE__ */ I(
349
341
  "div",
350
342
  {
351
343
  role: "group",
@@ -353,35 +345,35 @@ const He = () => {
353
345
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
354
346
  children: [
355
347
  r && /* @__PURE__ */ s(
356
- ae,
348
+ J,
357
349
  {
358
350
  label: `${t("dataTable.quickSearch.label", "Quick search")}: ${r}`,
359
351
  size: "sm",
360
352
  fill: "outline",
361
353
  onRemove: () => {
362
- const i = e();
363
- i == null || i.setGridOption("quickFilterText", ""), o("");
354
+ const l = e();
355
+ l == null || l.setGridOption("quickFilterText", ""), o("");
364
356
  }
365
357
  }
366
358
  ),
367
- a.map((i) => /* @__PURE__ */ s(
368
- ae,
359
+ a.map((l) => /* @__PURE__ */ s(
360
+ J,
369
361
  {
370
- label: i.text ? `${i.headerName}: ${i.text}` : i.headerName,
362
+ label: l.text ? `${l.headerName}: ${l.text}` : l.headerName,
371
363
  size: "sm",
372
364
  fill: "outline",
373
- onRemove: () => d(i.colId)
365
+ onRemove: () => d(l.colId)
374
366
  },
375
- i.colId
367
+ l.colId
376
368
  )),
377
369
  /* @__PURE__ */ s(
378
- j,
370
+ L,
379
371
  {
380
372
  type: "button",
381
373
  intent: "ghost",
382
374
  size: "sm",
383
375
  onClick: c,
384
- startIcon: /* @__PURE__ */ s(De, { "aria-hidden": !0, className: "ds:size-4" }),
376
+ startIcon: /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }),
385
377
  children: t("dataTable.filterChips.clearAll", "Clear all")
386
378
  }
387
379
  )
@@ -389,15 +381,15 @@ const He = () => {
389
381
  }
390
382
  );
391
383
  };
392
- He.displayName = "DataTable.Toolbar.FilterChips";
393
- const Qe = ({
384
+ Qe.displayName = "DataTable.Toolbar.FilterChips";
385
+ const Xe = ({
394
386
  field: t,
395
387
  options: e,
396
388
  label: a
397
389
  }) => {
398
- const { t: n } = F(), { getApi: r } = q("DataTable.Toolbar.FacetFilter"), [o, l] = R(null);
390
+ const { t: n } = R(), { getApi: r } = _("DataTable.Toolbar.FacetFilter"), [o, i] = D(null);
399
391
  function u(d) {
400
- l(d);
392
+ i(d);
401
393
  const c = r();
402
394
  if (c) {
403
395
  if (d === null) {
@@ -419,7 +411,7 @@ const Qe = ({
419
411
  children: e.map((d) => {
420
412
  const c = o === d.value;
421
413
  return /* @__PURE__ */ s(
422
- j,
414
+ L,
423
415
  {
424
416
  type: "button",
425
417
  size: "sm",
@@ -434,54 +426,54 @@ const Qe = ({
434
426
  }
435
427
  );
436
428
  };
437
- Qe.displayName = "DataTable.Toolbar.FacetFilter";
438
- const Wt = ["csv", "xlsx", "pdf"];
439
- async function Ht(t, e) {
429
+ Xe.displayName = "DataTable.Toolbar.FacetFilter";
430
+ const Ht = ["csv", "xlsx", "pdf"];
431
+ async function Qt(t, e) {
440
432
  if (!t) return;
441
- const a = await import("./exceljs.min-DUJ-5CGx.js").then((v) => v.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), l = (t.getColumns() ?? []).filter((v) => v.isVisible());
433
+ const a = await import("./exceljs.min-DUJ-5CGx.js").then((T) => T.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), i = (t.getColumns() ?? []).filter((T) => T.isVisible());
442
434
  r.addRow(
443
- l.map(
444
- (v) => t.getDisplayNameForColumn(v, null) ?? v.getColId()
435
+ i.map(
436
+ (T) => t.getDisplayNameForColumn(T, null) ?? T.getColId()
445
437
  )
446
- ), t.forEachNodeAfterFilterAndSort((v) => {
447
- v.data && r.addRow(
448
- l.map((y) => {
449
- const f = t.getCellValue({
450
- rowNode: v,
451
- colKey: y,
438
+ ), t.forEachNodeAfterFilterAndSort((T) => {
439
+ T.data && r.addRow(
440
+ i.map((h) => {
441
+ const p = t.getCellValue({
442
+ rowNode: T,
443
+ colKey: h,
452
444
  useFormatter: !0
453
445
  });
454
- return f ?? "";
446
+ return p ?? "";
455
447
  })
456
448
  );
457
449
  });
458
- const u = W("--muted", [240, 240, 240]), d = W("--foreground", [30, 30, 30]), c = r.getRow(1), i = ([v, y, f]) => `${v.toString(16).padStart(2, "0")}${y.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}`.toUpperCase();
459
- c.eachCell((v) => {
460
- v.font = { bold: !0, color: { argb: `FF${i(d)}` } }, v.fill = {
450
+ const u = H("--muted", [240, 240, 240]), d = H("--foreground", [30, 30, 30]), c = r.getRow(1), l = ([T, h, p]) => `${T.toString(16).padStart(2, "0")}${h.toString(16).padStart(2, "0")}${p.toString(16).padStart(2, "0")}`.toUpperCase();
451
+ c.eachCell((T) => {
452
+ T.font = { bold: !0, color: { argb: `FF${l(d)}` } }, T.fill = {
461
453
  type: "pattern",
462
454
  pattern: "solid",
463
- fgColor: { argb: `FF${i(u)}` }
455
+ fgColor: { argb: `FF${l(u)}` }
464
456
  };
465
457
  });
466
- const p = await n.xlsx.writeBuffer(), C = new Blob([p], {
458
+ const f = await n.xlsx.writeBuffer(), y = new Blob([f], {
467
459
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
468
- }), g = URL.createObjectURL(C), b = document.createElement("a");
469
- b.href = g, b.download = e.fileName, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(g);
460
+ }), b = URL.createObjectURL(y), x = document.createElement("a");
461
+ x.href = b, x.download = e.fileName, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(b);
470
462
  }
471
- const Xe = Ne(null);
472
- function Qt() {
473
- const t = Se(Xe);
463
+ const Je = Se(null);
464
+ function Xt() {
465
+ const t = we(Je);
474
466
  if (!t)
475
467
  throw new Error(
476
468
  "DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
477
469
  );
478
470
  return t;
479
471
  }
480
- const Je = ({ children: t, label: e }) => {
481
- const { t: a } = F(), { getApi: n } = q("DataTable.Toolbar.ExportMenu"), r = z(() => ({ getApi: n }), [n]), o = t ?? Wt.map((l) => /* @__PURE__ */ s(me, { format: l }, l));
482
- return /* @__PURE__ */ s(Xe.Provider, { value: r, children: /* @__PURE__ */ E(Y.Root, { children: [
483
- /* @__PURE__ */ s(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
484
- V,
472
+ const Ze = ({ children: t, label: e }) => {
473
+ const { t: a } = R(), { getApi: n } = _("DataTable.Toolbar.ExportMenu"), r = z(() => ({ getApi: n }), [n]), o = t ?? Ht.map((i) => /* @__PURE__ */ s(ge, { format: i }, i));
474
+ return /* @__PURE__ */ s(Je.Provider, { value: r, children: /* @__PURE__ */ I(B.Root, { children: [
475
+ /* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
476
+ G,
485
477
  {
486
478
  type: "button",
487
479
  intent: "outline",
@@ -491,131 +483,131 @@ const Je = ({ children: t, label: e }) => {
491
483
  "aria-haspopup": "menu"
492
484
  }
493
485
  ) }),
494
- /* @__PURE__ */ s(Y.Content, { align: "end", sideOffset: 4, children: o })
486
+ /* @__PURE__ */ s(B.Content, { align: "end", sideOffset: 4, children: o })
495
487
  ] }) });
496
488
  };
497
- Je.displayName = "DataTable.Toolbar.ExportMenu";
498
- function Xt(t, e) {
489
+ Ze.displayName = "DataTable.Toolbar.ExportMenu";
490
+ function Jt(t, e) {
499
491
  return e === "csv" ? t("dataTable.export.csv", "Export CSV") : e === "xlsx" ? t("dataTable.export.xlsx", "Export Excel") : e === "pdf" ? t("dataTable.export.pdf", "Export PDF") : t("dataTable.export.custom", "Export");
500
492
  }
501
- function Jt(t) {
502
- return t === "csv" ? /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ s(Et, { "aria-hidden": !0, className: "ds:size-4" }) : t === "pdf" ? /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" });
493
+ function Zt(t) {
494
+ return t === "csv" ? /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ s(Et, { "aria-hidden": !0, className: "ds:size-4" }) : t === "pdf" ? /* @__PURE__ */ s(Ie, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" });
503
495
  }
504
- const me = ({
496
+ const ge = ({
505
497
  format: t,
506
498
  label: e,
507
499
  onClick: a,
508
500
  fileName: n
509
501
  }) => {
510
- const { t: r } = F(), { getApi: o } = Qt(), l = M(() => {
502
+ const { t: r } = R(), { getApi: o } = Xt(), i = M(() => {
511
503
  const u = o();
512
504
  if (t === "csv") {
513
505
  u == null || u.exportDataAsCsv();
514
506
  return;
515
507
  }
516
508
  if (t === "pdf") {
517
- Be(u, {
509
+ Ve(u, {
518
510
  fileName: n ?? "data-table-export.pdf"
519
511
  });
520
512
  return;
521
513
  }
522
514
  if (t === "xlsx") {
523
- Ht(u, {
515
+ Qt(u, {
524
516
  fileName: n ?? "data-table-export.xlsx"
525
517
  });
526
518
  return;
527
519
  }
528
520
  a == null || a(u);
529
521
  }, [t, n, a, o]);
530
- return /* @__PURE__ */ s(Y.Item, { onSelect: l, children: /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
531
- Jt(t),
532
- /* @__PURE__ */ s("span", { children: e ?? Xt(r, t) })
522
+ return /* @__PURE__ */ s(B.Item, { onSelect: i, children: /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
523
+ Zt(t),
524
+ /* @__PURE__ */ s("span", { children: e ?? Jt(r, t) })
533
525
  ] }) });
534
526
  };
535
- me.displayName = "DataTable.Toolbar.ExportMenu.Item";
536
- function Zt(t) {
527
+ ge.displayName = "DataTable.Toolbar.ExportMenu.Item";
528
+ function Yt(t) {
537
529
  return t ? (t.getColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
538
530
  colId: a.getColId(),
539
531
  displayName: t.getDisplayNameForColumn(a, null) || a.getColId(),
540
532
  visible: a.isVisible()
541
533
  }).filter((a) => a !== null) : [];
542
534
  }
543
- const Ze = ({ label: t }) => {
544
- const { t: e } = F(), { getApi: a } = q("DataTable.Toolbar.ColumnToggle"), [n, r] = R(!1), [o, l] = R([]), [u, d] = R(null), [c, i] = R(null);
535
+ const Ye = ({ label: t, icon: e, footer: a }) => {
536
+ const { t: n } = R(), { getApi: r } = _("DataTable.Toolbar.ColumnToggle"), [o, i] = D(!1), [u, d] = D([]), [c, l] = D(null), [f, y] = D(null);
545
537
  P(() => {
546
- n && l(Zt(a()));
547
- }, [n, a]);
548
- const p = M(
549
- (b, v) => {
550
- const y = a();
551
- y && (y.setColumnsVisible([b], v), l(
552
- (f) => f.map(
553
- (m) => m.colId === b ? { ...m, visible: v } : m
538
+ o && d(Yt(r()));
539
+ }, [o, r]);
540
+ const b = M(
541
+ (h, p) => {
542
+ const g = r();
543
+ g && (g.setColumnsVisible([h], p), d(
544
+ (m) => m.map(
545
+ (v) => v.colId === h ? { ...v, visible: p } : v
554
546
  )
555
547
  ));
556
548
  },
557
- [a]
558
- ), C = M(
559
- (b, v) => {
560
- if (b === v) return;
561
- const y = a();
562
- if (!y) return;
563
- l((m) => {
564
- const h = m.findIndex((D) => D.colId === b), x = m.findIndex((D) => D.colId === v);
565
- if (h < 0 || x < 0) return m;
566
- const S = [...m], [I] = S.splice(h, 1);
567
- return S.splice(x, 0, I), S;
549
+ [r]
550
+ ), x = M(
551
+ (h, p) => {
552
+ if (h === p) return;
553
+ const g = r();
554
+ if (!g) return;
555
+ d((v) => {
556
+ const S = v.findIndex((F) => F.colId === h), E = v.findIndex((F) => F.colId === p);
557
+ if (S < 0 || E < 0) return v;
558
+ const k = [...v], [q] = k.splice(S, 1);
559
+ return k.splice(E, 0, q), k;
568
560
  });
569
- const f = o.findIndex((m) => m.colId === v);
570
- f >= 0 && y.moveColumns([b], f);
561
+ const m = u.findIndex((v) => v.colId === p);
562
+ m >= 0 && g.moveColumns([h], m);
571
563
  },
572
- [a, o]
573
- ), g = t ?? e("dataTable.columnToggle");
574
- return /* @__PURE__ */ E(Z.Root, { open: n, onOpenChange: r, children: [
575
- /* @__PURE__ */ s(Z.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
576
- V,
564
+ [r, u]
565
+ ), T = t ?? n("dataTable.columnToggle");
566
+ return /* @__PURE__ */ I(ee.Root, { open: o, onOpenChange: i, children: [
567
+ /* @__PURE__ */ s(ee.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
568
+ G,
577
569
  {
578
570
  type: "button",
579
571
  intent: "outline",
580
- icon: /* @__PURE__ */ s(Gt, { "aria-hidden": !0 }),
581
- "aria-label": g,
572
+ icon: e ?? /* @__PURE__ */ s(Dt, { "aria-hidden": !0 }),
573
+ "aria-label": T,
582
574
  "aria-haspopup": "dialog"
583
575
  }
584
576
  ) }),
585
- /* @__PURE__ */ E(Z.Content, { size: "sm", align: "end", children: [
586
- /* @__PURE__ */ s(Z.Heading, { children: g }),
577
+ /* @__PURE__ */ I(ee.Content, { size: "sm", align: "end", children: [
578
+ /* @__PURE__ */ s(ee.Heading, { children: T }),
587
579
  /* @__PURE__ */ s(
588
580
  "ul",
589
581
  {
590
582
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
591
- "aria-label": g,
592
- children: o.map((b) => {
593
- const v = u === b.colId, y = c === b.colId && u !== b.colId;
594
- return /* @__PURE__ */ E(
583
+ "aria-label": T,
584
+ children: u.map((h) => {
585
+ const p = c === h.colId, g = f === h.colId && c !== h.colId;
586
+ return /* @__PURE__ */ I(
595
587
  "li",
596
588
  {
597
589
  draggable: !0,
598
- onDragStart: (f) => {
599
- d(b.colId), f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", b.colId);
590
+ onDragStart: (m) => {
591
+ l(h.colId), m.dataTransfer.effectAllowed = "move", m.dataTransfer.setData("text/plain", h.colId);
600
592
  },
601
- onDragOver: (f) => {
602
- f.preventDefault(), f.dataTransfer.dropEffect = "move", i(b.colId);
593
+ onDragOver: (m) => {
594
+ m.preventDefault(), m.dataTransfer.dropEffect = "move", y(h.colId);
603
595
  },
604
596
  onDragLeave: () => {
605
- i((f) => f === b.colId ? null : f);
597
+ y((m) => m === h.colId ? null : m);
606
598
  },
607
- onDrop: (f) => {
608
- f.preventDefault();
609
- const m = f.dataTransfer.getData("text/plain");
610
- m && C(m, b.colId), d(null), i(null);
599
+ onDrop: (m) => {
600
+ m.preventDefault();
601
+ const v = m.dataTransfer.getData("text/plain");
602
+ v && x(v, h.colId), l(null), y(null);
611
603
  },
612
604
  onDragEnd: () => {
613
- d(null), i(null);
605
+ l(null), y(null);
614
606
  },
615
607
  className: [
616
608
  "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
617
- v ? "ds:opacity-50" : "",
618
- y ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
609
+ p ? "ds:opacity-50" : "",
610
+ g ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
619
611
  ].filter(Boolean).join(" "),
620
612
  children: [
621
613
  /* @__PURE__ */ s(
@@ -623,41 +615,42 @@ const Ze = ({ label: t }) => {
623
615
  {
624
616
  "aria-hidden": "true",
625
617
  className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
626
- children: /* @__PURE__ */ s(Dt, { className: "ds:size-4" })
618
+ children: /* @__PURE__ */ s(kt, { className: "ds:size-4" })
627
619
  }
628
620
  ),
629
621
  /* @__PURE__ */ s(
630
- Re,
622
+ De,
631
623
  {
632
- label: b.displayName,
633
- checked: b.visible,
634
- onCheckedChange: (f) => p(b.colId, f === !0)
624
+ label: h.displayName,
625
+ checked: h.visible,
626
+ onCheckedChange: (m) => b(h.colId, m === !0)
635
627
  }
636
628
  )
637
629
  ]
638
630
  },
639
- b.colId
631
+ h.colId
640
632
  );
641
633
  })
642
634
  }
643
- )
635
+ ),
636
+ a ? /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: a }) : null
644
637
  ] })
645
638
  ] });
646
639
  };
647
- Ze.displayName = "DataTable.Toolbar.ColumnToggle";
648
- const Ye = _(
649
- ({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...o }, l) => {
650
- const { t: u } = F(), { getApi: d, selectionCount: c } = q(
640
+ Ye.displayName = "DataTable.Toolbar.ColumnToggle";
641
+ const et = $(
642
+ ({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...o }, i) => {
643
+ const { t: u } = R(), { getApi: d, selectionCount: c } = _(
651
644
  "DataTable.Toolbar.BulkAction"
652
645
  );
653
- return c === 0 ? null : /* @__PURE__ */ E(
654
- j,
646
+ return c === 0 ? null : /* @__PURE__ */ I(
647
+ L,
655
648
  {
656
- ref: l,
649
+ ref: i,
657
650
  type: "button",
658
651
  intent: n === "destructive" ? "destructive" : "secondary",
659
652
  size: r,
660
- startIcon: Bt(e),
653
+ startIcon: Vt(e),
661
654
  onClick: () => a(d()),
662
655
  "aria-label": `${t} (${u("dataTable.bulkAction", { count: c })})`,
663
656
  ...o,
@@ -676,32 +669,32 @@ const Ye = _(
676
669
  );
677
670
  }
678
671
  );
679
- Ye.displayName = "DataTable.Toolbar.BulkAction";
680
- const Yt = Object.assign(Je, {
681
- Item: me
682
- }), te = Object.assign(_e, {
683
- FilterBar: qe,
684
- Actions: $e,
672
+ et.displayName = "DataTable.Toolbar.BulkAction";
673
+ const ea = Object.assign(Ze, {
674
+ Item: ge
675
+ }), ae = Object.assign($e, {
676
+ FilterBar: _e,
677
+ Actions: Be,
685
678
  /** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
686
679
  ExportCsv: Ge,
687
680
  /** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
688
- ExportPdf: Ve,
689
- Print: Ue,
690
- ColumnToggle: Ze,
691
- BulkAction: Ye,
692
- QuickSearch: Ke,
693
- Refresh: We,
694
- FilterChips: He,
695
- FacetFilter: Qe,
696
- ExportMenu: Yt
697
- }), ea = [
681
+ ExportPdf: Ue,
682
+ Print: Ke,
683
+ ColumnToggle: Ye,
684
+ BulkAction: et,
685
+ QuickSearch: We,
686
+ Refresh: He,
687
+ FilterChips: Qe,
688
+ FacetFilter: Xe,
689
+ ExportMenu: ea
690
+ }), ta = [
698
691
  "contains",
699
692
  "equals",
700
693
  "startsWith",
701
694
  "endsWith",
702
695
  "notContains"
703
696
  ];
704
- function ta(t) {
697
+ function aa(t) {
705
698
  const e = new Intl.Collator(t, {
706
699
  sensitivity: "base",
707
700
  usage: "search"
@@ -724,54 +717,54 @@ function ta(t) {
724
717
  ) === 0
725
718
  };
726
719
  }
727
- function aa(t) {
720
+ function na(t) {
728
721
  return t == null ? null : typeof t == "string" ? t : String(t);
729
722
  }
730
- function na(t) {
731
- const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: o } = t, { t: l } = F("ui"), u = (e == null ? void 0 : e.type) ?? o ?? "contains", [d, c] = R(u), [i, p] = R((e == null ? void 0 : e.filter) ?? "");
723
+ function ra(t) {
724
+ const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: o } = t, { t: i } = R("ui"), u = (e == null ? void 0 : e.type) ?? o ?? "contains", [d, c] = D(u), [l, f] = D((e == null ? void 0 : e.filter) ?? "");
732
725
  P(() => {
733
- c((e == null ? void 0 : e.type) ?? o ?? "contains"), p((e == null ? void 0 : e.filter) ?? "");
726
+ c((e == null ? void 0 : e.type) ?? o ?? "contains"), f((e == null ? void 0 : e.filter) ?? "");
734
727
  }, [e, o]);
735
- const C = z(() => ta(It.language), []);
736
- J({
737
- doesFilterPass: (f) => {
738
- const m = e;
739
- if (!m || m.filter === "") return !0;
740
- const h = aa(n(f.node));
741
- if (h === null) return !1;
742
- switch (m.type) {
728
+ const y = z(() => aa(zt.language), []);
729
+ Y({
730
+ doesFilterPass: (p) => {
731
+ const g = e;
732
+ if (!g || g.filter === "") return !0;
733
+ const m = na(n(p.node));
734
+ if (m === null) return !1;
735
+ switch (g.type) {
743
736
  case "equals":
744
- return C.equals(h, m.filter);
737
+ return y.equals(m, g.filter);
745
738
  case "contains":
746
- return C.contains(h, m.filter);
739
+ return y.contains(m, g.filter);
747
740
  case "startsWith":
748
- return C.startsWith(h, m.filter);
741
+ return y.startsWith(m, g.filter);
749
742
  case "endsWith":
750
- return C.endsWith(h, m.filter);
743
+ return y.endsWith(m, g.filter);
751
744
  case "notContains":
752
- return !C.contains(h, m.filter);
745
+ return !y.contains(m, g.filter);
753
746
  default:
754
747
  return !0;
755
748
  }
756
749
  }
757
750
  });
758
- function g() {
759
- if (i.trim() === "") {
751
+ function b() {
752
+ if (l.trim() === "") {
760
753
  a(null);
761
754
  return;
762
755
  }
763
- a({ type: d, filter: i });
756
+ a({ type: d, filter: l });
764
757
  }
765
- function b() {
766
- p(""), c(o ?? "contains"), a(null);
758
+ function x() {
759
+ f(""), c(o ?? "contains"), a(null);
767
760
  }
768
- const v = ea.map(
769
- (f) => ({
770
- value: f,
771
- label: l(`dataTable.textFilter.operators.${f}`)
761
+ const T = ta.map(
762
+ (p) => ({
763
+ value: p,
764
+ label: i(`dataTable.textFilter.operators.${p}`)
772
765
  })
773
- ), y = r ?? l("dataTable.textFilter.placeholder");
774
- return /* @__PURE__ */ E(
766
+ ), h = r ?? i("dataTable.textFilter.placeholder");
767
+ return /* @__PURE__ */ I(
775
768
  "div",
776
769
  {
777
770
  "data-component": "text-filter",
@@ -781,78 +774,78 @@ function na(t) {
781
774
  Ee,
782
775
  {
783
776
  size: "sm",
784
- options: v,
777
+ options: T,
785
778
  value: d,
786
- onValueChange: (f) => {
787
- f !== "" && c(f);
779
+ onValueChange: (p) => {
780
+ p !== "" && c(p);
788
781
  },
789
- "aria-label": l("dataTable.textFilter.operators.contains")
782
+ "aria-label": i("dataTable.textFilter.operators.contains")
790
783
  }
791
784
  ),
792
785
  /* @__PURE__ */ s(
793
- fe,
786
+ pe,
794
787
  {
795
788
  size: "sm",
796
- value: i,
797
- onChange: (f) => p(f.target.value),
798
- onKeyDown: (f) => {
799
- f.key === "Enter" && (f.preventDefault(), g());
789
+ value: l,
790
+ onChange: (p) => f(p.target.value),
791
+ onKeyDown: (p) => {
792
+ p.key === "Enter" && (p.preventDefault(), b());
800
793
  },
801
- placeholder: y,
802
- "aria-label": y,
803
- startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": "true", className: "ds:size-4" })
794
+ placeholder: h,
795
+ "aria-label": h,
796
+ startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": "true", className: "ds:size-4" })
804
797
  }
805
798
  ),
806
- /* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
807
- /* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: b, type: "button", children: l("dataTable.textFilter.clear") }),
808
- /* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: g, type: "button", children: l("dataTable.textFilter.apply") })
799
+ /* @__PURE__ */ I("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
800
+ /* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: x, type: "button", children: i("dataTable.textFilter.clear") }),
801
+ /* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: b, type: "button", children: i("dataTable.textFilter.apply") })
809
802
  ] })
810
803
  ]
811
804
  }
812
805
  );
813
806
  }
814
- function ra(t) {
815
- var p, C;
816
- const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), o = ((C = (p = n == null ? void 0 : n.getColDef) == null ? void 0 : p.call(n)) == null ? void 0 : C.filterParams) ?? {}, l = o.defaultOperator ?? "contains", u = o.placeholder ?? r("dataTable.textFilter.placeholder"), [d, c] = R((e == null ? void 0 : e.filter) ?? "");
807
+ function sa(t) {
808
+ var f, y;
809
+ const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((y = (f = n == null ? void 0 : n.getColDef) == null ? void 0 : f.call(n)) == null ? void 0 : y.filterParams) ?? {}, i = o.defaultOperator ?? "contains", u = o.placeholder ?? r("dataTable.textFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? "");
817
810
  P(() => {
818
811
  c((e == null ? void 0 : e.filter) ?? "");
819
812
  }, [e == null ? void 0 : e.filter]), P(() => {
820
813
  if (d === ((e == null ? void 0 : e.filter) ?? "")) return;
821
- const g = setTimeout(() => {
814
+ const b = setTimeout(() => {
822
815
  if (d === "") {
823
816
  e && a(null);
824
817
  return;
825
818
  }
826
- a({ type: l, filter: d });
819
+ a({ type: i, filter: d });
827
820
  }, 200);
828
- return () => clearTimeout(g);
829
- }, [d, l, e, a]);
830
- function i() {
821
+ return () => clearTimeout(b);
822
+ }, [d, i, e, a]);
823
+ function l() {
831
824
  c(""), e && a(null);
832
825
  }
833
826
  return /* @__PURE__ */ s("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
834
- fe,
827
+ pe,
835
828
  {
836
829
  size: "sm",
837
830
  value: d,
838
- onChange: (g) => c(g.target.value),
831
+ onChange: (b) => c(b.target.value),
839
832
  placeholder: u,
840
833
  "aria-label": u,
841
- startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": "true", className: "ds:size-4" }),
834
+ startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": "true", className: "ds:size-4" }),
842
835
  endAdornment: d.length > 0 ? /* @__PURE__ */ s(
843
836
  "button",
844
837
  {
845
838
  type: "button",
846
839
  "aria-label": r("dataTable.textFilter.clear"),
847
- onClick: i,
840
+ onClick: l,
848
841
  className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
849
- children: /* @__PURE__ */ s(De, { "aria-hidden": "true", className: "ds:size-4" })
842
+ children: /* @__PURE__ */ s(ke, { "aria-hidden": "true", className: "ds:size-4" })
850
843
  }
851
844
  ) : void 0
852
845
  }
853
846
  ) });
854
847
  }
855
- const sa = {
848
+ const la = {
856
849
  id: "data-table",
857
850
  capabilities: [
858
851
  "select_single",
@@ -960,8 +953,8 @@ const sa = {
960
953
  }
961
954
  }
962
955
  };
963
- St.registerModules([wt]);
964
- const oa = xt("ag-theme-alfadocs ds:w-full", {
956
+ wt.registerModules([Ft]);
957
+ const oa = Nt("ag-theme-alfadocs ds:w-full", {
965
958
  variants: {
966
959
  density: {
967
960
  default: "",
@@ -978,8 +971,8 @@ const oa = xt("ag-theme-alfadocs ds:w-full", {
978
971
  bordered: !0
979
972
  }
980
973
  });
981
- function la() {
982
- const { t } = F();
974
+ function ia() {
975
+ const { t } = R();
983
976
  return z(
984
977
  () => ({
985
978
  // Filter strings
@@ -1012,7 +1005,7 @@ function la() {
1012
1005
  [t]
1013
1006
  );
1014
1007
  }
1015
- function ia() {
1008
+ function ca() {
1016
1009
  return /* @__PURE__ */ s(
1017
1010
  "div",
1018
1011
  {
@@ -1020,7 +1013,7 @@ function ia() {
1020
1013
  "aria-live": "polite",
1021
1014
  className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
1022
1015
  children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ s(
1023
- Tt,
1016
+ Ct,
1024
1017
  {
1025
1018
  variant: "rectangular",
1026
1019
  className: "ds:h-[var(--min-target-size)] ds:w-full"
@@ -1030,10 +1023,10 @@ function ia() {
1030
1023
  }
1031
1024
  );
1032
1025
  }
1033
- function ca() {
1034
- const { t } = F();
1026
+ function da() {
1027
+ const { t } = R();
1035
1028
  return /* @__PURE__ */ s(
1036
- Ct,
1029
+ xt,
1037
1030
  {
1038
1031
  variant: "no-results",
1039
1032
  size: "sm",
@@ -1042,7 +1035,7 @@ function ca() {
1042
1035
  }
1043
1036
  );
1044
1037
  }
1045
- function da(t) {
1038
+ function ua(t) {
1046
1039
  try {
1047
1040
  const e = localStorage.getItem(`data-table-col-state:${t}`);
1048
1041
  return e ? JSON.parse(e) : null;
@@ -1050,7 +1043,7 @@ function da(t) {
1050
1043
  return null;
1051
1044
  }
1052
1045
  }
1053
- function ua(t, e) {
1046
+ function fa(t, e) {
1054
1047
  try {
1055
1048
  localStorage.setItem(
1056
1049
  `data-table-col-state:${t}`,
@@ -1059,201 +1052,201 @@ function ua(t, e) {
1059
1052
  } catch {
1060
1053
  }
1061
1054
  }
1062
- function fa(t, e) {
1055
+ function pa(t, e) {
1063
1056
  const {
1064
1057
  columnDefs: a,
1065
1058
  rowData: n,
1066
1059
  rowSelection: r,
1067
1060
  pagination: o = !1,
1068
- paginationPageSize: l = 25,
1061
+ paginationPageSize: i = 25,
1069
1062
  paginationPageSizeSelector: u = [10, 25, 50, 100],
1070
1063
  gridId: d,
1071
1064
  onSelectionChanged: c,
1072
- onSortChanged: i,
1073
- onFilterChanged: p,
1074
- noRowsOverlay: C,
1075
- loadingOverlay: g,
1076
- gridOptions: b,
1077
- density: v,
1078
- bordered: y,
1079
- heightClass: f = "ds:h-[500px]",
1080
- className: m,
1081
- getRowClass: h,
1082
- pinnedBottomRowData: x,
1065
+ onSortChanged: l,
1066
+ onFilterChanged: f,
1067
+ noRowsOverlay: y,
1068
+ loadingOverlay: b,
1069
+ gridOptions: x,
1070
+ density: T,
1071
+ bordered: h,
1072
+ heightClass: p = "ds:h-[500px]",
1073
+ className: g,
1074
+ getRowClass: m,
1075
+ pinnedBottomRowData: v,
1083
1076
  printMode: S = !1,
1084
- children: I
1085
- } = t, { t: D, i18n: $ } = F(), k = X(null), [G, tt] = R(0), [se, oe] = R(""), at = la(), le = z(
1077
+ children: E
1078
+ } = t, { t: k, i18n: q } = R(), F = Z(null), [V, at] = D(0), [se, le] = D(""), nt = ia(), oe = z(
1086
1079
  () => ({
1087
1080
  getSelection: () => {
1088
1081
  var w;
1089
- const T = (w = k.current) == null ? void 0 : w.api;
1090
- if (!T) return [];
1082
+ const C = (w = F.current) == null ? void 0 : w.api;
1083
+ if (!C) return [];
1091
1084
  const N = [];
1092
- for (const O of T.getSelectedNodes())
1085
+ for (const O of C.getSelectedNodes())
1093
1086
  O.id != null && N.push(O.id);
1094
1087
  return N;
1095
1088
  },
1096
- setSelection: (T) => {
1089
+ setSelection: (C) => {
1097
1090
  var O;
1098
- const N = (O = k.current) == null ? void 0 : O.api;
1091
+ const N = (O = F.current) == null ? void 0 : O.api;
1099
1092
  if (!N) return;
1100
- const w = new Set(T);
1093
+ const w = new Set(C);
1101
1094
  N.forEachNode((A) => {
1102
1095
  A.id != null && A.setSelected(w.has(A.id));
1103
1096
  });
1104
1097
  },
1105
- selectRange: (T, N) => {
1106
- var be;
1107
- const w = (be = k.current) == null ? void 0 : be.api;
1098
+ selectRange: (C, N) => {
1099
+ var he;
1100
+ const w = (he = F.current) == null ? void 0 : he.api;
1108
1101
  if (!w) return;
1109
1102
  const O = [];
1110
- w.forEachNodeAfterFilterAndSort((U) => {
1111
- U.id != null && O.push(U.id);
1103
+ w.forEachNodeAfterFilterAndSort((K) => {
1104
+ K.id != null && O.push(K.id);
1112
1105
  });
1113
- const A = O.indexOf(T), L = O.indexOf(N);
1114
- if (A < 0 || L < 0) return;
1115
- const [B, ce] = A <= L ? [A, L] : [L, A], de = new Set(O.slice(B, ce + 1));
1116
- w.forEachNode((U) => {
1117
- U.id != null && U.setSelected(de.has(U.id));
1106
+ const A = O.indexOf(C), j = O.indexOf(N);
1107
+ if (A < 0 || j < 0) return;
1108
+ const [U, ce] = A <= j ? [A, j] : [j, A], de = new Set(O.slice(U, ce + 1));
1109
+ w.forEachNode((K) => {
1110
+ K.id != null && K.setSelected(de.has(K.id));
1118
1111
  });
1119
1112
  },
1120
1113
  clearSelection: () => {
1121
- var T, N;
1122
- (N = (T = k.current) == null ? void 0 : T.api) == null || N.deselectAll();
1114
+ var C, N;
1115
+ (N = (C = F.current) == null ? void 0 : C.api) == null || N.deselectAll();
1123
1116
  },
1124
1117
  getFilter: () => {
1125
- var T, N;
1126
- return ((N = (T = k.current) == null ? void 0 : T.api) == null ? void 0 : N.getFilterModel()) ?? {};
1118
+ var C, N;
1119
+ return ((N = (C = F.current) == null ? void 0 : C.api) == null ? void 0 : N.getFilterModel()) ?? {};
1127
1120
  },
1128
- setFilter: (T) => {
1121
+ setFilter: (C) => {
1129
1122
  var N, w;
1130
- (w = (N = k.current) == null ? void 0 : N.api) == null || w.setFilterModel(T);
1123
+ (w = (N = F.current) == null ? void 0 : N.api) == null || w.setFilterModel(C);
1131
1124
  },
1132
1125
  getSort: () => {
1133
1126
  var N;
1134
- const T = (N = k.current) == null ? void 0 : N.api;
1135
- return T ? T.getColumnState().filter((w) => w.sort === "asc" || w.sort === "desc").map((w) => ({ colId: w.colId, sort: w.sort })) : [];
1127
+ const C = (N = F.current) == null ? void 0 : N.api;
1128
+ return C ? C.getColumnState().filter((w) => w.sort === "asc" || w.sort === "desc").map((w) => ({ colId: w.colId, sort: w.sort })) : [];
1136
1129
  },
1137
- setSort: (T) => {
1130
+ setSort: (C) => {
1138
1131
  var O;
1139
- const N = (O = k.current) == null ? void 0 : O.api;
1132
+ const N = (O = F.current) == null ? void 0 : O.api;
1140
1133
  if (!N) return;
1141
1134
  const w = N.getColumnState().map((A) => {
1142
- const L = T.find((B) => B.colId === A.colId);
1143
- return { ...A, sort: L ? L.sort : null };
1135
+ const j = C.find((U) => U.colId === A.colId);
1136
+ return { ...A, sort: j ? j.sort : null };
1144
1137
  });
1145
1138
  N.applyColumnState({ state: w, defaultState: { sort: null } });
1146
1139
  },
1147
1140
  getCurrentPage: () => {
1148
- var T, N;
1149
- return ((N = (T = k.current) == null ? void 0 : T.api) == null ? void 0 : N.paginationGetCurrentPage()) ?? 0;
1141
+ var C, N;
1142
+ return ((N = (C = F.current) == null ? void 0 : C.api) == null ? void 0 : N.paginationGetCurrentPage()) ?? 0;
1150
1143
  },
1151
- goToPage: (T) => {
1144
+ goToPage: (C) => {
1152
1145
  var N, w;
1153
- (w = (N = k.current) == null ? void 0 : N.api) == null || w.paginationGoToPage(T);
1146
+ (w = (N = F.current) == null ? void 0 : N.api) == null || w.paginationGoToPage(C);
1154
1147
  },
1155
1148
  getRawApi: () => {
1156
- var T;
1157
- return (T = k.current) == null ? void 0 : T.api;
1149
+ var C;
1150
+ return (C = F.current) == null ? void 0 : C.api;
1158
1151
  }
1159
1152
  }),
1160
1153
  []
1161
1154
  );
1162
- yt(e, () => le, [le]), Pt(sa, le, d);
1163
- const nt = $.dir() === "rtl", rt = n === void 0, st = zt(), { resolvedTheme: ge } = At(), ot = (ge === "light-accessible" || ge === "dark-accessible") && v === "compact" ? "default" : v, lt = z(() => {
1155
+ Tt(e, () => oe, [oe]), Ot(la, oe, d);
1156
+ const rt = q.dir() === "rtl", st = n === void 0, lt = At(), { resolvedTheme: be } = Pt(), ot = (be === "light-accessible" || be === "dark-accessible") && T === "compact" ? "default" : T, it = z(() => {
1164
1157
  if (r)
1165
1158
  return r === "single" ? { mode: "singleRow" } : {
1166
1159
  mode: "multiRow",
1167
1160
  headerCheckbox: !0,
1168
1161
  checkboxes: !0
1169
1162
  };
1170
- }, [r]), it = M(() => {
1163
+ }, [r]), ct = M(() => {
1171
1164
  var N;
1172
- if (!d || !((N = k.current) != null && N.api)) return;
1173
- const T = da(d);
1174
- T && k.current.api.applyColumnState({
1175
- state: T,
1165
+ if (!d || !((N = F.current) != null && N.api)) return;
1166
+ const C = ua(d);
1167
+ C && F.current.api.applyColumnState({
1168
+ state: C,
1176
1169
  applyOrder: !0
1177
1170
  });
1178
1171
  }, [d]), ie = M(() => {
1179
- var T;
1180
- d && ((T = k.current) != null && T.api) && ua(d, k.current.api);
1181
- }, [d]), ct = M(() => {
1172
+ var C;
1173
+ d && ((C = F.current) != null && C.api) && fa(d, F.current.api);
1174
+ }, [d]), dt = M(() => {
1182
1175
  var w;
1183
- const T = (w = k.current) == null ? void 0 : w.api;
1184
- if (!T) return;
1185
- const N = T.getSelectedRows();
1186
- tt(N.length), c == null || c(N);
1187
- }, [c]), dt = M(
1188
- (T) => {
1176
+ const C = (w = F.current) == null ? void 0 : w.api;
1177
+ if (!C) return;
1178
+ const N = C.getSelectedRows();
1179
+ at(N.length), c == null || c(N);
1180
+ }, [c]), ut = M(
1181
+ (C) => {
1189
1182
  var w;
1190
- const N = (w = k.current) == null ? void 0 : w.api;
1183
+ const N = (w = F.current) == null ? void 0 : w.api;
1191
1184
  if (N) {
1192
- const A = N.getColumnState().find((L) => L.sort);
1185
+ const A = N.getColumnState().find((j) => j.sort);
1193
1186
  if (A) {
1194
- const L = A.colId, B = N.getColumnDef(L), ce = (B == null ? void 0 : B.headerName) ?? L, de = A.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1195
- oe(
1196
- D("dataTable.sortAnnounce", {
1187
+ const j = A.colId, U = N.getColumnDef(j), ce = (U == null ? void 0 : U.headerName) ?? j, de = A.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1188
+ le(
1189
+ k("dataTable.sortAnnounce", {
1197
1190
  column: ce,
1198
- direction: D(de)
1191
+ direction: k(de)
1199
1192
  })
1200
1193
  );
1201
1194
  } else
1202
- oe("");
1195
+ le("");
1203
1196
  }
1204
- i == null || i(T);
1197
+ l == null || l(C);
1205
1198
  },
1206
- [i, D]
1207
- ), ut = M(
1208
- (T) => {
1209
- p == null || p(T);
1199
+ [l, k]
1200
+ ), ft = M(
1201
+ (C) => {
1202
+ f == null || f(C);
1210
1203
  },
1211
- [p]
1204
+ [f]
1212
1205
  );
1213
1206
  P(() => {
1214
1207
  if (!se) return;
1215
- const T = setTimeout(() => oe(""), 3e3);
1216
- return () => clearTimeout(T);
1208
+ const C = setTimeout(() => le(""), 3e3);
1209
+ return () => clearTimeout(C);
1217
1210
  }, [se]);
1218
- const ft = C ?? ca, pt = g ?? ia, mt = M(
1211
+ const pt = y ?? da, mt = b ?? ca, gt = M(
1219
1212
  () => {
1220
- var T;
1221
- return (T = k.current) == null ? void 0 : T.api;
1213
+ var C;
1214
+ return (C = F.current) == null ? void 0 : C.api;
1222
1215
  },
1223
1216
  []
1224
- ), gt = M(() => {
1217
+ ), bt = M(() => {
1225
1218
  typeof window < "u" && window.print();
1226
- }, []), bt = oa({
1219
+ }, []), ht = oa({
1227
1220
  density: ot,
1228
- bordered: y,
1229
- className: m
1230
- }), ht = I ?? /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(te.Actions, { children: /* @__PURE__ */ s(te.ExportMenu, {}) }) }), vt = S ? !1 : o;
1231
- return /* @__PURE__ */ E(
1221
+ bordered: h,
1222
+ className: g
1223
+ }), vt = E ?? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(ae.Actions, { children: /* @__PURE__ */ s(ae.ExportMenu, {}) }) }), yt = S ? !1 : o;
1224
+ return /* @__PURE__ */ I(
1232
1225
  "div",
1233
1226
  {
1234
- className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]",
1235
- "aria-busy": rt ? "true" : void 0,
1227
+ className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
1228
+ "aria-busy": st ? "true" : void 0,
1236
1229
  "data-component": "data-table",
1237
1230
  "data-component-id": d,
1238
1231
  "data-print-mode": S ? "true" : void 0,
1239
1232
  children: [
1240
1233
  !S && /* @__PURE__ */ s(
1241
- Vt,
1234
+ Ut,
1242
1235
  {
1243
- getApi: mt,
1244
- selectionCount: G,
1245
- onPrint: gt,
1246
- children: ht
1236
+ getApi: gt,
1237
+ selectionCount: V,
1238
+ onPrint: bt,
1239
+ children: vt
1247
1240
  }
1248
1241
  ),
1249
1242
  /* @__PURE__ */ s(
1250
1243
  "div",
1251
1244
  {
1252
- className: [bt, S ? "" : f].join(" ").trim(),
1245
+ className: [ht, S ? "" : p].join(" ").trim(),
1253
1246
  children: /* @__PURE__ */ s(
1254
- Nt,
1247
+ St,
1255
1248
  {
1256
- ref: k,
1249
+ ref: F,
1257
1250
  theme: "legacy",
1258
1251
  columnDefs: a,
1259
1252
  rowData: n,
@@ -1264,22 +1257,22 @@ function fa(t, e) {
1264
1257
  // language instead of AG Grid's stock browser-skinned input.
1265
1258
  // Number / date / select columns opt into their dedicated
1266
1259
  // wrapper per-column.
1267
- filter: na,
1268
- floatingFilterComponent: ra,
1260
+ filter: ra,
1261
+ floatingFilterComponent: sa,
1269
1262
  resizable: !0,
1270
1263
  floatingFilter: !0,
1271
1264
  // §13d — faint sort icon advertises which columns are
1272
1265
  // sortable. v33+ moved this from grid-level to defaultColDef.
1273
1266
  unSortIcon: !0,
1274
- ...b == null ? void 0 : b.defaultColDef
1267
+ ...x == null ? void 0 : x.defaultColDef
1275
1268
  },
1276
- rowSelection: lt,
1277
- pagination: vt,
1278
- paginationPageSize: l,
1269
+ rowSelection: it,
1270
+ pagination: yt,
1271
+ paginationPageSize: i,
1279
1272
  paginationPageSizeSelector: u,
1280
- paginationNumberFormatter: (T) => new Intl.NumberFormat($.language).format(T.value),
1281
- animateRows: !st,
1282
- enableRtl: nt,
1273
+ paginationNumberFormatter: (C) => new Intl.NumberFormat(q.language).format(C.value),
1274
+ animateRows: !lt,
1275
+ enableRtl: rt,
1283
1276
  ensureDomOrder: !0,
1284
1277
  enableCellSpan: !0,
1285
1278
  enableCellTextSelection: !0,
@@ -1297,42 +1290,42 @@ function fa(t, e) {
1297
1290
  undoRedoCellEditingLimit: 20,
1298
1291
  suppressCellFocus: !1,
1299
1292
  rowBuffer: 10,
1300
- localeText: at,
1301
- noRowsOverlayComponent: ft,
1302
- loadingOverlayComponent: pt,
1303
- getRowClass: h,
1304
- pinnedBottomRowData: x,
1293
+ localeText: nt,
1294
+ noRowsOverlayComponent: pt,
1295
+ loadingOverlayComponent: mt,
1296
+ getRowClass: m,
1297
+ pinnedBottomRowData: v,
1305
1298
  domLayout: S ? "autoHeight" : void 0,
1306
- onGridReady: it,
1299
+ onGridReady: ct,
1307
1300
  onColumnMoved: ie,
1308
1301
  onColumnResized: ie,
1309
1302
  onColumnPinned: ie,
1310
- onSortChanged: dt,
1311
- onFilterChanged: ut,
1312
- onSelectionChanged: ct,
1313
- ...b
1303
+ onSortChanged: ut,
1304
+ onFilterChanged: ft,
1305
+ onSelectionChanged: dt,
1306
+ ...x
1314
1307
  }
1315
1308
  )
1316
1309
  }
1317
1310
  ),
1318
- !S && /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: G > 0 ? /* @__PURE__ */ s("span", { children: D("dataTable.selected", { count: G }) }) : /* @__PURE__ */ s("span", {}) }),
1311
+ !S && /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: V > 0 ? /* @__PURE__ */ s("span", { children: k("dataTable.selected", { count: V }) }) : /* @__PURE__ */ s("span", {}) }),
1319
1312
  /* @__PURE__ */ s("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: se })
1320
1313
  ]
1321
1314
  }
1322
1315
  );
1323
1316
  }
1324
- const et = _(fa);
1325
- et.displayName = "DataTable";
1326
- const Tn = Object.assign(et, {
1327
- Toolbar: te
1317
+ const tt = $(pa);
1318
+ tt.displayName = "DataTable";
1319
+ const Sn = Object.assign(tt, {
1320
+ Toolbar: ae
1328
1321
  });
1329
- function Cn(t, e, a) {
1322
+ function wn(t, e, a) {
1330
1323
  return z(() => {
1331
1324
  const n = {};
1332
1325
  for (const r of e) {
1333
1326
  let o = 0;
1334
- for (const l of t ?? []) {
1335
- const u = l[r], d = typeof u == "number" ? u : Number(u);
1327
+ for (const i of t ?? []) {
1328
+ const u = i[r], d = typeof u == "number" ? u : Number(u);
1336
1329
  Number.isFinite(d) && (o += d);
1337
1330
  }
1338
1331
  n[r] = o;
@@ -1343,22 +1336,22 @@ function Cn(t, e, a) {
1343
1336
  function re(t) {
1344
1337
  return t ? t.toISOString().slice(0, 10) : null;
1345
1338
  }
1346
- function Q(t) {
1339
+ function X(t) {
1347
1340
  if (!t) return;
1348
1341
  const e = new Date(t);
1349
1342
  return Number.isNaN(e.getTime()) ? void 0 : e;
1350
1343
  }
1351
- function xn(t) {
1344
+ function Fn(t) {
1352
1345
  const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t, o = {
1353
- from: Q(e == null ? void 0 : e.dateFrom),
1354
- to: Q(e == null ? void 0 : e.dateTo)
1355
- }, [l, u] = R(o);
1356
- J({
1346
+ from: X(e == null ? void 0 : e.dateFrom),
1347
+ to: X(e == null ? void 0 : e.dateTo)
1348
+ }, [i, u] = D(o);
1349
+ Y({
1357
1350
  doesFilterPass: (c) => {
1358
- const i = n(c.node);
1359
- if (!i) return !1;
1360
- const p = i instanceof Date ? i : Q(String(i));
1361
- return !(!p || l.from && p < l.from || l.to && p > l.to);
1351
+ const l = n(c.node);
1352
+ if (!l) return !1;
1353
+ const f = l instanceof Date ? l : X(String(l));
1354
+ return !(!f || i.from && f < i.from || i.to && f > i.to);
1362
1355
  }
1363
1356
  });
1364
1357
  function d(c) {
@@ -1372,27 +1365,27 @@ function xn(t) {
1372
1365
  dateTo: re(c.to)
1373
1366
  });
1374
1367
  }
1375
- return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(Ie, { value: l, onChange: d, size: "sm" }) });
1368
+ return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(ze, { value: i, onChange: d, size: "sm" }) });
1376
1369
  }
1377
- function Nn(t) {
1370
+ function Rn(t) {
1378
1371
  var d, c;
1379
- const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [o, l] = R({
1380
- from: Q(e == null ? void 0 : e.dateFrom),
1381
- to: Q(e == null ? void 0 : e.dateTo)
1372
+ const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [o, i] = D({
1373
+ from: X(e == null ? void 0 : e.dateFrom),
1374
+ to: X(e == null ? void 0 : e.dateTo)
1382
1375
  });
1383
- function u(i) {
1384
- if (l(i), !i.from && !i.to) {
1376
+ function u(l) {
1377
+ if (i(l), !l.from && !l.to) {
1385
1378
  a(null);
1386
1379
  return;
1387
1380
  }
1388
1381
  a({
1389
1382
  type: "inRange",
1390
- dateFrom: re(i.from),
1391
- dateTo: re(i.to)
1383
+ dateFrom: re(l.from),
1384
+ dateTo: re(l.to)
1392
1385
  });
1393
1386
  }
1394
1387
  return /* @__PURE__ */ s("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
1395
- Ie,
1388
+ ze,
1396
1389
  {
1397
1390
  value: o,
1398
1391
  onChange: u,
@@ -1401,60 +1394,60 @@ function Nn(t) {
1401
1394
  }
1402
1395
  ) });
1403
1396
  }
1404
- function K(t) {
1397
+ function W(t) {
1405
1398
  return typeof t == "number" ? `n:${t}` : `s:${t}`;
1406
1399
  }
1407
- function Sn(t) {
1408
- const { model: e, onModelChange: a, getValue: n, api: r, column: o, options: l, placeholder: u } = t, { t: d } = F("ui"), c = z(() => {
1409
- if (l && l.length > 0) return l;
1400
+ function Dn(t) {
1401
+ const { model: e, onModelChange: a, getValue: n, api: r, column: o, options: i, placeholder: u } = t, { t: d } = R("ui"), c = z(() => {
1402
+ if (i && i.length > 0) return i;
1410
1403
  if (!r || !o) return [];
1411
- const f = /* @__PURE__ */ new Map();
1412
- return r.forEachNode((m) => {
1413
- const h = n(m);
1414
- if (h == null) return;
1415
- const x = typeof h == "string" || typeof h == "number" ? h : String(h), S = K(x);
1416
- f.has(S) || f.set(S, { value: x, label: String(x) });
1417
- }), Array.from(f.values()).sort(
1418
- (m, h) => String(m.label).localeCompare(String(h.label))
1404
+ const p = /* @__PURE__ */ new Map();
1405
+ return r.forEachNode((g) => {
1406
+ const m = n(g);
1407
+ if (m == null) return;
1408
+ const v = typeof m == "string" || typeof m == "number" ? m : String(m), S = W(v);
1409
+ p.has(S) || p.set(S, { value: v, label: String(v) });
1410
+ }), Array.from(p.values()).sort(
1411
+ (g, m) => String(g.label).localeCompare(String(m.label))
1419
1412
  );
1420
- }, [l, r, o, n]), i = z(() => {
1421
- const f = /* @__PURE__ */ new Set(), m = (e == null ? void 0 : e.values) ?? [];
1422
- for (const h of m) f.add(K(h));
1423
- return f;
1424
- }, [e]), [p, C] = R(i);
1413
+ }, [i, r, o, n]), l = z(() => {
1414
+ const p = /* @__PURE__ */ new Set(), g = (e == null ? void 0 : e.values) ?? [];
1415
+ for (const m of g) p.add(W(m));
1416
+ return p;
1417
+ }, [e]), [f, y] = D(l);
1425
1418
  P(() => {
1426
- C(i);
1427
- }, [i]), J({
1428
- doesFilterPass: (f) => {
1429
- const m = e == null ? void 0 : e.values;
1430
- if (!m || m.length === 0) return !0;
1431
- const h = n(f.node);
1432
- if (h == null) return !1;
1433
- const x = typeof h == "string" || typeof h == "number" ? h : String(h), S = K(x);
1434
- return m.some((I) => K(I) === S);
1419
+ y(l);
1420
+ }, [l]), Y({
1421
+ doesFilterPass: (p) => {
1422
+ const g = e == null ? void 0 : e.values;
1423
+ if (!g || g.length === 0) return !0;
1424
+ const m = n(p.node);
1425
+ if (m == null) return !1;
1426
+ const v = typeof m == "string" || typeof m == "number" ? m : String(m), S = W(v);
1427
+ return g.some((E) => W(E) === S);
1435
1428
  }
1436
1429
  });
1437
- function g(f) {
1438
- C((m) => {
1439
- const h = new Set(m);
1440
- return h.has(f) ? h.delete(f) : h.add(f), h;
1430
+ function b(p) {
1431
+ y((g) => {
1432
+ const m = new Set(g);
1433
+ return m.has(p) ? m.delete(p) : m.add(p), m;
1441
1434
  });
1442
1435
  }
1443
- function b() {
1444
- if (p.size === 0) {
1436
+ function x() {
1437
+ if (f.size === 0) {
1445
1438
  a(null);
1446
1439
  return;
1447
1440
  }
1448
- const f = [];
1449
- for (const m of c)
1450
- p.has(K(m.value)) && f.push(m.value);
1451
- a({ type: "set", values: f });
1441
+ const p = [];
1442
+ for (const g of c)
1443
+ f.has(W(g.value)) && p.push(g.value);
1444
+ a({ type: "set", values: p });
1452
1445
  }
1453
- function v() {
1454
- C(/* @__PURE__ */ new Set()), a(null);
1446
+ function T() {
1447
+ y(/* @__PURE__ */ new Set()), a(null);
1455
1448
  }
1456
- const y = u ?? d("dataTable.selectFilter.all");
1457
- return /* @__PURE__ */ E(
1449
+ const h = u ?? d("dataTable.selectFilter.all");
1450
+ return /* @__PURE__ */ I(
1458
1451
  "div",
1459
1452
  {
1460
1453
  "data-component": "select-filter",
@@ -1464,179 +1457,179 @@ function Sn(t) {
1464
1457
  "div",
1465
1458
  {
1466
1459
  role: "group",
1467
- "aria-label": y,
1460
+ "aria-label": h,
1468
1461
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:max-h-[240px] ds:overflow-y-auto",
1469
- children: c.length === 0 ? /* @__PURE__ */ s("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: d("dataTable.agGrid.noRowsToShow") }) : c.map((f) => {
1470
- const m = K(f.value);
1462
+ children: c.length === 0 ? /* @__PURE__ */ s("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: d("dataTable.agGrid.noRowsToShow") }) : c.map((p) => {
1463
+ const g = W(p.value);
1471
1464
  return /* @__PURE__ */ s(
1472
- Re,
1465
+ De,
1473
1466
  {
1474
1467
  size: "sm",
1475
- label: f.label,
1476
- checked: p.has(m),
1477
- onCheckedChange: () => g(m)
1468
+ label: p.label,
1469
+ checked: f.has(g),
1470
+ onCheckedChange: () => b(g)
1478
1471
  },
1479
- m
1472
+ g
1480
1473
  );
1481
1474
  })
1482
1475
  }
1483
1476
  ),
1484
- /* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
1485
- /* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: v, type: "button", children: d("dataTable.selectFilter.clear") }),
1486
- /* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: b, type: "button", children: d("dataTable.selectFilter.apply") })
1477
+ /* @__PURE__ */ I("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
1478
+ /* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: T, type: "button", children: d("dataTable.selectFilter.clear") }),
1479
+ /* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: x, type: "button", children: d("dataTable.selectFilter.apply") })
1487
1480
  ] })
1488
1481
  ]
1489
1482
  }
1490
1483
  );
1491
1484
  }
1492
- function wn(t) {
1493
- var C;
1494
- const { model: e, onModelChange: a, column: n } = t, r = (C = n == null ? void 0 : n.getColDef) == null ? void 0 : C.call(n), o = (r == null ? void 0 : r.filterParams) ?? {}, l = o.options ?? [], u = o.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), d = z(() => {
1495
- const g = /* @__PURE__ */ new Map();
1496
- for (const b of l) g.set(String(b.value), b.value);
1497
- return g;
1498
- }, [l]), c = z(
1499
- () => l.map((g) => ({
1500
- value: String(g.value),
1501
- label: g.label
1485
+ function kn(t) {
1486
+ var y;
1487
+ const { model: e, onModelChange: a, column: n } = t, r = (y = n == null ? void 0 : n.getColDef) == null ? void 0 : y.call(n), o = (r == null ? void 0 : r.filterParams) ?? {}, i = o.options ?? [], u = o.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), d = z(() => {
1488
+ const b = /* @__PURE__ */ new Map();
1489
+ for (const x of i) b.set(String(x.value), x.value);
1490
+ return b;
1491
+ }, [i]), c = z(
1492
+ () => i.map((b) => ({
1493
+ value: String(b.value),
1494
+ label: b.label
1502
1495
  })),
1503
- [l]
1504
- ), i = z(
1505
- () => ((e == null ? void 0 : e.values) ?? []).map((g) => String(g)),
1496
+ [i]
1497
+ ), l = z(
1498
+ () => ((e == null ? void 0 : e.values) ?? []).map((b) => String(b)),
1506
1499
  [e]
1507
1500
  );
1508
- function p(g) {
1509
- if (g.length === 0) {
1501
+ function f(b) {
1502
+ if (b.length === 0) {
1510
1503
  a(null);
1511
1504
  return;
1512
1505
  }
1513
- const b = [];
1514
- for (const v of g) {
1515
- const y = d.get(v);
1516
- y !== void 0 && b.push(y);
1506
+ const x = [];
1507
+ for (const T of b) {
1508
+ const h = d.get(T);
1509
+ h !== void 0 && x.push(h);
1517
1510
  }
1518
- a({ type: "set", values: b });
1511
+ a({ type: "set", values: x });
1519
1512
  }
1520
1513
  return /* @__PURE__ */ s("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
1521
- Ot,
1514
+ Mt,
1522
1515
  {
1523
1516
  size: "sm",
1524
1517
  options: c,
1525
- value: i,
1526
- onChange: p,
1518
+ value: l,
1519
+ onChange: f,
1527
1520
  placeholder: o.placeholder,
1528
1521
  "aria-label": u,
1529
1522
  allowClear: !0
1530
1523
  }
1531
1524
  ) });
1532
1525
  }
1533
- function H(t) {
1526
+ function Q(t) {
1534
1527
  return t.trim().toLocaleLowerCase();
1535
1528
  }
1536
- function Fn(t) {
1529
+ function In(t) {
1537
1530
  const {
1538
1531
  model: e,
1539
1532
  onModelChange: a,
1540
1533
  getValue: n,
1541
1534
  api: r,
1542
1535
  column: o,
1543
- options: l,
1536
+ options: i,
1544
1537
  loadOptions: u,
1545
1538
  placeholder: d
1546
- } = t, { t: c } = F("ui"), i = z(() => {
1547
- if (l && l.length > 0) return l;
1539
+ } = t, { t: c } = R("ui"), l = z(() => {
1540
+ if (i && i.length > 0) return i;
1548
1541
  if (!r || !o) return [];
1549
- const m = /* @__PURE__ */ new Map();
1550
- return r.forEachNode((h) => {
1551
- const x = n(h);
1552
- if (x == null) return;
1553
- const S = typeof x == "string" ? x : String(x);
1554
- m.has(S) || m.set(S, { value: S, label: S });
1555
- }), Array.from(m.values()).sort(
1556
- (h, x) => h.label.localeCompare(x.label)
1542
+ const g = /* @__PURE__ */ new Map();
1543
+ return r.forEachNode((m) => {
1544
+ const v = n(m);
1545
+ if (v == null) return;
1546
+ const S = typeof v == "string" ? v : String(v);
1547
+ g.has(S) || g.set(S, { value: S, label: S });
1548
+ }), Array.from(g.values()).sort(
1549
+ (m, v) => m.label.localeCompare(v.label)
1557
1550
  );
1558
- }, [l, r, o, n]), p = z(() => async (m, h) => {
1551
+ }, [i, r, o, n]), f = z(() => async (g, m) => {
1559
1552
  if (u)
1560
- return (await u(m, h)).map((D) => ({ value: D.value, label: D.label }));
1561
- const x = H(m);
1562
- return (x ? i.filter((I) => H(I.label).includes(x)) : i).slice(0, 50).map((I) => ({ value: I.value, label: I.label }));
1563
- }, [u, i]), [C, g] = R((e == null ? void 0 : e.value) ?? "");
1553
+ return (await u(g, m)).map((k) => ({ value: k.value, label: k.label }));
1554
+ const v = Q(g);
1555
+ return (v ? l.filter((E) => Q(E.label).includes(v)) : l).slice(0, 50).map((E) => ({ value: E.value, label: E.label }));
1556
+ }, [u, l]), [y, b] = D((e == null ? void 0 : e.value) ?? "");
1564
1557
  P(() => {
1565
- g((e == null ? void 0 : e.value) ?? "");
1566
- }, [e == null ? void 0 : e.value]), J({
1567
- doesFilterPass: (m) => {
1568
- const h = e == null ? void 0 : e.value;
1569
- if (!h) return !0;
1570
- const x = n(m.node);
1571
- if (x == null) return !1;
1572
- const S = typeof x == "string" ? x : String(x);
1573
- return H(S) === H(h);
1558
+ b((e == null ? void 0 : e.value) ?? "");
1559
+ }, [e == null ? void 0 : e.value]), Y({
1560
+ doesFilterPass: (g) => {
1561
+ const m = e == null ? void 0 : e.value;
1562
+ if (!m) return !0;
1563
+ const v = n(g.node);
1564
+ if (v == null) return !1;
1565
+ const S = typeof v == "string" ? v : String(v);
1566
+ return Q(S) === Q(m);
1574
1567
  }
1575
1568
  });
1576
- function b(m) {
1577
- g(m.label), a({ type: "equals", value: m.value });
1569
+ function x(g) {
1570
+ b(g.label), a({ type: "equals", value: g.value });
1578
1571
  }
1579
- function v(m) {
1580
- g(m), m === "" && e && a(null);
1572
+ function T(g) {
1573
+ b(g), g === "" && e && a(null);
1581
1574
  }
1582
- function y() {
1583
- g(""), a(null);
1575
+ function h() {
1576
+ b(""), a(null);
1584
1577
  }
1585
- const f = d ?? c("dataTable.typeaheadFilter.placeholder");
1586
- return /* @__PURE__ */ E(
1578
+ const p = d ?? c("dataTable.typeaheadFilter.placeholder");
1579
+ return /* @__PURE__ */ I(
1587
1580
  "div",
1588
1581
  {
1589
1582
  "data-component": "typeahead-filter",
1590
1583
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
1591
1584
  children: [
1592
1585
  /* @__PURE__ */ s(
1593
- ze,
1586
+ Ae,
1594
1587
  {
1595
1588
  size: "sm",
1596
- value: C,
1597
- onChange: v,
1598
- onSelect: b,
1599
- loadOptions: p,
1600
- placeholder: f,
1601
- "aria-label": f
1589
+ value: y,
1590
+ onChange: T,
1591
+ onSelect: x,
1592
+ loadOptions: f,
1593
+ placeholder: p,
1594
+ "aria-label": p
1602
1595
  }
1603
1596
  ),
1604
- /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: y, type: "button", children: c("dataTable.typeaheadFilter.clear") }) })
1597
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: h, type: "button", children: c("dataTable.typeaheadFilter.clear") }) })
1605
1598
  ]
1606
1599
  }
1607
1600
  );
1608
1601
  }
1609
- function Rn(t) {
1610
- var b, v;
1611
- const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), o = ((v = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : v.filterParams) ?? {}, l = o.options ?? [], u = o.loadOptions, d = o.placeholder ?? r("dataTable.typeaheadFilter.placeholder"), c = z(() => async (y, f) => {
1602
+ function En(t) {
1603
+ var x, T;
1604
+ const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((T = (x = n == null ? void 0 : n.getColDef) == null ? void 0 : x.call(n)) == null ? void 0 : T.filterParams) ?? {}, i = o.options ?? [], u = o.loadOptions, d = o.placeholder ?? r("dataTable.typeaheadFilter.placeholder"), c = z(() => async (h, p) => {
1612
1605
  if (u)
1613
- return (await u(y, f)).map((S) => ({ value: S.value, label: S.label }));
1614
- const m = H(y);
1615
- return (m ? l.filter((x) => H(x.label).includes(m)) : l).slice(0, 50).map((x) => ({ value: x.value, label: x.label }));
1616
- }, [u, l]), [i, p] = R((e == null ? void 0 : e.value) ?? "");
1606
+ return (await u(h, p)).map((S) => ({ value: S.value, label: S.label }));
1607
+ const g = Q(h);
1608
+ return (g ? i.filter((v) => Q(v.label).includes(g)) : i).slice(0, 50).map((v) => ({ value: v.value, label: v.label }));
1609
+ }, [u, i]), [l, f] = D((e == null ? void 0 : e.value) ?? "");
1617
1610
  P(() => {
1618
- p((e == null ? void 0 : e.value) ?? "");
1611
+ f((e == null ? void 0 : e.value) ?? "");
1619
1612
  }, [e == null ? void 0 : e.value]);
1620
- function C(y) {
1621
- p(y.label), a({ type: "equals", value: y.value });
1613
+ function y(h) {
1614
+ f(h.label), a({ type: "equals", value: h.value });
1622
1615
  }
1623
- function g(y) {
1624
- p(y), y === "" && e && a(null);
1616
+ function b(h) {
1617
+ f(h), h === "" && e && a(null);
1625
1618
  }
1626
1619
  return /* @__PURE__ */ s("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
1627
- ze,
1620
+ Ae,
1628
1621
  {
1629
1622
  size: "sm",
1630
- value: i,
1631
- onChange: g,
1632
- onSelect: C,
1623
+ value: l,
1624
+ onChange: b,
1625
+ onSelect: y,
1633
1626
  loadOptions: c,
1634
1627
  placeholder: d,
1635
1628
  "aria-label": d
1636
1629
  }
1637
1630
  ) });
1638
1631
  }
1639
- const pa = [
1632
+ const ma = [
1640
1633
  "equals",
1641
1634
  "notEqual",
1642
1635
  "greaterThan",
@@ -1647,13 +1640,13 @@ const pa = [
1647
1640
  "blank",
1648
1641
  "notBlank"
1649
1642
  ];
1650
- function ve(t) {
1643
+ function ye(t) {
1651
1644
  return t !== "blank" && t !== "notBlank";
1652
1645
  }
1653
- function ye(t) {
1646
+ function Te(t) {
1654
1647
  return t === "inRange";
1655
1648
  }
1656
- function ma(t, e, a, n) {
1649
+ function ga(t, e, a, n) {
1657
1650
  if (t === "blank") return e === null;
1658
1651
  if (t === "notBlank") return e !== null;
1659
1652
  if (e === null) return !1;
@@ -1680,73 +1673,73 @@ function ma(t, e, a, n) {
1680
1673
  return !0;
1681
1674
  }
1682
1675
  }
1683
- function ga(t) {
1676
+ function ba(t) {
1684
1677
  if (t == null || t === "") return null;
1685
1678
  const e = typeof t == "number" ? t : Number(t);
1686
1679
  return Number.isNaN(e) ? null : e;
1687
1680
  }
1688
- function Dn(t) {
1681
+ function zn(t) {
1689
1682
  const {
1690
1683
  model: e,
1691
1684
  onModelChange: a,
1692
1685
  getValue: n,
1693
1686
  defaultOperator: r,
1694
1687
  min: o,
1695
- max: l,
1688
+ max: i,
1696
1689
  step: u,
1697
1690
  placeholder: d
1698
- } = t, { t: c } = F("ui"), i = (e == null ? void 0 : e.type) ?? r ?? "equals", [p, C] = R(i), [g, b] = R((e == null ? void 0 : e.filter) ?? null), [v, y] = R(
1691
+ } = t, { t: c } = R("ui"), l = (e == null ? void 0 : e.type) ?? r ?? "equals", [f, y] = D(l), [b, x] = D((e == null ? void 0 : e.filter) ?? null), [T, h] = D(
1699
1692
  (e == null ? void 0 : e.filterTo) ?? null
1700
1693
  );
1701
1694
  P(() => {
1702
1695
  if (e === null) {
1703
- C(r ?? "equals"), b(null), y(null);
1696
+ y(r ?? "equals"), x(null), h(null);
1704
1697
  return;
1705
1698
  }
1706
- C(e.type), b(e.filter ?? null), y(e.filterTo ?? null);
1707
- }, [e, r]), J({
1708
- doesFilterPass: (D) => {
1699
+ y(e.type), x(e.filter ?? null), h(e.filterTo ?? null);
1700
+ }, [e, r]), Y({
1701
+ doesFilterPass: (k) => {
1709
1702
  if (!e) return !0;
1710
- const $ = ga(n(D.node));
1711
- return ma(
1703
+ const q = ba(n(k.node));
1704
+ return ga(
1712
1705
  e.type,
1713
- $,
1706
+ q,
1714
1707
  e.filter ?? null,
1715
1708
  e.filterTo ?? null
1716
1709
  );
1717
1710
  }
1718
1711
  });
1719
- const f = z(
1720
- () => pa.map((D) => ({
1721
- value: D,
1722
- label: c(`dataTable.numberFilter.operators.${D}`)
1712
+ const p = z(
1713
+ () => ma.map((k) => ({
1714
+ value: k,
1715
+ label: c(`dataTable.numberFilter.operators.${k}`)
1723
1716
  })),
1724
1717
  [c]
1725
- ), m = d ?? c("dataTable.numberFilter.placeholder");
1726
- function h() {
1727
- if (!ve(p)) {
1728
- a({ type: p, filter: 0 });
1718
+ ), g = d ?? c("dataTable.numberFilter.placeholder");
1719
+ function m() {
1720
+ if (!ye(f)) {
1721
+ a({ type: f, filter: 0 });
1729
1722
  return;
1730
1723
  }
1731
- if (g === null) {
1724
+ if (b === null) {
1732
1725
  a(null);
1733
1726
  return;
1734
1727
  }
1735
- if (ye(p)) {
1728
+ if (Te(f)) {
1736
1729
  a({
1737
- type: p,
1738
- filter: g,
1739
- filterTo: v ?? void 0
1730
+ type: f,
1731
+ filter: b,
1732
+ filterTo: T ?? void 0
1740
1733
  });
1741
1734
  return;
1742
1735
  }
1743
- a({ type: p, filter: g });
1736
+ a({ type: f, filter: b });
1744
1737
  }
1745
- function x() {
1746
- C(r ?? "equals"), b(null), y(null), a(null);
1738
+ function v() {
1739
+ y(r ?? "equals"), x(null), h(null), a(null);
1747
1740
  }
1748
- const S = ve(p), I = ye(p);
1749
- return /* @__PURE__ */ E(
1741
+ const S = ye(f), E = Te(f);
1742
+ return /* @__PURE__ */ I(
1750
1743
  "div",
1751
1744
  {
1752
1745
  "data-component": "number-filter",
@@ -1756,80 +1749,80 @@ function Dn(t) {
1756
1749
  Ee,
1757
1750
  {
1758
1751
  size: "sm",
1759
- options: f,
1760
- value: p,
1761
- onValueChange: (D) => {
1762
- D !== "" && C(D);
1752
+ options: p,
1753
+ value: f,
1754
+ onValueChange: (k) => {
1755
+ k !== "" && y(k);
1763
1756
  },
1764
1757
  "aria-label": c("dataTable.numberFilter.operators.equals")
1765
1758
  }
1766
1759
  ),
1767
- S && !I && /* @__PURE__ */ s(
1768
- ee,
1760
+ S && !E && /* @__PURE__ */ s(
1761
+ te,
1769
1762
  {
1770
1763
  size: "sm",
1771
- value: g,
1772
- onChange: b,
1764
+ value: b,
1765
+ onChange: x,
1773
1766
  min: o,
1774
- max: l,
1767
+ max: i,
1775
1768
  step: u,
1776
- placeholder: m,
1777
- "aria-label": m
1769
+ placeholder: g,
1770
+ "aria-label": g
1778
1771
  }
1779
1772
  ),
1780
- I && /* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1773
+ E && /* @__PURE__ */ I("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1781
1774
  /* @__PURE__ */ s(
1782
- ee,
1775
+ te,
1783
1776
  {
1784
1777
  size: "sm",
1785
- value: g,
1786
- onChange: b,
1778
+ value: b,
1779
+ onChange: x,
1787
1780
  min: o,
1788
- max: l,
1781
+ max: i,
1789
1782
  step: u,
1790
1783
  placeholder: c("dataTable.numberFilter.from"),
1791
1784
  "aria-label": c("dataTable.numberFilter.from")
1792
1785
  }
1793
1786
  ),
1794
1787
  /* @__PURE__ */ s(
1795
- ee,
1788
+ te,
1796
1789
  {
1797
1790
  size: "sm",
1798
- value: v,
1799
- onChange: y,
1791
+ value: T,
1792
+ onChange: h,
1800
1793
  min: o,
1801
- max: l,
1794
+ max: i,
1802
1795
  step: u,
1803
1796
  placeholder: c("dataTable.numberFilter.to"),
1804
1797
  "aria-label": c("dataTable.numberFilter.to")
1805
1798
  }
1806
1799
  )
1807
1800
  ] }),
1808
- /* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
1809
- /* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: x, type: "button", children: c("dataTable.numberFilter.clear") }),
1810
- /* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.numberFilter.apply") })
1801
+ /* @__PURE__ */ I("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
1802
+ /* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: v, type: "button", children: c("dataTable.numberFilter.clear") }),
1803
+ /* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: m, type: "button", children: c("dataTable.numberFilter.apply") })
1811
1804
  ] })
1812
1805
  ]
1813
1806
  }
1814
1807
  );
1815
1808
  }
1816
- function kn(t) {
1817
- var i, p;
1818
- const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), o = ((p = (i = n == null ? void 0 : n.getColDef) == null ? void 0 : i.call(n)) == null ? void 0 : p.filterParams) ?? {}, l = o.defaultOperator ?? "equals", u = o.placeholder ?? r("dataTable.numberFilter.placeholder"), [d, c] = R((e == null ? void 0 : e.filter) ?? null);
1809
+ function An(t) {
1810
+ var l, f;
1811
+ const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((f = (l = n == null ? void 0 : n.getColDef) == null ? void 0 : l.call(n)) == null ? void 0 : f.filterParams) ?? {}, i = o.defaultOperator ?? "equals", u = o.placeholder ?? r("dataTable.numberFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? null);
1819
1812
  return P(() => {
1820
1813
  c((e == null ? void 0 : e.filter) ?? null);
1821
1814
  }, [e == null ? void 0 : e.filter]), P(() => {
1822
1815
  if (d === ((e == null ? void 0 : e.filter) ?? null)) return;
1823
- const C = setTimeout(() => {
1816
+ const y = setTimeout(() => {
1824
1817
  if (d === null || Number.isNaN(d)) {
1825
1818
  a(null);
1826
1819
  return;
1827
1820
  }
1828
- a({ type: l, filter: d });
1821
+ a({ type: i, filter: d });
1829
1822
  }, 200);
1830
- return () => clearTimeout(C);
1831
- }, [d, l]), /* @__PURE__ */ s("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
1832
- ee,
1823
+ return () => clearTimeout(y);
1824
+ }, [d, i]), /* @__PURE__ */ s("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
1825
+ te,
1833
1826
  {
1834
1827
  size: "sm",
1835
1828
  value: d,
@@ -1842,22 +1835,22 @@ function kn(t) {
1842
1835
  }
1843
1836
  ) });
1844
1837
  }
1845
- function En(t) {
1838
+ function Pn(t) {
1846
1839
  const { value: e, variantMap: a } = t, n = (a == null ? void 0 : a[e]) ?? "neutral";
1847
- return /* @__PURE__ */ s(Mt, { variant: n, withDot: !0, size: "sm", children: String(e ?? "") });
1840
+ return /* @__PURE__ */ s(jt, { variant: n, withDot: !0, size: "sm", children: String(e ?? "") });
1848
1841
  }
1849
- function In(t) {
1842
+ function On(t) {
1850
1843
  const { value: e } = t;
1851
- return e ? /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1852
- /* @__PURE__ */ s(Ae, { name: e.name, src: e.src, size: "sm" }),
1844
+ return e ? /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1845
+ /* @__PURE__ */ s(Pe, { name: e.name, src: e.src, size: "sm" }),
1853
1846
  /* @__PURE__ */ s("span", { children: e.name })
1854
1847
  ] }) : null;
1855
1848
  }
1856
- const ba = {
1849
+ const ha = {
1857
1850
  sm: "ds:size-8",
1858
1851
  md: "ds:size-10",
1859
1852
  lg: "ds:size-12"
1860
- }, ha = {
1853
+ }, va = {
1861
1854
  square: "ds:rounded-none",
1862
1855
  rounded: "ds:rounded-[var(--radius-md)]",
1863
1856
  circle: "ds:rounded-[var(--radius-full)]"
@@ -1867,24 +1860,24 @@ function ue(t, e) {
1867
1860
  const a = t[e];
1868
1861
  return typeof a == "string" ? a : void 0;
1869
1862
  }
1870
- const va = /^(?:https?:|data:image\/)/i;
1871
- function ya(t) {
1863
+ const ya = /^(?:https?:|data:image\/)/i;
1864
+ function Ta(t) {
1872
1865
  if (!t) return;
1873
1866
  const e = t.trim();
1874
1867
  if (e.length !== 0)
1875
- return va.test(e) ? e : void 0;
1868
+ return ya.test(e) ? e : void 0;
1876
1869
  }
1877
- function zn(t) {
1870
+ function Mn(t) {
1878
1871
  const {
1879
1872
  data: e,
1880
1873
  srcField: a,
1881
1874
  altField: n,
1882
1875
  fallbackField: r,
1883
1876
  size: o = "md",
1884
- shape: l = "rounded"
1877
+ shape: i = "rounded"
1885
1878
  } = t;
1886
1879
  if (!e) return null;
1887
- const u = ue(e, a), d = ya(u), c = n ? ue(e, n) ?? "" : "", i = r ? ue(e, r) : void 0;
1880
+ const u = ue(e, a), d = Ta(u), c = n ? ue(e, n) ?? "" : "", l = r ? ue(e, r) : void 0;
1888
1881
  return d ? /* @__PURE__ */ s(
1889
1882
  "img",
1890
1883
  {
@@ -1892,20 +1885,20 @@ function zn(t) {
1892
1885
  alt: c,
1893
1886
  loading: "lazy",
1894
1887
  decoding: "async",
1895
- className: ["ds:object-cover", ba[o], ha[l]].join(
1888
+ className: ["ds:object-cover", ha[o], va[i]].join(
1896
1889
  " "
1897
1890
  )
1898
1891
  }
1899
- ) : i ? /* @__PURE__ */ s(Ae, { name: i, size: o }) : null;
1892
+ ) : l ? /* @__PURE__ */ s(Pe, { name: l, size: o }) : null;
1900
1893
  }
1901
- function An(t) {
1902
- const { value: e, maxVisible: a = 3 } = t, { t: n } = F();
1894
+ function jn(t) {
1895
+ const { value: e, maxVisible: a = 3 } = t, { t: n } = R();
1903
1896
  if (!Array.isArray(e) || e.length === 0) return null;
1904
1897
  const r = e.slice(0, a), o = e.length - a;
1905
- return /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1906
- r.map((l) => /* @__PURE__ */ s(ae, { label: l, size: "sm" }, l)),
1898
+ return /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1899
+ r.map((i) => /* @__PURE__ */ s(J, { label: i, size: "sm" }, i)),
1907
1900
  o > 0 && /* @__PURE__ */ s(Lt, { label: e.slice(a).join(", "), children: /* @__PURE__ */ s(
1908
- ae,
1901
+ J,
1909
1902
  {
1910
1903
  label: n("inputs.multiSelect.overflow", { count: o }),
1911
1904
  size: "sm",
@@ -1915,7 +1908,36 @@ function An(t) {
1915
1908
  ) })
1916
1909
  ] });
1917
1910
  }
1918
- const Ta = {
1911
+ function Ca() {
1912
+ return /* @__PURE__ */ s(
1913
+ "svg",
1914
+ {
1915
+ viewBox: "0 0 24 24",
1916
+ fill: "none",
1917
+ stroke: "currentColor",
1918
+ strokeWidth: 1.75,
1919
+ strokeLinecap: "round",
1920
+ strokeLinejoin: "round",
1921
+ "aria-hidden": "true",
1922
+ className: "ds:size-3.5",
1923
+ children: /* @__PURE__ */ s("path", { d: "M12 5.5c-1.074 -1.426 -2.45 -2.2 -4 -2c-2.5 .323 -3.7 2.5 -3.5 5c.1 1.5 .5 3 .5 4.5c0 1.5 .5 3.5 1 5c.3 .9 .5 2 1.5 2s1.3 -1.5 1.5 -2.5c.2 -1 .5 -2 1.5 -2s1.3 1 1.5 2c.2 1 .5 2.5 1.5 2.5s1.2 -1.1 1.5 -2c.5 -1.5 1 -3.5 1 -5c0 -1.5 .4 -3 .5 -4.5c.2 -2.5 -1 -4.677 -3.5 -5c-1.55 -.2 -2.926 .574 -4 2z" })
1924
+ }
1925
+ );
1926
+ }
1927
+ function Ln(t) {
1928
+ const { value: e, maxInlineSize: a = "8rem" } = t;
1929
+ return !Array.isArray(e) || e.length === 0 ? null : /* @__PURE__ */ s(
1930
+ J,
1931
+ {
1932
+ label: e.join(", "),
1933
+ size: "sm",
1934
+ fill: "outline",
1935
+ leading: /* @__PURE__ */ s(Ca, {}),
1936
+ maxInlineSize: a
1937
+ }
1938
+ );
1939
+ }
1940
+ const xa = {
1919
1941
  date: { year: "numeric", month: "short", day: "numeric" },
1920
1942
  time: { hour: "2-digit", minute: "2-digit" },
1921
1943
  datetime: {
@@ -1926,80 +1948,106 @@ const Ta = {
1926
1948
  minute: "2-digit"
1927
1949
  }
1928
1950
  };
1929
- function Pn(t) {
1951
+ function qn(t) {
1930
1952
  const { value: e, format: a = "date", options: n } = t;
1931
- return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(he, { value: e, shape: "bare" }) : /* @__PURE__ */ s(
1932
- he,
1953
+ return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(ve, { value: e, shape: "bare" }) : /* @__PURE__ */ s(
1954
+ ve,
1933
1955
  {
1934
1956
  value: e,
1935
1957
  format: "absolute",
1936
1958
  shape: "bare",
1937
- absoluteFormat: n ?? Ta[a === "relative" ? "date" : a]
1959
+ absoluteFormat: n ?? xa[a === "relative" ? "date" : a]
1938
1960
  }
1939
1961
  );
1940
1962
  }
1941
- function Ca(t) {
1963
+ function Na(t) {
1942
1964
  if (t == null || t === "") return null;
1943
1965
  const e = typeof t == "number" ? t : Number(t);
1944
1966
  return Number.isFinite(e) ? e : null;
1945
1967
  }
1946
- function On(t) {
1968
+ function $n(t) {
1947
1969
  const {
1948
1970
  value: e,
1949
1971
  currency: a = "EUR",
1950
1972
  colorNegative: n,
1951
1973
  strikethrough: r,
1952
1974
  options: o
1953
- } = t, { i18n: l } = F(), u = Ca(e);
1975
+ } = t, { i18n: i } = R(), u = Na(e);
1954
1976
  if (u === null) return null;
1955
- const d = l.language || "en", c = new Intl.NumberFormat(d, {
1977
+ const d = i.language || "en", c = new Intl.NumberFormat(d, {
1956
1978
  style: "currency",
1957
1979
  currency: a,
1958
1980
  ...o
1959
- }).format(u), i = ["ds:tabular-nums"];
1960
- return n && u < 0 && i.push("ds:text-[color:var(--destructive)]"), r && i.push("line-through"), /* @__PURE__ */ s("span", { className: i.join(" "), children: c });
1981
+ }).format(u), l = ["ds:tabular-nums"];
1982
+ return n && u < 0 && l.push("ds:text-[color:var(--destructive)]"), r && l.push("line-through"), /* @__PURE__ */ s("span", { className: l.join(" "), children: c });
1961
1983
  }
1962
- function xa(t) {
1963
- if (!we(t)) return t;
1984
+ function Ce(t) {
1985
+ if (!Fe(t)) return t;
1964
1986
  const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
1965
- return Fe(e, { className: n, size: e.props.size ?? 16 });
1987
+ return Re(e, { className: n, size: e.props.size ?? 16 });
1966
1988
  }
1967
- function Te(t, e) {
1989
+ function fe(t, e) {
1968
1990
  return typeof t == "function" ? t(e) : !!t;
1969
1991
  }
1970
- function Mn(t) {
1971
- const { data: e, actions: a } = t;
1972
- return e ? /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: a.map((n, r) => {
1973
- if (Te(n.hidden, e)) return null;
1974
- const o = Te(n.disabled, e), l = o && n.disabledReason ? n.disabledReason : n.label, u = n.variant === "destructive";
1992
+ const Sa = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
1993
+ function _n(t) {
1994
+ const { data: e, actions: a, intent: n = "ghost", group: r, label: o, collapsed: i } = t;
1995
+ if (!e) return null;
1996
+ const u = a.filter((l) => !fe(l.hidden, e));
1997
+ if (typeof i == "function" ? i() : !!i)
1998
+ return /* @__PURE__ */ I(B.Root, { children: [
1999
+ /* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
2000
+ G,
2001
+ {
2002
+ size: "sm",
2003
+ intent: n,
2004
+ icon: /* @__PURE__ */ s($t, { "aria-hidden": !0 }),
2005
+ "aria-label": o ?? "Actions"
2006
+ }
2007
+ ) }),
2008
+ /* @__PURE__ */ s(B.Content, { align: "end", children: u.map((l, f) => /* @__PURE__ */ s(
2009
+ B.Item,
2010
+ {
2011
+ startIcon: Ce(l.icon),
2012
+ disabled: fe(l.disabled, e),
2013
+ onSelect: () => l.onClick(e),
2014
+ className: l.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
2015
+ children: l.label
2016
+ },
2017
+ f
2018
+ )) })
2019
+ ] });
2020
+ const c = u.map((l, f) => {
2021
+ const y = fe(l.disabled, e), b = y && l.disabledReason ? l.disabledReason : l.label;
1975
2022
  return /* @__PURE__ */ s(
1976
- V,
2023
+ G,
1977
2024
  {
1978
2025
  size: "sm",
1979
- intent: "ghost",
1980
- icon: xa(n.icon),
1981
- tooltip: l,
1982
- "aria-label": n.label,
1983
- disabled: o,
1984
- onClick: (d) => {
1985
- d.stopPropagation(), n.onClick(e);
2026
+ intent: n,
2027
+ icon: Ce(l.icon),
2028
+ tooltip: b,
2029
+ "aria-label": l.label,
2030
+ disabled: y,
2031
+ onClick: (x) => {
2032
+ x.stopPropagation(), l.onClick(e);
1986
2033
  },
1987
- className: u ? "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]" : void 0
2034
+ className: l.variant === "destructive" ? Sa : void 0
1988
2035
  },
1989
- r
2036
+ f
1990
2037
  );
1991
- }) }) : null;
2038
+ });
2039
+ return r ? /* @__PURE__ */ s(qt, { "aria-label": o ?? "Actions", size: "sm", children: c }) : /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: c });
1992
2040
  }
1993
- function Ce(t, e) {
2041
+ function xe(t, e) {
1994
2042
  return typeof t == "function" ? t(e) : t;
1995
2043
  }
1996
- function Na(t) {
2044
+ function wa(t) {
1997
2045
  return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
1998
2046
  }
1999
- function Ln(t) {
2047
+ function Bn(t) {
2000
2048
  const { value: e, data: a, href: n, onClick: r, secondary: o } = t;
2001
2049
  if (!a) return null;
2002
- const l = Ce(n, a), u = Ce(o, a), d = e == null || e === "" ? "" : String(e), c = [
2050
+ const i = xe(n, a), u = xe(o, a), d = e == null || e === "" ? "" : String(e), c = [
2003
2051
  "ds:text-[color:var(--primary)]",
2004
2052
  "ds:hover:underline",
2005
2053
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
@@ -2007,15 +2055,15 @@ function Ln(t) {
2007
2055
  "ds:focus-visible:outline-[color:var(--ring)]",
2008
2056
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2009
2057
  "ds:rounded-[var(--radius-sm)]"
2010
- ].join(" "), i = (p) => {
2011
- r && (l || p.preventDefault(), p.stopPropagation(), r(a));
2058
+ ].join(" "), l = (f) => {
2059
+ r && (i || f.preventDefault(), f.stopPropagation(), r(a));
2012
2060
  };
2013
- return /* @__PURE__ */ E("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
2014
- l ? /* @__PURE__ */ s(
2061
+ return /* @__PURE__ */ I("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
2062
+ i ? /* @__PURE__ */ s(
2015
2063
  "a",
2016
2064
  {
2017
- href: Na(l),
2018
- onClick: i,
2065
+ href: wa(i),
2066
+ onClick: l,
2019
2067
  className: c,
2020
2068
  children: d
2021
2069
  }
@@ -2023,7 +2071,7 @@ function Ln(t) {
2023
2071
  "button",
2024
2072
  {
2025
2073
  type: "button",
2026
- onClick: i,
2074
+ onClick: l,
2027
2075
  className: [
2028
2076
  "ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
2029
2077
  c
@@ -2034,31 +2082,31 @@ function Ln(t) {
2034
2082
  u ? /* @__PURE__ */ s("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: u }) : null
2035
2083
  ] });
2036
2084
  }
2037
- function jn(t) {
2085
+ function Gn(t) {
2038
2086
  const {
2039
2087
  value: e,
2040
2088
  data: a,
2041
2089
  onToggle: n,
2042
2090
  onError: r,
2043
2091
  trueIcon: o,
2044
- falseIcon: l,
2092
+ falseIcon: i,
2045
2093
  trueClass: u = "ds:text-[color:var(--success)]",
2046
2094
  falseClass: d = "ds:text-[color:var(--muted-foreground)]",
2047
2095
  label: c
2048
- } = t, { t: i } = F(), [p, C] = R(!1);
2096
+ } = t, { t: l } = R(), [f, y] = D(!1);
2049
2097
  if (!a) return null;
2050
- const g = !!e, b = g ? o ?? /* @__PURE__ */ s(jt, { "aria-hidden": !0, className: "ds:size-4" }) : l ?? /* @__PURE__ */ s(_t, { "aria-hidden": !0, className: "ds:size-4" }), v = g ? u : d, y = c ?? i(g ? "inputs.switch.on" : "inputs.switch.off");
2051
- async function f(m) {
2052
- if (m.stopPropagation(), p || !a) return;
2053
- const x = n(a, !g);
2054
- if (x && typeof x.then == "function") {
2055
- C(!0);
2098
+ const b = !!e, x = b ? o ?? /* @__PURE__ */ s(_t, { "aria-hidden": !0, className: "ds:size-4" }) : i ?? /* @__PURE__ */ s(Bt, { "aria-hidden": !0, className: "ds:size-4" }), T = b ? u : d, h = c ?? l(b ? "inputs.switch.on" : "inputs.switch.off");
2099
+ async function p(g) {
2100
+ if (g.stopPropagation(), f || !a) return;
2101
+ const v = n(a, !b);
2102
+ if (v && typeof v.then == "function") {
2103
+ y(!0);
2056
2104
  try {
2057
- await x;
2105
+ await v;
2058
2106
  } catch (S) {
2059
2107
  r == null || r(a, S);
2060
2108
  } finally {
2061
- C(!1);
2109
+ y(!1);
2062
2110
  }
2063
2111
  }
2064
2112
  }
@@ -2067,11 +2115,11 @@ function jn(t) {
2067
2115
  {
2068
2116
  type: "button",
2069
2117
  role: "switch",
2070
- "aria-checked": g,
2071
- "aria-busy": p,
2072
- "aria-label": y,
2073
- disabled: p,
2074
- onClick: f,
2118
+ "aria-checked": b,
2119
+ "aria-busy": f,
2120
+ "aria-label": h,
2121
+ disabled: f,
2122
+ onClick: p,
2075
2123
  className: [
2076
2124
  "ds:inline-flex ds:items-center ds:justify-center",
2077
2125
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -2082,35 +2130,35 @@ function jn(t) {
2082
2130
  "ds:focus-visible:outline-[color:var(--ring)]",
2083
2131
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2084
2132
  "ds:disabled:opacity-50",
2085
- v
2133
+ T
2086
2134
  ].join(" "),
2087
- children: b
2135
+ children: x
2088
2136
  }
2089
2137
  );
2090
2138
  }
2091
- const Sa = {
2139
+ const Fa = {
2092
2140
  sm: "ds:size-[var(--icon-size-sm)]",
2093
2141
  md: "ds:size-[var(--icon-size-md)]",
2094
2142
  lg: "ds:size-[var(--icon-size-lg)]"
2095
2143
  };
2096
- function xe(t, e) {
2144
+ function Ne(t, e) {
2097
2145
  if (!t || typeof t != "object") return;
2098
2146
  const a = t[e];
2099
2147
  return typeof a == "string" ? a : void 0;
2100
2148
  }
2101
- const wa = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Fa = /^rgba?\(\s*[\d.\s,%/]+\)$/i, Ra = /^hsla?\(\s*[\d.\s,%/]+\)$/i, Da = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
2102
- function ka(t) {
2149
+ const Ra = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Da = /^rgba?\(\s*[\d.\s,%/]+\)$/i, ka = /^hsla?\(\s*[\d.\s,%/]+\)$/i, Ia = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
2150
+ function Ea(t) {
2103
2151
  if (!t) return;
2104
2152
  const e = t.trim();
2105
- if (wa.test(e) || Fa.test(e) || Ra.test(e) || Da.test(e))
2153
+ if (Ra.test(e) || Da.test(e) || ka.test(e) || Ia.test(e))
2106
2154
  return e;
2107
2155
  }
2108
- function _n(t) {
2109
- const { data: e, colorField: a, size: n = "md", labelField: r } = t, o = X(null), l = e ? xe(e, a) : void 0, u = ka(l), d = e && r ? xe(e, r) : void 0;
2110
- return qt(() => {
2156
+ function Vn(t) {
2157
+ const { data: e, colorField: a, size: n = "md", labelField: r } = t, o = Z(null), i = e ? Ne(e, a) : void 0, u = Ea(i), d = e && r ? Ne(e, r) : void 0;
2158
+ return Gt(() => {
2111
2159
  const c = o.current;
2112
2160
  c && (u ? c.style.setProperty("--data-table-dot-color", u) : c.style.removeProperty("--data-table-dot-color"));
2113
- }, [u]), u ? /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2161
+ }, [u]), u ? /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2114
2162
  /* @__PURE__ */ s(
2115
2163
  "span",
2116
2164
  {
@@ -2120,45 +2168,45 @@ function _n(t) {
2120
2168
  "ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
2121
2169
  "ds:bg-[var(--data-table-dot-color)]",
2122
2170
  "ds:border ds:border-[color:var(--border)]",
2123
- Sa[n]
2171
+ Fa[n]
2124
2172
  ].join(" ")
2125
2173
  }
2126
2174
  ),
2127
2175
  d ? /* @__PURE__ */ s("span", { children: d }) : null
2128
2176
  ] }) : null;
2129
2177
  }
2130
- function Ea(t, e) {
2178
+ function za(t, e) {
2131
2179
  if (!t || typeof t != "object") return null;
2132
2180
  const a = t[e], n = typeof a == "number" ? a : Number(a);
2133
2181
  return Number.isFinite(n) ? n : null;
2134
2182
  }
2135
- function qn(t) {
2136
- const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: o } = F();
2183
+ function Un(t) {
2184
+ const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: o } = R();
2137
2185
  if (!e) return null;
2138
- const l = o.language || "en", u = (c) => {
2139
- const i = Ea(e, c.valueField);
2140
- if (i === null) return null;
2141
- let p;
2186
+ const i = o.language || "en", u = (c) => {
2187
+ const l = za(e, c.valueField);
2188
+ if (l === null) return null;
2189
+ let f;
2142
2190
  switch (c.format ?? "number") {
2143
2191
  case "currency":
2144
- p = new Intl.NumberFormat(l, {
2192
+ f = new Intl.NumberFormat(i, {
2145
2193
  style: "currency",
2146
2194
  currency: n
2147
- }).format(i);
2195
+ }).format(l);
2148
2196
  break;
2149
2197
  case "percent":
2150
- p = new Intl.NumberFormat(l, {
2198
+ f = new Intl.NumberFormat(i, {
2151
2199
  style: "percent",
2152
2200
  maximumFractionDigits: 1
2153
- }).format(i / 100);
2201
+ }).format(l / 100);
2154
2202
  break;
2155
2203
  default:
2156
- p = new Intl.NumberFormat(l).format(i);
2204
+ f = new Intl.NumberFormat(i).format(l);
2157
2205
  }
2158
2206
  return {
2159
2207
  label: c.label,
2160
- formatted: p,
2161
- negative: !!r && i < 0
2208
+ formatted: f,
2209
+ negative: !!r && l < 0
2162
2210
  };
2163
2211
  }, d = a.map(u).filter(
2164
2212
  (c) => c !== null
@@ -2175,12 +2223,12 @@ function qn(t) {
2175
2223
  "type-meta",
2176
2224
  "ds:leading-tight"
2177
2225
  ].join(" "),
2178
- children: d.map((c, i) => /* @__PURE__ */ E(
2226
+ children: d.map((c, l) => /* @__PURE__ */ I(
2179
2227
  "span",
2180
2228
  {
2181
2229
  className: "ds:inline-flex ds:items-baseline ds:gap-x-[var(--spacing-xs)]",
2182
2230
  children: [
2183
- i > 0 ? /* @__PURE__ */ s(
2231
+ l > 0 ? /* @__PURE__ */ s(
2184
2232
  "span",
2185
2233
  {
2186
2234
  "aria-hidden": "true",
@@ -2202,19 +2250,19 @@ function qn(t) {
2202
2250
  )
2203
2251
  ]
2204
2252
  },
2205
- `${c.label}-${i}`
2253
+ `${c.label}-${l}`
2206
2254
  ))
2207
2255
  }
2208
2256
  );
2209
2257
  }
2210
- function $n(t) {
2211
- var c, i;
2212
- const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [o, l] = R(e ?? ""), u = X(null);
2258
+ function Kn(t) {
2259
+ var c, l;
2260
+ const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [o, i] = D(e ?? ""), u = Z(null);
2213
2261
  P(() => {
2214
- const p = u.current;
2215
- p && (p.focus(), p.select());
2262
+ const f = u.current;
2263
+ f && (f.focus(), f.select());
2216
2264
  }, []);
2217
- const d = ((i = (c = r == null ? void 0 : r.getColDef) == null ? void 0 : c.call(r)) == null ? void 0 : i.headerName) ?? void 0;
2265
+ const d = ((l = (c = r == null ? void 0 : r.getColDef) == null ? void 0 : c.call(r)) == null ? void 0 : l.headerName) ?? void 0;
2218
2266
  return /* @__PURE__ */ s(
2219
2267
  "input",
2220
2268
  {
@@ -2222,58 +2270,58 @@ function $n(t) {
2222
2270
  type: "text",
2223
2271
  value: o,
2224
2272
  "aria-label": d,
2225
- onChange: (p) => {
2226
- const C = p.target.value;
2227
- l(C), a(C);
2273
+ onChange: (f) => {
2274
+ const y = f.target.value;
2275
+ i(y), a(y);
2228
2276
  },
2229
- onKeyDown: (p) => {
2230
- p.key === "Enter" && (p.preventDefault(), n());
2277
+ onKeyDown: (f) => {
2278
+ f.key === "Enter" && (f.preventDefault(), n());
2231
2279
  },
2232
2280
  className: [
2233
2281
  "ds:block ds:w-full ds:appearance-none",
2234
2282
  // Input surface chrome: rounded border + bg + focus halo.
2235
- Pe,
2283
+ Oe,
2236
2284
  // Use the `md` height (`--min-target-size`) so the input
2237
2285
  // auto-lifts to 48px under `.theme-accessible` to satisfy
2238
2286
  // WCAG 2.5.5 target size.
2239
- Oe.md,
2240
- Me.sm,
2287
+ Me.md,
2288
+ je.sm,
2241
2289
  Le.sm
2242
2290
  ].join(" ")
2243
2291
  }
2244
2292
  );
2245
2293
  }
2246
- function Gn(t) {
2247
- var v, y;
2294
+ function Wn(t) {
2295
+ var T, h;
2248
2296
  const {
2249
2297
  initialValue: e,
2250
2298
  onValueChange: a,
2251
2299
  stopEditing: n,
2252
2300
  column: r,
2253
2301
  decimals: o = 2,
2254
- min: l,
2302
+ min: i,
2255
2303
  max: u
2256
- } = t, { i18n: d } = F(), c = X(null), i = ((y = (v = r == null ? void 0 : r.getColDef) == null ? void 0 : v.call(r)) == null ? void 0 : y.headerName) ?? void 0, [p, C] = R(() => e == null || Number.isNaN(e) ? "" : String(e));
2304
+ } = t, { i18n: d } = R(), c = Z(null), l = ((h = (T = r == null ? void 0 : r.getColDef) == null ? void 0 : T.call(r)) == null ? void 0 : h.headerName) ?? void 0, [f, y] = D(() => e == null || Number.isNaN(e) ? "" : String(e));
2257
2305
  P(() => {
2258
- const f = c.current;
2259
- f && (f.focus(), f.select());
2306
+ const p = c.current;
2307
+ p && (p.focus(), p.select());
2260
2308
  }, []);
2261
- function g(f) {
2262
- var $, k;
2263
- if (f.trim().length === 0) return null;
2264
- const m = d.language || "en", h = new Intl.NumberFormat(m).formatToParts(12345.6), x = (($ = h.find((G) => G.type === "group")) == null ? void 0 : $.value) ?? "", S = ((k = h.find((G) => G.type === "decimal")) == null ? void 0 : k.value) ?? ".", I = f.replace(new RegExp(`\\${x}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), D = Number(I);
2265
- return Number.isFinite(D) ? D : null;
2309
+ function b(p) {
2310
+ var q, F;
2311
+ if (p.trim().length === 0) return null;
2312
+ const g = d.language || "en", m = new Intl.NumberFormat(g).formatToParts(12345.6), v = ((q = m.find((V) => V.type === "group")) == null ? void 0 : q.value) ?? "", S = ((F = m.find((V) => V.type === "decimal")) == null ? void 0 : F.value) ?? ".", E = p.replace(new RegExp(`\\${v}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), k = Number(E);
2313
+ return Number.isFinite(k) ? k : null;
2266
2314
  }
2267
- function b(f) {
2268
- const m = g(f);
2269
- if (m == null) {
2315
+ function x(p) {
2316
+ const g = b(p);
2317
+ if (g == null) {
2270
2318
  a(null);
2271
2319
  return;
2272
2320
  }
2273
- let h = m;
2274
- typeof l == "number" && (h = Math.max(l, h)), typeof u == "number" && (h = Math.min(u, h));
2275
- const x = 10 ** o;
2276
- a(Math.round(h * x) / x);
2321
+ let m = g;
2322
+ typeof i == "number" && (m = Math.max(i, m)), typeof u == "number" && (m = Math.min(u, m));
2323
+ const v = 10 ** o;
2324
+ a(Math.round(m * v) / v);
2277
2325
  }
2278
2326
  return /* @__PURE__ */ s(
2279
2327
  "input",
@@ -2281,55 +2329,56 @@ function Gn(t) {
2281
2329
  ref: c,
2282
2330
  type: "text",
2283
2331
  inputMode: "decimal",
2284
- value: p,
2285
- "aria-label": i,
2286
- onChange: (f) => {
2287
- const m = f.target.value;
2288
- C(m), b(m);
2332
+ value: f,
2333
+ "aria-label": l,
2334
+ onChange: (p) => {
2335
+ const g = p.target.value;
2336
+ y(g), x(g);
2289
2337
  },
2290
- onKeyDown: (f) => {
2291
- f.key === "Enter" && (f.preventDefault(), n());
2338
+ onKeyDown: (p) => {
2339
+ p.key === "Enter" && (p.preventDefault(), n());
2292
2340
  },
2293
2341
  className: [
2294
2342
  "ds:block ds:w-full ds:appearance-none ds:text-end ds:tabular-nums",
2295
- Pe,
2343
+ Oe,
2296
2344
  // Use `md` height — see editable-text-cell-renderer for rationale.
2297
- Oe.md,
2298
- Me.sm,
2345
+ Me.md,
2346
+ je.sm,
2299
2347
  Le.sm
2300
2348
  ].join(" ")
2301
2349
  }
2302
2350
  );
2303
2351
  }
2304
2352
  export {
2305
- Mn as A,
2306
- qn as B,
2307
- _n as C,
2308
- Tn as D,
2309
- Gn as E,
2310
- zn as I,
2311
- Ln as L,
2312
- Dn as N,
2313
- Sn as S,
2314
- An as T,
2315
- In as U,
2316
- On as a,
2317
- Pn as b,
2318
- xn as c,
2319
- Nn as d,
2320
- $n as e,
2321
- kn as f,
2322
- wn as g,
2323
- En as h,
2324
- na as i,
2325
- ra as j,
2326
- jn as k,
2327
- te as l,
2328
- Vt as m,
2329
- Fn as n,
2330
- Rn as o,
2331
- sa as p,
2332
- Be as q,
2333
- Cn as u
2353
+ _n as A,
2354
+ Un as B,
2355
+ Vn as C,
2356
+ Sn as D,
2357
+ Wn as E,
2358
+ Mn as I,
2359
+ Bn as L,
2360
+ zn as N,
2361
+ Dn as S,
2362
+ jn as T,
2363
+ On as U,
2364
+ $n as a,
2365
+ qn as b,
2366
+ Fn as c,
2367
+ Rn as d,
2368
+ Kn as e,
2369
+ An as f,
2370
+ kn as g,
2371
+ Pn as h,
2372
+ ra as i,
2373
+ sa as j,
2374
+ Gn as k,
2375
+ ae as l,
2376
+ Ut as m,
2377
+ Ln as n,
2378
+ In as o,
2379
+ En as p,
2380
+ la as q,
2381
+ Ve as r,
2382
+ wn as u
2334
2383
  };
2335
- //# sourceMappingURL=editable-currency-cell-renderer-CFqQc56y.js.map
2384
+ //# sourceMappingURL=editable-currency-cell-renderer-BVJ04DkB.js.map