@espresso-lab/mantine-data-table 2.3.3 → 2.3.4

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,13 +1,13 @@
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, 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 re, Stack as ie, Stepper as ae, Table as oe, TableTd as R, TableTfoot as se, TableTh as ce, TableThead as le, TableTr as z, Tabs as ue, Text as B, TextInput as de, Textarea as fe, Title as pe, createSafeContext as me, parseThemeColor as he, rem as ge, useDirection as _e, useMantineTheme as ve } from "@mantine/core";
5
- import { DateInput as ye } from "@mantine/dates";
6
- import { useForm as be } from "@mantine/form";
7
- import { IconCaretDownFilled as xe, IconChevronRight as Se, IconDotsVertical as Ce, IconFilter as we, IconInfoCircle as Te, IconPencil as Ee, IconRefresh as De, IconSortAscending as Oe, IconSortDescending as ke, IconTrash as Ae } from "@tabler/icons-react";
8
- import { useClickOutside as je, useDisclosure as Me, useLocalStorage as Ne, useMediaQuery as Pe, useMergedRef as Fe, useTimeout as Ie } from "@mantine/hooks";
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 ae, TableTd as z, 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 he, useDirection as ge, useMantineTheme as _e } from "@mantine/core";
5
+ import { DateInput as ve } from "@mantine/dates";
6
+ import { useForm as ye } from "@mantine/form";
7
+ import { IconCaretDownFilled as be, IconChevronRight as xe, IconDotsVertical as Se, IconFilter as Ce, IconInfoCircle as we, IconPencil as Te, IconRefresh as Ee, IconSortAscending as De, IconSortDescending as Oe, IconTrash as ke } from "@tabler/icons-react";
8
+ import { useClickOutside as Ae, useDisclosure as je, useLocalStorage as Me, useMediaQuery as Ne, useMergedRef as Pe, useTimeout as Fe } from "@mantine/hooks";
9
9
  //#region node_modules/@tanstack/query-core/build/modern/subscribable.js
10
- var Le = class {
10
+ var Ie = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
13
  }
@@ -21,7 +21,7 @@ var Le = class {
21
21
  }
22
22
  onSubscribe() {}
23
23
  onUnsubscribe() {}
24
- }, Re = new class extends Le {
24
+ }, Le = new class extends Ie {
25
25
  #e;
26
26
  #t;
27
27
  #n;
@@ -58,13 +58,13 @@ var Le = class {
58
58
  isFocused() {
59
59
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
60
60
  }
61
- }(), ze = {
61
+ }(), Re = {
62
62
  setTimeout: (e, t) => setTimeout(e, t),
63
63
  clearTimeout: (e) => clearTimeout(e),
64
64
  setInterval: (e, t) => setInterval(e, t),
65
65
  clearInterval: (e) => clearInterval(e)
66
- }, V = new class {
67
- #e = ze;
66
+ }, H = new class {
67
+ #e = Re;
68
68
  #t = !1;
69
69
  setTimeoutProvider(e) {
70
70
  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.", {
@@ -85,34 +85,34 @@ var Le = class {
85
85
  this.#e.clearInterval(e);
86
86
  }
87
87
  }();
88
- function Be(e) {
88
+ function ze(e) {
89
89
  setTimeout(e, 0);
90
90
  }
91
91
  //#endregion
92
92
  //#region node_modules/@tanstack/query-core/build/modern/utils.js
93
- var Ve = typeof window > "u" || "Deno" in globalThis;
94
- function H() {}
95
- function He(e) {
93
+ var Be = typeof window > "u" || "Deno" in globalThis;
94
+ function U() {}
95
+ function Ve(e) {
96
96
  return typeof e == "number" && e >= 0 && e !== Infinity;
97
97
  }
98
- function Ue(e, t) {
98
+ function He(e, t) {
99
99
  return Math.max(e + (t || 0) - Date.now(), 0);
100
100
  }
101
- function U(e, t) {
101
+ function Ue(e, t) {
102
102
  return typeof e == "function" ? e(t) : e;
103
103
  }
104
104
  function W(e, t) {
105
105
  return typeof e == "function" ? e(t) : e;
106
106
  }
107
107
  function We(e) {
108
- return JSON.stringify(e, (e, t) => Je(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
108
+ return JSON.stringify(e, (e, t) => Ye(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
109
109
  }
110
110
  var Ge = Object.prototype.hasOwnProperty;
111
111
  function Ke(e, t, n = 0) {
112
112
  if (e === t) return e;
113
113
  if (n > 500) return t;
114
- let r = qe(e) && qe(t);
115
- if (!r && !(Je(e) && Je(t))) return t;
114
+ let r = Je(e) && Je(t);
115
+ if (!r && !(Ye(e) && Ye(t))) return t;
116
116
  let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
117
117
  for (let l = 0; l < o; l++) {
118
118
  let o = r ? l : a[l], u = e[o], d = t[o];
@@ -129,25 +129,25 @@ function Ke(e, t, n = 0) {
129
129
  }
130
130
  return i === o && c === i ? e : s;
131
131
  }
132
- function G(e, t) {
132
+ function qe(e, t) {
133
133
  if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
134
134
  for (let n in e) if (e[n] !== t[n]) return !1;
135
135
  return !0;
136
136
  }
137
- function qe(e) {
137
+ function Je(e) {
138
138
  return Array.isArray(e) && e.length === Object.keys(e).length;
139
139
  }
140
- function Je(e) {
141
- if (!Ye(e)) return !1;
140
+ function Ye(e) {
141
+ if (!Xe(e)) return !1;
142
142
  let t = e.constructor;
143
143
  if (t === void 0) return !0;
144
144
  let n = t.prototype;
145
- return !(!Ye(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
145
+ return !(!Xe(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
146
146
  }
147
- function Ye(e) {
147
+ function Xe(e) {
148
148
  return Object.prototype.toString.call(e) === "[object Object]";
149
149
  }
150
- function Xe(e, t, n) {
150
+ function Ze(e, t, n) {
151
151
  if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
152
152
  if (n.structuralSharing !== !1) {
153
153
  if (process.env.NODE_ENV !== "production") try {
@@ -159,13 +159,13 @@ function Xe(e, t, n) {
159
159
  }
160
160
  return t;
161
161
  }
162
- function K(e, t) {
162
+ function Qe(e, t) {
163
163
  return typeof e == "function" ? e(...t) : !!e;
164
164
  }
165
165
  //#endregion
166
166
  //#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
167
- var q = /* @__PURE__ */ (() => {
168
- let e = () => Ve;
167
+ var $e = /* @__PURE__ */ (() => {
168
+ let e = () => Be;
169
169
  return {
170
170
  isServer() {
171
171
  return e();
@@ -177,7 +177,7 @@ var q = /* @__PURE__ */ (() => {
177
177
  })();
178
178
  //#endregion
179
179
  //#region node_modules/@tanstack/query-core/build/modern/thenable.js
180
- function Ze() {
180
+ function et() {
181
181
  let e, t, n = new Promise((n, r) => {
182
182
  e = n, t = r;
183
183
  });
@@ -199,13 +199,13 @@ function Ze() {
199
199
  }
200
200
  //#endregion
201
201
  //#region node_modules/@tanstack/query-core/build/modern/notifyManager.js
202
- var Qe = Be;
203
- function $e() {
202
+ var G = ze;
203
+ function K() {
204
204
  let e = [], t = 0, n = (e) => {
205
205
  e();
206
206
  }, r = (e) => {
207
207
  e();
208
- }, i = Qe, a = (r) => {
208
+ }, i = G, a = (r) => {
209
209
  t ? e.push(r) : i(() => {
210
210
  n(r);
211
211
  });
@@ -247,7 +247,7 @@ function $e() {
247
247
  }
248
248
  };
249
249
  }
250
- var J = $e(), et = new class extends Le {
250
+ var tt = K(), nt = new class extends Ie {
251
251
  #e = !0;
252
252
  #t;
253
253
  #n;
@@ -281,16 +281,16 @@ var J = $e(), et = new class extends Le {
281
281
  }();
282
282
  //#endregion
283
283
  //#region node_modules/@tanstack/query-core/build/modern/retryer.js
284
- function tt(e) {
285
- return (e ?? "online") !== "online" || et.isOnline();
284
+ function rt(e) {
285
+ return (e ?? "online") !== "online" || nt.isOnline();
286
286
  }
287
287
  //#endregion
288
288
  //#region node_modules/@tanstack/query-core/build/modern/query.js
289
- function nt(e, t) {
289
+ function q(e, t) {
290
290
  return {
291
291
  fetchFailureCount: 0,
292
292
  fetchFailureReason: null,
293
- fetchStatus: tt(t.networkMode) ? "fetching" : "paused",
293
+ fetchStatus: rt(t.networkMode) ? "fetching" : "paused",
294
294
  ...e === void 0 && {
295
295
  error: null,
296
296
  status: "pending"
@@ -299,9 +299,9 @@ function nt(e, t) {
299
299
  }
300
300
  //#endregion
301
301
  //#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
302
- var rt = class extends Le {
302
+ var it = class extends Ie {
303
303
  constructor(e, t) {
304
- super(), this.options = t, this.#e = e, this.#s = null, this.#o = Ze(), this.bindMethods(), this.setOptions(t);
304
+ super(), this.options = t, this.#e = e, this.#s = null, this.#o = et(), this.bindMethods(), this.setOptions(t);
305
305
  }
306
306
  #e;
307
307
  #t = void 0;
@@ -339,13 +339,13 @@ var rt = class extends Le {
339
339
  setOptions(e) {
340
340
  let t = this.options, n = this.#t;
341
341
  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 && !G(this.options, t) && this.#e.getQueryCache().notify({
342
+ this.#S(), this.#t.setOptions(this.options), t._defaulted && !qe(this.options, t) && this.#e.getQueryCache().notify({
343
343
  type: "observerOptionsUpdated",
344
344
  query: this.#t,
345
345
  observer: this
346
346
  });
347
347
  let r = this.hasListeners();
348
- r && st(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) || U(this.options.staleTime, this.#t) !== U(t.staleTime, this.#t)) && this.#g();
348
+ r && st(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) || Ue(this.options.staleTime, this.#t) !== Ue(t.staleTime, this.#t)) && this.#g();
349
349
  let i = this.#_();
350
350
  r && (this.#t !== n || W(this.options.enabled, this.#t) !== W(t.enabled, this.#t) || i !== this.#p) && this.#v(i);
351
351
  }
@@ -381,14 +381,14 @@ var rt = class extends Le {
381
381
  #h(e) {
382
382
  this.#S();
383
383
  let t = this.#t.fetch(this.options, e);
384
- return e?.throwOnError || (t = t.catch(H)), t;
384
+ return e?.throwOnError || (t = t.catch(U)), t;
385
385
  }
386
386
  #g() {
387
387
  this.#b();
388
- let e = U(this.options.staleTime, this.#t);
389
- if (q.isServer() || this.#r.isStale || !He(e)) return;
390
- let t = Ue(this.#r.dataUpdatedAt, e) + 1;
391
- this.#d = V.setTimeout(() => {
388
+ let e = Ue(this.options.staleTime, this.#t);
389
+ if ($e.isServer() || this.#r.isStale || !Ve(e)) return;
390
+ let t = He(this.#r.dataUpdatedAt, e) + 1;
391
+ this.#d = H.setTimeout(() => {
392
392
  this.#r.isStale || this.updateResult();
393
393
  }, t);
394
394
  }
@@ -396,18 +396,18 @@ var rt = class extends Le {
396
396
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
397
397
  }
398
398
  #v(e) {
399
- this.#x(), this.#p = e, !(q.isServer() || W(this.options.enabled, this.#t) === !1 || !He(this.#p) || this.#p === 0) && (this.#f = V.setInterval(() => {
400
- (this.options.refetchIntervalInBackground || Re.isFocused()) && this.#h();
399
+ this.#x(), this.#p = e, !($e.isServer() || W(this.options.enabled, this.#t) === !1 || !Ve(this.#p) || this.#p === 0) && (this.#f = H.setInterval(() => {
400
+ (this.options.refetchIntervalInBackground || Le.isFocused()) && this.#h();
401
401
  }, this.#p));
402
402
  }
403
403
  #y() {
404
404
  this.#g(), this.#v(this.#_());
405
405
  }
406
406
  #b() {
407
- this.#d !== void 0 && (V.clearTimeout(this.#d), this.#d = void 0);
407
+ this.#d !== void 0 && (H.clearTimeout(this.#d), this.#d = void 0);
408
408
  }
409
409
  #x() {
410
- this.#f !== void 0 && (V.clearInterval(this.#f), this.#f = void 0);
410
+ this.#f !== void 0 && (H.clearInterval(this.#f), this.#f = void 0);
411
411
  }
412
412
  createResult(e, t) {
413
413
  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;
@@ -415,7 +415,7 @@ var rt = class extends Le {
415
415
  let i = this.hasListeners(), a = !i && at(e, t), o = i && st(e, n, t, r);
416
416
  (a || o) && (l = {
417
417
  ...l,
418
- ...nt(c.data, e.options)
418
+ ...q(c.data, e.options)
419
419
  }), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
420
420
  }
421
421
  let { error: f, errorUpdatedAt: p, status: m } = l;
@@ -423,11 +423,11 @@ var rt = class extends Le {
423
423
  let h = !1;
424
424
  if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
425
425
  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 = Xe(i?.data, e, t), u = !0);
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 = Ze(i?.data, e, t), u = !0);
427
427
  }
428
428
  if (t.select && d !== void 0 && !h) if (i && d === a?.data && t.select === this.#c) d = this.#l;
429
429
  else try {
430
- this.#c = t.select, d = t.select(d), d = Xe(i?.data, d, t), this.#l = d, this.#s = null;
430
+ this.#c = t.select, d = t.select(d), d = Ze(i?.data, d, t), this.#l = d, this.#s = null;
431
431
  } catch (e) {
432
432
  this.#s = e;
433
433
  }
@@ -464,7 +464,7 @@ var rt = class extends Le {
464
464
  let t = x.data !== void 0, r = x.status === "error" && !t, i = (e) => {
465
465
  r ? e.reject(x.error) : t && e.resolve(x.data);
466
466
  }, a = () => {
467
- let e = this.#o = x.promise = Ze();
467
+ let e = this.#o = x.promise = et();
468
468
  i(e);
469
469
  }, o = this.#o;
470
470
  switch (o.status) {
@@ -483,7 +483,7 @@ var rt = class extends Le {
483
483
  }
484
484
  updateResult() {
485
485
  let e = this.#r, t = this.createResult(this.#t, this.options);
486
- this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !G(t, e) && (this.#r = t, this.#C({ listeners: (() => {
486
+ this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#u = this.#t), !qe(t, e) && (this.#r = t, this.#C({ listeners: (() => {
487
487
  if (!e) return !0;
488
488
  let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
489
489
  if (n === "all" || !n && !this.#m.size) return !0;
@@ -504,7 +504,7 @@ var rt = class extends Le {
504
504
  this.updateResult(), this.hasListeners() && this.#y();
505
505
  }
506
506
  #C(e) {
507
- J.batch(() => {
507
+ tt.batch(() => {
508
508
  e.listeners && this.listeners.forEach((e) => {
509
509
  e(this.#r);
510
510
  }), this.#e.getQueryCache().notify({
@@ -514,14 +514,14 @@ var rt = class extends Le {
514
514
  });
515
515
  }
516
516
  };
517
- function it(e, t) {
517
+ function J(e, t) {
518
518
  return W(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && W(t.retryOnMount, e) === !1);
519
519
  }
520
520
  function at(e, t) {
521
- return it(e, t) || e.state.data !== void 0 && ot(e, t, t.refetchOnMount);
521
+ return J(e, t) || e.state.data !== void 0 && ot(e, t, t.refetchOnMount);
522
522
  }
523
523
  function ot(e, t, n) {
524
- if (W(t.enabled, e) !== !1 && U(t.staleTime, e) !== "static") {
524
+ if (W(t.enabled, e) !== !1 && Ue(t.staleTime, e) !== "static") {
525
525
  let r = typeof n == "function" ? n(e) : n;
526
526
  return r === "always" || r !== !1 && ct(e, t);
527
527
  }
@@ -531,10 +531,10 @@ function st(e, t, n, r) {
531
531
  return (e !== t || W(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && ct(e, n);
532
532
  }
533
533
  function ct(e, t) {
534
- return W(t.enabled, e) !== !1 && e.isStaleByTime(U(t.staleTime, e));
534
+ return W(t.enabled, e) !== !1 && e.isStaleByTime(Ue(t.staleTime, e));
535
535
  }
536
536
  function Y(e, t) {
537
- return !G(e.getCurrentResult(), t);
537
+ return !qe(e.getCurrentResult(), t);
538
538
  }
539
539
  //#endregion
540
540
  //#region node_modules/@tanstack/query-core/build/modern/mutation.js
@@ -553,7 +553,7 @@ function lt() {
553
553
  }
554
554
  //#endregion
555
555
  //#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
556
- var ut = class extends Le {
556
+ var ut = class extends Ie {
557
557
  #e;
558
558
  #t = void 0;
559
559
  #n;
@@ -566,7 +566,7 @@ var ut = class extends Le {
566
566
  }
567
567
  setOptions(e) {
568
568
  let t = this.options;
569
- this.options = this.#e.defaultMutationOptions(e), G(this.options, t) || this.#e.getMutationCache().notify({
569
+ this.options = this.#e.defaultMutationOptions(e), qe(this.options, t) || this.#e.getMutationCache().notify({
570
570
  type: "observerOptionsUpdated",
571
571
  mutation: this.#n,
572
572
  observer: this
@@ -600,7 +600,7 @@ var ut = class extends Le {
600
600
  };
601
601
  }
602
602
  #a(e) {
603
- J.batch(() => {
603
+ tt.batch(() => {
604
604
  if (this.#r && this.hasListeners()) {
605
605
  let t = this.#t.variables, n = this.#t.context, r = {
606
606
  client: this.#e,
@@ -663,13 +663,13 @@ function gt() {
663
663
  };
664
664
  }
665
665
  var _t = e.createContext(gt()), vt = () => e.useContext(_t), yt = (e, t, n) => {
666
- let r = n?.state.error && typeof e.throwOnError == "function" ? K(e.throwOnError, [n.state.error, n]) : e.throwOnError;
666
+ let r = n?.state.error && typeof e.throwOnError == "function" ? Qe(e.throwOnError, [n.state.error, n]) : e.throwOnError;
667
667
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
668
668
  }, bt = (t) => {
669
669
  e.useEffect(() => {
670
670
  t.clearReset();
671
671
  }, [t]);
672
- }, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || K(n, [e.error, r])), St = (e) => {
672
+ }, xt = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Qe(n, [e.error, r])), St = (e) => {
673
673
  if (e.suspense) {
674
674
  let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
675
675
  e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
@@ -689,7 +689,7 @@ function Et(t, n, r) {
689
689
  s._optimisticResults = i ? "isRestoring" : l ? "optimistic" : void 0, St(s), yt(s, a, c), bt(a);
690
690
  let u = !o.getQueryCache().get(s.queryHash), [d] = e.useState(() => new n(o, s)), f = d.getOptimisticResult(s), p = !i && l;
691
691
  if (e.useSyncExternalStore(e.useCallback((e) => {
692
- let t = p ? d.subscribe(J.batchCalls(e)) : H;
692
+ let t = p ? d.subscribe(tt.batchCalls(e)) : U;
693
693
  return d.updateResult(), t;
694
694
  }, [d, p]), () => d.getCurrentResult(), () => d.getCurrentResult()), e.useEffect(() => {
695
695
  d.setOptions(s);
@@ -701,14 +701,14 @@ function Et(t, n, r) {
701
701
  query: c,
702
702
  suspense: s.suspense
703
703
  })) throw f.error;
704
- return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !q.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(H).finally(() => {
704
+ return o.getDefaultOptions().queries?._experimental_afterQuery?.(s, f), s.experimental_prefetchInRender && !$e.isServer() && Ct(f, i) && (u ? Tt(s, d, a) : c?.promise)?.catch(U).finally(() => {
705
705
  d.updateResult();
706
706
  }), s.notifyOnChangeProps ? f : d.trackResult(f);
707
707
  }
708
708
  //#endregion
709
709
  //#region node_modules/@tanstack/react-query/build/modern/useQuery.js
710
710
  function Dt(e, t) {
711
- return Et(e, rt, t);
711
+ return Et(e, it, t);
712
712
  }
713
713
  //#endregion
714
714
  //#region node_modules/@tanstack/react-query/build/modern/useMutation.js
@@ -717,10 +717,10 @@ function Ot(t, n) {
717
717
  e.useEffect(() => {
718
718
  i.setOptions(t);
719
719
  }, [i, t]);
720
- let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(J.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
721
- i.mutate(e, t).catch(H);
720
+ let a = e.useSyncExternalStore(e.useCallback((e) => i.subscribe(tt.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), o = e.useCallback((e, t) => {
721
+ i.mutate(e, t).catch(U);
722
722
  }, [i]);
723
- if (a.error && K(i.options.throwOnError, [a.error])) throw a.error;
723
+ if (a.error && Qe(i.options.throwOnError, [a.error])) throw a.error;
724
724
  return {
725
725
  ...a,
726
726
  mutate: o,
@@ -899,7 +899,7 @@ function nn(e, t) {
899
899
  return r.length > 0 ? r.map((e) => e.message).join(", ") : void 0;
900
900
  }
901
901
  function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error: o, onPersist: c, onClose: l }) {
902
- let [u, h] = d(0), [g, v] = d(!1), b = be({
902
+ let [u, h] = d(0), [g, v] = d(!1), b = ye({
903
903
  mode: "uncontrolled",
904
904
  initialValues: Xt(e),
905
905
  validate: Zt(e)
@@ -924,7 +924,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
924
924
  required: n,
925
925
  ...r
926
926
  }, b.key(e.id));
927
- case "date": return /* @__PURE__ */ p(ye, {
927
+ case "date": return /* @__PURE__ */ p(ve, {
928
928
  valueFormat: "DD.MM.YYYY",
929
929
  clearable: !0,
930
930
  label: e.column.title,
@@ -938,7 +938,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
938
938
  required: n,
939
939
  ...b.getInputProps(e.id, { type: "checkbox" })
940
940
  }, b.key(e.id));
941
- case "textarea": return /* @__PURE__ */ p(fe, {
941
+ case "textarea": return /* @__PURE__ */ p(de, {
942
942
  minRows: 3,
943
943
  autosize: !0,
944
944
  label: e.column.title,
@@ -953,7 +953,7 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
953
953
  error: r.error,
954
954
  required: n
955
955
  });
956
- default: return /* @__PURE__ */ p(de, {
956
+ default: return /* @__PURE__ */ p(ue, {
957
957
  type: e.id.includes("email") ? "email" : void 0,
958
958
  label: e.column.title,
959
959
  placeholder: e.placeholder ?? "",
@@ -981,10 +981,10 @@ function rn({ fields: e, steps: t, record: r, recordId: i, submitting: a, error:
981
981
  }
982
982
  E && !D ? h((e) => e + 1) : (b.setInitialValues(t), b.reset(), l());
983
983
  }),
984
- children: [E ? /* @__PURE__ */ p(ae, {
984
+ children: [E ? /* @__PURE__ */ p(ie, {
985
985
  active: u,
986
986
  size: "sm",
987
- children: w.map((e) => /* @__PURE__ */ p(ae.Step, {
987
+ children: w.map((e) => /* @__PURE__ */ p(ie.Step, {
988
988
  ...t?.[e - 1] ? { label: t[e - 1].label } : {},
989
989
  children: k(e)
990
990
  }, e))
@@ -1044,7 +1044,7 @@ function X() {
1044
1044
  //#endregion
1045
1045
  //#region node_modules/mantine-datatable/dist/index.mjs
1046
1046
  function Z(e, t, n) {
1047
- return e ? he({
1047
+ return e ? me({
1048
1048
  color: typeof e == "object" ? e[n] : e,
1049
1049
  theme: t
1050
1050
  }).value : void 0;
@@ -1081,7 +1081,7 @@ function ln({ theme: e, color: t, backgroundColor: n }) {
1081
1081
  "--mantine-datatable-row-background-color-dark": Z(n, e, "dark")
1082
1082
  };
1083
1083
  }
1084
- var [un, dn] = me("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
1084
+ var [un, dn] = pe("useDataTableColumnsContext must be used within DataTableColumnProvider"), fn = (e) => {
1085
1085
  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("");
1086
1086
  return p(un, {
1087
1087
  value: {
@@ -1151,7 +1151,7 @@ function hn({ icon: e, text: t, active: n, children: r }) {
1151
1151
  children: r || m(f, { children: [e || p("div", {
1152
1152
  className: "mantine-datatable-empty-state-icon",
1153
1153
  children: p(mn, {})
1154
- }), p(B, {
1154
+ }), p(V, {
1155
1155
  component: "div",
1156
1156
  size: "sm",
1157
1157
  c: "dimmed",
@@ -1207,7 +1207,7 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1207
1207
  defaultPinned: e.pinned,
1208
1208
  pinnable: !!e.pinnable,
1209
1209
  pinned: e.pinned
1210
- })), [t]), [i, a] = Ne({
1210
+ })), [t]), [i, a] = Me({
1211
1211
  key: e ? `${e}-columns-pinning` : "",
1212
1212
  defaultValue: e ? r : void 0,
1213
1213
  getInitialValueInEffect: n
@@ -1255,7 +1255,7 @@ function Dn({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1255
1255
  };
1256
1256
  }
1257
1257
  function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1258
- let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Ne({
1258
+ let r = l(() => t ? t.map((e) => e.accessor) : [], [t]), [i, a] = Me({
1259
1259
  key: e ? `${e}-columns-order` : "",
1260
1260
  defaultValue: e ? r : void 0,
1261
1261
  getInitialValueInEffect: n
@@ -1298,7 +1298,7 @@ function On({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1298
1298
  };
1299
1299
  }
1300
1300
  function kn({ key: e, columns: t = [], getInitialValueInEffect: n = !0, headerRef: r }) {
1301
- 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] = Ne({
1301
+ 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] = Me({
1302
1302
  key: e ? `${e}-columns-width` : "",
1303
1303
  defaultValue: e ? o() : void 0,
1304
1304
  getInitialValueInEffect: n
@@ -1392,7 +1392,7 @@ function An({ key: e, columns: t = [], getInitialValueInEffect: n = !0 }) {
1392
1392
  defaultToggle: e.defaultToggle || !0,
1393
1393
  toggleable: e.toggleable,
1394
1394
  toggled: e.defaultToggle === void 0 || e.defaultToggle
1395
- })), [t]), [i, a] = Ne({
1395
+ })), [t]), [i, a] = Me({
1396
1396
  key: e ? `${e}-columns-toggle` : "",
1397
1397
  defaultValue: e ? r : void 0,
1398
1398
  getInitialValueInEffect: n
@@ -1599,7 +1599,7 @@ function Bn({ scrollCallbacks: e, withRowBorders: t }) {
1599
1599
  $(r.current, "--mantine-datatable-footer-position", i ? "relative" : "sticky"), $(r.current, "--mantine-datatable-footer-bottom", i ? `${e}px` : "0");
1600
1600
  }
1601
1601
  function c() {
1602
- f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${ge("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
1602
+ f.current.withRowBorders && t.height < n.height ? $(r.current, Ln, `${he("1px")} solid var(--mantine-datatable-border-color)`) : $(r.current, Ln, "unset");
1603
1603
  }
1604
1604
  h.current = c;
1605
1605
  function l() {
@@ -1760,12 +1760,12 @@ function Gn(e, t, { getInitialValueInEffect: n } = { getInitialValueInEffect: !0
1760
1760
  }, [e]), r;
1761
1761
  }
1762
1762
  function Kn(e) {
1763
- let t = ve();
1763
+ let t = _e();
1764
1764
  return Gn(l(() => e.map((e) => (typeof e == "function" ? e(t) : e) ?? ""), [e, t]), l(() => e.map(() => !0), [e]));
1765
1765
  }
1766
1766
  function qn(e) {
1767
- let t = ve();
1768
- return Pe((typeof e == "function" ? e(t) : e) || "", !0);
1767
+ let t = _e();
1768
+ return Ne((typeof e == "function" ? e(t) : e) || "", !0);
1769
1769
  }
1770
1770
  function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
1771
1771
  let r = [];
@@ -1803,7 +1803,7 @@ function Jn({ rowExpansion: e, records: t, idAccessor: n }) {
1803
1803
  }
1804
1804
  }
1805
1805
  function Yn(e, t) {
1806
- let [n, r] = d(e), [i, a] = d(e), o = Ie(() => r(!0), 0), c = Ie(() => a(!1), t || 200);
1806
+ let [n, r] = d(e), [i, a] = d(e), o = Fe(() => r(!0), 0), c = Fe(() => a(!1), t || 200);
1807
1807
  return s(() => {
1808
1808
  e ? (c.clear(), a(!0), o.start()) : (o.clear(), r(!1), c.start());
1809
1809
  }, [
@@ -1817,7 +1817,7 @@ function Yn(e, t) {
1817
1817
  }
1818
1818
  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";
1819
1819
  function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title: i, noWrap: a, ellipsis: o, textAlign: s, width: c }) {
1820
- return qn(r) ? p(ce, {
1820
+ return qn(r) ? p(se, {
1821
1821
  "data-pinned": n?.position,
1822
1822
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
1823
1823
  className: X({
@@ -1844,17 +1844,17 @@ function ir({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, title
1844
1844
  }) : null;
1845
1845
  }
1846
1846
  function ar({ shadowVisible: e }) {
1847
- return p(ce, {
1847
+ return p(se, {
1848
1848
  className: "mantine-datatable-footer-selector-placeholder-cell",
1849
1849
  "data-shadow-visible": e || void 0
1850
1850
  });
1851
1851
  }
1852
1852
  function or({ className: e, style: t, columns: n, defaultColumnProps: r, pinnedMap: i, selectionVisible: a, selectorCellShadowVisible: o, ref: s }) {
1853
- return p(se, {
1853
+ return p(oe, {
1854
1854
  ref: s,
1855
1855
  className: X("mantine-datatable-footer", e),
1856
1856
  style: t,
1857
- children: m(z, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1857
+ children: m(B, { children: [a && p(ar, { shadowVisible: o }), n.map(({ hidden: e, ...t }) => {
1858
1858
  if (e) return null;
1859
1859
  let { accessor: n, visibleMediaQuery: a, textAlign: o, width: s, footer: c, footerClassName: l, footerStyle: u, noWrap: d, ellipsis: f } = {
1860
1860
  ...r,
@@ -1893,7 +1893,7 @@ function sr({ group: { id: e, columns: t, groups: n, title: r, textAlign: i, cla
1893
1893
  n,
1894
1894
  _
1895
1895
  ]), 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);
1896
- return v > 0 ? p(ce, {
1896
+ return v > 0 ? p(se, {
1897
1897
  colSpan: v,
1898
1898
  rowSpan: b > 1 ? b : void 0,
1899
1899
  "data-pinned": s?.position,
@@ -1951,7 +1951,7 @@ function lr() {
1951
1951
  });
1952
1952
  }
1953
1953
  function ur({ children: e, isActive: t, filterPopoverProps: n, filterPopoverDisableClickOutside: r }) {
1954
- let [i, { close: a, toggle: o }] = Me(!1), s = t ? lr : cr, c = je(a);
1954
+ let [i, { close: a, toggle: o }] = je(!1), s = t ? lr : cr, c = Ae(a);
1955
1955
  return r && (c = void 0), m(F, {
1956
1956
  withArrow: !0,
1957
1957
  shadow: "md",
@@ -2136,7 +2136,7 @@ var gr = 50, _r = (e) => {
2136
2136
  let { accessor: t, columnRef: n } = e, [r, i] = d(!1), o = u(0), s = u({
2137
2137
  current: 0,
2138
2138
  next: 0
2139
- }), { dir: c } = _e(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
2139
+ }), { dir: c } = ge(), l = c === "rtl", { setMultipleColumnWidths: f, beginResize: m, endResize: h } = dn(), g = a((e) => {
2140
2140
  if (e.preventDefault(), e.stopPropagation(), !n.current) return;
2141
2141
  let r = n.current, a = r.nextElementSibling;
2142
2142
  for (; a;) {
@@ -2274,34 +2274,34 @@ function br() {
2274
2274
  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 }) {
2275
2275
  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;
2276
2276
  if (!qn(i)) return null;
2277
- let re = a ?? gn(r), ie = typeof re == "string" ? re : void 0, ae = o && S ? (e) => {
2277
+ let R = a ?? gn(r), re = typeof R == "string" ? R : void 0, ie = o && S ? (e) => {
2278
2278
  e?.defaultPrevented || S({
2279
2279
  sortKey: k,
2280
2280
  columnAccessor: r,
2281
2281
  direction: x?.columnAccessor === r ? x.direction === "asc" ? "desc" : "asc" : x?.direction ?? "asc"
2282
2282
  });
2283
- } : void 0, oe = (e) => {
2283
+ } : void 0, ae = (e) => {
2284
2284
  e.stopPropagation(), A(r), I(!1);
2285
- }, R = (e) => {
2285
+ }, z = (e) => {
2286
2286
  e.preventDefault(), j(r), I(!0);
2287
- }, se = () => {
2287
+ }, oe = () => {
2288
2288
  j(r), I(!1), M();
2289
- }, le = () => {
2289
+ }, ce = () => {
2290
2290
  I(!0);
2291
- }, z = () => {
2291
+ }, B = () => {
2292
2292
  I(!1);
2293
- }, ue = (e) => {
2293
+ }, le = (e) => {
2294
2294
  e.stopPropagation(), P(N.map((e) => e.accessor === r ? {
2295
2295
  ...e,
2296
2296
  toggled: !1
2297
2297
  } : e));
2298
- }, B = (e) => {
2298
+ }, V = (e) => {
2299
2299
  F((t) => t.map((t) => t.accessor === r ? {
2300
2300
  ...t,
2301
2301
  pinned: e
2302
2302
  } : t));
2303
2303
  };
2304
- return m(ce, {
2304
+ return m(se, {
2305
2305
  "data-accessor": r,
2306
2306
  "data-pinned": n?.position,
2307
2307
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
@@ -2328,8 +2328,8 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2328
2328
  ],
2329
2329
  role: o ? "button" : void 0,
2330
2330
  tabIndex: o ? 0 : void 0,
2331
- onClick: ae,
2332
- onKeyDown: (e) => e.key === "Enter" && ae?.(),
2331
+ onClick: ie,
2332
+ onKeyDown: (e) => e.key === "Enter" && ie?.(),
2333
2333
  ref: L,
2334
2334
  children: [m(T, {
2335
2335
  className: "mantine-datatable-header-cell-sortable-group",
@@ -2344,11 +2344,11 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2344
2344
  "mantine-datatable-header-cell-drag-over": te
2345
2345
  }),
2346
2346
  draggable: s,
2347
- onDragStart: s ? oe : void 0,
2348
- onDragEnter: s ? le : void 0,
2349
- onDragOver: s ? R : void 0,
2350
- onDrop: s ? se : void 0,
2351
- onDragLeave: s ? z : void 0,
2347
+ onDragStart: s ? ae : void 0,
2348
+ onDragEnter: s ? ce : void 0,
2349
+ onDragOver: s ? z : void 0,
2350
+ onDrop: s ? oe : void 0,
2351
+ onDragLeave: s ? B : void 0,
2352
2352
  children: [s ? p(b, {
2353
2353
  role: "img",
2354
2354
  "aria-label": "Drag column",
@@ -2367,13 +2367,13 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2367
2367
  [nr]: _ === "center",
2368
2368
  [rr]: _ === "right"
2369
2369
  }, Xn, Zn),
2370
- title: ie,
2371
- children: re
2370
+ title: re,
2371
+ children: R
2372
2372
  })]
2373
2373
  }),
2374
2374
  l ? p(hr, {
2375
2375
  currentPinned: ne,
2376
- onPinChange: B
2376
+ onPinChange: V
2377
2377
  }) : null,
2378
2378
  c ? p(b, {
2379
2379
  className: "mantine-datatable-header-cell-toggleable-icon",
@@ -2382,7 +2382,7 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2382
2382
  children: p(g, {
2383
2383
  size: "xs",
2384
2384
  variant: "light",
2385
- onClick: ue,
2385
+ onClick: le,
2386
2386
  children: p(mr, {})
2387
2387
  })
2388
2388
  }) : null,
@@ -2412,7 +2412,7 @@ function xr({ className: e, style: t, pinnedInfo: n, accessor: r, visibleMediaQu
2412
2412
  }
2413
2413
  function Sr({ className: e, style: t, trigger: n, shadowVisible: r, checked: i, indeterminate: a, checkboxProps: o, onChange: s, rowSpan: c, ref: l }) {
2414
2414
  let u = !o.disabled;
2415
- return p(ce, {
2415
+ return p(se, {
2416
2416
  ref: l,
2417
2417
  className: X("mantine-datatable-header-selector-cell", { [Qn]: n === "cell" && u }, e),
2418
2418
  style: t,
@@ -2455,7 +2455,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2455
2455
  checkboxProps: v,
2456
2456
  onChange: _,
2457
2457
  rowSpan: c ? D : void 0
2458
- }) : 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(le, {
2458
+ }) : 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, {
2459
2459
  className: X("mantine-datatable-header", t),
2460
2460
  style: n,
2461
2461
  ref: w,
@@ -2464,7 +2464,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2464
2464
  } : void 0,
2465
2465
  children: [c && Array.from({ length: E }, (e, t) => {
2466
2466
  let n = Tn(c, t);
2467
- return m(z, { children: [t === 0 && O, n.map((e, r) => p(sr, {
2467
+ return m(B, { children: [t === 0 && O, n.map((e, r) => p(sr, {
2468
2468
  group: e,
2469
2469
  pinnedInfo: Cr(e, l),
2470
2470
  maxDepth: E,
@@ -2474,7 +2474,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2474
2474
  withColumnBorders: C,
2475
2475
  totalTableColumns: o.length
2476
2476
  }, e.id))] }, `group-depth-${t}`);
2477
- }), m(z, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2477
+ }), m(B, { children: [!c && O, o.map(({ hidden: e, ...t }, n) => {
2478
2478
  if (e) return null;
2479
2479
  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 } = {
2480
2480
  ...s,
@@ -2511,7 +2511,7 @@ function wr({ selectionColumnHeaderRef: e, className: t, style: n, sortStatus: r
2511
2511
  shadow: "md",
2512
2512
  opened: j,
2513
2513
  onChange: M,
2514
- children: [p(I, { children: ee }), p(te, { children: p(ie, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2514
+ children: [p(I, { children: ee }), p(te, { children: p(re, { children: k.filter((e) => e.toggleable).map((e) => p(T, { children: p(x, {
2515
2515
  classNames: { label: "mantine-datatable-header-column-toggle-checkbox-label" },
2516
2516
  size: "xs",
2517
2517
  label: P[e.accessor],
@@ -2558,16 +2558,16 @@ function Er() {
2558
2558
  });
2559
2559
  }
2560
2560
  var Dr = {
2561
- xs: ge(22),
2562
- sm: ge(26),
2563
- md: ge(32),
2564
- lg: ge(38),
2565
- xl: ge(44)
2561
+ xs: he(22),
2562
+ sm: he(26),
2563
+ md: he(32),
2564
+ lg: he(38),
2565
+ xl: he(44)
2566
2566
  };
2567
2567
  function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, activeBackgroundColor: a, onChange: o }) {
2568
2568
  return m(T, {
2569
2569
  gap: "xs",
2570
- children: [p(B, {
2570
+ children: [p(V, {
2571
2571
  component: "div",
2572
2572
  size: e,
2573
2573
  children: t
@@ -2598,7 +2598,7 @@ function Or({ size: e, label: t, values: n, value: r, activeTextColor: i, active
2598
2598
  }) : void 0],
2599
2599
  disabled: n,
2600
2600
  onClick: () => o(t),
2601
- children: p(B, {
2601
+ children: p(V, {
2602
2602
  component: "div",
2603
2603
  size: e,
2604
2604
  children: t
@@ -2618,8 +2618,8 @@ function kr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2618
2618
  totalRecords: g
2619
2619
  });
2620
2620
  } else O = n ? u : d;
2621
- 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" ? `${ge(w)}rem` : e[w] || w})`), N = {
2622
- Text: (e) => p(B, {
2621
+ 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" ? `${he(w)}rem` : e[w] || w})`), N = {
2622
+ Text: (e) => p(V, {
2623
2623
  component: "div",
2624
2624
  className: "mantine-datatable-pagination-text",
2625
2625
  size: l,
@@ -2688,7 +2688,7 @@ function kr({ className: e, style: t, fetching: n, page: r, onPageChange: i, pag
2688
2688
  });
2689
2689
  }
2690
2690
  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: _ }) {
2691
- return qn(r) ? p(R, {
2691
+ return qn(r) ? p(z, {
2692
2692
  "data-pinned": n?.position,
2693
2693
  "data-pinned-shadow": n?.isBoundary ? n.position : void 0,
2694
2694
  className: X({
@@ -2722,7 +2722,7 @@ function Ar({ className: e, style: t, pinnedInfo: n, visibleMediaQuery: r, recor
2722
2722
  }
2723
2723
  function jr({ open: e, colSpan: t, content: n, collapseProps: r }) {
2724
2724
  let { expanded: i, visible: a } = Yn(e, r?.transitionDuration);
2725
- return a ? m(f, { children: [p(z, {}), p(z, { children: p(R, {
2725
+ return a ? m(f, { children: [p(B, {}), p(B, { children: p(z, {
2726
2726
  className: "mantine-datatable-row-expansion-cell",
2727
2727
  colSpan: t,
2728
2728
  children: p(S, {
@@ -2742,7 +2742,7 @@ function Mr({ className: e, style: t, record: n, index: r, trigger: i, onChange:
2742
2742
  }, d = !l.disabled && !u.disabled, f = (e) => {
2743
2743
  e.stopPropagation(), i === "cell" && d && a?.(e);
2744
2744
  };
2745
- return p(R, {
2745
+ return p(z, {
2746
2746
  className: X("mantine-datatable-row-selector-cell", { [Qn]: i === "cell" && d }, e),
2747
2747
  style: t,
2748
2748
  "data-shadow-visible": o || void 0,
@@ -2839,7 +2839,7 @@ function Nr({ record: e, index: t, columns: n, defaultColumnProps: r, pinnedMap:
2839
2839
  rowProps: P,
2840
2840
  children: M,
2841
2841
  expandedElement: N
2842
- }) : m(f, { children: [p(z, {
2842
+ }) : m(f, { children: [p(B, {
2843
2843
  ...P,
2844
2844
  children: M
2845
2845
  }), N] });
@@ -2906,14 +2906,14 @@ function Fr({ leftShadowBehind: e, rightShadowBehind: t, onScrollPositionChange:
2906
2906
  ]
2907
2907
  });
2908
2908
  }
2909
- 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: re, recordsPerPage: ie, onRecordsPerPageChange: ae, recordsPerPageOptions: R, recordsPerPageLabel: se = "Records per page", paginationWithEdges: ce, paginationWithControls: le, paginationActiveTextColor: z, paginationActiveBackgroundColor: ue, paginationSize: B = "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: he, loaderBackgroundBlur: ge, customLoader: _e, loaderSize: ve, loaderType: ye, loaderColor: be, loadingText: xe = "...", emptyState: Se, noRecordsText: Ce = "No records", noRecordsIcon: we, highlightOnHover: Te, striped: Ee, noHeader: De, onRowClick: Oe, onRowDoubleClick: ke, onRowContextMenu: Ae, onCellClick: je, onCellDoubleClick: Me, onCellContextMenu: Ne, onScroll: Pe, onScrollToTop: Ie, onScrollToBottom: Le, onScrollToLeft: Re, onScrollToRight: ze, c: V, backgroundColor: Be, borderColor: Ve, rowBorderColor: H, stripedColor: He, highlightOnHoverColor: Ue, rowColor: U, rowBackgroundColor: W, rowExpansion: We, rowClassName: Ge, rowStyle: Ke, customRowAttributes: G, scrollViewportRef: qe, scrollAreaProps: Je, tableRef: Ye, bodyRef: Xe, m: K, my: q, mx: Ze, mt: Qe, mb: $e, ml: J, mr: et, className: tt, classNames: nt, style: rt, styles: it, rowFactory: at, tableWrapper: ot, ...st }) {
2909
+ 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: z, 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: 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: Ne, onScrollToTop: Fe, onScrollToBottom: Ie, onScrollToLeft: Le, onScrollToRight: Re, c: H, backgroundColor: ze, borderColor: Be, rowBorderColor: U, stripedColor: Ve, highlightOnHoverColor: He, rowColor: Ue, rowBackgroundColor: W, rowExpansion: We, rowClassName: Ge, rowStyle: Ke, customRowAttributes: qe, scrollViewportRef: Je, scrollAreaProps: Ye, tableRef: Xe, bodyRef: Ze, m: Qe, my: $e, mx: et, mt: G, mb: K, ml: tt, mr: nt, className: rt, classNames: q, style: it, styles: J, rowFactory: at, tableWrapper: ot, ...st }) {
2910
2910
  let ct = l(() => y ? Cn(y) : g, [g, y]), { refs: Y, onScroll: lt } = Bn({
2911
2911
  scrollCallbacks: {
2912
- onScroll: Pe,
2913
- onScrollToTop: Ie,
2914
- onScrollToBottom: Le,
2915
- onScrollToLeft: Re,
2916
- onScrollToRight: ze
2912
+ onScroll: Ne,
2913
+ onScrollToTop: Fe,
2914
+ onScrollToBottom: Ie,
2915
+ onScrollToLeft: Le,
2916
+ onScrollToRight: Re
2917
2917
  },
2918
2918
  withRowBorders: st.withRowBorders
2919
2919
  }), ut = jn({
@@ -2921,7 +2921,7 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2921
2921
  columns: ct,
2922
2922
  headerRef: Y.header,
2923
2923
  scrollViewportRef: Y.scrollViewport
2924
- }), dt = ut.effectiveColumns, ft = Fe(Y.table, Ye), pt = Fe(Y.scrollViewport, qe), mt = u(null), ht = Fe(mt, Xe), gt = Jn({
2924
+ }), dt = ut.effectiveColumns, ft = Pe(Y.table, Xe), pt = Pe(Y.scrollViewport, Je), mt = u(null), ht = Pe(mt, Ze), gt = Jn({
2925
2925
  rowExpansion: We,
2926
2926
  records: T,
2927
2927
  idAccessor: w
@@ -2966,13 +2966,13 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2966
2966
  kt,
2967
2967
  D
2968
2968
  ]), { lastSelectionChangeIndex: Pt, setLastSelectionChangeIndex: Ft } = Hn(Tt), It = Et && !vt, Lt = {
2969
- m: K,
2970
- my: q,
2971
- mx: Ze,
2972
- mt: Qe,
2973
- mb: $e,
2974
- ml: J,
2975
- mr: et
2969
+ m: Qe,
2970
+ my: $e,
2971
+ mx: et,
2972
+ mt: G,
2973
+ mb: K,
2974
+ ml: tt,
2975
+ mr: nt
2976
2976
  }, Rt = a(({ children: e }) => ot ? ot({ children: e }) : e, [ot]);
2977
2977
  return p(fn, {
2978
2978
  ...ut,
@@ -2980,17 +2980,17 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2980
2980
  children: m(v, {
2981
2981
  ref: Y.root,
2982
2982
  ...Lt,
2983
- className: X("mantine-datatable", { "mantine-datatable-with-border": e }, tt, nt?.root),
2983
+ className: X("mantine-datatable", { "mantine-datatable-with-border": e }, rt, q?.root),
2984
2984
  style: [
2985
2985
  (e) => ({
2986
2986
  ...sn({
2987
2987
  theme: e,
2988
- c: V,
2989
- backgroundColor: Be,
2990
- borderColor: Ve,
2991
- rowBorderColor: H,
2992
- stripedColor: He,
2993
- highlightOnHoverColor: Ue
2988
+ c: H,
2989
+ backgroundColor: ze,
2990
+ borderColor: Be,
2991
+ rowBorderColor: U,
2992
+ stripedColor: Ve,
2993
+ highlightOnHoverColor: He
2994
2994
  }),
2995
2995
  borderRadius: e.radius[t] || t,
2996
2996
  boxShadow: e.shadows[d] || d,
@@ -2998,8 +2998,8 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
2998
2998
  minHeight: i,
2999
2999
  maxHeight: o
3000
3000
  }),
3001
- rt,
3002
- it?.root,
3001
+ it,
3002
+ J?.root,
3003
3003
  { position: "relative" }
3004
3004
  ],
3005
3005
  children: [
@@ -3008,8 +3008,8 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3008
3008
  leftShadowBehind: Et || vt,
3009
3009
  rightShadowBehind: yt,
3010
3010
  onScrollPositionChange: lt,
3011
- scrollAreaProps: Je,
3012
- children: p(Rt, { children: m(oe, {
3011
+ scrollAreaProps: Ye,
3012
+ children: p(Rt, { children: m(ae, {
3013
3013
  ref: ft,
3014
3014
  horizontalSpacing: I,
3015
3015
  className: X("mantine-datatable-table", {
@@ -3020,24 +3020,24 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3020
3020
  "mantine-datatable-resizable-columns": ut.hasResizableColumns,
3021
3021
  "mantine-datatable-resize-locked": ut.isLocked,
3022
3022
  "mantine-datatable-resizing": ut.isResizing
3023
- }, nt?.table),
3023
+ }, q?.table),
3024
3024
  style: {
3025
- ...it?.table,
3025
+ ...J?.table,
3026
3026
  ...ut.isLocked ? { tableLayout: "fixed" } : null,
3027
3027
  ...ut.tableWidth == null ? null : { width: `${ut.tableWidth}px` }
3028
3028
  },
3029
- "data-striped": wt && Ee || void 0,
3030
- "data-highlight-on-hover": Te || void 0,
3029
+ "data-striped": wt && Te || void 0,
3030
+ "data-highlight-on-hover": we || void 0,
3031
3031
  ...st,
3032
3032
  children: [
3033
- De ? null : p(fn, {
3033
+ Ee ? null : p(fn, {
3034
3034
  ...ut,
3035
3035
  pinnedMap: _t,
3036
3036
  children: p(wr, {
3037
3037
  ref: Y.header,
3038
3038
  selectionColumnHeaderRef: Y.selectionColumnHeader,
3039
- className: nt?.header,
3040
- style: it?.header,
3039
+ className: q?.header,
3040
+ style: J?.header,
3041
3041
  columns: dt,
3042
3042
  defaultColumnProps: S,
3043
3043
  groups: y,
@@ -3084,18 +3084,18 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3084
3084
  isRecordSelectable: j,
3085
3085
  selectionCheckboxProps: M,
3086
3086
  getSelectionCheckboxProps: P,
3087
- onClick: Oe,
3088
- onDoubleClick: ke,
3089
- onCellClick: je,
3090
- onCellDoubleClick: Me,
3091
- onContextMenu: Ae,
3092
- onCellContextMenu: Ne,
3087
+ onClick: De,
3088
+ onDoubleClick: Oe,
3089
+ onCellClick: Ae,
3090
+ onCellDoubleClick: je,
3091
+ onContextMenu: ke,
3092
+ onCellContextMenu: Me,
3093
3093
  expansion: gt,
3094
- color: U,
3094
+ color: Ue,
3095
3095
  backgroundColor: W,
3096
3096
  className: Ge,
3097
3097
  style: Ke,
3098
- customAttributes: G,
3098
+ customAttributes: qe,
3099
3099
  selectorCellShadowVisible: It,
3100
3100
  selectionColumnClassName: k,
3101
3101
  selectionColumnStyle: A,
@@ -3106,8 +3106,8 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3106
3106
  }),
3107
3107
  dt.some(({ footer: e }) => e) && p(or, {
3108
3108
  ref: Y.footer,
3109
- className: nt?.footer,
3110
- style: it?.footer,
3109
+ className: q?.footer,
3110
+ style: J?.footer,
3111
3111
  columns: dt,
3112
3112
  defaultColumnProps: S,
3113
3113
  pinnedMap: _t,
@@ -3118,44 +3118,44 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3118
3118
  }) })
3119
3119
  }),
3120
3120
  !!(L && wt) && p(kr, {
3121
- className: nt?.pagination,
3122
- style: it?.pagination,
3121
+ className: q?.pagination,
3122
+ style: J?.pagination,
3123
3123
  horizontalSpacing: I,
3124
3124
  fetching: h,
3125
3125
  page: L,
3126
3126
  onPageChange: Ct,
3127
- totalRecords: re,
3128
- recordsPerPage: ie,
3129
- onRecordsPerPageChange: ae,
3130
- recordsPerPageOptions: R,
3131
- recordsPerPageLabel: se,
3132
- paginationWithEdges: ce,
3133
- paginationWithControls: le,
3134
- paginationActiveTextColor: z,
3135
- paginationActiveBackgroundColor: ue,
3136
- paginationSize: B,
3137
- paginationText: de,
3138
- paginationWrapBreakpoint: fe,
3139
- getPaginationControlProps: pe,
3140
- getPaginationItemProps: me,
3141
- noRecordsText: Ce,
3142
- loadingText: xe,
3127
+ totalRecords: R,
3128
+ recordsPerPage: re,
3129
+ onRecordsPerPageChange: ie,
3130
+ recordsPerPageOptions: z,
3131
+ recordsPerPageLabel: oe,
3132
+ paginationWithEdges: se,
3133
+ paginationWithControls: ce,
3134
+ paginationActiveTextColor: B,
3135
+ paginationActiveBackgroundColor: le,
3136
+ paginationSize: V,
3137
+ paginationText: ue,
3138
+ paginationWrapBreakpoint: de,
3139
+ getPaginationControlProps: fe,
3140
+ getPaginationItemProps: pe,
3141
+ noRecordsText: Se,
3142
+ loadingText: be,
3143
3143
  recordsLength: wt,
3144
- renderPagination: he
3144
+ renderPagination: me
3145
3145
  }),
3146
3146
  p(Tr, {
3147
3147
  fetching: h,
3148
- backgroundBlur: ge,
3149
- customContent: _e,
3150
- size: ve,
3151
- type: ye,
3152
- color: be
3148
+ backgroundBlur: he,
3149
+ customContent: ge,
3150
+ size: _e,
3151
+ type: ve,
3152
+ color: ye
3153
3153
  }),
3154
3154
  p(hn, {
3155
- icon: we,
3156
- text: Ce,
3155
+ icon: Ce,
3156
+ text: Se,
3157
3157
  active: !h && !wt,
3158
- children: Se
3158
+ children: xe
3159
3159
  })
3160
3160
  ]
3161
3161
  })
@@ -3165,18 +3165,18 @@ function Ir({ withTableBorder: e, borderRadius: t, textSelectionDisabled: n, hei
3165
3165
  //#region src/DataTable/UpdateModal.tsx
3166
3166
  function Lr({ fields: e, onClose: t, queryKey: n, connectedQueryKeys: r, apiPath: i, id: a, steps: o }) {
3167
3167
  let { data: s, isLoading: c } = Ut(i, n, a), { mutateAsync: l, isPending: u, error: d } = qt(i, n, r);
3168
- return c || !s ? /* @__PURE__ */ m(ie, {
3168
+ return c || !s ? /* @__PURE__ */ m(re, {
3169
3169
  gap: "md",
3170
3170
  children: [
3171
- /* @__PURE__ */ p(re, { height: 40 }),
3172
- Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, t)),
3171
+ /* @__PURE__ */ p(R, { height: 40 }),
3172
+ Array.from({ length: e.length }).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, t)),
3173
3173
  /* @__PURE__ */ m(T, {
3174
3174
  mt: "md",
3175
3175
  justify: "end",
3176
- children: [/* @__PURE__ */ p(re, {
3176
+ children: [/* @__PURE__ */ p(R, {
3177
3177
  width: 100,
3178
3178
  height: 36
3179
- }), /* @__PURE__ */ p(re, {
3179
+ }), /* @__PURE__ */ p(R, {
3180
3180
  width: 100,
3181
3181
  height: 36
3182
3182
  })]
@@ -3211,7 +3211,7 @@ function Rr({ queryKey: e, connectedQueryKeys: t, apiPath: n, onClose: r, select
3211
3211
  title: l.name,
3212
3212
  children: l.message
3213
3213
  }),
3214
- /* @__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?` }),
3214
+ /* @__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?` }),
3215
3215
  /* @__PURE__ */ m(T, {
3216
3216
  mt: "md",
3217
3217
  justify: "end",
@@ -3361,7 +3361,7 @@ function Xr({ rows: e }) {
3361
3361
  gap: "md",
3362
3362
  py: "xs",
3363
3363
  px: "sm",
3364
- children: [/* @__PURE__ */ p(B, {
3364
+ children: [/* @__PURE__ */ p(V, {
3365
3365
  fw: 700,
3366
3366
  fz: "sm",
3367
3367
  style: { flexShrink: 0 },
@@ -3395,13 +3395,13 @@ function $r(e, t) {
3395
3395
  let n = t.column;
3396
3396
  if (n.render) return n.render(e, 0);
3397
3397
  let r = Qr(e, n.accessor ?? t.id);
3398
- return r == null ? /* @__PURE__ */ p(B, {
3398
+ return r == null ? /* @__PURE__ */ p(V, {
3399
3399
  c: "dimmed",
3400
3400
  children: "–"
3401
- }) : typeof r == "boolean" ? /* @__PURE__ */ p(B, {
3401
+ }) : typeof r == "boolean" ? /* @__PURE__ */ p(V, {
3402
3402
  fz: "sm",
3403
3403
  children: r ? "Ja" : "Nein"
3404
- }) : /* @__PURE__ */ p(B, {
3404
+ }) : /* @__PURE__ */ p(V, {
3405
3405
  fz: "sm",
3406
3406
  children: String(r)
3407
3407
  });
@@ -3428,7 +3428,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3428
3428
  event: n
3429
3429
  });
3430
3430
  };
3431
- return /* @__PURE__ */ m(ie, {
3431
+ return /* @__PURE__ */ m(re, {
3432
3432
  gap: "sm",
3433
3433
  my: "md",
3434
3434
  children: [
@@ -3446,7 +3446,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3446
3446
  variant: "filled",
3447
3447
  size: "input-sm",
3448
3448
  onClick: () => c.onSortChange(c.field, c.direction === "asc" ? "desc" : "asc"),
3449
- children: c.direction === "asc" ? /* @__PURE__ */ p(Oe, { size: 18 }) : /* @__PURE__ */ p(ke, { size: 18 })
3449
+ children: c.direction === "asc" ? /* @__PURE__ */ p(De, { size: 18 }) : /* @__PURE__ */ p(Oe, { size: 18 })
3450
3450
  })] }), E.length > 0 && /* @__PURE__ */ m(F, {
3451
3451
  opened: M,
3452
3452
  onChange: N,
@@ -3464,7 +3464,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3464
3464
  size: "input-sm",
3465
3465
  onClick: () => N((e) => !e),
3466
3466
  "aria-label": "Filter",
3467
- children: /* @__PURE__ */ p(we, { size: 18 })
3467
+ children: /* @__PURE__ */ p(Ce, { size: 18 })
3468
3468
  })
3469
3469
  }) }), /* @__PURE__ */ p(F.Dropdown, {
3470
3470
  p: 0,
@@ -3479,7 +3479,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3479
3479
  value: e.id,
3480
3480
  children: [/* @__PURE__ */ p(h.Control, { children: /* @__PURE__ */ m(T, {
3481
3481
  gap: "xs",
3482
- children: [/* @__PURE__ */ p(B, {
3482
+ children: [/* @__PURE__ */ p(V, {
3483
3483
  fw: 600,
3484
3484
  fz: "sm",
3485
3485
  children: e.column.title ?? e.id
@@ -3495,7 +3495,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3495
3495
  })]
3496
3496
  })]
3497
3497
  }),
3498
- e.length === 0 && /* @__PURE__ */ p(B, {
3498
+ e.length === 0 && /* @__PURE__ */ p(V, {
3499
3499
  c: "dimmed",
3500
3500
  ta: "center",
3501
3501
  py: "xl",
@@ -3530,7 +3530,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3530
3530
  color: "gray",
3531
3531
  size: "sm",
3532
3532
  onClick: (e) => e.stopPropagation(),
3533
- children: /* @__PURE__ */ p(Ce, { size: 16 })
3533
+ children: /* @__PURE__ */ p(Se, { size: 16 })
3534
3534
  }) }), /* @__PURE__ */ p(k.Dropdown, { children: t.map((t, n) => /* @__PURE__ */ p(k.Item, {
3535
3535
  leftSection: t.icon,
3536
3536
  onClick: (n) => {
@@ -3554,7 +3554,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3554
3554
  })]
3555
3555
  }) }, s);
3556
3556
  }),
3557
- s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(ie, {
3557
+ s && s.totalRecords > s.recordsPerPage && /* @__PURE__ */ m(re, {
3558
3558
  gap: "xs",
3559
3559
  mt: "sm",
3560
3560
  children: [/* @__PURE__ */ p(T, {
@@ -3568,7 +3568,7 @@ function ei({ records: e, fields: n, onRowClick: r, actions: i, canUpdate: a, ca
3568
3568
  }), s.recordsPerPageOptions && s.onRecordsPerPageChange && /* @__PURE__ */ m(T, {
3569
3569
  justify: "center",
3570
3570
  gap: "xs",
3571
- children: [/* @__PURE__ */ p(B, {
3571
+ children: [/* @__PURE__ */ p(V, {
3572
3572
  fz: "xs",
3573
3573
  c: "dimmed",
3574
3574
  children: "Einträge pro Seite:"
@@ -3597,33 +3597,35 @@ var ti = [
3597
3597
  100,
3598
3598
  500
3599
3599
  ];
3600
- function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, topContent: l, fields: h, selection: b, pagination: x, filters: S, actions: C, steps: D, defaultSort: O, onSortChange: A, createButtonText: j, queryParams: M, tabs: P, defaultTab: ee, activeTab: F, onActiveTabChange: te, canUpdate: I, canDelete: L, showRefresh: ne = !0, onRefresh: ae, autoPoll: oe, rowExpansion: R, onRowClick: se, mobileCards: ce = !1, deleteConfirmMessage: le, editRecordId: z, onEditRecordIdChange: de }) {
3601
- let [fe, me] = d(ee || (P && P.length > 0 ? P[0].value : null)), he = F === void 0 ? fe : F, ge = (e) => {
3602
- F === void 0 && me(e), te && te(e);
3603
- }, _e = P?.find((e) => e.value === he), ve = _e?.queryParams || {}, ye = _e?.apiPath ?? a, be = _e?.mutationApiPath ?? o ?? ye, Ce = {
3600
+ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPath: a, mutationApiPath: o, buttons: c, topContent: l, fields: h, selection: b, pagination: x, filters: S, actions: C, steps: D, defaultSort: O, onSortChange: A, createButtonText: j, queryParams: M, tabs: P, defaultTab: ee, activeTab: F, onActiveTabChange: te, canUpdate: I, canDelete: L, showRefresh: ne = !0, onRefresh: ie, autoPoll: ae, rowExpansion: z, onRowClick: oe, mobileCards: se = !1, deleteConfirmMessage: ce, editRecordId: B, onEditRecordIdChange: ue }) {
3601
+ let [de, pe] = d(ee || (P && P.length > 0 ? P[0].value : null)), me = F === void 0 ? de : F, he = (e) => {
3602
+ F === void 0 && pe(e), te && te(e);
3603
+ }, ge = P?.find((e) => e.value === me), _e = ge?.queryParams || {}, ve = ge?.apiPath ?? a, ye = ge?.mutationApiPath ?? o ?? ve, Se = {
3604
3604
  ...M,
3605
- ...ve
3606
- }, we = Ce ? "?" + Object.entries(Ce).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", Oe = he ? [...n, he] : n, { data: ke, isLoading: je, isError: Me, isRefetching: Ne, refetch: Pe } = Wt(ye + we, Oe), Fe = Yr(Array.isArray(ke) ? ke : [], S), [Ie, Le] = d(!1), Re = u(() => {});
3605
+ ..._e
3606
+ }, Ce = Se ? "?" + Object.entries(Se).filter(([, e]) => e != null).map(([e, t]) => `${e}=${encodeURIComponent(t ?? "")}`).join("&") : "", De = me ? [...n, me] : n, { data: Oe, isLoading: Ae, isError: je, isRefetching: Me, refetch: Ne } = Wt(ve + Ce, De), Pe = Yr(Array.isArray(Oe) ? Oe : [], S), [Fe, Ie] = d(!1), Le = u(() => {});
3607
3607
  s(() => {
3608
- Re.current = ae ?? (() => Pe());
3608
+ Le.current = ie ?? (() => Ne());
3609
3609
  });
3610
- let ze = typeof oe == "function" ? oe(Array.isArray(ke) ? ke : []) : oe ?? !1;
3610
+ let Re = typeof ae == "function" ? ae(Array.isArray(Oe) ? Oe : []) : ae ?? !1;
3611
3611
  s(() => {
3612
- if (!ze) return;
3612
+ if (!Re) return;
3613
3613
  let e = setInterval(() => {
3614
- Promise.resolve(Re.current()).catch(() => {});
3615
- }, ze);
3614
+ Promise.resolve(Le.current()).catch(() => {});
3615
+ }, Re);
3616
3616
  return () => clearInterval(e);
3617
- }, [ze]);
3618
- let [V, Be] = d({
3617
+ }, [Re]);
3618
+ let [H, ze] = d({
3619
3619
  columnAccessor: O?.field ?? h[0].id,
3620
3620
  direction: O?.direction ?? "desc"
3621
- }), Ve = (e) => {
3622
- Be(e), A && A(String(e.columnAccessor), e.direction);
3623
- }, H = Ur(Fe, V.columnAccessor, V.direction), [He, Ue] = zr(ti[1], "mantine-table-page-size"), [U, W] = d(1), We = x ? H.slice((U - 1) * He, U * He) : H, [Ge, Ke] = d([]), G = R?.expanded?.recordIds ?? Ge, qe = R?.expanded?.onRecordIdsChange ?? Ke, Je = (e) => {
3624
- G.includes(e) ? qe(G.filter((t) => t !== e)) : qe(R?.allowMultiple ? [...G, e] : [e]);
3625
- }, Ye = h.findIndex((e) => e.list && e.column && !e.column.hidden), Xe = R && Ye >= 0 ? h.map((e, t) => {
3626
- if (t !== Ye) return e;
3621
+ }), Be = (e) => {
3622
+ ze(e), A && A(String(e.columnAccessor), e.direction);
3623
+ }, U = Ur(Pe, H.columnAccessor, H.direction), [Ve, He] = zr(ti[1], "mantine-table-page-size"), [Ue, W] = d(1), We = Math.max(1, Math.ceil(U.length / Ve)), Ge = Math.min(Ue, We), Ke = (e) => {
3624
+ He(e), W(1);
3625
+ }, qe = x ? U.slice((Ge - 1) * Ve, Ge * Ve) : U, [Je, Ye] = d([]), Xe = z?.expanded?.recordIds ?? Je, Ze = z?.expanded?.onRecordIdsChange ?? Ye, Qe = (e) => {
3626
+ Xe.includes(e) ? Ze(Xe.filter((t) => t !== e)) : Ze(z?.allowMultiple ? [...Xe, e] : [e]);
3627
+ }, $e = h.findIndex((e) => e.list && e.column && !e.column.hidden), et = z && $e >= 0 ? h.map((e, t) => {
3628
+ if (t !== $e) return e;
3627
3629
  let n = e.column.render;
3628
3630
  return {
3629
3631
  ...e,
@@ -3633,22 +3635,22 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3633
3635
  gap: "xs",
3634
3636
  wrap: "nowrap",
3635
3637
  align: "center",
3636
- children: [!R.expandable || R.expandable(t) ? /* @__PURE__ */ p(v, {
3638
+ children: [!z.expandable || z.expandable(t) ? /* @__PURE__ */ p(v, {
3637
3639
  component: "span",
3638
3640
  "aria-label": "Aufklappen",
3639
3641
  onClick: (e) => {
3640
- e.stopPropagation(), Je(t.id);
3642
+ e.stopPropagation(), Qe(t.id);
3641
3643
  },
3642
3644
  style: {
3643
3645
  display: "inline-flex",
3644
3646
  flexShrink: 0,
3645
3647
  cursor: "pointer"
3646
3648
  },
3647
- children: /* @__PURE__ */ p(Se, {
3649
+ children: /* @__PURE__ */ p(xe, {
3648
3650
  size: 16,
3649
3651
  style: {
3650
3652
  color: "var(--mantine-primary-color-filled)",
3651
- transform: G.includes(t.id) ? "rotate(90deg)" : void 0,
3653
+ transform: Xe.includes(t.id) ? "rotate(90deg)" : void 0,
3652
3654
  transition: "transform 200ms ease"
3653
3655
  }
3654
3656
  })
@@ -3659,32 +3661,32 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3659
3661
  })
3660
3662
  }
3661
3663
  };
3662
- }) : h, [K, q] = d([]);
3664
+ }) : h, [G, K] = d([]);
3663
3665
  s(() => {
3664
- q([]);
3665
- }, [he]);
3666
- let [Ze, Qe] = d(!1), [$e, J] = d(!1), [et, tt] = d(!1), nt = u(null);
3666
+ K([]);
3667
+ }, [me]);
3668
+ let [tt, nt] = d(!1), [rt, q] = d(!1), [it, J] = d(!1), at = u(null);
3667
3669
  s(() => {
3668
- if (!z) {
3669
- nt.current = null;
3670
+ if (!B) {
3671
+ at.current = null;
3670
3672
  return;
3671
3673
  }
3672
- if (nt.current === z) return;
3673
- let e = H.find((e) => e.id === z);
3674
- e && (nt.current = z, q([e]), J(!0), de?.(null));
3675
- }, [z, H]);
3676
- let rt = h.some((e) => e.update), it = h.some((e) => e.delete), at = [];
3677
- return rt && at.push({
3678
- icon: /* @__PURE__ */ p(Ee, { size: 14 }),
3674
+ if (at.current === B) return;
3675
+ let e = U.find((e) => e.id === B);
3676
+ e && (at.current = B, K([e]), q(!0), ue?.(null));
3677
+ }, [B, U]);
3678
+ let ot = h.some((e) => e.update), st = h.some((e) => e.delete), ct = [];
3679
+ return ot && ct.push({
3680
+ icon: /* @__PURE__ */ p(Te, { size: 14 }),
3679
3681
  label: "Bearbeiten",
3680
3682
  onClick: (e) => {
3681
- q(e), J(!0);
3683
+ K(e), q(!0);
3682
3684
  }
3683
- }), C && at.push(...C), it && at.push({
3684
- icon: /* @__PURE__ */ p(Ae, { size: 14 }),
3685
+ }), C && ct.push(...C), st && ct.push({
3686
+ icon: /* @__PURE__ */ p(ke, { size: 14 }),
3685
3687
  label: "Löschen",
3686
3688
  onClick: (e) => {
3687
- q(e), tt(!0);
3689
+ K(e), J(!0);
3688
3690
  }
3689
3691
  }), /* @__PURE__ */ m(f, { children: [
3690
3692
  /* @__PURE__ */ m(w, {
@@ -3703,7 +3705,7 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3703
3705
  gap: 6,
3704
3706
  align: "center",
3705
3707
  wrap: "nowrap",
3706
- children: [typeof e == "string" ? /* @__PURE__ */ p(pe, {
3708
+ children: [typeof e == "string" ? /* @__PURE__ */ p(fe, {
3707
3709
  order: 4,
3708
3710
  children: e
3709
3711
  }) : e, t != null && /* @__PURE__ */ m(E, {
@@ -3719,8 +3721,8 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3719
3721
  size: "sm",
3720
3722
  radius: "xl",
3721
3723
  "aria-label": "Mehr Informationen",
3722
- children: /* @__PURE__ */ p(Te, { size: 16 })
3723
- }) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(B, {
3724
+ children: /* @__PURE__ */ p(we, { size: 16 })
3725
+ }) }), /* @__PURE__ */ p(E.Dropdown, { children: /* @__PURE__ */ p(V, {
3724
3726
  component: "div",
3725
3727
  size: "sm",
3726
3728
  c: "dimmed",
@@ -3749,47 +3751,47 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3749
3751
  children: [
3750
3752
  ne && /* @__PURE__ */ p(g, {
3751
3753
  variant: "subtle",
3752
- loading: Ie,
3754
+ loading: Fe,
3753
3755
  onClick: async () => {
3754
- if (ae) {
3755
- Le(!0);
3756
+ if (ie) {
3757
+ Ie(!0);
3756
3758
  try {
3757
- await ae();
3759
+ await ie();
3758
3760
  } finally {
3759
- Le(!1);
3761
+ Ie(!1);
3760
3762
  }
3761
- } else Pe();
3763
+ } else Ne();
3762
3764
  },
3763
3765
  "aria-label": "Neuladen",
3764
- children: /* @__PURE__ */ p(De, {})
3766
+ children: /* @__PURE__ */ p(Ee, {})
3765
3767
  }),
3766
3768
  (h.some((e) => e.update) || b) && (() => {
3767
- let e = h.find((e) => e.update) && (!I || K.length > 0 && I(K[0])), t = h.find((e) => e.delete) && (!L || K.length > 0 && L(K[0])), n = (C ?? []).length > 0, r = e || t || n;
3769
+ let e = h.find((e) => e.update) && (!I || G.length > 0 && I(G[0])), t = h.find((e) => e.delete) && (!L || G.length > 0 && L(G[0])), n = (C ?? []).length > 0, r = e || t || n;
3768
3770
  return /* @__PURE__ */ p(v, {
3769
- ...ce ? { visibleFrom: "sm" } : {},
3771
+ ...se ? { visibleFrom: "sm" } : {},
3770
3772
  children: /* @__PURE__ */ m(k, {
3771
3773
  shadow: "md",
3772
3774
  children: [/* @__PURE__ */ p(k.Target, { children: /* @__PURE__ */ p(y, {
3773
3775
  variant: "outline",
3774
- rightSection: /* @__PURE__ */ p(xe, { size: 14 }),
3775
- disabled: !K.length || !r,
3776
+ rightSection: /* @__PURE__ */ p(be, { size: 14 }),
3777
+ disabled: !G.length || !r,
3776
3778
  children: "Aktionen"
3777
3779
  }) }), /* @__PURE__ */ m(k.Dropdown, { children: [
3778
3780
  e && /* @__PURE__ */ p(k.Item, {
3779
- leftSection: /* @__PURE__ */ p(Ee, { size: 14 }),
3780
- onClick: () => J(!0),
3781
- disabled: K.length !== 1,
3781
+ leftSection: /* @__PURE__ */ p(Te, { size: 14 }),
3782
+ onClick: () => q(!0),
3783
+ disabled: G.length !== 1,
3782
3784
  children: "Bearbeiten"
3783
3785
  }),
3784
3786
  (C ?? []).map((e, t) => /* @__PURE__ */ i(k.Item, {
3785
3787
  ...e.icon && { leftSection: e.icon },
3786
3788
  key: `custom_action_${t}`,
3787
- onClick: () => e.onClick(K),
3788
- disabled: e.disabled?.(K) ?? !1
3789
+ onClick: () => e.onClick(G),
3790
+ disabled: e.disabled?.(G) ?? !1
3789
3791
  }, e.label)),
3790
3792
  t && /* @__PURE__ */ p(k.Item, {
3791
- leftSection: /* @__PURE__ */ p(Ae, { size: 14 }),
3792
- onClick: () => tt(!0),
3793
+ leftSection: /* @__PURE__ */ p(ke, { size: 14 }),
3794
+ onClick: () => J(!0),
3793
3795
  color: "red",
3794
3796
  children: "Löschen"
3795
3797
  })
@@ -3798,8 +3800,8 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3798
3800
  });
3799
3801
  })(),
3800
3802
  h.find((e) => e.create) && /* @__PURE__ */ p(y, {
3801
- onClick: () => Qe(!0),
3802
- disabled: je,
3803
+ onClick: () => nt(!0),
3804
+ disabled: Ae,
3803
3805
  children: j ?? "Erstellen"
3804
3806
  }),
3805
3807
  c
@@ -3807,36 +3809,36 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3807
3809
  })]
3808
3810
  }),
3809
3811
  l,
3810
- P && P.length > 0 && /* @__PURE__ */ p(ue, {
3811
- value: he,
3812
- onChange: ge,
3812
+ P && P.length > 0 && /* @__PURE__ */ p(le, {
3813
+ value: me,
3814
+ onChange: he,
3813
3815
  mt: "md",
3814
- children: /* @__PURE__ */ p(ue.List, { children: P.map((e) => /* @__PURE__ */ p(ue.Tab, {
3816
+ children: /* @__PURE__ */ p(le.List, { children: P.map((e) => /* @__PURE__ */ p(le.Tab, {
3815
3817
  value: e.value,
3816
3818
  leftSection: e.icon,
3817
3819
  children: e.label
3818
3820
  }, e.value)) })
3819
3821
  }),
3820
- Me && /* @__PURE__ */ p(_, {
3822
+ je && /* @__PURE__ */ p(_, {
3821
3823
  mt: "md",
3822
3824
  variant: "light",
3823
3825
  color: "red",
3824
3826
  title: "Es ist ein Fehler aufgetreten.",
3825
- icon: /* @__PURE__ */ p(Te, {}),
3827
+ icon: /* @__PURE__ */ p(we, {}),
3826
3828
  children: "Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."
3827
3829
  }),
3828
- (je || Ne) && /* @__PURE__ */ m(ie, {
3830
+ (Ae || Me) && /* @__PURE__ */ m(re, {
3829
3831
  my: "md",
3830
- children: [/* @__PURE__ */ p(re, { height: 40 }), [
3832
+ children: [/* @__PURE__ */ p(R, { height: 40 }), [
3831
3833
  ,
3832
3834
  ,
3833
3835
  ,
3834
3836
  ,
3835
3837
  ,
3836
- ].fill(0).map((e, t) => /* @__PURE__ */ p(re, { height: 35 }, `skeleton-${t}`))]
3838
+ ].fill(0).map((e, t) => /* @__PURE__ */ p(R, { height: 35 }, `skeleton-${t}`))]
3837
3839
  }),
3838
- !je && !Ne && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3839
- ...ce ? { visibleFrom: "sm" } : {},
3840
+ !Ae && !Me && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(v, {
3841
+ ...se ? { visibleFrom: "sm" } : {},
3840
3842
  children: /* @__PURE__ */ p(Ir, {
3841
3843
  my: "md",
3842
3844
  withTableBorder: !0,
@@ -3845,129 +3847,127 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3845
3847
  verticalSpacing: "sm",
3846
3848
  horizontalSpacing: "md",
3847
3849
  minHeight: 150,
3848
- fetching: Me,
3849
- records: We,
3850
- sortStatus: V,
3851
- onSortStatusChange: Ve,
3850
+ fetching: je,
3851
+ records: qe,
3852
+ sortStatus: H,
3853
+ onSortStatusChange: Be,
3852
3854
  ...b && {
3853
- selectedRecords: K,
3854
- onSelectedRecordsChange: q
3855
+ selectedRecords: G,
3856
+ onSelectedRecordsChange: K
3855
3857
  },
3856
- ...x && We.length && {
3857
- totalRecords: H.length,
3858
- recordsPerPage: He,
3858
+ ...x && U.length && {
3859
+ totalRecords: U.length,
3860
+ recordsPerPage: Ve,
3859
3861
  onPageChange: W,
3860
- page: U,
3862
+ page: Ge,
3861
3863
  recordsPerPageOptions: ti,
3862
- onRecordsPerPageChange: Ue,
3864
+ onRecordsPerPageChange: Ke,
3863
3865
  recordsPerPageLabel: "Einträge pro Seite"
3864
3866
  },
3865
- ...R && { rowExpansion: {
3866
- allowMultiple: R.allowMultiple ?? !1,
3867
- trigger: se ? "never" : "click",
3867
+ ...z && { rowExpansion: {
3868
+ allowMultiple: z.allowMultiple ?? !1,
3869
+ trigger: oe ? "never" : "click",
3868
3870
  content: ({ record: e }) => /* @__PURE__ */ p(v, {
3869
3871
  bg: "var(--mantine-color-body)",
3870
- children: R.content(e, !1)
3872
+ children: z.content(e, !1)
3871
3873
  }),
3872
3874
  expanded: {
3873
- recordIds: G,
3874
- onRecordIdsChange: qe
3875
+ recordIds: Xe,
3876
+ onRecordIdsChange: Ze
3875
3877
  },
3876
- ...R.expandable && { expandable: ({ record: e }) => R.expandable(e) }
3878
+ ...z.expandable && { expandable: ({ record: e }) => z.expandable(e) }
3877
3879
  } },
3878
- columns: Xe.map((e) => e.column),
3880
+ columns: et.map((e) => e.column),
3879
3881
  noRecordsText: "Keine Einträge gefunden",
3880
- onRowClick: se,
3881
- ...se && { style: { cursor: "pointer" } }
3882
+ onRowClick: oe,
3883
+ ...oe && { style: { cursor: "pointer" } }
3882
3884
  })
3883
- }), ce && /* @__PURE__ */ p(v, {
3885
+ }), se && /* @__PURE__ */ p(v, {
3884
3886
  hiddenFrom: "sm",
3885
3887
  children: /* @__PURE__ */ p(ei, {
3886
- records: We,
3887
- fields: Xe,
3888
- onRowClick: se,
3888
+ records: qe,
3889
+ fields: et,
3890
+ onRowClick: oe,
3889
3891
  sort: {
3890
- field: String(V.columnAccessor),
3891
- direction: V.direction,
3892
+ field: String(H.columnAccessor),
3893
+ direction: H.direction,
3892
3894
  onSortChange: (e, t) => {
3893
- Ve({
3895
+ Be({
3894
3896
  columnAccessor: e,
3895
3897
  direction: t
3896
3898
  });
3897
3899
  }
3898
3900
  },
3899
- ...x && We.length && { pagination: {
3900
- totalRecords: H.length,
3901
- recordsPerPage: He,
3902
- page: U,
3901
+ ...x && U.length && { pagination: {
3902
+ totalRecords: U.length,
3903
+ recordsPerPage: Ve,
3904
+ page: Ge,
3903
3905
  onPageChange: W,
3904
3906
  recordsPerPageOptions: ti,
3905
- onRecordsPerPageChange: (e) => {
3906
- Ue(e), W(1);
3907
- }
3907
+ onRecordsPerPageChange: Ke
3908
3908
  } },
3909
- ...R && { rowExpansion: {
3910
- content: R.content,
3909
+ ...z && { rowExpansion: {
3910
+ content: z.content,
3911
3911
  expanded: {
3912
- recordIds: G,
3913
- onRecordIdsChange: qe
3912
+ recordIds: Xe,
3913
+ onRecordIdsChange: Ze
3914
3914
  },
3915
- ...R.expandable && { expandable: R.expandable }
3915
+ ...z.expandable && { expandable: z.expandable }
3916
3916
  } },
3917
- ...at.length > 0 && {
3918
- actions: at,
3917
+ ...ct.length > 0 && {
3918
+ actions: ct,
3919
3919
  canUpdate: I,
3920
3920
  canDelete: L
3921
3921
  }
3922
3922
  })
3923
3923
  })] }),
3924
3924
  /* @__PURE__ */ p(N, {
3925
- opened: $e,
3925
+ opened: rt,
3926
3926
  onClose: () => {
3927
- J(!1), q([]);
3927
+ q(!1), K([]);
3928
3928
  },
3929
3929
  title: e ?? "Bearbeiten",
3930
- children: K.length > 0 && /* @__PURE__ */ p(Lr, {
3930
+ children: G.length > 0 && /* @__PURE__ */ p(Lr, {
3931
3931
  fields: h.filter((e) => e.update),
3932
3932
  queryKey: n,
3933
3933
  connectedQueryKeys: r,
3934
- apiPath: be,
3935
- id: K[0].id,
3934
+ apiPath: ye,
3935
+ id: G[0].id,
3936
3936
  onClose: () => {
3937
- J(!1), q([]);
3937
+ q(!1), K([]);
3938
3938
  },
3939
3939
  steps: D
3940
3940
  })
3941
3941
  }),
3942
- K.length > 0 && /* @__PURE__ */ p(N, {
3943
- opened: et,
3942
+ G.length > 0 && /* @__PURE__ */ p(N, {
3943
+ opened: it,
3944
3944
  onClose: () => {
3945
- tt(!1), q([]);
3945
+ J(!1), K([]);
3946
3946
  },
3947
3947
  title: e ?? "Löschen",
3948
3948
  children: /* @__PURE__ */ p(Rr, {
3949
3949
  onClose: () => {
3950
- tt(!1), q([]);
3950
+ J(!1), K([]);
3951
3951
  },
3952
3952
  queryKey: n,
3953
3953
  connectedQueryKeys: r,
3954
- apiPath: be,
3955
- selectedRecords: K,
3956
- confirmMessage: le
3954
+ apiPath: ye,
3955
+ selectedRecords: G,
3956
+ confirmMessage: ce
3957
3957
  })
3958
3958
  }),
3959
3959
  /* @__PURE__ */ p(N, {
3960
- opened: Ze,
3960
+ opened: tt,
3961
3961
  onClose: () => {
3962
- Qe(!1);
3962
+ nt(!1);
3963
3963
  },
3964
3964
  title: e ?? "Anlegen",
3965
3965
  children: /* @__PURE__ */ p(an, {
3966
3966
  queryKey: n,
3967
3967
  connectedQueryKeys: r,
3968
- apiPath: be,
3968
+ apiPath: ye,
3969
3969
  onClose: () => {
3970
- Qe(!1);
3970
+ nt(!1);
3971
3971
  },
3972
3972
  fields: h.filter((e) => e.create),
3973
3973
  steps: D
@@ -3978,7 +3978,7 @@ function ni({ title: e, titleHint: t, queryKey: n, connectedQueryKeys: r, apiPat
3978
3978
  //#endregion
3979
3979
  //#region src/DataTable/SubTable.tsx
3980
3980
  function ri({ mobile: e, columns: t, ...n }) {
3981
- return e ? /* @__PURE__ */ p(ie, {
3981
+ return e ? /* @__PURE__ */ p(re, {
3982
3982
  gap: "sm",
3983
3983
  style: { fontVariantNumeric: "tabular-nums" },
3984
3984
  children: (n.records ?? []).map((e, r) => {