sera-components 1.6.2 → 1.6.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/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var _n = Object.defineProperty;
2
- var Fn = (e, n, t) => n in e ? _n(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var W = (e, n, t) => Fn(e, typeof n != "symbol" ? n + "" : n, t);
4
- import * as Ke from "react";
5
- import In, { createContext as Ot, useContext as Y, useMemo as F, useState as M, useEffect as Se } from "react";
6
- import { Paper as ee, Image as Pn, Text as P, Menu as re, Button as G, Container as En, Alert as ot, Stack as Q, Flex as z, Loader as Ee, NavLink as vt, Checkbox as se, Group as N, Input as q, useCombobox as zt, Combobox as k, Grid as $, InputBase as $n, PasswordInput as Gt, Select as Mn, CloseButton as Dn, Divider as Vn, Tooltip as Ht, Fieldset as bn, Table as qt, rem as ue, Pagination as An, MenuTarget as Tn, MenuDropdown as Nn, MenuItem as kn, TextInput as Ct, Popover as ke, ActionIcon as wt, Tabs as Re } from "@mantine/core";
7
- import { IconCheck as Ln, IconInfoCircle as rt, IconChevronRight as On, IconSearch as it, IconCalendar as $e, IconHelpOctagonFilled as Bt, IconPlus as zn, IconPencil as Gn, IconReload as Hn, IconDatabaseImport as qn, IconDownload as Bn, IconDatabaseOff as Un, IconSelector as Kn, IconCircleX as Yn, IconAdjustmentsHorizontal as Wn, IconKeyboard as Xn } from "@tabler/icons-react";
8
- import { observer as te } from "mobx-react-lite";
9
- import { isNestedProperty as Ut, isObjectProperty as ne, DynamicMultiLingualString as Jn, isDraftRecord as Kt, NestedProperty as B, I18NStore as Qn, validators as xt } from "sera-db";
10
- import { IMaskInput as Zn } from "react-imask";
11
- import K from "dayjs";
12
- import { DatePickerInput as Ye, DateTimePicker as Rt } from "@mantine/dates";
13
- import { debounce as eo } from "throttle-debounce";
14
- var ye = { exports: {} }, de = {};
1
+ var In = Object.defineProperty;
2
+ var Pn = (e, n, t) => n in e ? In(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var Q = (e, n, t) => Pn(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import * as Ye from "react";
5
+ import En, { createContext as rt, useContext as W, useMemo as F, useState as M, useEffect as we } from "react";
6
+ import { Paper as oe, Image as $n, Text as P, Menu as le, Button as B, Container as Mn, Alert as it, Stack as te, Flex as q, Loader as $e, NavLink as wt, Checkbox as ue, Group as L, Input as K, useCombobox as Gt, Combobox as O, Grid as $, InputBase as Dn, PasswordInput as Ht, Select as bn, CloseButton as Vn, Divider as Tn, Tooltip as qt, Fieldset as Nn, Table as Bt, rem as ce, Pagination as An, MenuTarget as kn, MenuDropdown as Ln, MenuItem as On, TextInput as xt, Popover as Le, ActionIcon as Rt, Tabs as ye } from "@mantine/core";
7
+ import { IconCheck as zn, IconInfoCircle as st, IconChevronRight as Gn, IconSearch as lt, IconCalendar as Me, IconHelpOctagonFilled as Ut, IconPlus as Hn, IconPencil as qn, IconReload as Bn, IconDatabaseImport as Un, IconDownload as Kn, IconDatabaseOff as Yn, IconSelector as Wn, IconCircleX as Xn, IconAdjustmentsHorizontal as Jn, IconKeyboard as Qn } from "@tabler/icons-react";
8
+ import { observer as re } from "mobx-react-lite";
9
+ import { isNestedProperty as Kt, isObjectProperty as ie, DynamicMultiLingualString as Zn, isDraftRecord as Yt, NestedProperty as Y, I18NStore as eo, validators as yt } from "sera-db";
10
+ import { IMaskInput as to } from "react-imask";
11
+ import J from "dayjs";
12
+ import { DatePickerInput as We, DateTimePicker as _t } from "@mantine/dates";
13
+ import { debounce as no } from "throttle-debounce";
14
+ var _e = { exports: {} }, fe = {};
15
15
  /**
16
16
  * @license React
17
17
  * react-jsx-runtime.production.js
@@ -21,10 +21,10 @@ var ye = { exports: {} }, de = {};
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
23
  */
24
- var yt;
25
- function to() {
26
- if (yt) return de;
27
- yt = 1;
24
+ var jt;
25
+ function oo() {
26
+ if (jt) return fe;
27
+ jt = 1;
28
28
  var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
29
29
  function t(o, r, i) {
30
30
  var s = null;
@@ -41,9 +41,9 @@ function to() {
41
41
  props: i
42
42
  };
43
43
  }
44
- return de.Fragment = n, de.jsx = t, de.jsxs = t, de;
44
+ return fe.Fragment = n, fe.jsx = t, fe.jsxs = t, fe;
45
45
  }
46
- var ge = {};
46
+ var pe = {};
47
47
  /**
48
48
  * @license React
49
49
  * react-jsx-runtime.development.js
@@ -53,167 +53,167 @@ var ge = {};
53
53
  * This source code is licensed under the MIT license found in the
54
54
  * LICENSE file in the root directory of this source tree.
55
55
  */
56
- var jt;
57
- function no() {
58
- return jt || (jt = 1, process.env.NODE_ENV !== "production" && (function() {
59
- function e(h) {
60
- if (h == null) return null;
61
- if (typeof h == "function")
62
- return h.$$typeof === we ? null : h.displayName || h.name || null;
63
- if (typeof h == "string") return h;
64
- switch (h) {
56
+ var Ft;
57
+ function ro() {
58
+ return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && (function() {
59
+ function e(S) {
60
+ if (S == null) return null;
61
+ if (typeof S == "function")
62
+ return S.$$typeof === xe ? null : S.displayName || S.name || null;
63
+ if (typeof S == "string") return S;
64
+ switch (S) {
65
65
  case C:
66
66
  return "Fragment";
67
67
  case _:
68
68
  return "Profiler";
69
69
  case v:
70
70
  return "StrictMode";
71
- case L:
71
+ case I:
72
72
  return "Suspense";
73
- case ve:
73
+ case V:
74
74
  return "SuspenseList";
75
75
  case Ve:
76
76
  return "Activity";
77
77
  }
78
- if (typeof h == "object")
79
- switch (typeof h.tag == "number" && console.error(
78
+ if (typeof S == "object")
79
+ switch (typeof S.tag == "number" && console.error(
80
80
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
81
- ), h.$$typeof) {
81
+ ), S.$$typeof) {
82
82
  case m:
83
83
  return "Portal";
84
- case w:
85
- return h.displayName || "Context";
86
- case y:
87
- return (h._context.displayName || "Context") + ".Consumer";
88
- case I:
89
- var j = h.render;
90
- return h = h.displayName, h || (h = j.displayName || j.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
91
- case Ce:
92
- return j = h.displayName || null, j !== null ? j : e(h.type) || "Memo";
93
- case ae:
94
- j = h._payload, h = h._init;
84
+ case j:
85
+ return S.displayName || "Context";
86
+ case R:
87
+ return (S._context.displayName || "Context") + ".Consumer";
88
+ case A:
89
+ var y = S.render;
90
+ return S = S.displayName, S || (S = y.displayName || y.name || "", S = S !== "" ? "ForwardRef(" + S + ")" : "ForwardRef"), S;
91
+ case H:
92
+ return y = S.displayName || null, y !== null ? y : e(S.type) || "Memo";
93
+ case ge:
94
+ y = S._payload, S = S._init;
95
95
  try {
96
- return e(h(j));
96
+ return e(S(y));
97
97
  } catch {
98
98
  }
99
99
  }
100
100
  return null;
101
101
  }
102
- function n(h) {
103
- return "" + h;
102
+ function n(S) {
103
+ return "" + S;
104
104
  }
105
- function t(h) {
105
+ function t(S) {
106
106
  try {
107
- n(h);
108
- var j = !1;
107
+ n(S);
108
+ var y = !1;
109
109
  } catch {
110
- j = !0;
110
+ y = !0;
111
111
  }
112
- if (j) {
113
- j = console;
114
- var E = j.error, D = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
112
+ if (y) {
113
+ y = console;
114
+ var E = y.error, D = typeof Symbol == "function" && Symbol.toStringTag && S[Symbol.toStringTag] || S.constructor.name || "Object";
115
115
  return E.call(
116
- j,
116
+ y,
117
117
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
118
118
  D
119
- ), n(h);
119
+ ), n(S);
120
120
  }
121
121
  }
122
- function o(h) {
123
- if (h === C) return "<>";
124
- if (typeof h == "object" && h !== null && h.$$typeof === ae)
122
+ function o(S) {
123
+ if (S === C) return "<>";
124
+ if (typeof S == "object" && S !== null && S.$$typeof === ge)
125
125
  return "<...>";
126
126
  try {
127
- var j = e(h);
128
- return j ? "<" + j + ">" : "<...>";
127
+ var y = e(S);
128
+ return y ? "<" + y + ">" : "<...>";
129
129
  } catch {
130
130
  return "<...>";
131
131
  }
132
132
  }
133
133
  function r() {
134
- var h = be.A;
135
- return h === null ? null : h.getOwner();
134
+ var S = Te.A;
135
+ return S === null ? null : S.getOwner();
136
136
  }
137
137
  function i() {
138
138
  return Error("react-stack-top-frame");
139
139
  }
140
- function s(h) {
141
- if (ct.call(h, "key")) {
142
- var j = Object.getOwnPropertyDescriptor(h, "key").get;
143
- if (j && j.isReactWarning) return !1;
140
+ function s(S) {
141
+ if (pt.call(S, "key")) {
142
+ var y = Object.getOwnPropertyDescriptor(S, "key").get;
143
+ if (y && y.isReactWarning) return !1;
144
144
  }
145
- return h.key !== void 0;
145
+ return S.key !== void 0;
146
146
  }
147
- function a(h, j) {
147
+ function a(S, y) {
148
148
  function E() {
149
- ft || (ft = !0, console.error(
149
+ mt || (mt = !0, console.error(
150
150
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
151
- j
151
+ y
152
152
  ));
153
153
  }
154
- E.isReactWarning = !0, Object.defineProperty(h, "key", {
154
+ E.isReactWarning = !0, Object.defineProperty(S, "key", {
155
155
  get: E,
156
156
  configurable: !0
157
157
  });
158
158
  }
159
159
  function u() {
160
- var h = e(this.type);
161
- return pt[h] || (pt[h] = !0, console.error(
160
+ var S = e(this.type);
161
+ return ht[S] || (ht[S] = !0, console.error(
162
162
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
163
- )), h = this.props.ref, h !== void 0 ? h : null;
163
+ )), S = this.props.ref, S !== void 0 ? S : null;
164
164
  }
165
- function g(h, j, E, D, xe, Te) {
166
- var V = E.ref;
167
- return h = {
165
+ function g(S, y, E, D, Re, Ae) {
166
+ var b = E.ref;
167
+ return S = {
168
168
  $$typeof: p,
169
- type: h,
170
- key: j,
169
+ type: S,
170
+ key: y,
171
171
  props: E,
172
172
  _owner: D
173
- }, (V !== void 0 ? V : null) !== null ? Object.defineProperty(h, "ref", {
173
+ }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(S, "ref", {
174
174
  enumerable: !1,
175
175
  get: u
176
- }) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
176
+ }) : Object.defineProperty(S, "ref", { enumerable: !1, value: null }), S._store = {}, Object.defineProperty(S._store, "validated", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
180
  value: 0
181
- }), Object.defineProperty(h, "_debugInfo", {
181
+ }), Object.defineProperty(S, "_debugInfo", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
185
  value: null
186
- }), Object.defineProperty(h, "_debugStack", {
186
+ }), Object.defineProperty(S, "_debugStack", {
187
187
  configurable: !1,
188
188
  enumerable: !1,
189
189
  writable: !0,
190
- value: xe
191
- }), Object.defineProperty(h, "_debugTask", {
190
+ value: Re
191
+ }), Object.defineProperty(S, "_debugTask", {
192
192
  configurable: !1,
193
193
  enumerable: !1,
194
194
  writable: !0,
195
- value: Te
196
- }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
195
+ value: Ae
196
+ }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
197
197
  }
198
- function c(h, j, E, D, xe, Te) {
199
- var V = j.children;
200
- if (V !== void 0)
198
+ function c(S, y, E, D, Re, Ae) {
199
+ var b = y.children;
200
+ if (b !== void 0)
201
201
  if (D)
202
- if (yn(V)) {
203
- for (D = 0; D < V.length; D++)
204
- S(V[D]);
205
- Object.freeze && Object.freeze(V);
202
+ if (jn(b)) {
203
+ for (D = 0; D < b.length; D++)
204
+ h(b[D]);
205
+ Object.freeze && Object.freeze(b);
206
206
  } else
207
207
  console.error(
208
208
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
209
209
  );
210
- else S(V);
211
- if (ct.call(j, "key")) {
212
- V = e(h);
213
- var oe = Object.keys(j).filter(function(jn) {
214
- return jn !== "key";
210
+ else h(b);
211
+ if (pt.call(y, "key")) {
212
+ b = e(S);
213
+ var se = Object.keys(y).filter(function(Fn) {
214
+ return Fn !== "key";
215
215
  });
216
- D = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", St[V + D] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
216
+ D = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", Ct[b + D] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
217
217
  `A props object containing a "key" prop is being spread into JSX:
218
218
  let props = %s;
219
219
  <%s {...props} />
@@ -221,75 +221,75 @@ React keys must be passed directly to JSX without using spread:
221
221
  let props = %s;
222
222
  <%s key={someKey} {...props} />`,
223
223
  D,
224
- V,
225
- oe,
226
- V
227
- ), St[V + D] = !0);
224
+ b,
225
+ se,
226
+ b
227
+ ), Ct[b + D] = !0);
228
228
  }
229
- if (V = null, E !== void 0 && (t(E), V = "" + E), s(j) && (t(j.key), V = "" + j.key), "key" in j) {
229
+ if (b = null, E !== void 0 && (t(E), b = "" + E), s(y) && (t(y.key), b = "" + y.key), "key" in y) {
230
230
  E = {};
231
- for (var Ne in j)
232
- Ne !== "key" && (E[Ne] = j[Ne]);
233
- } else E = j;
234
- return V && a(
231
+ for (var ke in y)
232
+ ke !== "key" && (E[ke] = y[ke]);
233
+ } else E = y;
234
+ return b && a(
235
235
  E,
236
- typeof h == "function" ? h.displayName || h.name || "Unknown" : h
236
+ typeof S == "function" ? S.displayName || S.name || "Unknown" : S
237
237
  ), g(
238
- h,
239
- V,
238
+ S,
239
+ b,
240
240
  E,
241
241
  r(),
242
- xe,
243
- Te
242
+ Re,
243
+ Ae
244
244
  );
245
245
  }
246
- function S(h) {
247
- f(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === ae && (h._payload.status === "fulfilled" ? f(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
246
+ function h(S) {
247
+ f(S) ? S._store && (S._store.validated = 1) : typeof S == "object" && S !== null && S.$$typeof === ge && (S._payload.status === "fulfilled" ? f(S._payload.value) && S._payload.value._store && (S._payload.value._store.validated = 1) : S._store && (S._store.validated = 1));
248
248
  }
249
- function f(h) {
250
- return typeof h == "object" && h !== null && h.$$typeof === p;
249
+ function f(S) {
250
+ return typeof S == "object" && S !== null && S.$$typeof === p;
251
251
  }
252
- var d = In, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), w = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), ve = Symbol.for("react.suspense_list"), Ce = Symbol.for("react.memo"), ae = Symbol.for("react.lazy"), Ve = Symbol.for("react.activity"), we = Symbol.for("react.client.reference"), be = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ct = Object.prototype.hasOwnProperty, yn = Array.isArray, Ae = console.createTask ? console.createTask : function() {
252
+ var d = En, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), R = Symbol.for("react.consumer"), j = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), ge = Symbol.for("react.lazy"), Ve = Symbol.for("react.activity"), xe = Symbol.for("react.client.reference"), Te = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, pt = Object.prototype.hasOwnProperty, jn = Array.isArray, Ne = console.createTask ? console.createTask : function() {
253
253
  return null;
254
254
  };
255
255
  d = {
256
- react_stack_bottom_frame: function(h) {
257
- return h();
256
+ react_stack_bottom_frame: function(S) {
257
+ return S();
258
258
  }
259
259
  };
260
- var ft, pt = {}, mt = d.react_stack_bottom_frame.bind(
260
+ var mt, ht = {}, St = d.react_stack_bottom_frame.bind(
261
261
  d,
262
262
  i
263
- )(), ht = Ae(o(i)), St = {};
264
- ge.Fragment = C, ge.jsx = function(h, j, E) {
265
- var D = 1e4 > be.recentlyCreatedOwnerStacks++;
263
+ )(), vt = Ne(o(i)), Ct = {};
264
+ pe.Fragment = C, pe.jsx = function(S, y, E) {
265
+ var D = 1e4 > Te.recentlyCreatedOwnerStacks++;
266
266
  return c(
267
- h,
268
- j,
267
+ S,
268
+ y,
269
269
  E,
270
270
  !1,
271
- D ? Error("react-stack-top-frame") : mt,
272
- D ? Ae(o(h)) : ht
271
+ D ? Error("react-stack-top-frame") : St,
272
+ D ? Ne(o(S)) : vt
273
273
  );
274
- }, ge.jsxs = function(h, j, E) {
275
- var D = 1e4 > be.recentlyCreatedOwnerStacks++;
274
+ }, pe.jsxs = function(S, y, E) {
275
+ var D = 1e4 > Te.recentlyCreatedOwnerStacks++;
276
276
  return c(
277
- h,
278
- j,
277
+ S,
278
+ y,
279
279
  E,
280
280
  !0,
281
- D ? Error("react-stack-top-frame") : mt,
282
- D ? Ae(o(h)) : ht
281
+ D ? Error("react-stack-top-frame") : St,
282
+ D ? Ne(o(S)) : vt
283
283
  );
284
284
  };
285
- })()), ge;
285
+ })()), pe;
286
286
  }
287
- var _t;
288
- function oo() {
289
- return _t || (_t = 1, process.env.NODE_ENV === "production" ? ye.exports = to() : ye.exports = no()), ye.exports;
287
+ var It;
288
+ function io() {
289
+ return It || (It = 1, process.env.NODE_ENV === "production" ? _e.exports = oo() : _e.exports = ro()), _e.exports;
290
290
  }
291
- var l = oo();
292
- const b = {
291
+ var l = io();
292
+ const T = {
293
293
  UK: {
294
294
  svgFlag: "https://flagcdn.com/gb.svg",
295
295
  emojiFlag: "🇬🇧"
@@ -354,19 +354,19 @@ const b = {
354
354
  svgFlag: "https://flagcdn.com/kh.svg",
355
355
  emojiFlag: "🇰🇭"
356
356
  }
357
- }, ro = ({ flag: e }) => /* @__PURE__ */ l.jsx(ee, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx(Pn, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), io = ({ flag: e }) => /* @__PURE__ */ l.jsx(
357
+ }, so = ({ flag: e }) => /* @__PURE__ */ l.jsx(oe, { shadow: "xs", w: 20, h: 14, children: /* @__PURE__ */ l.jsx($n, { src: e.svgFlag, w: 20, h: 14, fit: "cover" }) }), lo = ({ flag: e }) => /* @__PURE__ */ l.jsx(
358
358
  P,
359
359
  {
360
360
  component: "span",
361
361
  style: (n) => ({ textShadow: n.shadows.xs }),
362
362
  children: e.emojiFlag
363
363
  }
364
- ), We = navigator.userAgent.includes("Windows") ? ro : io, Z = Ot(new Intl.Locale("en-US")), ai = te(
364
+ ), Xe = navigator.userAgent.includes("Windows") ? so : lo, ne = rt(new Intl.Locale("en-US")), di = re(
365
365
  ({
366
366
  value: e,
367
367
  children: n
368
- }) => /* @__PURE__ */ l.jsx(Z.Provider, { value: e.locale, children: n })
369
- ), so = {
368
+ }) => /* @__PURE__ */ l.jsx(ne.Provider, { value: e.locale, children: n })
369
+ ), ao = {
370
370
  lang2value: {
371
371
  en: "Choose Language",
372
372
  vi: "Chọn ngôn ngữ"
@@ -374,60 +374,60 @@ const b = {
374
374
  }, je = {
375
375
  en: {
376
376
  name: "English",
377
- flag: b.US,
377
+ flag: T.US,
378
378
  locale: new Intl.Locale("en-US")
379
379
  },
380
380
  vi: {
381
381
  name: "Tiếng Việt",
382
- flag: b.VN,
382
+ flag: T.VN,
383
383
  locale: new Intl.Locale("vi-VN")
384
384
  }
385
- }, ui = ({
385
+ }, gi = ({
386
386
  locale: e,
387
387
  setLocale: n
388
388
  }) => {
389
389
  const t = F(() => Object.entries(je).map(
390
390
  ([o, { flag: r, name: i, locale: s }]) => /* @__PURE__ */ l.jsx(
391
- re.Item,
391
+ le.Item,
392
392
  {
393
393
  onClick: () => n(s),
394
- leftSection: /* @__PURE__ */ l.jsx(We, { flag: r }),
395
- rightSection: e.language === o && /* @__PURE__ */ l.jsx(Ln, { size: "15", color: "#2986cc", stroke: 2 }),
394
+ leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: r }),
395
+ rightSection: e.language === o && /* @__PURE__ */ l.jsx(zn, { size: "15", color: "#2986cc", stroke: 2 }),
396
396
  children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: i })
397
397
  },
398
398
  o
399
399
  )
400
400
  ), [je, e]);
401
- return /* @__PURE__ */ l.jsxs(re, { width: 170, children: [
402
- /* @__PURE__ */ l.jsx(re.Target, { children: /* @__PURE__ */ l.jsx(
403
- G,
401
+ return /* @__PURE__ */ l.jsxs(le, { width: 170, children: [
402
+ /* @__PURE__ */ l.jsx(le.Target, { children: /* @__PURE__ */ l.jsx(
403
+ B,
404
404
  {
405
405
  variant: "subtle",
406
406
  size: "sm",
407
- leftSection: /* @__PURE__ */ l.jsx(We, { flag: je[e.language].flag }),
407
+ leftSection: /* @__PURE__ */ l.jsx(Xe, { flag: je[e.language].flag }),
408
408
  children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: je[e.language].name })
409
409
  }
410
410
  ) }),
411
- /* @__PURE__ */ l.jsxs(re.Dropdown, { children: [
412
- /* @__PURE__ */ l.jsx(re.Label, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: so.lang2value[e.language] }) }),
411
+ /* @__PURE__ */ l.jsxs(le.Dropdown, { children: [
412
+ /* @__PURE__ */ l.jsx(le.Label, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: ao.lang2value[e.language] }) }),
413
413
  t
414
414
  ] })
415
415
  ] });
416
- }, A = ({ value: e }) => {
417
- const n = Y(Z);
416
+ }, N = ({ value: e }) => {
417
+ const n = W(ne);
418
418
  return e.lang2value[n.language] || e.lang2value[e.lang];
419
- }, di = (e) => {
420
- const n = Y(Z);
419
+ }, ci = (e) => {
420
+ const n = W(ne);
421
421
  return e.lang2value[n.language] || e.lang2value[e.lang];
422
422
  };
423
- function fe(e, n) {
423
+ function he(e, n) {
424
424
  return n.lang2value[e.language] || n.lang2value[n.lang];
425
425
  }
426
- const gi = ({
426
+ const fi = ({
427
427
  message: e,
428
428
  navigate: n
429
429
  }) => /* @__PURE__ */ l.jsx(
430
- En,
430
+ Mn,
431
431
  {
432
432
  size: "xs",
433
433
  style: {
@@ -437,30 +437,30 @@ const gi = ({
437
437
  justifyContent: "center"
438
438
  },
439
439
  children: /* @__PURE__ */ l.jsx(
440
- ot,
440
+ it,
441
441
  {
442
442
  color: "red",
443
443
  title: "Not Found",
444
444
  variant: "404 - Not Found",
445
- icon: /* @__PURE__ */ l.jsx(rt, { size: 12, stroke: 1.5 }),
446
- children: /* @__PURE__ */ l.jsxs(Q, { align: "flex-start", children: [
445
+ icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
446
+ children: /* @__PURE__ */ l.jsxs(te, { align: "flex-start", children: [
447
447
  e || "Sorry, the page you are looking for does not exist.",
448
- /* @__PURE__ */ l.jsx(G, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
448
+ /* @__PURE__ */ l.jsx(B, { variant: "filled", onClick: () => n("/"), size: "xs", children: "Back Home" })
449
449
  ] })
450
450
  }
451
451
  )
452
452
  }
453
- ), ci = ({ message: e }) => /* @__PURE__ */ l.jsx(
454
- ot,
453
+ ), pi = ({ message: e }) => /* @__PURE__ */ l.jsx(
454
+ it,
455
455
  {
456
456
  color: "red",
457
457
  title: "Not Found",
458
458
  variant: "404 - Not Found",
459
- icon: /* @__PURE__ */ l.jsx(rt, { size: 12, stroke: 1.5 }),
459
+ icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
460
460
  children: e || "Sorry, the page you are looking for does not exist."
461
461
  }
462
- ), Yt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }), fi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(z, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
463
- z,
462
+ ), Wt = ({ message: e }) => /* @__PURE__ */ l.jsx(P, { c: "red", size: "sm", children: e || "Not Found" }), mi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(q, { justify: "center", align: "center", children: /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }) }) : /* @__PURE__ */ l.jsxs(
463
+ q,
464
464
  {
465
465
  gap: "md",
466
466
  direction: "column",
@@ -468,30 +468,30 @@ const gi = ({
468
468
  align: "center",
469
469
  style: { height: "100%" },
470
470
  children: [
471
- /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "md" }),
471
+ /* @__PURE__ */ l.jsx($e, { color: "blue", size: "md" }),
472
472
  e
473
473
  ]
474
474
  }
475
- ), pi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(z, { gap: "md", direction: "column", justify: "center", align: "center", children: [
476
- /* @__PURE__ */ l.jsx(Ee, { color: "blue", size: "xs" }),
475
+ ), hi = ({ tip: e }) => e === void 0 ? /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }) : /* @__PURE__ */ l.jsxs(q, { gap: "md", direction: "column", justify: "center", align: "center", children: [
476
+ /* @__PURE__ */ l.jsx($e, { color: "blue", size: "xs" }),
477
477
  e
478
- ] }), mi = ({ message: e }) => /* @__PURE__ */ l.jsx(
479
- ot,
478
+ ] }), Si = ({ message: e }) => /* @__PURE__ */ l.jsx(
479
+ it,
480
480
  {
481
481
  color: "red",
482
482
  title: "Not Found",
483
483
  variant: "403 - Not Authorized",
484
- icon: /* @__PURE__ */ l.jsx(rt, { size: 12, stroke: 1.5 }),
484
+ icon: /* @__PURE__ */ l.jsx(st, { size: 12, stroke: 1.5 }),
485
485
  children: e || "Sorry, you are not authorized to access this page."
486
486
  }
487
487
  );
488
- function hi(e, n) {
488
+ function vi(e, n) {
489
489
  return e.reduce((t, o) => {
490
490
  const r = n(o);
491
491
  return t[r] || (t[r] = []), t[r].push(o), t;
492
492
  }, {});
493
493
  }
494
- function Si(e, n) {
494
+ function Ci(e, n) {
495
495
  const t = [];
496
496
  let o;
497
497
  return e.reduce((r, i) => {
@@ -499,17 +499,17 @@ function Si(e, n) {
499
499
  return s === void 0 ? (o === void 0 && (o = t.length, t.push([])), t[o].push(i)) : (r[s] === void 0 && (r[s] = t.length, t.push([])), t[r[s]].push(i)), r;
500
500
  }, {}), t;
501
501
  }
502
- function vi(e, n) {
502
+ function wi(e, n) {
503
503
  const t = /* @__PURE__ */ new Set();
504
504
  return e.filter((o) => {
505
505
  const r = n(o);
506
506
  return t.has(r) ? !1 : (t.add(r), !0);
507
507
  });
508
508
  }
509
- class Ci {
509
+ class xi {
510
510
  constructor() {
511
- W(this, "items", []);
512
- W(this, "seen", /* @__PURE__ */ new Set());
511
+ Q(this, "items", []);
512
+ Q(this, "seen", /* @__PURE__ */ new Set());
513
513
  }
514
514
  add(n, t) {
515
515
  const o = t(n);
@@ -519,16 +519,16 @@ class Ci {
519
519
  return this.items;
520
520
  }
521
521
  }
522
- class Ft {
522
+ class Pt {
523
523
  constructor() {
524
- W(this, "children", /* @__PURE__ */ new Map());
525
- W(this, "isEndOfWord", !1);
526
- W(this, "value", "");
524
+ Q(this, "children", /* @__PURE__ */ new Map());
525
+ Q(this, "isEndOfWord", !1);
526
+ Q(this, "value", "");
527
527
  }
528
528
  }
529
- class Wt {
529
+ class Xt {
530
530
  constructor() {
531
- W(this, "root", new Ft());
531
+ Q(this, "root", new Pt());
532
532
  }
533
533
  /**
534
534
  * Inserts a word into the trie structure.
@@ -540,7 +540,7 @@ class Wt {
540
540
  let t = this.root;
541
541
  for (const o of n) {
542
542
  let r = t.children.get(o);
543
- r === void 0 && (r = new Ft(), t.children.set(o, r)), t = r;
543
+ r === void 0 && (r = new Pt(), t.children.set(o, r)), t = r;
544
544
  }
545
545
  t.isEndOfWord = !0, t.value = n;
546
546
  }
@@ -565,14 +565,21 @@ class Wt {
565
565
  return o;
566
566
  }
567
567
  }
568
- function Xt(e, n) {
569
- return Ut(n) ? n.getValue(e) : e[n.tsName];
568
+ function Jt(e, n) {
569
+ return Kt(n) ? n.getValue(e) : e[n.tsName];
570
+ }
571
+ function Et(e, n, t) {
572
+ Kt(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
573
+ }
574
+ const Qt = rt(!1), Ri = Qt.Provider;
575
+ function z(e) {
576
+ return W(Qt) ? { "data-testid": e } : {};
570
577
  }
571
- function It(e, n, t) {
572
- Ut(n) ? n.setValue(e, t) : e[n.updateFuncName](t);
578
+ function yi(e, n) {
579
+ return n ? { "data-testid": e } : {};
573
580
  }
574
- var Xe = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Xe || {});
575
- function lo(e) {
581
+ var Je = /* @__PURE__ */ ((e) => (e[e.Allow = 0] = "Allow", e[e.Denied = 1] = "Denied", e[e.Pending = 2] = "Pending", e))(Je || {});
582
+ function uo(e) {
576
583
  const n = {}, t = {}, o = {}, r = (i, s = []) => {
577
584
  i.forEach((a) => {
578
585
  const u = [...s, a.key];
@@ -581,8 +588,8 @@ function lo(e) {
581
588
  };
582
589
  return r(e), { key2item: n, key2fullpath: t, key2route: o };
583
590
  }
584
- function ao(e) {
585
- const n = new go(), t = (o) => {
591
+ function go(e) {
592
+ const n = new fo(), t = (o) => {
586
593
  o.forEach((r) => {
587
594
  if (r.route !== void 0) {
588
595
  const i = r.route.path.pathDef;
@@ -593,27 +600,27 @@ function ao(e) {
593
600
  };
594
601
  return t(e), n;
595
602
  }
596
- function uo(e, n) {
603
+ function co(e, n) {
597
604
  return e.map((t) => {
598
605
  if (t.route !== void 0)
599
- return n(t.route.role) === Xe.Allow ? t : null;
606
+ return n(t.route.role) === Je.Allow ? t : null;
600
607
  if (t.children !== void 0) {
601
- const o = t.children.filter((r) => r.route !== void 0 ? n(r.route.role) === Xe.Allow : !0);
608
+ const o = t.children.filter((r) => r.route !== void 0 ? n(r.route.role) === Je.Allow : !0);
602
609
  return o.length > 0 ? { ...t, children: o } : null;
603
610
  }
604
611
  return t;
605
612
  }).filter((t) => t !== null);
606
613
  }
607
- const wi = (e) => {
608
- const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = F(() => uo(e.items, e.checkPermission), [e.items, e.checkPermission]), u = F(() => ao(e.items), [e.items]), { key2fullpath: g, key2route: c } = F(
609
- () => lo(a),
614
+ const _i = (e) => {
615
+ const [n, t] = M(/* @__PURE__ */ new Set()), [o, r] = M(/* @__PURE__ */ new Set()), [i, s] = M(), a = F(() => co(e.items, e.checkPermission), [e.items, e.checkPermission]), u = F(() => go(e.items), [e.items]), { key2fullpath: g, key2route: c } = F(
616
+ () => uo(a),
610
617
  [a]
611
618
  );
612
- Se(() => {
619
+ we(() => {
613
620
  const f = window.location.pathname, d = u.findMatchingKey(f);
614
621
  d !== void 0 && (r(new Set(g[d])), s(d));
615
622
  }, [window.location.pathname, c]);
616
- const S = F(() => {
623
+ const h = F(() => {
617
624
  function f(d, p) {
618
625
  var C;
619
626
  const m = d.children !== void 0 && d.children.length > 0;
@@ -634,7 +641,7 @@ const wi = (e) => {
634
641
  },
635
642
  children: [
636
643
  /* @__PURE__ */ l.jsx(
637
- vt,
644
+ wt,
638
645
  {
639
646
  active: i === d.key,
640
647
  label: d.label,
@@ -648,7 +655,7 @@ const wi = (e) => {
648
655
  ml: p === 0 ? void 0 : p === 1 ? "md" : `calc(var(--mantine-spacing-md) * ${p})`,
649
656
  w: "unset",
650
657
  rightSection: m ? /* @__PURE__ */ l.jsx(
651
- On,
658
+ Gn,
652
659
  {
653
660
  size: 12,
654
661
  stroke: 1.5,
@@ -658,8 +665,8 @@ const wi = (e) => {
658
665
  opened: n.has(d.key) || o.has(d.key),
659
666
  onClick: (v) => {
660
667
  v.preventDefault(), r((_) => {
661
- const y = new Set(_);
662
- return _.has(d.key) ? y.delete(d.key) : y.add(d.key), y;
668
+ const R = new Set(_);
669
+ return _.has(d.key) ? R.delete(d.key) : R.add(d.key), R;
663
670
  });
664
671
  }
665
672
  },
@@ -670,7 +677,7 @@ const wi = (e) => {
670
677
  },
671
678
  `container-${d.key}`
672
679
  ) : /* @__PURE__ */ l.jsx(
673
- vt,
680
+ wt,
674
681
  {
675
682
  active: i === d.key,
676
683
  href: (C = d.route) == null ? void 0 : C.path.getURL({ queryArgs: d.route.defaultPathArgs }),
@@ -693,12 +700,12 @@ const wi = (e) => {
693
700
  }
694
701
  return a.map((d) => f(d, 0));
695
702
  }, [a, i, o, n, e.navigate]);
696
- return /* @__PURE__ */ l.jsx(l.Fragment, { children: S });
703
+ return /* @__PURE__ */ l.jsx(l.Fragment, { children: h });
697
704
  };
698
- class go extends Wt {
705
+ class fo extends Xt {
699
706
  constructor() {
700
707
  super(...arguments);
701
- W(this, "pathToKey", /* @__PURE__ */ new Map());
708
+ Q(this, "pathToKey", /* @__PURE__ */ new Map());
702
709
  }
703
710
  /**
704
711
  * Normalizes a URL path by removing trailing slashes
@@ -731,34 +738,34 @@ class go extends Wt {
731
738
  return this.pathToKey.get(r.match);
732
739
  }
733
740
  }
734
- const _e = ({ value: e }) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e });
735
- function he(e, n) {
741
+ const Fe = ({ value: e }) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e });
742
+ function Ce(e, n) {
736
743
  return n.toLocaleDateString(e.baseName, {
737
744
  year: "numeric",
738
745
  month: "short",
739
746
  day: "2-digit"
740
747
  });
741
748
  }
742
- function Jt(e, n, t = !0) {
749
+ function Zt(e, n, t = !0) {
743
750
  const o = n.getHours().toString().padStart(2, "0"), r = n.getMinutes().toString().padStart(2, "0"), i = n.getSeconds().toString().padStart(2, "0");
744
- return t ? he(e, n) + ` ${o}:${r}:${i}` : he(e, n) + ` ${o}:${r}`;
751
+ return t ? Ce(e, n) + ` ${o}:${r}:${i}` : Ce(e, n) + ` ${o}:${r}`;
745
752
  }
746
- const co = ({ value: e }) => {
747
- const n = Y(Z), t = F(
748
- () => Jt(n, e),
753
+ const po = ({ value: e }) => {
754
+ const n = W(ne), t = F(
755
+ () => Zt(n, e),
749
756
  [n, e]
750
757
  );
751
758
  return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
752
- }, fo = ({ value: e }) => {
753
- const n = Y(Z), t = F(() => he(n, e), [n, e]);
759
+ }, mo = ({ value: e }) => {
760
+ const n = W(ne), t = F(() => Ce(n, e), [n, e]);
754
761
  return /* @__PURE__ */ l.jsx(P, { size: "sm", children: t });
755
- }, xi = ({ value: e }) => {
756
- const n = Y(Z), [t, o] = F(() => {
757
- const r = he(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
762
+ }, ji = ({ value: e }) => {
763
+ const n = W(ne), [t, o] = F(() => {
764
+ const r = Ce(n, e), i = e.getHours().toString().padStart(2, "0"), s = e.getMinutes().toString().padStart(2, "0"), a = e.getSeconds().toString().padStart(2, "0");
758
765
  return [r, `${i}:${s}:${a}`];
759
766
  }, [n, e]);
760
767
  return /* @__PURE__ */ l.jsx(P, { size: "sm", title: o, children: t });
761
- }, po = {
768
+ }, ho = {
762
769
  yes: {
763
770
  lang2value: {
764
771
  en: "Yes",
@@ -773,28 +780,28 @@ const co = ({ value: e }) => {
773
780
  },
774
781
  lang: "en"
775
782
  }
776
- }, mo = ({ value: e }) => /* @__PURE__ */ l.jsx(
777
- se,
783
+ }, So = ({ value: e }) => /* @__PURE__ */ l.jsx(
784
+ ue,
778
785
  {
779
786
  checked: e,
780
- label: /* @__PURE__ */ l.jsx(A, { value: po[e ? "yes" : "no"] }),
787
+ label: /* @__PURE__ */ l.jsx(N, { value: ho[e ? "yes" : "no"] }),
781
788
  readOnly: !0
782
789
  }
783
- ), ho = ({ property: e, value: n }) => {
790
+ ), vo = ({ property: e, value: n }) => {
784
791
  const t = e;
785
- if (ne(t) || t.enumType === void 0)
792
+ if (ie(t) || t.enumType === void 0)
786
793
  throw new Error(
787
794
  "Invalid usage of EnumDisplay. Expect a property of type enum"
788
795
  );
789
- return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(A, { value: t.enumType.label[n] }) });
790
- }, st = Ot({ link: () => null, entityRoutes: {} }), Ri = ({
796
+ return /* @__PURE__ */ l.jsx(P, { size: "sm", children: /* @__PURE__ */ l.jsx(N, { value: t.enumType.label[n] }) });
797
+ }, at = rt({ link: () => null, entityRoutes: {} }), Fi = ({
791
798
  link: e,
792
799
  entityRoutes: n,
793
800
  children: t
794
- }) => /* @__PURE__ */ l.jsx(st.Provider, { value: { link: e, entityRoutes: n }, children: t });
795
- function Qt(e, n, t, o) {
801
+ }) => /* @__PURE__ */ l.jsx(at.Provider, { value: { link: e, entityRoutes: n }, children: t });
802
+ function en(e, n, t, o) {
796
803
  const r = e.getByName(n.targetClass), i = o[n.targetClass];
797
- Se(() => {
804
+ we(() => {
798
805
  r.fetchByIds(t);
799
806
  }, [t]);
800
807
  const s = {};
@@ -802,19 +809,19 @@ function Qt(e, n, t, o) {
802
809
  s[a] = r.get(a);
803
810
  return [s, i.view];
804
811
  }
805
- const lt = te(
812
+ const ut = re(
806
813
  ({
807
814
  db: e,
808
815
  property: n,
809
816
  value: t
810
817
  }) => {
811
- const { link: o, entityRoutes: r } = Y(st), i = F(() => [t], [t]), [s, a] = Qt(
818
+ const { link: o, entityRoutes: r } = W(at), i = F(() => [t], [t]), [s, a] = en(
812
819
  e,
813
820
  n,
814
821
  i,
815
822
  r
816
823
  ), u = s[t];
817
- return u === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Yt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
824
+ return u === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }) : u === null ? /* @__PURE__ */ l.jsx(Wt, {}) : a === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: u.name }) : /* @__PURE__ */ l.jsx(
818
825
  o,
819
826
  {
820
827
  path: a,
@@ -825,21 +832,21 @@ const lt = te(
825
832
  }
826
833
  );
827
834
  }
828
- ), at = te(
835
+ ), dt = re(
829
836
  ({
830
837
  db: e,
831
838
  property: n,
832
839
  value: t
833
840
  }) => {
834
- const { link: o, entityRoutes: r } = Y(st), [i, s] = Qt(
841
+ const { link: o, entityRoutes: r } = W(at), [i, s] = en(
835
842
  e,
836
843
  n,
837
844
  t,
838
845
  r
839
846
  );
840
- return /* @__PURE__ */ l.jsx(N, { gap: "xs", children: t.map((a, u) => {
847
+ return /* @__PURE__ */ l.jsx(L, { gap: "xs", children: t.map((a, u) => {
841
848
  const g = i[a];
842
- return g === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }, a) : g === null ? /* @__PURE__ */ l.jsx(Yt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: g.name }, u) : /* @__PURE__ */ l.jsx(
849
+ return g === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: t }, a) : g === null ? /* @__PURE__ */ l.jsx(Wt, {}, a) : s === void 0 ? /* @__PURE__ */ l.jsx(P, { size: "sm", children: g.name }, u) : /* @__PURE__ */ l.jsx(
843
850
  o,
844
851
  {
845
852
  path: s,
@@ -852,249 +859,260 @@ const lt = te(
852
859
  );
853
860
  }) });
854
861
  }
855
- ), le = {
856
- string: _e,
857
- integer: _e,
858
- float: _e,
859
- boolean: mo,
860
- "string[]": _e,
861
- enum: ho,
862
- datetime: co,
863
- date: fo
864
- }, Zt = ({
862
+ ), de = {
863
+ string: Fe,
864
+ integer: Fe,
865
+ float: Fe,
866
+ boolean: So,
867
+ "string[]": Fe,
868
+ enum: vo,
869
+ datetime: po,
870
+ date: mo
871
+ }, tn = ({
865
872
  property: e,
866
873
  value: n,
867
874
  onChange: t,
868
875
  freeze: o = !1
869
- }) => /* @__PURE__ */ l.jsx(
870
- se,
871
- {
872
- id: e.name,
873
- checked: n,
874
- onChange: (r) => {
875
- const i = r.target.checked;
876
- t(i);
877
- },
878
- disabled: o
879
- }
880
- ), Me = ({
876
+ }) => {
877
+ const r = z(e.name);
878
+ return /* @__PURE__ */ l.jsx(
879
+ ue,
880
+ {
881
+ ...r,
882
+ id: e.name,
883
+ checked: n,
884
+ onChange: (i) => {
885
+ const s = i.target.checked;
886
+ t(s);
887
+ },
888
+ disabled: o
889
+ }
890
+ );
891
+ }, De = ({
881
892
  property: e,
882
893
  value: n,
883
894
  onChange: t,
884
895
  freeze: o = !1
885
- }) => /* @__PURE__ */ l.jsx(
886
- q,
887
- {
888
- id: e.name,
889
- type: "number",
890
- value: n,
891
- onChange: (r) => {
892
- const i = r.target.value;
893
- t(i === "" ? void 0 : Number(i));
894
- },
895
- disabled: o
896
- }
897
- ), So = {
896
+ }) => {
897
+ const r = z(e.name);
898
+ return /* @__PURE__ */ l.jsx(
899
+ K,
900
+ {
901
+ ...r,
902
+ id: e.name,
903
+ type: "number",
904
+ value: n,
905
+ onChange: (i) => {
906
+ const s = i.target.value;
907
+ t(s === "" ? void 0 : Number(s));
908
+ },
909
+ disabled: o
910
+ }
911
+ );
912
+ }, Co = {
898
913
  lang2value: {
899
914
  en: "The leading zero is not necessary in international phone number format. For example, if your phone number is 0123456789, you should enter it as 123-456-789.",
900
915
  vi: "Số 0 đầu tiên không cần thiết trong định dạng điện thoại quốc tế. Ví dụ, nếu số điện thoại của bạn là 0123456789, bạn nên nhập nó là 123-456-789."
901
916
  },
902
917
  lang: "en"
903
- }, vo = {
918
+ }, wo = {
904
919
  lang2value: {
905
920
  en: "No valid country code found.",
906
921
  vi: "Không tìm thấy mã quốc gia hợp lệ. "
907
922
  },
908
923
  lang: "en"
909
- }, ie = {
924
+ }, ae = {
910
925
  84: {
911
926
  name: "Vietnam",
912
- flags: [b.VN]
927
+ flags: [T.VN]
913
928
  },
914
929
  1: {
915
930
  name: "US, Canada",
916
- flags: [b.US, b.CA]
931
+ flags: [T.US, T.CA]
917
932
  },
918
933
  61: {
919
934
  name: "Australia",
920
- flags: [b.AU]
935
+ flags: [T.AU]
921
936
  },
922
937
  81: {
923
938
  name: "Japan",
924
- flags: [b.JP]
939
+ flags: [T.JP]
925
940
  },
926
941
  44: {
927
942
  name: "UK",
928
- flags: [b.UK]
943
+ flags: [T.UK]
929
944
  },
930
945
  33: {
931
946
  name: "France",
932
- flags: [b.FR]
947
+ flags: [T.FR]
933
948
  },
934
949
  49: {
935
950
  name: "Germany",
936
- flags: [b.DE]
951
+ flags: [T.DE]
937
952
  },
938
953
  91: {
939
954
  name: "India",
940
- flags: [b.IN]
955
+ flags: [T.IN]
941
956
  },
942
957
  55: {
943
958
  name: "Brazil",
944
- flags: [b.BR]
959
+ flags: [T.BR]
945
960
  },
946
961
  34: {
947
962
  name: "Spain",
948
- flags: [b.ES]
963
+ flags: [T.ES]
949
964
  },
950
965
  39: {
951
966
  name: "Italy",
952
- flags: [b.IT]
967
+ flags: [T.IT]
953
968
  },
954
969
  64: {
955
970
  name: "New Zealand",
956
- flags: [b.NZ]
971
+ flags: [T.NZ]
957
972
  },
958
973
  52: {
959
974
  name: "Mexico",
960
- flags: [b.MX]
975
+ flags: [T.MX]
961
976
  },
962
977
  86: {
963
978
  name: "China",
964
- flags: [b.CN]
979
+ flags: [T.CN]
965
980
  },
966
981
  855: {
967
982
  name: "Cambodia",
968
- flags: [b.CAM]
983
+ flags: [T.CAM]
969
984
  }
970
- }, Co = (e, n) => {
985
+ }, xo = (e, n) => {
971
986
  if (e === "" || e === void 0)
972
987
  return { match: "84", remaining: "" };
973
988
  const t = e.replace(/[^\d]/g, ""), o = n.findLongestPrefix(t);
974
989
  if (o.match === "")
975
990
  throw new Error(`No valid country code found for phone number: ${e}`);
976
991
  return o;
977
- }, Pt = ({ value: e }) => {
978
- const n = ie[e];
992
+ }, $t = ({ value: e }) => {
993
+ const n = ae[e];
979
994
  if (n !== void 0)
980
- return /* @__PURE__ */ l.jsxs(N, { gap: "sm", wrap: "nowrap", align: "center", children: [
995
+ return /* @__PURE__ */ l.jsxs(L, { gap: "sm", wrap: "nowrap", align: "center", children: [
981
996
  /* @__PURE__ */ l.jsxs(P, { size: "sm", children: [
982
997
  "+",
983
998
  e
984
999
  ] }),
985
- /* @__PURE__ */ l.jsx(N, { gap: 4, wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(We, { flag: t }, o)) })
1000
+ /* @__PURE__ */ l.jsx(L, { gap: 4, wrap: "nowrap", children: n.flags.map((t, o) => /* @__PURE__ */ l.jsx(Xe, { flag: t }, o)) })
986
1001
  ] });
987
- }, wo = ({
1002
+ }, Ro = ({
988
1003
  value: e,
989
1004
  onChange: n,
990
1005
  error: t,
991
1006
  id: o,
992
1007
  disabled: r = !1
993
1008
  }) => {
994
- const [i, s] = M(""), [a, u] = M(!1), [g, c] = M(""), [S, f] = M(!1), d = F(() => {
995
- const w = new Wt();
996
- return Object.keys(ie).forEach((I) => {
997
- w.insert(I);
998
- }), w;
999
- }, [ie]), { rawInput: p } = F(() => {
1009
+ const i = z(`${o}_country_code`), s = z(o), [a, u] = M(""), [g, c] = M(!1), [h, f] = M(""), [d, p] = M(!1), m = F(() => {
1010
+ const I = new Xt();
1011
+ return Object.keys(ae).forEach((V) => {
1012
+ I.insert(V);
1013
+ }), I;
1014
+ }, [ae]), { rawInput: C } = F(() => {
1000
1015
  try {
1001
- const { match: w, remaining: I } = Co(
1016
+ const { match: I, remaining: V } = xo(
1002
1017
  e,
1003
- d
1018
+ m
1004
1019
  );
1005
- return c(w), f(!1), {
1006
- rawInput: I
1020
+ return f(I), p(!1), {
1021
+ rawInput: V
1007
1022
  };
1008
1023
  } catch {
1009
- return f(!0), c(""), {
1024
+ return p(!0), f(""), {
1010
1025
  rawInput: e
1011
1026
  };
1012
1027
  }
1013
- }, [e]), m = zt({
1028
+ }, [e]), v = Gt({
1014
1029
  onDropdownClose: () => {
1015
- m.resetSelectedOption(), s("");
1030
+ v.resetSelectedOption(), u("");
1016
1031
  },
1017
1032
  onDropdownOpen: () => {
1018
- m.updateSelectedOptionIndex("active");
1033
+ v.updateSelectedOptionIndex("active");
1019
1034
  }
1020
- }), C = F(() => Object.keys(ie), [ie]), v = (w, I) => {
1021
- if (w === void 0)
1022
- return `+${I}`;
1023
- const L = w.replace(/[^\d]/g, "");
1024
- return L.length === 0 ? `+${I}` : L.startsWith("0") ? (u(!0), `+${I}${L}`) : (u(!1), `+${I}${L}`);
1025
- }, _ = F(() => C.filter((w) => ie[w].name.toLowerCase().includes(i.toLowerCase()) || w.includes(i)), [i, C]), y = F(() => _.map((w, I) => /* @__PURE__ */ l.jsx(k.Option, { value: w, children: /* @__PURE__ */ l.jsx(Pt, { value: w }) }, I)), [_]);
1035
+ }), _ = F(() => Object.keys(ae), [ae]), R = (I, V) => {
1036
+ if (I === void 0)
1037
+ return `+${V}`;
1038
+ const H = I.replace(/[^\d]/g, "");
1039
+ return H.length === 0 ? `+${V}` : H.startsWith("0") ? (c(!0), `+${V}${H}`) : (c(!1), `+${V}${H}`);
1040
+ }, j = F(() => _.filter((I) => ae[I].name.toLowerCase().includes(a.toLowerCase()) || I.includes(a)), [a, _]), A = F(() => j.map((I, V) => /* @__PURE__ */ l.jsx(O.Option, { value: I, children: /* @__PURE__ */ l.jsx($t, { value: I }) }, V)), [j]);
1026
1041
  return /* @__PURE__ */ l.jsxs("div", { children: [
1027
- /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsxs(N, { gap: 5, children: [
1042
+ /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsxs(L, { gap: 5, children: [
1028
1043
  /* @__PURE__ */ l.jsxs(
1029
- k,
1044
+ O,
1030
1045
  {
1031
- store: m,
1046
+ store: v,
1032
1047
  position: "top-start",
1033
- onOptionSubmit: (w) => {
1034
- s(""), m.closeDropdown(), n({
1035
- target: { value: v(p, w) }
1048
+ onOptionSubmit: (I) => {
1049
+ u(""), v.closeDropdown(), n({
1050
+ target: { value: R(C, I) }
1036
1051
  });
1037
1052
  },
1038
1053
  disabled: r,
1039
1054
  children: [
1040
- /* @__PURE__ */ l.jsx(k.Target, { children: /* @__PURE__ */ l.jsx(
1041
- $n,
1055
+ /* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
1056
+ Dn,
1042
1057
  {
1058
+ ...i,
1043
1059
  component: "button",
1044
1060
  type: "button",
1045
1061
  pointer: !0,
1046
- rightSection: /* @__PURE__ */ l.jsx(k.Chevron, {}),
1047
- onClick: () => m.toggleDropdown(),
1062
+ rightSection: /* @__PURE__ */ l.jsx(O.Chevron, {}),
1063
+ onClick: () => v.toggleDropdown(),
1048
1064
  rightSectionPointerEvents: "none",
1049
1065
  w: 110,
1050
1066
  disabled: r,
1051
- children: /* @__PURE__ */ l.jsx(Pt, { value: g })
1067
+ children: /* @__PURE__ */ l.jsx($t, { value: h })
1052
1068
  }
1053
1069
  ) }),
1054
- /* @__PURE__ */ l.jsxs(k.Dropdown, { children: [
1070
+ /* @__PURE__ */ l.jsxs(O.Dropdown, { children: [
1055
1071
  /* @__PURE__ */ l.jsx(
1056
- k.Search,
1072
+ O.Search,
1057
1073
  {
1058
- leftSection: /* @__PURE__ */ l.jsx(it, { size: 14, stroke: 1.5 }),
1074
+ leftSection: /* @__PURE__ */ l.jsx(lt, { size: 14, stroke: 1.5 }),
1059
1075
  placeholder: ".....",
1060
- value: i,
1061
- onChange: (w) => {
1062
- s(w.currentTarget.value);
1076
+ value: a,
1077
+ onChange: (I) => {
1078
+ u(I.currentTarget.value);
1063
1079
  },
1064
1080
  disabled: r
1065
1081
  }
1066
1082
  ),
1067
- /* @__PURE__ */ l.jsx(k.Options, { children: y.length > 0 ? y : /* @__PURE__ */ l.jsx(k.Empty, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: "Nothing found" }) }) })
1083
+ /* @__PURE__ */ l.jsx(O.Options, { children: A.length > 0 ? A : /* @__PURE__ */ l.jsx(O.Empty, { children: /* @__PURE__ */ l.jsx(P, { size: "sm", children: "Nothing found" }) }) })
1068
1084
  ] })
1069
1085
  ]
1070
1086
  }
1071
1087
  ),
1072
- g === "" ? /* @__PURE__ */ l.jsx(
1073
- q,
1088
+ h === "" ? /* @__PURE__ */ l.jsx(
1089
+ K,
1074
1090
  {
1091
+ ...s,
1075
1092
  id: o,
1076
- value: p,
1093
+ value: C,
1077
1094
  type: "phone_number",
1078
- onChange: (w) => {
1079
- n({ target: { value: w.target.value } });
1095
+ onChange: (I) => {
1096
+ n({ target: { value: I.target.value } });
1080
1097
  },
1081
1098
  error: t,
1082
1099
  flex: 1,
1083
1100
  disabled: r
1084
1101
  }
1085
1102
  ) : /* @__PURE__ */ l.jsx(
1086
- q,
1103
+ K,
1087
1104
  {
1105
+ ...s,
1088
1106
  id: o,
1089
- value: p,
1107
+ value: C,
1090
1108
  type: "phone_number",
1091
- onAccept: (w) => {
1092
- const I = w.replace(/[^\d]/g, ""), L = v(I, g);
1093
- L !== e && n({
1094
- target: { value: L }
1109
+ onAccept: (I) => {
1110
+ const V = I.replace(/[^\d]/g, ""), H = R(V, h);
1111
+ H !== e && n({
1112
+ target: { value: H }
1095
1113
  });
1096
1114
  },
1097
- component: Zn,
1115
+ component: to,
1098
1116
  mask: "000-000-0000",
1099
1117
  error: t,
1100
1118
  flex: 1,
@@ -1102,127 +1120,134 @@ const lt = te(
1102
1120
  }
1103
1121
  )
1104
1122
  ] }) }) }),
1105
- (a || S || t && typeof t == "string") && /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsx(q.Error, { children: a ? /* @__PURE__ */ l.jsx(A, { value: So }) : S ? /* @__PURE__ */ l.jsx(A, { value: vo }) : t }) }) })
1123
+ (g || d || t && typeof t == "string") && /* @__PURE__ */ l.jsx($, { gutter: "xs", children: /* @__PURE__ */ l.jsx($.Col, { children: /* @__PURE__ */ l.jsx(K.Error, { children: g ? /* @__PURE__ */ l.jsx(N, { value: Co }) : d ? /* @__PURE__ */ l.jsx(N, { value: wo }) : t }) }) })
1106
1124
  ] });
1107
- }, pe = ({
1125
+ }, Se = ({
1108
1126
  property: e,
1109
1127
  error: n,
1110
1128
  value: t,
1111
1129
  onChange: o,
1112
1130
  freeze: r = !1
1113
1131
  }) => {
1114
- const [i, s] = F(() => e.constraints.includes("password") ? ["password", Gt] : e.constraints.includes("phone_number") ? ["phone_number", wo] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", q], [e.constraints]);
1132
+ const i = z(e.name), [s, a] = F(() => e.constraints.includes("password") ? ["password", Ht] : e.constraints.includes("phone_number") ? ["phone_number", Ro] : [e.constraints.includes("email") ? "email" : e.constraints.includes("url") ? "url" : "text", K], [e.constraints]);
1115
1133
  return /* @__PURE__ */ l.jsx(
1116
- s,
1134
+ a,
1117
1135
  {
1136
+ ...i,
1118
1137
  id: e.name,
1119
1138
  value: t,
1120
- type: i,
1121
- onChange: (a) => o(a.target.value),
1139
+ type: s,
1140
+ onChange: (u) => o(u.target.value),
1122
1141
  error: n,
1123
1142
  disabled: r
1124
1143
  }
1125
1144
  );
1126
- }, xo = ({
1145
+ }, yo = ({
1127
1146
  property: e,
1128
1147
  value: n,
1129
1148
  onChange: t,
1130
1149
  freeze: o = !1
1131
- }) => /* @__PURE__ */ l.jsx(
1132
- Ye,
1133
- {
1134
- id: e.tsName,
1135
- value: n || null,
1136
- onChange: (r) => {
1137
- t(
1138
- r === null ? void 0 : K(r).startOf("day").toDate()
1139
- );
1140
- },
1141
- valueFormat: "YYYY MMM DD",
1142
- placeholder: "Pick date range",
1143
- clearable: !0,
1144
- popoverProps: { withinPortal: !1 },
1145
- flex: 1,
1146
- disabled: o
1147
- }
1148
- ), Ro = ({
1150
+ }) => {
1151
+ const r = z(e.tsName);
1152
+ return /* @__PURE__ */ l.jsx(
1153
+ We,
1154
+ {
1155
+ ...r,
1156
+ id: e.tsName,
1157
+ value: n || null,
1158
+ onChange: (i) => {
1159
+ t(
1160
+ i === null ? void 0 : J(i).startOf("day").toDate()
1161
+ );
1162
+ },
1163
+ valueFormat: "YYYY MMM DD",
1164
+ placeholder: "Pick date range",
1165
+ clearable: !0,
1166
+ popoverProps: { withinPortal: !1 },
1167
+ flex: 1,
1168
+ disabled: o
1169
+ }
1170
+ );
1171
+ }, _o = ({
1149
1172
  property: e,
1150
1173
  value: n,
1151
1174
  onChange: t,
1152
1175
  freeze: o = !1
1153
1176
  }) => {
1154
- const r = Y(Z);
1155
- if (ne(e) || e.enumType === void 0)
1177
+ const r = W(ne), i = z(e.name);
1178
+ if (ie(e) || e.enumType === void 0)
1156
1179
  throw new Error(
1157
1180
  "Invalid usage of EnumInput. Expect a property of type enum"
1158
1181
  );
1159
- const i = e.enumType, [s, a] = F(() => {
1160
- const u = {}, g = Object.entries(i.label).map(
1161
- ([c, S]) => {
1162
- const f = isNaN(Number(c)) ? c : Number(c);
1163
- return u[c] = f, {
1164
- value: c,
1165
- label: fe(r, S)
1182
+ const s = e.enumType, [a, u] = F(() => {
1183
+ const g = {}, c = Object.entries(s.label).map(
1184
+ ([h, f]) => {
1185
+ const d = isNaN(Number(h)) ? h : Number(h);
1186
+ return g[h] = d, {
1187
+ value: h,
1188
+ label: he(r, f)
1166
1189
  };
1167
1190
  }
1168
1191
  );
1169
- return [u, g];
1170
- }, [r, i]);
1192
+ return [g, c];
1193
+ }, [r, s]);
1171
1194
  return /* @__PURE__ */ l.jsx(
1172
- Mn,
1195
+ bn,
1173
1196
  {
1174
- data: a,
1197
+ ...i,
1198
+ data: u,
1175
1199
  value: n === void 0 ? null : String(n),
1176
- onChange: (u) => {
1177
- if (u === null) {
1200
+ onChange: (g) => {
1201
+ if (g === null) {
1178
1202
  t(void 0);
1179
1203
  return;
1180
1204
  }
1181
- t(s[u]);
1205
+ t(a[g]);
1182
1206
  },
1183
1207
  disabled: o,
1184
1208
  allowDeselect: !e.isRequired
1185
1209
  }
1186
1210
  );
1187
- }, yo = {
1211
+ }, jo = {
1188
1212
  lang2value: {
1189
1213
  en: "Confirm",
1190
1214
  vi: "Xác Nhận"
1191
1215
  },
1192
1216
  lang: "en"
1193
- }, jo = new Jn("confirmation.valuesDoNotMatch"), yi = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1194
- /* @__PURE__ */ l.jsx(A, { value: yo }),
1217
+ }, Fo = new Zn("confirmation.valuesDoNotMatch"), Ii = ({ property: e }) => /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1218
+ /* @__PURE__ */ l.jsx(N, { value: jo }),
1195
1219
  " ",
1196
- /* @__PURE__ */ l.jsx(A, { value: e.label })
1197
- ] }), ji = ({
1220
+ /* @__PURE__ */ l.jsx(N, { value: e.label })
1221
+ ] }), Pi = ({
1198
1222
  property: e,
1199
1223
  error: n,
1200
1224
  value: t,
1201
1225
  onChange: o,
1202
1226
  freeze: r = !1
1203
1227
  }) => {
1204
- const [i, s] = M(""), [a, u] = M(!1), [g, c] = F(() => e.constraints.includes("password") ? ["password", Gt] : ["text", q], [e.constraints]), S = F(() => {
1205
- if (a && i !== t)
1206
- return jo.t({ args: { name: e.label } });
1207
- }, [a, i, t, e.label]), f = n || S;
1228
+ const i = z(`${e.name}_confirm`), [s, a] = M(""), [u, g] = M(!1), [c, h] = F(() => e.constraints.includes("password") ? ["password", Ht] : ["text", K], [e.constraints]), f = F(() => {
1229
+ if (u && s !== t)
1230
+ return Fo.t({ args: { name: e.label } });
1231
+ }, [u, s, t, e.label]), d = n || f;
1208
1232
  return /* @__PURE__ */ l.jsx(
1209
- c,
1233
+ h,
1210
1234
  {
1235
+ ...i,
1211
1236
  id: `${e.name}-confirm`,
1212
- value: i,
1213
- type: g,
1214
- onChange: (d) => {
1215
- const p = d.target.value;
1216
- s(p), u(!0), o(p);
1237
+ value: s,
1238
+ type: c,
1239
+ onChange: (p) => {
1240
+ const m = p.target.value;
1241
+ a(m), g(!0), o(m);
1217
1242
  },
1218
- error: f,
1243
+ error: d,
1219
1244
  disabled: r
1220
1245
  }
1221
1246
  );
1222
1247
  };
1223
- function _o(e, n) {
1248
+ function Io(e, n) {
1224
1249
  const [t, o] = M(""), [r, i] = M([]);
1225
- return Se(() => {
1250
+ return we(() => {
1226
1251
  e.getByName(n.targetClass).fetch({ limit: 100, offset: 0 }).then((a) => i(a.records));
1227
1252
  }, [n.name]), {
1228
1253
  data: r,
@@ -1239,9 +1264,9 @@ function _o(e, n) {
1239
1264
  table: e.getByName(n.targetClass)
1240
1265
  };
1241
1266
  }
1242
- const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }), en = te(
1267
+ const Po = (e) => e.name, Eo = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", children: e.name }), nn = re(
1243
1268
  (e) => /* @__PURE__ */ l.jsx("h1", { children: "SingleForeignKey" })
1244
- ), tn = te(
1269
+ ), on = re(
1245
1270
  ({
1246
1271
  db: e,
1247
1272
  property: n,
@@ -1249,13 +1274,13 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1249
1274
  onChange: o,
1250
1275
  freeze: r = !1
1251
1276
  }) => {
1252
- const { table: i, data: s, query: a, setQuery: u } = _o(
1277
+ const { table: i, data: s, query: a, setQuery: u } = Io(
1253
1278
  e,
1254
1279
  n
1255
1280
  );
1256
- return /* @__PURE__ */ l.jsxs(Q, { gap: "sm", children: [
1281
+ return /* @__PURE__ */ l.jsxs(te, { gap: "sm", children: [
1257
1282
  /* @__PURE__ */ l.jsx(
1258
- Po,
1283
+ $o,
1259
1284
  {
1260
1285
  name: n.name,
1261
1286
  query: a,
@@ -1264,25 +1289,25 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1264
1289
  onSelect: (g) => {
1265
1290
  t.includes(g) || o([...t, g]);
1266
1291
  },
1267
- renderOption: Fo,
1292
+ renderOption: Po,
1268
1293
  isIdInteger: n.datatype === "integer",
1269
1294
  freeze: r
1270
1295
  }
1271
1296
  ),
1272
1297
  /* @__PURE__ */ l.jsx(
1273
- Eo,
1298
+ Mo,
1274
1299
  {
1275
1300
  items: t.map((g) => i.get(g)),
1276
1301
  onDelete: (g) => {
1277
1302
  o(t.filter((c) => c !== g.id));
1278
1303
  },
1279
- render: Io,
1304
+ render: Eo,
1280
1305
  freeze: r
1281
1306
  }
1282
1307
  )
1283
1308
  ] });
1284
1309
  }
1285
- ), Po = ({
1310
+ ), $o = ({
1286
1311
  name: e,
1287
1312
  data: n,
1288
1313
  onSelect: t,
@@ -1292,42 +1317,43 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1292
1317
  setQuery: s,
1293
1318
  freeze: a = !1
1294
1319
  }) => {
1295
- const u = zt({
1296
- onDropdownClose: () => u.resetSelectedOption()
1297
- }), g = F(() => n.map((c) => (
1320
+ const u = z(e || "search"), g = Gt({
1321
+ onDropdownClose: () => g.resetSelectedOption()
1322
+ }), c = F(() => n.map((h) => (
1298
1323
  // value has to be a string
1299
- /* @__PURE__ */ l.jsx(k.Option, { value: c.id.toString(), children: o(c) }, c.id)
1324
+ /* @__PURE__ */ l.jsx(O.Option, { value: h.id.toString(), children: o(h) }, h.id)
1300
1325
  )), [n]);
1301
1326
  return /* @__PURE__ */ l.jsxs(
1302
- k,
1327
+ O,
1303
1328
  {
1304
- store: u,
1305
- onOptionSubmit: (c) => {
1306
- t(r ? parseInt(c) : c), s(""), u.closeDropdown();
1329
+ store: g,
1330
+ onOptionSubmit: (h) => {
1331
+ t(r ? parseInt(h) : h), s(""), g.closeDropdown();
1307
1332
  },
1308
1333
  offset: 0,
1309
1334
  shadow: "sm",
1310
1335
  disabled: a,
1311
1336
  children: [
1312
- /* @__PURE__ */ l.jsx(k.Target, { children: /* @__PURE__ */ l.jsx(
1313
- q,
1337
+ /* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
1338
+ K,
1314
1339
  {
1340
+ ...u,
1315
1341
  id: e,
1316
1342
  pointer: !a,
1317
- rightSection: /* @__PURE__ */ l.jsx(it, { size: 16, stroke: 1.5 }),
1343
+ rightSection: /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }),
1318
1344
  rightSectionPointerEvents: "none",
1319
- onClick: () => u.toggleDropdown(),
1345
+ onClick: () => g.toggleDropdown(),
1320
1346
  placeholder: "Type to search...",
1321
1347
  value: i,
1322
- onChange: (c) => s(c.currentTarget.value),
1348
+ onChange: (h) => s(h.currentTarget.value),
1323
1349
  disabled: a
1324
1350
  }
1325
1351
  ) }),
1326
- /* @__PURE__ */ l.jsx(k.Dropdown, { children: /* @__PURE__ */ l.jsx(k.Options, { children: g.length === 0 ? /* @__PURE__ */ l.jsx(k.Empty, { children: "Nothing found" }) : g }) })
1352
+ /* @__PURE__ */ l.jsx(O.Dropdown, { children: /* @__PURE__ */ l.jsx(O.Options, { children: c.length === 0 ? /* @__PURE__ */ l.jsx(O.Empty, { children: "Nothing found" }) : c }) })
1327
1353
  ]
1328
1354
  }
1329
1355
  );
1330
- }, Eo = ({
1356
+ }, Mo = ({
1331
1357
  items: e,
1332
1358
  onDelete: n,
1333
1359
  render: t,
@@ -1338,114 +1364,124 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1338
1364
  for (let s = 0; s < e.length; s++) {
1339
1365
  const a = e[s];
1340
1366
  i.push(
1341
- /* @__PURE__ */ l.jsxs(N, { justify: "space-between", p: "sm", children: [
1367
+ /* @__PURE__ */ l.jsxs(L, { justify: "space-between", p: "sm", children: [
1342
1368
  t(a),
1343
- !o && /* @__PURE__ */ l.jsx(Dn, { size: "sm", onClick: () => n(a) })
1369
+ !o && /* @__PURE__ */ l.jsx(Vn, { size: "sm", onClick: () => n(a) })
1344
1370
  ] }, s)
1345
- ), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(Vn, {}, `divider-${s}`));
1371
+ ), s < e.length - 1 && i.push(/* @__PURE__ */ l.jsx(Tn, {}, `divider-${s}`));
1346
1372
  }
1347
1373
  return i;
1348
1374
  }, [e, o]);
1349
1375
  if (r.length !== 0)
1350
- return /* @__PURE__ */ l.jsx(ee, { bd: "1px solid #ddd", children: r });
1351
- }, $o = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => /* @__PURE__ */ l.jsxs(z, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1352
- /* @__PURE__ */ l.jsx(
1353
- Ye,
1354
- {
1355
- id: e.tsName,
1356
- value: (n == null ? void 0 : n.start) || null,
1357
- onChange: (r) => {
1358
- t({
1359
- start: r === null ? void 0 : K(r).startOf("day").toDate(),
1360
- end: n == null ? void 0 : n.end
1361
- });
1362
- },
1363
- valueFormat: "YYYY MMM DD",
1364
- placeholder: "Pick date range",
1365
- clearable: !o,
1366
- disabled: o,
1367
- popoverProps: { withinPortal: !1 },
1368
- flex: 1,
1369
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1370
- }
1371
- ),
1372
- /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
1373
- /* @__PURE__ */ l.jsx(
1374
- Ye,
1375
- {
1376
- id: e.tsName,
1377
- value: (n == null ? void 0 : n.end) || null,
1378
- onChange: (r) => {
1379
- t({
1380
- start: n == null ? void 0 : n.start,
1381
- end: r === null ? void 0 : K(r).startOf("day").toDate()
1382
- });
1383
- },
1384
- valueFormat: "YYYY MMM DD",
1385
- placeholder: "Pick date range",
1386
- clearable: !o,
1387
- disabled: o,
1388
- popoverProps: { withinPortal: !1 },
1389
- flex: 1,
1390
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1391
- }
1392
- )
1393
- ] }), Mo = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => /* @__PURE__ */ l.jsxs(z, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1394
- /* @__PURE__ */ l.jsx(
1395
- Rt,
1396
- {
1397
- id: e.tsName,
1398
- value: (n == null ? void 0 : n.start) || null,
1399
- onChange: (r) => {
1400
- t({
1401
- start: r === null ? void 0 : K(r).toDate(),
1402
- end: n == null ? void 0 : n.end
1403
- });
1404
- },
1405
- valueFormat: "YYYY MMM DD HH:mm",
1406
- placeholder: "Pick date range",
1407
- clearable: !o,
1408
- disabled: o,
1409
- popoverProps: { withinPortal: !1 },
1410
- flex: 1,
1411
- withSeconds: !1,
1412
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1413
- }
1414
- ),
1415
- /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
1416
- /* @__PURE__ */ l.jsx(
1417
- Rt,
1418
- {
1419
- id: e.tsName,
1420
- value: (n == null ? void 0 : n.end) || null,
1421
- onChange: (r) => {
1422
- t({
1423
- start: n == null ? void 0 : n.start,
1424
- end: r === null ? void 0 : K(r).toDate()
1425
- });
1426
- },
1427
- valueFormat: "YYYY MMM DD HH:mm",
1428
- placeholder: "Pick date range",
1429
- clearable: !o,
1430
- disabled: o,
1431
- popoverProps: { withinPortal: !1 },
1432
- flex: 1,
1433
- withSeconds: !1,
1434
- leftSection: /* @__PURE__ */ l.jsx($e, { size: 16, stroke: 1.5 })
1435
- }
1436
- )
1437
- ] }), Et = {
1438
- integer: Me,
1439
- float: Me,
1440
- string: pe,
1441
- boolean: Zt,
1442
- "string[]": pe,
1443
- enum: Ro,
1444
- date: xo
1445
- }, Do = "_requiredLabelLeft_l5p83_1", Vo = "_requiredLabelRight_l5p83_11", $t = {
1446
- requiredLabelLeft: Do,
1447
- requiredLabelRight: Vo
1448
- }, nn = ({
1376
+ return /* @__PURE__ */ l.jsx(oe, { bd: "1px solid #ddd", children: r });
1377
+ }, Do = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1378
+ const r = z(`${e.tsName}_start`), i = z(`${e.tsName}_end`);
1379
+ return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1380
+ /* @__PURE__ */ l.jsx(
1381
+ We,
1382
+ {
1383
+ ...r,
1384
+ id: e.tsName,
1385
+ value: (n == null ? void 0 : n.start) || null,
1386
+ onChange: (s) => {
1387
+ t({
1388
+ start: s === null ? void 0 : J(s).startOf("day").toDate(),
1389
+ end: n == null ? void 0 : n.end
1390
+ });
1391
+ },
1392
+ valueFormat: "YYYY MMM DD",
1393
+ placeholder: "Pick date range",
1394
+ clearable: !o,
1395
+ disabled: o,
1396
+ popoverProps: { withinPortal: !1 },
1397
+ flex: 1,
1398
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1399
+ }
1400
+ ),
1401
+ /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
1402
+ /* @__PURE__ */ l.jsx(
1403
+ We,
1404
+ {
1405
+ ...i,
1406
+ id: e.tsName,
1407
+ value: (n == null ? void 0 : n.end) || null,
1408
+ onChange: (s) => {
1409
+ t({
1410
+ start: n == null ? void 0 : n.start,
1411
+ end: s === null ? void 0 : J(s).startOf("day").toDate()
1412
+ });
1413
+ },
1414
+ valueFormat: "YYYY MMM DD",
1415
+ placeholder: "Pick date range",
1416
+ clearable: !o,
1417
+ disabled: o,
1418
+ popoverProps: { withinPortal: !1 },
1419
+ flex: 1,
1420
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1421
+ }
1422
+ )
1423
+ ] });
1424
+ }, bo = ({ property: e, value: n, onChange: t, freeze: o = !1 }) => {
1425
+ const r = z(`${e.tsName}_start`), i = z(`${e.tsName}_end`);
1426
+ return /* @__PURE__ */ l.jsxs(q, { gap: "sm", justify: "space-between", direction: "row", align: "center", children: [
1427
+ /* @__PURE__ */ l.jsx(
1428
+ _t,
1429
+ {
1430
+ ...r,
1431
+ id: e.tsName,
1432
+ value: (n == null ? void 0 : n.start) || null,
1433
+ onChange: (s) => {
1434
+ t({
1435
+ start: s === null ? void 0 : J(s).toDate(),
1436
+ end: n == null ? void 0 : n.end
1437
+ });
1438
+ },
1439
+ valueFormat: "YYYY MMM DD HH:mm",
1440
+ placeholder: "Pick date range",
1441
+ clearable: !o,
1442
+ disabled: o,
1443
+ popoverProps: { withinPortal: !1 },
1444
+ flex: 1,
1445
+ withSeconds: !1,
1446
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1447
+ }
1448
+ ),
1449
+ /* @__PURE__ */ l.jsx("span", { style: { flexGrow: 0 }, children: "–" }),
1450
+ /* @__PURE__ */ l.jsx(
1451
+ _t,
1452
+ {
1453
+ ...i,
1454
+ id: e.tsName,
1455
+ value: (n == null ? void 0 : n.end) || null,
1456
+ onChange: (s) => {
1457
+ t({
1458
+ start: n == null ? void 0 : n.start,
1459
+ end: s === null ? void 0 : J(s).toDate()
1460
+ });
1461
+ },
1462
+ valueFormat: "YYYY MMM DD HH:mm",
1463
+ placeholder: "Pick date range",
1464
+ clearable: !o,
1465
+ disabled: o,
1466
+ popoverProps: { withinPortal: !1 },
1467
+ flex: 1,
1468
+ withSeconds: !1,
1469
+ leftSection: /* @__PURE__ */ l.jsx(Me, { size: 16, stroke: 1.5 })
1470
+ }
1471
+ )
1472
+ ] });
1473
+ }, Mt = {
1474
+ integer: De,
1475
+ float: De,
1476
+ string: Se,
1477
+ boolean: tn,
1478
+ "string[]": Se,
1479
+ enum: _o,
1480
+ date: yo
1481
+ }, Vo = "_requiredLabelLeft_l5p83_1", To = "_requiredLabelRight_l5p83_11", Dt = {
1482
+ requiredLabelLeft: Vo,
1483
+ requiredLabelRight: To
1484
+ }, rn = ({
1449
1485
  label: e,
1450
1486
  name: n,
1451
1487
  required: t = !1,
@@ -1453,11 +1489,11 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1453
1489
  style: r,
1454
1490
  align: i = "left"
1455
1491
  }) => {
1456
- const s = t ? i === "left" ? $t.requiredLabelRight : $t.requiredLabelLeft : "";
1457
- return /* @__PURE__ */ l.jsx(z, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(N, { gap: 4, children: [
1492
+ const s = t ? i === "left" ? Dt.requiredLabelRight : Dt.requiredLabelLeft : "";
1493
+ return /* @__PURE__ */ l.jsx(q, { align: "center", h: 36, children: /* @__PURE__ */ l.jsx("label", { htmlFor: n, style: r, children: /* @__PURE__ */ l.jsxs(L, { gap: 4, children: [
1458
1494
  /* @__PURE__ */ l.jsx(P, { size: "sm", className: s, children: e }),
1459
- o !== void 0 && /* @__PURE__ */ l.jsx(Ht, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
1460
- Bt,
1495
+ o !== void 0 && /* @__PURE__ */ l.jsx(qt, { label: o, withArrow: !0, children: /* @__PURE__ */ l.jsx(
1496
+ Ut,
1461
1497
  {
1462
1498
  size: 16,
1463
1499
  stroke: 1.5,
@@ -1465,15 +1501,15 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1465
1501
  }
1466
1502
  ) })
1467
1503
  ] }) }) });
1468
- }, bo = {
1504
+ }, No = {
1469
1505
  type: "vertical",
1470
1506
  helpAlwaysVisible: !1
1471
- }, on = te(
1507
+ }, sn = re(
1472
1508
  ({
1473
1509
  store: e,
1474
1510
  record: n,
1475
1511
  property: t,
1476
- layout: o = bo,
1512
+ layout: o = No,
1477
1513
  InputComponent: r,
1478
1514
  freeze: i = !1,
1479
1515
  label: s,
@@ -1483,14 +1519,14 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1483
1519
  const [g, c] = M(void 0);
1484
1520
  if (u !== void 0 && !u(n))
1485
1521
  return /* @__PURE__ */ l.jsx("div", {});
1486
- const S = Xt(n, t);
1522
+ const h = Jt(n, t);
1487
1523
  return a === void 0 && (a = (f) => {
1488
1524
  var p;
1489
- if (Kt(n))
1490
- It(n, t, f);
1525
+ if (Yt(n))
1526
+ Et(n, t, f);
1491
1527
  else {
1492
1528
  const m = n.toDraft();
1493
- It(m, t, f), e.setDraft(m);
1529
+ Et(m, t, f), e.setDraft(m);
1494
1530
  }
1495
1531
  const d = t.validator(f);
1496
1532
  d.isValid ? c(void 0) : c(
@@ -1504,7 +1540,7 @@ const Fo = (e) => e.name, Io = (e) => /* @__PURE__ */ l.jsx(P, { size: "sm", chi
1504
1540
  layout: o,
1505
1541
  InputComponent: r,
1506
1542
  freeze: i,
1507
- value: S,
1543
+ value: h,
1508
1544
  error: g,
1509
1545
  label: s,
1510
1546
  onChange: a
@@ -1523,7 +1559,7 @@ function Ao({
1523
1559
  label: a,
1524
1560
  onChange: u
1525
1561
  }) {
1526
- return To(n) ? /* @__PURE__ */ l.jsxs(Q, { gap: 5, children: [
1562
+ return ko(n) ? /* @__PURE__ */ l.jsxs(te, { gap: 5, children: [
1527
1563
  /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
1528
1564
  /* @__PURE__ */ l.jsx(
1529
1565
  $.Col,
@@ -1534,12 +1570,12 @@ function Ao({
1534
1570
  justifyContent: n.align || "left"
1535
1571
  },
1536
1572
  children: /* @__PURE__ */ l.jsx(
1537
- nn,
1573
+ rn,
1538
1574
  {
1539
- label: /* @__PURE__ */ l.jsx(A, { value: t.label }),
1575
+ label: /* @__PURE__ */ l.jsx(N, { value: t.label }),
1540
1576
  name: t.name,
1541
1577
  required: t.isRequired,
1542
- tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(A, { value: t.description }) : void 0,
1578
+ tooltip: t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
1543
1579
  align: n.align
1544
1580
  }
1545
1581
  )
@@ -1559,17 +1595,17 @@ function Ao({
1559
1595
  ] }),
1560
1596
  s !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
1561
1597
  /* @__PURE__ */ l.jsx($.Col, { span: n.labelCol }),
1562
- /* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(q.Error, { children: s }) })
1598
+ /* @__PURE__ */ l.jsx($.Col, { span: n.itemCol, children: /* @__PURE__ */ l.jsx(K.Error, { children: s }) })
1563
1599
  ] })
1564
- ] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(A, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(N, { gap: 4, style: { display: "inline-flex" }, children: [
1600
+ ] }) : (a === void 0 && (a = /* @__PURE__ */ l.jsx(N, { value: t.label })), !n.helpAlwaysVisible && t.description !== void 0 && (a = /* @__PURE__ */ l.jsxs(L, { gap: 4, style: { display: "inline-flex" }, children: [
1565
1601
  a,
1566
1602
  /* @__PURE__ */ l.jsx(
1567
- Ht,
1603
+ qt,
1568
1604
  {
1569
- label: /* @__PURE__ */ l.jsx(A, { value: t.description }),
1605
+ label: /* @__PURE__ */ l.jsx(N, { value: t.description }),
1570
1606
  withArrow: !0,
1571
1607
  children: /* @__PURE__ */ l.jsx(
1572
- Bt,
1608
+ Ut,
1573
1609
  {
1574
1610
  size: 16,
1575
1611
  stroke: 1.5,
@@ -1579,10 +1615,10 @@ function Ao({
1579
1615
  }
1580
1616
  )
1581
1617
  ] })), /* @__PURE__ */ l.jsx(
1582
- q.Wrapper,
1618
+ K.Wrapper,
1583
1619
  {
1584
1620
  label: a,
1585
- description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(A, { value: t.description }) : void 0,
1621
+ description: n.helpAlwaysVisible && t.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: t.description }) : void 0,
1586
1622
  required: t.isRequired,
1587
1623
  children: /* @__PURE__ */ l.jsx(
1588
1624
  o,
@@ -1598,15 +1634,15 @@ function Ao({
1598
1634
  }
1599
1635
  ));
1600
1636
  }
1601
- function To(e) {
1637
+ function ko(e) {
1602
1638
  return e.type === "horizontal";
1603
1639
  }
1604
- const Mt = 12, _i = (e) => {
1640
+ const bt = 12, Ei = (e) => {
1605
1641
  const n = e.schema, t = F(() => {
1606
1642
  const o = Math.max(
1607
1643
  ...e.fieldGroups.map((r) => Math.max(...r.fields.map((i) => i.length)))
1608
1644
  );
1609
- return e.fieldGroups.map((r, i) => No(
1645
+ return e.fieldGroups.map((r, i) => Lo(
1610
1646
  n,
1611
1647
  e.store,
1612
1648
  e.record,
@@ -1620,12 +1656,12 @@ const Mt = 12, _i = (e) => {
1620
1656
  "form",
1621
1657
  {
1622
1658
  onSubmit: e.onSubmit === void 0 ? void 0 : (o) => {
1623
- o.preventDefault(), e.onSubmit !== void 0 && Kt(e.record) && e.onSubmit(e.record);
1659
+ o.preventDefault(), e.onSubmit !== void 0 && Yt(e.record) && e.onSubmit(e.record);
1624
1660
  },
1625
- children: /* @__PURE__ */ l.jsxs(Q, { gap: "sm", className: e.className, style: e.styles, children: [
1661
+ children: /* @__PURE__ */ l.jsxs(te, { gap: "sm", className: e.className, style: e.styles, children: [
1626
1662
  t,
1627
- /* @__PURE__ */ l.jsx(N, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1628
- G,
1663
+ /* @__PURE__ */ l.jsx(L, { gap: "sm", children: e.actions.map((o, r) => /* @__PURE__ */ l.jsx(
1664
+ B,
1629
1665
  {
1630
1666
  variant: o.variant,
1631
1667
  onClick: () => {
@@ -1640,12 +1676,12 @@ const Mt = 12, _i = (e) => {
1640
1676
  }
1641
1677
  );
1642
1678
  };
1643
- function No(e, n, t, o, r, i, s) {
1679
+ function Lo(e, n, t, o, r, i, s) {
1644
1680
  const a = r.fields, u = [];
1645
1681
  for (let c = 0; c < a.length; c++) {
1646
- const S = Mt / a[c].length;
1647
- if (!Number.isInteger(S))
1648
- throw new Error(`Span must be an integer, but got ${S} for row ${c}`);
1682
+ const h = bt / a[c].length;
1683
+ if (!Number.isInteger(h))
1684
+ throw new Error(`Span must be an integer, but got ${h} for row ${c}`);
1649
1685
  let f;
1650
1686
  s !== void 0 && typeof s == "object" && s.type === "horizontal" ? f = {
1651
1687
  ...s,
@@ -1655,7 +1691,7 @@ function No(e, n, t, o, r, i, s) {
1655
1691
  labelCol: Math.floor(
1656
1692
  s.labelCol * a[c].length / i
1657
1693
  ),
1658
- itemCol: Mt - Math.floor(s.labelCol * a[c].length / i)
1694
+ itemCol: bt - Math.floor(s.labelCol * a[c].length / i)
1659
1695
  } : f = s;
1660
1696
  for (let d = 0; d < a[c].length; d++) {
1661
1697
  const p = a[c][d];
@@ -1664,14 +1700,14 @@ function No(e, n, t, o, r, i, s) {
1664
1700
  m = p(n, t);
1665
1701
  else {
1666
1702
  let C, v = {};
1667
- typeof p == "object" && "prop" in p ? (C = p.prop instanceof B ? p.prop : e.allProperties[p.prop], p.args !== void 0 && (v = p.args)) : C = p instanceof B ? p : e.allProperties[p], m = /* @__PURE__ */ l.jsx(
1668
- on,
1703
+ typeof p == "object" && "prop" in p ? (C = p.prop instanceof Y ? p.prop : e.allProperties[p.prop], p.args !== void 0 && (v = p.args)) : C = p instanceof Y ? p : e.allProperties[p], m = /* @__PURE__ */ l.jsx(
1704
+ sn,
1669
1705
  {
1670
1706
  store: n,
1671
1707
  record: t,
1672
1708
  property: C,
1673
1709
  layout: f,
1674
- InputComponent: rn(C, v.input),
1710
+ InputComponent: ln(C, v.input),
1675
1711
  freeze: v.freeze ?? !1,
1676
1712
  visible: v.visible,
1677
1713
  label: v.label,
@@ -1680,26 +1716,26 @@ function No(e, n, t, o, r, i, s) {
1680
1716
  );
1681
1717
  }
1682
1718
  u.push(
1683
- /* @__PURE__ */ l.jsx($.Col, { span: S, children: m }, `${c}-${d}`)
1719
+ /* @__PURE__ */ l.jsx($.Col, { span: h, children: m }, `${c}-${d}`)
1684
1720
  );
1685
1721
  }
1686
1722
  }
1687
1723
  const g = /* @__PURE__ */ l.jsx($, { gutter: "sm", children: u }, o);
1688
- return r.name !== void 0 ? /* @__PURE__ */ l.jsx(bn, { legend: r.name, children: g }, o) : g;
1724
+ return r.name !== void 0 ? /* @__PURE__ */ l.jsx(Nn, { legend: r.name, children: g }, o) : g;
1689
1725
  }
1690
- function rn(e, n) {
1726
+ function ln(e, n) {
1691
1727
  if (n !== void 0)
1692
1728
  return n;
1693
- const t = e instanceof B ? e.leafProperty : e;
1694
- if (ne(t))
1695
- return t.cardinality === "N:N" || t.cardinality === "1:N" ? tn : en;
1696
- if (Et[t.datatype] === void 0)
1729
+ const t = e instanceof Y ? e.leafProperty : e;
1730
+ if (ie(t))
1731
+ return t.cardinality === "N:N" || t.cardinality === "1:N" ? on : nn;
1732
+ if (Mt[t.datatype] === void 0)
1697
1733
  throw new Error(
1698
1734
  `No input component found for datatype ${t.datatype}`
1699
1735
  );
1700
- return Et[t.datatype];
1736
+ return Mt[t.datatype];
1701
1737
  }
1702
- function Fi(e, n, t = {}) {
1738
+ function $i(e, n, t = {}) {
1703
1739
  return (o, r) => {
1704
1740
  if (t.visible !== void 0 && !t.visible(r))
1705
1741
  return /* @__PURE__ */ l.jsx("div", {});
@@ -1709,14 +1745,14 @@ function Fi(e, n, t = {}) {
1709
1745
  u = s(o, r);
1710
1746
  else {
1711
1747
  let g, c = {};
1712
- typeof s == "object" && "prop" in s ? (g = s.prop instanceof B ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof B ? s : e.allProperties[s], u = /* @__PURE__ */ l.jsx(
1713
- on,
1748
+ typeof s == "object" && "prop" in s ? (g = s.prop instanceof Y ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof Y ? s : e.allProperties[s], u = /* @__PURE__ */ l.jsx(
1749
+ sn,
1714
1750
  {
1715
1751
  store: o,
1716
1752
  record: r,
1717
1753
  property: g,
1718
1754
  layout: t.layout,
1719
- InputComponent: rn(g, c.input),
1755
+ InputComponent: ln(g, c.input),
1720
1756
  freeze: c.freeze ?? !1,
1721
1757
  visible: c.visible,
1722
1758
  label: c.label,
@@ -1727,7 +1763,7 @@ function Fi(e, n, t = {}) {
1727
1763
  return /* @__PURE__ */ l.jsx("div", { children: u }, a);
1728
1764
  });
1729
1765
  return /* @__PURE__ */ l.jsx(
1730
- N,
1766
+ L,
1731
1767
  {
1732
1768
  gap: t.flexGap,
1733
1769
  grow: t.flexGrow ?? !0,
@@ -1747,24 +1783,24 @@ function Fi(e, n, t = {}) {
1747
1783
  *
1748
1784
  * @license MIT
1749
1785
  */
1750
- function X(e, n) {
1786
+ function Z(e, n) {
1751
1787
  return typeof e == "function" ? e(n) : e;
1752
1788
  }
1753
- function O(e, n) {
1789
+ function G(e, n) {
1754
1790
  return (t) => {
1755
1791
  n.setState((o) => ({
1756
1792
  ...o,
1757
- [e]: X(t, o[e])
1793
+ [e]: Z(t, o[e])
1758
1794
  }));
1759
1795
  };
1760
1796
  }
1761
- function De(e) {
1797
+ function be(e) {
1762
1798
  return e instanceof Function;
1763
1799
  }
1764
- function ko(e) {
1800
+ function Oo(e) {
1765
1801
  return Array.isArray(e) && e.every((n) => typeof n == "number");
1766
1802
  }
1767
- function Lo(e, n) {
1803
+ function zo(e, n) {
1768
1804
  const t = [], o = (r) => {
1769
1805
  r.forEach((i) => {
1770
1806
  t.push(i);
@@ -1774,23 +1810,23 @@ function Lo(e, n) {
1774
1810
  };
1775
1811
  return o(e), t;
1776
1812
  }
1777
- function x(e, n, t) {
1813
+ function w(e, n, t) {
1778
1814
  let o = [], r;
1779
1815
  return (i) => {
1780
1816
  let s;
1781
1817
  t.key && t.debug && (s = Date.now());
1782
1818
  const a = e(i);
1783
- if (!(a.length !== o.length || a.some((c, S) => o[S] !== c)))
1819
+ if (!(a.length !== o.length || a.some((c, h) => o[h] !== c)))
1784
1820
  return r;
1785
1821
  o = a;
1786
1822
  let g;
1787
1823
  if (t.key && t.debug && (g = Date.now()), r = n(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
1788
- const c = Math.round((Date.now() - s) * 100) / 100, S = Math.round((Date.now() - g) * 100) / 100, f = S / 16, d = (p, m) => {
1824
+ const c = Math.round((Date.now() - s) * 100) / 100, h = Math.round((Date.now() - g) * 100) / 100, f = h / 16, d = (p, m) => {
1789
1825
  for (p = String(p); p.length < m; )
1790
1826
  p = " " + p;
1791
1827
  return p;
1792
1828
  };
1793
- console.info(`%c⏱ ${d(S, 5)} /${d(c, 5)} ms`, `
1829
+ console.info(`%c⏱ ${d(h, 5)} /${d(c, 5)} ms`, `
1794
1830
  font-size: .6rem;
1795
1831
  font-weight: bold;
1796
1832
  color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
@@ -1798,7 +1834,7 @@ function x(e, n, t) {
1798
1834
  return r;
1799
1835
  };
1800
1836
  }
1801
- function R(e, n, t, o) {
1837
+ function x(e, n, t, o) {
1802
1838
  return {
1803
1839
  debug: () => {
1804
1840
  var r;
@@ -1808,7 +1844,7 @@ function R(e, n, t, o) {
1808
1844
  onChange: o
1809
1845
  };
1810
1846
  }
1811
- function Oo(e, n, t, o) {
1847
+ function Go(e, n, t, o) {
1812
1848
  const r = () => {
1813
1849
  var s;
1814
1850
  return (s = i.getValue()) != null ? s : e.options.renderFallbackValue;
@@ -1818,20 +1854,20 @@ function Oo(e, n, t, o) {
1818
1854
  column: t,
1819
1855
  getValue: () => n.getValue(o),
1820
1856
  renderValue: r,
1821
- getContext: x(() => [e, t, n, i], (s, a, u, g) => ({
1857
+ getContext: w(() => [e, t, n, i], (s, a, u, g) => ({
1822
1858
  table: s,
1823
1859
  column: a,
1824
1860
  row: u,
1825
1861
  cell: g,
1826
1862
  getValue: g.getValue,
1827
1863
  renderValue: g.renderValue
1828
- }), R(e.options, "debugCells", "cell.getContext"))
1864
+ }), x(e.options, "debugCells", "cell.getContext"))
1829
1865
  };
1830
1866
  return e._features.forEach((s) => {
1831
1867
  s.createCell == null || s.createCell(i, t, n, e);
1832
1868
  }, {}), i;
1833
1869
  }
1834
- function zo(e, n, t, o) {
1870
+ function Ho(e, n, t, o) {
1835
1871
  var r, i;
1836
1872
  const a = {
1837
1873
  ...e._getDefaultColumnDef(),
@@ -1847,32 +1883,32 @@ function zo(e, n, t, o) {
1847
1883
  return d;
1848
1884
  } : c = (f) => f[a.accessorKey]), !g)
1849
1885
  throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
1850
- let S = {
1886
+ let h = {
1851
1887
  id: `${String(g)}`,
1852
1888
  accessorFn: c,
1853
1889
  parent: o,
1854
1890
  depth: t,
1855
1891
  columnDef: a,
1856
1892
  columns: [],
1857
- getFlatColumns: x(() => [!0], () => {
1893
+ getFlatColumns: w(() => [!0], () => {
1858
1894
  var f;
1859
- return [S, ...(f = S.columns) == null ? void 0 : f.flatMap((d) => d.getFlatColumns())];
1860
- }, R(e.options, "debugColumns", "column.getFlatColumns")),
1861
- getLeafColumns: x(() => [e._getOrderColumnsFn()], (f) => {
1895
+ return [h, ...(f = h.columns) == null ? void 0 : f.flatMap((d) => d.getFlatColumns())];
1896
+ }, x(e.options, "debugColumns", "column.getFlatColumns")),
1897
+ getLeafColumns: w(() => [e._getOrderColumnsFn()], (f) => {
1862
1898
  var d;
1863
- if ((d = S.columns) != null && d.length) {
1864
- let p = S.columns.flatMap((m) => m.getLeafColumns());
1899
+ if ((d = h.columns) != null && d.length) {
1900
+ let p = h.columns.flatMap((m) => m.getLeafColumns());
1865
1901
  return f(p);
1866
1902
  }
1867
- return [S];
1868
- }, R(e.options, "debugColumns", "column.getLeafColumns"))
1903
+ return [h];
1904
+ }, x(e.options, "debugColumns", "column.getLeafColumns"))
1869
1905
  };
1870
1906
  for (const f of e._features)
1871
- f.createColumn == null || f.createColumn(S, e);
1872
- return S;
1907
+ f.createColumn == null || f.createColumn(h, e);
1908
+ return h;
1873
1909
  }
1874
- const T = "debugHeaders";
1875
- function Dt(e, n, t) {
1910
+ const k = "debugHeaders";
1911
+ function Vt(e, n, t) {
1876
1912
  var o;
1877
1913
  let i = {
1878
1914
  id: (o = t.id) != null ? o : n.id,
@@ -1901,36 +1937,36 @@ function Dt(e, n, t) {
1901
1937
  s.createHeader == null || s.createHeader(i, e);
1902
1938
  }), i;
1903
1939
  }
1904
- const Go = {
1940
+ const qo = {
1905
1941
  createTable: (e) => {
1906
- e.getHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
1942
+ e.getHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
1907
1943
  var i, s;
1908
- const a = (i = o == null ? void 0 : o.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((S) => t.find((f) => f.id === S)).filter(Boolean)) != null ? s : [], g = t.filter((S) => !(o != null && o.includes(S.id)) && !(r != null && r.includes(S.id)));
1909
- return Fe(n, [...a, ...g, ...u], e);
1910
- }, R(e.options, T, "getHeaderGroups")), e.getCenterHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), Fe(n, t, e, "center")), R(e.options, T, "getCenterHeaderGroups")), e.getLeftHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
1944
+ const a = (i = o == null ? void 0 : o.map((h) => t.find((f) => f.id === h)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((h) => t.find((f) => f.id === h)).filter(Boolean)) != null ? s : [], g = t.filter((h) => !(o != null && o.includes(h.id)) && !(r != null && r.includes(h.id)));
1945
+ return Ie(n, [...a, ...g, ...u], e);
1946
+ }, x(e.options, k, "getHeaderGroups")), e.getCenterHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), Ie(n, t, e, "center")), x(e.options, k, "getCenterHeaderGroups")), e.getLeftHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
1911
1947
  var r;
1912
1948
  const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
1913
- return Fe(n, i, e, "left");
1914
- }, R(e.options, T, "getLeftHeaderGroups")), e.getRightHeaderGroups = x(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
1949
+ return Ie(n, i, e, "left");
1950
+ }, x(e.options, k, "getLeftHeaderGroups")), e.getRightHeaderGroups = w(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
1915
1951
  var r;
1916
1952
  const i = (r = o == null ? void 0 : o.map((s) => t.find((a) => a.id === s)).filter(Boolean)) != null ? r : [];
1917
- return Fe(n, i, e, "right");
1918
- }, R(e.options, T, "getRightHeaderGroups")), e.getFooterGroups = x(() => [e.getHeaderGroups()], (n) => [...n].reverse(), R(e.options, T, "getFooterGroups")), e.getLeftFooterGroups = x(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), R(e.options, T, "getLeftFooterGroups")), e.getCenterFooterGroups = x(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), R(e.options, T, "getCenterFooterGroups")), e.getRightFooterGroups = x(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), R(e.options, T, "getRightFooterGroups")), e.getFlatHeaders = x(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, T, "getFlatHeaders")), e.getLeftFlatHeaders = x(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, T, "getLeftFlatHeaders")), e.getCenterFlatHeaders = x(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, T, "getCenterFlatHeaders")), e.getRightFlatHeaders = x(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), R(e.options, T, "getRightFlatHeaders")), e.getCenterLeafHeaders = x(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
1953
+ return Ie(n, i, e, "right");
1954
+ }, x(e.options, k, "getRightHeaderGroups")), e.getFooterGroups = w(() => [e.getHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getFooterGroups")), e.getLeftFooterGroups = w(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getLeftFooterGroups")), e.getCenterFooterGroups = w(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getCenterFooterGroups")), e.getRightFooterGroups = w(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), x(e.options, k, "getRightFooterGroups")), e.getFlatHeaders = w(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getFlatHeaders")), e.getLeftFlatHeaders = w(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getLeftFlatHeaders")), e.getCenterFlatHeaders = w(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getCenterFlatHeaders")), e.getRightFlatHeaders = w(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), x(e.options, k, "getRightFlatHeaders")), e.getCenterLeafHeaders = w(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
1919
1955
  var o;
1920
1956
  return !((o = t.subHeaders) != null && o.length);
1921
- }), R(e.options, T, "getCenterLeafHeaders")), e.getLeftLeafHeaders = x(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
1957
+ }), x(e.options, k, "getCenterLeafHeaders")), e.getLeftLeafHeaders = w(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
1922
1958
  var o;
1923
1959
  return !((o = t.subHeaders) != null && o.length);
1924
- }), R(e.options, T, "getLeftLeafHeaders")), e.getRightLeafHeaders = x(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
1960
+ }), x(e.options, k, "getLeftLeafHeaders")), e.getRightLeafHeaders = w(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
1925
1961
  var o;
1926
1962
  return !((o = t.subHeaders) != null && o.length);
1927
- }), R(e.options, T, "getRightLeafHeaders")), e.getLeafHeaders = x(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
1963
+ }), x(e.options, k, "getRightLeafHeaders")), e.getLeafHeaders = w(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
1928
1964
  var r, i, s, a, u, g;
1929
1965
  return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (a = t[0]) == null ? void 0 : a.headers) != null ? s : [], ...(u = (g = o[0]) == null ? void 0 : g.headers) != null ? u : []].map((c) => c.getLeafHeaders()).flat();
1930
- }, R(e.options, T, "getLeafHeaders"));
1966
+ }, x(e.options, k, "getLeafHeaders"));
1931
1967
  }
1932
1968
  };
1933
- function Fe(e, n, t, o) {
1969
+ function Ie(e, n, t, o) {
1934
1970
  var r, i;
1935
1971
  let s = 0;
1936
1972
  const a = function(f, d) {
@@ -1949,34 +1985,34 @@ function Fe(e, n, t, o) {
1949
1985
  }, m = [];
1950
1986
  f.forEach((C) => {
1951
1987
  const v = [...m].reverse()[0], _ = C.column.depth === p.depth;
1952
- let y, w = !1;
1953
- if (_ && C.column.parent ? y = C.column.parent : (y = C.column, w = !0), v && (v == null ? void 0 : v.column) === y)
1988
+ let R, j = !1;
1989
+ if (_ && C.column.parent ? R = C.column.parent : (R = C.column, j = !0), v && (v == null ? void 0 : v.column) === R)
1954
1990
  v.subHeaders.push(C);
1955
1991
  else {
1956
- const I = Dt(t, y, {
1957
- id: [o, d, y.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
1958
- isPlaceholder: w,
1959
- placeholderId: w ? `${m.filter((L) => L.column === y).length}` : void 0,
1992
+ const A = Vt(t, R, {
1993
+ id: [o, d, R.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
1994
+ isPlaceholder: j,
1995
+ placeholderId: j ? `${m.filter((I) => I.column === R).length}` : void 0,
1960
1996
  depth: d,
1961
1997
  index: m.length
1962
1998
  });
1963
- I.subHeaders.push(C), m.push(I);
1999
+ A.subHeaders.push(C), m.push(A);
1964
2000
  }
1965
2001
  p.headers.push(C), C.headerGroup = p;
1966
2002
  }), u.push(p), d > 0 && g(m, d - 1);
1967
- }, c = n.map((f, d) => Dt(t, f, {
2003
+ }, c = n.map((f, d) => Vt(t, f, {
1968
2004
  depth: s,
1969
2005
  index: d
1970
2006
  }));
1971
2007
  g(c, s - 1), u.reverse();
1972
- const S = (f) => f.filter((p) => p.column.getIsVisible()).map((p) => {
2008
+ const h = (f) => f.filter((p) => p.column.getIsVisible()).map((p) => {
1973
2009
  let m = 0, C = 0, v = [0];
1974
- p.subHeaders && p.subHeaders.length ? (v = [], S(p.subHeaders).forEach((y) => {
2010
+ p.subHeaders && p.subHeaders.length ? (v = [], h(p.subHeaders).forEach((R) => {
1975
2011
  let {
1976
- colSpan: w,
1977
- rowSpan: I
1978
- } = y;
1979
- m += w, v.push(I);
2012
+ colSpan: j,
2013
+ rowSpan: A
2014
+ } = R;
2015
+ m += j, v.push(A);
1980
2016
  })) : m = 1;
1981
2017
  const _ = Math.min(...v);
1982
2018
  return C = C + _, p.colSpan = m, p.rowSpan = C, {
@@ -1984,9 +2020,9 @@ function Fe(e, n, t, o) {
1984
2020
  rowSpan: C
1985
2021
  };
1986
2022
  });
1987
- return S((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
2023
+ return h((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
1988
2024
  }
1989
- const Ho = (e, n, t, o, r, i, s) => {
2025
+ const Bo = (e, n, t, o, r, i, s) => {
1990
2026
  let a = {
1991
2027
  id: n,
1992
2028
  index: o,
@@ -2014,7 +2050,7 @@ const Ho = (e, n, t, o, r, i, s) => {
2014
2050
  return (g = a.getValue(u)) != null ? g : e.options.renderFallbackValue;
2015
2051
  },
2016
2052
  subRows: [],
2017
- getLeafRows: () => Lo(a.subRows, (u) => u.subRows),
2053
+ getLeafRows: () => zo(a.subRows, (u) => u.subRows),
2018
2054
  getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
2019
2055
  getParentRows: () => {
2020
2056
  let u = [], g = a;
@@ -2025,62 +2061,62 @@ const Ho = (e, n, t, o, r, i, s) => {
2025
2061
  }
2026
2062
  return u.reverse();
2027
2063
  },
2028
- getAllCells: x(() => [e.getAllLeafColumns()], (u) => u.map((g) => Oo(e, a, g, g.id)), R(e.options, "debugRows", "getAllCells")),
2029
- _getAllCellsByColumnId: x(() => [a.getAllCells()], (u) => u.reduce((g, c) => (g[c.column.id] = c, g), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
2064
+ getAllCells: w(() => [e.getAllLeafColumns()], (u) => u.map((g) => Go(e, a, g, g.id)), x(e.options, "debugRows", "getAllCells")),
2065
+ _getAllCellsByColumnId: w(() => [a.getAllCells()], (u) => u.reduce((g, c) => (g[c.column.id] = c, g), {}), x(e.options, "debugRows", "getAllCellsByColumnId"))
2030
2066
  };
2031
2067
  for (let u = 0; u < e._features.length; u++) {
2032
2068
  const g = e._features[u];
2033
2069
  g == null || g.createRow == null || g.createRow(a, e);
2034
2070
  }
2035
2071
  return a;
2036
- }, qo = {
2072
+ }, Uo = {
2037
2073
  createColumn: (e, n) => {
2038
2074
  e._getFacetedRowModel = n.options.getFacetedRowModel && n.options.getFacetedRowModel(n, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : n.getPreFilteredRowModel(), e._getFacetedUniqueValues = n.options.getFacetedUniqueValues && n.options.getFacetedUniqueValues(n, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = n.options.getFacetedMinMaxValues && n.options.getFacetedMinMaxValues(n, e.id), e.getFacetedMinMaxValues = () => {
2039
2075
  if (e._getFacetedMinMaxValues)
2040
2076
  return e._getFacetedMinMaxValues();
2041
2077
  };
2042
2078
  }
2043
- }, sn = (e, n, t) => {
2079
+ }, an = (e, n, t) => {
2044
2080
  var o, r;
2045
2081
  const i = t == null || (o = t.toString()) == null ? void 0 : o.toLowerCase();
2046
2082
  return !!(!((r = e.getValue(n)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
2047
2083
  };
2048
- sn.autoRemove = (e) => H(e);
2049
- const ln = (e, n, t) => {
2084
+ an.autoRemove = (e) => U(e);
2085
+ const un = (e, n, t) => {
2050
2086
  var o;
2051
2087
  return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null) && o.includes(t));
2052
2088
  };
2053
- ln.autoRemove = (e) => H(e);
2054
- const an = (e, n, t) => {
2089
+ un.autoRemove = (e) => U(e);
2090
+ const dn = (e, n, t) => {
2055
2091
  var o;
2056
2092
  return ((o = e.getValue(n)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
2057
2093
  };
2058
- an.autoRemove = (e) => H(e);
2059
- const un = (e, n, t) => {
2094
+ dn.autoRemove = (e) => U(e);
2095
+ const gn = (e, n, t) => {
2060
2096
  var o;
2061
2097
  return (o = e.getValue(n)) == null ? void 0 : o.includes(t);
2062
2098
  };
2063
- un.autoRemove = (e) => H(e);
2064
- const dn = (e, n, t) => !t.some((o) => {
2099
+ gn.autoRemove = (e) => U(e);
2100
+ const cn = (e, n, t) => !t.some((o) => {
2065
2101
  var r;
2066
2102
  return !((r = e.getValue(n)) != null && r.includes(o));
2067
2103
  });
2068
- dn.autoRemove = (e) => H(e) || !(e != null && e.length);
2069
- const gn = (e, n, t) => t.some((o) => {
2104
+ cn.autoRemove = (e) => U(e) || !(e != null && e.length);
2105
+ const fn = (e, n, t) => t.some((o) => {
2070
2106
  var r;
2071
2107
  return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
2072
2108
  });
2073
- gn.autoRemove = (e) => H(e) || !(e != null && e.length);
2074
- const cn = (e, n, t) => e.getValue(n) === t;
2075
- cn.autoRemove = (e) => H(e);
2076
- const fn = (e, n, t) => e.getValue(n) == t;
2077
- fn.autoRemove = (e) => H(e);
2078
- const ut = (e, n, t) => {
2109
+ fn.autoRemove = (e) => U(e) || !(e != null && e.length);
2110
+ const pn = (e, n, t) => e.getValue(n) === t;
2111
+ pn.autoRemove = (e) => U(e);
2112
+ const mn = (e, n, t) => e.getValue(n) == t;
2113
+ mn.autoRemove = (e) => U(e);
2114
+ const gt = (e, n, t) => {
2079
2115
  let [o, r] = t;
2080
2116
  const i = e.getValue(n);
2081
2117
  return i >= o && i <= r;
2082
2118
  };
2083
- ut.resolveFilterValue = (e) => {
2119
+ gt.resolveFilterValue = (e) => {
2084
2120
  let [n, t] = e, o = typeof n != "number" ? parseFloat(n) : n, r = typeof t != "number" ? parseFloat(t) : t, i = n === null || Number.isNaN(o) ? -1 / 0 : o, s = t === null || Number.isNaN(r) ? 1 / 0 : r;
2085
2121
  if (i > s) {
2086
2122
  const a = i;
@@ -2088,22 +2124,22 @@ ut.resolveFilterValue = (e) => {
2088
2124
  }
2089
2125
  return [i, s];
2090
2126
  };
2091
- ut.autoRemove = (e) => H(e) || H(e[0]) && H(e[1]);
2092
- const U = {
2093
- includesString: sn,
2094
- includesStringSensitive: ln,
2095
- equalsString: an,
2096
- arrIncludes: un,
2097
- arrIncludesAll: dn,
2098
- arrIncludesSome: gn,
2099
- equals: cn,
2100
- weakEquals: fn,
2101
- inNumberRange: ut
2127
+ gt.autoRemove = (e) => U(e) || U(e[0]) && U(e[1]);
2128
+ const X = {
2129
+ includesString: an,
2130
+ includesStringSensitive: un,
2131
+ equalsString: dn,
2132
+ arrIncludes: gn,
2133
+ arrIncludesAll: cn,
2134
+ arrIncludesSome: fn,
2135
+ equals: pn,
2136
+ weakEquals: mn,
2137
+ inNumberRange: gt
2102
2138
  };
2103
- function H(e) {
2139
+ function U(e) {
2104
2140
  return e == null || e === "";
2105
2141
  }
2106
- const Bo = {
2142
+ const Ko = {
2107
2143
  getDefaultColumnDef: () => ({
2108
2144
  filterFn: "auto"
2109
2145
  }),
@@ -2112,19 +2148,19 @@ const Bo = {
2112
2148
  ...e
2113
2149
  }),
2114
2150
  getDefaultOptions: (e) => ({
2115
- onColumnFiltersChange: O("columnFilters", e),
2151
+ onColumnFiltersChange: G("columnFilters", e),
2116
2152
  filterFromLeafRows: !1,
2117
2153
  maxLeafRowFilterDepth: 100
2118
2154
  }),
2119
2155
  createColumn: (e, n) => {
2120
2156
  e.getAutoFilterFn = () => {
2121
2157
  const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
2122
- return typeof o == "string" ? U.includesString : typeof o == "number" ? U.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? U.equals : Array.isArray(o) ? U.arrIncludes : U.weakEquals;
2158
+ return typeof o == "string" ? X.includesString : typeof o == "number" ? X.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? X.equals : Array.isArray(o) ? X.arrIncludes : X.weakEquals;
2123
2159
  }, e.getFilterFn = () => {
2124
2160
  var t, o;
2125
- return De(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
2161
+ return be(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
2126
2162
  // @ts-ignore
2127
- (t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : U[e.columnDef.filterFn]
2163
+ (t = (o = n.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? t : X[e.columnDef.filterFn]
2128
2164
  );
2129
2165
  }, e.getCanFilter = () => {
2130
2166
  var t, o, r;
@@ -2137,8 +2173,8 @@ const Bo = {
2137
2173
  return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
2138
2174
  }, e.setFilterValue = (t) => {
2139
2175
  n.setColumnFilters((o) => {
2140
- const r = e.getFilterFn(), i = o == null ? void 0 : o.find((c) => c.id === e.id), s = X(t, i ? i.value : void 0);
2141
- if (Vt(r, s, e)) {
2176
+ const r = e.getFilterFn(), i = o == null ? void 0 : o.find((c) => c.id === e.id), s = Z(t, i ? i.value : void 0);
2177
+ if (Tt(r, s, e)) {
2142
2178
  var a;
2143
2179
  return (a = o == null ? void 0 : o.filter((c) => c.id !== e.id)) != null ? a : [];
2144
2180
  }
@@ -2161,11 +2197,11 @@ const Bo = {
2161
2197
  e.setColumnFilters = (n) => {
2162
2198
  const t = e.getAllLeafColumns(), o = (r) => {
2163
2199
  var i;
2164
- return (i = X(n, r)) == null ? void 0 : i.filter((s) => {
2200
+ return (i = Z(n, r)) == null ? void 0 : i.filter((s) => {
2165
2201
  const a = t.find((u) => u.id === s.id);
2166
2202
  if (a) {
2167
2203
  const u = a.getFilterFn();
2168
- if (Vt(u, s.value, a))
2204
+ if (Tt(u, s.value, a))
2169
2205
  return !1;
2170
2206
  }
2171
2207
  return !0;
@@ -2178,57 +2214,57 @@ const Bo = {
2178
2214
  }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
2179
2215
  }
2180
2216
  };
2181
- function Vt(e, n, t) {
2217
+ function Tt(e, n, t) {
2182
2218
  return (e && e.autoRemove ? e.autoRemove(n, t) : !1) || typeof n > "u" || typeof n == "string" && !n;
2183
2219
  }
2184
- const Uo = (e, n, t) => t.reduce((o, r) => {
2220
+ const Yo = (e, n, t) => t.reduce((o, r) => {
2185
2221
  const i = r.getValue(e);
2186
2222
  return o + (typeof i == "number" ? i : 0);
2187
- }, 0), Ko = (e, n, t) => {
2223
+ }, 0), Wo = (e, n, t) => {
2188
2224
  let o;
2189
2225
  return t.forEach((r) => {
2190
2226
  const i = r.getValue(e);
2191
2227
  i != null && (o > i || o === void 0 && i >= i) && (o = i);
2192
2228
  }), o;
2193
- }, Yo = (e, n, t) => {
2229
+ }, Xo = (e, n, t) => {
2194
2230
  let o;
2195
2231
  return t.forEach((r) => {
2196
2232
  const i = r.getValue(e);
2197
2233
  i != null && (o < i || o === void 0 && i >= i) && (o = i);
2198
2234
  }), o;
2199
- }, Wo = (e, n, t) => {
2235
+ }, Jo = (e, n, t) => {
2200
2236
  let o, r;
2201
2237
  return t.forEach((i) => {
2202
2238
  const s = i.getValue(e);
2203
2239
  s != null && (o === void 0 ? s >= s && (o = r = s) : (o > s && (o = s), r < s && (r = s)));
2204
2240
  }), [o, r];
2205
- }, Xo = (e, n) => {
2241
+ }, Qo = (e, n) => {
2206
2242
  let t = 0, o = 0;
2207
2243
  if (n.forEach((r) => {
2208
2244
  let i = r.getValue(e);
2209
2245
  i != null && (i = +i) >= i && (++t, o += i);
2210
2246
  }), t) return o / t;
2211
- }, Jo = (e, n) => {
2247
+ }, Zo = (e, n) => {
2212
2248
  if (!n.length)
2213
2249
  return;
2214
2250
  const t = n.map((i) => i.getValue(e));
2215
- if (!ko(t))
2251
+ if (!Oo(t))
2216
2252
  return;
2217
2253
  if (t.length === 1)
2218
2254
  return t[0];
2219
2255
  const o = Math.floor(t.length / 2), r = t.sort((i, s) => i - s);
2220
2256
  return t.length % 2 !== 0 ? r[o] : (r[o - 1] + r[o]) / 2;
2221
- }, Qo = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), Zo = (e, n) => new Set(n.map((t) => t.getValue(e))).size, er = (e, n) => n.length, Le = {
2222
- sum: Uo,
2223
- min: Ko,
2224
- max: Yo,
2225
- extent: Wo,
2226
- mean: Xo,
2227
- median: Jo,
2228
- unique: Qo,
2229
- uniqueCount: Zo,
2230
- count: er
2231
- }, tr = {
2257
+ }, er = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), tr = (e, n) => new Set(n.map((t) => t.getValue(e))).size, nr = (e, n) => n.length, Oe = {
2258
+ sum: Yo,
2259
+ min: Wo,
2260
+ max: Xo,
2261
+ extent: Jo,
2262
+ mean: Qo,
2263
+ median: Zo,
2264
+ unique: er,
2265
+ uniqueCount: tr,
2266
+ count: nr
2267
+ }, or = {
2232
2268
  getDefaultColumnDef: () => ({
2233
2269
  aggregatedCell: (e) => {
2234
2270
  var n, t;
@@ -2241,7 +2277,7 @@ const Uo = (e, n, t) => t.reduce((o, r) => {
2241
2277
  ...e
2242
2278
  }),
2243
2279
  getDefaultOptions: (e) => ({
2244
- onGroupingChange: O("grouping", e),
2280
+ onGroupingChange: G("grouping", e),
2245
2281
  groupedColumnMode: "reorder"
2246
2282
  }),
2247
2283
  createColumn: (e, n) => {
@@ -2264,14 +2300,14 @@ const Uo = (e, n, t) => t.reduce((o, r) => {
2264
2300
  }, e.getAutoAggregationFn = () => {
2265
2301
  const t = n.getCoreRowModel().flatRows[0], o = t == null ? void 0 : t.getValue(e.id);
2266
2302
  if (typeof o == "number")
2267
- return Le.sum;
2303
+ return Oe.sum;
2268
2304
  if (Object.prototype.toString.call(o) === "[object Date]")
2269
- return Le.extent;
2305
+ return Oe.extent;
2270
2306
  }, e.getAggregationFn = () => {
2271
2307
  var t, o;
2272
2308
  if (!e)
2273
2309
  throw new Error();
2274
- return De(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Le[e.columnDef.aggregationFn];
2310
+ return be(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (o = n.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? t : Oe[e.columnDef.aggregationFn];
2275
2311
  };
2276
2312
  },
2277
2313
  createTable: (e) => {
@@ -2295,27 +2331,27 @@ const Uo = (e, n, t) => t.reduce((o, r) => {
2295
2331
  };
2296
2332
  }
2297
2333
  };
2298
- function nr(e, n, t) {
2334
+ function rr(e, n, t) {
2299
2335
  if (!(n != null && n.length) || !t)
2300
2336
  return e;
2301
2337
  const o = e.filter((i) => !n.includes(i.id));
2302
2338
  return t === "remove" ? o : [...n.map((i) => e.find((s) => s.id === i)).filter(Boolean), ...o];
2303
2339
  }
2304
- const or = {
2340
+ const ir = {
2305
2341
  getInitialState: (e) => ({
2306
2342
  columnOrder: [],
2307
2343
  ...e
2308
2344
  }),
2309
2345
  getDefaultOptions: (e) => ({
2310
- onColumnOrderChange: O("columnOrder", e)
2346
+ onColumnOrderChange: G("columnOrder", e)
2311
2347
  }),
2312
2348
  createColumn: (e, n) => {
2313
- e.getIndex = x((t) => [me(n, t)], (t) => t.findIndex((o) => o.id === e.id), R(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
2349
+ e.getIndex = w((t) => [ve(n, t)], (t) => t.findIndex((o) => o.id === e.id), x(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
2314
2350
  var o;
2315
- return ((o = me(n, t)[0]) == null ? void 0 : o.id) === e.id;
2351
+ return ((o = ve(n, t)[0]) == null ? void 0 : o.id) === e.id;
2316
2352
  }, e.getIsLastColumn = (t) => {
2317
2353
  var o;
2318
- const r = me(n, t);
2354
+ const r = ve(n, t);
2319
2355
  return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
2320
2356
  };
2321
2357
  },
@@ -2323,7 +2359,7 @@ const or = {
2323
2359
  e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
2324
2360
  var t;
2325
2361
  e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
2326
- }, e._getOrderColumnsFn = x(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
2362
+ }, e._getOrderColumnsFn = w(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
2327
2363
  let i = [];
2328
2364
  if (!(n != null && n.length))
2329
2365
  i = r;
@@ -2335,19 +2371,19 @@ const or = {
2335
2371
  }
2336
2372
  i = [...i, ...a];
2337
2373
  }
2338
- return nr(i, t, o);
2339
- }, R(e.options, "debugTable", "_getOrderColumnsFn"));
2374
+ return rr(i, t, o);
2375
+ }, x(e.options, "debugTable", "_getOrderColumnsFn"));
2340
2376
  }
2341
- }, Oe = () => ({
2377
+ }, ze = () => ({
2342
2378
  left: [],
2343
2379
  right: []
2344
- }), rr = {
2380
+ }), sr = {
2345
2381
  getInitialState: (e) => ({
2346
- columnPinning: Oe(),
2382
+ columnPinning: ze(),
2347
2383
  ...e
2348
2384
  }),
2349
2385
  getDefaultOptions: (e) => ({
2350
- onColumnPinningChange: O("columnPinning", e)
2386
+ onColumnPinningChange: G("columnPinning", e)
2351
2387
  }),
2352
2388
  createColumn: (e, n) => {
2353
2389
  e.pin = (t) => {
@@ -2357,20 +2393,20 @@ const or = {
2357
2393
  if (t === "right") {
2358
2394
  var a, u;
2359
2395
  return {
2360
- left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((S) => !(o != null && o.includes(S))),
2361
- right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((S) => !(o != null && o.includes(S))), ...o]
2396
+ left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((h) => !(o != null && o.includes(h))),
2397
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((h) => !(o != null && o.includes(h))), ...o]
2362
2398
  };
2363
2399
  }
2364
2400
  if (t === "left") {
2365
2401
  var g, c;
2366
2402
  return {
2367
- left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((S) => !(o != null && o.includes(S))), ...o],
2368
- right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((S) => !(o != null && o.includes(S)))
2403
+ left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((h) => !(o != null && o.includes(h))), ...o],
2404
+ right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((h) => !(o != null && o.includes(h)))
2369
2405
  };
2370
2406
  }
2371
2407
  return {
2372
- left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((S) => !(o != null && o.includes(S))),
2373
- right: ((s = r == null ? void 0 : r.right) != null ? s : []).filter((S) => !(o != null && o.includes(S)))
2408
+ left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((h) => !(o != null && o.includes(h))),
2409
+ right: ((s = r == null ? void 0 : r.right) != null ? s : []).filter((h) => !(o != null && o.includes(h)))
2374
2410
  };
2375
2411
  });
2376
2412
  }, e.getCanPin = () => e.getLeafColumns().some((o) => {
@@ -2389,21 +2425,21 @@ const or = {
2389
2425
  };
2390
2426
  },
2391
2427
  createRow: (e, n) => {
2392
- e.getCenterVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
2428
+ e.getCenterVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
2393
2429
  const i = [...o ?? [], ...r ?? []];
2394
2430
  return t.filter((s) => !i.includes(s.column.id));
2395
- }, R(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2431
+ }, x(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2396
2432
  ...i,
2397
2433
  position: "left"
2398
- })), R(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = x(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2434
+ })), x(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = w(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
2399
2435
  ...i,
2400
2436
  position: "right"
2401
- })), R(n.options, "debugRows", "getRightVisibleCells"));
2437
+ })), x(n.options, "debugRows", "getRightVisibleCells"));
2402
2438
  },
2403
2439
  createTable: (e) => {
2404
2440
  e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
2405
2441
  var t, o;
2406
- return e.setColumnPinning(n ? Oe() : (t = (o = e.initialState) == null ? void 0 : o.columnPinning) != null ? t : Oe());
2442
+ return e.setColumnPinning(n ? ze() : (t = (o = e.initialState) == null ? void 0 : o.columnPinning) != null ? t : ze());
2407
2443
  }, e.getIsSomeColumnsPinned = (n) => {
2408
2444
  var t;
2409
2445
  const o = e.getState().columnPinning;
@@ -2412,45 +2448,45 @@ const or = {
2412
2448
  return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
2413
2449
  }
2414
2450
  return !!((t = o[n]) != null && t.length);
2415
- }, e.getLeftLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = x(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
2451
+ }, e.getLeftLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), x(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = w(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
2416
2452
  const r = [...t ?? [], ...o ?? []];
2417
2453
  return n.filter((i) => !r.includes(i.id));
2418
- }, R(e.options, "debugColumns", "getCenterLeafColumns"));
2454
+ }, x(e.options, "debugColumns", "getCenterLeafColumns"));
2419
2455
  }
2420
2456
  };
2421
- function ir(e) {
2457
+ function lr(e) {
2422
2458
  return e || (typeof document < "u" ? document : null);
2423
2459
  }
2424
- const Ie = {
2460
+ const Pe = {
2425
2461
  size: 150,
2426
2462
  minSize: 20,
2427
2463
  maxSize: Number.MAX_SAFE_INTEGER
2428
- }, ze = () => ({
2464
+ }, Ge = () => ({
2429
2465
  startOffset: null,
2430
2466
  startSize: null,
2431
2467
  deltaOffset: null,
2432
2468
  deltaPercentage: null,
2433
2469
  isResizingColumn: !1,
2434
2470
  columnSizingStart: []
2435
- }), sr = {
2436
- getDefaultColumnDef: () => Ie,
2471
+ }), ar = {
2472
+ getDefaultColumnDef: () => Pe,
2437
2473
  getInitialState: (e) => ({
2438
2474
  columnSizing: {},
2439
- columnSizingInfo: ze(),
2475
+ columnSizingInfo: Ge(),
2440
2476
  ...e
2441
2477
  }),
2442
2478
  getDefaultOptions: (e) => ({
2443
2479
  columnResizeMode: "onEnd",
2444
2480
  columnResizeDirection: "ltr",
2445
- onColumnSizingChange: O("columnSizing", e),
2446
- onColumnSizingInfoChange: O("columnSizingInfo", e)
2481
+ onColumnSizingChange: G("columnSizing", e),
2482
+ onColumnSizingInfoChange: G("columnSizingInfo", e)
2447
2483
  }),
2448
2484
  createColumn: (e, n) => {
2449
2485
  e.getSize = () => {
2450
2486
  var t, o, r;
2451
2487
  const i = n.getState().columnSizing[e.id];
2452
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Ie.minSize, (o = i ?? e.columnDef.size) != null ? o : Ie.size), (r = e.columnDef.maxSize) != null ? r : Ie.maxSize);
2453
- }, e.getStart = x((t) => [t, me(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), R(n.options, "debugColumns", "getStart")), e.getAfter = x((t) => [t, me(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), R(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
2488
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Pe.minSize, (o = i ?? e.columnDef.size) != null ? o : Pe.size), (r = e.columnDef.maxSize) != null ? r : Pe.maxSize);
2489
+ }, e.getStart = w((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getStart")), e.getAfter = w((t) => [t, ve(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), x(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
2454
2490
  n.setColumnSizing((t) => {
2455
2491
  let {
2456
2492
  [e.id]: o,
@@ -2484,25 +2520,25 @@ const Ie = {
2484
2520
  }, e.getResizeHandler = (t) => {
2485
2521
  const o = n.getColumn(e.column.id), r = o == null ? void 0 : o.getCanResize();
2486
2522
  return (i) => {
2487
- if (!o || !r || (i.persist == null || i.persist(), Ge(i) && i.touches && i.touches.length > 1))
2523
+ if (!o || !r || (i.persist == null || i.persist(), He(i) && i.touches && i.touches.length > 1))
2488
2524
  return;
2489
- const s = e.getSize(), a = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], u = Ge(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, c = (v, _) => {
2490
- typeof _ == "number" && (n.setColumnSizingInfo((y) => {
2491
- var w, I;
2492
- const L = n.options.columnResizeDirection === "rtl" ? -1 : 1, ve = (_ - ((w = y == null ? void 0 : y.startOffset) != null ? w : 0)) * L, Ce = Math.max(ve / ((I = y == null ? void 0 : y.startSize) != null ? I : 0), -0.999999);
2493
- return y.columnSizingStart.forEach((ae) => {
2494
- let [Ve, we] = ae;
2495
- g[Ve] = Math.round(Math.max(we + we * Ce, 0) * 100) / 100;
2525
+ const s = e.getSize(), a = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], u = He(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, c = (v, _) => {
2526
+ typeof _ == "number" && (n.setColumnSizingInfo((R) => {
2527
+ var j, A;
2528
+ const I = n.options.columnResizeDirection === "rtl" ? -1 : 1, V = (_ - ((j = R == null ? void 0 : R.startOffset) != null ? j : 0)) * I, H = Math.max(V / ((A = R == null ? void 0 : R.startSize) != null ? A : 0), -0.999999);
2529
+ return R.columnSizingStart.forEach((ge) => {
2530
+ let [Ve, xe] = ge;
2531
+ g[Ve] = Math.round(Math.max(xe + xe * H, 0) * 100) / 100;
2496
2532
  }), {
2497
- ...y,
2498
- deltaOffset: ve,
2499
- deltaPercentage: Ce
2533
+ ...R,
2534
+ deltaOffset: V,
2535
+ deltaPercentage: H
2500
2536
  };
2501
- }), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((y) => ({
2502
- ...y,
2537
+ }), (n.options.columnResizeMode === "onChange" || v === "end") && n.setColumnSizing((R) => ({
2538
+ ...R,
2503
2539
  ...g
2504
2540
  })));
2505
- }, S = (v) => c("move", v), f = (v) => {
2541
+ }, h = (v) => c("move", v), f = (v) => {
2506
2542
  c("end", v), n.setColumnSizingInfo((_) => ({
2507
2543
  ..._,
2508
2544
  isResizingColumn: !1,
@@ -2512,21 +2548,21 @@ const Ie = {
2512
2548
  deltaPercentage: null,
2513
2549
  columnSizingStart: []
2514
2550
  }));
2515
- }, d = ir(t), p = {
2516
- moveHandler: (v) => S(v.clientX),
2551
+ }, d = lr(t), p = {
2552
+ moveHandler: (v) => h(v.clientX),
2517
2553
  upHandler: (v) => {
2518
2554
  d == null || d.removeEventListener("mousemove", p.moveHandler), d == null || d.removeEventListener("mouseup", p.upHandler), f(v.clientX);
2519
2555
  }
2520
2556
  }, m = {
2521
- moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()), S(v.touches[0].clientX), !1),
2557
+ moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()), h(v.touches[0].clientX), !1),
2522
2558
  upHandler: (v) => {
2523
2559
  var _;
2524
2560
  d == null || d.removeEventListener("touchmove", m.moveHandler), d == null || d.removeEventListener("touchend", m.upHandler), v.cancelable && (v.preventDefault(), v.stopPropagation()), f((_ = v.touches[0]) == null ? void 0 : _.clientX);
2525
2561
  }
2526
- }, C = lr() ? {
2562
+ }, C = ur() ? {
2527
2563
  passive: !1
2528
2564
  } : !1;
2529
- Ge(i) ? (d == null || d.addEventListener("touchmove", m.moveHandler, C), d == null || d.addEventListener("touchend", m.upHandler, C)) : (d == null || d.addEventListener("mousemove", p.moveHandler, C), d == null || d.addEventListener("mouseup", p.upHandler, C)), n.setColumnSizingInfo((v) => ({
2565
+ He(i) ? (d == null || d.addEventListener("touchmove", m.moveHandler, C), d == null || d.addEventListener("touchend", m.upHandler, C)) : (d == null || d.addEventListener("mousemove", p.moveHandler, C), d == null || d.addEventListener("mouseup", p.upHandler, C)), n.setColumnSizingInfo((v) => ({
2530
2566
  ...v,
2531
2567
  startOffset: u,
2532
2568
  startSize: s,
@@ -2544,7 +2580,7 @@ const Ie = {
2544
2580
  e.setColumnSizing(n ? {} : (t = e.initialState.columnSizing) != null ? t : {});
2545
2581
  }, e.resetHeaderSizeInfo = (n) => {
2546
2582
  var t;
2547
- e.setColumnSizingInfo(n ? ze() : (t = e.initialState.columnSizingInfo) != null ? t : ze());
2583
+ e.setColumnSizingInfo(n ? Ge() : (t = e.initialState.columnSizingInfo) != null ? t : Ge());
2548
2584
  }, e.getTotalSize = () => {
2549
2585
  var n, t;
2550
2586
  return (n = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? n : 0;
@@ -2560,9 +2596,9 @@ const Ie = {
2560
2596
  };
2561
2597
  }
2562
2598
  };
2563
- let Pe = null;
2564
- function lr() {
2565
- if (typeof Pe == "boolean") return Pe;
2599
+ let Ee = null;
2600
+ function ur() {
2601
+ if (typeof Ee == "boolean") return Ee;
2566
2602
  let e = !1;
2567
2603
  try {
2568
2604
  const n = {
@@ -2575,18 +2611,18 @@ function lr() {
2575
2611
  } catch {
2576
2612
  e = !1;
2577
2613
  }
2578
- return Pe = e, Pe;
2614
+ return Ee = e, Ee;
2579
2615
  }
2580
- function Ge(e) {
2616
+ function He(e) {
2581
2617
  return e.type === "touchstart";
2582
2618
  }
2583
- const ar = {
2619
+ const dr = {
2584
2620
  getInitialState: (e) => ({
2585
2621
  columnVisibility: {},
2586
2622
  ...e
2587
2623
  }),
2588
2624
  getDefaultOptions: (e) => ({
2589
- onColumnVisibilityChange: O("columnVisibility", e)
2625
+ onColumnVisibilityChange: G("columnVisibility", e)
2590
2626
  }),
2591
2627
  createColumn: (e, n) => {
2592
2628
  e.toggleVisibility = (t) => {
@@ -2606,10 +2642,10 @@ const ar = {
2606
2642
  };
2607
2643
  },
2608
2644
  createRow: (e, n) => {
2609
- e._getAllVisibleCells = x(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), R(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = x(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], R(n.options, "debugRows", "getVisibleCells"));
2645
+ e._getAllVisibleCells = w(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), x(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = w(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], x(n.options, "debugRows", "getVisibleCells"));
2610
2646
  },
2611
2647
  createTable: (e) => {
2612
- const n = (t, o) => x(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), R(e.options, "debugColumns", t));
2648
+ const n = (t, o) => w(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), x(e.options, "debugColumns", t));
2613
2649
  e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
2614
2650
  var o;
2615
2651
  e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
@@ -2625,23 +2661,23 @@ const ar = {
2625
2661
  };
2626
2662
  }
2627
2663
  };
2628
- function me(e, n) {
2664
+ function ve(e, n) {
2629
2665
  return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
2630
2666
  }
2631
- const ur = {
2667
+ const gr = {
2632
2668
  createTable: (e) => {
2633
2669
  e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
2634
2670
  if (e._getGlobalFacetedMinMaxValues)
2635
2671
  return e._getGlobalFacetedMinMaxValues();
2636
2672
  };
2637
2673
  }
2638
- }, dr = {
2674
+ }, cr = {
2639
2675
  getInitialState: (e) => ({
2640
2676
  globalFilter: void 0,
2641
2677
  ...e
2642
2678
  }),
2643
2679
  getDefaultOptions: (e) => ({
2644
- onGlobalFilterChange: O("globalFilter", e),
2680
+ onGlobalFilterChange: G("globalFilter", e),
2645
2681
  globalFilterFn: "auto",
2646
2682
  getColumnCanGlobalFilter: (n) => {
2647
2683
  var t;
@@ -2656,25 +2692,25 @@ const ur = {
2656
2692
  };
2657
2693
  },
2658
2694
  createTable: (e) => {
2659
- e.getGlobalAutoFilterFn = () => U.includesString, e.getGlobalFilterFn = () => {
2695
+ e.getGlobalAutoFilterFn = () => X.includesString, e.getGlobalFilterFn = () => {
2660
2696
  var n, t;
2661
2697
  const {
2662
2698
  globalFilterFn: o
2663
2699
  } = e.options;
2664
- return De(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : U[o];
2700
+ return be(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[o]) != null ? n : X[o];
2665
2701
  }, e.setGlobalFilter = (n) => {
2666
2702
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
2667
2703
  }, e.resetGlobalFilter = (n) => {
2668
2704
  e.setGlobalFilter(n ? void 0 : e.initialState.globalFilter);
2669
2705
  };
2670
2706
  }
2671
- }, gr = {
2707
+ }, fr = {
2672
2708
  getInitialState: (e) => ({
2673
2709
  expanded: {},
2674
2710
  ...e
2675
2711
  }),
2676
2712
  getDefaultOptions: (e) => ({
2677
- onExpandedChange: O("expanded", e),
2713
+ onExpandedChange: G("expanded", e),
2678
2714
  paginateExpandedRows: !0
2679
2715
  }),
2680
2716
  createTable: (e) => {
@@ -2755,19 +2791,19 @@ const ur = {
2755
2791
  };
2756
2792
  };
2757
2793
  }
2758
- }, Je = 0, Qe = 10, He = () => ({
2759
- pageIndex: Je,
2760
- pageSize: Qe
2761
- }), cr = {
2794
+ }, Qe = 0, Ze = 10, qe = () => ({
2795
+ pageIndex: Qe,
2796
+ pageSize: Ze
2797
+ }), pr = {
2762
2798
  getInitialState: (e) => ({
2763
2799
  ...e,
2764
2800
  pagination: {
2765
- ...He(),
2801
+ ...qe(),
2766
2802
  ...e == null ? void 0 : e.pagination
2767
2803
  }
2768
2804
  }),
2769
2805
  getDefaultOptions: (e) => ({
2770
- onPaginationChange: O("pagination", e)
2806
+ onPaginationChange: G("pagination", e)
2771
2807
  }),
2772
2808
  createTable: (e) => {
2773
2809
  let n = !1, t = !1;
@@ -2786,14 +2822,14 @@ const ur = {
2786
2822
  });
2787
2823
  }
2788
2824
  }, e.setPagination = (o) => {
2789
- const r = (i) => X(o, i);
2825
+ const r = (i) => Z(o, i);
2790
2826
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
2791
2827
  }, e.resetPagination = (o) => {
2792
2828
  var r;
2793
- e.setPagination(o ? He() : (r = e.initialState.pagination) != null ? r : He());
2829
+ e.setPagination(o ? qe() : (r = e.initialState.pagination) != null ? r : qe());
2794
2830
  }, e.setPageIndex = (o) => {
2795
2831
  e.setPagination((r) => {
2796
- let i = X(o, r.pageIndex);
2832
+ let i = Z(o, r.pageIndex);
2797
2833
  const s = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
2798
2834
  return i = Math.max(0, Math.min(i, s)), {
2799
2835
  ...r,
@@ -2802,13 +2838,13 @@ const ur = {
2802
2838
  });
2803
2839
  }, e.resetPageIndex = (o) => {
2804
2840
  var r, i;
2805
- e.setPageIndex(o ? Je : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Je);
2841
+ e.setPageIndex(o ? Qe : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Qe);
2806
2842
  }, e.resetPageSize = (o) => {
2807
2843
  var r, i;
2808
- e.setPageSize(o ? Qe : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Qe);
2844
+ e.setPageSize(o ? Ze : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Ze);
2809
2845
  }, e.setPageSize = (o) => {
2810
2846
  e.setPagination((r) => {
2811
- const i = Math.max(1, X(o, r.pageSize)), s = r.pageSize * r.pageIndex, a = Math.floor(s / i);
2847
+ const i = Math.max(1, Z(o, r.pageSize)), s = r.pageSize * r.pageIndex, a = Math.floor(s / i);
2812
2848
  return {
2813
2849
  ...r,
2814
2850
  pageIndex: a,
@@ -2817,15 +2853,15 @@ const ur = {
2817
2853
  });
2818
2854
  }, e.setPageCount = (o) => e.setPagination((r) => {
2819
2855
  var i;
2820
- let s = X(o, (i = e.options.pageCount) != null ? i : -1);
2856
+ let s = Z(o, (i = e.options.pageCount) != null ? i : -1);
2821
2857
  return typeof s == "number" && (s = Math.max(-1, s)), {
2822
2858
  ...r,
2823
2859
  pageCount: s
2824
2860
  };
2825
- }), e.getPageOptions = x(() => [e.getPageCount()], (o) => {
2861
+ }), e.getPageOptions = w(() => [e.getPageCount()], (o) => {
2826
2862
  let r = [];
2827
2863
  return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, s) => s)), r;
2828
- }, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
2864
+ }, x(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
2829
2865
  const {
2830
2866
  pageIndex: o
2831
2867
  } = e.getState().pagination, r = e.getPageCount();
@@ -2838,16 +2874,16 @@ const ur = {
2838
2874
  return (o = e.options.rowCount) != null ? o : e.getPrePaginationRowModel().rows.length;
2839
2875
  };
2840
2876
  }
2841
- }, qe = () => ({
2877
+ }, Be = () => ({
2842
2878
  top: [],
2843
2879
  bottom: []
2844
- }), fr = {
2880
+ }), mr = {
2845
2881
  getInitialState: (e) => ({
2846
- rowPinning: qe(),
2882
+ rowPinning: Be(),
2847
2883
  ...e
2848
2884
  }),
2849
2885
  getDefaultOptions: (e) => ({
2850
- onRowPinningChange: O("rowPinning", e)
2886
+ onRowPinningChange: G("rowPinning", e)
2851
2887
  }),
2852
2888
  createRow: (e, n) => {
2853
2889
  e.pin = (t, o, r) => {
@@ -2865,9 +2901,9 @@ const ur = {
2865
2901
  n.setRowPinning((u) => {
2866
2902
  var g, c;
2867
2903
  if (t === "bottom") {
2868
- var S, f;
2904
+ var h, f;
2869
2905
  return {
2870
- top: ((S = u == null ? void 0 : u.top) != null ? S : []).filter((m) => !(a != null && a.has(m))),
2906
+ top: ((h = u == null ? void 0 : u.top) != null ? h : []).filter((m) => !(a != null && a.has(m))),
2871
2907
  bottom: [...((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((m) => !(a != null && a.has(m))), ...Array.from(a)]
2872
2908
  };
2873
2909
  }
@@ -2912,7 +2948,7 @@ const ur = {
2912
2948
  createTable: (e) => {
2913
2949
  e.setRowPinning = (n) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(n), e.resetRowPinning = (n) => {
2914
2950
  var t, o;
2915
- return e.setRowPinning(n ? qe() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : qe());
2951
+ return e.setRowPinning(n ? Be() : (t = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? t : Be());
2916
2952
  }, e.getIsSomeRowsPinned = (n) => {
2917
2953
  var t;
2918
2954
  const o = e.getState().rowPinning;
@@ -2937,18 +2973,18 @@ const ur = {
2937
2973
  ...s,
2938
2974
  position: o
2939
2975
  }));
2940
- }, e.getTopRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = x(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
2976
+ }, e.getTopRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), x(e.options, "debugRows", "getTopRows")), e.getBottomRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), x(e.options, "debugRows", "getBottomRows")), e.getCenterRows = w(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
2941
2977
  const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
2942
2978
  return n.filter((i) => !r.has(i.id));
2943
- }, R(e.options, "debugRows", "getCenterRows"));
2979
+ }, x(e.options, "debugRows", "getCenterRows"));
2944
2980
  }
2945
- }, pr = {
2981
+ }, hr = {
2946
2982
  getInitialState: (e) => ({
2947
2983
  rowSelection: {},
2948
2984
  ...e
2949
2985
  }),
2950
2986
  getDefaultOptions: (e) => ({
2951
- onRowSelectionChange: O("rowSelection", e),
2987
+ onRowSelectionChange: G("rowSelection", e),
2952
2988
  enableRowSelection: !0,
2953
2989
  enableMultiRowSelection: !0,
2954
2990
  enableSubRowSelection: !0
@@ -2977,21 +3013,21 @@ const ur = {
2977
3013
  ...t
2978
3014
  };
2979
3015
  return e.getRowModel().rows.forEach((i) => {
2980
- Ze(r, i.id, o, !0, e);
3016
+ et(r, i.id, o, !0, e);
2981
3017
  }), r;
2982
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = x(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Be(e, t) : {
3018
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = w(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
2983
3019
  rows: [],
2984
3020
  flatRows: [],
2985
3021
  rowsById: {}
2986
- }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = x(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Be(e, t) : {
3022
+ }, x(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = w(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
2987
3023
  rows: [],
2988
3024
  flatRows: [],
2989
3025
  rowsById: {}
2990
- }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = x(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Be(e, t) : {
3026
+ }, x(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = w(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Ue(e, t) : {
2991
3027
  rows: [],
2992
3028
  flatRows: [],
2993
3029
  rowsById: {}
2994
- }, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
3030
+ }, x(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
2995
3031
  const n = e.getFilteredRowModel().flatRows, {
2996
3032
  rowSelection: t
2997
3033
  } = e.getState();
@@ -3026,23 +3062,23 @@ const ur = {
3026
3062
  const a = {
3027
3063
  ...i
3028
3064
  };
3029
- return Ze(a, e.id, t, (s = o == null ? void 0 : o.selectChildren) != null ? s : !0, n), a;
3065
+ return et(a, e.id, t, (s = o == null ? void 0 : o.selectChildren) != null ? s : !0, n), a;
3030
3066
  });
3031
3067
  }, e.getIsSelected = () => {
3032
3068
  const {
3033
3069
  rowSelection: t
3034
3070
  } = n.getState();
3035
- return dt(e, t);
3071
+ return ct(e, t);
3036
3072
  }, e.getIsSomeSelected = () => {
3037
3073
  const {
3038
3074
  rowSelection: t
3039
3075
  } = n.getState();
3040
- return et(e, t) === "some";
3076
+ return tt(e, t) === "some";
3041
3077
  }, e.getIsAllSubRowsSelected = () => {
3042
3078
  const {
3043
3079
  rowSelection: t
3044
3080
  } = n.getState();
3045
- return et(e, t) === "all";
3081
+ return tt(e, t) === "all";
3046
3082
  }, e.getCanSelect = () => {
3047
3083
  var t;
3048
3084
  return typeof n.options.enableRowSelection == "function" ? n.options.enableRowSelection(e) : (t = n.options.enableRowSelection) != null ? t : !0;
@@ -3060,16 +3096,16 @@ const ur = {
3060
3096
  };
3061
3097
  };
3062
3098
  }
3063
- }, Ze = (e, n, t, o, r) => {
3099
+ }, et = (e, n, t, o, r) => {
3064
3100
  var i;
3065
3101
  const s = r.getRow(n, !0);
3066
- t ? (s.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), s.getCanSelect() && (e[n] = !0)) : delete e[n], o && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((a) => Ze(e, a.id, t, o, r));
3102
+ t ? (s.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), s.getCanSelect() && (e[n] = !0)) : delete e[n], o && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((a) => et(e, a.id, t, o, r));
3067
3103
  };
3068
- function Be(e, n) {
3104
+ function Ue(e, n) {
3069
3105
  const t = e.getState().rowSelection, o = [], r = {}, i = function(s, a) {
3070
3106
  return s.map((u) => {
3071
3107
  var g;
3072
- const c = dt(u, t);
3108
+ const c = ct(u, t);
3073
3109
  if (c && (o.push(u), r[u.id] = u), (g = u.subRows) != null && g.length && (u = {
3074
3110
  ...u,
3075
3111
  subRows: i(u.subRows)
@@ -3083,33 +3119,33 @@ function Be(e, n) {
3083
3119
  rowsById: r
3084
3120
  };
3085
3121
  }
3086
- function dt(e, n) {
3122
+ function ct(e, n) {
3087
3123
  var t;
3088
3124
  return (t = n[e.id]) != null ? t : !1;
3089
3125
  }
3090
- function et(e, n, t) {
3126
+ function tt(e, n, t) {
3091
3127
  var o;
3092
3128
  if (!((o = e.subRows) != null && o.length)) return !1;
3093
3129
  let r = !0, i = !1;
3094
3130
  return e.subRows.forEach((s) => {
3095
- if (!(i && !r) && (s.getCanSelect() && (dt(s, n) ? i = !0 : r = !1), s.subRows && s.subRows.length)) {
3096
- const a = et(s, n);
3131
+ if (!(i && !r) && (s.getCanSelect() && (ct(s, n) ? i = !0 : r = !1), s.subRows && s.subRows.length)) {
3132
+ const a = tt(s, n);
3097
3133
  a === "all" ? i = !0 : (a === "some" && (i = !0), r = !1);
3098
3134
  }
3099
3135
  }), r ? "all" : i ? "some" : !1;
3100
3136
  }
3101
- const tt = /([0-9]+)/gm, mr = (e, n, t) => pn(J(e.getValue(t)).toLowerCase(), J(n.getValue(t)).toLowerCase()), hr = (e, n, t) => pn(J(e.getValue(t)), J(n.getValue(t))), Sr = (e, n, t) => gt(J(e.getValue(t)).toLowerCase(), J(n.getValue(t)).toLowerCase()), vr = (e, n, t) => gt(J(e.getValue(t)), J(n.getValue(t))), Cr = (e, n, t) => {
3137
+ const nt = /([0-9]+)/gm, Sr = (e, n, t) => hn(ee(e.getValue(t)).toLowerCase(), ee(n.getValue(t)).toLowerCase()), vr = (e, n, t) => hn(ee(e.getValue(t)), ee(n.getValue(t))), Cr = (e, n, t) => ft(ee(e.getValue(t)).toLowerCase(), ee(n.getValue(t)).toLowerCase()), wr = (e, n, t) => ft(ee(e.getValue(t)), ee(n.getValue(t))), xr = (e, n, t) => {
3102
3138
  const o = e.getValue(t), r = n.getValue(t);
3103
3139
  return o > r ? 1 : o < r ? -1 : 0;
3104
- }, wr = (e, n, t) => gt(e.getValue(t), n.getValue(t));
3105
- function gt(e, n) {
3140
+ }, Rr = (e, n, t) => ft(e.getValue(t), n.getValue(t));
3141
+ function ft(e, n) {
3106
3142
  return e === n ? 0 : e > n ? 1 : -1;
3107
3143
  }
3108
- function J(e) {
3144
+ function ee(e) {
3109
3145
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
3110
3146
  }
3111
- function pn(e, n) {
3112
- const t = e.split(tt).filter(Boolean), o = n.split(tt).filter(Boolean);
3147
+ function hn(e, n) {
3148
+ const t = e.split(nt).filter(Boolean), o = n.split(nt).filter(Boolean);
3113
3149
  for (; t.length && o.length; ) {
3114
3150
  const r = t.shift(), i = o.shift(), s = parseInt(r, 10), a = parseInt(i, 10), u = [s, a].sort();
3115
3151
  if (isNaN(u[0])) {
@@ -3128,14 +3164,14 @@ function pn(e, n) {
3128
3164
  }
3129
3165
  return t.length - o.length;
3130
3166
  }
3131
- const ce = {
3132
- alphanumeric: mr,
3133
- alphanumericCaseSensitive: hr,
3134
- text: Sr,
3135
- textCaseSensitive: vr,
3136
- datetime: Cr,
3137
- basic: wr
3138
- }, xr = {
3167
+ const me = {
3168
+ alphanumeric: Sr,
3169
+ alphanumericCaseSensitive: vr,
3170
+ text: Cr,
3171
+ textCaseSensitive: wr,
3172
+ datetime: xr,
3173
+ basic: Rr
3174
+ }, yr = {
3139
3175
  getInitialState: (e) => ({
3140
3176
  sorting: [],
3141
3177
  ...e
@@ -3145,7 +3181,7 @@ const ce = {
3145
3181
  sortUndefined: 1
3146
3182
  }),
3147
3183
  getDefaultOptions: (e) => ({
3148
- onSortingChange: O("sorting", e),
3184
+ onSortingChange: G("sorting", e),
3149
3185
  isMultiSortEvent: (n) => n.shiftKey
3150
3186
  }),
3151
3187
  createColumn: (e, n) => {
@@ -3155,11 +3191,11 @@ const ce = {
3155
3191
  for (const r of t) {
3156
3192
  const i = r == null ? void 0 : r.getValue(e.id);
3157
3193
  if (Object.prototype.toString.call(i) === "[object Date]")
3158
- return ce.datetime;
3159
- if (typeof i == "string" && (o = !0, i.split(tt).length > 1))
3160
- return ce.alphanumeric;
3194
+ return me.datetime;
3195
+ if (typeof i == "string" && (o = !0, i.split(nt).length > 1))
3196
+ return me.alphanumeric;
3161
3197
  }
3162
- return o ? ce.text : ce.basic;
3198
+ return o ? me.text : me.basic;
3163
3199
  }, e.getAutoSortDir = () => {
3164
3200
  const t = n.getFilteredRowModel().flatRows[0];
3165
3201
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
@@ -3167,24 +3203,24 @@ const ce = {
3167
3203
  var t, o;
3168
3204
  if (!e)
3169
3205
  throw new Error();
3170
- return De(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : ce[e.columnDef.sortingFn];
3206
+ return be(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : me[e.columnDef.sortingFn];
3171
3207
  }, e.toggleSorting = (t, o) => {
3172
3208
  const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
3173
3209
  n.setSorting((s) => {
3174
3210
  const a = s == null ? void 0 : s.find((d) => d.id === e.id), u = s == null ? void 0 : s.findIndex((d) => d.id === e.id);
3175
- let g = [], c, S = i ? t : r === "desc";
3211
+ let g = [], c, h = i ? t : r === "desc";
3176
3212
  if (s != null && s.length && e.getCanMultiSort() && o ? a ? c = "toggle" : c = "add" : s != null && s.length && u !== s.length - 1 ? c = "replace" : a ? c = "toggle" : c = "replace", c === "toggle" && (i || r || (c = "remove")), c === "add") {
3177
3213
  var f;
3178
3214
  g = [...s, {
3179
3215
  id: e.id,
3180
- desc: S
3216
+ desc: h
3181
3217
  }], g.splice(0, g.length - ((f = n.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
3182
3218
  } else c === "toggle" ? g = s.map((d) => d.id === e.id ? {
3183
3219
  ...d,
3184
- desc: S
3220
+ desc: h
3185
3221
  } : d) : c === "remove" ? g = s.filter((d) => d.id !== e.id) : g = [{
3186
3222
  id: e.id,
3187
- desc: S
3223
+ desc: h
3188
3224
  }];
3189
3225
  return g;
3190
3226
  });
@@ -3224,30 +3260,30 @@ const ce = {
3224
3260
  e.setSorting(n ? [] : (t = (o = e.initialState) == null ? void 0 : o.sorting) != null ? t : []);
3225
3261
  }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
3226
3262
  }
3227
- }, Rr = [
3228
- Go,
3229
- ar,
3230
- or,
3231
- rr,
3263
+ }, _r = [
3232
3264
  qo,
3233
- Bo,
3234
- ur,
3235
- //depends on ColumnFaceting
3236
3265
  dr,
3237
- //depends on ColumnFiltering
3238
- xr,
3239
- tr,
3240
- //depends on RowSorting
3266
+ ir,
3267
+ sr,
3268
+ Uo,
3269
+ Ko,
3241
3270
  gr,
3271
+ //depends on ColumnFaceting
3242
3272
  cr,
3273
+ //depends on ColumnFiltering
3274
+ yr,
3275
+ or,
3276
+ //depends on RowSorting
3243
3277
  fr,
3244
3278
  pr,
3245
- sr
3279
+ mr,
3280
+ hr,
3281
+ ar
3246
3282
  ];
3247
- function yr(e) {
3283
+ function jr(e) {
3248
3284
  var n, t;
3249
3285
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
3250
- const o = [...Rr, ...(n = e._features) != null ? n : []];
3286
+ const o = [..._r, ...(n = e._features) != null ? n : []];
3251
3287
  let r = {
3252
3288
  _features: o
3253
3289
  };
@@ -3265,7 +3301,7 @@ function yr(e) {
3265
3301
  });
3266
3302
  const g = [];
3267
3303
  let c = !1;
3268
- const S = {
3304
+ const h = {
3269
3305
  _features: o,
3270
3306
  options: {
3271
3307
  ...i,
@@ -3285,7 +3321,7 @@ function yr(e) {
3285
3321
  r.setState(r.initialState);
3286
3322
  },
3287
3323
  setOptions: (f) => {
3288
- const d = X(f, r.options);
3324
+ const d = Z(f, r.options);
3289
3325
  r.options = s(d);
3290
3326
  },
3291
3327
  getState: () => r.options.state,
@@ -3307,7 +3343,7 @@ function yr(e) {
3307
3343
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
3308
3344
  return p;
3309
3345
  },
3310
- _getDefaultColumnDef: x(() => [r.options.defaultColumn], (f) => {
3346
+ _getDefaultColumnDef: w(() => [r.options.defaultColumn], (f) => {
3311
3347
  var d;
3312
3348
  return f = (d = f) != null ? d : {}, {
3313
3349
  header: (p) => {
@@ -3322,37 +3358,37 @@ function yr(e) {
3322
3358
  ...r._features.reduce((p, m) => Object.assign(p, m.getDefaultColumnDef == null ? void 0 : m.getDefaultColumnDef()), {}),
3323
3359
  ...f
3324
3360
  };
3325
- }, R(e, "debugColumns", "_getDefaultColumnDef")),
3361
+ }, x(e, "debugColumns", "_getDefaultColumnDef")),
3326
3362
  _getColumnDefs: () => r.options.columns,
3327
- getAllColumns: x(() => [r._getColumnDefs()], (f) => {
3363
+ getAllColumns: w(() => [r._getColumnDefs()], (f) => {
3328
3364
  const d = function(p, m, C) {
3329
3365
  return C === void 0 && (C = 0), p.map((v) => {
3330
- const _ = zo(r, v, C, m), y = v;
3331
- return _.columns = y.columns ? d(y.columns, _, C + 1) : [], _;
3366
+ const _ = Ho(r, v, C, m), R = v;
3367
+ return _.columns = R.columns ? d(R.columns, _, C + 1) : [], _;
3332
3368
  });
3333
3369
  };
3334
3370
  return d(f);
3335
- }, R(e, "debugColumns", "getAllColumns")),
3336
- getAllFlatColumns: x(() => [r.getAllColumns()], (f) => f.flatMap((d) => d.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
3337
- _getAllFlatColumnsById: x(() => [r.getAllFlatColumns()], (f) => f.reduce((d, p) => (d[p.id] = p, d), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
3338
- getAllLeafColumns: x(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, d) => {
3371
+ }, x(e, "debugColumns", "getAllColumns")),
3372
+ getAllFlatColumns: w(() => [r.getAllColumns()], (f) => f.flatMap((d) => d.getFlatColumns()), x(e, "debugColumns", "getAllFlatColumns")),
3373
+ _getAllFlatColumnsById: w(() => [r.getAllFlatColumns()], (f) => f.reduce((d, p) => (d[p.id] = p, d), {}), x(e, "debugColumns", "getAllFlatColumnsById")),
3374
+ getAllLeafColumns: w(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, d) => {
3339
3375
  let p = f.flatMap((m) => m.getLeafColumns());
3340
3376
  return d(p);
3341
- }, R(e, "debugColumns", "getAllLeafColumns")),
3377
+ }, x(e, "debugColumns", "getAllLeafColumns")),
3342
3378
  getColumn: (f) => {
3343
3379
  const d = r._getAllFlatColumnsById()[f];
3344
3380
  return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${f}' does not exist.`), d;
3345
3381
  }
3346
3382
  };
3347
- Object.assign(r, S);
3383
+ Object.assign(r, h);
3348
3384
  for (let f = 0; f < r._features.length; f++) {
3349
3385
  const d = r._features[f];
3350
3386
  d == null || d.createTable == null || d.createTable(r);
3351
3387
  }
3352
3388
  return r;
3353
3389
  }
3354
- function mn() {
3355
- return (e) => x(() => [e.options.data], (n) => {
3390
+ function Sn() {
3391
+ return (e) => w(() => [e.options.data], (n) => {
3356
3392
  const t = {
3357
3393
  rows: [],
3358
3394
  flatRows: [],
@@ -3361,7 +3397,7 @@ function mn() {
3361
3397
  i === void 0 && (i = 0);
3362
3398
  const a = [];
3363
3399
  for (let g = 0; g < r.length; g++) {
3364
- const c = Ho(e, e._getRowId(r[g], g, s), r[g], g, i, void 0, s == null ? void 0 : s.id);
3400
+ const c = Bo(e, e._getRowId(r[g], g, s), r[g], g, i, void 0, s == null ? void 0 : s.id);
3365
3401
  if (t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows) {
3366
3402
  var u;
3367
3403
  c.originalSubRows = e.options.getSubRows(r[g], g), (u = c.originalSubRows) != null && u.length && (c.subRows = o(c.originalSubRows, i + 1, c));
@@ -3370,9 +3406,9 @@ function mn() {
3370
3406
  return a;
3371
3407
  };
3372
3408
  return t.rows = o(n), t;
3373
- }, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
3409
+ }, x(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
3374
3410
  }
3375
- function jr(e) {
3411
+ function Fr(e) {
3376
3412
  const n = [], t = (o) => {
3377
3413
  var r;
3378
3414
  n.push(o), (r = o.subRows) != null && r.length && o.getIsExpanded() && o.subRows.forEach(t);
@@ -3383,8 +3419,8 @@ function jr(e) {
3383
3419
  rowsById: e.rowsById
3384
3420
  };
3385
3421
  }
3386
- function _r(e) {
3387
- return (n) => x(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
3422
+ function Ir(e) {
3423
+ return (n) => w(() => [n.getState().pagination, n.getPrePaginationRowModel(), n.options.paginateExpandedRows ? void 0 : n.getState().expanded], (t, o) => {
3388
3424
  if (!o.rows.length)
3389
3425
  return o;
3390
3426
  const {
@@ -3398,21 +3434,21 @@ function _r(e) {
3398
3434
  } = o;
3399
3435
  const g = r * i, c = g + r;
3400
3436
  s = s.slice(g, c);
3401
- let S;
3402
- n.options.paginateExpandedRows ? S = {
3437
+ let h;
3438
+ n.options.paginateExpandedRows ? h = {
3403
3439
  rows: s,
3404
3440
  flatRows: a,
3405
3441
  rowsById: u
3406
- } : S = jr({
3442
+ } : h = Fr({
3407
3443
  rows: s,
3408
3444
  flatRows: a,
3409
3445
  rowsById: u
3410
- }), S.flatRows = [];
3446
+ }), h.flatRows = [];
3411
3447
  const f = (d) => {
3412
- S.flatRows.push(d), d.subRows.length && d.subRows.forEach(f);
3448
+ h.flatRows.push(d), d.subRows.length && d.subRows.forEach(f);
3413
3449
  };
3414
- return S.rows.forEach(f), S;
3415
- }, R(n.options, "debugTable", "getPaginationRowModel"));
3450
+ return h.rows.forEach(f), h;
3451
+ }, x(n.options, "debugTable", "getPaginationRowModel"));
3416
3452
  }
3417
3453
  /**
3418
3454
  * react-table
@@ -3424,22 +3460,22 @@ function _r(e) {
3424
3460
  *
3425
3461
  * @license MIT
3426
3462
  */
3427
- function bt(e, n) {
3428
- return e ? Fr(e) ? /* @__PURE__ */ Ke.createElement(e, n) : e : null;
3463
+ function Nt(e, n) {
3464
+ return e ? Pr(e) ? /* @__PURE__ */ Ye.createElement(e, n) : e : null;
3429
3465
  }
3430
- function Fr(e) {
3431
- return Ir(e) || typeof e == "function" || Pr(e);
3466
+ function Pr(e) {
3467
+ return Er(e) || typeof e == "function" || $r(e);
3432
3468
  }
3433
- function Ir(e) {
3469
+ function Er(e) {
3434
3470
  return typeof e == "function" && (() => {
3435
3471
  const n = Object.getPrototypeOf(e);
3436
3472
  return n.prototype && n.prototype.isReactComponent;
3437
3473
  })();
3438
3474
  }
3439
- function Pr(e) {
3475
+ function $r(e) {
3440
3476
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
3441
3477
  }
3442
- function hn(e) {
3478
+ function vn(e) {
3443
3479
  const n = {
3444
3480
  state: {},
3445
3481
  // Dummy state
@@ -3448,9 +3484,9 @@ function hn(e) {
3448
3484
  // noop
3449
3485
  renderFallbackValue: null,
3450
3486
  ...e
3451
- }, [t] = Ke.useState(() => ({
3452
- current: yr(n)
3453
- })), [o, r] = Ke.useState(() => t.current.initialState);
3487
+ }, [t] = Ye.useState(() => ({
3488
+ current: jr(n)
3489
+ })), [o, r] = Ye.useState(() => t.current.initialState);
3454
3490
  return t.current.setOptions((i) => ({
3455
3491
  ...i,
3456
3492
  ...e,
@@ -3465,26 +3501,26 @@ function hn(e) {
3465
3501
  }
3466
3502
  })), t.current;
3467
3503
  }
3468
- const Sn = ({
3504
+ const Cn = ({
3469
3505
  actions: e,
3470
3506
  reloadData: n,
3471
3507
  selectedRowKeys: t,
3472
3508
  size: o = "xs"
3473
- }) => /* @__PURE__ */ l.jsxs(N, { gap: o, children: [
3509
+ }) => /* @__PURE__ */ l.jsxs(L, { gap: o, children: [
3474
3510
  (e == null ? void 0 : e.add) && /* @__PURE__ */ l.jsx(
3475
- G,
3511
+ B,
3476
3512
  {
3477
3513
  variant: "light",
3478
- leftSection: /* @__PURE__ */ l.jsx(zn, { size: 16, stroke: 1.5 }),
3514
+ leftSection: /* @__PURE__ */ l.jsx(Hn, { size: 16, stroke: 1.5 }),
3479
3515
  size: o,
3480
3516
  onClick: e.add,
3481
3517
  children: "Add"
3482
3518
  }
3483
3519
  ),
3484
3520
  (e == null ? void 0 : e.edit) && /* @__PURE__ */ l.jsx(
3485
- G,
3521
+ B,
3486
3522
  {
3487
- leftSection: /* @__PURE__ */ l.jsx(Gn, { size: 16, stroke: 1.5 }),
3523
+ leftSection: /* @__PURE__ */ l.jsx(qn, { size: 16, stroke: 1.5 }),
3488
3524
  size: o,
3489
3525
  variant: "light",
3490
3526
  onClick: () => e.edit !== void 0 && e.edit(t[0]),
@@ -3493,9 +3529,9 @@ const Sn = ({
3493
3529
  }
3494
3530
  ),
3495
3531
  (e == null ? void 0 : e.reload) && /* @__PURE__ */ l.jsx(
3496
- G,
3532
+ B,
3497
3533
  {
3498
- leftSection: /* @__PURE__ */ l.jsx(Hn, { size: 16, stroke: 1.5 }),
3534
+ leftSection: /* @__PURE__ */ l.jsx(Bn, { size: 16, stroke: 1.5 }),
3499
3535
  size: o,
3500
3536
  onClick: n,
3501
3537
  variant: "light",
@@ -3503,9 +3539,9 @@ const Sn = ({
3503
3539
  }
3504
3540
  ),
3505
3541
  (e == null ? void 0 : e.import) && /* @__PURE__ */ l.jsx(
3506
- G,
3542
+ B,
3507
3543
  {
3508
- leftSection: /* @__PURE__ */ l.jsx(qn, { size: 16, stroke: 1.5 }),
3544
+ leftSection: /* @__PURE__ */ l.jsx(Un, { size: 16, stroke: 1.5 }),
3509
3545
  size: o,
3510
3546
  variant: "light",
3511
3547
  onClick: e.import,
@@ -3513,57 +3549,57 @@ const Sn = ({
3513
3549
  }
3514
3550
  ),
3515
3551
  (e == null ? void 0 : e.export) && /* @__PURE__ */ l.jsx(
3516
- G,
3552
+ B,
3517
3553
  {
3518
- leftSection: /* @__PURE__ */ l.jsx(Bn, { size: 16, stroke: 1.5 }),
3554
+ leftSection: /* @__PURE__ */ l.jsx(Kn, { size: 16, stroke: 1.5 }),
3519
3555
  size: o,
3520
3556
  variant: "light",
3521
3557
  onClick: e.export,
3522
3558
  children: "Export"
3523
3559
  }
3524
3560
  )
3525
- ] }), vn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), Er = "__selectcol__", { Thead: $r, Tr: Ue, Th: Mr, Tbody: Dr, Td: At } = qt, Cn = (e) => {
3561
+ ] }), wn = (e) => e !== void 0 && (e.add !== void 0 || e.edit !== void 0 || e.delete !== void 0 || e.export !== void 0 || e.reload === !0 || e.import !== void 0), Mr = "__selectcol__", { Thead: Dr, Tr: Ke, Th: br, Tbody: Vr, Td: At } = Bt, xn = (e) => {
3526
3562
  let n;
3527
- e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(Ue, { children: /* @__PURE__ */ l.jsx(At, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(Q, { justify: "center", align: "center", gap: "xs", children: [
3528
- /* @__PURE__ */ l.jsx(Un, { color: "var(--mantine-color-dimmed)" }),
3563
+ e.table.getRowCount() === 0 ? n = /* @__PURE__ */ l.jsx(Ke, { children: /* @__PURE__ */ l.jsx(At, { colSpan: e.table.getVisibleLeafColumns().length, children: /* @__PURE__ */ l.jsxs(te, { justify: "center", align: "center", gap: "xs", children: [
3564
+ /* @__PURE__ */ l.jsx(Yn, { color: "var(--mantine-color-dimmed)" }),
3529
3565
  /* @__PURE__ */ l.jsx(P, { c: "dimmed", fz: "sm", children: "No records found." })
3530
3566
  ] }) }) }, "empty-row") : n = e.table.getRowModel().rows.map((r) => /* @__PURE__ */ l.jsx(
3531
- Ue,
3567
+ Ke,
3532
3568
  {
3533
3569
  bg: e.selectedRowKeys[r.id] ? "var(--mantine-color-blue-light)" : void 0,
3534
- children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(At, { children: bt(i.column.columnDef.cell, i.getContext()) }, i.id))
3570
+ children: r.getVisibleCells().map((i) => /* @__PURE__ */ l.jsx(At, { children: Nt(i.column.columnDef.cell, i.getContext()) }, i.id))
3535
3571
  },
3536
3572
  r.id
3537
3573
  ));
3538
3574
  const t = /* @__PURE__ */ l.jsxs(
3539
- qt,
3575
+ Bt,
3540
3576
  {
3541
3577
  striped: !0,
3542
3578
  highlightOnHover: !0,
3543
3579
  verticalSpacing: "xs",
3544
3580
  tabularNums: !0,
3545
3581
  children: [
3546
- /* @__PURE__ */ l.jsx($r, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(Ue, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
3547
- Mr,
3582
+ /* @__PURE__ */ l.jsx(Dr, { children: e.table.getHeaderGroups().map((r) => /* @__PURE__ */ l.jsx(Ke, { children: r.headers.map((i) => /* @__PURE__ */ l.jsx(
3583
+ br,
3548
3584
  {
3549
- w: i.id === Er ? "1%" : void 0,
3550
- children: i.isPlaceholder ? null : bt(
3585
+ w: i.id === Mr ? "1%" : void 0,
3586
+ children: i.isPlaceholder ? null : Nt(
3551
3587
  i.column.columnDef.header,
3552
3588
  i.getContext()
3553
3589
  )
3554
3590
  },
3555
3591
  i.id
3556
3592
  )) }, r.id)) }),
3557
- /* @__PURE__ */ l.jsx(Dr, { pos: "relative", children: n })
3593
+ /* @__PURE__ */ l.jsx(Vr, { pos: "relative", children: n })
3558
3594
  ]
3559
3595
  }
3560
3596
  );
3561
3597
  if (!e.bordered) return t;
3562
3598
  const o = {};
3563
- return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(ee, { withBorder: !0, p: 0, style: o, children: t });
3564
- }, Vr = "_pageSizeSelectorActive_1wv6j_1", br = {
3565
- pageSizeSelectorActive: Vr
3566
- }, wn = ({
3599
+ return e.hasTopSection && (o.borderTopLeftRadius = 0, o.borderTopRightRadius = 0), e.hasBottomSection && (o.borderBottomLeftRadius = 0, o.borderBottomRightRadius = 0), /* @__PURE__ */ l.jsx(oe, { withBorder: !0, p: 0, style: o, children: t });
3600
+ }, Tr = "_pageSizeSelectorActive_1wv6j_1", Nr = {
3601
+ pageSizeSelectorActive: Tr
3602
+ }, Rn = ({
3567
3603
  total: e,
3568
3604
  pageIndex: n,
3569
3605
  pageSize: t,
@@ -3579,7 +3615,7 @@ const Sn = ({
3579
3615
  onChange: (s) => r(s - 1, t)
3580
3616
  }
3581
3617
  );
3582
- return o ? /* @__PURE__ */ l.jsxs(N, { gap: "sm", children: [
3618
+ return o ? /* @__PURE__ */ l.jsxs(L, { gap: "sm", children: [
3583
3619
  /* @__PURE__ */ l.jsxs("div", { children: [
3584
3620
  /* @__PURE__ */ l.jsx(P, { size: "sm", component: "span", pr: "xs", c: "dimmed", children: "Records per page" }),
3585
3621
  /* @__PURE__ */ l.jsx(
@@ -3596,12 +3632,12 @@ const Sn = ({
3596
3632
  ] }),
3597
3633
  i
3598
3634
  ] }) : i;
3599
- }, Tt = {
3600
- xs: ue(22),
3601
- sm: ue(26),
3602
- md: ue(32),
3603
- lg: ue(38),
3604
- xl: ue(44)
3635
+ }, kt = {
3636
+ xs: ce(22),
3637
+ sm: ce(26),
3638
+ md: ce(32),
3639
+ lg: ce(38),
3640
+ xl: ce(44)
3605
3641
  };
3606
3642
  function Ar({
3607
3643
  size: e,
@@ -3609,17 +3645,17 @@ function Ar({
3609
3645
  value: t,
3610
3646
  onChange: o
3611
3647
  }) {
3612
- return /* @__PURE__ */ l.jsxs(re, { withinPortal: !0, withArrow: !0, offset: 2, children: [
3613
- /* @__PURE__ */ l.jsx(Tn, { children: /* @__PURE__ */ l.jsx(
3614
- G,
3648
+ return /* @__PURE__ */ l.jsxs(le, { withinPortal: !0, withArrow: !0, offset: 2, children: [
3649
+ /* @__PURE__ */ l.jsx(kn, { children: /* @__PURE__ */ l.jsx(
3650
+ B,
3615
3651
  {
3616
3652
  size: e,
3617
3653
  variant: "default",
3618
- rightSection: /* @__PURE__ */ l.jsx(Kn, { size: 16, stroke: 1.5 }),
3654
+ rightSection: /* @__PURE__ */ l.jsx(Wn, { size: 16, stroke: 1.5 }),
3619
3655
  style: [
3620
3656
  { fontWeight: "normal" },
3621
3657
  (r) => ({
3622
- height: Tt[e],
3658
+ height: kt[e],
3623
3659
  paddingLeft: r.spacing[e],
3624
3660
  paddingRight: r.spacing[e]
3625
3661
  })
@@ -3632,14 +3668,14 @@ function Ar({
3632
3668
  children: t
3633
3669
  }
3634
3670
  ) }),
3635
- /* @__PURE__ */ l.jsx(Nn, { children: n.map((r) => {
3671
+ /* @__PURE__ */ l.jsx(Ln, { children: n.map((r) => {
3636
3672
  const i = r === t;
3637
3673
  return /* @__PURE__ */ l.jsx(
3638
- kn,
3674
+ On,
3639
3675
  {
3640
- className: i ? br.pageSizeSelectorActive : void 0,
3676
+ className: i ? Nr.pageSizeSelectorActive : void 0,
3641
3677
  style: [
3642
- { height: Tt[e] }
3678
+ { height: kt[e] }
3643
3679
  // isCurrent
3644
3680
  // ? {
3645
3681
  // color: "var(--mantine-color-text)",
@@ -3657,58 +3693,58 @@ function Ar({
3657
3693
  }) })
3658
3694
  ] });
3659
3695
  }
3660
- const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3696
+ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3661
3697
  var v, _;
3662
3698
  const [n, t] = M({
3663
3699
  records: [],
3664
3700
  total: 0
3665
3701
  }), [o, r] = M(!1), [i, s] = M(
3666
3702
  {}
3667
- ), a = (y) => {
3668
- r(!0), e.getData(y).then((w) => {
3669
- t(w), r(!1);
3703
+ ), a = (R) => {
3704
+ r(!0), e.getData(R).then((j) => {
3705
+ t(j), r(!1);
3670
3706
  });
3671
- }, u = (y, w) => {
3672
- const I = {
3707
+ }, u = (R, j) => {
3708
+ const A = {
3673
3709
  ...e.query.query,
3674
- limit: w,
3675
- offset: y * w
3710
+ limit: j,
3711
+ offset: R * j
3676
3712
  };
3677
- e.query.update(I);
3678
- }, [g, c, S] = F(() => {
3679
- const y = e.query.query.limit, w = Math.floor(
3713
+ e.query.update(A);
3714
+ }, [g, c, h] = F(() => {
3715
+ const R = e.query.query.limit, j = Math.floor(
3680
3716
  (e.query.query.offset || 0) / e.query.query.limit
3681
- ), I = Math.ceil(n.total / e.query.query.limit);
3682
- return [y, w, I];
3717
+ ), A = Math.ceil(n.total / e.query.query.limit);
3718
+ return [R, j, A];
3683
3719
  }, [e.query.query.limit, e.query.query.offset, n.total]);
3684
- Se(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
3685
- const f = F(() => Object.keys(i).filter((y) => i[y]).map((y) => e.normalizeRowId(y)), [i]);
3720
+ we(() => (n.total == 0 && a(e.query.query), e.query.subscribe(a)), [e.query]);
3721
+ const f = F(() => Object.keys(i).filter((R) => i[R]).map((R) => e.normalizeRowId(R)), [i]);
3686
3722
  let d, p;
3687
- vn(e.actions) && (d = /* @__PURE__ */ l.jsx(
3688
- Sn,
3723
+ wn(e.actions) && (d = /* @__PURE__ */ l.jsx(
3724
+ Cn,
3689
3725
  {
3690
3726
  actions: e.actions,
3691
3727
  reloadData: () => a(e.query.query),
3692
3728
  selectedRowKeys: f
3693
3729
  }
3694
3730
  ));
3695
- const m = ((v = e.pagination) == null ? void 0 : v.positions) || Tr;
3731
+ const m = ((v = e.pagination) == null ? void 0 : v.positions) || kr;
3696
3732
  if (m.size > 0) {
3697
- const y = /* @__PURE__ */ l.jsx(
3698
- wn,
3733
+ const R = /* @__PURE__ */ l.jsx(
3734
+ Rn,
3699
3735
  {
3700
- total: S,
3736
+ total: h,
3701
3737
  pageIndex: c,
3702
3738
  pageSize: g,
3703
3739
  onUpdatePagination: u,
3704
3740
  allowPageSizeChange: (_ = e.pagination) == null ? void 0 : _.showSizeChanger
3705
3741
  }
3706
3742
  );
3707
- m.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(N, { justify: "space-between", gap: "sm", children: [
3743
+ m.has("topRight") && (d !== void 0 ? d = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
3708
3744
  d,
3709
- y
3710
- ] }) : d = /* @__PURE__ */ l.jsx(z, { justify: "flex-end", children: y })), (m.has("bottomRight") || m.has("bottomLeft") || m.has("bottomCenter")) && (m.has("bottomLeft") ? p = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
3711
- y,
3745
+ R
3746
+ ] }) : d = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: R })), (m.has("bottomRight") || m.has("bottomLeft") || m.has("bottomCenter")) && (m.has("bottomLeft") ? p = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3747
+ R,
3712
3748
  /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3713
3749
  "Showing ",
3714
3750
  Math.min(c * g + 1, n.total),
@@ -3720,7 +3756,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3720
3756
  " ",
3721
3757
  "records"
3722
3758
  ] })
3723
- ] }) : p = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
3759
+ ] }) : p = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3724
3760
  /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3725
3761
  "Showing ",
3726
3762
  Math.min(c * g + 1, n.total),
@@ -3732,11 +3768,11 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3732
3768
  " ",
3733
3769
  "records"
3734
3770
  ] }),
3735
- y
3771
+ R
3736
3772
  ] }));
3737
3773
  }
3738
3774
  const C = F(() => /* @__PURE__ */ l.jsx(
3739
- Nr,
3775
+ Lr,
3740
3776
  {
3741
3777
  data: n,
3742
3778
  loading: o,
@@ -3759,7 +3795,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3759
3795
  ]);
3760
3796
  return d === void 0 || p === void 0 ? C : /* @__PURE__ */ l.jsxs("div", { children: [
3761
3797
  d !== void 0 && /* @__PURE__ */ l.jsx(
3762
- ee,
3798
+ oe,
3763
3799
  {
3764
3800
  withBorder: !0,
3765
3801
  p: "xs",
@@ -3773,7 +3809,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3773
3809
  ),
3774
3810
  C,
3775
3811
  p !== void 0 && /* @__PURE__ */ l.jsx(
3776
- ee,
3812
+ oe,
3777
3813
  {
3778
3814
  withBorder: !0,
3779
3815
  p: "xs",
@@ -3786,13 +3822,13 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3786
3822
  }
3787
3823
  )
3788
3824
  ] });
3789
- }, Nr = (e) => {
3825
+ }, Lr = (e) => {
3790
3826
  const n = F(() => {
3791
3827
  const o = [
3792
3828
  {
3793
3829
  id: "selection",
3794
3830
  header: ({ table: r }) => /* @__PURE__ */ l.jsx(
3795
- se,
3831
+ ue,
3796
3832
  {
3797
3833
  checked: r.getIsAllRowsSelected(),
3798
3834
  indeterminate: r.getIsSomeRowsSelected(),
@@ -3800,7 +3836,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3800
3836
  }
3801
3837
  ),
3802
3838
  cell: ({ row: r }) => /* @__PURE__ */ l.jsx(
3803
- se,
3839
+ ue,
3804
3840
  {
3805
3841
  checked: r.getIsSelected(),
3806
3842
  disabled: !r.getCanSelect(),
@@ -3817,10 +3853,10 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3817
3853
  cell: ({ row: i }) => r.render(i.original)
3818
3854
  });
3819
3855
  }), o;
3820
- }, [e.columns]), t = hn({
3856
+ }, [e.columns]), t = vn({
3821
3857
  data: e.data.records,
3822
3858
  columns: n,
3823
- getCoreRowModel: mn(),
3859
+ getCoreRowModel: Sn(),
3824
3860
  // convert to string, but we actually can get away with number
3825
3861
  getRowId: (o) => e.getRowId(o).toString(),
3826
3862
  state: {
@@ -3830,7 +3866,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3830
3866
  manualPagination: !0
3831
3867
  });
3832
3868
  return /* @__PURE__ */ l.jsx(
3833
- Cn,
3869
+ xn,
3834
3870
  {
3835
3871
  table: t,
3836
3872
  selectedRowKeys: e.selectedRowKeys,
@@ -3840,7 +3876,7 @@ const Tr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ii = (e) => {
3840
3876
  }
3841
3877
  );
3842
3878
  };
3843
- function xn(e, n, {
3879
+ function yn(e, n, {
3844
3880
  title: t,
3845
3881
  nestedKey: o,
3846
3882
  component: r
@@ -3848,18 +3884,18 @@ function xn(e, n, {
3848
3884
  let i;
3849
3885
  if (r !== void 0)
3850
3886
  i = r;
3851
- else if (ne(n))
3852
- n.cardinality === "1:N" || n.cardinality === "N:N" ? i = at : i = lt;
3887
+ else if (ie(n))
3888
+ n.cardinality === "1:N" || n.cardinality === "N:N" ? i = dt : i = ut;
3853
3889
  else {
3854
- if (le[n.datatype] === void 0)
3890
+ if (de[n.datatype] === void 0)
3855
3891
  throw new Error(
3856
3892
  `No display component found for datatype ${n.datatype}`
3857
3893
  );
3858
- i = le[n.datatype];
3894
+ i = de[n.datatype];
3859
3895
  }
3860
3896
  const s = {
3861
3897
  key: n.name,
3862
- title: t || /* @__PURE__ */ l.jsx(A, { value: n.label }),
3898
+ title: t || /* @__PURE__ */ l.jsx(N, { value: n.label }),
3863
3899
  accessorFn: (a) => a[n.tsName],
3864
3900
  render: (a) => {
3865
3901
  const u = a[n.tsName];
@@ -3871,7 +3907,7 @@ function xn(e, n, {
3871
3907
  return /* @__PURE__ */ l.jsx(i, { db: e, property: n, value: u });
3872
3908
  }), s;
3873
3909
  }
3874
- function Pi(e, n, t, {
3910
+ function Di(e, n, t, {
3875
3911
  title: o,
3876
3912
  nestedKey: r,
3877
3913
  component: i
@@ -3879,18 +3915,18 @@ function Pi(e, n, t, {
3879
3915
  let s;
3880
3916
  if (i !== void 0)
3881
3917
  s = i;
3882
- else if (ne(t))
3883
- t.cardinality === "1:N" || t.cardinality === "N:N" ? s = at : s = lt;
3918
+ else if (ie(t))
3919
+ t.cardinality === "1:N" || t.cardinality === "N:N" ? s = dt : s = ut;
3884
3920
  else {
3885
- if (le[t.datatype] === void 0)
3921
+ if (de[t.datatype] === void 0)
3886
3922
  throw new Error(
3887
3923
  `No display component found for datatype ${t.datatype}`
3888
3924
  );
3889
- s = le[t.datatype];
3925
+ s = de[t.datatype];
3890
3926
  }
3891
3927
  const a = {
3892
3928
  key: n + "." + t.name,
3893
- title: o || /* @__PURE__ */ l.jsx(A, { value: t.label }),
3929
+ title: o || /* @__PURE__ */ l.jsx(N, { value: t.label }),
3894
3930
  accessorFn: (u) => u[n.tsName][t.tsName],
3895
3931
  render: (u) => {
3896
3932
  const g = u[n.tsName][t.tsName];
@@ -3902,17 +3938,17 @@ function Pi(e, n, t, {
3902
3938
  return /* @__PURE__ */ l.jsx(s, { db: e, property: t, value: g });
3903
3939
  }), a;
3904
3940
  }
3905
- function Ei(e, n, t, o = {}) {
3906
- return t.map((r) => Rn(r) ? r : xn(e, n.publicProperties[r], o));
3941
+ function bi(e, n, t, o = {}) {
3942
+ return t.map((r) => _n(r) ? r : yn(e, n.publicProperties[r], o));
3907
3943
  }
3908
- function $i(e, n, t = [], o = {}) {
3909
- return t.map((r) => Rn(r) ? r : xn(e, n.publicProperties[r], o));
3944
+ function Vi(e, n, t = [], o = {}) {
3945
+ return t.map((r) => _n(r) ? r : yn(e, n.publicProperties[r], o));
3910
3946
  }
3911
- function Rn(e) {
3947
+ function _n(e) {
3912
3948
  return typeof e == "object" && "key" in e && "title" in e;
3913
3949
  }
3914
- const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3915
- var c, S;
3950
+ const Or = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Ti = (e) => {
3951
+ var c, h;
3916
3952
  const [n, t] = M(
3917
3953
  {}
3918
3954
  ), o = F(() => {
@@ -3920,7 +3956,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3920
3956
  {
3921
3957
  id: "selection",
3922
3958
  header: ({ table: d }) => /* @__PURE__ */ l.jsx(
3923
- se,
3959
+ ue,
3924
3960
  {
3925
3961
  checked: d.getIsAllRowsSelected(),
3926
3962
  indeterminate: d.getIsSomeRowsSelected(),
@@ -3928,7 +3964,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3928
3964
  }
3929
3965
  ),
3930
3966
  cell: ({ row: d }) => /* @__PURE__ */ l.jsx(
3931
- se,
3967
+ ue,
3932
3968
  {
3933
3969
  checked: d.getIsSelected(),
3934
3970
  disabled: !d.getCanSelect(),
@@ -3945,40 +3981,40 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3945
3981
  cell: ({ row: p }) => d.render(p.original)
3946
3982
  });
3947
3983
  }), f;
3948
- }, [e.columns]), r = hn({
3984
+ }, [e.columns]), r = vn({
3949
3985
  data: e.data,
3950
3986
  columns: o,
3951
- getCoreRowModel: mn(),
3952
- getPaginationRowModel: _r(),
3987
+ getCoreRowModel: Sn(),
3988
+ getPaginationRowModel: Ir(),
3953
3989
  state: {
3954
3990
  rowSelection: n
3955
3991
  },
3956
3992
  onRowSelectionChange: t
3957
3993
  }), i = F(() => Object.keys(n).filter((f) => n[f]).map(Number), [n]);
3958
3994
  let s, a;
3959
- vn(e.actions) && (s = /* @__PURE__ */ l.jsx(
3960
- Sn,
3995
+ wn(e.actions) && (s = /* @__PURE__ */ l.jsx(
3996
+ Cn,
3961
3997
  {
3962
3998
  actions: e.actions,
3963
3999
  selectedRowKeys: i
3964
4000
  }
3965
4001
  ));
3966
- const u = ((c = e.pagination) == null ? void 0 : c.positions) || kr;
4002
+ const u = ((c = e.pagination) == null ? void 0 : c.positions) || Or;
3967
4003
  if (u.size > 0) {
3968
4004
  const f = r.getState().pagination, d = /* @__PURE__ */ l.jsx(
3969
- wn,
4005
+ Rn,
3970
4006
  {
3971
4007
  total: r.getPageCount(),
3972
4008
  pageIndex: f.pageIndex,
3973
4009
  pageSize: f.pageSize,
3974
4010
  onUpdatePagination: (p, m) => r.setPagination({ pageIndex: p, pageSize: m }),
3975
- allowPageSizeChange: (S = e.pagination) == null ? void 0 : S.showSizeChanger
4011
+ allowPageSizeChange: (h = e.pagination) == null ? void 0 : h.showSizeChanger
3976
4012
  }
3977
4013
  );
3978
- u.has("topRight") && (s !== void 0 ? s = /* @__PURE__ */ l.jsxs(N, { justify: "space-between", gap: "sm", children: [
4014
+ u.has("topRight") && (s !== void 0 ? s = /* @__PURE__ */ l.jsxs(L, { justify: "space-between", gap: "sm", children: [
3979
4015
  s,
3980
4016
  d
3981
- ] }) : s = /* @__PURE__ */ l.jsx(z, { justify: "flex-end", children: d })), (u.has("bottomRight") || u.has("bottomLeft") || u.has("bottomCenter")) && (u.has("bottomLeft") ? a = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
4017
+ ] }) : s = /* @__PURE__ */ l.jsx(q, { justify: "flex-end", children: d })), (u.has("bottomRight") || u.has("bottomLeft") || u.has("bottomCenter")) && (u.has("bottomLeft") ? a = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3982
4018
  d,
3983
4019
  /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3984
4020
  "Showing ",
@@ -3994,7 +4030,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
3994
4030
  e.data.length,
3995
4031
  " records"
3996
4032
  ] })
3997
- ] }) : a = /* @__PURE__ */ l.jsxs(z, { justify: "space-between", align: "center", children: [
4033
+ ] }) : a = /* @__PURE__ */ l.jsxs(q, { justify: "space-between", align: "center", children: [
3998
4034
  /* @__PURE__ */ l.jsxs(P, { size: "sm", c: "dimmed", children: [
3999
4035
  "Showing ",
4000
4036
  f.pageIndex * f.pageSize + 1,
@@ -4013,7 +4049,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4013
4049
  ] }));
4014
4050
  }
4015
4051
  const g = /* @__PURE__ */ l.jsx(
4016
- Cn,
4052
+ xn,
4017
4053
  {
4018
4054
  selectedRowKeys: n,
4019
4055
  table: r,
@@ -4024,7 +4060,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4024
4060
  );
4025
4061
  return s === void 0 && a === void 0 ? g : /* @__PURE__ */ l.jsxs("div", { children: [
4026
4062
  s !== void 0 && /* @__PURE__ */ l.jsx(
4027
- ee,
4063
+ oe,
4028
4064
  {
4029
4065
  withBorder: !0,
4030
4066
  p: "xs",
@@ -4038,7 +4074,7 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4038
4074
  ),
4039
4075
  g,
4040
4076
  a !== void 0 && /* @__PURE__ */ l.jsx(
4041
- ee,
4077
+ oe,
4042
4078
  {
4043
4079
  withBorder: !0,
4044
4080
  p: "xs",
@@ -4051,28 +4087,28 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4051
4087
  }
4052
4088
  )
4053
4089
  ] });
4054
- }, Nt = {
4055
- integer: Me,
4056
- float: Me,
4057
- string: pe,
4058
- boolean: Zt,
4059
- "string[]": pe,
4060
- enum: pe,
4061
- date: $o,
4062
- datetime: Mo
4063
- }, Lr = {
4090
+ }, Lt = {
4091
+ integer: De,
4092
+ float: De,
4093
+ string: Se,
4094
+ boolean: tn,
4095
+ "string[]": Se,
4096
+ enum: Se,
4097
+ date: Do,
4098
+ datetime: bo
4099
+ }, zr = {
4064
4100
  lang2value: {
4065
4101
  en: "Update",
4066
4102
  vi: "Cập Nhật"
4067
4103
  },
4068
4104
  lang: "en"
4069
- }, Or = {
4105
+ }, Gr = {
4070
4106
  lang2value: {
4071
4107
  en: "Clear",
4072
4108
  vi: "Xóa"
4073
4109
  },
4074
4110
  lang: "en"
4075
- }, zr = ({
4111
+ }, Hr = ({
4076
4112
  db: e,
4077
4113
  property: n,
4078
4114
  InputComponent: t,
@@ -4082,22 +4118,22 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4082
4118
  onChange: s
4083
4119
  }) => {
4084
4120
  if (t === void 0)
4085
- if (ne(n)) {
4121
+ if (ie(n)) {
4086
4122
  if (n.isEmbedded)
4087
4123
  throw new Error("You should use nested property for embedded object");
4088
- t = n.cardinality === "N:N" || n.cardinality === "1:N" ? tn : en;
4124
+ t = n.cardinality === "N:N" || n.cardinality === "1:N" ? on : nn;
4089
4125
  } else {
4090
- if (Nt[n.datatype] === void 0)
4126
+ if (Lt[n.datatype] === void 0)
4091
4127
  throw new Error(
4092
4128
  `No input component found for datatype ${n.datatype}`
4093
4129
  );
4094
- t = Nt[n.datatype];
4130
+ t = Lt[n.datatype];
4095
4131
  }
4096
4132
  const a = F(() => {
4097
4133
  var g;
4098
4134
  return r === void 0 || (g = r(i).errorMessage) == null ? void 0 : g.t({ args: { name: n.label } });
4099
4135
  }, [r, i, n.label]);
4100
- return /* @__PURE__ */ l.jsxs(Q, { gap: 5, children: [
4136
+ return /* @__PURE__ */ l.jsxs(te, { gap: 5, children: [
4101
4137
  /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
4102
4138
  /* @__PURE__ */ l.jsx(
4103
4139
  $.Col,
@@ -4108,12 +4144,12 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4108
4144
  justifyContent: o.align || "left"
4109
4145
  },
4110
4146
  children: /* @__PURE__ */ l.jsx(
4111
- nn,
4147
+ rn,
4112
4148
  {
4113
- label: /* @__PURE__ */ l.jsx(A, { value: n.label }),
4149
+ label: /* @__PURE__ */ l.jsx(N, { value: n.label }),
4114
4150
  name: n.name,
4115
4151
  required: n.isRequired,
4116
- tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(A, { value: n.description }) : void 0,
4152
+ tooltip: n.description !== void 0 ? /* @__PURE__ */ l.jsx(N, { value: n.description }) : void 0,
4117
4153
  align: o.align
4118
4154
  }
4119
4155
  )
@@ -4131,34 +4167,34 @@ const kr = /* @__PURE__ */ new Set(["topRight", "bottomRight"]), Mi = (e) => {
4131
4167
  ] }),
4132
4168
  a !== void 0 && /* @__PURE__ */ l.jsxs($, { gutter: "sm", children: [
4133
4169
  /* @__PURE__ */ l.jsx($.Col, { span: o.labelCol }),
4134
- /* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(q.Error, { children: a }) })
4170
+ /* @__PURE__ */ l.jsx($.Col, { span: o.itemCol, children: /* @__PURE__ */ l.jsx(K.Error, { children: a }) })
4135
4171
  ] })
4136
4172
  ] });
4137
4173
  };
4138
- function Gr({
4174
+ function qr({
4139
4175
  properties: e,
4140
4176
  queryConditions: n
4141
4177
  }) {
4142
4178
  return e.reduce((t, o) => n[o.property.tsName] === void 0 ? t : t + 1, 0);
4143
4179
  }
4144
- const Hr = (e, n) => Jt(e, n, !1);
4145
- function qr({
4180
+ const Br = (e, n) => Zt(e, n, !1);
4181
+ function Ur({
4146
4182
  properties: e,
4147
4183
  queryConditions: n
4148
4184
  }) {
4149
- const t = Qn.getInstance().getLocale(), o = [];
4185
+ const t = eo.getInstance().getLocale(), o = [];
4150
4186
  for (const r of e) {
4151
4187
  const i = n[r.property.tsName];
4152
4188
  if (i !== void 0)
4153
4189
  if (o.length > 0 && o.push(" & "), r.property.datatype === "date" || r.property.datatype === "datetime") {
4154
- const s = r.property.datatype === "date" ? he : Hr;
4155
- i.op === "bti" ? (o.push(s(t, K(i.value[0]).toDate())), o.push(" ≤ "), o.push(fe(t, r.property.label)), o.push(" ≤ "), o.push(s(t, K(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(fe(t, r.property.label)), o.push(" ≥ "), o.push(s(t, K(i.value).toDate()))) : i.op === "lte" && (o.push(fe(t, r.property.label)), o.push(" ≤ "), o.push(s(t, K(i.value).toDate())));
4190
+ const s = r.property.datatype === "date" ? Ce : Br;
4191
+ i.op === "bti" ? (o.push(s(t, J(i.value[0]).toDate())), o.push(" ≤ "), o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, J(i.value[1]).toDate()))) : i.op === "gte" ? (o.push(he(t, r.property.label)), o.push(" ≥ "), o.push(s(t, J(i.value).toDate()))) : i.op === "lte" && (o.push(he(t, r.property.label)), o.push(" ≤ "), o.push(s(t, J(i.value).toDate())));
4156
4192
  } else
4157
- o.push(fe(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
4193
+ o.push(he(t, r.property.label)), i.op === "eq" ? o.push(" = ") : o.push(` ${i.op} `), o.push(i.value.toString());
4158
4194
  }
4159
4195
  return o.join("");
4160
4196
  }
4161
- const Br = ({
4197
+ const Kr = ({
4162
4198
  db: e,
4163
4199
  properties: n,
4164
4200
  styles: t,
@@ -4168,7 +4204,7 @@ const Br = ({
4168
4204
  queryConditions: s
4169
4205
  }) => {
4170
4206
  const [a, u] = M({});
4171
- Se(() => {
4207
+ we(() => {
4172
4208
  const p = {};
4173
4209
  for (const m of n) {
4174
4210
  const C = s[m.property.tsName];
@@ -4185,26 +4221,26 @@ const Br = ({
4185
4221
  }
4186
4222
  u(p);
4187
4223
  }, [n, s]);
4188
- const [g, c, S] = F(() => {
4224
+ const [g, c, h] = F(() => {
4189
4225
  const p = [], m = {}, C = {};
4190
4226
  for (const v of n) {
4191
- let _, y = (w) => {
4192
- if (!xt.isEmpty(w))
4193
- return { op: "eq", value: w };
4227
+ let _, R = (j) => {
4228
+ if (!yt.isEmpty(j))
4229
+ return { op: "eq", value: j };
4194
4230
  };
4195
- (v.property.datatype === "date" || v.property.datatype === "datetime") && (_ = xt.validateTimeRange, y = (w) => w.start !== void 0 && w.end !== void 0 ? {
4231
+ (v.property.datatype === "date" || v.property.datatype === "datetime") && (_ = yt.validateTimeRange, R = (j) => j.start !== void 0 && j.end !== void 0 ? {
4196
4232
  op: "bti",
4197
- value: [w.start.toISOString(), w.end.toISOString()]
4198
- } : w.start !== void 0 ? { op: "gte", value: w.start.toISOString() } : w.end !== void 0 ? { op: "lte", value: w.end.toISOString() } : void 0), m[v.property.tsName] = y, C[v.property.tsName] = _, p.push(
4233
+ value: [j.start.toISOString(), j.end.toISOString()]
4234
+ } : j.start !== void 0 ? { op: "gte", value: j.start.toISOString() } : j.end !== void 0 ? { op: "lte", value: j.end.toISOString() } : void 0), m[v.property.tsName] = R, C[v.property.tsName] = _, p.push(
4199
4235
  /* @__PURE__ */ l.jsx(
4200
- zr,
4236
+ Hr,
4201
4237
  {
4202
4238
  db: e,
4203
4239
  property: v.property,
4204
4240
  InputComponent: v.InputComponent,
4205
4241
  value: a[v.property.tsName],
4206
- onChange: (w) => {
4207
- u({ ...a, [v.property.tsName]: w });
4242
+ onChange: (j) => {
4243
+ u({ ...a, [v.property.tsName]: j });
4208
4244
  },
4209
4245
  layout: r,
4210
4246
  validator: _
@@ -4224,17 +4260,17 @@ const Br = ({
4224
4260
  i(m);
4225
4261
  }, d = F(() => (p) => {
4226
4262
  for (const m of n) {
4227
- const C = S[m.property.tsName];
4263
+ const C = h[m.property.tsName];
4228
4264
  if (C !== void 0 && !C(p[m.property.tsName]).isValid)
4229
4265
  return !1;
4230
4266
  }
4231
4267
  return !0;
4232
- }, [n, S]);
4233
- return /* @__PURE__ */ l.jsxs(Q, { gap: "sm", className: o, style: t, children: [
4268
+ }, [n, h]);
4269
+ return /* @__PURE__ */ l.jsxs(te, { gap: "sm", className: o, style: t, children: [
4234
4270
  g,
4235
- /* @__PURE__ */ l.jsxs(N, { gap: "sm", justify: "flex-end", children: [
4271
+ /* @__PURE__ */ l.jsxs(L, { gap: "sm", justify: "flex-end", children: [
4236
4272
  /* @__PURE__ */ l.jsx(
4237
- G,
4273
+ B,
4238
4274
  {
4239
4275
  variant: "light",
4240
4276
  size: "xs",
@@ -4243,28 +4279,28 @@ const Br = ({
4243
4279
  u({}), f({});
4244
4280
  },
4245
4281
  disabled: Object.keys(a).length === 0,
4246
- children: /* @__PURE__ */ l.jsx(A, { value: Or })
4282
+ children: /* @__PURE__ */ l.jsx(N, { value: Gr })
4247
4283
  }
4248
4284
  ),
4249
4285
  /* @__PURE__ */ l.jsx(
4250
- G,
4286
+ B,
4251
4287
  {
4252
4288
  variant: "light",
4253
4289
  size: "xs",
4254
4290
  onClick: () => f(a),
4255
4291
  disabled: !d(a),
4256
- children: /* @__PURE__ */ l.jsx(A, { value: Lr })
4292
+ children: /* @__PURE__ */ l.jsx(N, { value: zr })
4257
4293
  }
4258
4294
  )
4259
4295
  ] })
4260
4296
  ] });
4261
- }, kt = /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5 }), Lt = /* @__PURE__ */ l.jsx(it, { size: 16, stroke: 1.5 }), Ur = {
4297
+ }, Ot = /* @__PURE__ */ l.jsx(Qn, { size: 16, stroke: 1.5 }), zt = /* @__PURE__ */ l.jsx(lt, { size: 16, stroke: 1.5 }), Yr = {
4262
4298
  lang2value: {
4263
4299
  en: "Search By",
4264
4300
  vi: "Tìm Kiếm Theo"
4265
4301
  },
4266
4302
  lang: "en"
4267
- }, Di = ({
4303
+ }, Ni = ({
4268
4304
  query: e,
4269
4305
  onChange: n,
4270
4306
  debounceTime: t = 250,
@@ -4272,7 +4308,7 @@ const Br = ({
4272
4308
  searchField: r,
4273
4309
  advancedSearch: i
4274
4310
  }) => {
4275
- const s = Y(Z), [a, u] = M(e), [g, c] = M(!1), [S, f] = M([!1, Date.now()]), d = F(() => eo(
4311
+ const s = W(ne), [a, u] = M(e), [g, c] = M(!1), [h, f] = M([!1, Date.now()]), d = F(() => no(
4276
4312
  t,
4277
4313
  (v) => {
4278
4314
  c(!1), n(v);
@@ -4281,64 +4317,64 @@ const Br = ({
4281
4317
  ), [t, n]), p = F(() => (v) => {
4282
4318
  u(v.target.value), c(!0), d(v.target.value);
4283
4319
  }, [u, c, d]);
4284
- o === void 0 && r !== void 0 && (o = Ur);
4320
+ o === void 0 && r !== void 0 && (o = Yr);
4285
4321
  let m = "";
4286
4322
  if (o !== void 0 && (m = o.lang2value[s.language] || o.lang2value[o.lang]), r !== void 0 && (m.length > 0 && (m += " "), m += r.lang2value[s.language] || r.lang2value[r.lang]), i === void 0)
4287
4323
  return /* @__PURE__ */ l.jsx(
4288
- Ct,
4324
+ xt,
4289
4325
  {
4290
4326
  flex: 1,
4291
4327
  label: "Search",
4292
4328
  placeholder: m,
4293
- leftSection: g ? kt : Lt,
4329
+ leftSection: g ? Ot : zt,
4294
4330
  value: a,
4295
4331
  onChange: p
4296
4332
  }
4297
4333
  );
4298
- const C = Gr(i);
4334
+ const C = qr(i);
4299
4335
  return /* @__PURE__ */ l.jsxs(
4300
- ke,
4336
+ Le,
4301
4337
  {
4302
4338
  width: "target",
4303
4339
  trapFocus: !0,
4304
4340
  position: "bottom",
4305
4341
  withArrow: !0,
4306
4342
  shadow: "md",
4307
- opened: S[0],
4343
+ opened: h[0],
4308
4344
  onDismiss: () => {
4309
4345
  f([!1, Date.now()]);
4310
4346
  },
4311
4347
  children: [
4312
- /* @__PURE__ */ l.jsx(ke.Target, { children: /* @__PURE__ */ l.jsx(
4313
- Ct,
4348
+ /* @__PURE__ */ l.jsx(Le.Target, { children: /* @__PURE__ */ l.jsx(
4349
+ xt,
4314
4350
  {
4315
4351
  flex: 1,
4316
4352
  label: "Search",
4317
4353
  placeholder: m,
4318
- leftSection: g ? kt : Lt,
4354
+ leftSection: g ? Ot : zt,
4319
4355
  rightSection: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4320
4356
  /* @__PURE__ */ l.jsx(
4321
- wt,
4357
+ Rt,
4322
4358
  {
4323
4359
  variant: "transparent",
4324
4360
  "aria-label": "Clear Query",
4325
4361
  onClick: () => {
4326
4362
  u(""), n("");
4327
4363
  },
4328
- children: /* @__PURE__ */ l.jsx(Yn, { size: 16, stroke: 1.5, cursor: "pointer" })
4364
+ children: /* @__PURE__ */ l.jsx(Xn, { size: 16, stroke: 1.5, cursor: "pointer" })
4329
4365
  }
4330
4366
  ),
4331
4367
  /* @__PURE__ */ l.jsx(
4332
- wt,
4368
+ Rt,
4333
4369
  {
4334
4370
  variant: "transparent",
4335
4371
  "aria-label": "Extra Filters",
4336
4372
  color: C > 0 ? "orange" : void 0,
4337
4373
  onClick: () => {
4338
- S[1] + 200 >= Date.now() || f([!0, Date.now()]);
4374
+ h[1] + 200 >= Date.now() || f([!0, Date.now()]);
4339
4375
  },
4340
4376
  children: /* @__PURE__ */ l.jsx(
4341
- Wn,
4377
+ Jn,
4342
4378
  {
4343
4379
  size: 16,
4344
4380
  stroke: C > 0 ? 2 : 1.5,
@@ -4354,12 +4390,12 @@ const Br = ({
4354
4390
  rightSectionWidth: 68,
4355
4391
  value: a,
4356
4392
  onChange: p,
4357
- description: qr(i),
4393
+ description: Ur(i),
4358
4394
  inputWrapperOrder: ["label", "input", "description", "error"]
4359
4395
  }
4360
4396
  ) }),
4361
- /* @__PURE__ */ l.jsx(ke.Dropdown, { children: /* @__PURE__ */ l.jsx(
4362
- Br,
4397
+ /* @__PURE__ */ l.jsx(Le.Dropdown, { children: /* @__PURE__ */ l.jsx(
4398
+ Kr,
4363
4399
  {
4364
4400
  db: i.db,
4365
4401
  properties: i.properties,
@@ -4373,7 +4409,7 @@ const Br = ({
4373
4409
  ]
4374
4410
  }
4375
4411
  );
4376
- }, Kr = te(
4412
+ }, Wr = re(
4377
4413
  ({
4378
4414
  store: e,
4379
4415
  record: n,
@@ -4383,42 +4419,42 @@ const Br = ({
4383
4419
  }) => {
4384
4420
  if (r !== void 0 && !r(n))
4385
4421
  return /* @__PURE__ */ l.jsx("div", {});
4386
- const i = Xt(n, t);
4422
+ const i = Jt(n, t);
4387
4423
  return /* @__PURE__ */ l.jsxs("div", { children: [
4388
- /* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(A, { value: t.label }) }),
4424
+ /* @__PURE__ */ l.jsx(P, { size: "sm", fw: 550, children: /* @__PURE__ */ l.jsx(N, { value: t.label }) }),
4389
4425
  i !== void 0 && /* @__PURE__ */ l.jsx(o, { db: e.db, property: t, value: i })
4390
4426
  ] });
4391
4427
  }
4392
- ), Yr = 12, Wr = (e) => {
4393
- const n = e.schema, t = F(() => e.fieldGroups.map((o, r) => Xr(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
4394
- return /* @__PURE__ */ l.jsx(Q, { gap: "sm", className: e.className, style: e.styles, children: t });
4428
+ ), Xr = 12, Jr = (e) => {
4429
+ const n = e.schema, t = F(() => e.fieldGroups.map((o, r) => Qr(n, e.store, e.record, r, o)), [n, e.store, e.record, e.fieldGroups]);
4430
+ return /* @__PURE__ */ l.jsx(te, { gap: "sm", className: e.className, style: e.styles, children: t });
4395
4431
  };
4396
- function Xr(e, n, t, o, r) {
4432
+ function Qr(e, n, t, o, r) {
4397
4433
  const i = r.fields, s = [];
4398
4434
  for (let a = 0; a < i.length; a++) {
4399
- const u = Yr / i[a].length;
4435
+ const u = Xr / i[a].length;
4400
4436
  if (!Number.isInteger(u))
4401
4437
  throw new Error(`Span must be an integer, but got ${u} for row ${a}`);
4402
4438
  for (let g = 0; g < i[a].length; g++) {
4403
4439
  const c = i[a][g];
4404
- let S;
4405
- typeof c == "function" ? S = c(n, t) : typeof c == "object" && "prop" in c ? S = nt(
4440
+ let h;
4441
+ typeof c == "function" ? h = c(n, t) : typeof c == "object" && "prop" in c ? h = ot(
4406
4442
  n,
4407
4443
  t,
4408
- c.prop instanceof B ? c.prop : e.allProperties[c.prop],
4444
+ c.prop instanceof Y ? c.prop : e.allProperties[c.prop],
4409
4445
  c.args
4410
- ) : S = nt(
4446
+ ) : h = ot(
4411
4447
  n,
4412
4448
  t,
4413
- c instanceof B ? c : e.allProperties[c]
4449
+ c instanceof Y ? c : e.allProperties[c]
4414
4450
  ), s.push(
4415
- /* @__PURE__ */ l.jsx($.Col, { span: u, children: S }, `${a}-${g}`)
4451
+ /* @__PURE__ */ l.jsx($.Col, { span: u, children: h }, `${a}-${g}`)
4416
4452
  );
4417
4453
  }
4418
4454
  }
4419
4455
  return /* @__PURE__ */ l.jsx($, { gutter: "sm", children: s }, o);
4420
4456
  }
4421
- function Vi(e, n, t = {}) {
4457
+ function Ai(e, n, t = {}) {
4422
4458
  return (o, r) => {
4423
4459
  if (t.visible !== void 0 && !t.visible(r))
4424
4460
  return /* @__PURE__ */ l.jsx("div", {});
@@ -4428,12 +4464,12 @@ function Vi(e, n, t = {}) {
4428
4464
  u = s(o, r);
4429
4465
  else {
4430
4466
  let g, c = {};
4431
- typeof s == "object" && "prop" in s ? (g = s.prop instanceof B ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof B ? s : e.allProperties[s], u = nt(o, r, g, c);
4467
+ typeof s == "object" && "prop" in s ? (g = s.prop instanceof Y ? s.prop : e.allProperties[s.prop], s.args !== void 0 && (c = s.args)) : g = s instanceof Y ? s : e.allProperties[s], u = ot(o, r, g, c);
4432
4468
  }
4433
4469
  return /* @__PURE__ */ l.jsx("div", { children: u }, a);
4434
4470
  });
4435
4471
  return /* @__PURE__ */ l.jsx(
4436
- N,
4472
+ L,
4437
4473
  {
4438
4474
  gap: t.flexGap,
4439
4475
  grow: t.flexGrow ?? !0,
@@ -4443,19 +4479,19 @@ function Vi(e, n, t = {}) {
4443
4479
  );
4444
4480
  };
4445
4481
  }
4446
- function Jr(e) {
4447
- if (ne(e))
4448
- return e.cardinality === "N:N" || e.cardinality === "1:N" ? at : lt;
4449
- if (le[e.datatype] === void 0)
4482
+ function Zr(e) {
4483
+ if (ie(e))
4484
+ return e.cardinality === "N:N" || e.cardinality === "1:N" ? dt : ut;
4485
+ if (de[e.datatype] === void 0)
4450
4486
  throw new Error(
4451
4487
  `No display component found for datatype ${e.datatype}`
4452
4488
  );
4453
- return le[e.datatype];
4489
+ return de[e.datatype];
4454
4490
  }
4455
- function nt(e, n, t, o = {}) {
4491
+ function ot(e, n, t, o = {}) {
4456
4492
  let r;
4457
- return o.display !== void 0 ? r = o.display : r = Jr(t instanceof B ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
4458
- Kr,
4493
+ return o.display !== void 0 ? r = o.display : r = Zr(t instanceof Y ? t.leafProperty : t), /* @__PURE__ */ l.jsx(
4494
+ Wr,
4459
4495
  {
4460
4496
  store: e,
4461
4497
  record: n,
@@ -4465,10 +4501,10 @@ function nt(e, n, t, o = {}) {
4465
4501
  }
4466
4502
  );
4467
4503
  }
4468
- const bi = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabName, children: [
4469
- /* @__PURE__ */ l.jsx(Re.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Tab, { value: n.tabName, children: n.tabName }, t)) }),
4470
- e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(Re.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
4471
- Wr,
4504
+ const ki = (e) => /* @__PURE__ */ l.jsxs(ye, { defaultValue: e.fieldTabs[0].tabName, children: [
4505
+ /* @__PURE__ */ l.jsx(ye.List, { children: e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Tab, { value: n.tabName, children: n.tabName }, t)) }),
4506
+ e.fieldTabs.map((n, t) => /* @__PURE__ */ l.jsx(ye.Panel, { value: n.tabName, pt: "sm", children: /* @__PURE__ */ l.jsx(
4507
+ Jr,
4472
4508
  {
4473
4509
  schema: e.schema,
4474
4510
  store: e.store,
@@ -4480,76 +4516,80 @@ const bi = (e) => /* @__PURE__ */ l.jsxs(Re, { defaultValue: e.fieldTabs[0].tabN
4480
4516
  ) }, t))
4481
4517
  ] });
4482
4518
  export {
4483
- Zt as BooleanInput,
4484
- ji as ConfirmationInput,
4485
- yi as ConfirmationLabel,
4486
- We as CountryFlagComponent,
4487
- bo as DEFAULT_LAYOUT,
4488
- Tr as DEFAULT_PAGINATION_POSITIONS,
4489
- le as DataType2DisplayComponent,
4490
- Et as DataType2InputComponent,
4491
- fo as DateDisplay,
4492
- xo as DateInput,
4493
- $o as DateRangeInput,
4494
- co as DateTimeDisplay,
4495
- xi as DateTimeHideTimeDisplay,
4496
- Mo as DateTimeRangeInput,
4497
- io as EmojiCountryFlag,
4498
- Ro as EnumInput,
4499
- on as FormItem,
4519
+ tn as BooleanInput,
4520
+ Pi as ConfirmationInput,
4521
+ Ii as ConfirmationLabel,
4522
+ Xe as CountryFlagComponent,
4523
+ No as DEFAULT_LAYOUT,
4524
+ kr as DEFAULT_PAGINATION_POSITIONS,
4525
+ de as DataType2DisplayComponent,
4526
+ Mt as DataType2InputComponent,
4527
+ mo as DateDisplay,
4528
+ yo as DateInput,
4529
+ Do as DateRangeInput,
4530
+ po as DateTimeDisplay,
4531
+ ji as DateTimeHideTimeDisplay,
4532
+ bo as DateTimeRangeInput,
4533
+ lo as EmojiCountryFlag,
4534
+ _o as EnumInput,
4535
+ sn as FormItem,
4500
4536
  Ao as FormItemInner,
4501
- nn as FormItemLabel,
4502
- ui as LanguageSelector,
4503
- fi as Loading,
4504
- pi as LoadingInline,
4505
- Z as LocaleContext,
4506
- ai as LocaleProvider,
4507
- go as MenuTrie,
4508
- at as MultiForeignKeyDisplay,
4509
- tn as MultiForeignKeyInput,
4510
- A as MultiLingualString,
4511
- mi as NotAuthorized,
4512
- gi as NotFound,
4513
- Yt as NotFoundInline,
4514
- ci as NotFoundSubPage,
4515
- Me as NumberInput,
4516
- Ci as OrderedUniqueList,
4517
- Xe as Permission,
4518
- ro as SVGCountryFlag,
4519
- Br as SearchForm,
4520
- zr as SearchFormItem,
4521
- st as SeraContext,
4522
- Ri as SeraContextProvider,
4523
- Mi as SeraEmbeddedTable,
4524
- _i as SeraForm,
4525
- Di as SeraSearch,
4526
- Ii as SeraTable,
4527
- wi as SeraVerticalMenu,
4528
- Wr as SeraView,
4529
- bi as SeraViewTab,
4530
- lt as SingleForeignKeyDisplay,
4531
- en as SingleForeignKeyInput,
4532
- pe as TextInput,
4533
- Wt as Trie,
4534
- Ft as TrieNode,
4535
- lo as buildMenuItemIndex,
4536
- b as countryFlags,
4537
- uo as filterAllowedItems,
4538
- Gr as getNumberOfFilters,
4539
- Xt as getPropertyValue,
4540
- qr as getReadableFilters,
4541
- hi as groupBy,
4542
- Si as groupByAsList,
4543
- Vi as groupFields,
4544
- Fi as groupFormFields,
4545
- To as isHorizontalLayout,
4546
- Rn as isSeraColumn,
4547
- $i as makeEmbeddedTableColumns,
4548
- xn as makeTableColumn,
4549
- Pi as makeTableColumnFromNestedProperty,
4550
- Ei as makeTableColumns,
4551
- It as setPropertyValue,
4552
- fe as translateMultiLingualString,
4553
- vi as uniqueList,
4554
- di as useMultiLingualString
4537
+ rn as FormItemLabel,
4538
+ gi as LanguageSelector,
4539
+ mi as Loading,
4540
+ hi as LoadingInline,
4541
+ ne as LocaleContext,
4542
+ di as LocaleProvider,
4543
+ fo as MenuTrie,
4544
+ dt as MultiForeignKeyDisplay,
4545
+ on as MultiForeignKeyInput,
4546
+ N as MultiLingualString,
4547
+ Si as NotAuthorized,
4548
+ fi as NotFound,
4549
+ Wt as NotFoundInline,
4550
+ pi as NotFoundSubPage,
4551
+ De as NumberInput,
4552
+ xi as OrderedUniqueList,
4553
+ Je as Permission,
4554
+ so as SVGCountryFlag,
4555
+ Kr as SearchForm,
4556
+ Hr as SearchFormItem,
4557
+ at as SeraContext,
4558
+ Fi as SeraContextProvider,
4559
+ Ti as SeraEmbeddedTable,
4560
+ Ei as SeraForm,
4561
+ Ni as SeraSearch,
4562
+ Mi as SeraTable,
4563
+ _i as SeraVerticalMenu,
4564
+ Jr as SeraView,
4565
+ ki as SeraViewTab,
4566
+ ut as SingleForeignKeyDisplay,
4567
+ nn as SingleForeignKeyInput,
4568
+ Qt as TestIdContext,
4569
+ Ri as TestIdProvider,
4570
+ Se as TextInput,
4571
+ Xt as Trie,
4572
+ Pt as TrieNode,
4573
+ uo as buildMenuItemIndex,
4574
+ T as countryFlags,
4575
+ co as filterAllowedItems,
4576
+ qr as getNumberOfFilters,
4577
+ Jt as getPropertyValue,
4578
+ Ur as getReadableFilters,
4579
+ yi as getTestIdProps,
4580
+ vi as groupBy,
4581
+ Ci as groupByAsList,
4582
+ Ai as groupFields,
4583
+ $i as groupFormFields,
4584
+ ko as isHorizontalLayout,
4585
+ _n as isSeraColumn,
4586
+ Vi as makeEmbeddedTableColumns,
4587
+ yn as makeTableColumn,
4588
+ Di as makeTableColumnFromNestedProperty,
4589
+ bi as makeTableColumns,
4590
+ Et as setPropertyValue,
4591
+ he as translateMultiLingualString,
4592
+ wi as uniqueList,
4593
+ ci as useMultiLingualString,
4594
+ z as useTestId
4555
4595
  };