@espresso-lab/mantine-data-table 2.2.7 → 2.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,70 +1,19 @@
1
1
  import * as e from "react";
2
2
  import t, { Fragment as n, createContext as r, createElement as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
4
- import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, Indicator as E, Loader as D, Menu as O, MenuDropdown as k, MenuItem as A, MenuTarget as j, Modal as M, NumberInput as N, Pagination as ee, Popover as P, PopoverDropdown as te, PopoverTarget as ne, ScrollArea as F, Select as I, Skeleton as re, Stack as L, Stepper as R, Table as ie, TableTd as ae, TableTfoot as oe, TableTh as z, TableThead as se, TableTr as ce, Tabs as le, Text as B, TextInput as ue, Textarea as de, Title as fe, createSafeContext as pe, parseThemeColor as me, rem as V, useDirection as he, useMantineTheme as ge } from "@mantine/core";
4
+ import { Accordion as h, ActionIcon as g, Alert as _, Box as v, Button as y, Center as b, Checkbox as x, Collapse as S, Divider as C, Flex as w, Group as T, HoverCard as E, Indicator as D, Loader as O, Menu as k, MenuDropdown as A, MenuItem as j, MenuTarget as M, Modal as N, NumberInput as P, Pagination as ee, Popover as F, PopoverDropdown as te, PopoverTarget as I, ScrollArea as L, Select as ne, Skeleton as R, Stack as re, Stepper as ie, Table as z, TableTd as ae, TableTfoot as oe, TableTh as se, TableThead as ce, TableTr as B, Tabs as le, Text as V, TextInput as ue, Textarea as de, Title as fe, createSafeContext as pe, parseThemeColor as me, rem as H, useDirection as he, useMantineTheme as ge } from "@mantine/core";
5
5
  import { DateInput as _e } from "@mantine/dates";
6
6
  import { useForm as ve } from "@mantine/form";
7
7
  import { IconCaretDownFilled as ye, IconChevronRight as be, IconDotsVertical as xe, IconFilter as Se, IconInfoCircle as Ce, IconPencil as we, IconRefresh as Te, IconSortAscending as Ee, IconSortDescending as De, IconTrash as Oe } from "@tabler/icons-react";
8
8
  import { useClickOutside as ke, useDisclosure as Ae, useLocalStorage as je, useMediaQuery as Me, useMergedRef as Ne, useTimeout as Pe } from "@mantine/hooks";
9
- //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
10
- var H = class {
11
- constructor() {
12
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
- }
14
- subscribe(e) {
15
- return this.listeners.add(e), this.onSubscribe(), () => {
16
- this.listeners.delete(e), this.onUnsubscribe();
17
- };
18
- }
19
- hasListeners() {
20
- return this.listeners.size > 0;
21
- }
22
- onSubscribe() {}
23
- onUnsubscribe() {}
24
- }, Fe = new class extends H {
25
- #e;
26
- #t;
27
- #n;
28
- constructor() {
29
- super(), this.#n = (e) => {
30
- if (typeof window < "u" && window.addEventListener) {
31
- let t = () => e();
32
- return window.addEventListener("visibilitychange", t, !1), () => {
33
- window.removeEventListener("visibilitychange", t);
34
- };
35
- }
36
- };
37
- }
38
- onSubscribe() {
39
- this.#t || this.setEventListener(this.#n);
40
- }
41
- onUnsubscribe() {
42
- this.hasListeners() || (this.#t?.(), this.#t = void 0);
43
- }
44
- setEventListener(e) {
45
- this.#n = e, this.#t?.(), this.#t = e((e) => {
46
- typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
47
- });
48
- }
49
- setFocused(e) {
50
- this.#e !== e && (this.#e = e, this.onFocus());
51
- }
52
- onFocus() {
53
- let e = this.isFocused();
54
- this.listeners.forEach((t) => {
55
- t(e);
56
- });
57
- }
58
- isFocused() {
59
- return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
60
- }
61
- }(), Ie = {
9
+ //#region node_modules/@tanstack/query-core/build/modern/timeoutManager.js
10
+ var Fe = {
62
11
  setTimeout: (e, t) => setTimeout(e, t),
63
12
  clearTimeout: (e) => clearTimeout(e),
64
13
  setInterval: (e, t) => setInterval(e, t),
65
14
  clearInterval: (e) => clearInterval(e)
66
- }, U = new class {
67
- #e = Ie;
15
+ }, Ie = new class {
16
+ #e = Fe;
68
17
  #t = !1;
69
18
  setTimeoutProvider(e) {
70
19
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
@@ -92,79 +41,79 @@ function Le(e) {
92
41
  //#region node_modules/@tanstack/query-core/build/modern/utils.js
93
42
  var Re = typeof window > "u" || "Deno" in globalThis;
94
43
  function ze() {}
95
- function Be(e) {
44
+ function U(e) {
96
45
  return typeof e == "number" && e >= 0 && e !== Infinity;
97
46
  }
98
- function Ve(e, t) {
47
+ function Be(e, t) {
99
48
  return Math.max(e + (t || 0) - Date.now(), 0);
100
49
  }
101
- function He(e, t) {
50
+ function Ve(e, t) {
102
51
  return typeof e == "function" ? e(t) : e;
103
52
  }
104
53
  function W(e, t) {
105
54
  return typeof e == "function" ? e(t) : e;
106
55
  }
107
- function Ue(e) {
108
- return JSON.stringify(e, (e, t) => G(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
56
+ function He(e) {
57
+ return JSON.stringify(e, (e, t) => qe(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
109
58
  }
110
- var We = Object.prototype.hasOwnProperty;
111
- function Ge(e, t, n = 0) {
59
+ var Ue = Object.prototype.hasOwnProperty;
60
+ function We(e, t, n = 0) {
112
61
  if (e === t) return e;
113
62
  if (n > 500) return t;
114
- let r = qe(e) && qe(t);
115
- if (!r && !(G(e) && G(t))) return t;
63
+ let r = Ke(e) && Ke(t);
64
+ if (!r && !(qe(e) && qe(t))) return t;
116
65
  let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
117
66
  for (let l = 0; l < o; l++) {
118
67
  let o = r ? l : a[l], u = e[o], d = t[o];
119
68
  if (u === d) {
120
- s[o] = u, (r ? l < i : We.call(e, o)) && c++;
69
+ s[o] = u, (r ? l < i : Ue.call(e, o)) && c++;
121
70
  continue;
122
71
  }
123
72
  if (u === null || d === null || typeof u != "object" || typeof d != "object") {
124
73
  s[o] = d;
125
74
  continue;
126
75
  }
127
- let f = Ge(u, d, n + 1);
76
+ let f = We(u, d, n + 1);
128
77
  s[o] = f, f === u && c++;
129
78
  }
130
79
  return i === o && c === i ? e : s;
131
80
  }
132
- function Ke(e, t) {
81
+ function Ge(e, t) {
133
82
  if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
134
83
  for (let n in e) if (e[n] !== t[n]) return !1;
135
84
  return !0;
136
85
  }
137
- function qe(e) {
86
+ function Ke(e) {
138
87
  return Array.isArray(e) && e.length === Object.keys(e).length;
139
88
  }
140
- function G(e) {
141
- if (!K(e)) return !1;
89
+ function qe(e) {
90
+ if (!Je(e)) return !1;
142
91
  let t = e.constructor;
143
92
  if (t === void 0) return !0;
144
93
  let n = t.prototype;
145
- return !(!K(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
94
+ return !(!Je(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
146
95
  }
147
- function K(e) {
96
+ function Je(e) {
148
97
  return Object.prototype.toString.call(e) === "[object Object]";
149
98
  }
150
- function Je(e, t, n) {
99
+ function Ye(e, t, n) {
151
100
  if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
152
101
  if (n.structuralSharing !== !1) {
153
102
  if (process.env.NODE_ENV !== "production") try {
154
- return Ge(e, t);
103
+ return We(e, t);
155
104
  } catch (e) {
156
105
  throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`), e;
157
106
  }
158
- return Ge(e, t);
107
+ return We(e, t);
159
108
  }
160
109
  return t;
161
110
  }
162
- function Ye(e, t) {
111
+ function Xe(e, t) {
163
112
  return typeof e == "function" ? e(...t) : !!e;
164
113
  }
165
114
  //#endregion
166
115
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
167
- var Xe = /* @__PURE__ */ (() => {
116
+ var G = /* @__PURE__ */ (() => {
168
117
  let e = () => Re;
169
118
  return {
170
119
  isServer() {
@@ -174,38 +123,13 @@ var Xe = /* @__PURE__ */ (() => {
174
123
  e = t;
175
124
  }
176
125
  };
177
- })();
178
- //#endregion
179
- //#region node_modules/@tanstack/query-core/build/modern/thenable.js
126
+ })(), K = Le;
180
127
  function Ze() {
181
- let e, t, n = new Promise((n, r) => {
182
- e = n, t = r;
183
- });
184
- n.status = "pending", n.catch(() => {});
185
- function r(e) {
186
- Object.assign(n, e), delete n.resolve, delete n.reject;
187
- }
188
- return n.resolve = (t) => {
189
- r({
190
- status: "fulfilled",
191
- value: t
192
- }), e(t);
193
- }, n.reject = (e) => {
194
- r({
195
- status: "rejected",
196
- reason: e
197
- }), t(e);
198
- }, n;
199
- }
200
- //#endregion
201
- //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
202
- var Qe = Le;
203
- function $e() {
204
128
  let e = [], t = 0, n = (e) => {
205
129
  e();
206
130
  }, r = (e) => {
207
131
  e();
208
- }, i = Qe, a = (r) => {
132
+ }, i = K, a = (r) => {
209
133
  t ? e.push(r) : i(() => {
210
134
  n(r);
211
135
  });
@@ -247,7 +171,58 @@ function $e() {
247
171
  }
248
172
  };
249
173
  }
250
- var et = $e(), tt = new class extends H {
174
+ var Qe = Ze(), $e = class {
175
+ constructor() {
176
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
177
+ }
178
+ subscribe(e) {
179
+ return this.listeners.add(e), this.onSubscribe(), () => {
180
+ this.listeners.delete(e), this.onUnsubscribe();
181
+ };
182
+ }
183
+ hasListeners() {
184
+ return this.listeners.size > 0;
185
+ }
186
+ onSubscribe() {}
187
+ onUnsubscribe() {}
188
+ }, et = new class extends $e {
189
+ #e;
190
+ #t;
191
+ #n;
192
+ constructor() {
193
+ super(), this.#n = (e) => {
194
+ if (typeof window < "u" && window.addEventListener) {
195
+ let t = () => e();
196
+ return window.addEventListener("visibilitychange", t, !1), () => {
197
+ window.removeEventListener("visibilitychange", t);
198
+ };
199
+ }
200
+ };
201
+ }
202
+ onSubscribe() {
203
+ this.#t || this.setEventListener(this.#n);
204
+ }
205
+ onUnsubscribe() {
206
+ this.hasListeners() || (this.#t?.(), this.#t = void 0);
207
+ }
208
+ setEventListener(e) {
209
+ this.#n = e, this.#t?.(), this.#t = e((e) => {
210
+ typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
211
+ });
212
+ }
213
+ setFocused(e) {
214
+ this.#e !== e && (this.#e = e, this.onFocus());
215
+ }
216
+ onFocus() {
217
+ let e = this.isFocused();
218
+ this.listeners.forEach((t) => {
219
+ t(e);
220
+ });
221
+ }
222
+ isFocused() {
223
+ return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
224
+ }
225
+ }(), tt = new class extends $e {
251
226
  #e = !0;
252
227
  #t;
253
228
  #n;
@@ -280,17 +255,140 @@ var et = $e(), tt = new class extends H {
280
255
  }
281
256
  }();
282
257
  //#endregion
258
+ //#region node_modules/@tanstack/query-core/build/modern/thenable.js
259
+ function nt() {
260
+ let e, t, n = new Promise((n, r) => {
261
+ e = n, t = r;
262
+ });
263
+ n.status = "pending", n.catch(() => {});
264
+ function r(e) {
265
+ Object.assign(n, e), delete n.resolve, delete n.reject;
266
+ }
267
+ return n.resolve = (t) => {
268
+ r({
269
+ status: "fulfilled",
270
+ value: t
271
+ }), e(t);
272
+ }, n.reject = (e) => {
273
+ r({
274
+ status: "rejected",
275
+ reason: e
276
+ }), t(e);
277
+ }, n;
278
+ }
279
+ //#endregion
283
280
  //#region node_modules/@tanstack/query-core/build/modern/retryer.js
284
- function nt(e) {
281
+ function rt(e) {
285
282
  return (e ?? "online") === "online" ? tt.isOnline() : !0;
286
283
  }
287
284
  //#endregion
285
+ //#region node_modules/@tanstack/query-core/build/modern/mutation.js
286
+ function it() {
287
+ return {
288
+ context: void 0,
289
+ data: void 0,
290
+ error: null,
291
+ failureCount: 0,
292
+ failureReason: null,
293
+ isPaused: !1,
294
+ status: "idle",
295
+ variables: void 0,
296
+ submittedAt: 0
297
+ };
298
+ }
299
+ //#endregion
300
+ //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
301
+ var at = class extends $e {
302
+ #e;
303
+ #t = void 0;
304
+ #n;
305
+ #r;
306
+ constructor(e, t) {
307
+ super(), this.#e = e, this.setOptions(t), this.bindMethods(), this.#i();
308
+ }
309
+ bindMethods() {
310
+ this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
311
+ }
312
+ setOptions(e) {
313
+ let t = this.options;
314
+ this.options = this.#e.defaultMutationOptions(e), Ge(this.options, t) || this.#e.getMutationCache().notify({
315
+ type: "observerOptionsUpdated",
316
+ mutation: this.#n,
317
+ observer: this
318
+ }), t?.mutationKey && this.options.mutationKey && He(t.mutationKey) !== He(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
319
+ }
320
+ onUnsubscribe() {
321
+ this.hasListeners() || this.#n?.removeObserver(this);
322
+ }
323
+ onMutationUpdate(e) {
324
+ this.#i(), this.#a(e);
325
+ }
326
+ getCurrentResult() {
327
+ return this.#t;
328
+ }
329
+ reset() {
330
+ this.#n?.removeObserver(this), this.#n = void 0, this.#i(), this.#a();
331
+ }
332
+ mutate(e, t) {
333
+ return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
334
+ }
335
+ #i() {
336
+ let e = this.#n?.state ?? it();
337
+ this.#t = {
338
+ ...e,
339
+ isPending: e.status === "pending",
340
+ isSuccess: e.status === "success",
341
+ isError: e.status === "error",
342
+ isIdle: e.status === "idle",
343
+ mutate: this.mutate,
344
+ reset: this.reset
345
+ };
346
+ }
347
+ #a(e) {
348
+ Qe.batch(() => {
349
+ if (this.#r && this.hasListeners()) {
350
+ let t = this.#t.variables, n = this.#t.context, r = {
351
+ client: this.#e,
352
+ meta: this.options.meta,
353
+ mutationKey: this.options.mutationKey
354
+ };
355
+ if (e?.type === "success") {
356
+ try {
357
+ this.#r.onSuccess?.(e.data, t, n, r);
358
+ } catch (e) {
359
+ Promise.reject(e);
360
+ }
361
+ try {
362
+ this.#r.onSettled?.(e.data, null, t, n, r);
363
+ } catch (e) {
364
+ Promise.reject(e);
365
+ }
366
+ } else if (e?.type === "error") {
367
+ try {
368
+ this.#r.onError?.(e.error, t, n, r);
369
+ } catch (e) {
370
+ Promise.reject(e);
371
+ }
372
+ try {
373
+ this.#r.onSettled?.(void 0, e.error, t, n, r);
374
+ } catch (e) {
375
+ Promise.reject(e);
376
+ }
377
+ }
378
+ }
379
+ this.listeners.forEach((e) => {
380
+ e(this.#t);
381
+ });
382
+ });
383
+ }
384
+ };
385
+ //#endregion
288
386
  //#region node_modules/@tanstack/query-core/build/modern/query.js
289
- function rt(e, t) {
387
+ function q(e, t) {
290
388
  return {
291
389
  fetchFailureCount: 0,
292
390
  fetchFailureReason: null,
293
- fetchStatus: nt(t.networkMode) ? "fetching" : "paused",
391
+ fetchStatus: rt(t.networkMode) ? "fetching" : "paused",
294
392
  ...e === void 0 && {
295
393
  error: null,
296
394
  status: "pending"
@@ -299,9 +397,9 @@ function rt(e, t) {
299
397
  }
300
398
  //#endregion
301
399
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
302
- var it = class extends H {
400
+ var ot = class extends $e {
303
401
  constructor(e, t) {
304
- super(), this.options = t, this.#e = e, this.#s = null, this.#o = Ze(), this.bindMethods(), this.setOptions(t);
402
+ super(), this.options = t, this.#e = e, this.#s = null, this.#o = nt(), this.bindMethods(), this.setOptions(t);
305
403
  }
306
404
  #e;
307
405
  #t = void 0;
@@ -322,16 +420,16 @@ var it = class extends H {
322
420
  this.refetch = this.refetch.bind(this);
323
421
  }
324
422
  onSubscribe() {
325
- this.listeners.size === 1 && (this.#t.addObserver(this), ot(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
423
+ this.listeners.size === 1 && (this.#t.addObserver(this), ct(this.#t, this.options) ? this.#h() : this.updateResult(), this.#y());
326
424
  }
327
425
  onUnsubscribe() {
328
426
  this.hasListeners() || this.destroy();
329
427
  }
330
428
  shouldFetchOnReconnect() {
331
- return st(this.#t, this.options, this.options.refetchOnReconnect);
429
+ return lt(this.#t, this.options, this.options.refetchOnReconnect);
332
430
  }
333
431
  shouldFetchOnWindowFocus() {
334
- return st(this.#t, this.options, this.options.refetchOnWindowFocus);
432
+ return lt(this.#t, this.options, this.options.refetchOnWindowFocus);
335
433
  }
336
434
  destroy() {
337
435
  this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
@@ -339,19 +437,19 @@ var it = class extends H {
339
437
  setOptions(e) {
340
438
  let t = this.options, n = this.#t;
341
439
  if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof W(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
342
- this.#S(), this.#t.setOptions(this.options), t._defaulted && !Ke(this.options, t) && this.#e.getQueryCache().notify({
440
+ this.#S(), this.#t.setOptions(this.options), t._defaulted && !Ge(this.options, t) && this.#e.getQueryCache().notify({
343
441
  type: "observerOptionsUpdated",
344
442
  query: this.#t,
345
443
  observer: this
346
444
  });
347
445
  let r = this.hasListeners();
348
- r && ct(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || He(this.options.staleTime, this.#t) !== He(t.staleTime, this.#t)) && this.#g();
446
+ r && J(this.#t, n, this.options, t) && this.#h(), this.updateResult(), r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || Ve(this.options.staleTime, this.#t) !== Ve(t.staleTime, this.#t)) && this.#g();
349
447
  let i = this.#_();
350
448
  r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
351
449
  }
352
450
  getOptimisticResult(e) {
353
451
  let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
354
- return ut(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
452
+ return Y(this, n) && (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
355
453
  }
356
454
  getCurrentResult() {
357
455
  return this.#r;
@@ -385,10 +483,10 @@ var it = class extends H {
385
483
  }
386
484
  #g() {
387
485
  this.#b();
388
- let e = He(this.options.staleTime, this.#t);
389
- if (Xe.isServer() || this.#r.isStale || !Be(e)) return;
390
- let t = Ve(this.#r.dataUpdatedAt, e) + 1;
391
- this.#d = U.setTimeout(() => {
486
+ let e = Ve(this.options.staleTime, this.#t);
487
+ if (G.isServer() || this.#r.isStale || !U(e)) return;
488
+ let t = Be(this.#r.dataUpdatedAt, e) + 1;
489
+ this.#d = Ie.setTimeout(() => {
392
490
  this.#r.isStale || this.updateResult();
393
491
  }, t);
394
492
  }
@@ -396,26 +494,26 @@ var it = class extends H {
396
494
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
397
495
  }
398
496
  #v(e) {
399
- this.#x(), this.#p = e, !(Xe.isServer() || W(this.options.enabled, this.#t) === !1 || !Be(this.#p) || this.#p === 0) && (this.#f = U.setInterval(() => {
400
- (this.options.refetchIntervalInBackground || Fe.isFocused()) && this.#h();
497
+ this.#x(), this.#p = e, !(G.isServer() || W(this.options.enabled, this.#t) === !1 || !U(this.#p) || this.#p === 0) && (this.#f = Ie.setInterval(() => {
498
+ (this.options.refetchIntervalInBackground || et.isFocused()) && this.#h();
401
499
  }, this.#p));
402
500
  }
403
501
  #y() {
404
502
  this.#g(), this.#v(this.#_());
405
503
  }
406
504
  #b() {
407
- this.#d !== void 0 && (U.clearTimeout(this.#d), this.#d = void 0);
505
+ this.#d !== void 0 && (Ie.clearTimeout(this.#d), this.#d = void 0);
408
506
  }
409
507
  #x() {
410
- this.#f !== void 0 && (U.clearInterval(this.#f), this.#f = void 0);
508
+ this.#f !== void 0 && (Ie.clearInterval(this.#f), this.#f = void 0);
411
509
  }
412
510
  createResult(e, t) {
413
511
  let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
414
512
  if (t._optimisticResults) {
415
- let i = this.hasListeners(), a = !i && ot(e, t), o = i && ct(e, n, t, r);
513
+ let i = this.hasListeners(), a = !i && ct(e, t), o = i && J(e, n, t, r);
416
514
  (a || o) && (l = {
417
515
  ...l,
418
- ...rt(c.data, e.options)
516
+ ...q(c.data, e.options)
419
517
  }), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
420
518
  }
421
519
  let { error: f, errorUpdatedAt: p, status: m } = l;
@@ -423,11 +521,11 @@ var it = class extends H {
423
521
  let h = !1;
424
522
  if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
425
523
  let e;
426
- i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = Je(i?.data, e, t), u = !0);
524
+ i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, h = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#u?.state.data, this.#u) : t.placeholderData, e !== void 0 && (m = "success", d = Ye(i?.data, e, t), u = !0);
427
525
  }
428
526
  if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
429
527
  else try {
430
- this.#c = t.select, d = t.select(d), d = Je(i?.data, d, t), this.#l = d, this.#s = null;
528
+ this.#c = t.select, d = t.select(d), d = Ye(i?.data, d, t), this.#l = d, this.#s = null;
431
529
  } catch (e) {
432
530
  this.#s = e;
433
531
  }
@@ -455,7 +553,7 @@ var it = class extends H {
455
553
  isPaused: l.fetchStatus === "paused",
456
554
  isPlaceholderData: u,
457
555
  isRefetchError: v && b,
458
- isStale: lt(e, t),
556
+ isStale: ut(e, t),
459
557
  refetch: this.refetch,
460
558
  promise: this.#o,
461
559
  isEnabled: W(t.enabled, e) !== !1
@@ -464,7 +562,7 @@ var it = class extends H {
464
562
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
465
563
  r ? e.reject(x.error) : t && e.resolve(x.data);
466
564
  }, a = () => {
467
- i(this.#o = x.promise = Ze());
565
+ i(this.#o = x.promise = nt());
468
566
  }, o = this.#o;
469
567
  switch (o.status) {
470
568
  case "pending":
@@ -482,7 +580,7 @@ var it = class extends H {
482
580
  }
483
581
  updateResult() {
484
582
  let e = this.#r, t = this.createResult(this.#t, this.options);
485
- this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !Ke(t, e) && (this.#r = t, this.#C({ listeners: (() => {
583
+ this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !Ge(t, e) && (this.#r = t, this.#C({ listeners: (() => {
486
584
  if (!e) return !0;
487
585
  let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
488
586
  if (n === "all" || !n && !this.#m.size) return !0;
@@ -503,7 +601,7 @@ var it = class extends H {
503
601
  this.updateResult(), this.hasListeners() && this.#y();
504
602
  }
505
603
  #C(e) {
506
- et.batch(() => {
604
+ Qe.batch(() => {
507
605
  e.listeners && this.listeners.forEach((e) => {
508
606
  e(this.#r);
509
607
  }), this.#e.getQueryCache().notify({
@@ -513,143 +611,44 @@ var it = class extends H {
513
611
  });
514
612
  }
515
613
  };
516
- function at(e, t) {
614
+ function st(e, t) {
517
615
  return W(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && W(t.retryOnMount, e) === !1);
518
616
  }
519
- function ot(e, t) {
520
- return at(e, t) || e.state.data !== void 0 && st(e, t, t.refetchOnMount);
617
+ function ct(e, t) {
618
+ return st(e, t) || e.state.data !== void 0 && lt(e, t, t.refetchOnMount);
521
619
  }
522
- function st(e, t, n) {
523
- if (W(t.enabled, e) !== !1 && He(t.staleTime, e) !== "static") {
620
+ function lt(e, t, n) {
621
+ if (W(t.enabled, e) !== !1 && Ve(t.staleTime, e) !== "static") {
524
622
  let r = typeof n == "function" ? n(e) : n;
525
- return r === "always" || r !== !1 && lt(e, t);
623
+ return r === "always" || r !== !1 && ut(e, t);
526
624
  }
527
625
  return !1;
528
626
  }
529
- function ct(e, t, n, r) {
530
- return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && lt(e, n);
531
- }
532
- function lt(e, t) {
533
- return W(t.enabled, e) !== !1 && e.isStaleByTime(He(t.staleTime, e));
627
+ function J(e, t, n, r) {
628
+ return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ut(e, n);
534
629
  }
535
630
  function ut(e, t) {
536
- return !Ke(e.getCurrentResult(), t);
631
+ return W(t.enabled, e) !== !1 && e.isStaleByTime(Ve(t.staleTime, e));
537
632
  }
538
- //#endregion
539
- //#region node_modules/@tanstack/query-core/build/modern/mutation.js
540
- function q() {
541
- return {
542
- context: void 0,
543
- data: void 0,
544
- error: null,
545
- failureCount: 0,
546
- failureReason: null,
547
- isPaused: !1,
548
- status: "idle",
549
- variables: void 0,
550
- submittedAt: 0
551
- };
633
+ function Y(e, t) {
634
+ return !Ge(e.getCurrentResult(), t);
552
635
  }
553
636
  //#endregion
554
- //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
555
- var dt = class extends H {
556
- #e;
557
- #t = void 0;
558
- #n;
559
- #r;
560
- constructor(e, t) {
561
- super(), this.#e = e, this.setOptions(t), this.bindMethods(), this.#i();
562
- }
563
- bindMethods() {
564
- this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
565
- }
566
- setOptions(e) {
567
- let t = this.options;
568
- this.options = this.#e.defaultMutationOptions(e), Ke(this.options, t) || this.#e.getMutationCache().notify({
569
- type: "observerOptionsUpdated",
570
- mutation: this.#n,
571
- observer: this
572
- }), t?.mutationKey && this.options.mutationKey && Ue(t.mutationKey) !== Ue(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
573
- }
574
- onUnsubscribe() {
575
- this.hasListeners() || this.#n?.removeObserver(this);
576
- }
577
- onMutationUpdate(e) {
578
- this.#i(), this.#a(e);
579
- }
580
- getCurrentResult() {
581
- return this.#t;
582
- }
583
- reset() {
584
- this.#n?.removeObserver(this), this.#n = void 0, this.#i(), this.#a();
585
- }
586
- mutate(e, t) {
587
- return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
588
- }
589
- #i() {
590
- let e = this.#n?.state ?? q();
591
- this.#t = {
592
- ...e,
593
- isPending: e.status === "pending",
594
- isSuccess: e.status === "success",
595
- isError: e.status === "error",
596
- isIdle: e.status === "idle",
597
- mutate: this.mutate,
598
- reset: this.reset
599
- };
600
- }
601
- #a(e) {
602
- et.batch(() => {
603
- if (this.#r && this.hasListeners()) {
604
- let t = this.#t.variables, n = this.#t.context, r = {
605
- client: this.#e,
606
- meta: this.options.meta,
607
- mutationKey: this.options.mutationKey
608
- };
609
- if (e?.type === "success") {
610
- try {
611
- this.#r.onSuccess?.(e.data, t, n, r);
612
- } catch (e) {
613
- Promise.reject(e);
614
- }
615
- try {
616
- this.#r.onSettled?.(e.data, null, t, n, r);
617
- } catch (e) {
618
- Promise.reject(e);
619
- }
620
- } else if (e?.type === "error") {
621
- try {
622
- this.#r.onError?.(e.error, t, n, r);
623
- } catch (e) {
624
- Promise.reject(e);
625
- }
626
- try {
627
- this.#r.onSettled?.(void 0, e.error, t, n, r);
628
- } catch (e) {
629
- Promise.reject(e);
630
- }
631
- }
632
- }
633
- this.listeners.forEach((e) => {
634
- e(this.#t);
635
- });
636
- });
637
- }
638
- }, J = e.createContext(void 0), ft = (t) => {
639
- let n = e.useContext(J);
637
+ //#region node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
638
+ var dt = e.createContext(void 0), ft = (t) => {
639
+ let n = e.useContext(dt);
640
640
  if (t) return t;
641
641
  if (!n) throw Error("No QueryClient set, use QueryClientProvider to set one");
642
642
  return n;
643
643
  }, pt = ({ client: t, children: n }) => (e.useEffect(() => (t.mount(), () => {
644
644
  t.unmount();
645
- }), [t]), /* @__PURE__ */ p(J.Provider, {
645
+ }), [t]), /* @__PURE__ */ p(dt.Provider, {
646
646
  value: t,
647
647
  children: n
648
- })), mt = e.createContext(!1), ht = () => e.useContext(mt);
649
- mt.Provider;
648
+ }));
650
649
  //#endregion
651
650
  //#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
652
- function gt() {
651
+ function mt() {
653
652
  let e = !1;
654
653
  return {
655
654
  clearReset: () => {
@@ -661,14 +660,18 @@ function gt() {
661
660
  isReset: () => e
662
661
  };
663
662
  }
664
- var _t = e.createContext(gt()), vt = () => e.useContext(_t), yt = (e, t, n) => {
665
- let r = n?.state.error && typeof e.throwOnError == "function" ? Ye(e.throwOnError, [n.state.error, n]) : e.throwOnError;
663
+ var ht = e.createContext(mt()), gt = () => e.useContext(ht), _t = (e, t, n) => {
664
+ let r = n?.state.error && typeof e.throwOnError == "function" ? Xe(e.throwOnError, [n.state.error, n]) : e.throwOnError;
666
665
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
667
- }, bt = (t) => {
666
+ }, vt = (t) => {
668
667
  e.useEffect(() => {
669
668
  t.clearReset();
670
669
  }, [t]);
671
- }, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Ye(n, [e.error, r])), St = (e) => {
670
+ }, yt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Xe(n, [e.error, r])), bt = e.createContext(!1), xt = () => e.useContext(bt);
671
+ bt.Provider;
672
+ //#endregion
673
+ //#region node_modules/@tanstack/react-query/build/modern/suspense.js
674
+ var St = (e) => {
672
675
  if (e.suspense) {
673
676
  let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
674
677
  e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
@@ -680,46 +683,46 @@ var _t = e.createContext(gt()), vt = () => e.useContext(_t), yt = (e, t, n) => {
680
683
  //#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
681
684
  function Et(t, n, r) {
682
685
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
683
- let i = ht(), a = vt(), o = ft(r), s = o.defaultQueryOptions(t);
686
+ let i = xt(), a = gt(), o = ft(r), s = o.defaultQueryOptions(t);
684
687
  o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);
685
688
  let c = o.getQueryCache().get(s.queryHash);
686
689
  process.env.NODE_ENV !== "production" && (s.queryFn || console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));
687
690
  let l = t.subscribed !== !1;
688
- s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), yt(s, a, c), bt(a);
691
+ s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), _t(s, a, c), vt(a);
689
692
  let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
690
693
  if (e.useSyncExternalStore(e.useCallback((e) => {
691
- let t = p ? d.subscribe(et.batchCalls(e)) : ze;
694
+ let t = p ? d.subscribe(Qe.batchCalls(e)) : ze;
692
695
  return d.updateResult(), t;
693
696
  }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
694
697
  d.setOptions(s);
695
698
  }, [s, d]), wt(s, f)) throw Tt(s, d, a);
696
- if (xt({
699
+ if (yt({
697
700
  result: f,
698
701
  errorResetBoundary: a,
699
702
  throwOnError: s.throwOnError,
700
703
  query: c,
701
704
  suspense: s.suspense
702
705
  })) throw f.error;
703
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !Xe.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(ze).finally(() => {
706
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !G.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(ze).finally(() => {
704
707
  d.updateResult();
705
708
  }), s.notifyOnChangeProps ? f : d.trackResult(f);
706
709
  }
707
710
  //#endregion
708
711
  //#region node_modules/@tanstack/react-query/build/modern/useQuery.js
709
712
  function Dt(e, t) {
710
- return Et(e, it, t);
713
+ return Et(e, ot, t);
711
714
  }
712
715
  //#endregion
713
716
  //#region node_modules/@tanstack/react-query/build/modern/useMutation.js
714
717
  function Ot(t, n) {
715
- let r = ft(n), [i] = e.useState(() => new dt(r, t));
718
+ let r = ft(n), [i] = e.useState(() => new at(r, t));
716
719
  e.useEffect(() => {
717
720
  i.setOptions(t);
718
721
  }, [i, t]);
719
- let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(et.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
722
+ let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(Qe.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
720
723
  i.mutate(e, t).catch(ze);
721
724
  }, [i]);
722
- if (a.error && Ye(i.options.throwOnError, [a.error])) throw a.error;
725
+ if (a.error && Xe(i.options.throwOnError, [a.error])) throw a.error;
723
726
  return {
724
727
  ...a,
725
728
  mutate: o,
@@ -744,178 +747,178 @@ function jt({ children: e, baseUrl: t, queryClient: n, getHeaders: r = At }) {
744
747
  }
745
748
  //#endregion
746
749
  //#region src/Hooks/useDataTable.ts
747
- function Y() {
750
+ function Mt() {
748
751
  let e = o(kt);
749
752
  if (!e) throw Error("useDataTable must be used within a DataTableProvider");
750
753
  return e;
751
754
  }
752
755
  //#endregion
753
756
  //#region src/Hooks/useApi.ts
754
- var Mt = class extends Error {
757
+ var Nt = class extends Error {
755
758
  status;
756
759
  violations;
757
760
  constructor(e, t, n) {
758
761
  super(e), this.name = "ApiError", this.status = t, this.violations = n;
759
762
  }
760
763
  };
761
- function Nt(e) {
762
- return e instanceof Mt ? e.violations : void 0;
764
+ function Pt(e) {
765
+ return e instanceof Nt ? e.violations : void 0;
763
766
  }
764
- async function Pt(e, t) {
767
+ async function Ft(e, t) {
765
768
  let n = await fetch(e, t);
766
769
  if (n.status >= 400) {
767
770
  let e = await n.text();
768
- if (!e) throw new Mt(`HTTP ${n.status}: ${n.statusText}`, n.status);
771
+ if (!e) throw new Nt(`HTTP ${n.status}: ${n.statusText}`, n.status);
769
772
  let t = null;
770
773
  try {
771
774
  t = JSON.parse(e);
772
775
  } catch {
773
- throw new Mt(e, n.status);
776
+ throw new Nt(e, n.status);
774
777
  }
775
778
  let r = Array.isArray(t?.violations) ? t.violations.filter((e) => e?.field && e?.message).map((e) => ({
776
779
  field: String(e.field),
777
780
  message: String(e.message)
778
781
  })) : void 0;
779
- throw new Mt(t?.message ?? t?.error ?? t?.title ?? e, n.status, r);
782
+ throw new Nt(t?.message ?? t?.error ?? t?.title ?? e, n.status, r);
780
783
  }
781
784
  return n;
782
785
  }
783
- var Ft = (e) => e.map((e) => e.toString());
784
- async function It(e, t) {
785
- return (await Pt(e, {
786
+ var It = (e) => e.map((e) => e.toString());
787
+ async function Lt(e, t) {
788
+ return (await Ft(e, {
786
789
  method: "GET",
787
790
  headers: await t()
788
791
  })).json();
789
792
  }
790
- async function Lt(e, t, n) {
791
- return (await Pt(`${e}/${t}`, {
793
+ async function Rt(e, t, n) {
794
+ return (await Ft(`${e}/${t}`, {
792
795
  method: "GET",
793
796
  headers: await n()
794
797
  })).json();
795
798
  }
796
- async function Rt(e, t, n) {
797
- await Pt(`${e}/${t}`, {
799
+ async function zt(e, t, n) {
800
+ await Ft(`${e}/${t}`, {
798
801
  method: "DELETE",
799
802
  headers: await n()
800
803
  });
801
804
  }
802
- async function zt(e, t, n) {
803
- let r = await Pt(e, {
805
+ async function Bt(e, t, n) {
806
+ let r = await Ft(e, {
804
807
  method: "POST",
805
808
  headers: await n(),
806
809
  body: JSON.stringify(t)
807
810
  });
808
811
  return r.status === 204 ? t : r.json();
809
812
  }
810
- async function Bt(e, t, n, r) {
811
- let i = await Pt(t, {
813
+ async function Vt(e, t, n, r) {
814
+ let i = await Ft(t, {
812
815
  method: e,
813
816
  headers: await n(),
814
817
  body: r ? JSON.stringify(r) : void 0
815
818
  });
816
819
  if (i.status !== 204) return i.json();
817
820
  }
818
- async function Vt(e, t, n) {
819
- let r = await Pt(`${e}/${t.id}`, {
821
+ async function Ht(e, t, n) {
822
+ let r = await Ft(`${e}/${t.id}`, {
820
823
  method: "PUT",
821
824
  headers: await n(),
822
825
  body: JSON.stringify(t)
823
826
  });
824
827
  return r.status === 204 ? t : r.json();
825
828
  }
826
- function Ht(e, t, n) {
827
- let { baseUrl: r, getHeaders: i } = Y();
829
+ function Ut(e, t, n) {
830
+ let { baseUrl: r, getHeaders: i } = Mt();
828
831
  return Dt({
829
- queryKey: [...Ft(t), String(n?.toString())],
830
- queryFn: () => Lt(`${r}${e}`, n, i),
832
+ queryKey: [...It(t), String(n?.toString())],
833
+ queryFn: () => Rt(`${r}${e}`, n, i),
831
834
  enabled: !!n
832
835
  });
833
836
  }
834
- function Ut(e, t, n = !0) {
835
- let { baseUrl: r, getHeaders: i } = Y();
837
+ function Wt(e, t, n = !0) {
838
+ let { baseUrl: r, getHeaders: i } = Mt();
836
839
  return Dt({
837
- queryKey: Ft(t),
838
- queryFn: () => It(`${r}${e}`, i),
840
+ queryKey: It(t),
841
+ queryFn: () => Lt(`${r}${e}`, i),
839
842
  enabled: n
840
843
  });
841
844
  }
842
- function Wt(e, t, n) {
843
- return Promise.all([e.invalidateQueries({ queryKey: Ft(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
844
- }
845
845
  function Gt(e, t, n) {
846
- let { baseUrl: r, queryClient: i, getHeaders: a } = Y();
847
- return Ot({
848
- mutationKey: Ft(t),
849
- mutationFn: (t) => zt(`${r}${e}`, t, a),
850
- onSettled: () => Wt(i, t, n)
851
- });
846
+ return Promise.all([e.invalidateQueries({ queryKey: It(t) }), ...(n ?? []).map((t) => e.invalidateQueries({ queryKey: t }))]);
852
847
  }
853
848
  function Kt(e, t, n) {
854
- let { baseUrl: r, queryClient: i, getHeaders: a } = Y();
849
+ let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
855
850
  return Ot({
856
- mutationKey: Ft(t),
857
- mutationFn: (t) => Vt(`${r}${e}`, t, a),
858
- onSettled: () => Wt(i, t, n)
851
+ mutationKey: It(t),
852
+ mutationFn: (t) => Bt(`${r}${e}`, t, a),
853
+ onSettled: () => Gt(i, t, n)
859
854
  });
860
855
  }
861
856
  function qt(e, t, n) {
862
- let { baseUrl: r, queryClient: i, getHeaders: a } = Y();
857
+ let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
858
+ return Ot({
859
+ mutationKey: It(t),
860
+ mutationFn: (t) => Ht(`${r}${e}`, t, a),
861
+ onSettled: () => Gt(i, t, n)
862
+ });
863
+ }
864
+ function Jt(e, t, n) {
865
+ let { baseUrl: r, queryClient: i, getHeaders: a } = Mt();
863
866
  return Ot({
864
- mutationKey: Ft(t),
865
- mutationFn: (t) => Rt(`${r}${e}`, t, a),
866
- onSettled: () => Wt(i, t, n)
867
+ mutationKey: It(t),
868
+ mutationFn: (t) => zt(`${r}${e}`, t, a),
869
+ onSettled: () => Gt(i, t, n)
867
870
  });
868
871
  }
869
872
  //#endregion
870
873
  //#region src/DataTable/EntityForm.tsx
871
- function Jt(e, t) {
874
+ function Yt(e, t) {
872
875
  return typeof e.required == "function" ? e.required(t) : !!e.required;
873
876
  }
874
- function Yt(e) {
875
- return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
876
- }
877
877
  function Xt(e) {
878
- return e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !Jt(t, n) || e ? null : "Pflichtfeld", e), {});
878
+ return e.reduce((e, t) => (e[t.id] = t.type === "boolean" ? t.defaultValue ?? !1 : t.defaultValue ?? "", e), {});
879
879
  }
880
880
  function Zt(e) {
881
+ return e.filter((e) => e.required).reduce((e, t) => (e[t.id] = (e, n) => t.conditional && !t.conditional(n) || !Yt(t, n) || e ? null : "Pflichtfeld", e), {});
882
+ }
883
+ function Qt(e) {
881
884
  return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t === "" ? void 0 : t]));
882
885
  }
883
- function Qt(e, t) {
886
+ function $t(e, t) {
884
887
  let n = { ...e };
885
888
  return t.forEach((e) => {
886
889
  let t = e.id;
887
890
  e.type === "boolean" && n[t] === null ? n[t] = !1 : e.type === "date" && n[t] ? n[t] = new Date(n[t]) : n[t] === null && (n[t] = "");
888
891
  }), n;
889
892
  }
890
- var $t = (e) => e.split(".").pop() ?? e;
891
- function en(e, t) {
892
- return Object.fromEntries((Nt(e) ?? []).filter((e) => t.has($t(e.field))).map((e) => [$t(e.field), e.message]));
893
- }
893
+ var en = (e) => e.split(".").pop() ?? e;
894
894
  function tn(e, t) {
895
- let n = Nt(e);
895
+ return Object.fromEntries((Pt(e) ?? []).filter((e) => t.has(en(e.field))).map((e) => [en(e.field), e.message]));
896
+ }
897
+ function nn(e, t) {
898
+ let n = Pt(e);
896
899
  if (!n) return e?.message;
897
- let r = n.filter((e) => !t.has($t(e.field)));
900
+ let r = n.filter((e) => !t.has(en(e.field)));
898
901
  return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
899
902
  }
900
- function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
903
+ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
901
904
  let [u, h] = d(0), [g, v] = d(!1), b = ve({
902
905
  mode: "uncontrolled",
903
- initialValues: Yt(e),
904
- validate: Xt(e)
906
+ initialValues: Xt(e),
907
+ validate: Zt(e)
905
908
  });
906
909
  s(() => {
907
910
  if (r) {
908
- let t = Qt(r, e);
911
+ let t = $t(r, e);
909
912
  b.initialize(t), b.setValues(t);
910
913
  }
911
914
  }, [r]);
912
- let S = new Set(e.map((e) => String(e.id))), C = tn(o, S), w = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], E = w.length > 0, D = u === w.length - 1;
915
+ let S = new Set(e.map((e) => String(e.id))), C = nn(o, S), w = [...new Set(e.filter((e) => typeof e.step == "number").map((e) => e.step))], E = w.length > 0, D = u === w.length - 1;
913
916
  function O(e) {
914
917
  let t = b.getValues();
915
918
  if (e.conditional && !e.conditional(t)) return null;
916
- let n = Jt(e, t), r = b.getInputProps(e.id);
919
+ let n = Yt(e, t), r = b.getInputProps(e.id);
917
920
  switch (e.type) {
918
- case "number": return /* @__PURE__ */ p(N, {
921
+ case "number": return /* @__PURE__ */ p(P, {
919
922
  decimalSeparator: ",",
920
923
  thousandSeparator: ".",
921
924
  label: e.column.title,
@@ -970,20 +973,20 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
970
973
  children: C
971
974
  }), /* @__PURE__ */ m("form", {
972
975
  onSubmit: b.onSubmit(async (e) => {
973
- let t = Zt(e);
976
+ let t = Qt(e);
974
977
  try {
975
978
  await c(t);
976
979
  } catch (e) {
977
- let t = en(e, S);
980
+ let t = tn(e, S);
978
981
  Object.keys(t).length > 0 && b.setErrors(t);
979
982
  return;
980
983
  }
981
984
  E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
982
985
  }),
983
- children: [E ? /* @__PURE__ */ p(R, {
986
+ children: [E ? /* @__PURE__ */ p(ie, {
984
987
  active: u,
985
988
  size: "sm",
986
- children: w.map((e) => /* @__PURE__ */ p(R.Step, {
989
+ children: w.map((e) => /* @__PURE__ */ p(ie.Step, {
987
990
  ...t?.[e - 1] ? { label: t[e - 1].label } : {},
988
991
  children: k(e)
989
992
  }, e))
@@ -1004,9 +1007,9 @@ function nn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
1004
1007
  }
1005
1008
  //#endregion
1006
1009
  //#region src/DataTable/CreateModal.tsx
1007
- function rn({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, steps: a, onCreated: o }) {
1008
- let [s, c] = d(), { mutateAsync: l, isPending: u, error: f } = Gt(i, n, r), { mutateAsync: m, isPending: h, error: g } = Kt(i, n, r);
1009
- return /* @__PURE__ */ p(nn, {
1010
+ function an({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, steps: a, onCreated: o }) {
1011
+ let [s, c] = d(), { mutateAsync: l, isPending: u, error: f } = Kt(i, n, r), { mutateAsync: m, isPending: h, error: g } = qt(i, n, r);
1012
+ return /* @__PURE__ */ p(rn, {
1010
1013
  fields: e,
1011
1014
  steps: a,
1012
1015
  recordId: s,
@@ -1027,17 +1030,17 @@ function rn({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath
1027
1030
  }
1028
1031
  //#endregion
1029
1032
  //#region node_modules/clsx/dist/clsx.mjs
1030
- function an(e) {
1033
+ function on(e) {
1031
1034
  var t, n, r = "";
1032
1035
  if (typeof e == "string" || typeof e == "number") r += e;
1033
1036
  else if (typeof e == "object") if (Array.isArray(e)) {
1034
1037
  var i = e.length;
1035
- for (t = 0; t < i; t++) e[t] && (n = an(e[t])) && (r && (r += " "), r += n);
1038
+ for (t = 0; t < i; t++) e[t] && (n = on(e[t])) && (r && (r += " "), r += n);
1036
1039
  } else for (n in e) e[n] && (r && (r += " "), r += n);
1037
1040
  return r;
1038
1041
  }
1039
1042
  function X() {
1040
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = an(e)) && (r && (r += " "), r += t);
1043
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = on(e)) && (r && (r += " "), r += t);
1041
1044
  return r;
1042
1045
  }
1043
1046
  //#endregion
@@ -1048,7 +1051,7 @@ function Z(e, t, n) {
1048
1051
  theme: t
1049
1052
  }).value : void 0;
1050
1053
  }
1051
- function on({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
1054
+ function sn({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor: i, stripedColor: a, highlightOnHoverColor: o }) {
1052
1055
  return {
1053
1056
  "--mantine-datatable-color-light": Z(t, e, "light"),
1054
1057
  "--mantine-datatable-color-dark": Z(t, e, "dark"),
@@ -1064,7 +1067,7 @@ function on({ theme: e, c: t, backgroundColor: n, borderColor: r, rowBorderColor
1064
1067
  "--mantine-datatable-highlight-on-hover-color-dark": Z(o, e, "dark")
1065
1068
  };
1066
1069
  }
1067
- function sn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
1070
+ function cn({ theme: e, paginationActiveTextColor: t, paginationActiveBackgroundColor: n }) {
1068
1071
  return {
1069
1072
  "--mantine-datatable-pagination-active-text-color-light": Z(t, e, "light"),
1070
1073
  "--mantine-datatable-pagination-active-text-color-dark": Z(t, e, "dark"),
@@ -1072,7 +1075,7 @@ function sn({ theme: e, paginationActiveTextColor: t, paginationActiveBackground
1072
1075
  "--mantine-datatable-pagination-active-background-color-dark": Z(n, e, "dark")
1073
1076
  };
1074
1077
  }
1075
- function cn({ theme: e, color: t, backgroundColor: n }) {
1078
+ function ln({ theme: e, color: t, backgroundColor: n }) {
1076
1079
  return {
1077
1080
  "--mantine-datatable-row-color-light": Z(t, e, "light"),
1078
1081
  "--mantine-datatable-row-color-dark": Z(t, e, "dark"),
@@ -1080,9 +1083,9 @@ function cn({ theme: e, color: t, backgroundColor: n }) {
1080
1083
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1081
1084
  };
1082
1085
  }
1083
- var [ln, un] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), dn = (e) => {
1086
+ var [un, dn] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
1084
1087
  let { children: t, columnsOrder: n, setColumnsOrder: r, columnsToggle: i, setColumnsToggle: a, columnsPinning: o, setColumnsPinning: s, resetColumnsOrder: c, resetColumnsToggle: l, resetColumnsPinning: u, setColumnWidth: f, setMultipleColumnWidths: m, resetColumnsWidth: h, beginResize: g, endResize: _, pinnedMap: v } = e, [y, b] = d(""), [x, S] = d("");
1085
- return p(ln, {
1088
+ return p(un, {
1086
1089
  value: {
1087
1090
  sourceColumn: y,
1088
1091
  setSourceColumn: b,
@@ -1114,13 +1117,13 @@ var [ln, un] = pe("useDataTableColumnsContext must be used within DataTableColum
1114
1117
  children: t
1115
1118
  });
1116
1119
  };
1117
- function fn() {
1120
+ function pn() {
1118
1121
  return p("tr", {
1119
1122
  className: "mantine-datatable-empty-row",
1120
1123
  children: p("td", {})
1121
1124
  });
1122
1125
  }
1123
- function pn() {
1126
+ function mn() {
1124
1127
  return m("svg", {
1125
1128
  width: "24",
1126
1129
  height: "24",
@@ -1143,14 +1146,14 @@ function pn() {
1143
1146
  ]
1144
1147
  });
1145
1148
  }
1146
- function mn({ icon: e, text: t, active: n, children: r }) {
1149
+ function hn({ icon: e, text: t, active: n, children: r }) {
1147
1150
  return p(b, {
1148
1151
  className: "mantine-datatable-empty-state",
1149
1152
  "data-active": n || void 0,
1150
1153
  children: r || m(f, { children: [e || p("div", {
1151
1154
  className: "mantine-datatable-empty-state-icon",
1152
- children: p(pn, {})
1153
- }), p(B, {
1155
+ children: p(mn, {})
1156
+ }), p(V, {
1154
1157
  component: "div",
1155
1158
  size: "sm",
1156
1159
  c: "dimmed",
@@ -1158,49 +1161,49 @@ function mn({ icon: e, text: t, active: n, children: r }) {
1158
1161
  })] })
1159
1162
  });
1160
1163
  }
1161
- function hn(e) {
1164
+ function gn(e) {
1162
1165
  let t = e.replace(/([a-z\d])([A-Z]+)/g, "$1 $2").replace(/\W|_/g, " ").trim().toLowerCase();
1163
1166
  return `${t.charAt(0).toUpperCase()}${t.slice(1)}`;
1164
1167
  }
1165
- function gn(e, t, n) {
1168
+ function _n(e, t, n) {
1166
1169
  return !Array.isArray(e) || n && !e.every(n) ? t : e;
1167
1170
  }
1168
- function _n(e) {
1171
+ function vn(e) {
1169
1172
  return typeof e == "object" && !!e && typeof e.accessor == "string";
1170
1173
  }
1171
- function vn(e, t, n) {
1174
+ function yn(e, t, n) {
1172
1175
  return e.filter((e) => !t.map(n).includes(n(e)));
1173
1176
  }
1174
- function yn(e, t) {
1177
+ function bn(e, t) {
1175
1178
  return e.filter((e, n, r) => n === r.findIndex((n) => t(e) === t(n)));
1176
1179
  }
1177
- function bn(e, t) {
1180
+ function xn(e, t) {
1178
1181
  return t ? t.match(/([^[.\]])+/g).reduce((e, t) => e && e[t], e) : void 0;
1179
1182
  }
1180
1183
  function Q(e, t) {
1181
- return typeof t == "string" ? bn(e, t) : t(e);
1182
- }
1183
- function xn(e) {
1184
- return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + xn(e.groups) : 1));
1184
+ return typeof t == "string" ? xn(e, t) : t(e);
1185
1185
  }
1186
1186
  function Sn(e) {
1187
+ return !e || e.length === 0 ? 0 : Math.max(...e.map((e) => e.groups && e.groups.length > 0 ? 1 + Sn(e.groups) : 1));
1188
+ }
1189
+ function Cn(e) {
1187
1190
  let t = [];
1188
- for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...Sn(n.groups));
1191
+ for (let n of e) n.columns && n.columns.length > 0 ? t.push(...n.columns.filter((e) => e != null)) : n.groups && n.groups.length > 0 && t.push(...Cn(n.groups));
1189
1192
  return t.filter((e) => e != null);
1190
1193
  }
1191
- function Cn(e, t) {
1192
- return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e + Cn(n, t), 0) : 0;
1194
+ function wn(e, t) {
1195
+ return e.columns && e.columns.length > 0 ? e.columns.filter((e, n) => e.hidden ? !1 : t ? t[n] !== !1 : !0).length : e.groups && e.groups.length > 0 ? e.groups.reduce((e, n) => e + wn(n, t), 0) : 0;
1193
1196
  }
1194
- function wn(e, t, n = 0) {
1197
+ function Tn(e, t, n = 0) {
1195
1198
  if (n === t) return [...e];
1196
1199
  let r = [];
1197
- for (let i of e) i.groups && i.groups.length > 0 && r.push(...wn(i.groups, t, n + 1));
1200
+ for (let i of e) i.groups && i.groups.length > 0 && r.push(...Tn(i.groups, t, n + 1));
1198
1201
  return r;
1199
1202
  }
1200
- function Tn(e, t, n) {
1203
+ function En(e, t, n) {
1201
1204
  return n ? !e || t : !1;
1202
1205
  }
1203
- function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1206
+ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1204
1207
  let r = l(() => t.map((e) => ({
1205
1208
  accessor: e.accessor,
1206
1209
  defaultPinned: e.pinned,
@@ -1210,7 +1213,7 @@ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1210
1213
  key: e ? `${e}-columns-pinning` : "",
1211
1214
  defaultValue: e ? r : void 0,
1212
1215
  getInitialValueInEffect: n
1213
- }), o = gn(i, r, _n);
1216
+ }), o = _n(i, r, vn);
1214
1217
  function c(t) {
1215
1218
  e && a(typeof t == "function" ? (e) => t(e ?? r) : t);
1216
1219
  }
@@ -1253,12 +1256,12 @@ function En({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1253
1256
  resetColumnsPinning: d
1254
1257
  };
1255
1258
  }
1256
- function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1259
+ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1257
1260
  let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = je({
1258
1261
  key: e ? `${e}-columns-order` : "",
1259
1262
  defaultValue: e ? r : void 0,
1260
1263
  getInitialValueInEffect: n
1261
- }), o = gn(i, r, (e) => typeof e == "string");
1264
+ }), o = _n(i, r, (e) => typeof e == "string");
1262
1265
  function c(t) {
1263
1266
  e && a(t);
1264
1267
  }
@@ -1296,12 +1299,12 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1296
1299
  resetColumnsOrder: d
1297
1300
  };
1298
1301
  }
1299
- function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1302
+ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1300
1303
  let i = l(() => t.some((e) => e.resizable && !e.hidden && e.accessor !== "__selection__"), [t]), o = a(() => t.filter((e) => e.accessor !== "__selection__").map((e) => ({ [e.accessor]: e.width ?? "auto" })), [t]), [c, f] = je({
1301
1304
  key: e ? `${e}-columns-width` : "",
1302
1305
  defaultValue: e ? o() : void 0,
1303
1306
  getInitialValueInEffect: n
1304
- }), p = gn(c, [], (e) => typeof e == "object" && !!e), [m, h] = d(() => e && p.length > 0 ? p : o()), [g, _] = d(!1), v = u(!1);
1307
+ }), p = _n(c, [], (e) => typeof e == "object" && !!e), [m, h] = d(() => e && p.length > 0 ? p : o()), [g, _] = d(!1), v = u(!1);
1305
1308
  s(() => {
1306
1309
  e && (!p || p.length === 0 || h(p));
1307
1310
  }, [e, p]), s(() => {
@@ -1385,7 +1388,7 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRe
1385
1388
  endResize: C
1386
1389
  };
1387
1390
  }
1388
- function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1391
+ function An({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1389
1392
  let r = l(() => t?.map((e) => ({
1390
1393
  accessor: e.accessor,
1391
1394
  defaultToggle: e.defaultToggle || !0,
@@ -1395,7 +1398,7 @@ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1395
1398
  key: e ? `${e}-columns-toggle` : "",
1396
1399
  defaultValue: e ? r : void 0,
1397
1400
  getInitialValueInEffect: n
1398
- }), o = gn(i, r, _n);
1401
+ }), o = _n(i, r, vn);
1399
1402
  function c(t) {
1400
1403
  e && a(t);
1401
1404
  }
@@ -1438,20 +1441,20 @@ function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1438
1441
  resetColumnsToggle: d
1439
1442
  };
1440
1443
  }
1441
- var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1442
- let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = Dn({
1444
+ var jn = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r, scrollViewportRef: i }) => {
1445
+ let { columnsOrder: a, setColumnsOrder: o, resetColumnsOrder: s } = On({
1443
1446
  key: e,
1444
1447
  columns: t,
1445
1448
  getInitialValueInEffect: n
1446
- }), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = kn({
1449
+ }), { columnsToggle: c, setColumnsToggle: u, resetColumnsToggle: d } = An({
1447
1450
  key: e,
1448
1451
  columns: t,
1449
1452
  getInitialValueInEffect: n
1450
- }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = En({
1453
+ }), { columnsPinning: f, setColumnsPinning: p, resetColumnsPinning: m } = Dn({
1451
1454
  key: e,
1452
1455
  columns: t,
1453
1456
  getInitialValueInEffect: n
1454
- }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = On({
1457
+ }), { columnsWidth: h, setColumnsWidth: g, setColumnWidth: _, setMultipleColumnWidths: v, resetColumnsWidth: y, hasResizableColumns: b, allResizableWidthsInitial: x, measureAndSetColumnWidths: S, isResizing: C, beginResize: w, endResize: T } = kn({
1455
1458
  key: e,
1456
1459
  columns: t,
1457
1460
  getInitialValueInEffect: n,
@@ -1528,16 +1531,16 @@ var An = ({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef:
1528
1531
  beginResize: w,
1529
1532
  endResize: T
1530
1533
  };
1531
- }, jn = typeof window < "u" ? c : s;
1532
- function Mn(e) {
1534
+ }, Mn = typeof window < "u" ? c : s;
1535
+ function Nn(e) {
1533
1536
  let t = u(e);
1534
1537
  return t.current = e, t;
1535
1538
  }
1536
- var Nn = "--mantine-datatable-header-height", Pn = "--mantine-datatable-footer-height", Fn = "--mantine-datatable-selection-column-width", In = "--mantine-datatable-last-row-border-bottom";
1539
+ var Pn = "--mantine-datatable-header-height", Fn = "--mantine-datatable-footer-height", In = "--mantine-datatable-selection-column-width", Ln = "--mantine-datatable-last-row-border-bottom";
1537
1540
  function $(e, t, n) {
1538
1541
  e?.style.setProperty(t, n);
1539
1542
  }
1540
- function Ln(e) {
1543
+ function Rn(e) {
1541
1544
  let t = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
1542
1545
  return t ? {
1543
1546
  width: t.inlineSize,
@@ -1547,18 +1550,18 @@ function Ln(e) {
1547
1550
  height: e.contentRect.height
1548
1551
  };
1549
1552
  }
1550
- function Rn(e, t, n) {
1553
+ function zn(e, t, n) {
1551
1554
  if (e) {
1552
1555
  let r = new ResizeObserver((e) => {
1553
1556
  let n = e[0];
1554
- n && t(Ln(n));
1557
+ n && t(Rn(n));
1555
1558
  });
1556
1559
  return r.observe(e), () => {
1557
1560
  r.disconnect(), n();
1558
1561
  };
1559
1562
  }
1560
1563
  }
1561
- function zn({ scrollCallbacks: e, withRowBorders: t }) {
1564
+ function Bn({ scrollCallbacks: e, withRowBorders: t }) {
1562
1565
  let n = {
1563
1566
  root: u(null),
1564
1567
  table: u(null),
@@ -1566,16 +1569,16 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1566
1569
  header: u(null),
1567
1570
  footer: u(null),
1568
1571
  selectionColumnHeader: u(null)
1569
- }, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f = Mn({ withRowBorders: t }), p = Mn(e), m = u(() => {}), h = u(() => {}), g = a((e) => {
1572
+ }, { root: r, table: i, scrollViewport: o, header: c, footer: l, selectionColumnHeader: d } = n, f = Nn({ withRowBorders: t }), p = Nn(e), m = u(() => {}), h = u(() => {}), g = a((e) => {
1570
1573
  p.current.onScroll?.(e), m.current();
1571
1574
  }, []);
1572
- return s(() => Rn(c.current, (e) => {
1573
- $(r.current, Nn, `${e.height}px`);
1574
- }, () => $(r.current, Nn, "0")), [c.current]), s(() => Rn(l.current, (e) => {
1575
+ return s(() => zn(c.current, (e) => {
1575
1576
  $(r.current, Pn, `${e.height}px`);
1576
- }, () => $(r.current, Pn, "0")), [l.current]), s(() => Rn(d.current, (e) => {
1577
- $(r.current, Fn, `${e.width}px`);
1578
- }, () => $(r.current, Fn, "0")), [d.current]), jn(() => {
1577
+ }, () => $(r.current, Pn, "0")), [c.current]), s(() => zn(l.current, (e) => {
1578
+ $(r.current, Fn, `${e.height}px`);
1579
+ }, () => $(r.current, Fn, "0")), [l.current]), s(() => zn(d.current, (e) => {
1580
+ $(r.current, In, `${e.width}px`);
1581
+ }, () => $(r.current, In, "0")), [d.current]), Mn(() => {
1579
1582
  if (typeof window > "u") return;
1580
1583
  let e = {
1581
1584
  top: !0,
@@ -1598,7 +1601,7 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1598
1601
  $(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1599
1602
  }
1600
1603
  function c() {
1601
- f.current.withRowBorders && t.height < n.height ? $(r.current, In, `${V("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, In, "unset");
1604
+ f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${H("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
1602
1605
  }
1603
1606
  h.current = c;
1604
1607
  function l() {
@@ -1616,10 +1619,10 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1616
1619
  let u = new ResizeObserver((e) => {
1617
1620
  for (let r of e) switch (r.target.tagName) {
1618
1621
  case "TABLE":
1619
- t = Ln(r);
1622
+ t = Rn(r);
1620
1623
  break;
1621
1624
  case "DIV":
1622
- n = Ln(r);
1625
+ n = Rn(r);
1623
1626
  break;
1624
1627
  }
1625
1628
  l(), s(), c();
@@ -1627,14 +1630,14 @@ function zn({ scrollCallbacks: e, withRowBorders: t }) {
1627
1630
  return u.observe(i.current), u.observe(o.current), () => {
1628
1631
  u.disconnect();
1629
1632
  };
1630
- }, []), jn(() => {
1633
+ }, []), Mn(() => {
1631
1634
  h.current();
1632
1635
  }, [t]), {
1633
1636
  refs: n,
1634
1637
  onScroll: g
1635
1638
  };
1636
1639
  }
1637
- function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
1640
+ function Vn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r, selectionVisible: i, pinFirstColumn: o, pinLastColumn: c }) {
1638
1641
  let [l, u] = d(/* @__PURE__ */ new Map()), f = a(() => {
1639
1642
  if (!o && !c && !e.some((e) => e.pinned)) return;
1640
1643
  let a = t.current ?? n.current;
@@ -1716,13 +1719,13 @@ function Bn({ columns: e, theadRef: t, tbodyRef: n, selectionColumnHeaderRef: r,
1716
1719
  t,
1717
1720
  n,
1718
1721
  f
1719
- ]), jn(f, [f]), {
1722
+ ]), Mn(f, [f]), {
1720
1723
  pinnedMap: l,
1721
1724
  hasLeftPinned: [...l.values()].some((e) => e.logicalSide === "left"),
1722
1725
  hasRightPinned: [...l.values()].some((e) => e.logicalSide === "right")
1723
1726
  };
1724
1727
  }
1725
- function Vn(e) {
1728
+ function Hn(e) {
1726
1729
  let [t, n] = d(null);
1727
1730
  return s(() => {
1728
1731
  n(null);
@@ -1731,7 +1734,7 @@ function Vn(e) {
1731
1734
  setLastSelectionChangeIndex: n
1732
1735
  };
1733
1736
  }
1734
- function Hn(e, t) {
1737
+ function Un(e, t) {
1735
1738
  let n = () => {
1736
1739
  t(e.map((e) => e.matches));
1737
1740
  }, r = e.map((e) => {
@@ -1747,26 +1750,26 @@ function Hn(e, t) {
1747
1750
  });
1748
1751
  };
1749
1752
  }
1750
- function Un(e, t) {
1753
+ function Wn(e, t) {
1751
1754
  return t || (typeof window < "u" && "matchMedia" in window ? e.map((e) => window.matchMedia(e).matches) : e.map(() => !1));
1752
1755
  }
1753
- function Wn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1754
- let [r, i] = d(n ? t : Un(e, t)), a = u(null);
1756
+ function Gn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0 }) {
1757
+ let [r, i] = d(n ? t : Wn(e, t)), a = u(null);
1755
1758
  return s(() => {
1756
- if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Hn(a.current, (e) => {
1759
+ if ("matchMedia" in window) return a.current = e.map((e) => window.matchMedia(e)), i(a.current.map((e) => e.matches)), Un(a.current, (e) => {
1757
1760
  i(e);
1758
1761
  });
1759
1762
  }, [e]), r;
1760
1763
  }
1761
- function Gn(e) {
1764
+ function Kn(e) {
1762
1765
  let t = ge();
1763
- return Wn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1766
+ return Gn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1764
1767
  }
1765
- function Kn(e) {
1768
+ function qn(e) {
1766
1769
  let t = ge();
1767
1770
  return Me((typeof e == "function" ? e(t) : e) || "", !0);
1768
1771
  }
1769
- function qn({ rowExpansion: e, records: t, idAccessor: n }) {
1772
+ function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
1770
1773
  let r = [];
1771
1774
  if (e && t) {
1772
1775
  let { trigger: i, allowMultiple: a, initiallyExpanded: o } = e;
@@ -1801,7 +1804,7 @@ function qn({ rowExpansion: e, records: t, idAccessor: n }) {
1801
1804
  };
1802
1805
  }
1803
1806
  }
1804
- function Jn(e, t) {
1807
+ function Yn(e, t) {
1805
1808
  let [n, r] = d(e), [i, a] = d(e), o = Pe(() => r(!0), 0), c = Pe(() => a(!1), t || 200);
1806
1809
  return s(() => {
1807
1810
  e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
@@ -1814,17 +1817,17 @@ function Jn(e, t) {
1814
1817
  visible: i
1815
1818
  };
1816
1819
  }
1817
- var Yn = "mantine-datatable-nowrap", Xn = "mantine-datatable-ellipsis", Zn = "mantine-datatable-pointer-cursor", Qn = "mantine-datatable-context-menu-cursor", $n = "mantine-datatable-text-selection-disabled", er = "mantine-datatable-text-align-left", tr = "mantine-datatable-text-align-center", nr = "mantine-datatable-text-align-right";
1818
- function rr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1819
- return Kn(r) ? p(z, {
1820
+ var Xn = "mantine-datatable-nowrap", Zn = "mantine-datatable-ellipsis", Qn = "mantine-datatable-pointer-cursor", $n = "mantine-datatable-context-menu-cursor", er = "mantine-datatable-text-selection-disabled", tr = "mantine-datatable-text-align-left", nr = "mantine-datatable-text-align-center", rr = "mantine-datatable-text-align-right";
1821
+ function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1822
+ return qn(r) ? p(se, {
1820
1823
  "data-pinned": n?.position,
1821
1824
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1822
1825
  className: X({
1823
- [Yn]: a || o,
1824
- [Xn]: o,
1825
- [er]: s === "left",
1826
- [tr]: s === "center",
1827
- [nr]: s === "right"
1826
+ [Xn]: a || o,
1827
+ [Zn]: o,
1828
+ [tr]: s === "left",
1829
+ [nr]: s === "center",
1830
+ [rr]: s === "right"
1828
1831
  }, e),
1829
1832
  style: [
1830
1833
  {
@@ -1842,24 +1845,24 @@ function rr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1842
1845
  children: i
1843
1846
  }) : null;
1844
1847
  }
1845
- function ir({ shadowVisible: e }) {
1846
- return p(z, {
1848
+ function ar({ shadowVisible: e }) {
1849
+ return p(se, {
1847
1850
  className: "mantine-datatable-footer-selector-placeholder-cell",
1848
1851
  "data-shadow-visible": e || void 0
1849
1852
  });
1850
1853
  }
1851
- function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1854
+ function or({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1852
1855
  return p(oe, {
1853
1856
  ref: s,
1854
1857
  className: X("mantine-datatable-footer", e),
1855
1858
  style: t,
1856
- children: m(ce, { children: [a && p(ir, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1859
+ children: m(B, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1857
1860
  if (e) return null;
1858
1861
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1859
1862
  ...r,
1860
1863
  ...t
1861
1864
  };
1862
- return p(rr, {
1865
+ return p(ir, {
1863
1866
  pinnedInfo: i.get(String(n)),
1864
1867
  className: l,
1865
1868
  style: u,
@@ -1873,8 +1876,8 @@ function ar({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedM
1873
1876
  })] })
1874
1877
  });
1875
1878
  }
1876
- function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: u, previousGroups: d, isLastGroup: f, withColumnBorders: m = !1, totalTableColumns: h }) {
1877
- let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ? Sn([{
1879
+ function sr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, className: a, style: o }, pinnedInfo: s, maxDepth: c, currentDepth: u, previousGroups: d, isLastGroup: f, withColumnBorders: m = !1, totalTableColumns: h }) {
1880
+ let g = l(() => t && t.length > 0 ? t : n && n.length > 0 ? Cn([{
1878
1881
  id: e,
1879
1882
  columns: t,
1880
1883
  groups: n
@@ -1882,7 +1885,7 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1882
1885
  t,
1883
1886
  n,
1884
1887
  e
1885
- ]), _ = Gn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => Cn({
1888
+ ]), _ = Kn(l(() => g.map(({ visibleMediaQuery: e }) => e), [g])), v = l(() => wn({
1886
1889
  id: e,
1887
1890
  columns: t,
1888
1891
  groups: n
@@ -1891,16 +1894,16 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1891
1894
  t,
1892
1895
  n,
1893
1896
  _
1894
- ]), y = l(() => d.reduce((e, t) => e + Cn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = Tn(f, y + v < h, m);
1895
- return v > 0 ? p(z, {
1897
+ ]), y = l(() => d.reduce((e, t) => e + wn(t, _), 0), [d, _]), b = n && n.length > 0 ? 1 : c - u, x = En(f, y + v < h, m);
1898
+ return v > 0 ? p(se, {
1896
1899
  colSpan: v,
1897
1900
  rowSpan: b > 1 ? b : void 0,
1898
1901
  "data-pinned": s?.position,
1899
1902
  "data-pinned-shadow": s?.isBoundary ? s.position : void 0,
1900
1903
  className: X("mantine-datatable-column-group-header-cell", {
1901
- [er]: i === "left",
1902
- [tr]: i === "center",
1903
- [nr]: i === "right",
1904
+ [tr]: i === "left",
1905
+ [nr]: i === "center",
1906
+ [rr]: i === "right",
1904
1907
  "mantine-datatable-column-group-header-cell--needs-border": x
1905
1908
  }, a),
1906
1909
  style: [o, s && {
@@ -1908,10 +1911,10 @@ function or({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1908
1911
  [s.position]: s.offset,
1909
1912
  overflow: "visible"
1910
1913
  }],
1911
- children: r ?? hn(e)
1914
+ children: r ?? gn(e)
1912
1915
  }) : null;
1913
1916
  }
1914
- function sr() {
1917
+ function cr() {
1915
1918
  return m("svg", {
1916
1919
  width: "14",
1917
1920
  height: "14",
@@ -1928,7 +1931,7 @@ function sr() {
1928
1931
  }), p("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" })]
1929
1932
  });
1930
1933
  }
1931
- function cr() {
1934
+ function lr() {
1932
1935
  return m("svg", {
1933
1936
  width: "14",
1934
1937
  height: "14",
@@ -1949,9 +1952,9 @@ function cr() {
1949
1952
  })]
1950
1953
  });
1951
1954
  }
1952
- function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1953
- let [i, { close: a, toggle: o }] = Ae(!1), s = t ? cr : sr, c = ke(a);
1954
- return r && (c = void 0), m(P, {
1955
+ function ur({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1956
+ let [i, { close: a, toggle: o }] = Ae(!1), s = t ? lr : cr, c = ke(a);
1957
+ return r && (c = void 0), m(F, {
1955
1958
  withArrow: !0,
1956
1959
  shadow: "md",
1957
1960
  trapFocus: !0,
@@ -1959,7 +1962,7 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
1959
1962
  opened: i,
1960
1963
  onClose: a,
1961
1964
  onDismiss: a,
1962
- children: [p(ne, { children: p(g, {
1965
+ children: [p(I, { children: p(g, {
1963
1966
  className: "mantine-datatable-header-cell-filter-action-icon",
1964
1967
  "data-active": t || void 0,
1965
1968
  size: "sm",
@@ -1977,7 +1980,7 @@ function lr({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisa
1977
1980
  })]
1978
1981
  });
1979
1982
  }
1980
- function ur() {
1983
+ function dr() {
1981
1984
  return m("svg", {
1982
1985
  width: "14",
1983
1986
  height: "14",
@@ -1999,7 +2002,7 @@ function ur() {
1999
2002
  ]
2000
2003
  });
2001
2004
  }
2002
- function dr() {
2005
+ function fr() {
2003
2006
  return m("svg", {
2004
2007
  width: "14",
2005
2008
  height: "14",
@@ -2021,7 +2024,7 @@ function dr() {
2021
2024
  ]
2022
2025
  });
2023
2026
  }
2024
- function fr() {
2027
+ function pr() {
2025
2028
  return m("svg", {
2026
2029
  width: "14",
2027
2030
  height: "14",
@@ -2043,7 +2046,7 @@ function fr() {
2043
2046
  ]
2044
2047
  });
2045
2048
  }
2046
- function pr() {
2049
+ function mr() {
2047
2050
  return m("svg", {
2048
2051
  width: "14",
2049
2052
  height: "14",
@@ -2064,26 +2067,26 @@ function pr() {
2064
2067
  ]
2065
2068
  });
2066
2069
  }
2067
- function mr({ currentPinned: e, onPinChange: t }) {
2070
+ function hr({ currentPinned: e, onPinChange: t }) {
2068
2071
  let [n, r] = d(!1), i = u(null), [o, c] = d(!1), l = a(() => {
2069
2072
  if (i.current) {
2070
2073
  let e = getComputedStyle(i.current).direction;
2071
2074
  c(e === "rtl");
2072
2075
  }
2073
2076
  }, []);
2074
- jn(() => {
2077
+ Mn(() => {
2075
2078
  l();
2076
2079
  }, [l]), s(() => {
2077
2080
  n && l();
2078
2081
  }, [n, l]);
2079
2082
  let f = o ? "right" : "left", h = o ? "left" : "right", _ = e === f, v = e === h;
2080
- return m(P, {
2083
+ return m(F, {
2081
2084
  opened: n,
2082
2085
  onChange: r,
2083
2086
  position: "bottom",
2084
2087
  withArrow: !0,
2085
2088
  shadow: "sm",
2086
- children: [p(P.Target, { children: p(b, {
2089
+ children: [p(F.Target, { children: p(b, {
2087
2090
  ref: i,
2088
2091
  className: "mantine-datatable-header-cell-pinnable-icon",
2089
2092
  role: "button",
@@ -2094,9 +2097,9 @@ function mr({ currentPinned: e, onPinChange: t }) {
2094
2097
  size: "xs",
2095
2098
  variant: "light",
2096
2099
  onClick: (e) => e.stopPropagation(),
2097
- children: p(fr, {})
2100
+ children: p(pr, {})
2098
2101
  })
2099
- }) }), p(P.Dropdown, {
2102
+ }) }), p(F.Dropdown, {
2100
2103
  onClick: (e) => e.stopPropagation(),
2101
2104
  onMouseEnter: () => r(!0),
2102
2105
  onMouseLeave: () => r(!1),
@@ -2109,14 +2112,14 @@ function mr({ currentPinned: e, onPinChange: t }) {
2109
2112
  variant: _ ? "filled" : "light",
2110
2113
  onClick: () => t(_ ? void 0 : f),
2111
2114
  "aria-label": "Pin left",
2112
- children: p(ur, {})
2115
+ children: p(dr, {})
2113
2116
  }),
2114
2117
  p(g, {
2115
2118
  size: "sm",
2116
2119
  variant: v ? "filled" : "light",
2117
2120
  onClick: () => t(v ? void 0 : h),
2118
2121
  "aria-label": "Pin right",
2119
- children: p(dr, {})
2122
+ children: p(fr, {})
2120
2123
  }),
2121
2124
  e && p(g, {
2122
2125
  size: "sm",
@@ -2124,18 +2127,18 @@ function mr({ currentPinned: e, onPinChange: t }) {
2124
2127
  color: "red",
2125
2128
  onClick: () => t(void 0),
2126
2129
  "aria-label": "Unpin",
2127
- children: p(pr, {})
2130
+ children: p(mr, {})
2128
2131
  })
2129
2132
  ]
2130
2133
  })
2131
2134
  })]
2132
2135
  });
2133
2136
  }
2134
- var hr = 50, gr = (e) => {
2137
+ var gr = 50, _r = (e) => {
2135
2138
  let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2136
2139
  current: 0,
2137
2140
  next: 0
2138
- }), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = un(), g = a((e) => {
2141
+ }), { dir: c } = he(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
2139
2142
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2140
2143
  let r = n.current, a = r.nextElementSibling;
2141
2144
  for (; a;) {
@@ -2154,7 +2157,7 @@ var hr = 50, gr = (e) => {
2154
2157
  let p = (e) => {
2155
2158
  let n = e.clientX - o.current;
2156
2159
  l && (n = -n);
2157
- let r = s.current.current - hr, i = s.current.next - hr, a = Math.max(-r, Math.min(n, i)), u = s.current.current + a, d = s.current.next - a;
2160
+ let r = s.current.current - gr, i = s.current.next - gr, a = Math.max(-r, Math.min(n, i)), u = s.current.current + a, d = s.current.next - a;
2158
2161
  f([{
2159
2162
  accessor: t,
2160
2163
  width: `${u}px`
@@ -2201,7 +2204,7 @@ var hr = 50, gr = (e) => {
2201
2204
  title: "Drag to resize column, double-click to reset"
2202
2205
  });
2203
2206
  };
2204
- function _r() {
2207
+ function vr() {
2205
2208
  return m("svg", {
2206
2209
  width: "14",
2207
2210
  height: "14",
@@ -2223,7 +2226,7 @@ function _r() {
2223
2226
  ]
2224
2227
  });
2225
2228
  }
2226
- function vr() {
2229
+ function yr() {
2227
2230
  return m("svg", {
2228
2231
  width: "14",
2229
2232
  height: "14",
@@ -2245,7 +2248,7 @@ function vr() {
2245
2248
  ]
2246
2249
  });
2247
2250
  }
2248
- function yr() {
2251
+ function br() {
2249
2252
  return m("svg", {
2250
2253
  width: "14",
2251
2254
  height: "14",
@@ -2270,37 +2273,37 @@ function yr() {
2270
2273
  ]
2271
2274
  });
2272
2275
  }
2273
- function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2274
- let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: ee, columnsPinning: P, setColumnsPinning: te } = un(), [ne, F] = d(!1), I = u(null), re = P?.find((e) => e.accessor === r)?.pinned;
2275
- if (!Kn(i)) return null;
2276
- let L = a ?? hn(r), R = typeof L == "string" ? L : void 0, ie = o && S ? (e) => {
2276
+ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQuery: i, title: a, sortable: o, draggable: s, toggleable: c, pinnable: l, resizable: f, sortIcons: h, textAlign: _, width: y, sortStatus: x, onSortStatusChange: S, filter: C, filterPopoverProps: E, filterPopoverDisableClickOutside: D, filtering: O, sortKey: k }) {
2277
+ let { setSourceColumn: A, setTargetColumn: j, swapColumns: M, columnsToggle: N, setColumnsToggle: P, columnsPinning: ee, setColumnsPinning: F } = dn(), [te, I] = d(!1), L = u(null), ne = ee?.find((e) => e.accessor === r)?.pinned;
2278
+ if (!qn(i)) return null;
2279
+ let R = a ?? gn(r), re = typeof R == "string" ? R : void 0, ie = o && S ? (e) => {
2277
2280
  e?.defaultPrevented || S({
2278
2281
  sortKey: k,
2279
2282
  columnAccessor: r,
2280
2283
  direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2281
2284
  });
2282
- } : void 0, ae = (e) => {
2283
- e.stopPropagation(), A(r), F(!1);
2284
- }, oe = (e) => {
2285
- e.preventDefault(), j(r), F(!0);
2286
- }, se = () => {
2287
- j(r), F(!1), M();
2285
+ } : void 0, z = (e) => {
2286
+ e.stopPropagation(), A(r), I(!1);
2287
+ }, ae = (e) => {
2288
+ e.preventDefault(), j(r), I(!0);
2289
+ }, oe = () => {
2290
+ j(r), I(!1), M();
2288
2291
  }, ce = () => {
2289
- F(!0);
2290
- }, le = () => {
2291
- F(!1);
2292
- }, B = (e) => {
2293
- e.stopPropagation(), ee(N.map((e) => e.accessor === r ? {
2292
+ I(!0);
2293
+ }, B = () => {
2294
+ I(!1);
2295
+ }, le = (e) => {
2296
+ e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2294
2297
  ...e,
2295
2298
  toggled: !1
2296
2299
  } : e));
2297
- }, ue = (e) => {
2298
- te((t) => t.map((t) => t.accessor === r ? {
2300
+ }, V = (e) => {
2301
+ F((t) => t.map((t) => t.accessor === r ? {
2299
2302
  ...t,
2300
2303
  pinned: e
2301
2304
  } : t));
2302
2305
  };
2303
- return m(z, {
2306
+ return m(se, {
2304
2307
  "data-accessor": r,
2305
2308
  "data-pinned": n?.position,
2306
2309
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2329,7 +2332,7 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2329
2332
  tabIndex: o ? 0 : void 0,
2330
2333
  onClick: ie,
2331
2334
  onKeyDown: (e) => e.key === "Enter" && ie?.(),
2332
- ref: I,
2335
+ ref: L,
2333
2336
  children: [m(T, {
2334
2337
  className: "mantine-datatable-header-cell-sortable-group",
2335
2338
  justify: "space-between",
@@ -2340,14 +2343,14 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2340
2343
  w: "100%",
2341
2344
  className: X({
2342
2345
  "mantine-datatable-header-cell-draggable": s,
2343
- "mantine-datatable-header-cell-drag-over": ne
2346
+ "mantine-datatable-header-cell-drag-over": te
2344
2347
  }),
2345
2348
  draggable: s,
2346
- onDragStart: s ? ae : void 0,
2349
+ onDragStart: s ? z : void 0,
2347
2350
  onDragEnter: s ? ce : void 0,
2348
- onDragOver: s ? oe : void 0,
2349
- onDrop: s ? se : void 0,
2350
- onDragLeave: s ? le : void 0,
2351
+ onDragOver: s ? ae : void 0,
2352
+ onDrop: s ? oe : void 0,
2353
+ onDragLeave: s ? B : void 0,
2351
2354
  children: [s ? p(b, {
2352
2355
  role: "img",
2353
2356
  "aria-label": "Drag column",
@@ -2358,21 +2361,21 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2358
2361
  onClick: (e) => {
2359
2362
  e.stopPropagation();
2360
2363
  },
2361
- children: p(yr, {})
2364
+ children: p(br, {})
2362
2365
  })
2363
2366
  }) : null, p(v, {
2364
2367
  className: X("mantine-datatable-header-cell-sortable-text", {
2365
- [er]: _ === "left",
2366
- [tr]: _ === "center",
2367
- [nr]: _ === "right"
2368
- }, Yn, Xn),
2369
- title: R,
2370
- children: L
2368
+ [tr]: _ === "left",
2369
+ [nr]: _ === "center",
2370
+ [rr]: _ === "right"
2371
+ }, Xn, Zn),
2372
+ title: re,
2373
+ children: R
2371
2374
  })]
2372
2375
  }),
2373
- l ? p(mr, {
2374
- currentPinned: re,
2375
- onPinChange: ue
2376
+ l ? p(hr, {
2377
+ currentPinned: ne,
2378
+ onPinChange: V
2376
2379
  }) : null,
2377
2380
  c ? p(b, {
2378
2381
  className: "mantine-datatable-header-cell-toggleable-icon",
@@ -2381,46 +2384,46 @@ function br({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2381
2384
  children: p(g, {
2382
2385
  size: "xs",
2383
2386
  variant: "light",
2384
- onClick: B,
2385
- children: p(pr, {})
2387
+ onClick: le,
2388
+ children: p(mr, {})
2386
2389
  })
2387
2390
  }) : null,
2388
2391
  o || x?.columnAccessor === r ? x?.columnAccessor === r ? p(b, {
2389
2392
  className: X("mantine-datatable-header-cell-sortable-icon", { "mantine-datatable-header-cell-sortable-icon-reversed": x.direction === "desc" }),
2390
2393
  role: "img",
2391
2394
  "aria-label": `Sorted ${x.direction === "desc" ? "descending" : "ascending"}`,
2392
- children: h?.sorted || p(vr, {})
2395
+ children: h?.sorted || p(yr, {})
2393
2396
  }) : p(b, {
2394
2397
  className: "mantine-datatable-header-cell-sortable-unsorted-icon",
2395
2398
  role: "img",
2396
2399
  "aria-label": "Not sorted",
2397
- children: h?.unsorted || p(_r, {})
2400
+ children: h?.unsorted || p(vr, {})
2398
2401
  }) : null,
2399
- C ? p(lr, {
2402
+ C ? p(ur, {
2400
2403
  filterPopoverProps: E,
2401
2404
  isActive: !!O,
2402
2405
  filterPopoverDisableClickOutside: D,
2403
2406
  children: C
2404
2407
  }) : null
2405
2408
  ]
2406
- }), f && r !== "__selection__" ? p(gr, {
2409
+ }), f && r !== "__selection__" ? p(_r, {
2407
2410
  accessor: r,
2408
- columnRef: I
2411
+ columnRef: L
2409
2412
  }) : null]
2410
2413
  });
2411
2414
  }
2412
- function xr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2415
+ function Sr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2413
2416
  let u = !o.disabled;
2414
- return p(z, {
2417
+ return p(se, {
2415
2418
  ref: l,
2416
- className: X("mantine-datatable-header-selector-cell", { [Zn]: n === "cell" && u }, e),
2419
+ className: X("mantine-datatable-header-selector-cell", { [Qn]: n === "cell" && u }, e),
2417
2420
  style: t,
2418
2421
  rowSpan: c,
2419
2422
  "data-shadow-visible": r || void 0,
2420
2423
  "data-accessor": "__selection__",
2421
2424
  onClick: n === "cell" && u ? s : void 0,
2422
2425
  children: p(x, {
2423
- classNames: u ? { input: Zn } : void 0,
2426
+ classNames: u ? { input: Qn } : void 0,
2424
2427
  checked: i,
2425
2428
  indeterminate: a,
2426
2429
  onChange: s,
@@ -2429,7 +2432,7 @@ function xr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i,
2429
2432
  })
2430
2433
  });
2431
2434
  }
2432
- function Sr(e, t) {
2435
+ function Cr(e, t) {
2433
2436
  let n = (e.columns ?? []).filter((e) => !e.hidden).map((e) => String(e.accessor)), r = n.map((e) => t.get(e)).filter(Boolean);
2434
2437
  if (r.length === 0 || r.length !== n.length) return;
2435
2438
  let i = new Set(r.map((e) => e.logicalSide));
@@ -2442,8 +2445,8 @@ function Sr(e, t) {
2442
2445
  isBoundary: l?.isBoundary ?? !1
2443
2446
  };
2444
2447
  }
2445
- function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: f, selectionChecked: h, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: S, withColumnBorders: C = !1, ref: w }) {
2446
- let E = c ? xn(c) : 0, D = E > 0 ? E + 1 : 1, O = f ? p(xr, {
2448
+ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r, sortIcons: i, onSortStatusChange: a, columns: o, defaultColumnProps: s, groups: c, pinnedMap: l, selectionTrigger: u, selectionVisible: f, selectionChecked: h, selectionIndeterminate: g, onSelectionChange: _, selectionCheckboxProps: v, selectorCellShadowVisible: y, selectionColumnClassName: b, selectionColumnStyle: S, withColumnBorders: C = !1, ref: w }) {
2449
+ let E = c ? Sn(c) : 0, D = E > 0 ? E + 1 : 1, O = f ? p(Sr, {
2447
2450
  ref: e,
2448
2451
  className: b,
2449
2452
  style: S,
@@ -2454,7 +2457,7 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2454
2457
  checkboxProps: v,
2455
2458
  onChange: _,
2456
2459
  rowSpan: c ? D : void 0
2457
- }) : null, { columnsToggle: k, setColumnsToggle: A } = un(), [j, M] = d(!1), N = o.some((e) => e.toggleable), ee = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? hn(String(e))])) : void 0, F = m(se, {
2460
+ }) : null, { columnsToggle: k, setColumnsToggle: A } = dn(), [j, M] = d(!1), N = o.some((e) => e.toggleable), P = N ? Object.fromEntries(o.map(({ accessor: e, title: t }) => [e, t ?? gn(String(e))])) : void 0, ee = m(ce, {
2458
2461
  className: X("mantine-datatable-header", t),
2459
2462
  style: n,
2460
2463
  ref: w,
@@ -2462,10 +2465,10 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2462
2465
  e.preventDefault(), M((e) => !e);
2463
2466
  } : void 0,
2464
2467
  children: [c && Array.from({ length: E }, (e, t) => {
2465
- let n = wn(c, t);
2466
- return m(ce, { children: [t === 0 && O, n.map((e, r) => p(or, {
2468
+ let n = Tn(c, t);
2469
+ return m(B, { children: [t === 0 && O, n.map((e, r) => p(sr, {
2467
2470
  group: e,
2468
- pinnedInfo: Sr(e, l),
2471
+ pinnedInfo: Cr(e, l),
2469
2472
  maxDepth: E,
2470
2473
  currentDepth: t,
2471
2474
  previousGroups: n.slice(0, r),
@@ -2473,13 +2476,13 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2473
2476
  withColumnBorders: C,
2474
2477
  totalTableColumns: o.length
2475
2478
  }, e.id))] }, `group-depth-${t}`);
2476
- }), m(ce, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2479
+ }), m(B, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2477
2480
  if (e) return null;
2478
2481
  let { accessor: c, visibleMediaQuery: u, textAlign: d, width: f, title: m, sortable: h, draggable: g, toggleable: _, pinnable: v, resizable: y, titleClassName: b, titleStyle: x, filter: S, filterPopoverProps: C, filterPopoverDisableClickOutside: w, filtering: T, sortKey: E } = {
2479
2482
  ...s,
2480
2483
  ...t
2481
2484
  };
2482
- return p(br, {
2485
+ return p(xr, {
2483
2486
  accessor: c,
2484
2487
  pinnedInfo: l.get(String(c)),
2485
2488
  className: b,
@@ -2504,16 +2507,16 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2504
2507
  }, c);
2505
2508
  })] })]
2506
2509
  });
2507
- return N ? m(P, {
2510
+ return N ? m(F, {
2508
2511
  position: "bottom",
2509
2512
  withArrow: !0,
2510
2513
  shadow: "md",
2511
2514
  opened: j,
2512
2515
  onChange: M,
2513
- children: [p(ne, { children: F }), p(te, { children: p(L, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2516
+ children: [p(I, { children: ee }), p(te, { children: p(re, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2514
2517
  classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
2515
2518
  size: "xs",
2516
- label: ee[e.accessor],
2519
+ label: P[e.accessor],
2517
2520
  checked: e.toggled,
2518
2521
  onChange: (t) => {
2519
2522
  A(k.map((n) => n.accessor === e.accessor ? {
@@ -2522,20 +2525,20 @@ function Cr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2522
2525
  } : n));
2523
2526
  }
2524
2527
  }) }, e.accessor)) }) })]
2525
- }) : F;
2528
+ }) : ee;
2526
2529
  }
2527
- function wr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2530
+ function Tr({ fetching: e, customContent: t, backgroundBlur: n, size: r, type: i, color: a }) {
2528
2531
  return p(b, {
2529
2532
  className: X("mantine-datatable-loader", { "mantine-datatable-loader-fetching": e }),
2530
2533
  style: [{ backdropFilter: n ? `blur(${n}px)` : void 0 }],
2531
- children: e && (t || p(D, {
2534
+ children: e && (t || p(O, {
2532
2535
  size: r,
2533
2536
  type: i,
2534
2537
  color: a
2535
2538
  }))
2536
2539
  });
2537
2540
  }
2538
- function Tr() {
2541
+ function Er() {
2539
2542
  return m("svg", {
2540
2543
  width: "14",
2541
2544
  height: "14",
@@ -2556,48 +2559,48 @@ function Tr() {
2556
2559
  ]
2557
2560
  });
2558
2561
  }
2559
- var Er = {
2560
- xs: V(22),
2561
- sm: V(26),
2562
- md: V(32),
2563
- lg: V(38),
2564
- xl: V(44)
2562
+ var Dr = {
2563
+ xs: H(22),
2564
+ sm: H(26),
2565
+ md: H(32),
2566
+ lg: H(38),
2567
+ xl: H(44)
2565
2568
  };
2566
- function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2569
+ function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2567
2570
  return m(T, {
2568
2571
  gap: "xs",
2569
- children: [p(B, {
2572
+ children: [p(V, {
2570
2573
  component: "div",
2571
2574
  size: e,
2572
2575
  children: t
2573
- }), m(O, {
2576
+ }), m(k, {
2574
2577
  withinPortal: !0,
2575
2578
  withArrow: !0,
2576
2579
  offset: 2,
2577
2580
  classNames: { arrow: "mantine-datatable-page-size-selector-menu-arrow" },
2578
- children: [p(j, { children: p(y, {
2581
+ children: [p(M, { children: p(y, {
2579
2582
  size: e,
2580
2583
  variant: "default",
2581
2584
  classNames: { section: "mantine-datatable-page-size-selector-button-icon" },
2582
- rightSection: p(Tr, {}),
2585
+ rightSection: p(Er, {}),
2583
2586
  style: [{ fontWeight: "normal" }, (t) => ({
2584
- height: Er[e],
2587
+ height: Dr[e],
2585
2588
  paddingLeft: t.spacing[e],
2586
2589
  paddingRight: t.spacing[e]
2587
2590
  })],
2588
2591
  children: r
2589
- }) }), p(k, { children: n.map((t) => {
2592
+ }) }), p(A, { children: n.map((t) => {
2590
2593
  let n = t === r;
2591
- return p(A, {
2594
+ return p(j, {
2592
2595
  className: X({ "mantine-datatable-page-size-selector-active": n }),
2593
- style: [{ height: Er[e] }, n && (i || a) ? (e) => sn({
2596
+ style: [{ height: Dr[e] }, n && (i || a) ? (e) => cn({
2594
2597
  theme: e,
2595
2598
  paginationActiveTextColor: i,
2596
2599
  paginationActiveBackgroundColor: a
2597
2600
  }) : void 0],
2598
2601
  disabled: n,
2599
2602
  onClick: () => o(t),
2600
- children: p(B, {
2603
+ children: p(V, {
2601
2604
  component: "div",
2602
2605
  size: e,
2603
2606
  children: t
@@ -2607,7 +2610,7 @@ function Dr({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2607
2610
  })]
2608
2611
  });
2609
2612
  }
2610
- function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, paginationWithEdges: a, paginationWithControls: o, paginationActiveTextColor: s, paginationActiveBackgroundColor: c, paginationSize: l, loadingText: u, noRecordsText: d, paginationText: h, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: y, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
2613
+ function kr({ className: e, style: t, fetching: n, page: r, onPageChange: i, paginationWithEdges: a, paginationWithControls: o, paginationActiveTextColor: s, paginationActiveBackgroundColor: c, paginationSize: l, loadingText: u, noRecordsText: d, paginationText: h, totalRecords: g, recordsPerPage: _, onRecordsPerPageChange: y, recordsPerPageLabel: b, recordsPerPageOptions: x, recordsLength: S, horizontalSpacing: C, paginationWrapBreakpoint: w, getPaginationControlProps: T, getPaginationItemProps: E, renderPagination: D }) {
2611
2614
  let O;
2612
2615
  if (g) {
2613
2616
  let e = (r - 1) * _ + 1;
@@ -2617,15 +2620,15 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2617
2620
  totalRecords: g
2618
2621
  });
2619
2622
  } else O = n ? u : d;
2620
- let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !Kn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${V(w)}rem` : e[w] || w})`), N = {
2621
- Text: (e) => p(B, {
2623
+ let k = g && _ ? Math.max(1, Math.ceil(g / _)) : 1, A = g ? (r - 1) * (_ ?? 0) + 1 : void 0, j = g ? (A ?? 1) + (S ?? 0) - 1 : void 0, M = !qn(({ breakpoints: e }) => `(min-width: ${typeof w == "number" ? `${H(w)}rem` : e[w] || w})`), N = {
2624
+ Text: (e) => p(V, {
2622
2625
  component: "div",
2623
2626
  className: "mantine-datatable-pagination-text",
2624
2627
  size: l,
2625
2628
  ...e,
2626
2629
  children: O
2627
2630
  }),
2628
- PageSizeSelector: (e) => x ? p(Dr, {
2631
+ PageSizeSelector: (e) => x ? p(Or, {
2629
2632
  activeTextColor: s,
2630
2633
  activeBackgroundColor: c,
2631
2634
  size: l,
@@ -2640,7 +2643,7 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2640
2643
  root: X("mantine-datatable-pagination-pages", { "mantine-datatable-pagination-pages-fetching": n || !S }),
2641
2644
  control: "mantine-datatable-pagination-pages-control"
2642
2645
  },
2643
- style: s || c ? (e) => sn({
2646
+ style: s || c ? (e) => cn({
2644
2647
  theme: e,
2645
2648
  paginationActiveTextColor: s,
2646
2649
  paginationActiveBackgroundColor: c
@@ -2686,18 +2689,18 @@ function Or({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2686
2689
  ] })
2687
2690
  });
2688
2691
  }
2689
- function kr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: m, render: h, defaultRender: g, customCellAttributes: _ }) {
2690
- return Kn(r) ? p(ae, {
2692
+ function Ar({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, record: i, index: a, onClick: o, onDoubleClick: s, onContextMenu: c, noWrap: l, ellipsis: u, textAlign: d, width: f, accessor: m, render: h, defaultRender: g, customCellAttributes: _ }) {
2693
+ return qn(r) ? p(ae, {
2691
2694
  "data-pinned": n?.position,
2692
2695
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
2693
2696
  className: X({
2694
- [Yn]: l || u,
2695
- [Xn]: u,
2696
- [Zn]: o || s,
2697
- [Qn]: c,
2698
- [er]: d === "left",
2699
- [tr]: d === "center",
2700
- [nr]: d === "right"
2697
+ [Xn]: l || u,
2698
+ [Zn]: u,
2699
+ [Qn]: o || s,
2700
+ [$n]: c,
2701
+ [tr]: d === "left",
2702
+ [nr]: d === "center",
2703
+ [rr]: d === "right"
2701
2704
  }, e),
2702
2705
  style: [
2703
2706
  {
@@ -2716,12 +2719,12 @@ function kr({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2716
2719
  onDoubleClick: s,
2717
2720
  onContextMenu: c,
2718
2721
  ..._?.(i, a),
2719
- children: h ? h(i, a) : g ? g(i, a, m) : bn(i, m)
2722
+ children: h ? h(i, a) : g ? g(i, a, m) : xn(i, m)
2720
2723
  }) : null;
2721
2724
  }
2722
- function Ar({ open: e, colSpan: t, content: n, collapseProps: r }) {
2723
- let { expanded: i, visible: a } = Jn(e, r?.transitionDuration);
2724
- return a ? m(f, { children: [p(ce, {}), p(ce, { children: p(ae, {
2725
+ function jr({ open: e, colSpan: t, content: n, collapseProps: r }) {
2726
+ let { expanded: i, visible: a } = Yn(e, r?.transitionDuration);
2727
+ return a ? m(f, { children: [p(B, {}), p(B, { children: p(ae, {
2725
2728
  className: "mantine-datatable-row-expansion-cell",
2726
2729
  colSpan: t,
2727
2730
  children: p(S, {
@@ -2734,7 +2737,7 @@ function Ar({ open: e, colSpan: t, content: n, collapseProps: r }) {
2734
2737
  })
2735
2738
  }) })] }) : null;
2736
2739
  }
2737
- function jr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
2740
+ function Mr({ className: e, style: t, record: n, index: r, trigger: i, onChange: a, withRightShadow: o, checkboxProps: s, getCheckboxProps: c, ...l }) {
2738
2741
  let u = {
2739
2742
  ...s,
2740
2743
  ...c(n, r)
@@ -2742,20 +2745,20 @@ function jr({ className: e, style: t, record: n, index: r, trigger: i, onChange:
2742
2745
  e.stopPropagation(), i === "cell" && d && a?.(e);
2743
2746
  };
2744
2747
  return p(ae, {
2745
- className: X("mantine-datatable-row-selector-cell", { [Zn]: i === "cell" && d }, e),
2748
+ className: X("mantine-datatable-row-selector-cell", { [Qn]: i === "cell" && d }, e),
2746
2749
  style: t,
2747
2750
  "data-shadow-visible": o || void 0,
2748
2751
  onClick: f,
2749
2752
  children: p(x, {
2750
- classNames: d ? { input: Zn } : void 0,
2753
+ classNames: d ? { input: Qn } : void 0,
2751
2754
  onChange: a,
2752
2755
  ...l,
2753
2756
  ...u
2754
2757
  })
2755
2758
  });
2756
2759
  }
2757
- function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap: i, defaultColumnRender: a, selectionTrigger: o, selectionVisible: s, selectionChecked: c, onSelectionChange: l, isRecordSelectable: u, selectionCheckboxProps: d, getSelectionCheckboxProps: h, onClick: g, onDoubleClick: _, onContextMenu: v, onCellClick: y, onCellDoubleClick: b, onCellContextMenu: x, expansion: S, customAttributes: C, color: w, backgroundColor: T, className: E, style: D, selectorCellShadowVisible: O, selectionColumnClassName: k, selectionColumnStyle: A, rowFactory: j }) {
2758
- let M = m(f, { children: [s && p(jr, {
2760
+ function Nr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap: i, defaultColumnRender: a, selectionTrigger: o, selectionVisible: s, selectionChecked: c, onSelectionChange: l, isRecordSelectable: u, selectionCheckboxProps: d, getSelectionCheckboxProps: h, onClick: g, onDoubleClick: _, onContextMenu: v, onCellClick: y, onCellDoubleClick: b, onCellContextMenu: x, expansion: S, customAttributes: C, color: w, backgroundColor: T, className: E, style: D, selectorCellShadowVisible: O, selectionColumnClassName: k, selectionColumnStyle: A, rowFactory: j }) {
2761
+ let M = m(f, { children: [s && p(Mr, {
2759
2762
  className: k,
2760
2763
  style: A,
2761
2764
  record: e,
@@ -2773,7 +2776,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2773
2776
  ...r,
2774
2777
  ...s
2775
2778
  };
2776
- return p(kr, {
2779
+ return p(Ar, {
2777
2780
  pinnedInfo: i.get(String(l)),
2778
2781
  className: typeof _ == "function" ? _(e, t) : _,
2779
2782
  style: v?.(e, t),
@@ -2810,7 +2813,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2810
2813
  defaultRender: a,
2811
2814
  customCellAttributes: S
2812
2815
  }, l);
2813
- })] }), N = S && p(Ar, {
2816
+ })] }), N = S && p(jr, {
2814
2817
  colSpan: n.filter(({ hidden: e }) => !e).length + +!!s,
2815
2818
  open: S.isRowExpanded(e),
2816
2819
  content: S.content({
@@ -2818,7 +2821,7 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2818
2821
  index: t
2819
2822
  }),
2820
2823
  collapseProps: S.collapseProps
2821
- }), ee = Nr({
2824
+ }), P = Pr({
2822
2825
  record: e,
2823
2826
  index: t,
2824
2827
  selectionChecked: c,
@@ -2835,20 +2838,20 @@ function Mr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2835
2838
  return j ? j({
2836
2839
  record: e,
2837
2840
  index: t,
2838
- rowProps: ee,
2841
+ rowProps: P,
2839
2842
  children: M,
2840
2843
  expandedElement: N
2841
- }) : m(f, { children: [p(ce, {
2842
- ...ee,
2844
+ }) : m(f, { children: [p(B, {
2845
+ ...P,
2843
2846
  children: M
2844
2847
  }), N] });
2845
2848
  }
2846
- function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClick: i, onContextMenu: a, expansion: o, customAttributes: s, color: c, backgroundColor: l, className: u, style: d }) {
2849
+ function Pr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClick: i, onContextMenu: a, expansion: o, customAttributes: s, color: c, backgroundColor: l, className: u, style: d }) {
2847
2850
  return {
2848
- className: X("mantine-datatable-row", { [Zn]: r || i || o?.isExpandable({
2851
+ className: X("mantine-datatable-row", { [Qn]: r || i || o?.isExpandable({
2849
2852
  record: e,
2850
2853
  index: t
2851
- }) && o?.expandOnClick }, { [Qn]: a }, typeof u == "function" ? u(e, t) : u),
2854
+ }) && o?.expandOnClick }, { [$n]: a }, typeof u == "function" ? u(e, t) : u),
2852
2855
  "data-selected": n || void 0,
2853
2856
  onClick: (n) => {
2854
2857
  if (o) {
@@ -2876,7 +2879,7 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
2876
2879
  }) : void 0,
2877
2880
  style: [c || l ? (n) => {
2878
2881
  let r = c?.(e, t), i = l?.(e, t);
2879
- return cn({
2882
+ return ln({
2880
2883
  theme: n,
2881
2884
  color: r,
2882
2885
  backgroundColor: i
@@ -2885,8 +2888,8 @@ function Nr({ record: e, index: t, selectionChecked: n, onClick: r, onDoubleClic
2885
2888
  ...s?.(e, t) ?? {}
2886
2889
  };
2887
2890
  }
2888
- function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2889
- return m(F, {
2891
+ function Fr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange: n, children: r, viewportRef: i, scrollAreaProps: a }) {
2892
+ return m(L, {
2890
2893
  ...a,
2891
2894
  viewportRef: i,
2892
2895
  classNames: {
@@ -2905,91 +2908,91 @@ function Pr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2905
2908
  ]
2906
2909
  });
2907
2910
  }
2908
- function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: ee = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: P, sortIcons: te, onSortStatusChange: ne, horizontalSpacing: F, page: I, onPageChange: re, totalRecords: L, recordsPerPage: R, onRecordsPerPageChange: ae, recordsPerPageOptions: oe, recordsPerPageLabel: z = "Records per page", paginationWithEdges: se, paginationWithControls: ce, paginationActiveTextColor: le, paginationActiveBackgroundColor: B, paginationSize: ue = "sm", paginationText: de = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: fe = "sm", getPaginationControlProps: pe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: me, renderPagination: V, loaderBackgroundBlur: he, customLoader: ge, loaderSize: _e, loaderType: ve, loaderColor: ye, loadingText: be = "...", emptyState: xe, noRecordsText: Se = "No records", noRecordsIcon: Ce, highlightOnHover: we, striped: Te, noHeader: Ee, onRowClick: De, onRowDoubleClick: Oe, onRowContextMenu: ke, onCellClick: Ae, onCellDoubleClick: je, onCellContextMenu: Me, onScroll: Pe, onScrollToTop: H, onScrollToBottom: Fe, onScrollToLeft: Ie, onScrollToRight: U, c: Le, backgroundColor: Re, borderColor: ze, rowBorderColor: Be, stripedColor: Ve, highlightOnHoverColor: He, rowColor: W, rowBackgroundColor: Ue, rowExpansion: We, rowClassName: Ge, rowStyle: Ke, customRowAttributes: qe, scrollViewportRef: G, scrollAreaProps: K, tableRef: Je, bodyRef: Ye, m: Xe, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: ot, rowFactory: st, tableWrapper: ct, ...lt }) {
2909
- let ut = l(() => y ? Sn(y) : g, [g, y]), { refs: q, onScroll: dt } = zn({
2911
+ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, height: r = "100%", minHeight: i, maxHeight: o, shadow: d, verticalAlign: f = "center", fetching: h, columns: g, storeColumnsKey: _, groups: y, pinFirstColumn: b, pinLastColumn: x, defaultColumnProps: S, defaultColumnRender: C, idAccessor: w = "id", records: T, selectionTrigger: E = "checkbox", selectedRecords: D, onSelectedRecordsChange: O, selectionColumnClassName: k, selectionColumnStyle: A, isRecordSelectable: j, selectionCheckboxProps: M, allRecordsSelectionCheckboxProps: N = { "aria-label": "Select all records" }, getRecordSelectionCheckboxProps: P = (e, t) => ({ "aria-label": `Select record ${t + 1}` }), sortStatus: ee, sortIcons: F, onSortStatusChange: te, horizontalSpacing: I, page: L, onPageChange: ne, totalRecords: R, recordsPerPage: re, onRecordsPerPageChange: ie, recordsPerPageOptions: ae, recordsPerPageLabel: oe = "Records per page", paginationWithEdges: se, paginationWithControls: ce, paginationActiveTextColor: B, paginationActiveBackgroundColor: le, paginationSize: V = "sm", paginationText: ue = ({ from: e, to: t, totalRecords: n }) => `${e} - ${t} / ${n}`, paginationWrapBreakpoint: de = "sm", getPaginationControlProps: fe = (e) => e === "previous" ? { "aria-label": "Previous page" } : e === "next" ? { "aria-label": "Next page" } : {}, getPaginationItemProps: pe, renderPagination: me, loaderBackgroundBlur: H, customLoader: he, loaderSize: ge, loaderType: _e, loaderColor: ve, loadingText: ye = "...", emptyState: be, noRecordsText: xe = "No records", noRecordsIcon: Se, highlightOnHover: Ce, striped: we, noHeader: Te, onRowClick: Ee, onRowDoubleClick: De, onRowContextMenu: Oe, onCellClick: ke, onCellDoubleClick: Ae, onCellContextMenu: je, onScroll: Me, onScrollToTop: Pe, onScrollToBottom: Fe, onScrollToLeft: Ie, onScrollToRight: Le, c: Re, backgroundColor: ze, borderColor: U, rowBorderColor: Be, stripedColor: Ve, highlightOnHoverColor: W, rowColor: He, rowBackgroundColor: Ue, rowExpansion: We, rowClassName: Ge, rowStyle: Ke, customRowAttributes: qe, scrollViewportRef: Je, scrollAreaProps: Ye, tableRef: Xe, bodyRef: G, m: K, my: Ze, mx: Qe, mt: $e, mb: et, ml: tt, mr: nt, className: rt, classNames: it, style: at, styles: q, rowFactory: ot, tableWrapper: st, ...ct }) {
2912
+ let lt = l(() => y ? Cn(y) : g, [g, y]), { refs: J, onScroll: ut } = Bn({
2910
2913
  scrollCallbacks: {
2911
- onScroll: Pe,
2912
- onScrollToTop: H,
2914
+ onScroll: Me,
2915
+ onScrollToTop: Pe,
2913
2916
  onScrollToBottom: Fe,
2914
2917
  onScrollToLeft: Ie,
2915
- onScrollToRight: U
2918
+ onScrollToRight: Le
2916
2919
  },
2917
- withRowBorders: lt.withRowBorders
2918
- }), J = An({
2920
+ withRowBorders: ct.withRowBorders
2921
+ }), Y = jn({
2919
2922
  key: _,
2920
- columns: ut,
2921
- headerRef: q.header,
2922
- scrollViewportRef: q.scrollViewport
2923
- }), ft = J.effectiveColumns, pt = Ne(q.table, Je), mt = Ne(q.scrollViewport, G), ht = u(null), gt = Ne(ht, Ye), _t = qn({
2923
+ columns: lt,
2924
+ headerRef: J.header,
2925
+ scrollViewportRef: J.scrollViewport
2926
+ }), dt = Y.effectiveColumns, ft = Ne(J.table, Xe), pt = Ne(J.scrollViewport, Je), mt = u(null), ht = Ne(mt, G), gt = Jn({
2924
2927
  rowExpansion: We,
2925
2928
  records: T,
2926
2929
  idAccessor: w
2927
- }), { pinnedMap: vt, hasLeftPinned: yt, hasRightPinned: bt } = Bn({
2928
- columns: ft,
2929
- theadRef: q.header,
2930
- tbodyRef: ht,
2931
- selectionColumnHeaderRef: q.selectionColumnHeader,
2930
+ }), { pinnedMap: _t, hasLeftPinned: vt, hasRightPinned: yt } = Vn({
2931
+ columns: dt,
2932
+ theadRef: J.header,
2933
+ tbodyRef: mt,
2934
+ selectionColumnHeaderRef: J.selectionColumnHeader,
2932
2935
  selectionVisible: !!D,
2933
2936
  pinFirstColumn: b,
2934
2937
  pinLastColumn: x
2935
- }), xt = u(!1), St = u(I), Ct = u(T), wt = a((e) => {
2936
- xt.current = !0, Ct.current = T, re(e);
2937
- }, [re, T]);
2938
+ }), bt = u(!1), xt = u(L), St = u(T), Ct = a((e) => {
2939
+ bt.current = !0, St.current = T, ne(e);
2940
+ }, [ne, T]);
2938
2941
  s(() => {
2939
- St.current !== I && (xt.current = !0, Ct.current = T, St.current = I);
2940
- }, [I, T]);
2941
- let Tt = T?.length;
2942
+ xt.current !== L && (bt.current = !0, St.current = T, xt.current = L);
2943
+ }, [L, T]);
2944
+ let wt = T?.length;
2942
2945
  c(() => {
2943
- if (!xt.current || h || T === Ct.current) return;
2944
- let e = q.scrollViewport.current;
2946
+ if (!bt.current || h || T === St.current) return;
2947
+ let e = J.scrollViewport.current;
2945
2948
  if (!e) return;
2946
2949
  let t = requestAnimationFrame(() => {
2947
2950
  e.scrollTo({
2948
2951
  top: 0,
2949
2952
  left: 0
2950
- }), xt.current = !1;
2953
+ }), bt.current = !1;
2951
2954
  });
2952
2955
  return () => cancelAnimationFrame(t);
2953
2956
  }, [
2954
2957
  h,
2955
2958
  T,
2956
- q.scrollViewport
2959
+ J.scrollViewport
2957
2960
  ]);
2958
- let Et = T?.map((e) => Q(e, w)), Dt = !!D, Ot = D?.map((e) => Q(e, w)), kt = Et !== void 0 && Ot !== void 0 && Ot.length > 0, At = j ? T?.filter(j) : T, jt = At?.map((e) => Q(e, w)), Y = kt && jt.every((e) => Ot.includes(e)), Mt = kt && jt.some((e) => Ot.includes(e)), Nt = a(() => {
2959
- D && O && O(Y ? D.filter((e) => !jt.includes(Q(e, w))) : yn([...D, ...At], (e) => Q(e, w)));
2961
+ let Tt = T?.map((e) => Q(e, w)), Et = !!D, Dt = D?.map((e) => Q(e, w)), Ot = Tt !== void 0 && Dt !== void 0 && Dt.length > 0, kt = j ? T?.filter(j) : T, At = kt?.map((e) => Q(e, w)), jt = Ot && At.every((e) => Dt.includes(e)), Mt = Ot && At.some((e) => Dt.includes(e)), Nt = a(() => {
2962
+ D && O && O(jt ? D.filter((e) => !At.includes(Q(e, w))) : bn([...D, ...kt], (e) => Q(e, w)));
2960
2963
  }, [
2961
- Y,
2964
+ jt,
2962
2965
  w,
2963
2966
  O,
2964
- jt,
2965
2967
  At,
2968
+ kt,
2966
2969
  D
2967
- ]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = Vn(Et), It = Dt && !yt, Lt = {
2968
- m: Xe,
2970
+ ]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = Hn(Tt), It = Et && !vt, Lt = {
2971
+ m: K,
2969
2972
  my: Ze,
2970
2973
  mx: Qe,
2971
2974
  mt: $e,
2972
2975
  mb: et,
2973
2976
  ml: tt,
2974
2977
  mr: nt
2975
- }, Rt = a(({ children: e }) => ct ? ct({ children: e }) : e, [ct]);
2976
- return p(dn, {
2977
- ...J,
2978
- pinnedMap: vt,
2978
+ }, Rt = a(({ children: e }) => st ? st({ children: e }) : e, [st]);
2979
+ return p(fn, {
2980
+ ...Y,
2981
+ pinnedMap: _t,
2979
2982
  children: m(v, {
2980
- ref: q.root,
2983
+ ref: J.root,
2981
2984
  ...Lt,
2982
2985
  className: X("mantine-datatable", { "mantine-datatable-with-border": e }, rt, it?.root),
2983
2986
  style: [
2984
2987
  (e) => ({
2985
- ...on({
2988
+ ...sn({
2986
2989
  theme: e,
2987
- c: Le,
2988
- backgroundColor: Re,
2989
- borderColor: ze,
2990
+ c: Re,
2991
+ backgroundColor: ze,
2992
+ borderColor: U,
2990
2993
  rowBorderColor: Be,
2991
2994
  stripedColor: Ve,
2992
- highlightOnHoverColor: He
2995
+ highlightOnHoverColor: W
2993
2996
  }),
2994
2997
  borderRadius: e.radius[t] || t,
2995
2998
  boxShadow: e.shadows[d] || d,
@@ -2998,56 +3001,56 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2998
3001
  maxHeight: o
2999
3002
  }),
3000
3003
  at,
3001
- ot?.root,
3004
+ q?.root,
3002
3005
  { position: "relative" }
3003
3006
  ],
3004
3007
  children: [
3005
- p(Pr, {
3006
- viewportRef: mt,
3007
- leftShadowBehind: Dt || yt,
3008
- rightShadowBehind: bt,
3009
- onScrollPositionChange: dt,
3010
- scrollAreaProps: K,
3011
- children: p(Rt, { children: m(ie, {
3012
- ref: pt,
3013
- horizontalSpacing: F,
3008
+ p(Fr, {
3009
+ viewportRef: pt,
3010
+ leftShadowBehind: Et || vt,
3011
+ rightShadowBehind: yt,
3012
+ onScrollPositionChange: ut,
3013
+ scrollAreaProps: Ye,
3014
+ children: p(Rt, { children: m(z, {
3015
+ ref: ft,
3016
+ horizontalSpacing: I,
3014
3017
  className: X("mantine-datatable-table", {
3015
- [$n]: n,
3018
+ [er]: n,
3016
3019
  "mantine-datatable-vertical-align-top": f === "top",
3017
3020
  "mantine-datatable-vertical-align-bottom": f === "bottom",
3018
- "mantine-datatable-selection-column-visible": Dt,
3019
- "mantine-datatable-resizable-columns": J.hasResizableColumns,
3020
- "mantine-datatable-resize-locked": J.isLocked,
3021
- "mantine-datatable-resizing": J.isResizing
3021
+ "mantine-datatable-selection-column-visible": Et,
3022
+ "mantine-datatable-resizable-columns": Y.hasResizableColumns,
3023
+ "mantine-datatable-resize-locked": Y.isLocked,
3024
+ "mantine-datatable-resizing": Y.isResizing
3022
3025
  }, it?.table),
3023
3026
  style: {
3024
- ...ot?.table,
3025
- ...J.isLocked ? { tableLayout: "fixed" } : null,
3026
- ...J.tableWidth == null ? null : { width: `${J.tableWidth}px` }
3027
+ ...q?.table,
3028
+ ...Y.isLocked ? { tableLayout: "fixed" } : null,
3029
+ ...Y.tableWidth == null ? null : { width: `${Y.tableWidth}px` }
3027
3030
  },
3028
- "data-striped": Tt && Te || void 0,
3029
- "data-highlight-on-hover": we || void 0,
3030
- ...lt,
3031
+ "data-striped": wt && we || void 0,
3032
+ "data-highlight-on-hover": Ce || void 0,
3033
+ ...ct,
3031
3034
  children: [
3032
- Ee ? null : p(dn, {
3033
- ...J,
3034
- pinnedMap: vt,
3035
- children: p(Cr, {
3036
- ref: q.header,
3037
- selectionColumnHeaderRef: q.selectionColumnHeader,
3035
+ Te ? null : p(fn, {
3036
+ ...Y,
3037
+ pinnedMap: _t,
3038
+ children: p(wr, {
3039
+ ref: J.header,
3040
+ selectionColumnHeaderRef: J.selectionColumnHeader,
3038
3041
  className: it?.header,
3039
- style: ot?.header,
3040
- columns: ft,
3042
+ style: q?.header,
3043
+ columns: dt,
3041
3044
  defaultColumnProps: S,
3042
3045
  groups: y,
3043
- pinnedMap: vt,
3044
- sortStatus: P,
3045
- sortIcons: te,
3046
- onSortStatusChange: ne,
3046
+ pinnedMap: _t,
3047
+ sortStatus: ee,
3048
+ sortIcons: F,
3049
+ onSortStatusChange: te,
3047
3050
  selectionTrigger: E,
3048
- selectionVisible: Dt,
3049
- selectionChecked: Y,
3050
- selectionIndeterminate: Mt && !Y,
3051
+ selectionVisible: Et,
3052
+ selectionChecked: jt,
3053
+ selectionIndeterminate: Mt && !jt,
3051
3054
  onSelectionChange: Nt,
3052
3055
  selectionCheckboxProps: {
3053
3056
  ...M,
@@ -3056,41 +3059,41 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3056
3059
  selectorCellShadowVisible: It,
3057
3060
  selectionColumnClassName: k,
3058
3061
  selectionColumnStyle: A,
3059
- withColumnBorders: lt.withColumnBorders
3062
+ withColumnBorders: ct.withColumnBorders
3060
3063
  })
3061
3064
  }),
3062
3065
  p("tbody", {
3063
- ref: gt,
3064
- children: Tt ? T.map((e, t) => {
3065
- let n = Q(e, w), r = Ot?.includes(n) || !1, i;
3066
+ ref: ht,
3067
+ children: wt ? T.map((e, t) => {
3068
+ let n = Q(e, w), r = Dt?.includes(n) || !1, i;
3066
3069
  return O && D && (i = (i) => {
3067
3070
  if (i.nativeEvent.shiftKey && Pt !== null) {
3068
3071
  let e = T.filter(t > Pt ? (e, n) => n >= Pt && n <= t && (j ? j(e, n) : !0) : (e, n) => n >= t && n <= Pt && (j ? j(e, n) : !0));
3069
- O(r ? vn(D, e, (e) => Q(e, w)) : yn([...D, ...e], (e) => Q(e, w)));
3070
- } else O(r ? D.filter((e) => Q(e, w) !== n) : yn([...D, e], (e) => Q(e, w)));
3072
+ O(r ? yn(D, e, (e) => Q(e, w)) : bn([...D, ...e], (e) => Q(e, w)));
3073
+ } else O(r ? D.filter((e) => Q(e, w) !== n) : bn([...D, e], (e) => Q(e, w)));
3071
3074
  Ft(t);
3072
- }), p(Mr, {
3075
+ }), p(Nr, {
3073
3076
  record: e,
3074
3077
  index: t,
3075
- columns: ft,
3078
+ columns: dt,
3076
3079
  defaultColumnProps: S,
3077
- pinnedMap: vt,
3080
+ pinnedMap: _t,
3078
3081
  defaultColumnRender: C,
3079
3082
  selectionTrigger: E,
3080
- selectionVisible: Dt,
3083
+ selectionVisible: Et,
3081
3084
  selectionChecked: r,
3082
3085
  onSelectionChange: i,
3083
3086
  isRecordSelectable: j,
3084
3087
  selectionCheckboxProps: M,
3085
- getSelectionCheckboxProps: ee,
3086
- onClick: De,
3087
- onDoubleClick: Oe,
3088
- onCellClick: Ae,
3089
- onCellDoubleClick: je,
3090
- onContextMenu: ke,
3091
- onCellContextMenu: Me,
3092
- expansion: _t,
3093
- color: W,
3088
+ getSelectionCheckboxProps: P,
3089
+ onClick: Ee,
3090
+ onDoubleClick: De,
3091
+ onCellClick: ke,
3092
+ onCellDoubleClick: Ae,
3093
+ onContextMenu: Oe,
3094
+ onCellContextMenu: je,
3095
+ expansion: gt,
3096
+ color: He,
3094
3097
  backgroundColor: Ue,
3095
3098
  className: Ge,
3096
3099
  style: Ke,
@@ -3099,62 +3102,62 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3099
3102
  selectionColumnClassName: k,
3100
3103
  selectionColumnStyle: A,
3101
3104
  idAccessor: w,
3102
- rowFactory: st
3105
+ rowFactory: ot
3103
3106
  }, n);
3104
- }) : p(fn, {})
3107
+ }) : p(pn, {})
3105
3108
  }),
3106
- ft.some(({ footer: e }) => e) && p(ar, {
3107
- ref: q.footer,
3109
+ dt.some(({ footer: e }) => e) && p(or, {
3110
+ ref: J.footer,
3108
3111
  className: it?.footer,
3109
- style: ot?.footer,
3110
- columns: ft,
3112
+ style: q?.footer,
3113
+ columns: dt,
3111
3114
  defaultColumnProps: S,
3112
- pinnedMap: vt,
3113
- selectionVisible: Dt,
3115
+ pinnedMap: _t,
3116
+ selectionVisible: Et,
3114
3117
  selectorCellShadowVisible: It
3115
3118
  })
3116
3119
  ]
3117
3120
  }) })
3118
3121
  }),
3119
- !!(I && Tt) && p(Or, {
3122
+ !!(L && wt) && p(kr, {
3120
3123
  className: it?.pagination,
3121
- style: ot?.pagination,
3122
- horizontalSpacing: F,
3124
+ style: q?.pagination,
3125
+ horizontalSpacing: I,
3123
3126
  fetching: h,
3124
- page: I,
3125
- onPageChange: wt,
3126
- totalRecords: L,
3127
- recordsPerPage: R,
3128
- onRecordsPerPageChange: ae,
3129
- recordsPerPageOptions: oe,
3130
- recordsPerPageLabel: z,
3127
+ page: L,
3128
+ onPageChange: Ct,
3129
+ totalRecords: R,
3130
+ recordsPerPage: re,
3131
+ onRecordsPerPageChange: ie,
3132
+ recordsPerPageOptions: ae,
3133
+ recordsPerPageLabel: oe,
3131
3134
  paginationWithEdges: se,
3132
3135
  paginationWithControls: ce,
3133
- paginationActiveTextColor: le,
3134
- paginationActiveBackgroundColor: B,
3135
- paginationSize: ue,
3136
- paginationText: de,
3137
- paginationWrapBreakpoint: fe,
3138
- getPaginationControlProps: pe,
3139
- getPaginationItemProps: me,
3140
- noRecordsText: Se,
3141
- loadingText: be,
3142
- recordsLength: Tt,
3143
- renderPagination: V
3136
+ paginationActiveTextColor: B,
3137
+ paginationActiveBackgroundColor: le,
3138
+ paginationSize: V,
3139
+ paginationText: ue,
3140
+ paginationWrapBreakpoint: de,
3141
+ getPaginationControlProps: fe,
3142
+ getPaginationItemProps: pe,
3143
+ noRecordsText: xe,
3144
+ loadingText: ye,
3145
+ recordsLength: wt,
3146
+ renderPagination: me
3144
3147
  }),
3145
- p(wr, {
3148
+ p(Tr, {
3146
3149
  fetching: h,
3147
- backgroundBlur: he,
3148
- customContent: ge,
3149
- size: _e,
3150
- type: ve,
3151
- color: ye
3150
+ backgroundBlur: H,
3151
+ customContent: he,
3152
+ size: ge,
3153
+ type: _e,
3154
+ color: ve
3152
3155
  }),
3153
- p(mn, {
3154
- icon: Ce,
3155
- text: Se,
3156
- active: !h && !Tt,
3157
- children: xe
3156
+ p(hn, {
3157
+ icon: Se,
3158
+ text: xe,
3159
+ active: !h && !wt,
3160
+ children: be
3158
3161
  })
3159
3162
  ]
3160
3163
  })
@@ -3162,26 +3165,26 @@ function Fr({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3162
3165
  }
3163
3166
  //#endregion
3164
3167
  //#region src/DataTable/UpdateModal.tsx
3165
- function Ir({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3166
- let { data: s, isLoading: c } = Ht(i, n, a), { mutateAsync: l, isPending: u, error: d } = Kt(i, n, r);
3167
- return c || !s ? /* @__PURE__ */ m(L, {
3168
+ function Lr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3169
+ let { data: s, isLoading: c } = Ut(i, n, a), { mutateAsync: l, isPending: u, error: d } = qt(i, n, r);
3170
+ return c || !s ? /* @__PURE__ */ m(re, {
3168
3171
  gap: "md",
3169
3172
  children: [
3170
- /* @__PURE__ */ p(re, { height: 40 }),
3171
- Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, t)),
3173
+ /* @__PURE__ */ p(R, { height: 40 }),
3174
+ Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, t)),
3172
3175
  /* @__PURE__ */ m(T, {
3173
3176
  mt: "md",
3174
3177
  justify: "end",
3175
- children: [/* @__PURE__ */ p(re, {
3178
+ children: [/* @__PURE__ */ p(R, {
3176
3179
  width: 100,
3177
3180
  height: 36
3178
- }), /* @__PURE__ */ p(re, {
3181
+ }), /* @__PURE__ */ p(R, {
3179
3182
  width: 100,
3180
3183
  height: 36
3181
3184
  })]
3182
3185
  })
3183
3186
  ]
3184
- }) : /* @__PURE__ */ p(nn, {
3187
+ }) : /* @__PURE__ */ p(rn, {
3185
3188
  fields: e,
3186
3189
  steps: o,
3187
3190
  record: s,
@@ -3199,8 +3202,8 @@ function Ir({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath
3199
3202
  }
3200
3203
  //#endregion
3201
3204
  //#region src/DataTable/DeleteModal.tsx
3202
- function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
3203
- let { mutateAsync: o, isError: c, error: l, isPending: u } = qt(n, e, t), [h, g] = d(i), [v, b] = d(!1), x = v || u;
3205
+ function Rr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, selectedRecords: i, confirmMessage: a }) {
3206
+ let { mutateAsync: o, isError: c, error: l, isPending: u } = Jt(n, e, t), [h, g] = d(i), [v, b] = d(!1), x = v || u;
3204
3207
  return s(() => {
3205
3208
  h.length || r();
3206
3209
  }, [r, h]), h.length ? /* @__PURE__ */ m(f, { children: [
@@ -3210,7 +3213,7 @@ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3210
3213
  title: l.name,
3211
3214
  children: l.message
3212
3215
  }),
3213
- /* @__PURE__ */ p(B, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3216
+ /* @__PURE__ */ p(V, { children: a ? a(h) : h.length === 1 ? `Soll ${h.length} Eintrag wirklich gelöscht werden?` : `Sollen ${h.length} Einträge wirklich gelöscht werden?` }),
3214
3217
  /* @__PURE__ */ m(T, {
3215
3218
  mt: "md",
3216
3219
  justify: "end",
@@ -3237,7 +3240,7 @@ function Lr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3237
3240
  }
3238
3241
  //#endregion
3239
3242
  //#region src/Hooks/usePersistentState.ts
3240
- function Rr(e, t) {
3243
+ function zr(e, t) {
3241
3244
  let n = `use_persistent_storage_${t}`, [r, i] = d(() => {
3242
3245
  try {
3243
3246
  let t = localStorage.getItem(n);
@@ -3255,12 +3258,12 @@ function Rr(e, t) {
3255
3258
  }
3256
3259
  //#endregion
3257
3260
  //#region src/utils/sort.ts
3258
- var zr = [
3261
+ var Br = [
3259
3262
  /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,
3260
3263
  /^\d{4}-\d{2}-\d{2}$/,
3261
3264
  /^\d{1,2}\/\d{1,2}\/\d{4}$/,
3262
3265
  /^\d{1,2}\.\d{1,2}\.\d{4}$/
3263
- ], Br = (e, t) => {
3266
+ ], Vr = (e, t) => {
3264
3267
  let n = e.map((e) => e[t]).filter((e) => e != null && e !== "");
3265
3268
  if (n.length === 0) return "string";
3266
3269
  let r = n.slice(0, 100), i = {
@@ -3276,7 +3279,7 @@ var zr = [
3276
3279
  i.number++;
3277
3280
  return;
3278
3281
  }
3279
- if (zr.some((e) => e.test(t))) {
3282
+ if (Br.some((e) => e.test(t))) {
3280
3283
  let e = new Date(t);
3281
3284
  if (!isNaN(e.getTime())) {
3282
3285
  i.date++;
@@ -3289,7 +3292,7 @@ var zr = [
3289
3292
  let a = i.string + i.number + i.date;
3290
3293
  return i.date / a >= .6 ? "date" : i.number / a >= .6 ? "number" : i.string / a >= .6 ? "string" : "mixed";
3291
3294
  };
3292
- function Vr(e, t) {
3295
+ function Hr(e, t) {
3293
3296
  switch (t) {
3294
3297
  case "date":
3295
3298
  if (typeof e == "string") {
@@ -3305,54 +3308,54 @@ function Vr(e, t) {
3305
3308
  default: return String(e).toLowerCase().trim();
3306
3309
  }
3307
3310
  }
3308
- var Hr = (e, t, n = "asc") => {
3311
+ var Ur = (e, t, n = "asc") => {
3309
3312
  if (!e || e.length === 0) return [];
3310
- let r = Br(e, t);
3313
+ let r = Vr(e, t);
3311
3314
  return [...e].sort((e, i) => {
3312
3315
  let a = e[t], o = i[t], s = a == null || a === "", c = o == null || o === "";
3313
3316
  if (s && c) return 0;
3314
3317
  if (s) return n === "asc" ? -1 : 1;
3315
3318
  if (c) return n === "asc" ? 1 : -1;
3316
- let l = Vr(a, r), u = Vr(o, r);
3319
+ let l = Hr(a, r), u = Hr(o, r);
3317
3320
  return l === null && u === null ? 0 : l === null ? n === "asc" ? 1 : -1 : u === null || l < u ? n === "asc" ? -1 : 1 : l > u ? n === "asc" ? 1 : -1 : 0;
3318
3321
  });
3319
3322
  };
3320
3323
  //#endregion
3321
3324
  //#region src/utils/filter.ts
3322
- function Ur(e) {
3325
+ function Wr(e) {
3323
3326
  return !!e && typeof e == "object" && "id" in e;
3324
3327
  }
3325
- function Wr(e, t) {
3328
+ function Gr(e, t) {
3326
3329
  if (typeof e == "string" || typeof e == "number") return t.includes(String(e));
3327
3330
  if (e && typeof e == "object") {
3328
3331
  let n = e;
3329
- return Ur(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Ur(e) && t.includes(e.id));
3332
+ return Wr(n) && t.includes(n.id) ? !0 : Object.values(n).some((e) => typeof e == "string" && t.includes(e) || Wr(e) && t.includes(e.id));
3330
3333
  }
3331
3334
  return !1;
3332
3335
  }
3333
- function Gr(e, t) {
3334
- return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Wr(e, t)) : Ur(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
3336
+ function Kr(e, t) {
3337
+ return Array.isArray(t) ? Array.isArray(e) ? e.some((e) => Gr(e, t)) : Wr(e) ? t.includes(e.id) : !1 : typeof e == "string" && e.includes(t);
3335
3338
  }
3336
- function Kr(e, [t, n]) {
3339
+ function qr(e, [t, n]) {
3337
3340
  if (!t && !n || typeof e != "string") return !0;
3338
3341
  let r = e.split(" ")[0];
3339
3342
  return t && n ? r >= t && r <= n : t ? r >= t : r <= n;
3340
3343
  }
3341
- function qr(e, t) {
3344
+ function Jr(e, t) {
3342
3345
  if (t.value === void 0) return !0;
3343
3346
  let n = e[t.id];
3344
3347
  switch (t.type) {
3345
- case "query": return Gr(n, t.value);
3346
- case "date": return Kr(n, t.value);
3348
+ case "query": return Kr(n, t.value);
3349
+ case "date": return qr(n, t.value);
3347
3350
  case "boolean": return n === t.value;
3348
3351
  }
3349
3352
  }
3350
- function Jr(e, t) {
3351
- return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => qr(e, t)));
3353
+ function Yr(e, t) {
3354
+ return !t || t.length === 0 ? e : e.filter((e) => t.every((t) => Jr(e, t)));
3352
3355
  }
3353
3356
  //#endregion
3354
3357
  //#region src/DataTable/FieldCard.tsx
3355
- function Yr({ rows: e }) {
3358
+ function Xr({ rows: e }) {
3356
3359
  return /* @__PURE__ */ p(f, { children: e.map((e, t) => /* @__PURE__ */ m(v, { children: [t > 0 && /* @__PURE__ */ p(C, {}), /* @__PURE__ */ m(T, {
3357
3360
  wrap: "nowrap",
3358
3361
  justify: "space-between",
@@ -3360,7 +3363,7 @@ function Yr({ rows: e }) {
3360
3363
  gap: "md",
3361
3364
  py: "xs",
3362
3365
  px: "sm",
3363
- children: [/* @__PURE__ */ p(B, {
3366
+ children: [/* @__PURE__ */ p(V, {
3364
3367
  fw: 700,
3365
3368
  fz: "sm",
3366
3369
  style: { flexShrink: 0 },
@@ -3373,39 +3376,39 @@ function Yr({ rows: e }) {
3373
3376
  })]
3374
3377
  })] }, typeof e.label == "string" ? e.label : t)) });
3375
3378
  }
3376
- function Xr({ rows: e }) {
3379
+ function Zr({ rows: e }) {
3377
3380
  return /* @__PURE__ */ p(v, {
3378
3381
  bg: "var(--mantine-color-gray-light)",
3379
3382
  style: {
3380
3383
  borderRadius: "var(--mantine-radius-md)",
3381
3384
  overflow: "hidden"
3382
3385
  },
3383
- children: /* @__PURE__ */ p(Yr, { rows: e })
3386
+ children: /* @__PURE__ */ p(Xr, { rows: e })
3384
3387
  });
3385
3388
  }
3386
3389
  //#endregion
3387
3390
  //#region src/DataTable/MobileCardList.tsx
3388
- function Zr(e, t) {
3391
+ function Qr(e, t) {
3389
3392
  return t.split(".").reduce((e, t) => {
3390
3393
  if (e && typeof e == "object" && t in e) return e[t];
3391
3394
  }, e);
3392
3395
  }
3393
- function Qr(e, t) {
3396
+ function $r(e, t) {
3394
3397
  let n = t.column;
3395
3398
  if (n.render) return n.render(e, 0);
3396
- let r = Zr(e, n.accessor ?? t.id);
3397
- return r == null ? /* @__PURE__ */ p(B, {
3399
+ let r = Qr(e, n.accessor ?? t.id);
3400
+ return r == null ? /* @__PURE__ */ p(V, {
3398
3401
  c: "dimmed",
3399
3402
  children: "–"
3400
- }) : typeof r == "boolean" ? /* @__PURE__ */ p(B, {
3403
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3401
3404
  fz: "sm",
3402
3405
  children: r ? "Ja" : "Nein"
3403
- }) : /* @__PURE__ */ p(B, {
3406
+ }) : /* @__PURE__ */ p(V, {
3404
3407
  fz: "sm",
3405
3408
  children: String(r)
3406
3409
  });
3407
3410
  }
3408
- function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
3411
+ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, canDelete: o, pagination: s, sort: c, rowExpansion: l }) {
3409
3412
  let [u, _] = d(/* @__PURE__ */ new Set()), y = l?.expanded, b = (e) => y ? y.recordIds.includes(e) : u.has(e), x = (e) => {
3410
3413
  if (y) {
3411
3414
  let { recordIds: t, onRecordIdsChange: n } = y;
@@ -3414,29 +3417,29 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3414
3417
  let n = new Set(t);
3415
3418
  return n.has(e) ? n.delete(e) : n.add(e), n;
3416
3419
  });
3417
- }, w = n.filter((e) => e.list && e.column && !e.column.hidden), D = n.filter((e) => e.column && e.column.filter != null), k = D.filter((e) => e.column.filtering).map((e) => e.id), A = k.length > 0, j = A ? k : D.slice(0, 1).map((e) => e.id), [M, N] = d(!1), te = w.filter((e) => e.column.sortable !== !1).reduce((e, t) => {
3420
+ }, w = n.filter((e) => e.list && e.column && !e.column.hidden), E = n.filter((e) => e.column && e.column.filter != null), O = E.filter((e) => e.column.filtering).map((e) => e.id), A = O.length > 0, j = A ? O : E.slice(0, 1).map((e) => e.id), [M, N] = d(!1), P = w.filter((e) => e.column.sortable !== !1).reduce((e, t) => {
3418
3421
  let n = t.column.accessor ?? t.id;
3419
3422
  return e.some((e) => e.value === n) || e.push({
3420
3423
  value: n,
3421
3424
  label: t.column.title ?? t.id
3422
3425
  }), e;
3423
- }, []), ne = (e, t, n) => {
3426
+ }, []), te = (e, t, n) => {
3424
3427
  r?.({
3425
3428
  record: e,
3426
3429
  index: t,
3427
3430
  event: n
3428
3431
  });
3429
3432
  };
3430
- return /* @__PURE__ */ m(L, {
3433
+ return /* @__PURE__ */ m(re, {
3431
3434
  gap: "sm",
3432
3435
  my: "md",
3433
3436
  children: [
3434
- (c && te.length > 0 || D.length > 0) && /* @__PURE__ */ m(T, {
3437
+ (c && P.length > 0 || E.length > 0) && /* @__PURE__ */ m(T, {
3435
3438
  gap: "xs",
3436
3439
  wrap: "nowrap",
3437
3440
  justify: "flex-end",
3438
- children: [c && te.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(I, {
3439
- data: te,
3441
+ children: [c && P.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ne, {
3442
+ data: P,
3440
3443
  value: c.field,
3441
3444
  onChange: (e) => e && c.onSortChange(e, c.direction),
3442
3445
  allowDeselect: !1,
@@ -3446,14 +3449,14 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3446
3449
  size: "input-sm",
3447
3450
  onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
3448
3451
  children: c.direction === "asc" ? /* @__PURE__ */ p(Ee, { size: 18 }) : /* @__PURE__ */ p(De, { size: 18 })
3449
- })] }), D.length > 0 && /* @__PURE__ */ m(P, {
3452
+ })] }), E.length > 0 && /* @__PURE__ */ m(F, {
3450
3453
  opened: M,
3451
3454
  onChange: N,
3452
3455
  position: "bottom-end",
3453
3456
  withArrow: !0,
3454
3457
  shadow: "md",
3455
3458
  trapFocus: !0,
3456
- children: [/* @__PURE__ */ p(P.Target, { children: /* @__PURE__ */ p(E, {
3459
+ children: [/* @__PURE__ */ p(F.Target, { children: /* @__PURE__ */ p(D, {
3457
3460
  inline: !0,
3458
3461
  disabled: !A,
3459
3462
  color: "green",
@@ -3465,7 +3468,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3465
3468
  "aria-label": "Filter",
3466
3469
  children: /* @__PURE__ */ p(Se, { size: 18 })
3467
3470
  })
3468
- }) }), /* @__PURE__ */ p(P.Dropdown, {
3471
+ }) }), /* @__PURE__ */ p(F.Dropdown, {
3469
3472
  p: 0,
3470
3473
  children: /* @__PURE__ */ p(h, {
3471
3474
  multiple: !0,
@@ -3474,11 +3477,11 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3474
3477
  minWidth: 260,
3475
3478
  maxWidth: 320
3476
3479
  },
3477
- children: D.map((e) => /* @__PURE__ */ m(h.Item, {
3480
+ children: E.map((e) => /* @__PURE__ */ m(h.Item, {
3478
3481
  value: e.id,
3479
3482
  children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
3480
3483
  gap: "xs",
3481
- children: [/* @__PURE__ */ p(B, {
3484
+ children: [/* @__PURE__ */ p(V, {
3482
3485
  fw: 600,
3483
3486
  fz: "sm",
3484
3487
  children: e.column.title ?? e.id
@@ -3494,7 +3497,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3494
3497
  })]
3495
3498
  })]
3496
3499
  }),
3497
- e.length === 0 && /* @__PURE__ */ p(B, {
3500
+ e.length === 0 && /* @__PURE__ */ p(V, {
3498
3501
  c: "dimmed",
3499
3502
  ta: "center",
3500
3503
  py: "xl",
@@ -3513,7 +3516,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3513
3516
  w: "100%",
3514
3517
  style: { cursor: r || c ? "pointer" : "default" },
3515
3518
  onClick: (t) => {
3516
- c && !r ? x(s) : ne(e, n, t);
3519
+ c && !r ? x(s) : te(e, n, t);
3517
3520
  },
3518
3521
  children: [i && i.length > 0 && /* @__PURE__ */ p(T, {
3519
3522
  px: "sm",
@@ -3521,16 +3524,16 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3521
3524
  justify: "flex-end",
3522
3525
  children: (() => {
3523
3526
  let t = i.filter((t) => !(t.label === "Bearbeiten" && a && !a(e) || t.label === "Löschen" && o && !o(e)));
3524
- return t.length === 0 ? null : /* @__PURE__ */ m(O, {
3527
+ return t.length === 0 ? null : /* @__PURE__ */ m(k, {
3525
3528
  shadow: "md",
3526
3529
  position: "bottom-end",
3527
- children: [/* @__PURE__ */ p(O.Target, { children: /* @__PURE__ */ p(g, {
3530
+ children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(g, {
3528
3531
  variant: "subtle",
3529
3532
  color: "gray",
3530
3533
  size: "sm",
3531
3534
  onClick: (e) => e.stopPropagation(),
3532
3535
  children: /* @__PURE__ */ p(xe, { size: 16 })
3533
- }) }), /* @__PURE__ */ p(O.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(O.Item, {
3536
+ }) }), /* @__PURE__ */ p(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(k.Item, {
3534
3537
  leftSection: t.icon,
3535
3538
  onClick: (n) => {
3536
3539
  n.stopPropagation(), t.onClick([e]);
@@ -3539,9 +3542,9 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3539
3542
  }, `card_action_${n}`)) })]
3540
3543
  });
3541
3544
  })()
3542
- }), /* @__PURE__ */ p(Yr, { rows: w.map((t) => ({
3545
+ }), /* @__PURE__ */ p(Xr, { rows: w.map((t) => ({
3543
3546
  label: t.column.title ?? t.id,
3544
- value: Qr(e, t)
3547
+ value: $r(e, t)
3545
3548
  })) })]
3546
3549
  }), c && /* @__PURE__ */ m(S, {
3547
3550
  expanded: u,
@@ -3553,7 +3556,7 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3553
3556
  })]
3554
3557
  }) }, s);
3555
3558
  }),
3556
- s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(L, {
3559
+ s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(re, {
3557
3560
  gap: "xs",
3558
3561
  mt: "sm",
3559
3562
  children: [/* @__PURE__ */ p(T, {
@@ -3567,11 +3570,11 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3567
3570
  }), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
3568
3571
  justify: "center",
3569
3572
  gap: "xs",
3570
- children: [/* @__PURE__ */ p(B, {
3573
+ children: [/* @__PURE__ */ p(V, {
3571
3574
  fz: "xs",
3572
3575
  c: "dimmed",
3573
3576
  children: "Einträge pro Seite:"
3574
- }), /* @__PURE__ */ p(I, {
3577
+ }), /* @__PURE__ */ p(ne, {
3575
3578
  data: s.recordsPerPageOptions.map((e) => ({
3576
3579
  value: String(e),
3577
3580
  label: String(e)
@@ -3589,40 +3592,40 @@ function $r({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3589
3592
  }
3590
3593
  //#endregion
3591
3594
  //#region src/DataTable/DataTable.tsx
3592
- var ei = [
3595
+ var ti = [
3593
3596
  10,
3594
3597
  15,
3595
3598
  50,
3596
3599
  100,
3597
3600
  500
3598
3601
  ];
3599
- function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutationApiPath: a, buttons: o, fields: c, selection: l, pagination: h, filters: b, actions: x, steps: S, defaultSort: C, onSortChange: E, createButtonText: D, queryParams: k, tabs: A, defaultTab: j, activeTab: N, onActiveTabChange: ee, canUpdate: P, canDelete: te, showRefresh: ne = !0, onRefresh: F, autoPoll: I, rowExpansion: R, onRowClick: ie, mobileCards: ae = !1, deleteConfirmMessage: oe, editRecordId: z, onEditRecordIdChange: se }) {
3600
- let [ce, B] = d(j || (A && A.length > 0 ? A[0].value : null)), ue = N === void 0 ? ce : N, de = (e) => {
3601
- N === void 0 && B(e), ee && ee(e);
3602
- }, pe = A?.find((e) => e.value === ue), me = pe?.queryParams || {}, V = pe?.apiPath ?? r, he = pe?.mutationApiPath ?? a ?? V, ge = {
3603
- ...k,
3604
- ...me
3605
- }, _e = ge ? "?" + Object.entries(ge).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", ve = ue ? [...t, ue] : t, { data: xe, isLoading: Se, isError: Ee, isRefetching: De, refetch: ke } = Ut(V + _e, ve), Ae = Jr(Array.isArray(xe) ? xe : [], b), [je, Me] = d(!1), Ne = u(() => {});
3602
+ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, fields: l, selection: h, pagination: b, filters: x, actions: S, steps: C, defaultSort: D, onSortChange: O, createButtonText: A, queryParams: j, tabs: M, defaultTab: P, activeTab: ee, onActiveTabChange: F, canUpdate: te, canDelete: I, showRefresh: L = !0, onRefresh: ne, autoPoll: ie, rowExpansion: z, onRowClick: ae, mobileCards: oe = !1, deleteConfirmMessage: se, editRecordId: ce, onEditRecordIdChange: B }) {
3603
+ let [ue, de] = d(P || (M && M.length > 0 ? M[0].value : null)), pe = ee === void 0 ? ue : ee, me = (e) => {
3604
+ ee === void 0 && de(e), F && F(e);
3605
+ }, H = M?.find((e) => e.value === pe), he = H?.queryParams || {}, ge = H?.apiPath ?? a, _e = H?.mutationApiPath ?? o ?? ge, ve = {
3606
+ ...j,
3607
+ ...he
3608
+ }, xe = ve ? "?" + Object.entries(ve).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", Se = pe ? [...n, pe] : n, { data: Ee, isLoading: De, isError: ke, isRefetching: Ae, refetch: je } = Wt(ge + xe, Se), Me = Yr(Array.isArray(Ee) ? Ee : [], x), [Ne, Pe] = d(!1), Fe = u(() => {});
3606
3609
  s(() => {
3607
- Ne.current = F ?? (() => ke());
3610
+ Fe.current = ne ?? (() => je());
3608
3611
  });
3609
- let Pe = typeof I == "function" ? I(Array.isArray(xe) ? xe : []) : I ?? !1;
3612
+ let Ie = typeof ie == "function" ? ie(Array.isArray(Ee) ? Ee : []) : ie ?? !1;
3610
3613
  s(() => {
3611
- if (!Pe) return;
3614
+ if (!Ie) return;
3612
3615
  let e = setInterval(() => {
3613
- Promise.resolve(Ne.current()).catch(() => {});
3614
- }, Pe);
3616
+ Promise.resolve(Fe.current()).catch(() => {});
3617
+ }, Ie);
3615
3618
  return () => clearInterval(e);
3616
- }, [Pe]);
3617
- let [H, Fe] = d({
3618
- columnAccessor: C?.field ?? c[0].id,
3619
- direction: C?.direction ?? "desc"
3620
- }), Ie = (e) => {
3621
- Fe(e), E && E(String(e.columnAccessor), e.direction);
3622
- }, U = Hr(Ae, H.columnAccessor, H.direction), [Le, Re] = Rr(ei[1], "mantine-table-page-size"), [ze, Be] = d(1), Ve = h ? U.slice((ze - 1) * Le, ze * Le) : U, [He, W] = d([]), Ue = R?.expanded?.recordIds ?? He, We = R?.expanded?.onRecordIdsChange ?? W, Ge = (e) => {
3623
- Ue.includes(e) ? We(Ue.filter((t) => t !== e)) : We(R?.allowMultiple ? [...Ue, e] : [e]);
3624
- }, Ke = c.findIndex((e) => e.list && e.column && !e.column.hidden), qe = R && Ke >= 0 ? c.map((e, t) => {
3625
- if (t !== Ke) return e;
3619
+ }, [Ie]);
3620
+ let [Le, Re] = d({
3621
+ columnAccessor: D?.field ?? l[0].id,
3622
+ direction: D?.direction ?? "desc"
3623
+ }), ze = (e) => {
3624
+ Re(e), O && O(String(e.columnAccessor), e.direction);
3625
+ }, U = Ur(Me, Le.columnAccessor, Le.direction), [Be, Ve] = zr(ti[1], "mantine-table-page-size"), [W, He] = d(1), Ue = b ? U.slice((W - 1) * Be, W * Be) : U, [We, Ge] = d([]), Ke = z?.expanded?.recordIds ?? We, qe = z?.expanded?.onRecordIdsChange ?? Ge, Je = (e) => {
3626
+ Ke.includes(e) ? qe(Ke.filter((t) => t !== e)) : qe(z?.allowMultiple ? [...Ke, e] : [e]);
3627
+ }, Ye = l.findIndex((e) => e.list && e.column && !e.column.hidden), Xe = z && Ye >= 0 ? l.map((e, t) => {
3628
+ if (t !== Ye) return e;
3626
3629
  let n = e.column.render;
3627
3630
  return {
3628
3631
  ...e,
@@ -3632,11 +3635,11 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3632
3635
  gap: "xs",
3633
3636
  wrap: "nowrap",
3634
3637
  align: "center",
3635
- children: [!R.expandable || R.expandable(t) ? /* @__PURE__ */ p(v, {
3638
+ children: [!z.expandable || z.expandable(t) ? /* @__PURE__ */ p(v, {
3636
3639
  component: "span",
3637
3640
  "aria-label": "Aufklappen",
3638
3641
  onClick: (e) => {
3639
- e.stopPropagation(), Ge(t.id);
3642
+ e.stopPropagation(), Je(t.id);
3640
3643
  },
3641
3644
  style: {
3642
3645
  display: "inline-flex",
@@ -3647,43 +3650,43 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3647
3650
  size: 16,
3648
3651
  style: {
3649
3652
  color: "var(--mantine-primary-color-filled)",
3650
- transform: Ue.includes(t.id) ? "rotate(90deg)" : void 0,
3653
+ transform: Ke.includes(t.id) ? "rotate(90deg)" : void 0,
3651
3654
  transition: "transform 200ms ease"
3652
3655
  }
3653
3656
  })
3654
3657
  }) : /* @__PURE__ */ p(v, {
3655
3658
  w: 16,
3656
3659
  style: { flexShrink: 0 }
3657
- }), n ? n(t, r) : String(bn(t, e.column.accessor) ?? "")]
3660
+ }), n ? n(t, r) : String(xn(t, e.column.accessor) ?? "")]
3658
3661
  })
3659
3662
  }
3660
3663
  };
3661
- }) : c, [G, K] = d([]);
3664
+ }) : l, [G, K] = d([]);
3662
3665
  s(() => {
3663
3666
  K([]);
3664
- }, [ue]);
3665
- let [Je, Ye] = d(!1), [Xe, Ze] = d(!1), [Qe, $e] = d(!1), et = u(null);
3667
+ }, [pe]);
3668
+ let [Ze, Qe] = d(!1), [$e, et] = d(!1), [tt, nt] = d(!1), rt = u(null);
3666
3669
  s(() => {
3667
- if (!z) {
3668
- et.current = null;
3670
+ if (!ce) {
3671
+ rt.current = null;
3669
3672
  return;
3670
3673
  }
3671
- if (et.current === z) return;
3672
- let e = U.find((e) => e.id === z);
3673
- e && (et.current = z, K([e]), Ze(!0), se?.(null));
3674
- }, [z, U]);
3675
- let tt = c.some((e) => e.update), nt = c.some((e) => e.delete), rt = [];
3676
- return tt && rt.push({
3674
+ if (rt.current === ce) return;
3675
+ let e = U.find((e) => e.id === ce);
3676
+ e && (rt.current = ce, K([e]), et(!0), B?.(null));
3677
+ }, [ce, U]);
3678
+ let it = l.some((e) => e.update), at = l.some((e) => e.delete), q = [];
3679
+ return it && q.push({
3677
3680
  icon: /* @__PURE__ */ p(we, { size: 14 }),
3678
3681
  label: "Bearbeiten",
3679
3682
  onClick: (e) => {
3680
- K(e), Ze(!0);
3683
+ K(e), et(!0);
3681
3684
  }
3682
- }), x && rt.push(...x), nt && rt.push({
3685
+ }), S && q.push(...S), at && q.push({
3683
3686
  icon: /* @__PURE__ */ p(Oe, { size: 14 }),
3684
3687
  label: "Löschen",
3685
3688
  onClick: (e) => {
3686
- K(e), $e(!0);
3689
+ K(e), nt(!0);
3687
3690
  }
3688
3691
  }), /* @__PURE__ */ m(f, { children: [
3689
3692
  /* @__PURE__ */ m(w, {
@@ -3698,10 +3701,35 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3698
3701
  },
3699
3702
  justify: e ? "space-between" : "flex-end",
3700
3703
  wrap: "wrap",
3701
- children: [e && (typeof e == "string" ? /* @__PURE__ */ p(fe, {
3702
- order: 4,
3703
- children: e
3704
- }) : e), /* @__PURE__ */ m(w, {
3704
+ children: [e && /* @__PURE__ */ m(T, {
3705
+ gap: 6,
3706
+ align: "center",
3707
+ wrap: "nowrap",
3708
+ children: [typeof e == "string" ? /* @__PURE__ */ p(fe, {
3709
+ order: 4,
3710
+ children: e
3711
+ }) : e, t != null && /* @__PURE__ */ m(E, {
3712
+ width: 340,
3713
+ shadow: "md",
3714
+ withArrow: !0,
3715
+ openDelay: 120,
3716
+ closeDelay: 160,
3717
+ position: "top-start",
3718
+ children: [/* @__PURE__ */ p(E.Target, { children: /* @__PURE__ */ p(g, {
3719
+ variant: "subtle",
3720
+ color: "gray",
3721
+ size: "sm",
3722
+ radius: "xl",
3723
+ "aria-label": "Mehr Informationen",
3724
+ children: /* @__PURE__ */ p(Ce, { size: 16 })
3725
+ }) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(V, {
3726
+ component: "div",
3727
+ size: "sm",
3728
+ c: "dimmed",
3729
+ children: t
3730
+ }) })]
3731
+ })]
3732
+ }), /* @__PURE__ */ m(w, {
3705
3733
  align: {
3706
3734
  base: "stretch",
3707
3735
  sm: "center"
@@ -3721,49 +3749,49 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3721
3749
  sm: "auto"
3722
3750
  },
3723
3751
  children: [
3724
- ne && /* @__PURE__ */ p(g, {
3752
+ L && /* @__PURE__ */ p(g, {
3725
3753
  variant: "subtle",
3726
- loading: je,
3754
+ loading: Ne,
3727
3755
  onClick: async () => {
3728
- if (F) {
3729
- Me(!0);
3756
+ if (ne) {
3757
+ Pe(!0);
3730
3758
  try {
3731
- await F();
3759
+ await ne();
3732
3760
  } finally {
3733
- Me(!1);
3761
+ Pe(!1);
3734
3762
  }
3735
- } else ke();
3763
+ } else je();
3736
3764
  },
3737
3765
  "aria-label": "Neuladen",
3738
3766
  children: /* @__PURE__ */ p(Te, {})
3739
3767
  }),
3740
- (c.some((e) => e.update) || l) && (() => {
3741
- let e = c.find((e) => e.update) && (!P || G.length > 0 && P(G[0])), t = c.find((e) => e.delete) && (!te || G.length > 0 && te(G[0])), n = (x ?? []).length > 0, r = e || t || n;
3768
+ (l.some((e) => e.update) || h) && (() => {
3769
+ let e = l.find((e) => e.update) && (!te || G.length > 0 && te(G[0])), t = l.find((e) => e.delete) && (!I || G.length > 0 && I(G[0])), n = (S ?? []).length > 0, r = e || t || n;
3742
3770
  return /* @__PURE__ */ p(v, {
3743
- ...ae ? { visibleFrom: "sm" } : {},
3744
- children: /* @__PURE__ */ m(O, {
3771
+ ...oe ? { visibleFrom: "sm" } : {},
3772
+ children: /* @__PURE__ */ m(k, {
3745
3773
  shadow: "md",
3746
- children: [/* @__PURE__ */ p(O.Target, { children: /* @__PURE__ */ p(y, {
3774
+ children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(y, {
3747
3775
  variant: "outline",
3748
3776
  rightSection: /* @__PURE__ */ p(ye, { size: 14 }),
3749
3777
  disabled: !G.length || !r,
3750
3778
  children: "Aktionen"
3751
- }) }), /* @__PURE__ */ m(O.Dropdown, { children: [
3752
- e && /* @__PURE__ */ p(O.Item, {
3779
+ }) }), /* @__PURE__ */ m(k.Dropdown, { children: [
3780
+ e && /* @__PURE__ */ p(k.Item, {
3753
3781
  leftSection: /* @__PURE__ */ p(we, { size: 14 }),
3754
- onClick: () => Ze(!0),
3782
+ onClick: () => et(!0),
3755
3783
  disabled: G.length !== 1,
3756
3784
  children: "Bearbeiten"
3757
3785
  }),
3758
- (x ?? []).map((e, t) => /* @__PURE__ */ i(O.Item, {
3786
+ (S ?? []).map((e, t) => /* @__PURE__ */ i(k.Item, {
3759
3787
  ...e.icon && { leftSection: e.icon },
3760
3788
  key: `custom_action_${t}`,
3761
3789
  onClick: () => e.onClick(G),
3762
3790
  disabled: e.disabled?.(G) ?? !1
3763
3791
  }, e.label)),
3764
- t && /* @__PURE__ */ p(O.Item, {
3792
+ t && /* @__PURE__ */ p(k.Item, {
3765
3793
  leftSection: /* @__PURE__ */ p(Oe, { size: 14 }),
3766
- onClick: () => $e(!0),
3794
+ onClick: () => nt(!0),
3767
3795
  color: "red",
3768
3796
  children: "Löschen"
3769
3797
  })
@@ -3771,26 +3799,26 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3771
3799
  })
3772
3800
  });
3773
3801
  })(),
3774
- c.find((e) => e.create) && /* @__PURE__ */ p(y, {
3775
- onClick: () => Ye(!0),
3776
- disabled: Se,
3777
- children: D ?? "Erstellen"
3802
+ l.find((e) => e.create) && /* @__PURE__ */ p(y, {
3803
+ onClick: () => Qe(!0),
3804
+ disabled: De,
3805
+ children: A ?? "Erstellen"
3778
3806
  }),
3779
- o
3807
+ c
3780
3808
  ]
3781
3809
  })]
3782
3810
  }),
3783
- A && A.length > 0 && /* @__PURE__ */ p(le, {
3784
- value: ue,
3785
- onChange: de,
3811
+ M && M.length > 0 && /* @__PURE__ */ p(le, {
3812
+ value: pe,
3813
+ onChange: me,
3786
3814
  mt: "md",
3787
- children: /* @__PURE__ */ p(le.List, { children: A.map((e) => /* @__PURE__ */ p(le.Tab, {
3815
+ children: /* @__PURE__ */ p(le.List, { children: M.map((e) => /* @__PURE__ */ p(le.Tab, {
3788
3816
  value: e.value,
3789
3817
  leftSection: e.icon,
3790
3818
  children: e.label
3791
3819
  }, e.value)) })
3792
3820
  }),
3793
- Ee && /* @__PURE__ */ p(_, {
3821
+ ke && /* @__PURE__ */ p(_, {
3794
3822
  mt: "md",
3795
3823
  variant: "light",
3796
3824
  color: "red",
@@ -3798,169 +3826,169 @@ function ti({ title: e, queryKey: t, connectedQueryKeys: n, apiPath: r, mutation
3798
3826
  icon: /* @__PURE__ */ p(Ce, {}),
3799
3827
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3800
3828
  }),
3801
- (Se || De) && /* @__PURE__ */ m(L, {
3829
+ (De || Ae) && /* @__PURE__ */ m(re, {
3802
3830
  my: "md",
3803
- children: [/* @__PURE__ */ p(re, { height: 40 }), [
3831
+ children: [/* @__PURE__ */ p(R, { height: 40 }), [
3804
3832
  ,
3805
3833
  ,
3806
3834
  ,
3807
3835
  ,
3808
3836
  ,
3809
- ].fill(0).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, `skeleton-${t}`))]
3837
+ ].fill(0).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, `skeleton-${t}`))]
3810
3838
  }),
3811
- !Se && !De && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3812
- ...ae ? { visibleFrom: "sm" } : {},
3813
- children: /* @__PURE__ */ p(Fr, {
3839
+ !De && !Ae && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3840
+ ...oe ? { visibleFrom: "sm" } : {},
3841
+ children: /* @__PURE__ */ p(Ir, {
3814
3842
  my: "md",
3815
3843
  striped: !0,
3816
3844
  highlightOnHover: !0,
3817
3845
  minHeight: 150,
3818
- fetching: Ee,
3819
- records: Ve,
3820
- sortStatus: H,
3821
- onSortStatusChange: Ie,
3822
- ...l && {
3846
+ fetching: ke,
3847
+ records: Ue,
3848
+ sortStatus: Le,
3849
+ onSortStatusChange: ze,
3850
+ ...h && {
3823
3851
  selectedRecords: G,
3824
3852
  onSelectedRecordsChange: K
3825
3853
  },
3826
- ...h && Ve.length && {
3854
+ ...b && Ue.length && {
3827
3855
  totalRecords: U.length,
3828
- recordsPerPage: Le,
3829
- onPageChange: Be,
3830
- page: ze,
3831
- recordsPerPageOptions: ei,
3832
- onRecordsPerPageChange: Re,
3856
+ recordsPerPage: Be,
3857
+ onPageChange: He,
3858
+ page: W,
3859
+ recordsPerPageOptions: ti,
3860
+ onRecordsPerPageChange: Ve,
3833
3861
  recordsPerPageLabel: "Einträge pro Seite"
3834
3862
  },
3835
- ...R && { rowExpansion: {
3836
- allowMultiple: R.allowMultiple ?? !1,
3837
- trigger: ie ? "never" : "click",
3838
- content: ({ record: e }) => R.content(e, !1),
3863
+ ...z && { rowExpansion: {
3864
+ allowMultiple: z.allowMultiple ?? !1,
3865
+ trigger: ae ? "never" : "click",
3866
+ content: ({ record: e }) => z.content(e, !1),
3839
3867
  expanded: {
3840
- recordIds: Ue,
3841
- onRecordIdsChange: We
3868
+ recordIds: Ke,
3869
+ onRecordIdsChange: qe
3842
3870
  },
3843
- ...R.expandable && { expandable: ({ record: e }) => R.expandable(e) }
3871
+ ...z.expandable && { expandable: ({ record: e }) => z.expandable(e) }
3844
3872
  } },
3845
- columns: qe.map((e) => e.column),
3873
+ columns: Xe.map((e) => e.column),
3846
3874
  noRecordsText: "Keine Einträge gefunden",
3847
- onRowClick: ie,
3848
- ...ie && { style: { cursor: "pointer" } }
3875
+ onRowClick: ae,
3876
+ ...ae && { style: { cursor: "pointer" } }
3849
3877
  })
3850
- }), ae && /* @__PURE__ */ p(v, {
3878
+ }), oe && /* @__PURE__ */ p(v, {
3851
3879
  hiddenFrom: "sm",
3852
- children: /* @__PURE__ */ p($r, {
3853
- records: Ve,
3854
- fields: qe,
3855
- onRowClick: ie,
3880
+ children: /* @__PURE__ */ p(ei, {
3881
+ records: Ue,
3882
+ fields: Xe,
3883
+ onRowClick: ae,
3856
3884
  sort: {
3857
- field: String(H.columnAccessor),
3858
- direction: H.direction,
3885
+ field: String(Le.columnAccessor),
3886
+ direction: Le.direction,
3859
3887
  onSortChange: (e, t) => {
3860
- Ie({
3888
+ ze({
3861
3889
  columnAccessor: e,
3862
3890
  direction: t
3863
3891
  });
3864
3892
  }
3865
3893
  },
3866
- ...h && Ve.length && { pagination: {
3894
+ ...b && Ue.length && { pagination: {
3867
3895
  totalRecords: U.length,
3868
- recordsPerPage: Le,
3869
- page: ze,
3870
- onPageChange: Be,
3871
- recordsPerPageOptions: ei,
3896
+ recordsPerPage: Be,
3897
+ page: W,
3898
+ onPageChange: He,
3899
+ recordsPerPageOptions: ti,
3872
3900
  onRecordsPerPageChange: (e) => {
3873
- Re(e), Be(1);
3901
+ Ve(e), He(1);
3874
3902
  }
3875
3903
  } },
3876
- ...R && { rowExpansion: {
3877
- content: R.content,
3904
+ ...z && { rowExpansion: {
3905
+ content: z.content,
3878
3906
  expanded: {
3879
- recordIds: Ue,
3880
- onRecordIdsChange: We
3907
+ recordIds: Ke,
3908
+ onRecordIdsChange: qe
3881
3909
  },
3882
- ...R.expandable && { expandable: R.expandable }
3910
+ ...z.expandable && { expandable: z.expandable }
3883
3911
  } },
3884
- ...rt.length > 0 && {
3885
- actions: rt,
3886
- canUpdate: P,
3887
- canDelete: te
3912
+ ...q.length > 0 && {
3913
+ actions: q,
3914
+ canUpdate: te,
3915
+ canDelete: I
3888
3916
  }
3889
3917
  })
3890
3918
  })] }),
3891
- /* @__PURE__ */ p(M, {
3892
- opened: Xe,
3919
+ /* @__PURE__ */ p(N, {
3920
+ opened: $e,
3893
3921
  onClose: () => {
3894
- Ze(!1), K([]);
3922
+ et(!1), K([]);
3895
3923
  },
3896
3924
  title: e ?? "Bearbeiten",
3897
- children: G.length > 0 && /* @__PURE__ */ p(Ir, {
3898
- fields: c.filter((e) => e.update),
3899
- queryKey: t,
3900
- connectedQueryKeys: n,
3901
- apiPath: he,
3925
+ children: G.length > 0 && /* @__PURE__ */ p(Lr, {
3926
+ fields: l.filter((e) => e.update),
3927
+ queryKey: n,
3928
+ connectedQueryKeys: r,
3929
+ apiPath: _e,
3902
3930
  id: G[0].id,
3903
3931
  onClose: () => {
3904
- Ze(!1), K([]);
3932
+ et(!1), K([]);
3905
3933
  },
3906
- steps: S
3934
+ steps: C
3907
3935
  })
3908
3936
  }),
3909
- G.length > 0 && /* @__PURE__ */ p(M, {
3910
- opened: Qe,
3937
+ G.length > 0 && /* @__PURE__ */ p(N, {
3938
+ opened: tt,
3911
3939
  onClose: () => {
3912
- $e(!1), K([]);
3940
+ nt(!1), K([]);
3913
3941
  },
3914
3942
  title: e ?? "Löschen",
3915
- children: /* @__PURE__ */ p(Lr, {
3943
+ children: /* @__PURE__ */ p(Rr, {
3916
3944
  onClose: () => {
3917
- $e(!1), K([]);
3945
+ nt(!1), K([]);
3918
3946
  },
3919
- queryKey: t,
3920
- connectedQueryKeys: n,
3921
- apiPath: he,
3947
+ queryKey: n,
3948
+ connectedQueryKeys: r,
3949
+ apiPath: _e,
3922
3950
  selectedRecords: G,
3923
- confirmMessage: oe
3951
+ confirmMessage: se
3924
3952
  })
3925
3953
  }),
3926
- /* @__PURE__ */ p(M, {
3927
- opened: Je,
3954
+ /* @__PURE__ */ p(N, {
3955
+ opened: Ze,
3928
3956
  onClose: () => {
3929
- Ye(!1);
3957
+ Qe(!1);
3930
3958
  },
3931
3959
  title: e ?? "Anlegen",
3932
- children: /* @__PURE__ */ p(rn, {
3933
- queryKey: t,
3934
- connectedQueryKeys: n,
3935
- apiPath: he,
3960
+ children: /* @__PURE__ */ p(an, {
3961
+ queryKey: n,
3962
+ connectedQueryKeys: r,
3963
+ apiPath: _e,
3936
3964
  onClose: () => {
3937
- Ye(!1);
3965
+ Qe(!1);
3938
3966
  },
3939
- fields: c.filter((e) => e.create),
3940
- steps: S
3967
+ fields: l.filter((e) => e.create),
3968
+ steps: C
3941
3969
  })
3942
3970
  })
3943
3971
  ] });
3944
3972
  }
3945
3973
  //#endregion
3946
3974
  //#region src/DataTable/SubTable.tsx
3947
- function ni({ mobile: e, columns: t, ...n }) {
3948
- return e ? /* @__PURE__ */ p(L, {
3975
+ function ri({ mobile: e, columns: t, ...n }) {
3976
+ return e ? /* @__PURE__ */ p(re, {
3949
3977
  gap: "sm",
3950
3978
  style: { fontVariantNumeric: "tabular-nums" },
3951
3979
  children: (n.records ?? []).map((e, r) => {
3952
3980
  let i = t.filter((t) => !t.hidden && !t.hideOnMobile?.(e)).map((t) => ({
3953
- label: t.title ?? hn(String(t.accessor)),
3954
- value: t.render ? t.render(e, r) : bn(e, t.accessor)
3981
+ label: t.title ?? gn(String(t.accessor)),
3982
+ value: t.render ? t.render(e, r) : xn(e, t.accessor)
3955
3983
  })), a = n.idAccessor ? Q(e, n.idAccessor) : r;
3956
- return /* @__PURE__ */ p(Xr, { rows: i }, a);
3984
+ return /* @__PURE__ */ p(Zr, { rows: i }, a);
3957
3985
  })
3958
- }) : /* @__PURE__ */ p(Fr, {
3986
+ }) : /* @__PURE__ */ p(Ir, {
3959
3987
  columns: t,
3960
3988
  ...n
3961
3989
  });
3962
3990
  }
3963
3991
  //#endregion
3964
- export { rn as CreateModal, ti as DataTable, jt as DataTableProvider, Lr as DeleteModal, Xr as FieldCard, $r as MobileCardList, ni as SubTable, Ir as UpdateModal, Bt as api, zt as createOne, Rt as deleteOne, It as getAll, Lt as getOne, Hr as sortData, Vt as updateOne, Gt as useAddOne, Y as useDataTable, qt as useDeleteOne, Ut as useGetAll, Ht as useGetOne, Rr as usePersistentState, Kt as useUpdateOne };
3992
+ export { an as CreateModal, ni as DataTable, jt as DataTableProvider, Rr as DeleteModal, Zr as FieldCard, ei as MobileCardList, ri as SubTable, Lr as UpdateModal, Vt as api, Bt as createOne, zt as deleteOne, Lt as getAll, Rt as getOne, Ur as sortData, Ht as updateOne, Kt as useAddOne, Mt as useDataTable, Jt as useDeleteOne, Wt as useGetAll, Ut as useGetOne, zr as usePersistentState, qt as useUpdateOne };
3965
3993
 
3966
3994
  //# sourceMappingURL=index.es.js.map