@emporix/component-library 1.12.2 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -286,7 +286,7 @@ import { DataTable } from '@emporix/component-library'
286
286
  import type { DataTablePaginationState } from '@emporix/component-library'
287
287
  import '@emporix/component-library/styles'
288
288
  import 'primereact/resources/primereact.css'
289
- import 'primereact/resources/themes/lara-light-cyan/theme.css'
289
+ import 'primereact/resources/themes/saga-blue/theme.css'
290
290
  import 'primeicons/primeicons.css'
291
291
 
292
292
  const columns = [
@@ -1,5 +1,4 @@
1
- import { DataTableValueArray } from 'primereact/datatable';
2
- import { DataTableProps } from './types';
1
+ import { DataTableProps, DataTableValueArray } from './types';
3
2
  export type { DataTableProps, DataTablePaginationState } from './types';
4
3
  export { useDataTablePagination, DEFAULT_DATA_TABLE_PAGINATION, } from './useDataTablePagination';
5
4
  export declare const DataTable: <T extends DataTableValueArray>(props: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAA;AAW7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAA;AAOjC,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,mBAAmB,EACrD,OAAO,cAAc,CAAC,CAAC,CAAC,4CAgMzB,CAAA"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/DataTable.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlE,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAA;AA2BjC,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,mBAAmB,EACrD,OAAO,cAAc,CAAC,CAAC,CAAC,4CAiMzB,CAAA"}
@@ -1,8 +1,34 @@
1
1
  import { CSSProperties, ReactNode, Ref } from 'react';
2
- import { DataTableEditingRows, DataTableFilterMeta, DataTableFilterEvent, DataTableFooterTemplateType, DataTableHeaderTemplateType, DataTablePageEvent, DataTableRowEditCompleteEvent, DataTableRowExpansionTemplate, DataTableSortEvent, DataTableValueArray } from 'primereact/datatable';
3
2
  import { ColumnProps } from 'primereact/column';
4
3
  export type DataTableSortOrder = 1 | 0 | -1 | null | undefined;
5
4
  export type DataTableSelectionMode = 'single' | 'multiple' | null;
5
+ export type DataTableValueArray = unknown[];
6
+ export interface DataTableFilterConstraint {
7
+ value?: unknown;
8
+ matchMode?: string;
9
+ }
10
+ export interface DataTableFilterMetaData {
11
+ value?: unknown;
12
+ matchMode?: string;
13
+ }
14
+ export interface DataTableFilterMetaOperator {
15
+ operator?: string;
16
+ constraints?: DataTableFilterConstraint[];
17
+ }
18
+ export type DataTableFilterMeta = Record<string, DataTableFilterMetaData | DataTableFilterMetaOperator>;
19
+ export interface DataTablePageEvent {
20
+ first: number;
21
+ rows: number;
22
+ page?: number;
23
+ pageCount?: number;
24
+ }
25
+ export interface DataTableSortEvent {
26
+ sortField?: string;
27
+ sortOrder?: DataTableSortOrder;
28
+ }
29
+ export interface DataTableFilterEvent {
30
+ filters: DataTableFilterMeta;
31
+ }
6
32
  export interface DataTablePaginationState {
7
33
  currentPage?: number;
8
34
  rows?: number;
@@ -23,7 +49,7 @@ export interface DataTableProps<T extends DataTableValueArray> {
23
49
  className?: string;
24
50
  style?: CSSProperties;
25
51
  'data-testid'?: string;
26
- tableRef?: Ref<import('primereact/datatable').DataTable<DataTableValueArray>>;
52
+ tableRef?: Ref<unknown>;
27
53
  showHeaders?: boolean;
28
54
  showFilter?: boolean;
29
55
  loading?: boolean;
@@ -49,12 +75,12 @@ export interface DataTableProps<T extends DataTableValueArray> {
49
75
  rowClassName?: (item: T[number]) => Record<string, unknown> | string;
50
76
  rowActions?: (item: T[number]) => ReactNode;
51
77
  editMode?: string;
52
- editingRows?: DataTableEditingRows | DataTableValueArray;
53
- onRowEditComplete?: (e: DataTableRowEditCompleteEvent) => void;
54
- expandedRows?: T | DataTableValueArray | undefined;
78
+ editingRows?: unknown;
79
+ onRowEditComplete?: (e: unknown) => void;
80
+ expandedRows?: T | Record<string, boolean> | undefined;
55
81
  onRowToggle?: (items: T) => void;
56
- rowExpansionTemplate?: (data: T[number], options: DataTableRowExpansionTemplate) => ReactNode;
57
- header?: DataTableHeaderTemplateType<DataTableValueArray>;
58
- footer?: DataTableFooterTemplateType<DataTableValueArray>;
82
+ rowExpansionTemplate?: (data: T[number], options: unknown) => ReactNode;
83
+ header?: ReactNode;
84
+ footer?: ReactNode;
59
85
  }
60
86
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/types.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/types.ts"],"names":[],"mappings":"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"}
@@ -1,6 +1,5 @@
1
- import { DataTableFilterEvent, DataTablePageEvent, DataTableSortEvent } from 'primereact/datatable';
1
+ import { DataTableFilterEvent, DataTablePageEvent, DataTableSortEvent, DataTablePaginationState } from './types';
2
2
  import { ColumnProps } from 'primereact/column';
3
- import { DataTablePaginationState } from './types';
4
3
  export declare const DEFAULT_DATA_TABLE_PAGINATION: DataTablePaginationState;
5
4
  export type DataTableFilters = NonNullable<DataTablePaginationState['filters']>;
6
5
  export declare const useDataTablePagination: (initialPaginationParams?: DataTablePaginationState) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useDataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/useDataTablePagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAEvD,eAAO,MAAM,6BAA6B,EAAE,wBAO3C,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAA;AAE/E,eAAO,MAAM,sBAAsB,GACjC,0BAAyB,wBAAwD;4BAgElD,kBAAkB;;;;;;4BA1DlB,kBAAkB;8BAgDhB,oBAAoB;0BA2CxB,WAAW,EAAE;CAgC3C,CAAA"}
1
+ {"version":3,"file":"useDataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/components/datatable/useDataTablePagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,eAAO,MAAM,6BAA6B,EAAE,wBAO3C,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAA;AAE/E,eAAO,MAAM,sBAAsB,GACjC,0BAAyB,wBAAwD;4BAgElD,kBAAkB;;;;;;4BA1DlB,kBAAkB;8BAgDhB,oBAAoB;0BA2CxB,WAAW,EAAE;CAgC3C,CAAA"}
@@ -1,7 +1,6 @@
1
- import { ToastMessageOptions } from 'primereact/toast';
2
1
  import { ReactNode } from 'react';
3
- /** PrimeReact toast severity (aligned with `ToastMessageOptions`) */
4
- export type ToastSeverity = NonNullable<ToastMessageOptions['severity']>;
2
+ /** PrimeReact-compatible toast severities supported by the wrapper */
3
+ export type ToastSeverity = 'success' | 'info' | 'warn' | 'error';
5
4
  /** API / form error shape often passed to `showError` */
6
5
  export interface ToastErrorItem {
7
6
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,qEAAqE;AACrE,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAA;AAExE,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,MAAM,EAAE,GACR,cAAc,EAAE,GAChB,SAAS,GACT,SAAS,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAEjE,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,MAAM,EAAE,GACR,cAAc,EAAE,GAChB,SAAS,GACT,SAAS,CAAA"}
package/dist/index.es.js CHANGED
@@ -1,24 +1,24 @@
1
- import { jsxs as R, jsx as s, Fragment as Ht } from "react/jsx-runtime";
1
+ import { jsxs as R, jsx as s, Fragment as Zt } from "react/jsx-runtime";
2
2
  import dt, { useMemo as at, useState as nt, useRef as G, useEffect as it, useId as Bt, useCallback as X, useLayoutEffect as ye, isValidElement as be, cloneElement as ge, createContext as we, useContext as ke, forwardRef as xe, useImperativeHandle as Ce } from "react";
3
3
  import { createPortal as Ne } from "react-dom";
4
4
  import { Dialog as Be } from "primereact/dialog";
5
5
  import { Toast as Pe } from "primereact/toast";
6
6
  import { Menu as Le } from "primereact/menu";
7
7
  import { DataTable as Ee } from "primereact/datatable";
8
- import { Column as Ut } from "primereact/column";
8
+ import { Column as Qt } from "primereact/column";
9
9
  import { FilterMatchMode as De } from "primereact/api";
10
- const $e = "_primaryButton_gvcke_1", je = "_primaryButtonDisabled_gvcke_33", Fe = "_spinner_gvcke_41", Tt = {
10
+ const $e = "_primaryButton_gvcke_1", je = "_primaryButtonDisabled_gvcke_33", Fe = "_spinner_gvcke_41", Mt = {
11
11
  primaryButton: $e,
12
12
  primaryButtonDisabled: je,
13
13
  spinner: Fe
14
14
  };
15
- var se = {
15
+ var ie = {
16
16
  color: void 0,
17
17
  size: void 0,
18
18
  className: void 0,
19
19
  style: void 0,
20
20
  attr: void 0
21
- }, Yt = dt.createContext && /* @__PURE__ */ dt.createContext(se), Oe = ["attr", "size", "title"];
21
+ }, Jt = dt.createContext && /* @__PURE__ */ dt.createContext(ie), Oe = ["attr", "size", "title"];
22
22
  function Se(e, t) {
23
23
  if (e == null) return {};
24
24
  var n, r, u = Ae(e, t);
@@ -37,16 +37,16 @@ function Ae(e, t) {
37
37
  }
38
38
  return n;
39
39
  }
40
- function St() {
41
- return St = Object.assign ? Object.assign.bind() : function(e) {
40
+ function Rt() {
41
+ return Rt = Object.assign ? Object.assign.bind() : function(e) {
42
42
  for (var t = 1; t < arguments.length; t++) {
43
43
  var n = arguments[t];
44
44
  for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
45
45
  }
46
46
  return e;
47
- }, St.apply(null, arguments);
47
+ }, Rt.apply(null, arguments);
48
48
  }
49
- function Qt(e, t) {
49
+ function te(e, t) {
50
50
  var n = Object.keys(e);
51
51
  if (Object.getOwnPropertySymbols) {
52
52
  var r = Object.getOwnPropertySymbols(e);
@@ -56,12 +56,12 @@ function Qt(e, t) {
56
56
  }
57
57
  return n;
58
58
  }
59
- function At(e) {
59
+ function It(e) {
60
60
  for (var t = 1; t < arguments.length; t++) {
61
61
  var n = arguments[t] != null ? arguments[t] : {};
62
- t % 2 ? Qt(Object(n), !0).forEach(function(r) {
62
+ t % 2 ? te(Object(n), !0).forEach(function(r) {
63
63
  Re(e, r, n[r]);
64
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function(r) {
64
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : te(Object(n)).forEach(function(r) {
65
65
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
66
66
  });
67
67
  }
@@ -84,15 +84,15 @@ function qe(e, t) {
84
84
  }
85
85
  return (t === "string" ? String : Number)(e);
86
86
  }
87
- function ae(e) {
88
- return e && e.map((t, n) => /* @__PURE__ */ dt.createElement(t.tag, At({
87
+ function le(e) {
88
+ return e && e.map((t, n) => /* @__PURE__ */ dt.createElement(t.tag, It({
89
89
  key: n
90
- }, t.attr), ae(t.child)));
90
+ }, t.attr), le(t.child)));
91
91
  }
92
92
  function vt(e) {
93
- return (t) => /* @__PURE__ */ dt.createElement(Te, St({
94
- attr: At({}, e.attr)
95
- }, t), ae(e.child));
93
+ return (t) => /* @__PURE__ */ dt.createElement(Te, Rt({
94
+ attr: It({}, e.attr)
95
+ }, t), le(e.child));
96
96
  }
97
97
  function Te(e) {
98
98
  var t = (n) => {
@@ -101,13 +101,13 @@ function Te(e) {
101
101
  size: u,
102
102
  title: d
103
103
  } = e, i = Se(e, Oe), c = u || n.size || "1em", o;
104
- return n.className && (o = n.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ dt.createElement("svg", St({
104
+ return n.className && (o = n.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ dt.createElement("svg", Rt({
105
105
  stroke: "currentColor",
106
106
  fill: "currentColor",
107
107
  strokeWidth: "0"
108
108
  }, n.attr, r, i, {
109
109
  className: o,
110
- style: At(At({
110
+ style: It(It({
111
111
  color: e.color || n.color
112
112
  }, n.style), e.style),
113
113
  height: c,
@@ -115,7 +115,7 @@ function Te(e) {
115
115
  xmlns: "http://www.w3.org/2000/svg"
116
116
  }), d && /* @__PURE__ */ dt.createElement("title", null, d), e.children);
117
117
  };
118
- return Yt !== void 0 ? /* @__PURE__ */ dt.createElement(Yt.Consumer, null, (n) => t(n)) : t(se);
118
+ return Jt !== void 0 ? /* @__PURE__ */ dt.createElement(Jt.Consumer, null, (n) => t(n)) : t(ie);
119
119
  }
120
120
  function We(e) {
121
121
  return vt({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { opacity: "0.2", fillRule: "evenodd", clipRule: "evenodd", d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z", fill: "currentColor" }, child: [] }] })(e);
@@ -130,8 +130,8 @@ const So = ({
130
130
  ...i
131
131
  }) => {
132
132
  const c = [
133
- Tt.primaryButton,
134
- t ? Tt.primaryButtonDisabled : "",
133
+ Mt.primaryButton,
134
+ t ? Mt.primaryButtonDisabled : "",
135
135
  u
136
136
  ].filter(Boolean).join(" ");
137
137
  return /* @__PURE__ */ R(
@@ -144,12 +144,12 @@ const So = ({
144
144
  "data-testid": d,
145
145
  ...i,
146
146
  children: [
147
- n && /* @__PURE__ */ s(We, { className: Tt.spinner, size: 12 }),
147
+ n && /* @__PURE__ */ s(We, { className: Mt.spinner, size: 12 }),
148
148
  e
149
149
  ]
150
150
  }
151
151
  );
152
- }, Me = "_secondaryButton_15dkw_1", ze = "_secondaryButtonDisabled_15dkw_32", Jt = {
152
+ }, Me = "_secondaryButton_15dkw_1", ze = "_secondaryButtonDisabled_15dkw_32", ee = {
153
153
  secondaryButton: Me,
154
154
  secondaryButtonDisabled: ze
155
155
  }, Ao = ({
@@ -161,8 +161,8 @@ const So = ({
161
161
  ...d
162
162
  }) => {
163
163
  const i = [
164
- Jt.secondaryButton,
165
- t ? Jt.secondaryButtonDisabled : "",
164
+ ee.secondaryButton,
165
+ t ? ee.secondaryButtonDisabled : "",
166
166
  r
167
167
  ].filter(Boolean).join(" ");
168
168
  return /* @__PURE__ */ s(
@@ -233,7 +233,7 @@ function en(e) {
233
233
  function nn(e) {
234
234
  return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "9 18 15 12 9 6" }, child: [] }] })(e);
235
235
  }
236
- function Zt(e) {
236
+ function Gt(e) {
237
237
  return vt({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "6 9 12 15 18 9" }, child: [] }] })(e);
238
238
  }
239
239
  const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17", an = "_control_1t7tq_22", ln = "_controlDisabled_1t7tq_46", cn = "_controlInput_1t7tq_55", un = "_value_1t7tq_73", dn = "_placeholder_1t7tq_82", pn = "_chipDisplay_1t7tq_88", fn = "_chipEmpty_1t7tq_96", hn = "_chipValue_1t7tq_101", _n = "_chipItem_1t7tq_110", mn = "_chipLabel_1t7tq_124", vn = "_chipRemove_1t7tq_130", yn = "_chipOverflow_1t7tq_145", bn = "_chevron_1t7tq_150", gn = "_open_1t7tq_157", wn = "_panel_1t7tq_181", kn = "_panelClosing_1t7tq_198", xn = "_filterWrapper_1t7tq_202", Cn = "_filterInput_1t7tq_209", Nn = "_filterIcon_1t7tq_228", Bn = "_list_1t7tq_239", Pn = "_option_1t7tq_248", Ln = "_checkboxContainer_1t7tq_263", En = "_checkbox_1t7tq_263", Dn = "_optionLabel_1t7tq_280", $n = "_optionSelected_1t7tq_285", jn = "_optionDisabled_1t7tq_289", Fn = "_empty_1t7tq_298", On = "_disabled_1t7tq_305", Sn = "_error_1t7tq_309", P = {
@@ -405,7 +405,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
405
405
  F && !kt(F, B) && gt(F, p);
406
406
  }
407
407
  }
408
- }, et = n && r === "chip", Rt = (p, F) => {
408
+ }, et = n && r === "chip", qt = (p, F) => {
409
409
  if (F.stopPropagation(), a) return;
410
410
  const I = wt(p, h);
411
411
  if (I == null) return;
@@ -413,7 +413,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
413
413
  (rt) => String(rt) !== String(I)
414
414
  );
415
415
  t == null || t({ value: A, originalEvent: F });
416
- }, Ct = at(() => u == null ? null : Math.max(0, u), [u]), W = at(() => !et || Ct == null ? k : k.slice(0, Ct), [et, Ct, k]), pe = et && Ct != null ? Math.max(0, k.length - Ct) : 0, fe = [
416
+ }, Ct = at(() => u == null ? null : Math.max(0, u), [u]), W = at(() => !et || Ct == null ? k : k.slice(0, Ct), [et, Ct, k]), jt = et && Ct != null ? Math.max(0, k.length - Ct) : 0, Ft = [
417
417
  P.dropdown,
418
418
  a ? P.disabled : "",
419
419
  E ? P.open : "",
@@ -427,8 +427,8 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
427
427
  P.panel,
428
428
  y ? P.panelClosing : "",
429
429
  O
430
- ].filter(Boolean).join(" "), me = Bt(), Et = q ?? `dropdown-${me.replace(/[^a-zA-Z0-9_-]/g, "")}`, It = `${Et}-panel`, qt = C == null ? void 0 : `${Et}-error`, Xt = C == null ? {} : { "aria-invalid": "true" }, Gt = qt == null ? {} : { "aria-describedby": qt };
431
- return /* @__PURE__ */ R("div", { className: fe, ref: J, "data-testid": D, children: [
430
+ ].filter(Boolean).join(" "), me = Bt(), Et = q ?? `dropdown-${me.replace(/[^a-zA-Z0-9_-]/g, "")}`, Tt = `${Et}-panel`, Wt = C == null ? void 0 : `${Et}-error`, Ut = C == null ? {} : { "aria-invalid": "true" }, Yt = Wt == null ? {} : { "aria-describedby": Wt };
431
+ return /* @__PURE__ */ R("div", { className: Ft, ref: J, "data-testid": D, children: [
432
432
  g != null && /* @__PURE__ */ R("label", { htmlFor: Et, className: P.label, children: [
433
433
  g,
434
434
  m && /* @__PURE__ */ s("span", { className: P.required, children: "*" })
@@ -440,11 +440,11 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
440
440
  role: "combobox",
441
441
  "aria-expanded": E || y,
442
442
  "aria-haspopup": "listbox",
443
- "aria-controls": E || y ? It : void 0,
443
+ "aria-controls": E || y ? Tt : void 0,
444
444
  "aria-disabled": a,
445
445
  "aria-label": typeof g == "string" ? g : void 0,
446
- ...x ? {} : Xt,
447
- ...x ? {} : Gt,
446
+ ...x ? {} : Ut,
447
+ ...x ? {} : Yt,
448
448
  tabIndex: x || a ? -1 : 0,
449
449
  className: he,
450
450
  onClick: x ? void 0 : pt,
@@ -469,13 +469,13 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
469
469
  placeholder: L,
470
470
  disabled: a,
471
471
  "aria-autocomplete": "list",
472
- "aria-controls": E || y ? It : void 0,
472
+ "aria-controls": E || y ? Tt : void 0,
473
473
  "aria-expanded": E || y,
474
- ...Xt,
475
- ...Gt,
474
+ ...Ut,
475
+ ...Yt,
476
476
  "data-testid": D ? `${D}-control` : void 0
477
477
  }
478
- ) : et ? /* @__PURE__ */ s("span", { className: P.chipValue, children: k.length === 0 ? /* @__PURE__ */ s("span", { className: P.placeholder, children: L }) : /* @__PURE__ */ R(Ht, { children: [
478
+ ) : et ? /* @__PURE__ */ s("span", { className: P.chipValue, children: k.length === 0 ? /* @__PURE__ */ s("span", { className: P.placeholder, children: L }) : /* @__PURE__ */ R(Zt, { children: [
479
479
  W.map((p, F) => {
480
480
  const I = _t(p, v), A = wt(p, h), rt = A != null ? String(A) : `chip-${F}`;
481
481
  return /* @__PURE__ */ R("span", { className: P.chipItem, children: [
@@ -485,7 +485,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
485
485
  {
486
486
  type: "button",
487
487
  className: P.chipRemove,
488
- onClick: (Q) => Rt(p, Q),
488
+ onClick: (Q) => qt(p, Q),
489
489
  onKeyDown: (Q) => {
490
490
  (Q.key === "Enter" || Q.key === " ") && Q.stopPropagation();
491
491
  },
@@ -496,13 +496,13 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
496
496
  )
497
497
  ] }, rt);
498
498
  }),
499
- pe > 0 && /* @__PURE__ */ s("span", { className: P.chipOverflow, children: d.replace(
499
+ jt > 0 && /* @__PURE__ */ s("span", { className: P.chipOverflow, children: d.replace(
500
500
  "{0}",
501
501
  String(k.length)
502
502
  ) })
503
503
  ] }) }) : /* @__PURE__ */ s("span", { className: P.value, children: T && !n ? T(S ?? null) : (n ? z : w) || /* @__PURE__ */ s("span", { className: P.placeholder, children: L }) }),
504
504
  /* @__PURE__ */ s(
505
- Zt,
505
+ Gt,
506
506
  {
507
507
  className: P.chevron,
508
508
  "aria-hidden": !0,
@@ -516,7 +516,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
516
516
  "div",
517
517
  {
518
518
  ref: Y,
519
- id: It,
519
+ id: Tt,
520
520
  className: _e,
521
521
  role: "presentation",
522
522
  onAnimationEnd: bt,
@@ -579,7 +579,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
579
579
  ]
580
580
  }
581
581
  ),
582
- C == null ? null : /* @__PURE__ */ s("div", { id: qt, className: P.error, role: "alert", children: C })
582
+ C == null ? null : /* @__PURE__ */ s("div", { id: Wt, className: P.error, role: "alert", children: C })
583
583
  ] });
584
584
  }, An = "_inputText_2dnll_1", Rn = "_label_2dnll_9", In = "_required_2dnll_20", qn = "_tooltipIcon_2dnll_25", Tn = "_input_2dnll_1", Wn = "_inputTextarea_2dnll_72", Mn = "_error_2dnll_79", zn = "_inputTextDisabled_2dnll_88", xt = {
585
585
  inputText: An,
@@ -724,7 +724,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
724
724
  option: or,
725
725
  optionHighlighted: sr,
726
726
  error: ar
727
- }, ir = 300, te = (e, t) => {
727
+ }, ir = 300, ne = (e, t) => {
728
728
  if (t) {
729
729
  const r = e[t];
730
730
  return r != null ? String(r) : "";
@@ -752,7 +752,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
752
752
  g((_) => t.length === 0 ? -1 : _ < 0 ? _ : _ >= t.length ? t.length - 1 : _);
753
753
  }, [t]);
754
754
  const V = at(
755
- () => t.map((_) => te(_, r)),
755
+ () => t.map((_) => ne(_, r)),
756
756
  [t, r]
757
757
  ), H = X(
758
758
  (_) => {
@@ -776,7 +776,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
776
776
  u({ value: y, originalEvent: _ }), H(y), a(!0), g(-1);
777
777
  }, k = (_, y) => {
778
778
  N.current && (clearTimeout(N.current), N.current = void 0);
779
- const M = te(_, r);
779
+ const M = ne(_, r);
780
780
  u({
781
781
  value: M,
782
782
  originalEvent: y
@@ -851,7 +851,7 @@ const rn = "_dropdown_1t7tq_1", on = "_label_1t7tq_8", sn = "_required_1t7tq_17"
851
851
  },
852
852
  "aria-label": "Show suggestions",
853
853
  "data-testid": l ? `${l}-dropdown` : void 0,
854
- children: /* @__PURE__ */ s(Zt, { "aria-hidden": !0 })
854
+ children: /* @__PURE__ */ s(Gt, { "aria-hidden": !0 })
855
855
  }
856
856
  )
857
857
  ] }),
@@ -900,8 +900,8 @@ const cr = "_accordion_l1hoq_1", ur = "_tab_l1hoq_6", dr = "_headerButton_l1hoq_
900
900
  panelOpen: mr,
901
901
  panelContent: vr,
902
902
  noBorderLast: yr
903
- }, ie = (e) => null;
904
- ie.displayName = "AccordionTab";
903
+ }, ce = (e) => null;
904
+ ce.displayName = "AccordionTab";
905
905
  const br = (e, t) => e == null ? [] : Array.isArray(e) ? t ? e : e.slice(0, 1) : [e], gr = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), wr = ({
906
906
  activeIndex: e,
907
907
  multiple: t = !1,
@@ -919,8 +919,8 @@ const br = (e, t) => e == null ? [] : Array.isArray(e) ? t ? e : e.slice(0, 1) :
919
919
  ...l
920
920
  }) => {
921
921
  const f = Bt(), a = gr(f), m = at(() => dt.Children.toArray(L).filter(
922
- (k) => dt.isValidElement(k) && k.type === ie
923
- ), [L]), g = e !== void 0, C = at(() => br(e, t), [e, t]), [q, N] = nt([]), O = g ? C : q, T = typeof o == "object" && o != null && typeof o.timeout == "number" ? o.timeout : void 0, U = /* @__PURE__ */ s(nn, { "aria-hidden": !0 }), D = /* @__PURE__ */ s(Zt, { "aria-hidden": !0 }), x = n ?? U, V = r ?? D, H = (S, k) => {
922
+ (k) => dt.isValidElement(k) && k.type === ce
923
+ ), [L]), g = e !== void 0, C = at(() => br(e, t), [e, t]), [q, N] = nt([]), O = g ? C : q, T = typeof o == "object" && o != null && typeof o.timeout == "number" ? o.timeout : void 0, U = /* @__PURE__ */ s(nn, { "aria-hidden": !0 }), D = /* @__PURE__ */ s(Gt, { "aria-hidden": !0 }), x = n ?? U, V = r ?? D, H = (S, k) => {
924
924
  const w = O.includes(S);
925
925
  if (t) {
926
926
  const _ = w ? O.filter((y) => y !== S) : [...O, S];
@@ -1027,10 +1027,10 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1027
1027
  buttonFirst: Br,
1028
1028
  buttonLast: Pr,
1029
1029
  buttonSelected: Lr
1030
- }, ee = (e, t) => {
1030
+ }, re = (e, t) => {
1031
1031
  const r = e[t];
1032
1032
  return r != null ? String(r) : "";
1033
- }, Wt = (e, t) => e[t], ne = (e, t) => t == null ? !1 : !!e[t], Wo = ({
1033
+ }, zt = (e, t) => e[t], oe = (e, t) => t == null ? !1 : !!e[t], Wo = ({
1034
1034
  value: e,
1035
1035
  onChange: t,
1036
1036
  options: n,
@@ -1045,11 +1045,11 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1045
1045
  "data-testid": B
1046
1046
  }) => {
1047
1047
  const L = (a) => {
1048
- const m = Wt(a, u);
1048
+ const m = zt(a, u);
1049
1049
  return i && Array.isArray(e) ? e.includes(m) : e === m;
1050
1050
  }, l = (a, m) => {
1051
- if (o || ne(a, d)) return;
1052
- const g = Wt(a, u);
1051
+ if (o || oe(a, d)) return;
1052
+ const g = zt(a, u);
1053
1053
  if (g === void 0) return;
1054
1054
  let C;
1055
1055
  if (i) {
@@ -1075,14 +1075,14 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1075
1075
  "aria-disabled": o,
1076
1076
  "data-testid": B,
1077
1077
  children: n.map((a, m) => {
1078
- const g = Wt(a, u), C = g != null ? String(g) : `option-${m}`, q = ne(a, d), N = L(a);
1078
+ const g = zt(a, u), C = g != null ? String(g) : `option-${m}`, q = oe(a, d), N = L(a);
1079
1079
  return /* @__PURE__ */ s(
1080
1080
  "button",
1081
1081
  {
1082
1082
  type: "button",
1083
1083
  "aria-pressed": N,
1084
1084
  "aria-disabled": q || o,
1085
- "aria-label": ee(a, r),
1085
+ "aria-label": re(a, r),
1086
1086
  disabled: o || q,
1087
1087
  className: [
1088
1088
  Nt.button,
@@ -1095,14 +1095,14 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1095
1095
  (O.key === " " || O.key === "Enter") && (O.preventDefault(), l(a, O));
1096
1096
  },
1097
1097
  "data-testid": B ? `${B}-option-${m}` : void 0,
1098
- children: c ? c(a) : ee(a, r)
1098
+ children: c ? c(a) : re(a, r)
1099
1099
  },
1100
1100
  C
1101
1101
  );
1102
1102
  })
1103
1103
  }
1104
1104
  );
1105
- }, Er = "_radioButton_l80ql_1", Dr = "_radioButtonDisabled_l80ql_10", $r = "_label_l80ql_14", jr = "_input_l80ql_18", jt = {
1105
+ }, Er = "_radioButton_l80ql_1", Dr = "_radioButtonDisabled_l80ql_10", $r = "_label_l80ql_14", jr = "_input_l80ql_18", Ot = {
1106
1106
  radioButton: Er,
1107
1107
  radioButtonDisabled: Dr,
1108
1108
  label: $r,
@@ -1122,8 +1122,8 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1122
1122
  const h = Bt(), B = e ?? `radiobutton-${h.replace(/[^a-zA-Z0-9_-]/g, "")}`, L = (f) => {
1123
1123
  u == null || u({ value: n, originalEvent: f });
1124
1124
  }, l = [
1125
- jt.radioButton,
1126
- d ? jt.radioButtonDisabled : "",
1125
+ Ot.radioButton,
1126
+ d ? Ot.radioButtonDisabled : "",
1127
1127
  c
1128
1128
  ].filter(Boolean).join(" ");
1129
1129
  return /* @__PURE__ */ R("div", { className: l, "data-testid": o, children: [
@@ -1138,18 +1138,18 @@ const kr = "_selectButton_1u3fo_1", xr = "_selectButtonDisabled_1u3fo_9", Cr = "
1138
1138
  ...r !== void 0 ? { checked: r } : {},
1139
1139
  disabled: d,
1140
1140
  onChange: L,
1141
- className: jt.input,
1141
+ className: Ot.input,
1142
1142
  "data-testid": o ? `${o}-input` : void 0
1143
1143
  }
1144
1144
  ),
1145
- i != null && /* @__PURE__ */ s("label", { htmlFor: B, className: jt.label, children: i })
1145
+ i != null && /* @__PURE__ */ s("label", { htmlFor: B, className: Ot.label, children: i })
1146
1146
  ] });
1147
- }, Fr = "_anchorWrap_h9mnj_1", Or = "_panel_h9mnj_7", Sr = "_panelInteractive_h9mnj_23", Ar = "_panelPassThrough_h9mnj_27", Ot = {
1147
+ }, Fr = "_anchorWrap_h9mnj_1", Or = "_panel_h9mnj_7", Sr = "_panelInteractive_h9mnj_23", Ar = "_panelPassThrough_h9mnj_27", At = {
1148
1148
  anchorWrap: Fr,
1149
1149
  panel: Or,
1150
1150
  panelInteractive: Sr,
1151
1151
  panelPassThrough: Ar
1152
- }, Dt = 8, Ft = 8;
1152
+ }, Dt = 8, St = 8;
1153
1153
  function $t(...e) {
1154
1154
  return (t) => {
1155
1155
  e.forEach((n) => n == null ? void 0 : n(t));
@@ -1193,14 +1193,14 @@ function Ir(e) {
1193
1193
  }
1194
1194
  const h = window.innerWidth, B = window.innerHeight;
1195
1195
  return v = Math.min(
1196
- Math.max(v, Ft),
1197
- h - n.width - Ft
1196
+ Math.max(v, St),
1197
+ h - n.width - St
1198
1198
  ), o = Math.min(
1199
- Math.max(o, Ft),
1200
- B - n.height - Ft
1199
+ Math.max(o, St),
1200
+ B - n.height - St
1201
1201
  ), { top: o, left: v };
1202
1202
  }
1203
- function Mt(e, t) {
1203
+ function Vt(e, t) {
1204
1204
  const n = e.getAttribute("data-pr-tooltip");
1205
1205
  return n != null && n !== "" ? n : t ?? "";
1206
1206
  }
@@ -1219,7 +1219,7 @@ const Tr = ({
1219
1219
  }) => {
1220
1220
  const o = dt.Children.toArray(e);
1221
1221
  if (o.length !== 1 || !be(o[0])) {
1222
- const f = [Ot.anchorWrap, t].filter(Boolean).join(" ");
1222
+ const f = [At.anchorWrap, t].filter(Boolean).join(" ");
1223
1223
  return /* @__PURE__ */ s("span", { className: f, ...n === "hover" || n === "both" ? {
1224
1224
  onMouseEnter: r,
1225
1225
  onMouseMove: u,
@@ -1345,7 +1345,7 @@ const Tr = ({
1345
1345
  if (C)
1346
1346
  if (e) {
1347
1347
  const b = D.current;
1348
- b && U(Mt(b, t));
1348
+ b && U(Vt(b, t));
1349
1349
  } else
1350
1350
  U(t ?? null);
1351
1351
  }, [t, C, e]), it(() => {
@@ -1361,7 +1361,7 @@ const Tr = ({
1361
1361
  V.current = {
1362
1362
  x: j.clientX,
1363
1363
  y: j.clientY
1364
- }, y(et, Mt(et, t));
1364
+ }, y(et, Vt(et, t));
1365
1365
  }, tt = (j) => {
1366
1366
  V.current = {
1367
1367
  x: j.clientX,
@@ -1371,7 +1371,7 @@ const Tr = ({
1371
1371
  K(j.relatedTarget);
1372
1372
  }, pt = (j) => {
1373
1373
  const et = j.currentTarget;
1374
- y(et, Mt(et, t));
1374
+ y(et, Vt(et, t));
1375
1375
  }, gt = (j) => {
1376
1376
  K(j.relatedTarget);
1377
1377
  };
@@ -1408,8 +1408,8 @@ const Tr = ({
1408
1408
  },
1409
1409
  [K]
1410
1410
  ), yt = [
1411
- Ot.panel,
1412
- i ? Ot.panelPassThrough : Ot.panelInteractive,
1411
+ At.panel,
1412
+ i ? At.panelPassThrough : At.panelInteractive,
1413
1413
  L
1414
1414
  ].filter(Boolean).join(" "), Pt = typeof document < "u" && C && T != null ? Ne(
1415
1415
  /* @__PURE__ */ s(
@@ -1432,7 +1432,7 @@ const Tr = ({
1432
1432
  ),
1433
1433
  document.body
1434
1434
  ) : null;
1435
- return e ? /* @__PURE__ */ s(Ht, { children: Pt }) : /* @__PURE__ */ R(Ht, { children: [
1435
+ return e ? /* @__PURE__ */ s(Zt, { children: Pt }) : /* @__PURE__ */ R(Zt, { children: [
1436
1436
  f != null ? /* @__PURE__ */ s(
1437
1437
  Tr,
1438
1438
  {
@@ -1484,13 +1484,13 @@ const Tr = ({
1484
1484
  );
1485
1485
  };
1486
1486
  zr.displayName = "Dialog";
1487
- function le(e) {
1487
+ function ue(e) {
1488
1488
  return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2" }, child: [] }] })(e);
1489
1489
  }
1490
- function Kt(e) {
1490
+ function Xt(e) {
1491
1491
  return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2" }, child: [] }] })(e);
1492
1492
  }
1493
- function ce(e) {
1493
+ function de(e) {
1494
1494
  return vt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }, child: [] }] })(e);
1495
1495
  }
1496
1496
  const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Zr = "_title_6kjk2_18", Xr = "_message_6kjk2_22", Gr = "_iconSuccess_6kjk2_27", Ur = "_iconError_6kjk2_32", Yr = "_iconWarn_6kjk2_37", Qr = "_iconInfo_6kjk2_42", mt = {
@@ -1503,17 +1503,17 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1503
1503
  iconError: Ur,
1504
1504
  iconWarn: Yr,
1505
1505
  iconInfo: Qr
1506
- }, zt = (e) => {
1506
+ }, Ht = (e) => {
1507
1507
  const { title: t, message: n, type: r } = e, u = (d) => {
1508
1508
  switch (d) {
1509
1509
  case "success":
1510
- return /* @__PURE__ */ s(ce, { className: mt.iconSuccess, size: 16 });
1510
+ return /* @__PURE__ */ s(de, { className: mt.iconSuccess, size: 16 });
1511
1511
  case "error":
1512
- return /* @__PURE__ */ s(Kt, { className: mt.iconError, size: 16 });
1512
+ return /* @__PURE__ */ s(Xt, { className: mt.iconError, size: 16 });
1513
1513
  case "warn":
1514
- return /* @__PURE__ */ s(Kt, { className: mt.iconWarn, size: 16 });
1514
+ return /* @__PURE__ */ s(Xt, { className: mt.iconWarn, size: 16 });
1515
1515
  default:
1516
- return /* @__PURE__ */ s(le, { className: mt.iconInfo, size: 16 });
1516
+ return /* @__PURE__ */ s(ue, { className: mt.iconInfo, size: 16 });
1517
1517
  }
1518
1518
  };
1519
1519
  return /* @__PURE__ */ R("div", { className: mt.root, children: [
@@ -1525,22 +1525,22 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1525
1525
  ] });
1526
1526
  }, Jr = "_toast_538wi_1", to = {
1527
1527
  toast: Jr
1528
- }, eo = "_list_1nsqq_1", re = {
1528
+ }, eo = "_list_1nsqq_1", se = {
1529
1529
  list: eo
1530
- }, ue = we({
1530
+ }, pe = we({
1531
1531
  showSuccess: () => {
1532
1532
  },
1533
1533
  showError: () => {
1534
1534
  },
1535
1535
  showToast: () => {
1536
1536
  }
1537
- }), Vo = () => ke(ue), Ho = (e) => {
1537
+ }), Vo = () => ke(pe), Ho = (e) => {
1538
1538
  const t = G(null), n = X(
1539
1539
  (d, i, c) => {
1540
1540
  var o;
1541
1541
  (o = t.current) == null || o.show({
1542
1542
  severity: "success",
1543
- content: /* @__PURE__ */ s(zt, { title: d, message: i, type: "success" }),
1543
+ content: /* @__PURE__ */ s(Ht, { title: d, message: i, type: "success" }),
1544
1544
  life: c || (typeof i == "string" && i.length > 50 ? i.length * 80 : 4e3)
1545
1545
  });
1546
1546
  },
@@ -1557,17 +1557,17 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1557
1557
  if (Array.isArray(l))
1558
1558
  if (l.some((a) => typeof a != "string")) {
1559
1559
  const a = l;
1560
- return l.length <= 1 ? { detail: a[0].message, textForLife: a[0].message } : { detail: /* @__PURE__ */ s("ul", { className: re.list, children: a.map((g, C) => /* @__PURE__ */ s("li", { children: g.message }, C)) }), textForLife: l.join(" • ") };
1560
+ return l.length <= 1 ? { detail: a[0].message, textForLife: a[0].message } : { detail: /* @__PURE__ */ s("ul", { className: se.list, children: a.map((g, C) => /* @__PURE__ */ s("li", { children: g.message }, C)) }), textForLife: l.join(" • ") };
1561
1561
  } else {
1562
1562
  const a = l;
1563
- return l.length <= 1 ? { detail: a[0], textForLife: a[0] } : { detail: /* @__PURE__ */ s("ul", { className: re.list, children: a.map((g, C) => /* @__PURE__ */ s("li", { children: g }, C)) }), textForLife: l.join(" • ") };
1563
+ return l.length <= 1 ? { detail: a[0], textForLife: a[0] } : { detail: /* @__PURE__ */ s("ul", { className: se.list, children: a.map((g, C) => /* @__PURE__ */ s("li", { children: g }, C)) }), textForLife: l.join(" • ") };
1564
1564
  }
1565
1565
  const f = String(l);
1566
1566
  return { detail: f, textForLife: f };
1567
1567
  }, { detail: v, textForLife: h } = o(i), B = 3e3 + h.length * 50;
1568
1568
  (L = t.current) == null || L.show({
1569
1569
  severity: "error",
1570
- content: /* @__PURE__ */ s(zt, { title: d, message: v, type: "error" }),
1570
+ content: /* @__PURE__ */ s(Ht, { title: d, message: v, type: "error" }),
1571
1571
  life: c || B
1572
1572
  });
1573
1573
  },
@@ -1577,18 +1577,18 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1577
1577
  var o;
1578
1578
  (o = t.current) == null || o.show({
1579
1579
  severity: c,
1580
- content: /* @__PURE__ */ s(zt, { title: d, message: i, type: c })
1580
+ content: /* @__PURE__ */ s(Ht, { title: d, message: i, type: c })
1581
1581
  });
1582
1582
  },
1583
1583
  [t]
1584
1584
  );
1585
- return /* @__PURE__ */ R(ue.Provider, { value: { showSuccess: n, showError: r, showToast: u }, children: [
1585
+ return /* @__PURE__ */ R(pe.Provider, { value: { showSuccess: n, showError: r, showToast: u }, children: [
1586
1586
  /* @__PURE__ */ s(Pe, { ref: t, position: "top-center", className: to.toast }),
1587
1587
  e.children
1588
1588
  ] });
1589
1589
  }, no = "_menu_4pmis_1", ro = {
1590
1590
  menu: no
1591
- }, oo = {}, de = (e) => e.filter((t) => t.visible !== !1).map((t) => ({
1591
+ }, oo = {}, fe = (e) => e.filter((t) => t.visible !== !1).map((t) => ({
1592
1592
  label: t.label,
1593
1593
  icon: t.icon,
1594
1594
  disabled: t.disabled,
@@ -1600,7 +1600,7 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1600
1600
  item: t
1601
1601
  });
1602
1602
  } : void 0,
1603
- items: t.items ? de(t.items) : void 0
1603
+ items: t.items ? fe(t.items) : void 0
1604
1604
  })), so = xe(
1605
1605
  ({ model: e, popup: t = !1, id: n, className: r = "", "data-testid": u }, d) => {
1606
1606
  const i = G(null), c = G(null);
@@ -1623,7 +1623,7 @@ const Vr = "_root_6kjk2_1", Hr = "_header_6kjk2_5", Kr = "_iconWrap_6kjk2_12", Z
1623
1623
  {
1624
1624
  ref: i,
1625
1625
  id: n,
1626
- model: de(e),
1626
+ model: fe(e),
1627
1627
  popup: t,
1628
1628
  className: o,
1629
1629
  "data-testid": u
@@ -1649,12 +1649,12 @@ const ao = "_root_lv2tm_1", io = "_iconWrap_lv2tm_13", lo = "_icon_lv2tm_13", co
1649
1649
  }, mo = ({ severity: e }) => {
1650
1650
  switch (e) {
1651
1651
  case "success":
1652
- return /* @__PURE__ */ s(ce, { className: ut.icon, "aria-hidden": !0 });
1652
+ return /* @__PURE__ */ s(de, { className: ut.icon, "aria-hidden": !0 });
1653
1653
  case "warn":
1654
1654
  case "error":
1655
- return /* @__PURE__ */ s(Kt, { className: ut.icon, "aria-hidden": !0 });
1655
+ return /* @__PURE__ */ s(Xt, { className: ut.icon, "aria-hidden": !0 });
1656
1656
  default:
1657
- return /* @__PURE__ */ s(le, { className: ut.icon, "aria-hidden": !0 });
1657
+ return /* @__PURE__ */ s(ue, { className: ut.icon, "aria-hidden": !0 });
1658
1658
  }
1659
1659
  }, Ko = ({
1660
1660
  severity: e = "info",
@@ -1678,11 +1678,11 @@ const ao = "_root_lv2tm_1", io = "_iconWrap_lv2tm_13", lo = "_icon_lv2tm_13", co
1678
1678
  ]
1679
1679
  }
1680
1680
  );
1681
- }, vo = "_dataTable_i1x6x_1", yo = "_noHeader_i1x6x_136", bo = "_clickableRows_i1x6x_140", Vt = {
1681
+ }, vo = "_dataTable_i1x6x_1", yo = "_noHeader_i1x6x_136", bo = "_clickableRows_i1x6x_140", Kt = {
1682
1682
  dataTable: vo,
1683
1683
  noHeader: yo,
1684
1684
  clickableRows: bo
1685
- }, go = "_root_g4y44_1", wo = "_table_g4y44_5", oe = {
1685
+ }, go = "_root_g4y44_1", wo = "_table_g4y44_5", ae = {
1686
1686
  root: go,
1687
1687
  table: wo
1688
1688
  }, ko = {
@@ -1811,15 +1811,16 @@ const ao = "_root_lv2tm_1", io = "_iconWrap_lv2tm_13", lo = "_icon_lv2tm_13", co
1811
1811
  }, [r, w]), [b, $] = nt(!1), tt = at(() => a ? (yt ?? 0) === 0 : t.length === 0 || b, [b, a, yt, t.length]), bt = (W) => {
1812
1812
  S && (S(W.data, W.index), W.originalEvent.stopPropagation());
1813
1813
  }, pt = (W) => {
1814
- V && !W.originalEvent.isPropagationStopped() && (V(W.value), W.originalEvent.stopPropagation());
1814
+ var jt, Ft;
1815
+ V && !(((Ft = (jt = W.originalEvent).isPropagationStopped) == null ? void 0 : Ft.call(jt)) ?? !1) && (V(W.value), W.originalEvent.stopPropagation());
1815
1816
  }, gt = (W) => {
1816
1817
  M == null || M(W.data);
1817
1818
  }, j = [
1818
- oe.table,
1819
- Vt.dataTable,
1820
- v ? "" : Vt.noHeader,
1821
- S || x ? Vt.clickableRows : ""
1822
- ].filter(Boolean).join(" "), et = !tt && !(H && t.length > 0 && t.every((W) => !H({ data: W }))) ? D : void 0, Rt = typeof L == "function" ? L() : L, Ct = {
1819
+ ae.table,
1820
+ Kt.dataTable,
1821
+ v ? "" : Kt.noHeader,
1822
+ S || x ? Kt.clickableRows : ""
1823
+ ].filter(Boolean).join(" "), et = !tt && !(H && t.length > 0 && t.every((W) => !H({ data: W }))) ? D : void 0, qt = typeof L == "function" ? L() : L, Ct = {
1823
1824
  style: i,
1824
1825
  "data-testid": c,
1825
1826
  className: j,
@@ -1852,7 +1853,7 @@ const ao = "_root_lv2tm_1", io = "_iconWrap_lv2tm_13", lo = "_icon_lv2tm_13", co
1852
1853
  currentPageReportTemplate: U,
1853
1854
  stripedRows: !0,
1854
1855
  isDataSelectable: H,
1855
- emptyMessage: Rt,
1856
+ emptyMessage: qt,
1856
1857
  loading: B,
1857
1858
  removableSort: !0,
1858
1859
  onSelectionChange: pt,
@@ -1866,21 +1867,21 @@ const ao = "_root_lv2tm_1", io = "_iconWrap_lv2tm_13", lo = "_icon_lv2tm_13", co
1866
1867
  header: ot,
1867
1868
  ...x != null ? { selectionMode: x } : {}
1868
1869
  };
1869
- return /* @__PURE__ */ s("div", { className: [oe.root, d].filter(Boolean).join(" "), children: /* @__PURE__ */ R(Ee, { ...Ct, children: [
1870
+ return /* @__PURE__ */ s("div", { className: [ae.root, d].filter(Boolean).join(" "), children: /* @__PURE__ */ R(Ee, { ...Ct, children: [
1870
1871
  x && /* @__PURE__ */ s(
1871
- Ut,
1872
+ Qt,
1872
1873
  {
1873
1874
  selectionMode: x,
1874
1875
  headerStyle: { width: "78px" }
1875
1876
  }
1876
1877
  ),
1877
- Pt.map((W) => /* @__PURE__ */ s(Ut, { ...W }, String(W.columnKey ?? W.field))),
1878
+ Pt.map((W) => /* @__PURE__ */ s(Qt, { ...W }, String(W.columnKey ?? W.field))),
1878
1879
  u
1879
1880
  ] }) });
1880
1881
  };
1881
1882
  export {
1882
1883
  wr as Accordion,
1883
- ie as AccordionTab,
1884
+ ce as AccordionTab,
1884
1885
  lr as AutoComplete,
1885
1886
  To as Checkbox,
1886
1887
  ko as DEFAULT_DATA_TABLE_PAGINATION,
@@ -1896,7 +1897,7 @@ export {
1896
1897
  Wo as SelectButton,
1897
1898
  Ro as Tabs,
1898
1899
  Ho as ToastProvider,
1899
- zt as ToastTemplate,
1900
+ Ht as ToastTemplate,
1900
1901
  zo as Tooltip,
1901
1902
  xo as useDataTablePagination,
1902
1903
  Vo as useToast
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(P,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("primereact/dialog"),require("primereact/toast"),require("primereact/menu"),require("primereact/datatable"),require("primereact/column"),require("primereact/api")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","primereact/dialog","primereact/toast","primereact/menu","primereact/datatable","primereact/column","primereact/api"],o):(P=typeof globalThis<"u"?globalThis:P||self,o(P.EmporixComponentLibrary={},P.React,P.React,P.ReactDOM,P.dialog$1,P.toast$1,P.menu$1,P.datatable,P.column,P.api))})(this,(function(P,o,s,dt,pt,ft,ht,_t,ze,vt){"use strict";const Se={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var Ve={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},He=s.createContext&&s.createContext(Ve),bt=["attr","size","title"];function yt(t,e){if(t==null)return{};var n,r,d=mt(t,e);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(t);for(r=0;r<p.length;r++)n=p[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(d[n]=t[n])}return d}function mt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xe.apply(null,arguments)}function Ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(t,d).enumerable})),n.push.apply(n,r)}return n}function Pe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(n),!0).forEach(function(r){gt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gt(t,e,n){return(e=wt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t){var e=kt(t,"string");return typeof e=="symbol"?e:e+""}function kt(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ze(t){return t&&t.map((e,n)=>s.createElement(e.tag,Pe({key:n},e.attr),Ze(e.child)))}function le(t){return e=>s.createElement(Ct,xe({attr:Pe({},t.attr)},e),Ze(t.child))}function Ct(t){var e=n=>{var{attr:r,size:d,title:p}=t,i=yt(t,bt),u=d||n.size||"1em",a;return n.className&&(a=n.className),t.className&&(a=(a?a+" ":"")+t.className),s.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:a,style:Pe(Pe({color:t.color||n.color},n.style),t.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),p&&s.createElement("title",null,p),t.children)};return He!==void 0?s.createElement(He.Consumer,null,n=>e(n)):e(Ve)}function Bt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(t)}const Nt=({children:t,disabled:e=!1,loading:n=!1,onClick:r,className:d="","data-testid":p,...i})=>{const u=[Se.primaryButton,e?Se.primaryButtonDisabled:"",d].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:u,disabled:e||n,onClick:r,"data-testid":p,...i,children:[n&&o.jsx(Bt,{className:Se.spinner,size:12}),t]})},Ge={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},xt=({children:t,disabled:e=!1,onClick:n,className:r="","data-testid":d,...p})=>{const i=[Ge.secondaryButton,e?Ge.secondaryButtonDisabled:"",r].filter(Boolean).join(" ");return o.jsx("button",{type:"button",className:i,disabled:e,onClick:n,"data-testid":d,...p,children:t})},ie={tabsContainer:"_tabsContainer_m3c4e_1",tabsHeader:"_tabsHeader_m3c4e_7",tabItem:"_tabItem_m3c4e_13",tabContent:"_tabContent_m3c4e_29",tabLabel:"_tabLabel_m3c4e_51",tabLine:"_tabLine_m3c4e_61",active:"_active_m3c4e_68",inactive:"_inactive_m3c4e_76",tabPanels:"_tabPanels_m3c4e_84"},Pt=({tabs:t,activeTabId:e,onTabChange:n,className:r="","data-testid":d,...p})=>{var u;const i=[ie.tabsContainer,r].filter(Boolean).join(" ");return o.jsxs("div",{className:i,"data-testid":d,...p,children:[o.jsx("div",{className:ie.tabsHeader,children:t.map(a=>{const y=a.id===e,_=[ie.tabItem,y?ie.active:ie.inactive].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:_,onClick:()=>n(a.id),"data-testid":`${d}-tab-${a.id}`,children:[o.jsx("div",{className:ie.tabContent,children:o.jsx("span",{className:ie.tabLabel,children:a.label})}),o.jsx("div",{className:ie.tabLine})]},a.id)})}),o.jsx("div",{className:ie.tabPanels,children:(u=t.find(a=>a.id===e))==null?void 0:u.content})]})};function $t(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}function Et(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(t)}function Lt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(t)}function Dt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function Ae(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}const E={dropdown:"_dropdown_1t7tq_1",label:"_label_1t7tq_8",required:"_required_1t7tq_17",control:"_control_1t7tq_22",controlDisabled:"_controlDisabled_1t7tq_46",controlInput:"_controlInput_1t7tq_55",value:"_value_1t7tq_73",placeholder:"_placeholder_1t7tq_82",chipDisplay:"_chipDisplay_1t7tq_88",chipEmpty:"_chipEmpty_1t7tq_96",chipValue:"_chipValue_1t7tq_101",chipItem:"_chipItem_1t7tq_110",chipLabel:"_chipLabel_1t7tq_124",chipRemove:"_chipRemove_1t7tq_130",chipOverflow:"_chipOverflow_1t7tq_145",chevron:"_chevron_1t7tq_150",open:"_open_1t7tq_157",panel:"_panel_1t7tq_181",panelClosing:"_panelClosing_1t7tq_198",filterWrapper:"_filterWrapper_1t7tq_202",filterInput:"_filterInput_1t7tq_209",filterIcon:"_filterIcon_1t7tq_228",list:"_list_1t7tq_239",option:"_option_1t7tq_248",checkboxContainer:"_checkboxContainer_1t7tq_263",checkbox:"_checkbox_1t7tq_263",optionLabel:"_optionLabel_1t7tq_280",optionSelected:"_optionSelected_1t7tq_285",optionDisabled:"_optionDisabled_1t7tq_289",empty:"_empty_1t7tq_298",disabled:"_disabled_1t7tq_305",error:"_error_1t7tq_309"},ce=(t,e)=>{const r=t[e];return r!=null?String(r):""},fe=(t,e)=>t[e],he=(t,e)=>e==null?!1:!!t[e],St=({value:t,onChange:e,multiple:n=!1,display:r="comma",maxSelectedLabels:d,selectedItemsLabel:p="{0} items selected",removeIcon:i,onEditEnd:u,options:a,optionLabel:y="label",optionValue:_="value",optionDisabled:$,placeholder:L="Select",filter:c=!1,editable:h=!1,disabled:l=!1,required:v=!1,label:w,error:N,inputId:M,className:x="",panelClassName:O="",valueTemplate:W,itemTemplate:X,"data-testid":S})=>{const B=h&&!n,K=s.useMemo(()=>n&&Array.isArray(t)?t:[],[n,t]),Z=s.useMemo(()=>new Set(K.map(f=>String(f))),[K]),j=a.find(f=>!n&&fe(f,_)===t),C=s.useMemo(()=>n?a.filter(f=>Z.has(String(fe(f,_)))):[],[n,a,_,Z]),k=j?ce(j,y):"",H=C.map(f=>ce(f,y)).filter(Boolean).join(", "),[D,b]=s.useState(!1),[m,V]=s.useState(!1),[G,oe]=s.useState(""),[ae,U]=s.useState(k),J=s.useRef(null),Y=s.useRef(null),ve=s.useRef(null),ke=s.useRef(null),g=s.useRef(!1),A=s.useMemo(()=>c&&!B?a.filter(f=>ce(f,y).toLowerCase().includes(G.toLowerCase())):a,[c,B,a,y,G]);s.useEffect(()=>{B&&U(k)},[B,t,k]),s.useEffect(()=>{D&&c&&!B&&(oe(""),setTimeout(()=>{var f;return(f=ve.current)==null?void 0:f.focus()},0))},[D,c,B]);const R=()=>{g.current=!0,V(!0)},be=f=>{var F;(g.current||(F=f.animationName)!=null&&F.includes("menuOut"))&&(g.current=!1,b(!1),V(!1),B&&U(k))};s.useEffect(()=>{if(!D&&!m)return;const f=F=>{J.current&&!J.current.contains(F.target)&&(B&&U(k),R())};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[D,m,B,k]);const de=()=>{l||b(f=>!f)},ye=(f,F)=>{if(he(f,$))return;const q=fe(f,_);if(B&&U(ce(f,y)),n){const T=q??null;if(T==null)return;const Q=Z.has(String(T))?K.filter(pe=>pe!==T):[...K,T];e==null||e({value:Q,originalEvent:F});return}e==null||e({value:q??null,originalEvent:F}),R()},I=f=>{if(!D){if(f.key==="Enter"&&B&&ae.trim()){f.preventDefault();const F=ae.trim(),q=F.toLowerCase(),T=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===q||pe.startsWith(q)}),te=T&&!he(T,$)?fe(T,_):null;T&&!he(T,$)&&(U(ce(T,y)),e==null||e({value:te,originalEvent:f})),u==null||u({value:F,selectedValue:te,originalEvent:f});return}(f.key==="Enter"||f.key===" "||f.key==="ArrowDown")&&(f.preventDefault(),b(!0));return}if(f.key==="Escape"){f.preventDefault(),R();return}if(f.key==="Enter"){if(f.preventDefault(),B){const F=ae.trim();if(F){const q=F.toLowerCase(),T=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===q||pe.startsWith(q)}),te=T&&!he(T,$)?fe(T,_):null;T&&!he(T,$)&&ye(T,f),u==null||u({value:F,selectedValue:te,originalEvent:f})}else u==null||u({value:"",selectedValue:null,originalEvent:f})}else if(A.length>0){const F=A.find(q=>!he(q,$));F&&!he(F,$)&&ye(F,f)}}},ee=n&&r==="chip",qe=(f,F)=>{if(F.stopPropagation(),l)return;const q=fe(f,_);if(q==null)return;const T=K.filter(te=>String(te)!==String(q));e==null||e({value:T,originalEvent:F})},ge=s.useMemo(()=>d==null?null:Math.max(0,d),[d]),z=s.useMemo(()=>!ee||ge==null?C:C.slice(0,ge),[ee,ge,C]),on=ee&&ge!=null?Math.max(0,C.length-ge):0,rn=[E.dropdown,l?E.disabled:"",D?E.open:"",x].filter(Boolean).join(" "),sn=[E.control,l?E.controlDisabled:"",ee?E.chipDisplay:"",ee&&C.length===0?E.chipEmpty:""].filter(Boolean).join(" "),an=[E.panel,m?E.panelClosing:"",O].filter(Boolean).join(" "),ln=s.useId(),Ne=M??`dropdown-${ln.replace(/[^a-zA-Z0-9_-]/g,"")}`,Me=`${Ne}-panel`,We=N==null?void 0:`${Ne}-error`,ct=N==null?{}:{"aria-invalid":"true"},ut=We==null?{}:{"aria-describedby":We};return o.jsxs("div",{className:rn,ref:J,"data-testid":S,children:[w!=null&&o.jsxs("label",{htmlFor:Ne,className:E.label,children:[w,v&&o.jsx("span",{className:E.required,children:"*"})]}),o.jsxs("div",{id:B?void 0:Ne,role:"combobox","aria-expanded":D||m,"aria-haspopup":"listbox","aria-controls":D||m?Me:void 0,"aria-disabled":l,"aria-label":typeof w=="string"?w:void 0,...B?{}:ct,...B?{}:ut,tabIndex:B||l?-1:0,className:sn,onClick:B?void 0:de,onKeyDown:B?void 0:I,"data-testid":S&&!B?`${S}-control`:void 0,children:[B?o.jsx("input",{ref:ke,id:Ne,type:"text",className:E.controlInput,value:ae,onChange:f=>{U(f.target.value),!D&&!m&&b(!0)},onFocus:()=>{!l&&!D&&!m&&b(!0)},onKeyDown:I,placeholder:L,disabled:l,"aria-autocomplete":"list","aria-controls":D||m?Me:void 0,"aria-expanded":D||m,...ct,...ut,"data-testid":S?`${S}-control`:void 0}):ee?o.jsx("span",{className:E.chipValue,children:C.length===0?o.jsx("span",{className:E.placeholder,children:L}):o.jsxs(o.Fragment,{children:[z.map((f,F)=>{const q=ce(f,y),T=fe(f,_),te=T!=null?String(T):`chip-${F}`;return o.jsxs("span",{className:E.chipItem,children:[o.jsx("span",{className:E.chipLabel,children:X?X(f):q}),!l&&o.jsx("button",{type:"button",className:E.chipRemove,onClick:Q=>qe(f,Q),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&Q.stopPropagation()},"aria-label":`Remove ${q}`,"data-testid":S?`${S}-chip-remove-${F}`:void 0,children:i??o.jsx($t,{"aria-hidden":!0})})]},te)}),on>0&&o.jsx("span",{className:E.chipOverflow,children:p.replace("{0}",String(C.length))})]})}):o.jsx("span",{className:E.value,children:W&&!n?W(j??null):(n?H:k)||o.jsx("span",{className:E.placeholder,children:L})}),o.jsx(Ae,{className:E.chevron,"aria-hidden":!0,onClick:B?de:void 0})]}),(D||m)&&o.jsxs("div",{ref:Y,id:Me,className:an,role:"presentation",onAnimationEnd:be,"data-testid":S?`${S}-panel`:void 0,children:[c&&!B&&o.jsxs("div",{className:E.filterWrapper,children:[o.jsx("input",{ref:ve,type:"text",className:E.filterInput,value:G,onChange:f=>{oe(f.target.value)},onKeyDown:f=>{f.key==="Escape"&&b(!1),f.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":S?`${S}-filter`:void 0}),o.jsx(Et,{className:E.filterIcon,"aria-hidden":!0})]}),o.jsx("ul",{className:E.list,role:"listbox","aria-label":"Options",children:A.length===0?o.jsx("li",{className:E.empty,children:"No results"}):A.map((f,F)=>{const q=fe(f,_),T=ce(f,y),te=he(f,$),Q=n?Z.has(String(q)):t===q,pe=q!=null?String(q):`option-${F}`;return o.jsxs("li",{role:"option","aria-selected":Q,"aria-disabled":te,className:[E.option,Q?E.optionSelected:"",te?E.optionDisabled:""].filter(Boolean).join(" "),onClick:cn=>ye(f,cn),"data-testid":S?`${S}-option-${F}`:void 0,children:[n&&o.jsx("span",{className:E.checkboxContainer,"aria-hidden":!0,children:o.jsx("input",{type:"checkbox",checked:Q,readOnly:!0,tabIndex:-1,className:E.checkbox})}),o.jsx("span",{className:E.optionLabel,children:X?X(f):T})]},pe)})})]}),N==null?null:o.jsx("div",{id:We,className:E.error,role:"alert",children:N})]})},_e={inputText:"_inputText_2dnll_1",label:"_label_2dnll_9",required:"_required_2dnll_20",tooltipIcon:"_tooltipIcon_2dnll_25",input:"_input_2dnll_1",inputTextarea:"_inputTextarea_2dnll_72",error:"_error_2dnll_79",inputTextDisabled:"_inputTextDisabled_2dnll_88"},At=({label:t,tooltip:e,required:n=!1,inputId:r,textarea:d=!1,rows:p,error:i,className:u="","data-testid":a,disabled:y=!1,..._})=>{const{type:$="text",...L}=_,c=s.useId(),h=r??`input-text-${c.replace(/[^a-zA-Z0-9_-]/g,"")}`,l=[_e.inputText,y?_e.inputTextDisabled:"",u].filter(Boolean).join(" "),v=L["aria-invalid"];let w;v===void 0?w=void 0:v===!0?w="true":v===!1?w="false":w=v;const N=n?{"aria-required":"true"}:{"aria-required":"false"},M=w===void 0&&i==null?{}:{"aria-invalid":w??"true"},x=i==null?void 0:`${h}-error`,O=[_e.input,d?_e.inputTextarea:""].filter(Boolean).join(" "),W={id:h,className:O,disabled:y,...N,...M,"aria-describedby":x,"data-testid":a?`${a}-input`:void 0};return o.jsxs("div",{className:l,"data-testid":a,children:[t!=null&&o.jsxs("label",{htmlFor:h,className:_e.label,children:[t,n&&o.jsx("span",{className:_e.required,children:"*"}),e!=null&&o.jsx("span",{className:_e.tooltipIcon,title:e,"aria-label":e,children:o.jsx(Lt,{"aria-hidden":!0})})]}),d?o.jsx("textarea",{...L,...W,rows:p??3}):o.jsx("input",{...L,...W,type:$}),i==null?null:o.jsx("div",{id:x,className:_e.error,role:"alert",children:i})]})},we={checkbox:"_checkbox_l6y66_1",input:"_input_l6y66_12",box:"_box_l6y66_26",checkboxDisabled:"_checkboxDisabled_l6y66_39",checkboxInvalid:"_checkboxInvalid_l6y66_63",checkboxReadOnly:"_checkboxReadOnly_l6y66_83"},It=({checked:t,value:e,onChange:n,inputId:r,disabled:d=!1,invalid:p=!1,className:i="",name:u,readOnly:a,required:y,tabIndex:_,"aria-label":$,"aria-labelledby":L,"data-testid":c,...h})=>{const l=s.useId(),v=r??`checkbox-${l.replace(/[^a-zA-Z0-9_-]/g,"")}`,w=x=>{d||a||n==null||n({originalEvent:x,checked:x.currentTarget.checked,...e!=null?{value:e}:{},stopPropagation:()=>x.stopPropagation(),preventDefault:()=>x.preventDefault()})},N=[we.checkbox,p?we.checkboxInvalid:"",d?we.checkboxDisabled:"",a?we.checkboxReadOnly:"",i].filter(Boolean).join(" "),M=d;return o.jsxs("div",{className:N,"data-testid":c,children:[o.jsx("input",{...h,type:"checkbox",id:v,...t!==void 0?{checked:t}:{},...e!=null?{value:String(e)}:{},onChange:w,disabled:M,readOnly:a,onClick:x=>{a&&x.preventDefault()},onKeyDown:x=>{a&&x.key===" "&&x.preventDefault()},required:y,name:u,tabIndex:_,"aria-label":$,"aria-labelledby":L,"aria-invalid":p?!0:void 0,className:we.input,"data-testid":c?`${c}-input`:void 0}),o.jsx("span",{className:we.box,"aria-hidden":"true"})]})},ne={root:"_root_1uwna_1",label:"_label_1uwna_7",inputWrap:"_inputWrap_1uwna_15",inputWrapDisabled:"_inputWrapDisabled_1uwna_28",inputWrapInvalid:"_inputWrapInvalid_1uwna_34",input:"_input_1uwna_15",dropdownButton:"_dropdownButton_1uwna_55",panel:"_panel_1uwna_71",option:"_option_1uwna_88",optionHighlighted:"_optionHighlighted_1uwna_94",error:"_error_1uwna_98"},Ft=300,Ue=(t,e)=>{if(e){const r=t[e];return r!=null?String(r):""}const n=Object.values(t).find(r=>typeof r=="string");return n!=null?String(n):""},Xe=({value:t,suggestions:e,completeMethod:n,field:r,onChange:d,onSelect:p,dropdown:i=!1,disabled:u=!1,placeholder:a,label:y,error:_,className:$="",inputId:L,"data-testid":c})=>{const[h,l]=s.useState(!1),[v,w]=s.useState(-1),N=s.useRef(null),M=s.useRef(null),x=s.useRef(),O=s.useId(),W=L??`autocomplete-${O.replace(/[^a-zA-Z0-9_-]/g,"")}`,X=`${W}-list`,S=_==null?void 0:`${W}-error`,B=h&&e.length>0;s.useEffect(()=>{w(b=>e.length===0?-1:b<0?b:b>=e.length?e.length-1:b)},[e]);const K=s.useMemo(()=>e.map(b=>Ue(b,r)),[e,r]),Z=s.useCallback(b=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{n({query:b})},Ft)},[n]);s.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),s.useEffect(()=>{if(!h)return;const b=m=>{N.current&&!N.current.contains(m.target)&&(l(!1),w(-1))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]);const j=b=>{const m=b.target.value;d({value:m,originalEvent:b}),Z(m),l(!0),w(-1)},C=(b,m)=>{x.current&&(clearTimeout(x.current),x.current=void 0);const V=Ue(b,r);d({value:V,originalEvent:m}),p==null||p({value:b,originalEvent:m}),l(!1),w(-1)},k=b=>{if(b.key==="ArrowDown"){b.preventDefault(),l(!0),w(m=>m<e.length-1?m+1:m);return}if(b.key==="ArrowUp"){if(b.preventDefault(),!h)return;w(m=>m>0?m-1:0);return}if(b.key==="Enter"&&h&&v>=0&&e[v]){b.preventDefault(),C(e[v],b);return}b.key==="Escape"&&(l(!1),w(-1))},H=[ne.root,$].filter(Boolean).join(" "),D=[ne.inputWrap,u?ne.inputWrapDisabled:"",_?ne.inputWrapInvalid:""].filter(Boolean).join(" ");return o.jsxs("div",{className:H,ref:N,"data-testid":c,children:[y!=null&&o.jsx("label",{htmlFor:W,className:ne.label,children:y}),o.jsxs("div",{className:D,children:[o.jsx("input",{ref:M,id:W,type:"text",className:ne.input,value:t,onChange:j,onKeyDown:k,onFocus:()=>{u||l(!0)},onBlur:b=>{var m;(m=N.current)!=null&&m.contains(b.relatedTarget)||(l(!1),w(-1))},disabled:u,placeholder:a,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-controls":B?X:void 0,"aria-activedescendant":B&&v>=0?`${W}-option-${v}`:void 0,"aria-autocomplete":"list","aria-invalid":_?!0:void 0,"aria-describedby":S,"data-testid":c?`${c}-input`:void 0}),i&&o.jsx("button",{type:"button",className:ne.dropdownButton,disabled:u,onClick:()=>{var b;u||(l(m=>{const V=!m;return V&&Z(t),V}),(b=M.current)==null||b.focus())},"aria-label":"Show suggestions","data-testid":c?`${c}-dropdown`:void 0,children:o.jsx(Ae,{"aria-hidden":!0})})]}),B&&o.jsx("ul",{id:X,className:ne.panel,role:"listbox","data-testid":c?`${c}-panel`:void 0,children:e.map((b,m)=>{const V=K[m],G=`${W}-option-${m}`;return o.jsx("li",{id:G,role:"option","aria-selected":m===v,className:[ne.option,m===v?ne.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:oe=>{oe.preventDefault(),C(b,oe)},"data-testid":c?`${c}-option-${m}`:void 0,children:V},G)})}),_!=null&&o.jsx("div",{id:S,className:ne.error,role:"alert",children:_})]})};Xe.displayName="AutoComplete";const re={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},Ie=t=>null;Ie.displayName="AccordionTab";const Ot=(t,e)=>t==null?[]:Array.isArray(t)?e?t:t.slice(0,1):[t],jt=t=>t.replace(/[^a-zA-Z0-9_-]/g,""),Ye=({activeIndex:t,multiple:e=!1,expandIcon:n,collapseIcon:r,onTabChange:d,onTabOpen:p,onTabClose:i,className:u="",transitionOptions:a,pt:y,ptOptions:_,unstyled:$,children:L,...c})=>{const h=s.useId(),l=jt(h),v=s.useMemo(()=>s.Children.toArray(L).filter(C=>s.isValidElement(C)&&C.type===Ie),[L]),w=t!==void 0,N=s.useMemo(()=>Ot(t,e),[t,e]),[M,x]=s.useState([]),O=w?N:M,W=typeof a=="object"&&a!=null&&typeof a.timeout=="number"?a.timeout:void 0,X=o.jsx(Dt,{"aria-hidden":!0}),S=o.jsx(Ae,{"aria-hidden":!0}),B=n??X,K=r??S,Z=(j,C)=>{const k=O.includes(j);if(e){const b=k?O.filter(m=>m!==j):[...O,j];w||x(b),d==null||d({index:b,originalEvent:C}),k?i==null||i({index:j,originalEvent:C}):p==null||p({index:j,originalEvent:C});return}const H=O.length?O[0]:null,D=k?[]:[j];if(w||x(D),d==null||d({index:D,originalEvent:C}),k){i==null||i({index:j,originalEvent:C});return}H!=null&&(i==null||i({index:H,originalEvent:C})),p==null||p({index:j,originalEvent:C})};return o.jsx("div",{className:[re.accordion,u].filter(Boolean).join(" "),...c,children:v.map((j,C)=>{var J;const k=j.props,H=O.includes(C),D=!!k.disabled,b=`${l}-header-${C}`,m=`${l}-content-${C}`,V=k.headerTemplate!=null?typeof k.headerTemplate=="function"?k.headerTemplate({index:C,selected:H,disabled:D,count:v.length,first:C===0,last:C===v.length-1}):k.headerTemplate:k.header,G=H?K:B,oe=[re.headerButton,k.headerClassName??""].filter(Boolean).join(" "),ae=[re.tab,k.className??"",C===v.length-1?re.noBorderLast:""].filter(Boolean).join(" "),U=typeof V=="string"?V:void 0;return o.jsxs("div",{className:ae,style:k.style,children:[o.jsxs("button",{id:b,type:"button",disabled:D,className:oe,style:k.headerStyle,"aria-controls":m,"aria-expanded":H,"aria-disabled":D,tabIndex:k.tabIndex,onClick:Y=>Z(C,Y),...k.headerProps,"aria-label":((J=k.headerProps)==null?void 0:J["aria-label"])??U,children:[o.jsx("span",{className:re.headerContent,children:V}),o.jsx("span",{className:re.icon,"aria-hidden":!0,children:G})]}),o.jsx("div",{id:m,role:"region","aria-labelledby":b,"aria-hidden":!H,className:[re.panel,H?re.panelOpen:re.panelCollapsed].join(" "),style:{transitionDuration:W?`${W}ms`:void 0},children:o.jsx("div",{className:[re.panelContent,k.contentClassName??""].filter(Boolean).join(" "),style:k.contentStyle,children:k.children})})]},C)})})};Ye.displayName="Accordion";const me={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},Qe=(t,e)=>{const r=t[e];return r!=null?String(r):""},Fe=(t,e)=>t[e],Je=(t,e)=>e==null?!1:!!t[e],Tt=({value:t,onChange:e,options:n,optionLabel:r="label",optionValue:d="value",optionDisabled:p,multiple:i=!1,itemTemplate:u,disabled:a=!1,invalid:y=!1,className:_="","data-testid":$})=>{const L=l=>{const v=Fe(l,d);return i&&Array.isArray(t)?t.includes(v):t===v},c=(l,v)=>{if(a||Je(l,p))return;const w=Fe(l,d);if(w===void 0)return;let N;if(i){const M=Array.isArray(t)?t:[];N=M.includes(w)?M.filter(O=>O!==w):[...M,w]}else N=t===w?null:w;e==null||e({value:N,originalEvent:v})},h=[me.selectButton,a?me.selectButtonDisabled:"",y?me.selectButtonInvalid:"",_].filter(Boolean).join(" ");return o.jsx("div",{className:h,role:"group","aria-disabled":a,"data-testid":$,children:n.map((l,v)=>{const w=Fe(l,d),N=w!=null?String(w):`option-${v}`,M=Je(l,p),x=L(l);return o.jsx("button",{type:"button","aria-pressed":x,"aria-disabled":M||a,"aria-label":Qe(l,r),disabled:a||M,className:[me.button,x?me.buttonSelected:"",v===0?me.buttonFirst:"",v===n.length-1?me.buttonLast:""].filter(Boolean).join(" "),onClick:O=>c(l,O),onKeyDown:O=>{(O.key===" "||O.key==="Enter")&&(O.preventDefault(),c(l,O))},"data-testid":$?`${$}-option-${v}`:void 0,children:u?u(l):Qe(l,r)},N)})})},$e={radioButton:"_radioButton_l80ql_1",radioButtonDisabled:"_radioButtonDisabled_l80ql_10",label:"_label_l80ql_14",input:"_input_l80ql_18"},qt=({inputId:t,name:e,value:n,checked:r,onChange:d,disabled:p=!1,label:i,className:u="","data-testid":a,...y})=>{const _=s.useId(),$=t??`radiobutton-${_.replace(/[^a-zA-Z0-9_-]/g,"")}`,L=h=>{d==null||d({value:n,originalEvent:h})},c=[$e.radioButton,p?$e.radioButtonDisabled:"",u].filter(Boolean).join(" ");return o.jsxs("div",{className:c,"data-testid":a,children:[o.jsx("input",{...y,type:"radio",id:$,name:e,value:String(n),...r!==void 0?{checked:r}:{},disabled:p,onChange:L,className:$e.input,"data-testid":a?`${a}-input`:void 0}),i!=null&&o.jsx("label",{htmlFor:$,className:$e.label,children:i})]})},Ee={anchorWrap:"_anchorWrap_h9mnj_1",panel:"_panel_h9mnj_7",panelInteractive:"_panelInteractive_h9mnj_23",panelPassThrough:"_panelPassThrough_h9mnj_27"},Ce=8,Le=8;function Be(...t){return e=>{t.forEach(n=>n==null?void 0:n(e))}}function Mt(t){if(t==="top"||t==="bottom"||t==="left"||t==="right"||t==="mouse")return t}function Wt(t){const{anchorRect:e,tooltipRect:n,placement:r,pointer:d,mouseTrack:p,mouseTrackTop:i,mouseTrackLeft:u}=t;if(r==="mouse"||p)return{top:d.y+i,left:d.x+u};let a=0,y=0;switch(r){case"top":a=e.top-n.height-Ce,y=e.left+e.width/2-n.width/2;break;case"bottom":a=e.bottom+Ce,y=e.left+e.width/2-n.width/2;break;case"left":a=e.top+e.height/2-n.height/2,y=e.left-n.width-Ce;break;case"right":a=e.top+e.height/2-n.height/2,y=e.right+Ce;break;default:a=e.top-n.height-Ce,y=e.left+e.width/2-n.width/2}const _=window.innerWidth,$=window.innerHeight;return y=Math.min(Math.max(y,Le),_-n.width-Le),a=Math.min(Math.max(a,Le),$-n.height-Le),{top:a,left:y}}function Oe(t,e){const n=t.getAttribute("data-pr-tooltip");return n!=null&&n!==""?n:e??""}function zt(t){return t==null?!0:typeof t=="string"||typeof t=="number"?String(t)==="":!1}const Vt=({children:t,className:e,eventMode:n,onAnchorMouseEnter:r,onAnchorMouseMove:d,onAnchorMouseLeave:p,onAnchorFocusIn:i,onAnchorFocusOut:u})=>{const a=s.Children.toArray(t);if(a.length!==1||!s.isValidElement(a[0])){const h=[Ee.anchorWrap,e].filter(Boolean).join(" "),l=n==="hover"||n==="both"?{onMouseEnter:r,onMouseMove:d,onMouseLeave:p}:{},v=n==="focus"||n==="both"?{onFocusCapture:i,onBlurCapture:u}:{};return o.jsx("span",{className:h,...l,...v,children:t})}const _=a[0],$=n==="hover"||n==="both"?{onMouseEnter:Be(r,_.props.onMouseEnter),onMouseMove:Be(d,_.props.onMouseMove),onMouseLeave:Be(p,_.props.onMouseLeave)}:{},L=n==="focus"||n==="both"?{onFocusCapture:Be(i,_.props.onFocusCapture),onBlurCapture:Be(u,_.props.onBlurCapture)}:{},c=[e,_.props.className].filter(Boolean).join(" ");return s.cloneElement(_,{...$,...L,...c?{className:c}:{},ref:_.props.ref})},Ht=({target:t,content:e,position:n="top",event:r="hover",showDelay:d=0,hideDelay:p=0,autoHide:i=!0,mouseTrack:u=!1,mouseTrackTop:a=0,mouseTrackLeft:y=0,disabled:_=!1,className:$="",panelClassName:L="",id:c,children:h,"data-testid":l})=>{const v=s.useId().replace(/:/g,""),w=c??`emporix-tooltip-${v}`,[N,M]=s.useState(!1),[x,O]=s.useState({top:0,left:0}),[W,X]=s.useState(null),S=s.useRef(null),B=s.useRef(null),K=s.useRef({x:0,y:0}),Z=s.useRef(),j=s.useRef(),C=s.useCallback(()=>{Z.current!=null&&(clearTimeout(Z.current),Z.current=void 0)},[]),k=s.useCallback(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),H=s.useCallback(()=>{const g=S.current;if(g){const A=Mt(g.getAttribute("data-pr-position"));if(A)return A}return n},[n]),D=s.useCallback(()=>{const g=S.current,A=B.current;if(!g||!A)return;const R=g.getBoundingClientRect(),be=A.getBoundingClientRect(),de=H();O(Wt({anchorRect:R,tooltipRect:be,placement:de,pointer:K.current,mouseTrack:u,mouseTrackTop:a,mouseTrackLeft:y}))},[H,u,a,y]),b=s.useCallback(()=>{C(),k();const g=S.current;g instanceof HTMLElement&&g.removeAttribute("aria-describedby"),M(!1),S.current=null},[k,C]),m=s.useCallback((g,A)=>{_||zt(A)||(k(),C(),S.current=g,X(A),Z.current=setTimeout(()=>{M(!0),g instanceof HTMLElement&&g.setAttribute("aria-describedby",w)},d))},[k,C,_,d,w]),V=s.useCallback(()=>{C(),k(),j.current=setTimeout(()=>{b()},p)},[k,C,b,p]),G=s.useCallback(g=>{!i&&B.current&&g instanceof Node&&B.current.contains(g)||V()},[i,V]);s.useLayoutEffect(()=>{N&&D()},[N,W,D]),s.useEffect(()=>{if(!N)return;const g=()=>D();window.addEventListener("scroll",g,!0),window.addEventListener("resize",g);const A=R=>{K.current={x:R.clientX,y:R.clientY},(u||H()==="mouse")&&D()};return(u||H()==="mouse")&&window.addEventListener("mousemove",A),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),window.removeEventListener("mousemove",A)}},[N,u,H,D]),s.useEffect(()=>{if(!N)return;const g=A=>{A.key==="Escape"&&b()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[N,b]),s.useEffect(()=>{if(N)if(t){const g=S.current;g&&X(Oe(g,e))}else X(e??null)},[e,N,t]),s.useEffect(()=>{if(!t)return;let g=[];try{g=Array.from(document.querySelectorAll(t))}catch{return}const A=I=>{const ee=I.currentTarget;K.current={x:I.clientX,y:I.clientY},m(ee,Oe(ee,e))},R=I=>{K.current={x:I.clientX,y:I.clientY}},be=I=>{G(I.relatedTarget)},de=I=>{const ee=I.currentTarget;m(ee,Oe(ee,e))},ye=I=>{G(I.relatedTarget)};return g.forEach(I=>{(r==="hover"||r==="both")&&(I.addEventListener("mouseenter",A),I.addEventListener("mousemove",R),I.addEventListener("mouseleave",be)),(r==="focus"||r==="both")&&(I.addEventListener("focusin",de),I.addEventListener("focusout",ye))}),()=>{g.forEach(I=>{(r==="hover"||r==="both")&&(I.removeEventListener("mouseenter",A),I.removeEventListener("mousemove",R),I.removeEventListener("mouseleave",be)),(r==="focus"||r==="both")&&(I.removeEventListener("focusin",de),I.removeEventListener("focusout",ye))})}},[t,e,r,m,G]);const oe=s.useCallback(g=>{const A=g.currentTarget;K.current={x:g.clientX,y:g.clientY},S.current=A,m(A,e)},[e,m]),ae=s.useCallback(g=>{K.current={x:g.clientX,y:g.clientY}},[]),U=s.useCallback(g=>{G(g.relatedTarget)},[G]),J=s.useCallback(g=>{const A=g.currentTarget;S.current=A,m(A,e)},[e,m]),Y=s.useCallback(g=>{G(g.relatedTarget)},[G]),ve=[Ee.panel,i?Ee.panelPassThrough:Ee.panelInteractive,L].filter(Boolean).join(" "),ke=typeof document<"u"&&N&&W!=null?dt.createPortal(o.jsx("div",{ref:B,id:w,role:"tooltip",className:ve,style:{top:x.top,left:x.left},onMouseEnter:i?void 0:()=>{k()},onMouseLeave:i?void 0:()=>{V()},"data-testid":l?`${l}-panel`:void 0,children:W}),document.body):null;return t?o.jsx(o.Fragment,{children:ke}):o.jsxs(o.Fragment,{children:[h!=null?o.jsx(Vt,{className:$,eventMode:r,onAnchorMouseEnter:oe,onAnchorMouseMove:ae,onAnchorMouseLeave:U,onAnchorFocusIn:J,onAnchorFocusOut:Y,children:h}):null,ke]})},Kt={dialog:"_dialog_8bk4d_1"},Re=({visible:t,onHide:e,header:n,footer:r,children:d,className:p="",style:i,modal:u=!0,dismissableMask:a,closable:y=!0,draggable:_=!1,"data-testid":$})=>{const L=[Kt.dialog,p].filter(Boolean).join(" ");return o.jsx(pt.Dialog,{visible:t,onHide:e,header:n,footer:r,modal:u,dismissableMask:a??u,closable:y,draggable:_,style:i,className:L,"data-testid":$,children:d})};Re.displayName="Dialog";function et(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(t)}function je(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(t)}function tt(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(t)}const ue={root:"_root_6kjk2_1",header:"_header_6kjk2_5",iconWrap:"_iconWrap_6kjk2_12",title:"_title_6kjk2_18",message:"_message_6kjk2_22",iconSuccess:"_iconSuccess_6kjk2_27",iconError:"_iconError_6kjk2_32",iconWarn:"_iconWarn_6kjk2_37",iconInfo:"_iconInfo_6kjk2_42"},De=t=>{const{title:e,message:n,type:r}=t,d=p=>{switch(p){case"success":return o.jsx(tt,{className:ue.iconSuccess,size:16});case"error":return o.jsx(je,{className:ue.iconError,size:16});case"warn":return o.jsx(je,{className:ue.iconWarn,size:16});default:return o.jsx(et,{className:ue.iconInfo,size:16})}};return o.jsxs("div",{className:ue.root,children:[o.jsxs("div",{className:ue.header,children:[o.jsx("div",{className:ue.iconWrap,children:d(r)}),o.jsx("span",{className:ue.title,children:e})]}),n&&o.jsx("div",{className:ue.message,children:n})]})},Zt={toast:"_toast_538wi_1"},nt={list:"_list_1nsqq_1"},ot=s.createContext({showSuccess:()=>{},showError:()=>{},showToast:()=>{}}),Gt=()=>s.useContext(ot),Ut=t=>{const e=s.useRef(null),n=s.useCallback((p,i,u)=>{var a;(a=e.current)==null||a.show({severity:"success",content:o.jsx(De,{title:p,message:i,type:"success"}),life:u||(typeof i=="string"&&i.length>50?i.length*80:4e3)})},[e]),r=s.useCallback((p,i,u)=>{var L;const a=c=>{if(!c)return{detail:"",textForLife:""};if(typeof c=="string")return{detail:c,textForLife:c};if(typeof c=="object"&&!Array.isArray(c))return{detail:c,textForLife:""};if(Array.isArray(c))if(c.some(l=>typeof l!="string")){const l=c;return c.length<=1?{detail:l[0].message,textForLife:l[0].message}:{detail:o.jsx("ul",{className:nt.list,children:l.map((w,N)=>o.jsx("li",{children:w.message},N))}),textForLife:c.join(" • ")}}else{const l=c;return c.length<=1?{detail:l[0],textForLife:l[0]}:{detail:o.jsx("ul",{className:nt.list,children:l.map((w,N)=>o.jsx("li",{children:w},N))}),textForLife:c.join(" • ")}}const h=String(c);return{detail:h,textForLife:h}},{detail:y,textForLife:_}=a(i),$=3e3+_.length*50;(L=e.current)==null||L.show({severity:"error",content:o.jsx(De,{title:p,message:y,type:"error"}),life:u||$})},[e]),d=s.useCallback((p,i,u)=>{var a;(a=e.current)==null||a.show({severity:u,content:o.jsx(De,{title:p,message:i,type:u})})},[e]);return o.jsxs(ot.Provider,{value:{showSuccess:n,showError:r,showToast:d},children:[o.jsx(ft.Toast,{ref:e,position:"top-center",className:Zt.toast}),t.children]})},Xt={menu:"_menu_4pmis_1"},Yt={},rt=t=>t.filter(e=>e.visible!==!1).map(e=>({label:e.label,icon:e.icon,disabled:e.disabled,separator:e.separator,command:e.command?n=>{var r;return(r=e.command)==null?void 0:r.call(e,{originalEvent:n.originalEvent,item:e})}:void 0,items:e.items?rt(e.items):void 0})),st=s.forwardRef(({model:t,popup:e=!1,id:n,className:r="","data-testid":d},p)=>{const i=s.useRef(null),u=s.useRef(null);s.useImperativeHandle(p,()=>({toggle:y=>{var _;u.current=y,(_=i.current)==null||_.toggle(y)},show:y=>{var _;u.current=y,(_=i.current)==null||_.show(y)},hide:()=>{!i.current||!u.current||i.current.hide(u.current)}}));const a=[Yt.menu,Xt.menu,r].filter(Boolean).join(" ");return o.jsx(ht.Menu,{ref:i,id:n,model:rt(t),popup:e,className:a,"data-testid":d})});st.displayName="Menu";const se={root:"_root_lv2tm_1",iconWrap:"_iconWrap_lv2tm_13",icon:"_icon_lv2tm_13",content:"_content_lv2tm_25",info:"_info_lv2tm_30",success:"_success_lv2tm_38",warn:"_warn_lv2tm_46",error:"_error_lv2tm_54"},Qt={info:se.info,success:se.success,warn:se.warn,error:se.error},Jt=({severity:t})=>{switch(t){case"success":return o.jsx(tt,{className:se.icon,"aria-hidden":!0});case"warn":case"error":return o.jsx(je,{className:se.icon,"aria-hidden":!0});default:return o.jsx(et,{className:se.icon,"aria-hidden":!0})}},Rt=({severity:t="info",text:e,children:n,icon:r,className:d="","data-testid":p})=>{const i=n??e,u=t==="warn"||t==="error"?"alert":"status",a=[se.root,Qt[t],d].filter(Boolean).join(" ");return o.jsxs("div",{className:a,role:u,"data-testid":p,"data-severity":t,children:[o.jsx("span",{className:se.iconWrap,children:r??o.jsx(Jt,{severity:t})}),i!=null&&i!==""&&o.jsx("span",{className:se.content,children:i})]})},Te={dataTable:"_dataTable_i1x6x_1",noHeader:"_noHeader_i1x6x_136",clickableRows:"_clickableRows_i1x6x_140"},at={root:"_root_g4y44_1",table:"_table_g4y44_5"},lt={currentPage:1,rows:10,first:0,sortOrder:null,sortField:void 0,rowsPerPageOptions:[10,25,50,100]},it=(t=lt)=>{const[e,n]=s.useState(t),[r,d]=s.useState(0),p=c=>{const{first:h,page:l,rows:v}=c;n(w=>({...w,currentPage:(l??0)+1,first:h,rows:v}))},i=c=>Object.fromEntries(Object.entries(c).map(([h,l])=>{const v=l;return v.value!==null&&typeof v.value=="string"&&v.value===""?[h,{...l,value:null}]:[h,l]})),u=c=>{var l;const h=c;return(l=h.constraints)!=null&&l.length?h.constraints.some(v=>v.value!==void 0&&v.value!==null&&v.value!==""):h.value!==void 0&&h.value!==null&&h.value!==""},a=c=>Object.keys(c).some(h=>u(c[h]));return{onSortCallback:c=>{if(!c.sortField){n(h=>({...h,sortOrder:null,sortField:void 0}));return}n(h=>c.sortField===h.sortField?h.sortOrder===null||h.sortOrder===0?{...h,sortOrder:1}:h.sortOrder===1?{...h,sortOrder:-1}:{...h,sortOrder:null,sortField:void 0}:{...h,sortField:c.sortField,sortOrder:1})},resetPagination:()=>{n(t)},paginationParams:e,setPaginationParams:n,totalCount:r,setTotalCount:d,onPageCallback:p,onFilterCallback:c=>{const h=i(c.filters??{});n(l=>({...l,first:0,currentPage:1,filters:a(h)?h:void 0}))},setFilters:c=>{const h={};c.filter(l=>l.filter).forEach(l=>{const v=l.filterField||l.field||l.columnKey;v&&typeof v=="string"&&(h[v]={value:null,matchMode:l.filterMatchMode||vt.FilterMatchMode.CONTAINS})}),n(l=>({...l,filters:h}))}}},en="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",tn="{first} - {last} of {totalRecords}",nn=t=>{const{value:e,dataKey:n,columns:r,children:d,className:p="",style:i,"data-testid":u,tableRef:a,showHeaders:y=!0,showFilter:_=!0,loading:$=!1,emptyTemplate:L,pagination:c,paginator:h=!0,lazy:l=!1,totalRecords:v,sortField:w,sortOrder:N,globalFilterFields:M,onPage:x,onSort:O,onFilter:W,currentPageReportTemplate:X=tn,selection:S,selectionMode:B,onSelectionChange:K,isRowSelectable:Z,onRowClick:j,rowClassName:C,rowActions:k,editMode:H,editingRows:D,onRowEditComplete:b,expandedRows:m,onRowToggle:V,rowExpansionTemplate:G,header:oe,footer:ae}=t,U=it(),J=!c,Y=c??U.paginationParams,ve=v??Y.totalRecords??U.totalCount;s.useEffect(()=>{J&&U.setTotalCount(e.length)},[J,e.length]);const ke=s.useMemo(()=>{const z=r?[...r]:[];return k&&z.push({columnKey:"rowActions",headerStyle:{width:"180px"},body:k}),z},[r,k]),[g,A]=s.useState(!1),R=s.useMemo(()=>l?(ve??0)===0:e.length===0||g,[g,l,ve,e.length]),be=z=>{j&&(j(z.data,z.index),z.originalEvent.stopPropagation())},de=z=>{K&&!z.originalEvent.isPropagationStopped()&&(K(z.value),z.originalEvent.stopPropagation())},ye=z=>{V==null||V(z.data)},I=[at.table,Te.dataTable,y?"":Te.noHeader,j||B?Te.clickableRows:""].filter(Boolean).join(" "),ee=!R&&!(Z&&e.length>0&&e.every(z=>!Z({data:z})))?S:void 0,qe=typeof L=="function"?L():L,ge={style:i,"data-testid":u,className:I,ref:a,dataKey:n,value:e.length>0?e:void 0,size:"small",onValueChange:z=>{A(z.length===0)},responsiveLayout:"scroll",onRowEditComplete:b,rowClassName:C,editMode:H,editingRows:D,rows:Y.rows,filterDisplay:_?"row":void 0,filters:Y.filters,globalFilterFields:M??Y.globalFilterFields,paginator:h&&!R,paginatorTemplate:Y.paginatorTemplate??en,first:Y.first,totalRecords:ve,rowsPerPageOptions:Y.rowsPerPageOptions,sortField:w??Y.sortField,sortOrder:N??Y.sortOrder??void 0,onPage:J?x??U.onPageCallback:x,onSort:J?O??U.onSortCallback:O,onFilter:J?W??U.onFilterCallback:W,currentPageReportTemplate:X,stripedRows:!0,isDataSelectable:Z,emptyMessage:qe,loading:$,removableSort:!0,onSelectionChange:de,selection:ee,onRowClick:be,lazy:l,expandedRows:m??void 0,rowExpansionTemplate:G,onRowToggle:ye,footer:ae,header:oe,...B!=null?{selectionMode:B}:{}};return o.jsx("div",{className:[at.root,p].filter(Boolean).join(" "),children:o.jsxs(_t.DataTable,{...ge,children:[B&&o.jsx(ze.Column,{selectionMode:B,headerStyle:{width:"78px"}}),ke.map(z=>o.jsx(ze.Column,{...z},String(z.columnKey??z.field))),d]})})};P.Accordion=Ye,P.AccordionTab=Ie,P.AutoComplete=Xe,P.Checkbox=It,P.DEFAULT_DATA_TABLE_PAGINATION=lt,P.DataTable=nn,P.Dialog=Re,P.Dropdown=St,P.InputText=At,P.Menu=st,P.Message=Rt,P.PrimaryButton=Nt,P.RadioButton=qt,P.SecondaryButton=xt,P.SelectButton=Tt,P.Tabs=Pt,P.ToastProvider=Ut,P.ToastTemplate=De,P.Tooltip=Ht,P.useDataTablePagination=it,P.useToast=Gt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(P,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("primereact/dialog"),require("primereact/toast"),require("primereact/menu"),require("primereact/datatable"),require("primereact/column"),require("primereact/api")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","primereact/dialog","primereact/toast","primereact/menu","primereact/datatable","primereact/column","primereact/api"],o):(P=typeof globalThis<"u"?globalThis:P||self,o(P.EmporixComponentLibrary={},P.React,P.React,P.ReactDOM,P.dialog$1,P.toast$1,P.menu$1,P.datatable,P.column,P.api))})(this,(function(P,o,s,ft,ht,_t,vt,bt,He,yt){"use strict";const Ie={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var Ke={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ze=s.createContext&&s.createContext(Ke),mt=["attr","size","title"];function gt(t,e){if(t==null)return{};var n,r,d=wt(t,e);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(t);for(r=0;r<p.length;r++)n=p[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(d[n]=t[n])}return d}function wt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xe.apply(null,arguments)}function Ge(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(t,d).enumerable})),n.push.apply(n,r)}return n}function Pe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ge(Object(n),!0).forEach(function(r){kt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function kt(t,e,n){return(e=Ct(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(t){var e=Bt(t,"string");return typeof e=="symbol"?e:e+""}function Bt(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ue(t){return t&&t.map((e,n)=>s.createElement(e.tag,Pe({key:n},e.attr),Ue(e.child)))}function le(t){return e=>s.createElement(Nt,xe({attr:Pe({},t.attr)},e),Ue(t.child))}function Nt(t){var e=n=>{var{attr:r,size:d,title:p}=t,i=gt(t,mt),u=d||n.size||"1em",a;return n.className&&(a=n.className),t.className&&(a=(a?a+" ":"")+t.className),s.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:a,style:Pe(Pe({color:t.color||n.color},n.style),t.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),p&&s.createElement("title",null,p),t.children)};return Ze!==void 0?s.createElement(Ze.Consumer,null,n=>e(n)):e(Ke)}function xt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(t)}const Pt=({children:t,disabled:e=!1,loading:n=!1,onClick:r,className:d="","data-testid":p,...i})=>{const u=[Ie.primaryButton,e?Ie.primaryButtonDisabled:"",d].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:u,disabled:e||n,onClick:r,"data-testid":p,...i,children:[n&&o.jsx(xt,{className:Ie.spinner,size:12}),t]})},Xe={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},$t=({children:t,disabled:e=!1,onClick:n,className:r="","data-testid":d,...p})=>{const i=[Xe.secondaryButton,e?Xe.secondaryButtonDisabled:"",r].filter(Boolean).join(" ");return o.jsx("button",{type:"button",className:i,disabled:e,onClick:n,"data-testid":d,...p,children:t})},ie={tabsContainer:"_tabsContainer_m3c4e_1",tabsHeader:"_tabsHeader_m3c4e_7",tabItem:"_tabItem_m3c4e_13",tabContent:"_tabContent_m3c4e_29",tabLabel:"_tabLabel_m3c4e_51",tabLine:"_tabLine_m3c4e_61",active:"_active_m3c4e_68",inactive:"_inactive_m3c4e_76",tabPanels:"_tabPanels_m3c4e_84"},Et=({tabs:t,activeTabId:e,onTabChange:n,className:r="","data-testid":d,...p})=>{var u;const i=[ie.tabsContainer,r].filter(Boolean).join(" ");return o.jsxs("div",{className:i,"data-testid":d,...p,children:[o.jsx("div",{className:ie.tabsHeader,children:t.map(a=>{const y=a.id===e,_=[ie.tabItem,y?ie.active:ie.inactive].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",className:_,onClick:()=>n(a.id),"data-testid":`${d}-tab-${a.id}`,children:[o.jsx("div",{className:ie.tabContent,children:o.jsx("span",{className:ie.tabLabel,children:a.label})}),o.jsx("div",{className:ie.tabLine})]},a.id)})}),o.jsx("div",{className:ie.tabPanels,children:(u=t.find(a=>a.id===e))==null?void 0:u.content})]})};function Lt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}function Dt(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(t)}function St(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(t)}function At(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function Fe(t){return le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}const E={dropdown:"_dropdown_1t7tq_1",label:"_label_1t7tq_8",required:"_required_1t7tq_17",control:"_control_1t7tq_22",controlDisabled:"_controlDisabled_1t7tq_46",controlInput:"_controlInput_1t7tq_55",value:"_value_1t7tq_73",placeholder:"_placeholder_1t7tq_82",chipDisplay:"_chipDisplay_1t7tq_88",chipEmpty:"_chipEmpty_1t7tq_96",chipValue:"_chipValue_1t7tq_101",chipItem:"_chipItem_1t7tq_110",chipLabel:"_chipLabel_1t7tq_124",chipRemove:"_chipRemove_1t7tq_130",chipOverflow:"_chipOverflow_1t7tq_145",chevron:"_chevron_1t7tq_150",open:"_open_1t7tq_157",panel:"_panel_1t7tq_181",panelClosing:"_panelClosing_1t7tq_198",filterWrapper:"_filterWrapper_1t7tq_202",filterInput:"_filterInput_1t7tq_209",filterIcon:"_filterIcon_1t7tq_228",list:"_list_1t7tq_239",option:"_option_1t7tq_248",checkboxContainer:"_checkboxContainer_1t7tq_263",checkbox:"_checkbox_1t7tq_263",optionLabel:"_optionLabel_1t7tq_280",optionSelected:"_optionSelected_1t7tq_285",optionDisabled:"_optionDisabled_1t7tq_289",empty:"_empty_1t7tq_298",disabled:"_disabled_1t7tq_305",error:"_error_1t7tq_309"},ce=(t,e)=>{const r=t[e];return r!=null?String(r):""},fe=(t,e)=>t[e],he=(t,e)=>e==null?!1:!!t[e],It=({value:t,onChange:e,multiple:n=!1,display:r="comma",maxSelectedLabels:d,selectedItemsLabel:p="{0} items selected",removeIcon:i,onEditEnd:u,options:a,optionLabel:y="label",optionValue:_="value",optionDisabled:$,placeholder:L="Select",filter:c=!1,editable:h=!1,disabled:l=!1,required:v=!1,label:w,error:N,inputId:M,className:x="",panelClassName:O="",valueTemplate:W,itemTemplate:X,"data-testid":S})=>{const B=h&&!n,K=s.useMemo(()=>n&&Array.isArray(t)?t:[],[n,t]),Z=s.useMemo(()=>new Set(K.map(f=>String(f))),[K]),j=a.find(f=>!n&&fe(f,_)===t),C=s.useMemo(()=>n?a.filter(f=>Z.has(String(fe(f,_)))):[],[n,a,_,Z]),k=j?ce(j,y):"",H=C.map(f=>ce(f,y)).filter(Boolean).join(", "),[D,b]=s.useState(!1),[m,V]=s.useState(!1),[G,oe]=s.useState(""),[ae,U]=s.useState(k),J=s.useRef(null),Y=s.useRef(null),ve=s.useRef(null),ke=s.useRef(null),g=s.useRef(!1),A=s.useMemo(()=>c&&!B?a.filter(f=>ce(f,y).toLowerCase().includes(G.toLowerCase())):a,[c,B,a,y,G]);s.useEffect(()=>{B&&U(k)},[B,t,k]),s.useEffect(()=>{D&&c&&!B&&(oe(""),setTimeout(()=>{var f;return(f=ve.current)==null?void 0:f.focus()},0))},[D,c,B]);const R=()=>{g.current=!0,V(!0)},be=f=>{var F;(g.current||(F=f.animationName)!=null&&F.includes("menuOut"))&&(g.current=!1,b(!1),V(!1),B&&U(k))};s.useEffect(()=>{if(!D&&!m)return;const f=F=>{J.current&&!J.current.contains(F.target)&&(B&&U(k),R())};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[D,m,B,k]);const de=()=>{l||b(f=>!f)},ye=(f,F)=>{if(he(f,$))return;const q=fe(f,_);if(B&&U(ce(f,y)),n){const T=q??null;if(T==null)return;const Q=Z.has(String(T))?K.filter(pe=>pe!==T):[...K,T];e==null||e({value:Q,originalEvent:F});return}e==null||e({value:q??null,originalEvent:F}),R()},I=f=>{if(!D){if(f.key==="Enter"&&B&&ae.trim()){f.preventDefault();const F=ae.trim(),q=F.toLowerCase(),T=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===q||pe.startsWith(q)}),te=T&&!he(T,$)?fe(T,_):null;T&&!he(T,$)&&(U(ce(T,y)),e==null||e({value:te,originalEvent:f})),u==null||u({value:F,selectedValue:te,originalEvent:f});return}(f.key==="Enter"||f.key===" "||f.key==="ArrowDown")&&(f.preventDefault(),b(!0));return}if(f.key==="Escape"){f.preventDefault(),R();return}if(f.key==="Enter"){if(f.preventDefault(),B){const F=ae.trim();if(F){const q=F.toLowerCase(),T=a.find(Q=>{const pe=ce(Q,y).toLowerCase();return pe===q||pe.startsWith(q)}),te=T&&!he(T,$)?fe(T,_):null;T&&!he(T,$)&&ye(T,f),u==null||u({value:F,selectedValue:te,originalEvent:f})}else u==null||u({value:"",selectedValue:null,originalEvent:f})}else if(A.length>0){const F=A.find(q=>!he(q,$));F&&!he(F,$)&&ye(F,f)}}},ee=n&&r==="chip",We=(f,F)=>{if(F.stopPropagation(),l)return;const q=fe(f,_);if(q==null)return;const T=K.filter(te=>String(te)!==String(q));e==null||e({value:T,originalEvent:F})},ge=s.useMemo(()=>d==null?null:Math.max(0,d),[d]),z=s.useMemo(()=>!ee||ge==null?C:C.slice(0,ge),[ee,ge,C]),Se=ee&&ge!=null?Math.max(0,C.length-ge):0,Ae=[E.dropdown,l?E.disabled:"",D?E.open:"",x].filter(Boolean).join(" "),sn=[E.control,l?E.controlDisabled:"",ee?E.chipDisplay:"",ee&&C.length===0?E.chipEmpty:""].filter(Boolean).join(" "),an=[E.panel,m?E.panelClosing:"",O].filter(Boolean).join(" "),ln=s.useId(),Ne=M??`dropdown-${ln.replace(/[^a-zA-Z0-9_-]/g,"")}`,ze=`${Ne}-panel`,Ve=N==null?void 0:`${Ne}-error`,dt=N==null?{}:{"aria-invalid":"true"},pt=Ve==null?{}:{"aria-describedby":Ve};return o.jsxs("div",{className:Ae,ref:J,"data-testid":S,children:[w!=null&&o.jsxs("label",{htmlFor:Ne,className:E.label,children:[w,v&&o.jsx("span",{className:E.required,children:"*"})]}),o.jsxs("div",{id:B?void 0:Ne,role:"combobox","aria-expanded":D||m,"aria-haspopup":"listbox","aria-controls":D||m?ze:void 0,"aria-disabled":l,"aria-label":typeof w=="string"?w:void 0,...B?{}:dt,...B?{}:pt,tabIndex:B||l?-1:0,className:sn,onClick:B?void 0:de,onKeyDown:B?void 0:I,"data-testid":S&&!B?`${S}-control`:void 0,children:[B?o.jsx("input",{ref:ke,id:Ne,type:"text",className:E.controlInput,value:ae,onChange:f=>{U(f.target.value),!D&&!m&&b(!0)},onFocus:()=>{!l&&!D&&!m&&b(!0)},onKeyDown:I,placeholder:L,disabled:l,"aria-autocomplete":"list","aria-controls":D||m?ze:void 0,"aria-expanded":D||m,...dt,...pt,"data-testid":S?`${S}-control`:void 0}):ee?o.jsx("span",{className:E.chipValue,children:C.length===0?o.jsx("span",{className:E.placeholder,children:L}):o.jsxs(o.Fragment,{children:[z.map((f,F)=>{const q=ce(f,y),T=fe(f,_),te=T!=null?String(T):`chip-${F}`;return o.jsxs("span",{className:E.chipItem,children:[o.jsx("span",{className:E.chipLabel,children:X?X(f):q}),!l&&o.jsx("button",{type:"button",className:E.chipRemove,onClick:Q=>We(f,Q),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&Q.stopPropagation()},"aria-label":`Remove ${q}`,"data-testid":S?`${S}-chip-remove-${F}`:void 0,children:i??o.jsx(Lt,{"aria-hidden":!0})})]},te)}),Se>0&&o.jsx("span",{className:E.chipOverflow,children:p.replace("{0}",String(C.length))})]})}):o.jsx("span",{className:E.value,children:W&&!n?W(j??null):(n?H:k)||o.jsx("span",{className:E.placeholder,children:L})}),o.jsx(Fe,{className:E.chevron,"aria-hidden":!0,onClick:B?de:void 0})]}),(D||m)&&o.jsxs("div",{ref:Y,id:ze,className:an,role:"presentation",onAnimationEnd:be,"data-testid":S?`${S}-panel`:void 0,children:[c&&!B&&o.jsxs("div",{className:E.filterWrapper,children:[o.jsx("input",{ref:ve,type:"text",className:E.filterInput,value:G,onChange:f=>{oe(f.target.value)},onKeyDown:f=>{f.key==="Escape"&&b(!1),f.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":S?`${S}-filter`:void 0}),o.jsx(Dt,{className:E.filterIcon,"aria-hidden":!0})]}),o.jsx("ul",{className:E.list,role:"listbox","aria-label":"Options",children:A.length===0?o.jsx("li",{className:E.empty,children:"No results"}):A.map((f,F)=>{const q=fe(f,_),T=ce(f,y),te=he(f,$),Q=n?Z.has(String(q)):t===q,pe=q!=null?String(q):`option-${F}`;return o.jsxs("li",{role:"option","aria-selected":Q,"aria-disabled":te,className:[E.option,Q?E.optionSelected:"",te?E.optionDisabled:""].filter(Boolean).join(" "),onClick:cn=>ye(f,cn),"data-testid":S?`${S}-option-${F}`:void 0,children:[n&&o.jsx("span",{className:E.checkboxContainer,"aria-hidden":!0,children:o.jsx("input",{type:"checkbox",checked:Q,readOnly:!0,tabIndex:-1,className:E.checkbox})}),o.jsx("span",{className:E.optionLabel,children:X?X(f):T})]},pe)})})]}),N==null?null:o.jsx("div",{id:Ve,className:E.error,role:"alert",children:N})]})},_e={inputText:"_inputText_2dnll_1",label:"_label_2dnll_9",required:"_required_2dnll_20",tooltipIcon:"_tooltipIcon_2dnll_25",input:"_input_2dnll_1",inputTextarea:"_inputTextarea_2dnll_72",error:"_error_2dnll_79",inputTextDisabled:"_inputTextDisabled_2dnll_88"},Ft=({label:t,tooltip:e,required:n=!1,inputId:r,textarea:d=!1,rows:p,error:i,className:u="","data-testid":a,disabled:y=!1,..._})=>{const{type:$="text",...L}=_,c=s.useId(),h=r??`input-text-${c.replace(/[^a-zA-Z0-9_-]/g,"")}`,l=[_e.inputText,y?_e.inputTextDisabled:"",u].filter(Boolean).join(" "),v=L["aria-invalid"];let w;v===void 0?w=void 0:v===!0?w="true":v===!1?w="false":w=v;const N=n?{"aria-required":"true"}:{"aria-required":"false"},M=w===void 0&&i==null?{}:{"aria-invalid":w??"true"},x=i==null?void 0:`${h}-error`,O=[_e.input,d?_e.inputTextarea:""].filter(Boolean).join(" "),W={id:h,className:O,disabled:y,...N,...M,"aria-describedby":x,"data-testid":a?`${a}-input`:void 0};return o.jsxs("div",{className:l,"data-testid":a,children:[t!=null&&o.jsxs("label",{htmlFor:h,className:_e.label,children:[t,n&&o.jsx("span",{className:_e.required,children:"*"}),e!=null&&o.jsx("span",{className:_e.tooltipIcon,title:e,"aria-label":e,children:o.jsx(St,{"aria-hidden":!0})})]}),d?o.jsx("textarea",{...L,...W,rows:p??3}):o.jsx("input",{...L,...W,type:$}),i==null?null:o.jsx("div",{id:x,className:_e.error,role:"alert",children:i})]})},we={checkbox:"_checkbox_l6y66_1",input:"_input_l6y66_12",box:"_box_l6y66_26",checkboxDisabled:"_checkboxDisabled_l6y66_39",checkboxInvalid:"_checkboxInvalid_l6y66_63",checkboxReadOnly:"_checkboxReadOnly_l6y66_83"},Ot=({checked:t,value:e,onChange:n,inputId:r,disabled:d=!1,invalid:p=!1,className:i="",name:u,readOnly:a,required:y,tabIndex:_,"aria-label":$,"aria-labelledby":L,"data-testid":c,...h})=>{const l=s.useId(),v=r??`checkbox-${l.replace(/[^a-zA-Z0-9_-]/g,"")}`,w=x=>{d||a||n==null||n({originalEvent:x,checked:x.currentTarget.checked,...e!=null?{value:e}:{},stopPropagation:()=>x.stopPropagation(),preventDefault:()=>x.preventDefault()})},N=[we.checkbox,p?we.checkboxInvalid:"",d?we.checkboxDisabled:"",a?we.checkboxReadOnly:"",i].filter(Boolean).join(" "),M=d;return o.jsxs("div",{className:N,"data-testid":c,children:[o.jsx("input",{...h,type:"checkbox",id:v,...t!==void 0?{checked:t}:{},...e!=null?{value:String(e)}:{},onChange:w,disabled:M,readOnly:a,onClick:x=>{a&&x.preventDefault()},onKeyDown:x=>{a&&x.key===" "&&x.preventDefault()},required:y,name:u,tabIndex:_,"aria-label":$,"aria-labelledby":L,"aria-invalid":p?!0:void 0,className:we.input,"data-testid":c?`${c}-input`:void 0}),o.jsx("span",{className:we.box,"aria-hidden":"true"})]})},ne={root:"_root_1uwna_1",label:"_label_1uwna_7",inputWrap:"_inputWrap_1uwna_15",inputWrapDisabled:"_inputWrapDisabled_1uwna_28",inputWrapInvalid:"_inputWrapInvalid_1uwna_34",input:"_input_1uwna_15",dropdownButton:"_dropdownButton_1uwna_55",panel:"_panel_1uwna_71",option:"_option_1uwna_88",optionHighlighted:"_optionHighlighted_1uwna_94",error:"_error_1uwna_98"},jt=300,Ye=(t,e)=>{if(e){const r=t[e];return r!=null?String(r):""}const n=Object.values(t).find(r=>typeof r=="string");return n!=null?String(n):""},Qe=({value:t,suggestions:e,completeMethod:n,field:r,onChange:d,onSelect:p,dropdown:i=!1,disabled:u=!1,placeholder:a,label:y,error:_,className:$="",inputId:L,"data-testid":c})=>{const[h,l]=s.useState(!1),[v,w]=s.useState(-1),N=s.useRef(null),M=s.useRef(null),x=s.useRef(),O=s.useId(),W=L??`autocomplete-${O.replace(/[^a-zA-Z0-9_-]/g,"")}`,X=`${W}-list`,S=_==null?void 0:`${W}-error`,B=h&&e.length>0;s.useEffect(()=>{w(b=>e.length===0?-1:b<0?b:b>=e.length?e.length-1:b)},[e]);const K=s.useMemo(()=>e.map(b=>Ye(b,r)),[e,r]),Z=s.useCallback(b=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{n({query:b})},jt)},[n]);s.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),s.useEffect(()=>{if(!h)return;const b=m=>{N.current&&!N.current.contains(m.target)&&(l(!1),w(-1))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]);const j=b=>{const m=b.target.value;d({value:m,originalEvent:b}),Z(m),l(!0),w(-1)},C=(b,m)=>{x.current&&(clearTimeout(x.current),x.current=void 0);const V=Ye(b,r);d({value:V,originalEvent:m}),p==null||p({value:b,originalEvent:m}),l(!1),w(-1)},k=b=>{if(b.key==="ArrowDown"){b.preventDefault(),l(!0),w(m=>m<e.length-1?m+1:m);return}if(b.key==="ArrowUp"){if(b.preventDefault(),!h)return;w(m=>m>0?m-1:0);return}if(b.key==="Enter"&&h&&v>=0&&e[v]){b.preventDefault(),C(e[v],b);return}b.key==="Escape"&&(l(!1),w(-1))},H=[ne.root,$].filter(Boolean).join(" "),D=[ne.inputWrap,u?ne.inputWrapDisabled:"",_?ne.inputWrapInvalid:""].filter(Boolean).join(" ");return o.jsxs("div",{className:H,ref:N,"data-testid":c,children:[y!=null&&o.jsx("label",{htmlFor:W,className:ne.label,children:y}),o.jsxs("div",{className:D,children:[o.jsx("input",{ref:M,id:W,type:"text",className:ne.input,value:t,onChange:j,onKeyDown:k,onFocus:()=>{u||l(!0)},onBlur:b=>{var m;(m=N.current)!=null&&m.contains(b.relatedTarget)||(l(!1),w(-1))},disabled:u,placeholder:a,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-controls":B?X:void 0,"aria-activedescendant":B&&v>=0?`${W}-option-${v}`:void 0,"aria-autocomplete":"list","aria-invalid":_?!0:void 0,"aria-describedby":S,"data-testid":c?`${c}-input`:void 0}),i&&o.jsx("button",{type:"button",className:ne.dropdownButton,disabled:u,onClick:()=>{var b;u||(l(m=>{const V=!m;return V&&Z(t),V}),(b=M.current)==null||b.focus())},"aria-label":"Show suggestions","data-testid":c?`${c}-dropdown`:void 0,children:o.jsx(Fe,{"aria-hidden":!0})})]}),B&&o.jsx("ul",{id:X,className:ne.panel,role:"listbox","data-testid":c?`${c}-panel`:void 0,children:e.map((b,m)=>{const V=K[m],G=`${W}-option-${m}`;return o.jsx("li",{id:G,role:"option","aria-selected":m===v,className:[ne.option,m===v?ne.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:oe=>{oe.preventDefault(),C(b,oe)},"data-testid":c?`${c}-option-${m}`:void 0,children:V},G)})}),_!=null&&o.jsx("div",{id:S,className:ne.error,role:"alert",children:_})]})};Qe.displayName="AutoComplete";const re={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},Oe=t=>null;Oe.displayName="AccordionTab";const Tt=(t,e)=>t==null?[]:Array.isArray(t)?e?t:t.slice(0,1):[t],qt=t=>t.replace(/[^a-zA-Z0-9_-]/g,""),Je=({activeIndex:t,multiple:e=!1,expandIcon:n,collapseIcon:r,onTabChange:d,onTabOpen:p,onTabClose:i,className:u="",transitionOptions:a,pt:y,ptOptions:_,unstyled:$,children:L,...c})=>{const h=s.useId(),l=qt(h),v=s.useMemo(()=>s.Children.toArray(L).filter(C=>s.isValidElement(C)&&C.type===Oe),[L]),w=t!==void 0,N=s.useMemo(()=>Tt(t,e),[t,e]),[M,x]=s.useState([]),O=w?N:M,W=typeof a=="object"&&a!=null&&typeof a.timeout=="number"?a.timeout:void 0,X=o.jsx(At,{"aria-hidden":!0}),S=o.jsx(Fe,{"aria-hidden":!0}),B=n??X,K=r??S,Z=(j,C)=>{const k=O.includes(j);if(e){const b=k?O.filter(m=>m!==j):[...O,j];w||x(b),d==null||d({index:b,originalEvent:C}),k?i==null||i({index:j,originalEvent:C}):p==null||p({index:j,originalEvent:C});return}const H=O.length?O[0]:null,D=k?[]:[j];if(w||x(D),d==null||d({index:D,originalEvent:C}),k){i==null||i({index:j,originalEvent:C});return}H!=null&&(i==null||i({index:H,originalEvent:C})),p==null||p({index:j,originalEvent:C})};return o.jsx("div",{className:[re.accordion,u].filter(Boolean).join(" "),...c,children:v.map((j,C)=>{var J;const k=j.props,H=O.includes(C),D=!!k.disabled,b=`${l}-header-${C}`,m=`${l}-content-${C}`,V=k.headerTemplate!=null?typeof k.headerTemplate=="function"?k.headerTemplate({index:C,selected:H,disabled:D,count:v.length,first:C===0,last:C===v.length-1}):k.headerTemplate:k.header,G=H?K:B,oe=[re.headerButton,k.headerClassName??""].filter(Boolean).join(" "),ae=[re.tab,k.className??"",C===v.length-1?re.noBorderLast:""].filter(Boolean).join(" "),U=typeof V=="string"?V:void 0;return o.jsxs("div",{className:ae,style:k.style,children:[o.jsxs("button",{id:b,type:"button",disabled:D,className:oe,style:k.headerStyle,"aria-controls":m,"aria-expanded":H,"aria-disabled":D,tabIndex:k.tabIndex,onClick:Y=>Z(C,Y),...k.headerProps,"aria-label":((J=k.headerProps)==null?void 0:J["aria-label"])??U,children:[o.jsx("span",{className:re.headerContent,children:V}),o.jsx("span",{className:re.icon,"aria-hidden":!0,children:G})]}),o.jsx("div",{id:m,role:"region","aria-labelledby":b,"aria-hidden":!H,className:[re.panel,H?re.panelOpen:re.panelCollapsed].join(" "),style:{transitionDuration:W?`${W}ms`:void 0},children:o.jsx("div",{className:[re.panelContent,k.contentClassName??""].filter(Boolean).join(" "),style:k.contentStyle,children:k.children})})]},C)})})};Je.displayName="Accordion";const me={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},Re=(t,e)=>{const r=t[e];return r!=null?String(r):""},je=(t,e)=>t[e],et=(t,e)=>e==null?!1:!!t[e],Mt=({value:t,onChange:e,options:n,optionLabel:r="label",optionValue:d="value",optionDisabled:p,multiple:i=!1,itemTemplate:u,disabled:a=!1,invalid:y=!1,className:_="","data-testid":$})=>{const L=l=>{const v=je(l,d);return i&&Array.isArray(t)?t.includes(v):t===v},c=(l,v)=>{if(a||et(l,p))return;const w=je(l,d);if(w===void 0)return;let N;if(i){const M=Array.isArray(t)?t:[];N=M.includes(w)?M.filter(O=>O!==w):[...M,w]}else N=t===w?null:w;e==null||e({value:N,originalEvent:v})},h=[me.selectButton,a?me.selectButtonDisabled:"",y?me.selectButtonInvalid:"",_].filter(Boolean).join(" ");return o.jsx("div",{className:h,role:"group","aria-disabled":a,"data-testid":$,children:n.map((l,v)=>{const w=je(l,d),N=w!=null?String(w):`option-${v}`,M=et(l,p),x=L(l);return o.jsx("button",{type:"button","aria-pressed":x,"aria-disabled":M||a,"aria-label":Re(l,r),disabled:a||M,className:[me.button,x?me.buttonSelected:"",v===0?me.buttonFirst:"",v===n.length-1?me.buttonLast:""].filter(Boolean).join(" "),onClick:O=>c(l,O),onKeyDown:O=>{(O.key===" "||O.key==="Enter")&&(O.preventDefault(),c(l,O))},"data-testid":$?`${$}-option-${v}`:void 0,children:u?u(l):Re(l,r)},N)})})},$e={radioButton:"_radioButton_l80ql_1",radioButtonDisabled:"_radioButtonDisabled_l80ql_10",label:"_label_l80ql_14",input:"_input_l80ql_18"},Wt=({inputId:t,name:e,value:n,checked:r,onChange:d,disabled:p=!1,label:i,className:u="","data-testid":a,...y})=>{const _=s.useId(),$=t??`radiobutton-${_.replace(/[^a-zA-Z0-9_-]/g,"")}`,L=h=>{d==null||d({value:n,originalEvent:h})},c=[$e.radioButton,p?$e.radioButtonDisabled:"",u].filter(Boolean).join(" ");return o.jsxs("div",{className:c,"data-testid":a,children:[o.jsx("input",{...y,type:"radio",id:$,name:e,value:String(n),...r!==void 0?{checked:r}:{},disabled:p,onChange:L,className:$e.input,"data-testid":a?`${a}-input`:void 0}),i!=null&&o.jsx("label",{htmlFor:$,className:$e.label,children:i})]})},Ee={anchorWrap:"_anchorWrap_h9mnj_1",panel:"_panel_h9mnj_7",panelInteractive:"_panelInteractive_h9mnj_23",panelPassThrough:"_panelPassThrough_h9mnj_27"},Ce=8,Le=8;function Be(...t){return e=>{t.forEach(n=>n==null?void 0:n(e))}}function zt(t){if(t==="top"||t==="bottom"||t==="left"||t==="right"||t==="mouse")return t}function Vt(t){const{anchorRect:e,tooltipRect:n,placement:r,pointer:d,mouseTrack:p,mouseTrackTop:i,mouseTrackLeft:u}=t;if(r==="mouse"||p)return{top:d.y+i,left:d.x+u};let a=0,y=0;switch(r){case"top":a=e.top-n.height-Ce,y=e.left+e.width/2-n.width/2;break;case"bottom":a=e.bottom+Ce,y=e.left+e.width/2-n.width/2;break;case"left":a=e.top+e.height/2-n.height/2,y=e.left-n.width-Ce;break;case"right":a=e.top+e.height/2-n.height/2,y=e.right+Ce;break;default:a=e.top-n.height-Ce,y=e.left+e.width/2-n.width/2}const _=window.innerWidth,$=window.innerHeight;return y=Math.min(Math.max(y,Le),_-n.width-Le),a=Math.min(Math.max(a,Le),$-n.height-Le),{top:a,left:y}}function Te(t,e){const n=t.getAttribute("data-pr-tooltip");return n!=null&&n!==""?n:e??""}function Ht(t){return t==null?!0:typeof t=="string"||typeof t=="number"?String(t)==="":!1}const Kt=({children:t,className:e,eventMode:n,onAnchorMouseEnter:r,onAnchorMouseMove:d,onAnchorMouseLeave:p,onAnchorFocusIn:i,onAnchorFocusOut:u})=>{const a=s.Children.toArray(t);if(a.length!==1||!s.isValidElement(a[0])){const h=[Ee.anchorWrap,e].filter(Boolean).join(" "),l=n==="hover"||n==="both"?{onMouseEnter:r,onMouseMove:d,onMouseLeave:p}:{},v=n==="focus"||n==="both"?{onFocusCapture:i,onBlurCapture:u}:{};return o.jsx("span",{className:h,...l,...v,children:t})}const _=a[0],$=n==="hover"||n==="both"?{onMouseEnter:Be(r,_.props.onMouseEnter),onMouseMove:Be(d,_.props.onMouseMove),onMouseLeave:Be(p,_.props.onMouseLeave)}:{},L=n==="focus"||n==="both"?{onFocusCapture:Be(i,_.props.onFocusCapture),onBlurCapture:Be(u,_.props.onBlurCapture)}:{},c=[e,_.props.className].filter(Boolean).join(" ");return s.cloneElement(_,{...$,...L,...c?{className:c}:{},ref:_.props.ref})},Zt=({target:t,content:e,position:n="top",event:r="hover",showDelay:d=0,hideDelay:p=0,autoHide:i=!0,mouseTrack:u=!1,mouseTrackTop:a=0,mouseTrackLeft:y=0,disabled:_=!1,className:$="",panelClassName:L="",id:c,children:h,"data-testid":l})=>{const v=s.useId().replace(/:/g,""),w=c??`emporix-tooltip-${v}`,[N,M]=s.useState(!1),[x,O]=s.useState({top:0,left:0}),[W,X]=s.useState(null),S=s.useRef(null),B=s.useRef(null),K=s.useRef({x:0,y:0}),Z=s.useRef(),j=s.useRef(),C=s.useCallback(()=>{Z.current!=null&&(clearTimeout(Z.current),Z.current=void 0)},[]),k=s.useCallback(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),H=s.useCallback(()=>{const g=S.current;if(g){const A=zt(g.getAttribute("data-pr-position"));if(A)return A}return n},[n]),D=s.useCallback(()=>{const g=S.current,A=B.current;if(!g||!A)return;const R=g.getBoundingClientRect(),be=A.getBoundingClientRect(),de=H();O(Vt({anchorRect:R,tooltipRect:be,placement:de,pointer:K.current,mouseTrack:u,mouseTrackTop:a,mouseTrackLeft:y}))},[H,u,a,y]),b=s.useCallback(()=>{C(),k();const g=S.current;g instanceof HTMLElement&&g.removeAttribute("aria-describedby"),M(!1),S.current=null},[k,C]),m=s.useCallback((g,A)=>{_||Ht(A)||(k(),C(),S.current=g,X(A),Z.current=setTimeout(()=>{M(!0),g instanceof HTMLElement&&g.setAttribute("aria-describedby",w)},d))},[k,C,_,d,w]),V=s.useCallback(()=>{C(),k(),j.current=setTimeout(()=>{b()},p)},[k,C,b,p]),G=s.useCallback(g=>{!i&&B.current&&g instanceof Node&&B.current.contains(g)||V()},[i,V]);s.useLayoutEffect(()=>{N&&D()},[N,W,D]),s.useEffect(()=>{if(!N)return;const g=()=>D();window.addEventListener("scroll",g,!0),window.addEventListener("resize",g);const A=R=>{K.current={x:R.clientX,y:R.clientY},(u||H()==="mouse")&&D()};return(u||H()==="mouse")&&window.addEventListener("mousemove",A),()=>{window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),window.removeEventListener("mousemove",A)}},[N,u,H,D]),s.useEffect(()=>{if(!N)return;const g=A=>{A.key==="Escape"&&b()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[N,b]),s.useEffect(()=>{if(N)if(t){const g=S.current;g&&X(Te(g,e))}else X(e??null)},[e,N,t]),s.useEffect(()=>{if(!t)return;let g=[];try{g=Array.from(document.querySelectorAll(t))}catch{return}const A=I=>{const ee=I.currentTarget;K.current={x:I.clientX,y:I.clientY},m(ee,Te(ee,e))},R=I=>{K.current={x:I.clientX,y:I.clientY}},be=I=>{G(I.relatedTarget)},de=I=>{const ee=I.currentTarget;m(ee,Te(ee,e))},ye=I=>{G(I.relatedTarget)};return g.forEach(I=>{(r==="hover"||r==="both")&&(I.addEventListener("mouseenter",A),I.addEventListener("mousemove",R),I.addEventListener("mouseleave",be)),(r==="focus"||r==="both")&&(I.addEventListener("focusin",de),I.addEventListener("focusout",ye))}),()=>{g.forEach(I=>{(r==="hover"||r==="both")&&(I.removeEventListener("mouseenter",A),I.removeEventListener("mousemove",R),I.removeEventListener("mouseleave",be)),(r==="focus"||r==="both")&&(I.removeEventListener("focusin",de),I.removeEventListener("focusout",ye))})}},[t,e,r,m,G]);const oe=s.useCallback(g=>{const A=g.currentTarget;K.current={x:g.clientX,y:g.clientY},S.current=A,m(A,e)},[e,m]),ae=s.useCallback(g=>{K.current={x:g.clientX,y:g.clientY}},[]),U=s.useCallback(g=>{G(g.relatedTarget)},[G]),J=s.useCallback(g=>{const A=g.currentTarget;S.current=A,m(A,e)},[e,m]),Y=s.useCallback(g=>{G(g.relatedTarget)},[G]),ve=[Ee.panel,i?Ee.panelPassThrough:Ee.panelInteractive,L].filter(Boolean).join(" "),ke=typeof document<"u"&&N&&W!=null?ft.createPortal(o.jsx("div",{ref:B,id:w,role:"tooltip",className:ve,style:{top:x.top,left:x.left},onMouseEnter:i?void 0:()=>{k()},onMouseLeave:i?void 0:()=>{V()},"data-testid":l?`${l}-panel`:void 0,children:W}),document.body):null;return t?o.jsx(o.Fragment,{children:ke}):o.jsxs(o.Fragment,{children:[h!=null?o.jsx(Kt,{className:$,eventMode:r,onAnchorMouseEnter:oe,onAnchorMouseMove:ae,onAnchorMouseLeave:U,onAnchorFocusIn:J,onAnchorFocusOut:Y,children:h}):null,ke]})},Gt={dialog:"_dialog_8bk4d_1"},tt=({visible:t,onHide:e,header:n,footer:r,children:d,className:p="",style:i,modal:u=!0,dismissableMask:a,closable:y=!0,draggable:_=!1,"data-testid":$})=>{const L=[Gt.dialog,p].filter(Boolean).join(" ");return o.jsx(ht.Dialog,{visible:t,onHide:e,header:n,footer:r,modal:u,dismissableMask:a??u,closable:y,draggable:_,style:i,className:L,"data-testid":$,children:d})};tt.displayName="Dialog";function nt(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(t)}function qe(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(t)}function ot(t){return le({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(t)}const ue={root:"_root_6kjk2_1",header:"_header_6kjk2_5",iconWrap:"_iconWrap_6kjk2_12",title:"_title_6kjk2_18",message:"_message_6kjk2_22",iconSuccess:"_iconSuccess_6kjk2_27",iconError:"_iconError_6kjk2_32",iconWarn:"_iconWarn_6kjk2_37",iconInfo:"_iconInfo_6kjk2_42"},De=t=>{const{title:e,message:n,type:r}=t,d=p=>{switch(p){case"success":return o.jsx(ot,{className:ue.iconSuccess,size:16});case"error":return o.jsx(qe,{className:ue.iconError,size:16});case"warn":return o.jsx(qe,{className:ue.iconWarn,size:16});default:return o.jsx(nt,{className:ue.iconInfo,size:16})}};return o.jsxs("div",{className:ue.root,children:[o.jsxs("div",{className:ue.header,children:[o.jsx("div",{className:ue.iconWrap,children:d(r)}),o.jsx("span",{className:ue.title,children:e})]}),n&&o.jsx("div",{className:ue.message,children:n})]})},Ut={toast:"_toast_538wi_1"},rt={list:"_list_1nsqq_1"},st=s.createContext({showSuccess:()=>{},showError:()=>{},showToast:()=>{}}),Xt=()=>s.useContext(st),Yt=t=>{const e=s.useRef(null),n=s.useCallback((p,i,u)=>{var a;(a=e.current)==null||a.show({severity:"success",content:o.jsx(De,{title:p,message:i,type:"success"}),life:u||(typeof i=="string"&&i.length>50?i.length*80:4e3)})},[e]),r=s.useCallback((p,i,u)=>{var L;const a=c=>{if(!c)return{detail:"",textForLife:""};if(typeof c=="string")return{detail:c,textForLife:c};if(typeof c=="object"&&!Array.isArray(c))return{detail:c,textForLife:""};if(Array.isArray(c))if(c.some(l=>typeof l!="string")){const l=c;return c.length<=1?{detail:l[0].message,textForLife:l[0].message}:{detail:o.jsx("ul",{className:rt.list,children:l.map((w,N)=>o.jsx("li",{children:w.message},N))}),textForLife:c.join(" • ")}}else{const l=c;return c.length<=1?{detail:l[0],textForLife:l[0]}:{detail:o.jsx("ul",{className:rt.list,children:l.map((w,N)=>o.jsx("li",{children:w},N))}),textForLife:c.join(" • ")}}const h=String(c);return{detail:h,textForLife:h}},{detail:y,textForLife:_}=a(i),$=3e3+_.length*50;(L=e.current)==null||L.show({severity:"error",content:o.jsx(De,{title:p,message:y,type:"error"}),life:u||$})},[e]),d=s.useCallback((p,i,u)=>{var a;(a=e.current)==null||a.show({severity:u,content:o.jsx(De,{title:p,message:i,type:u})})},[e]);return o.jsxs(st.Provider,{value:{showSuccess:n,showError:r,showToast:d},children:[o.jsx(_t.Toast,{ref:e,position:"top-center",className:Ut.toast}),t.children]})},Qt={menu:"_menu_4pmis_1"},Jt={},at=t=>t.filter(e=>e.visible!==!1).map(e=>({label:e.label,icon:e.icon,disabled:e.disabled,separator:e.separator,command:e.command?n=>{var r;return(r=e.command)==null?void 0:r.call(e,{originalEvent:n.originalEvent,item:e})}:void 0,items:e.items?at(e.items):void 0})),lt=s.forwardRef(({model:t,popup:e=!1,id:n,className:r="","data-testid":d},p)=>{const i=s.useRef(null),u=s.useRef(null);s.useImperativeHandle(p,()=>({toggle:y=>{var _;u.current=y,(_=i.current)==null||_.toggle(y)},show:y=>{var _;u.current=y,(_=i.current)==null||_.show(y)},hide:()=>{!i.current||!u.current||i.current.hide(u.current)}}));const a=[Jt.menu,Qt.menu,r].filter(Boolean).join(" ");return o.jsx(vt.Menu,{ref:i,id:n,model:at(t),popup:e,className:a,"data-testid":d})});lt.displayName="Menu";const se={root:"_root_lv2tm_1",iconWrap:"_iconWrap_lv2tm_13",icon:"_icon_lv2tm_13",content:"_content_lv2tm_25",info:"_info_lv2tm_30",success:"_success_lv2tm_38",warn:"_warn_lv2tm_46",error:"_error_lv2tm_54"},Rt={info:se.info,success:se.success,warn:se.warn,error:se.error},en=({severity:t})=>{switch(t){case"success":return o.jsx(ot,{className:se.icon,"aria-hidden":!0});case"warn":case"error":return o.jsx(qe,{className:se.icon,"aria-hidden":!0});default:return o.jsx(nt,{className:se.icon,"aria-hidden":!0})}},tn=({severity:t="info",text:e,children:n,icon:r,className:d="","data-testid":p})=>{const i=n??e,u=t==="warn"||t==="error"?"alert":"status",a=[se.root,Rt[t],d].filter(Boolean).join(" ");return o.jsxs("div",{className:a,role:u,"data-testid":p,"data-severity":t,children:[o.jsx("span",{className:se.iconWrap,children:r??o.jsx(en,{severity:t})}),i!=null&&i!==""&&o.jsx("span",{className:se.content,children:i})]})},Me={dataTable:"_dataTable_i1x6x_1",noHeader:"_noHeader_i1x6x_136",clickableRows:"_clickableRows_i1x6x_140"},it={root:"_root_g4y44_1",table:"_table_g4y44_5"},ct={currentPage:1,rows:10,first:0,sortOrder:null,sortField:void 0,rowsPerPageOptions:[10,25,50,100]},ut=(t=ct)=>{const[e,n]=s.useState(t),[r,d]=s.useState(0),p=c=>{const{first:h,page:l,rows:v}=c;n(w=>({...w,currentPage:(l??0)+1,first:h,rows:v}))},i=c=>Object.fromEntries(Object.entries(c).map(([h,l])=>{const v=l;return v.value!==null&&typeof v.value=="string"&&v.value===""?[h,{...l,value:null}]:[h,l]})),u=c=>{var l;const h=c;return(l=h.constraints)!=null&&l.length?h.constraints.some(v=>v.value!==void 0&&v.value!==null&&v.value!==""):h.value!==void 0&&h.value!==null&&h.value!==""},a=c=>Object.keys(c).some(h=>u(c[h]));return{onSortCallback:c=>{if(!c.sortField){n(h=>({...h,sortOrder:null,sortField:void 0}));return}n(h=>c.sortField===h.sortField?h.sortOrder===null||h.sortOrder===0?{...h,sortOrder:1}:h.sortOrder===1?{...h,sortOrder:-1}:{...h,sortOrder:null,sortField:void 0}:{...h,sortField:c.sortField,sortOrder:1})},resetPagination:()=>{n(t)},paginationParams:e,setPaginationParams:n,totalCount:r,setTotalCount:d,onPageCallback:p,onFilterCallback:c=>{const h=i(c.filters??{});n(l=>({...l,first:0,currentPage:1,filters:a(h)?h:void 0}))},setFilters:c=>{const h={};c.filter(l=>l.filter).forEach(l=>{const v=l.filterField||l.field||l.columnKey;v&&typeof v=="string"&&(h[v]={value:null,matchMode:l.filterMatchMode||yt.FilterMatchMode.CONTAINS})}),n(l=>({...l,filters:h}))}}},nn="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",on="{first} - {last} of {totalRecords}",rn=t=>{const{value:e,dataKey:n,columns:r,children:d,className:p="",style:i,"data-testid":u,tableRef:a,showHeaders:y=!0,showFilter:_=!0,loading:$=!1,emptyTemplate:L,pagination:c,paginator:h=!0,lazy:l=!1,totalRecords:v,sortField:w,sortOrder:N,globalFilterFields:M,onPage:x,onSort:O,onFilter:W,currentPageReportTemplate:X=on,selection:S,selectionMode:B,onSelectionChange:K,isRowSelectable:Z,onRowClick:j,rowClassName:C,rowActions:k,editMode:H,editingRows:D,onRowEditComplete:b,expandedRows:m,onRowToggle:V,rowExpansionTemplate:G,header:oe,footer:ae}=t,U=ut(),J=!c,Y=c??U.paginationParams,ve=v??Y.totalRecords??U.totalCount;s.useEffect(()=>{J&&U.setTotalCount(e.length)},[J,e.length]);const ke=s.useMemo(()=>{const z=r?[...r]:[];return k&&z.push({columnKey:"rowActions",headerStyle:{width:"180px"},body:k}),z},[r,k]),[g,A]=s.useState(!1),R=s.useMemo(()=>l?(ve??0)===0:e.length===0||g,[g,l,ve,e.length]),be=z=>{j&&(j(z.data,z.index),z.originalEvent.stopPropagation())},de=z=>{var Se,Ae;K&&!(((Ae=(Se=z.originalEvent).isPropagationStopped)==null?void 0:Ae.call(Se))??!1)&&(K(z.value),z.originalEvent.stopPropagation())},ye=z=>{V==null||V(z.data)},I=[it.table,Me.dataTable,y?"":Me.noHeader,j||B?Me.clickableRows:""].filter(Boolean).join(" "),ee=!R&&!(Z&&e.length>0&&e.every(z=>!Z({data:z})))?S:void 0,We=typeof L=="function"?L():L,ge={style:i,"data-testid":u,className:I,ref:a,dataKey:n,value:e.length>0?e:void 0,size:"small",onValueChange:z=>{A(z.length===0)},responsiveLayout:"scroll",onRowEditComplete:b,rowClassName:C,editMode:H,editingRows:D,rows:Y.rows,filterDisplay:_?"row":void 0,filters:Y.filters,globalFilterFields:M??Y.globalFilterFields,paginator:h&&!R,paginatorTemplate:Y.paginatorTemplate??nn,first:Y.first,totalRecords:ve,rowsPerPageOptions:Y.rowsPerPageOptions,sortField:w??Y.sortField,sortOrder:N??Y.sortOrder??void 0,onPage:J?x??U.onPageCallback:x,onSort:J?O??U.onSortCallback:O,onFilter:J?W??U.onFilterCallback:W,currentPageReportTemplate:X,stripedRows:!0,isDataSelectable:Z,emptyMessage:We,loading:$,removableSort:!0,onSelectionChange:de,selection:ee,onRowClick:be,lazy:l,expandedRows:m??void 0,rowExpansionTemplate:G,onRowToggle:ye,footer:ae,header:oe,...B!=null?{selectionMode:B}:{}};return o.jsx("div",{className:[it.root,p].filter(Boolean).join(" "),children:o.jsxs(bt.DataTable,{...ge,children:[B&&o.jsx(He.Column,{selectionMode:B,headerStyle:{width:"78px"}}),ke.map(z=>o.jsx(He.Column,{...z},String(z.columnKey??z.field))),d]})})};P.Accordion=Je,P.AccordionTab=Oe,P.AutoComplete=Qe,P.Checkbox=Ot,P.DEFAULT_DATA_TABLE_PAGINATION=ct,P.DataTable=rn,P.Dialog=tt,P.Dropdown=It,P.InputText=Ft,P.Menu=lt,P.Message=tn,P.PrimaryButton=Pt,P.RadioButton=Wt,P.SecondaryButton=$t,P.SelectButton=Mt,P.Tabs=Et,P.ToastProvider=Yt,P.ToastTemplate=De,P.Tooltip=Zt,P.useDataTablePagination=ut,P.useToast=Xt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emporix/component-library",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
4
4
  "description": "A React component library for Emporix projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -61,8 +61,8 @@
61
61
  "peerDependencies": {
62
62
  "react": "^18.0.0",
63
63
  "react-dom": "^18.0.0",
64
- "primereact": "^10.9.7",
65
- "primeicons": "^7.0.0"
64
+ "primereact": "^8.7.0",
65
+ "primeicons": "^6.0.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@storybook/addon-essentials": "^8.6.18",
@@ -86,11 +86,11 @@
86
86
  "eslint-plugin-react-hooks": "^7.0.1",
87
87
  "husky": "^9.1.7",
88
88
  "jsdom": "^26.1.0",
89
- "primereact": "^10.9.7",
90
- "primeicons": "^7.0.0",
89
+ "primereact": "^8.7.0",
90
+ "primeicons": "^6.0.0",
91
91
  "prettier": "^3.8.1",
92
- "react": "^19.2.4",
93
- "react-dom": "^19.2.4",
92
+ "react": "^18.3.1",
93
+ "react-dom": "^18.3.1",
94
94
  "sass": "^1.98.0",
95
95
  "storybook": "^8.6.18",
96
96
  "typescript": "^5.9.3",