react-luminus-components 1.5.30 → 1.5.31

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/main.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as a, c as _, t as Ae, a as Ar, s as Fi, g as Vi, m as qc, d as br, b as Yc, e as Kc, f as It, h as Xc, i as Qc, k as Jc, l as Zc, n as ed, o as td, p as nd, T as _s, q as Os, r as $i, E as rd, u as Ps, v as Ga, w as Ts, x as ad, y as Re, z as Ua, F as As, A as id, B as od, C as sd, D as ld, M as cd, G as dd, H as ud, I as pd, J as fd, K as md, L as Ca, N as gd, O as vd, P as X, Q as mt, R as hd, S as bd, U as bt, V as te, W as Ha, X as be, Y as Wa, Z as dt, _ as xd, $ as ue, a0 as L, a1 as Zt, a2 as Qe, a3 as za, a4 as qa, a5 as Rs, a6 as Ya, a7 as Bt, a8 as ks, a9 as Bs, aa as Te, ab as Dt, ac as en, ad as mn, ae as yd, af as qe, ag as wd, ah as jd, ai as Nd, aj as St, ak as Ke, al as Lt, am as xt, an as tn, ao as Fn, ap as Rr, aq as Nt, ar as Dd, as as Sd, at as Cd, au as Mt, av as Ft, aw as nn, ax as Ye, ay as Ls, az as pt, aA as ze, aB as et, aC as kr, aD as Ms, aE as ct, aF as Ka, aG as ft, aH as Xa, aI as Nr, aJ as Ed, aK as Id, aL as _d, aM as Od, aN as Pd, aO as Td, aP as Br, aQ as dn, aR as Lr, aS as gn, aT as Ad, aU as Rd, aV as kd, aW as Fs, aX as ht, aY as Bd, aZ as Ld, a_ as Dr, a$ as oe, b0 as Vs, b1 as Md, b2 as Fd, b3 as Vd, b4 as $s, b5 as Gs, b6 as $d, b7 as Gd, b8 as Ud, b9 as Hd, ba as Wd, bb as zd, bc as Pt, bd as qd, be as Yd, bf as Kd, bg as Xd, bh as Qd, bi as Jd, bj as In, bk as Us, bl as Zd, bm as Xr, bn as Hs, bo as eu, bp as tu, bq as Sr, br as nu, bs as Ws, bt as or, bu as zs, bv as Qa, bw as ru, bx as au } from "./nivo-bar.es-C7fnWh-z.js";
2
2
  import { bA as nD, by as rD, bz as aD } from "./nivo-bar.es-C7fnWh-z.js";
3
3
  import * as _e from "react";
4
- import de, { useCallback as A, useMemo as k, useState as B, useRef as ae, useEffect as U, useContext as $, useId as iu, Component as ou, isValidElement as Gi, Suspense as su, useLayoutEffect as Ja, useReducer as lu, Fragment as cu } from "react";
4
+ import de, { useCallback as R, useMemo as k, useState as B, useRef as ae, useEffect as U, useContext as $, useId as iu, Component as ou, isValidElement as Gi, Suspense as su, useLayoutEffect as Ja, useReducer as lu, Fragment as cu } from "react";
5
5
  import { c as wt, a as du, b as uu, L as Ea, F as pu } from "./FormDisabledProvider-BOj1vV8O.js";
6
6
  import { InteractionType as fu } from "@azure/msal-browser";
7
7
  import { MsalAuthenticationTemplate as mu } from "@azure/msal-react";
@@ -10,10 +10,10 @@ import Vn, { unstable_batchedUpdates as hu } from "react-dom";
10
10
  import { useFormContext as Ct, Controller as Za, useForm as Fr, FormProvider as Vr } from "react-hook-form";
11
11
  import { Pivot as bu } from "react-flexmonster";
12
12
  import { u as xu, a as yu, b as Xt, c as wu } from "./useRenderDraggableInPortal-D0OLp7Qb.js";
13
- import { u as Be, a as $n } from "./useLocalStorageState-CnlCu8Mz.js";
13
+ import { u as Be, a as $n } from "./useLocalStorageState-BmOV1B-Z.js";
14
14
  import { l as kn, g as Ia, d as ju, r as Nu, h as xr } from "./localStorageUtils-8ScvouMK.js";
15
15
  const Yj = ({ fileLoader: e, fileName: t, children: n }) => {
16
- const r = A(async () => {
16
+ const r = R(async () => {
17
17
  var l, c;
18
18
  const i = await e();
19
19
  if (!i)
@@ -566,17 +566,17 @@ const dl = /* @__PURE__ */ _e.forwardRef(({
566
566
  backdropClassName: E,
567
567
  manager: I,
568
568
  renderStaticNode: O = !1,
569
- ...R
569
+ ...T
570
570
  }, M) => {
571
571
  const S = ae();
572
572
  e = Re(e, "offcanvas");
573
- const [P, z] = B(!1), V = ld(f), F = Vu(o || "xs", "up");
573
+ const [P, z] = B(!1), F = ld(f), V = Vu(o || "xs", "up");
574
574
  U(() => {
575
- z(o ? s && !F : s);
576
- }, [s, o, F]);
575
+ z(o ? s && !V : s);
576
+ }, [s, o, V]);
577
577
  const q = k(() => ({
578
- onHide: V
579
- }), [V]);
578
+ onHide: F
579
+ }), [F]);
580
580
  function H() {
581
581
  return I || (u ? (S.current || (S.current = new pd({
582
582
  handleContainerOverflow: !1
@@ -584,14 +584,14 @@ const dl = /* @__PURE__ */ _e.forwardRef(({
584
584
  }
585
585
  const W = (ne, ...ve) => {
586
586
  ne && (ne.style.visibility = "visible"), y == null || y(ne, ...ve);
587
- }, T = (ne, ...ve) => {
587
+ }, A = (ne, ...ve) => {
588
588
  ne && (ne.style.visibility = ""), C == null || C(...ve);
589
- }, K = A((ne) => /* @__PURE__ */ a.jsx("div", {
589
+ }, K = R((ne) => /* @__PURE__ */ a.jsx("div", {
590
590
  ...ne,
591
591
  className: _(`${e}-backdrop`, E)
592
592
  }), [E, e]), Z = (ne) => /* @__PURE__ */ a.jsx("div", {
593
593
  ...ne,
594
- ...R,
594
+ ...T,
595
595
  className: _(t, o ? `${e}-${o}` : e, `${e}-${i}`),
596
596
  "aria-labelledby": r,
597
597
  children: n
@@ -611,13 +611,13 @@ const dl = /* @__PURE__ */ _e.forwardRef(({
611
611
  restoreFocusOptions: v,
612
612
  onEscapeKeyDown: d,
613
613
  onShow: p,
614
- onHide: V,
614
+ onHide: F,
615
615
  onEnter: W,
616
616
  onEntering: N,
617
617
  onEntered: x,
618
618
  onExit: j,
619
619
  onExiting: w,
620
- onExited: T,
620
+ onExited: A,
621
621
  manager: H(),
622
622
  transition: Uu,
623
623
  backdropTransition: Hu,
@@ -735,7 +735,7 @@ const Wu = /* @__PURE__ */ _e.forwardRef(({
735
735
  ] })
736
736
  ] });
737
737
  }, Kj = ({ onUpload: e, accept: t, children: n, className: r, size: i = "md" }) => {
738
- const o = A(async (l) => {
738
+ const o = R(async (l) => {
739
739
  if (l.target.files)
740
740
  try {
741
741
  await e(l.target.files);
@@ -752,7 +752,7 @@ const Wu = /* @__PURE__ */ _e.forwardRef(({
752
752
  sm: Yu,
753
753
  lg: Ku
754
754
  }, Xu = ({ month: e, onChangeMonth: t, locale: n, yearMin: r = 2e3, yearMax: i = 2050, className: o, monthClassName: s, yearClassName: l, size: c }) => {
755
- const u = A((f) => {
755
+ const u = R((f) => {
756
756
  const m = du(e, f);
757
757
  m.getFullYear() < r || m.getFullYear() > i || t(m);
758
758
  }, [e, t, r, i]), d = k(() => {
@@ -799,7 +799,7 @@ const Wu = /* @__PURE__ */ _e.forwardRef(({
799
799
  for (let d = o; d <= s; d++)
800
800
  u.push(d);
801
801
  return u;
802
- }, [i, s, o]), c = A((u) => {
802
+ }, [i, s, o]), c = R((u) => {
803
803
  if (i.manualOptions) {
804
804
  const d = l.findIndex((p) => p === e.getFullYear());
805
805
  if (d !== -1) {
@@ -954,9 +954,9 @@ const tp = (e) => (n) => {
954
954
  qrStyle: "dots"
955
955
  }
956
956
  }, sp = op, lp = ({ value: e, qrRef: t, variant: n = "blackRedEyes" }) => /* @__PURE__ */ a.jsx(xd, { ref: t, value: e, eyeColor: to["eon-red"], fgColor: to["eon-turquoise"], logoHeight: 32, logoWidth: 32, removeQrCodeBehindLogo: !0, logoPadding: 5, logoPaddingStyle: "circle", ecLevel: "Q", ...sp[n] }), cp = ({ value: e, contactType: t, className: n }) => {
957
- const { ProjectIconComponent: r } = $(X), [i, o] = B(!1), s = A(() => {
957
+ const { ProjectIconComponent: r } = $(X), [i, o] = B(!1), s = R(() => {
958
958
  o(!0);
959
- }, []), l = A(() => {
959
+ }, []), l = R(() => {
960
960
  o(!1);
961
961
  }, []), c = k(() => {
962
962
  switch (t) {
@@ -1031,14 +1031,14 @@ const tp = (e) => (n) => {
1031
1031
  ] })
1032
1032
  ] })
1033
1033
  ] });
1034
- }, Xj = ({ value: e, label: t, InputContainer: n = Zt, className: r, withoutLabel: i, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ a.jsx(ml, { contactType: l, value: e, withoutLabel: i, label: t, className: r, children: /* @__PURE__ */ a.jsx(Qe, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), Qj = ({ InputContainer: e = Zt, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: i, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent: h, className: v, archiveColumn: x, icon: j, hint: w, addNewOptionPath: y, refreshOptions: N, MiniDetailComponent: C, miniDetailPlacement: E, suggestedItems: I, suggestedItemsTitle: O, customEllipsisOptions: R }) => {
1035
- const [M, S] = B(!1), P = A((W) => {
1034
+ }, Xj = ({ value: e, label: t, InputContainer: n = Zt, className: r, withoutLabel: i, hidden: o, disabled: s, contactType: l, ...c }) => o ? null : /* @__PURE__ */ a.jsx(ml, { contactType: l, value: e, withoutLabel: i, label: t, className: r, children: /* @__PURE__ */ a.jsx(Qe, { type: "text", value: e, disabled: s, InputContainer: n, size: "sm", withoutLabel: !0, ...c }) }), Qj = ({ InputContainer: e = Zt, items: t, selectedItemNavigateTo: n, onSearchQueryChange: r, texts: i, isLoading: o, value: s, onSelect: l, label: c, withoutLabel: u, size: d, dropdownItemsNameWidth: p, additionalColumns: f, hidden: m, disabled: g, displayIdAsName: b, CustomOnChangeComponent: h, className: v, archiveColumn: x, icon: j, hint: w, addNewOptionPath: y, refreshOptions: N, MiniDetailComponent: C, miniDetailPlacement: E, suggestedItems: I, suggestedItemsTitle: O, customEllipsisOptions: T }) => {
1035
+ const [M, S] = B(!1), P = R((W) => {
1036
1036
  l && l(W);
1037
- }, [l]), z = A((W) => {
1037
+ }, [l]), z = R((W) => {
1038
1038
  S(!1), P(W);
1039
- }, [P]), V = ae(null), F = n !== void 0, q = F && s !== null, H = k(() => {
1040
- var W, T;
1041
- return b ? ((W = s == null ? void 0 : s.id) == null ? void 0 : W.toString()) ?? "" : s != null && s.name && s.name.length > 0 ? s.name : ((T = s == null ? void 0 : s.id) == null ? void 0 : T.toString()) ?? "";
1039
+ }, [P]), F = ae(null), V = n !== void 0, q = V && s !== null, H = k(() => {
1040
+ var W, A;
1041
+ return b ? ((W = s == null ? void 0 : s.id) == null ? void 0 : W.toString()) ?? "" : s != null && s.name && s.name.length > 0 ? s.name : ((A = s == null ? void 0 : s.id) == null ? void 0 : A.toString()) ?? "";
1042
1042
  }, [s, b]);
1043
1043
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { withoutLabel: u, label: c ?? "", hidden: m, inputContainerClassName: _({ "luminus-dropdown-select-open": M }), className: v, hint: w, disabled: g, children: [
1044
1044
  /* @__PURE__ */ a.jsxs(za, { currentSelection: s, selectedItemNavigateTo: n, children: [
@@ -1046,14 +1046,14 @@ const tp = (e) => (n) => {
1046
1046
  /* @__PURE__ */ a.jsx(qa, { value: (s == null ? void 0 : s.id) ?? null, MiniDetailComponent: C, miniDetailPlacement: E, children: /* @__PURE__ */ a.jsxs(
1047
1047
  be.Select,
1048
1048
  {
1049
- ref: V,
1049
+ ref: F,
1050
1050
  size: d,
1051
1051
  value: (s == null ? void 0 : s.id) ?? "",
1052
1052
  onMouseDown: (W) => {
1053
1053
  W.currentTarget.focus(), W.preventDefault();
1054
1054
  },
1055
1055
  onClick: () => {
1056
- !F && !g && S(!0);
1056
+ !V && !g && S(!0);
1057
1057
  },
1058
1058
  onChange: () => {
1059
1059
  },
@@ -1068,25 +1068,25 @@ const tp = (e) => (n) => {
1068
1068
  ]
1069
1069
  }
1070
1070
  ) }),
1071
- h || !g && F ? /* @__PURE__ */ a.jsxs("div", { className: "custom-picker-button", children: [
1072
- !h && !g && F && /* @__PURE__ */ a.jsx(te, { size: "sm", color: "secondary", onClick: (W) => {
1071
+ h || !g && V ? /* @__PURE__ */ a.jsxs("div", { className: "custom-picker-button", children: [
1072
+ !h && !g && V && /* @__PURE__ */ a.jsx(te, { size: "sm", color: "secondary", onClick: (W) => {
1073
1073
  W.preventDefault(), W.stopPropagation(), S(!0);
1074
1074
  }, children: j ?? /* @__PURE__ */ a.jsx(Rs, {}) }),
1075
1075
  h ?? null
1076
1076
  ] }) : null
1077
1077
  ] }),
1078
- V.current && /* @__PURE__ */ a.jsx(Ya, { show: M, onCancel: () => S(!1), items: t, currentSelection: s, onSelectionChange: z, onSearchQueryChange: r, texts: i, itemsNameWidth: p, additionalColumns: f, isLoading: o, disabled: g, inputRef: V, archiveColumn: x, displayIdAsName: b, addNewOptionPath: y, refreshOptions: N, suggestedItems: I, suggestedItemsTitle: O, customEllipsisOptions: R })
1078
+ F.current && /* @__PURE__ */ a.jsx(Ya, { show: M, onCancel: () => S(!1), items: t, currentSelection: s, onSelectionChange: z, onSearchQueryChange: r, texts: i, itemsNameWidth: p, additionalColumns: f, isLoading: o, disabled: g, inputRef: F, archiveColumn: x, displayIdAsName: b, addNewOptionPath: y, refreshOptions: N, suggestedItems: I, suggestedItemsTitle: O, customEllipsisOptions: T })
1079
1079
  ] }) });
1080
1080
  }, Jj = ({ InputContainer: e = Zt, value: t, onChange: n, label: r, size: i, showClearIcon: o, clearValue: s, hidden: l, disabled: c, rows: u, withoutLabel: d, debounceMs: p, minLength: f, maxLength: m, className: g, hint: b }) => {
1081
- const h = A(() => {
1081
+ const h = R(() => {
1082
1082
  if (!n)
1083
1083
  return;
1084
1084
  const N = s ?? null;
1085
1085
  n((N == null ? void 0 : N.toString()) ?? "");
1086
- }, [s, n]), v = ae(null), [x, j] = B((t == null ? void 0 : t.toString()) ?? ""), w = A((N) => {
1086
+ }, [s, n]), v = ae(null), [x, j] = B((t == null ? void 0 : t.toString()) ?? ""), w = R((N) => {
1087
1087
  const C = N;
1088
1088
  n && n(C || null);
1089
- }, [n]), y = A((N) => {
1089
+ }, [n]), y = R((N) => {
1090
1090
  var E;
1091
1091
  const C = (E = N.target) == null ? void 0 : E.value;
1092
1092
  if (!p) {
@@ -1104,15 +1104,15 @@ const tp = (e) => (n) => {
1104
1104
  o && t && n && !c && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: h, children: /* @__PURE__ */ a.jsx(Bt, {}) }) })
1105
1105
  ] });
1106
1106
  }, Zj = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, label: i, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, stepperStep: g = 1, min: b, max: h, hint: v }) => {
1107
- const x = A(() => {
1107
+ const x = R(() => {
1108
1108
  if (!n)
1109
1109
  return;
1110
1110
  const E = p ?? null;
1111
1111
  n(E ? Number(E) : null);
1112
- }, [p, n]), j = ae(null), [w, y] = B((t == null ? void 0 : t.toString()) ?? ""), N = A((E) => {
1112
+ }, [p, n]), j = ae(null), [w, y] = B((t == null ? void 0 : t.toString()) ?? ""), N = R((E) => {
1113
1113
  const I = E;
1114
1114
  n && n(I == null || I === "" ? null : kn(Number(I), b, h));
1115
- }, [h, b, n]), C = A((E) => {
1115
+ }, [h, b, n]), C = R((E) => {
1116
1116
  var O;
1117
1117
  const I = (O = E.target) == null ? void 0 : O.value;
1118
1118
  if (!r) {
@@ -1396,14 +1396,14 @@ function Pp(e) {
1396
1396
  x === void 0 && (x = Ip);
1397
1397
  var j = e.isValidInputCharacter;
1398
1398
  j === void 0 && (j = Hn);
1399
- var w = e.isCharacterSame, y = gl(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), N = wl(v, c, !!u, s, l, d), C = N[0], E = C.formattedValue, I = C.numAsString, O = N[1], R = ae(), M = ae({ formattedValue: E, numAsString: I }), S = function(Y, G) {
1399
+ var w = e.isCharacterSame, y = gl(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), N = wl(v, c, !!u, s, l, d), C = N[0], E = C.formattedValue, I = C.numAsString, O = N[1], T = ae(), M = ae({ formattedValue: E, numAsString: I }), S = function(Y, G) {
1400
1400
  M.current = { formattedValue: Y.formattedValue, numAsString: Y.value }, O(Y, G);
1401
- }, P = B(!1), z = P[0], V = P[1], F = ae(null), q = ae({
1401
+ }, P = B(!1), z = P[0], F = P[1], V = ae(null), q = ae({
1402
1402
  setCaretTimeout: null,
1403
1403
  focusTimeout: null
1404
1404
  });
1405
1405
  U(function() {
1406
- return V(!0), function() {
1406
+ return F(!0), function() {
1407
1407
  clearTimeout(q.current.setCaretTimeout), clearTimeout(q.current.focusTimeout);
1408
1408
  };
1409
1409
  }, []);
@@ -1414,7 +1414,7 @@ function Pp(e) {
1414
1414
  value: G,
1415
1415
  floatValue: isNaN(ie) ? void 0 : ie
1416
1416
  };
1417
- }, T = function(Y, G, ie) {
1417
+ }, A = function(Y, G, ie) {
1418
1418
  Y.selectionStart === 0 && Y.selectionEnd === Y.value.length || (Kt(Y, G), q.current.setCaretTimeout = setTimeout(function() {
1419
1419
  Y.value === ie && Y.selectionStart !== G && Kt(Y, G);
1420
1420
  }, 0));
@@ -1429,7 +1429,7 @@ function Pp(e) {
1429
1429
  var ie = Y.input, ge = Y.source, Ie = Y.event, xe = Y.numAsString, fe;
1430
1430
  if (ie) {
1431
1431
  var Ve = Y.inputValue || ie.value, ot = ea(ie);
1432
- ie.value = G, fe = Z(Ve, G, ot), fe !== void 0 && T(ie, fe, G);
1432
+ ie.value = G, fe = Z(Ve, G, ot), fe !== void 0 && A(ie, fe, G);
1433
1433
  }
1434
1434
  G !== E && S(W(G, xe), { event: Ie, source: ge });
1435
1435
  };
@@ -1440,19 +1440,19 @@ function Pp(e) {
1440
1440
  source: Un.props
1441
1441
  });
1442
1442
  }, [E, I]);
1443
- var ve = F.current ? ea(F.current) : void 0, se = typeof window < "u" ? Ja : U;
1443
+ var ve = V.current ? ea(V.current) : void 0, se = typeof window < "u" ? Ja : U;
1444
1444
  se(function() {
1445
- var Y = F.current;
1445
+ var Y = V.current;
1446
1446
  if (E !== M.current.formattedValue && Y) {
1447
1447
  var G = Z(M.current.formattedValue, E, ve);
1448
- Y.value = E, T(Y, G, E);
1448
+ Y.value = E, A(Y, G, E);
1449
1449
  }
1450
1450
  }, [E]);
1451
1451
  var Q = function(Y, G, ie) {
1452
- var ge = G.target, Ie = R.current ? jp(R.current, ge.selectionEnd) : yl(E, Y), xe = Object.assign(Object.assign({}, Ie), { lastValue: E }), fe = l(Y, xe), Ve = H(fe);
1452
+ var ge = G.target, Ie = T.current ? jp(T.current, ge.selectionEnd) : yl(E, Y), xe = Object.assign(Object.assign({}, Ie), { lastValue: E }), fe = l(Y, xe), Ve = H(fe);
1453
1453
  if (fe = l(Ve, void 0), p && !p(W(Ve, fe))) {
1454
1454
  var ot = G.target, st = ea(ot), an = Z(Y, E, st);
1455
- return ot.value = E, T(ot, an, E), !1;
1455
+ return ot.value = E, A(ot, an, E), !1;
1456
1456
  }
1457
1457
  return ne({
1458
1458
  formattedValue: Ve,
@@ -1465,10 +1465,10 @@ function Pp(e) {
1465
1465
  }, le = function(Y, G) {
1466
1466
  G === void 0 && (G = 0);
1467
1467
  var ie = Y.selectionStart, ge = Y.selectionEnd;
1468
- R.current = { selectionStart: ie, selectionEnd: ge + G };
1468
+ T.current = { selectionStart: ie, selectionEnd: ge + G };
1469
1469
  }, Ce = function(Y) {
1470
1470
  var G = Y.target, ie = G.value, ge = Q(ie, Y, Un.event);
1471
- ge && f(Y), R.current = void 0;
1471
+ ge && f(Y), T.current = void 0;
1472
1472
  }, me = function(Y) {
1473
1473
  var G = Y.target, ie = Y.key, ge = G.selectionStart, Ie = G.selectionEnd, xe = G.value;
1474
1474
  xe === void 0 && (xe = "");
@@ -1486,13 +1486,13 @@ function Pp(e) {
1486
1486
  var an = ie === "ArrowLeft" ? "left" : "right";
1487
1487
  st = K(xe, fe, an), st !== fe && Y.preventDefault();
1488
1488
  } else ie === "Delete" && !j(xe[fe]) ? st = K(xe, fe, "right") : ie === "Backspace" && !j(xe[fe]) && (st = K(xe, fe, "left"));
1489
- st !== fe && T(G, st, xe), m(Y), le(G, Ve);
1489
+ st !== fe && A(G, st, xe), m(Y), le(G, Ve);
1490
1490
  }, J = function(Y) {
1491
1491
  var G = Y.target, ie = function() {
1492
1492
  var ge = G.selectionStart, Ie = G.selectionEnd, xe = G.value;
1493
1493
  if (xe === void 0 && (xe = ""), ge === Ie) {
1494
1494
  var fe = K(xe, ge);
1495
- fe !== ge && T(G, fe, xe);
1495
+ fe !== ge && A(G, fe, xe);
1496
1496
  }
1497
1497
  };
1498
1498
  ie(), requestAnimationFrame(function() {
@@ -1501,14 +1501,14 @@ function Pp(e) {
1501
1501
  }, re = function(Y) {
1502
1502
  Y.persist && Y.persist();
1503
1503
  var G = Y.target, ie = Y.currentTarget;
1504
- F.current = G, q.current.focusTimeout = setTimeout(function() {
1504
+ V.current = G, q.current.focusTimeout = setTimeout(function() {
1505
1505
  var ge = G.selectionStart, Ie = G.selectionEnd, xe = G.value;
1506
1506
  xe === void 0 && (xe = "");
1507
1507
  var fe = K(xe, ge);
1508
- fe !== ge && !(ge === 0 && Ie === xe.length) && T(G, fe, xe), b(Object.assign(Object.assign({}, Y), { currentTarget: ie }));
1508
+ fe !== ge && !(ge === 0 && Ie === xe.length) && A(G, fe, xe), b(Object.assign(Object.assign({}, Y), { currentTarget: ie }));
1509
1509
  }, 0);
1510
1510
  }, pe = function(Y) {
1511
- F.current = null, clearTimeout(q.current.focusTimeout), clearTimeout(q.current.setCaretTimeout), h(Y);
1511
+ V.current = null, clearTimeout(q.current.focusTimeout), clearTimeout(q.current.setCaretTimeout), h(Y);
1512
1512
  }, Pe = z && Dp() ? "numeric" : void 0, tt = Object.assign({ inputMode: Pe }, y, {
1513
1513
  type: t,
1514
1514
  value: E,
@@ -1572,25 +1572,25 @@ function kp(e, t, n) {
1572
1572
  var h = l === 0 ? "" : g;
1573
1573
  e = e.substring(0, d) + h + e.substring(d + 1, e.length);
1574
1574
  }
1575
- var v = function(F, q, H) {
1576
- var W = !1, T = !1;
1577
- o.startsWith("-") ? W = !1 : F.startsWith("--") ? (W = !1, T = !0) : s.startsWith("-") && F.length === s.length ? W = !1 : F[0] === "-" && (W = !0);
1575
+ var v = function(V, q, H) {
1576
+ var W = !1, A = !1;
1577
+ o.startsWith("-") ? W = !1 : V.startsWith("--") ? (W = !1, A = !0) : s.startsWith("-") && V.length === s.length ? W = !1 : V[0] === "-" && (W = !0);
1578
1578
  var K = W ? 1 : 0;
1579
- return T && (K = 2), K && (F = F.substring(K), q -= K, H -= K), { value: F, start: q, end: H, hasNegation: W };
1579
+ return A && (K = 2), K && (V = V.substring(K), q -= K, H -= K), { value: V, start: q, end: H, hasNegation: W };
1580
1580
  }, x = v(e, d, p), j = x.hasNegation;
1581
1581
  r = x, e = r.value, d = r.start, p = r.end;
1582
1582
  var w = v(t.lastValue, c.start, c.end), y = w.start, N = w.end, C = w.value, E = e.substring(d, p);
1583
1583
  e.length && C.length && (y > C.length - s.length || N < o.length) && !(E && s.startsWith(E)) && (e = C);
1584
1584
  var I = 0;
1585
1585
  e.startsWith(o) ? I += o.length : d < o.length && (I = d), e = e.substring(I), p -= I;
1586
- var O = e.length, R = e.length - s.length;
1587
- e.endsWith(s) ? O = R : (p > R || p > e.length - s.length) && (O = p), e = e.substring(0, O), e = Tp(j ? "-" + e : e, i), e = (e.match(Ap(g)) || []).join("");
1586
+ var O = e.length, T = e.length - s.length;
1587
+ e.endsWith(s) ? O = T : (p > T || p > e.length - s.length) && (O = p), e = e.substring(0, O), e = Tp(j ? "-" + e : e, i), e = (e.match(Ap(g)) || []).join("");
1588
1588
  var M = e.indexOf(g);
1589
- e = e.replace(new RegExp(hl(g), "g"), function(F, q) {
1589
+ e = e.replace(new RegExp(hl(g), "g"), function(V, q) {
1590
1590
  return q === M ? "." : "";
1591
1591
  });
1592
- var S = ai(e, i), P = S.beforeDecimal, z = S.afterDecimal, V = S.addNegation;
1593
- return u.end - u.start < c.end - c.start && P === "" && b && !parseFloat(z) && (e = V ? "-" : ""), e;
1592
+ var S = ai(e, i), P = S.beforeDecimal, z = S.afterDecimal, F = S.addNegation;
1593
+ return u.end - u.start < c.end - c.start && P === "" && b && !parseFloat(z) && (e = F ? "-" : ""), e;
1594
1594
  }
1595
1595
  function Bp(e, t) {
1596
1596
  var n = t.prefix;
@@ -1628,59 +1628,59 @@ function Mp(e) {
1628
1628
  o === void 0 && (o = Ot);
1629
1629
  var s = e.thousandSeparator, l = e.decimalScale, c = e.fixedDecimalScale, u = e.prefix;
1630
1630
  u === void 0 && (u = "");
1631
- var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = gl(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = Gr(e), h = b.decimalSeparator, v = b.allowedDecimalSeparators, x = function(V) {
1632
- return io(V, e);
1633
- }, j = function(V, F) {
1634
- return kp(V, F, e);
1631
+ var d = e.defaultValue, p = e.value, f = e.valueIsNumericString, m = e.onValueChange, g = gl(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), b = Gr(e), h = b.decimalSeparator, v = b.allowedDecimalSeparators, x = function(F) {
1632
+ return io(F, e);
1633
+ }, j = function(F, V) {
1634
+ return kp(F, V, e);
1635
1635
  }, w = pn(p) ? d : p, y = f ?? Rp(w, u, t);
1636
1636
  pn(p) ? pn(d) || (y = y || typeof d == "number") : y = y || typeof p == "number";
1637
- var N = function(V) {
1638
- return vl(V) ? V : (typeof V == "number" && (V = xl(V)), y && typeof l == "number" ? ro(V, l, !!c) : V);
1639
- }, C = wl(N(p), N(d), !!y, x, j, m), E = C[0], I = E.numAsString, O = E.formattedValue, R = C[1], M = function(V) {
1640
- var F = V.target, q = V.key, H = F.selectionStart, W = F.selectionEnd, T = F.value;
1641
- if (T === void 0 && (T = ""), (q === "Backspace" || q === "Delete") && W < u.length) {
1642
- V.preventDefault();
1637
+ var N = function(F) {
1638
+ return vl(F) ? F : (typeof F == "number" && (F = xl(F)), y && typeof l == "number" ? ro(F, l, !!c) : F);
1639
+ }, C = wl(N(p), N(d), !!y, x, j, m), E = C[0], I = E.numAsString, O = E.formattedValue, T = C[1], M = function(F) {
1640
+ var V = F.target, q = F.key, H = V.selectionStart, W = V.selectionEnd, A = V.value;
1641
+ if (A === void 0 && (A = ""), (q === "Backspace" || q === "Delete") && W < u.length) {
1642
+ F.preventDefault();
1643
1643
  return;
1644
1644
  }
1645
1645
  if (H !== W) {
1646
- i(V);
1646
+ i(F);
1647
1647
  return;
1648
1648
  }
1649
- q === "Backspace" && T[0] === "-" && H === u.length + 1 && n && Kt(F, 1), l && c && (q === "Backspace" && T[H - 1] === h ? (Kt(F, H - 1), V.preventDefault()) : q === "Delete" && T[H] === h && V.preventDefault()), v != null && v.includes(q) && T[H] === h && Kt(F, H + 1);
1649
+ q === "Backspace" && A[0] === "-" && H === u.length + 1 && n && Kt(V, 1), l && c && (q === "Backspace" && A[H - 1] === h ? (Kt(V, H - 1), F.preventDefault()) : q === "Delete" && A[H] === h && F.preventDefault()), v != null && v.includes(q) && A[H] === h && Kt(V, H + 1);
1650
1650
  var K = s === !0 ? "," : s;
1651
- q === "Backspace" && T[H - 1] === K && Kt(F, H - 1), q === "Delete" && T[H] === K && Kt(F, H + 1), i(V);
1652
- }, S = function(V) {
1653
- var F = I;
1654
- if (F.match(/\d/g) || (F = ""), r || (F = wp(F)), c && l && (F = ro(F, l, c)), F !== I) {
1655
- var q = io(F, e);
1656
- R({
1651
+ q === "Backspace" && A[H - 1] === K && Kt(V, H - 1), q === "Delete" && A[H] === K && Kt(V, H + 1), i(F);
1652
+ }, S = function(F) {
1653
+ var V = I;
1654
+ if (V.match(/\d/g) || (V = ""), r || (V = wp(V)), c && l && (V = ro(V, l, c)), V !== I) {
1655
+ var q = io(V, e);
1656
+ T({
1657
1657
  formattedValue: q,
1658
- value: F,
1659
- floatValue: parseFloat(F)
1658
+ value: V,
1659
+ floatValue: parseFloat(V)
1660
1660
  }, {
1661
- event: V,
1661
+ event: F,
1662
1662
  source: Un.event
1663
1663
  });
1664
1664
  }
1665
- o(V);
1666
- }, P = function(V) {
1667
- return V === h ? !0 : Hn(V);
1668
- }, z = function(V) {
1669
- var F = V.currentValue, q = V.lastValue, H = V.formattedValue, W = V.currentValueIndex, T = V.formattedValueIndex, K = F[W], Z = H[T], ne = yl(q, F), ve = ne.to, se = function(Q) {
1665
+ o(F);
1666
+ }, P = function(F) {
1667
+ return F === h ? !0 : Hn(F);
1668
+ }, z = function(F) {
1669
+ var V = F.currentValue, q = F.lastValue, H = F.formattedValue, W = F.currentValueIndex, A = F.formattedValueIndex, K = V[W], Z = H[A], ne = yl(q, V), ve = ne.to, se = function(Q) {
1670
1670
  return j(Q).indexOf(".") + u.length;
1671
1671
  };
1672
- return p === 0 && c && l && F[ve.start] === h && se(F) < W && se(H) > T ? !1 : W >= ve.start && W < ve.end && v && v.includes(K) && Z === h ? !0 : K === Z;
1672
+ return p === 0 && c && l && V[ve.start] === h && se(V) < W && se(H) > A ? !1 : W >= ve.start && W < ve.end && v && v.includes(K) && Z === h ? !0 : K === Z;
1673
1673
  };
1674
1674
  return Object.assign(Object.assign({}, g), {
1675
1675
  value: O,
1676
1676
  valueIsNumericString: !1,
1677
1677
  isValidInputCharacter: P,
1678
1678
  isCharacterSame: z,
1679
- onValueChange: R,
1679
+ onValueChange: T,
1680
1680
  format: x,
1681
1681
  removeFormatting: j,
1682
- getCaretBoundary: function(V) {
1683
- return Bp(V, e);
1682
+ getCaretBoundary: function(F) {
1683
+ return Bp(F, e);
1684
1684
  },
1685
1685
  onKeyDown: M,
1686
1686
  onBlur: S
@@ -1691,15 +1691,15 @@ function ii(e) {
1691
1691
  return de.createElement(Pp, Object.assign({}, t));
1692
1692
  }
1693
1693
  const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, label: i, withoutLabel: o, placeholder: s, size: l, hidden: c, disabled: u, showClearIcon: d, clearValue: p, className: f, step: m, noSelectOnFocus: g, decimalScale: b, fixedDecimalScale: h = !1, numberPrefix: v, numberSuffix: x, min: j, max: w, hint: y }) => {
1694
- const N = A(() => {
1694
+ const N = R(() => {
1695
1695
  if (!n)
1696
1696
  return;
1697
1697
  const M = p ?? null;
1698
1698
  n(M ? Number(M) : null);
1699
- }, [p, n]), C = ae(null), [E, I] = B((t == null ? void 0 : t.toString()) ?? ""), O = A((M) => {
1699
+ }, [p, n]), C = ae(null), [E, I] = B((t == null ? void 0 : t.toString()) ?? ""), O = R((M) => {
1700
1700
  const S = M;
1701
1701
  n && n(S == null || S === "" ? null : Number(S));
1702
- }, [n]), R = A((M) => {
1702
+ }, [n]), T = R((M) => {
1703
1703
  var P, z;
1704
1704
  let S = parseFloat(((z = (P = M.target) == null ? void 0 : P.value) == null ? void 0 : z.replaceAll(" ", "").replaceAll(",", ".")) ?? 0);
1705
1705
  if (Number.isNaN(S) && (S = 0), !r) {
@@ -1719,13 +1719,13 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1719
1719
  }, [t, w, j, n]), /* @__PURE__ */ a.jsxs(e, { withoutLabel: o, label: i ?? "", hidden: c, className: f, hint: y, disabled: u, children: [
1720
1720
  /* @__PURE__ */ a.jsx(ii, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: b, fixedDecimalScale: h, prefix: v, suffix: x, defaultValue: "", value: r ? E : (t == null ? void 0 : t.toString()) ?? "", placeholder: s ?? i, onFocus: (M) => {
1721
1721
  !g && M.target.select();
1722
- }, onChange: R, hidden: c, disabled: u, className: _("form-control text-end w-100", {
1722
+ }, onChange: T, hidden: c, disabled: u, className: _("form-control text-end w-100", {
1723
1723
  [`form-control-${l}`]: l
1724
1724
  }), step: m, min: j, max: w }),
1725
1725
  d && t !== null && n && !u && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: N, children: /* @__PURE__ */ a.jsx(Bt, {}) }) })
1726
1726
  ] });
1727
1727
  }, Vp = ({ InputContainer: e = Te, label: t, options: n, disabled: r, hidden: i, className: o, value: s, onChange: l }) => {
1728
- const c = A((u) => {
1728
+ const c = R((u) => {
1729
1729
  l && l(u.target.value);
1730
1730
  }, [l]);
1731
1731
  return /* @__PURE__ */ a.jsx(e, { isForRadioInput: !0, hidden: i, withoutLabel: !t, label: `${t}`, className: o, disabled: r, children: n.map((u) => /* @__PURE__ */ a.jsx(be.Check, { id: `radio-${u.id}`, label: u.name, type: "radio", value: u.id ?? "", checked: s === u.id, onChange: c, hidden: i, disabled: r, className: "w-100" }, u.id)) });
@@ -1773,31 +1773,31 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1773
1773
  }, nN = ({ label: e, InputContainer: t = Te, className: n, withoutLabel: r, hidden: i, disabled: o, contactType: s, formField: l, ...c }) => {
1774
1774
  const { watch: u } = Ct(), d = u(l), p = Dt({ falseIfNotInit: !0 }), f = k(() => o || p, [o, p]);
1775
1775
  return i ? null : /* @__PURE__ */ a.jsx(ml, { contactType: s, value: d, withoutLabel: r, label: e, className: n, children: /* @__PURE__ */ a.jsx(mn, { type: "text", formField: l, InputContainer: t, size: "sm", withoutLabel: !0, className: "flex-grow-1", disabled: f, ...c }) });
1776
- }, rN = ({ InputContainer: e = Te, formField: t, label: n, size: r, defaultSelection: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel: h, additionalColumns: v, CustomOnChangeComponent: x, icon: j, displayIdAsName: w, onSelect: y, className: N, archiveColumn: C, hint: E, addNewOptionPath: I, refreshOptions: O, MiniDetailComponent: R, miniDetailPlacement: M, suggestedItems: S, suggestedItemsTitle: P }) => {
1777
- const { formState: z, setValue: V, watch: F, control: q } = Ct(), H = Dt({ falseIfNotInit: !0 }), [W, T] = B(void 0), [K, Z] = B(!1), [ne, ve] = B(!1), se = F(t) ?? null, Q = se === (i == null ? void 0 : i.id) ? i == null ? void 0 : i.name : F(`${t}-DropdownName`), le = k(() => se == null ? null : { id: se ?? null, name: Q ?? "" }, [se, Q]), Ce = A(() => {
1776
+ }, rN = ({ InputContainer: e = Te, formField: t, label: n, size: r, defaultSelection: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, items: d, onSearchQueryChange: p, selectedItemNavigateTo: f, texts: m, dropdownItemsNameWidth: g, isLoading: b, withoutLabel: h, additionalColumns: v, CustomOnChangeComponent: x, icon: j, displayIdAsName: w, onSelect: y, className: N, archiveColumn: C, hint: E, addNewOptionPath: I, refreshOptions: O, MiniDetailComponent: T, miniDetailPlacement: M, suggestedItems: S, suggestedItemsTitle: P }) => {
1777
+ const { formState: z, setValue: F, watch: V, control: q } = Ct(), H = Dt({ falseIfNotInit: !0 }), [W, A] = B(void 0), [K, Z] = B(!1), [ne, ve] = B(!1), se = V(t) ?? null, Q = se === (i == null ? void 0 : i.id) ? i == null ? void 0 : i.name : V(`${t}-DropdownName`), le = k(() => se == null ? null : { id: se ?? null, name: Q ?? "" }, [se, Q]), Ce = R(() => {
1778
1778
  const G = t.split(".");
1779
1779
  let ie = z.errors;
1780
1780
  G.forEach((ge) => {
1781
1781
  ie !== void 0 && (ie = ie[ge]);
1782
- }), T(ie);
1783
- }, [z, t]), me = A((G) => {
1782
+ }), A(ie);
1783
+ }, [z, t]), me = R((G) => {
1784
1784
  if ((G == null ? void 0 : G.id) === se)
1785
1785
  return;
1786
- if (y && y(G), o && o.forEach((ge) => V(ge, null, { shouldDirty: !0, shouldValidate: ne })), G === null) {
1787
- V(t, null, {
1786
+ if (y && y(G), o && o.forEach((ge) => F(ge, null, { shouldDirty: !0, shouldValidate: ne })), G === null) {
1787
+ F(t, null, {
1788
1788
  shouldDirty: !0,
1789
1789
  shouldValidate: ne
1790
- }), V(`${t}-DropdownName`, null);
1790
+ }), F(`${t}-DropdownName`, null);
1791
1791
  return;
1792
1792
  }
1793
1793
  let ie = null;
1794
- s ? ie = (G == null ? void 0 : G.id) !== null && (G == null ? void 0 : G.id) !== "" ? parseInt(G.id.toString(), 10) : null : ie = G.id === null || G.id === void 0 || G.id === "" ? null : G.id, V(t, ie, {
1794
+ s ? ie = (G == null ? void 0 : G.id) !== null && (G == null ? void 0 : G.id) !== "" ? parseInt(G.id.toString(), 10) : null : ie = G.id === null || G.id === void 0 || G.id === "" ? null : G.id, F(t, ie, {
1795
1795
  shouldDirty: !0,
1796
1796
  shouldValidate: ne
1797
- }), V(`${t}-DropdownName`, G.name ?? "");
1798
- }, [V, t, ne, s, o, se, y]), J = A((G) => {
1797
+ }), F(`${t}-DropdownName`, G.name ?? "");
1798
+ }, [F, t, ne, s, o, se, y]), J = R((G) => {
1799
1799
  Z(!1), me(G);
1800
- }, [me]), re = A(() => {
1800
+ }, [me]), re = R(() => {
1801
1801
  Z(!1);
1802
1802
  }, []), pe = ae(null), Pe = W !== void 0, tt = f !== void 0, yt = tt && le !== null, Y = k(() => u || H, [u, H]);
1803
1803
  return U(() => {
@@ -1807,7 +1807,7 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1807
1807
  }, [z]), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled: Y, hidden: c, withoutLabel: h, isInvalid: Pe, inputContainerClassName: _({ "luminus-dropdown-select-open": K }), hint: E, className: N, children: [
1808
1808
  /* @__PURE__ */ a.jsxs(za, { currentSelection: le, selectedItemNavigateTo: f, children: [
1809
1809
  w && (le == null ? void 0 : le.name) && /* @__PURE__ */ a.jsx(L, { variant: "caption", className: "d-flex justify-content-end mt-2 luminus-dropdown-selection-name", children: le.name }),
1810
- /* @__PURE__ */ a.jsx(Za, { control: q, name: t, render: () => /* @__PURE__ */ a.jsx(qa, { value: se, MiniDetailComponent: R, miniDetailPlacement: M, children: /* @__PURE__ */ a.jsx(be.Select, { size: r, onMouseDown: (G) => {
1810
+ /* @__PURE__ */ a.jsx(Za, { control: q, name: t, render: () => /* @__PURE__ */ a.jsx(qa, { value: se, MiniDetailComponent: T, miniDetailPlacement: M, children: /* @__PURE__ */ a.jsx(be.Select, { size: r, onMouseDown: (G) => {
1811
1811
  G.currentTarget.focus(), G.preventDefault();
1812
1812
  }, onClick: () => {
1813
1813
  !tt && !Y && Z(!0);
@@ -1827,12 +1827,12 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1827
1827
  pe.current && /* @__PURE__ */ a.jsx(Ya, { show: K, onCancel: re, items: d, currentSelection: le, onSelectionChange: J, onSearchQueryChange: p, texts: m, itemsNameWidth: g, additionalColumns: v, displayIdAsName: w, isLoading: b, disabled: Y, inputRef: pe, archiveColumn: C, addNewOptionPath: I, refreshOptions: O, suggestedItems: S, suggestedItemsTitle: P })
1828
1828
  ] }) });
1829
1829
  }, aN = ({ InputContainer: e = Te, label: t, formField: n, hidden: r, required: i, placeholder: o, disabled: s, showClearIcon: l, resetsFields: c, multiple: u, accept: d, withoutLabel: p, hint: f, className: m }) => {
1830
- const { watch: g, setValue: b, register: h, formState: v } = Ct(), x = Dt({ falseIfNotInit: !0 }), [j, w] = B(!1), [y, N] = B(void 0), C = A(() => {
1830
+ const { watch: g, setValue: b, register: h, formState: v } = Ct(), x = Dt({ falseIfNotInit: !0 }), [j, w] = B(!1), [y, N] = B(void 0), C = R(() => {
1831
1831
  b(n, "");
1832
- }, [b, n]), E = A(() => {
1833
- const R = n.split(".");
1832
+ }, [b, n]), E = R(() => {
1833
+ const T = n.split(".");
1834
1834
  let M = v.errors;
1835
- R.forEach((S) => {
1835
+ T.forEach((S) => {
1836
1836
  M !== void 0 && (M = M[S]);
1837
1837
  }), N(M);
1838
1838
  }, [v, n]);
@@ -1843,7 +1843,7 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1843
1843
  return /* @__PURE__ */ a.jsxs(e, { label: t ?? "", required: i, disabled: I, hidden: r, withoutLabel: p, isInvalid: O, hint: f, className: m, children: [
1844
1844
  /* @__PURE__ */ a.jsx(yd, { type: "file", multiple: u, accept: d.join(", "), placeholder: o ?? t, isInvalid: O, hidden: r, disabled: I, className: "w-100", ...h(n, {
1845
1845
  onChange: () => {
1846
- c && c.forEach((R) => b(R, null, { shouldDirty: !0, shouldValidate: j }));
1846
+ c && c.forEach((T) => b(T, null, { shouldDirty: !0, shouldValidate: j }));
1847
1847
  }
1848
1848
  }) }),
1849
1849
  l && g(n) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: C, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
@@ -1855,30 +1855,30 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1855
1855
  s(Object.keys(r.dirtyFields).length > 0);
1856
1856
  }, [r]), o ? /* @__PURE__ */ a.jsx(zu, { onStorno: t, noSpacer: n, disabled: i, children: e }) : null;
1857
1857
  }, Pa = ({ InputContainer: e = Te, options: t, formField: n, label: r, size: i, resetsFields: o, isNumber: s, required: l, hidden: c, disabled: u, withoutLabel: d, noSortOptions: p, suffixIdToName: f, onSelect: m, className: g, appendCurrentSelectionWithName: b, hint: h, addNewOptionPath: v, refreshOptions: x, MiniDetailComponent: j, miniDetailPlacement: w, selectedItemNavigateTo: y, noRemoveButton: N }) => {
1858
- const { texts: { customSelect: C } } = $(X), { formState: E, setValue: I, watch: O, control: R } = Ct(), M = Dt({ falseIfNotInit: !0 }), [S, P] = B(void 0), [z, V] = B(!1), [F, q] = B(!1), [H, W] = B(""), T = O(n), K = k(() => t.find((re) => re.id === T) ?? null, [t, T]), Z = A(() => {
1858
+ const { texts: { customSelect: C } } = $(X), { formState: E, setValue: I, watch: O, control: T } = Ct(), M = Dt({ falseIfNotInit: !0 }), [S, P] = B(void 0), [z, F] = B(!1), [V, q] = B(!1), [H, W] = B(""), A = O(n), K = k(() => t.find((re) => re.id === A) ?? null, [t, A]), Z = R(() => {
1859
1859
  const re = n.split(".");
1860
1860
  let pe = E.errors;
1861
1861
  re.forEach((Pe) => {
1862
1862
  pe !== void 0 && (pe = pe[Pe]);
1863
1863
  }), P(pe);
1864
- }, [E, n]), ne = A((re) => {
1865
- if ((re == null ? void 0 : re.id) === T)
1864
+ }, [E, n]), ne = R((re) => {
1865
+ if ((re == null ? void 0 : re.id) === A)
1866
1866
  return;
1867
- if (m && m(re), o && o.forEach((Pe) => I(Pe, null, { shouldDirty: !0, shouldValidate: F })), re === null) {
1867
+ if (m && m(re), o && o.forEach((Pe) => I(Pe, null, { shouldDirty: !0, shouldValidate: V })), re === null) {
1868
1868
  I(n, null, {
1869
1869
  shouldDirty: !0,
1870
- shouldValidate: F
1870
+ shouldValidate: V
1871
1871
  });
1872
1872
  return;
1873
1873
  }
1874
1874
  let pe = null;
1875
1875
  s ? pe = (re == null ? void 0 : re.id) !== null && (re == null ? void 0 : re.id) !== "" ? parseInt(re.id.toString(), 10) : null : pe = re.id === null || re.id === void 0 || re.id === "" ? null : re.id, I(n, pe, {
1876
1876
  shouldDirty: !0,
1877
- shouldValidate: F
1877
+ shouldValidate: V
1878
1878
  });
1879
- }, [I, n, s, o, T, F, m]), ve = A((re) => {
1880
- V(!1), ne(re);
1881
- }, [ne]), se = A((re) => {
1879
+ }, [I, n, s, o, A, V, m]), ve = R((re) => {
1880
+ F(!1), ne(re);
1881
+ }, [ne]), se = R((re) => {
1882
1882
  W(re);
1883
1883
  }, []), Q = k(() => u || M, [u, M]);
1884
1884
  U(() => {
@@ -1886,12 +1886,12 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1886
1886
  }, [Z]), U(() => {
1887
1887
  E.isSubmitted && q(!0);
1888
1888
  }, [E]);
1889
- const le = A((re) => {
1889
+ const le = R((re) => {
1890
1890
  var pe;
1891
1891
  return re === null ? "" : !re.name || re.name.length === 0 ? ((pe = re.id) == null ? void 0 : pe.toString()) ?? "" : f ? `${re.name} (${re.id})` : re.name;
1892
1892
  }, [f]), Ce = k(() => {
1893
1893
  const re = t ? [...t] : [];
1894
- return b !== void 0 && T && (re.some((pe) => pe.id === T) || re.push({ id: T, name: b })), re.map((pe) => ({
1894
+ return b !== void 0 && A && (re.some((pe) => pe.id === A) || re.push({ id: A, name: b })), re.map((pe) => ({
1895
1895
  id: pe.id,
1896
1896
  name: le(pe)
1897
1897
  })).filter((pe) => qe(pe.name, H)).sort((pe, Pe) => p ? 0 : (pe.name ?? "").localeCompare(Pe.name ?? ""));
@@ -1901,28 +1901,28 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1901
1901
  H,
1902
1902
  le,
1903
1903
  b,
1904
- T
1904
+ A
1905
1905
  ]), me = ae(null), J = S !== void 0;
1906
1906
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(e, { label: r ?? "", required: l, disabled: Q, hidden: c, withoutLabel: d, isInvalid: J, inputContainerClassName: _({ "luminus-dropdown-select-open": z }), hint: h, className: g, children: [
1907
- /* @__PURE__ */ a.jsx(za, { currentSelection: K, selectedItemNavigateTo: y, children: /* @__PURE__ */ a.jsx(Za, { control: R, name: n, render: () => /* @__PURE__ */ a.jsx(qa, { value: T, MiniDetailComponent: j, miniDetailPlacement: w, children: /* @__PURE__ */ a.jsx(be.Select, { size: i, onMouseDown: (re) => {
1907
+ /* @__PURE__ */ a.jsx(za, { currentSelection: K, selectedItemNavigateTo: y, children: /* @__PURE__ */ a.jsx(Za, { control: T, name: n, render: () => /* @__PURE__ */ a.jsx(qa, { value: A, MiniDetailComponent: j, miniDetailPlacement: w, children: /* @__PURE__ */ a.jsx(be.Select, { size: i, onMouseDown: (re) => {
1908
1908
  re.currentTarget.focus(), re.preventDefault();
1909
1909
  }, onClick: () => {
1910
- V(!0);
1911
- }, ref: me, value: T ?? "", onChange: () => {
1910
+ F(!0);
1911
+ }, ref: me, value: A ?? "", onChange: () => {
1912
1912
  }, isInvalid: J, hidden: c, disabled: Q, className: "w-100", children: /* @__PURE__ */ a.jsx("option", { value: (K == null ? void 0 : K.id) ?? "", children: le(K) }) }) }) }) }),
1913
1913
  S && /* @__PURE__ */ a.jsx(en, { message: S.message }),
1914
- me.current && /* @__PURE__ */ a.jsx(Ya, { show: z, onCancel: () => V(!1), items: Ce, currentSelection: K ?? null, onSelectionChange: ve, onSearchQueryChange: se, texts: C, disabled: Q, inputRef: me, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: v, refreshOptions: x, noRemoveButton: N })
1914
+ me.current && /* @__PURE__ */ a.jsx(Ya, { show: z, onCancel: () => F(!1), items: Ce, currentSelection: K ?? null, onSelectionChange: ve, onSearchQueryChange: se, texts: C, disabled: Q, inputRef: me, autoHideSearch: !0, allItemsLength: t.length, addNewOptionPath: v, refreshOptions: x, noRemoveButton: N })
1915
1915
  ] }) });
1916
1916
  }, iN = ({ InputContainer: e = Te, formField: t, label: n, placeholder: r, size: i, resetsFields: o, showClearIcon: s, clearValue: l, required: c, hidden: u, disabled: d, withoutLabel: p, step: f, stepperStep: m = 1, className: g, min: b, max: h, onChange: v, hint: x }) => {
1917
- const { register: j, formState: w, setValue: y, watch: N } = Ct(), C = Dt({ falseIfNotInit: !0 }), [E, I] = B(void 0), [O, R] = B(!1), M = A((q, H, W) => {
1917
+ const { register: j, formState: w, setValue: y, watch: N } = Ct(), C = Dt({ falseIfNotInit: !0 }), [E, I] = B(void 0), [O, T] = B(!1), M = R((q, H, W) => {
1918
1918
  y(q, kn(H, b, h), W);
1919
- }, [h, b, y]), S = A(() => {
1919
+ }, [h, b, y]), S = R(() => {
1920
1920
  const q = l ?? null;
1921
1921
  M(t, q !== null ? Number(q) : null, {
1922
1922
  shouldDirty: !0,
1923
1923
  shouldValidate: O
1924
1924
  });
1925
- }, [l, M, t, O]), P = A(() => {
1925
+ }, [l, M, t, O]), P = R(() => {
1926
1926
  const q = t.split(".");
1927
1927
  let H = w.errors;
1928
1928
  q.forEach((W) => {
@@ -1932,10 +1932,10 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1932
1932
  U(() => {
1933
1933
  P();
1934
1934
  }, [P]), U(() => {
1935
- w.isSubmitted && R(!0);
1935
+ w.isSubmitted && T(!0);
1936
1936
  }, [w]);
1937
- const V = E !== void 0, F = N(t);
1938
- return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: c, disabled: z, hidden: u, withoutLabel: p, isInvalid: V, hint: x, className: g, children: [
1937
+ const F = E !== void 0, V = N(t);
1938
+ return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: c, disabled: z, hidden: u, withoutLabel: p, isInvalid: F, hint: x, className: g, children: [
1939
1939
  /* @__PURE__ */ a.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
1940
1940
  /* @__PURE__ */ a.jsx(be.Control, { type: "number", placeholder: r ?? n, size: i, ...j(t, {
1941
1941
  setValueAs: (q) => q == null || q === "" ? null : kn(Number(q), b, h),
@@ -1945,25 +1945,25 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1945
1945
  var H;
1946
1946
  o && o.forEach((W) => y(W, null, { shouldDirty: !0, shouldValidate: O })), v && v((H = q.target) != null && H.value ? Number(q.target.value) ?? null : null);
1947
1947
  }
1948
- }), isInvalid: V, hidden: u, disabled: z, className: "w-100 luminus-numeric-stepper", step: f, min: b, max: h }),
1948
+ }), isInvalid: F, hidden: u, disabled: z, className: "w-100 luminus-numeric-stepper", step: f, min: b, max: h }),
1949
1949
  /* @__PURE__ */ a.jsx("div", { className: "stepper-icon left", children: !d && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (q) => {
1950
- q.preventDefault(), q.stopPropagation(), M(t, ((F ? Number(F) : 0) - m).toString(), { shouldDirty: !0, shouldValidate: O });
1950
+ q.preventDefault(), q.stopPropagation(), M(t, ((V ? Number(V) : 0) - m).toString(), { shouldDirty: !0, shouldValidate: O });
1951
1951
  }, children: /* @__PURE__ */ a.jsx(ks, {}) }) }),
1952
1952
  /* @__PURE__ */ a.jsx("div", { className: "stepper-icon right", children: !d && /* @__PURE__ */ a.jsx(te, { size: "sm", onClick: (q) => {
1953
- q.preventDefault(), q.stopPropagation(), M(t, ((F ? Number(F) : 0) + m).toString(), { shouldDirty: !0, shouldValidate: O });
1953
+ q.preventDefault(), q.stopPropagation(), M(t, ((V ? Number(V) : 0) + m).toString(), { shouldDirty: !0, shouldValidate: O });
1954
1954
  }, children: /* @__PURE__ */ a.jsx(Bs, {}) }) })
1955
1955
  ] }),
1956
1956
  s && N(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: S, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
1957
1957
  E && /* @__PURE__ */ a.jsx(en, { message: E.message })
1958
1958
  ] });
1959
1959
  }, oN = ({ InputContainer: e = Te, formField: t, label: n, placeholder: r, resetsFields: i, showClearIcon: o, clearValue: s, required: l, hidden: c, disabled: u, withoutLabel: d, step: p, size: f, CustomOnChangeComponent: m, noSelectOnFocus: g, className: b, decimalScale: h = 2, fixedDecimalScale: v = !1, numberPrefix: x, numberSuffix: j, min: w, max: y, onChange: N, hint: C }) => {
1960
- const { formState: E, setValue: I, watch: O, control: R } = Ct(), M = Dt({ falseIfNotInit: !0 }), [S, P] = B(void 0), [z, V] = B(!1), F = A(() => {
1960
+ const { formState: E, setValue: I, watch: O, control: T } = Ct(), M = Dt({ falseIfNotInit: !0 }), [S, P] = B(void 0), [z, F] = B(!1), V = R(() => {
1961
1961
  const K = s ?? null;
1962
1962
  I(t, K !== null ? Number(K) : null, {
1963
1963
  shouldDirty: !0,
1964
1964
  shouldValidate: z
1965
1965
  });
1966
- }, [s, I, t, z]), q = A(() => {
1966
+ }, [s, I, t, z]), q = R(() => {
1967
1967
  const K = t.split(".");
1968
1968
  let Z = E.errors;
1969
1969
  K.forEach((ne) => {
@@ -1973,16 +1973,16 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1973
1973
  U(() => {
1974
1974
  q();
1975
1975
  }, [q]), U(() => {
1976
- E.isSubmitted && V(!0);
1976
+ E.isSubmitted && F(!0);
1977
1977
  }, [E]);
1978
1978
  const W = O(t);
1979
1979
  U(() => {
1980
1980
  y !== void 0 && W > y && I(t, y), w !== void 0 && W < w && I(t, w);
1981
1981
  }, [t, W, y, w, I]);
1982
- const T = S !== void 0;
1983
- return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled: H, hidden: c, withoutLabel: d, isInvalid: T, hint: C, className: b, children: [
1982
+ const A = S !== void 0;
1983
+ return /* @__PURE__ */ a.jsxs(e, { label: n ?? "", required: l, disabled: H, hidden: c, withoutLabel: d, isInvalid: A, hint: C, className: b, children: [
1984
1984
  /* @__PURE__ */ a.jsxs("div", { className: "luminus-input-container position-relative w-100", children: [
1985
- /* @__PURE__ */ a.jsx(Za, { control: R, name: t, render: ({ field: { ref: K, onChange: Z, name: ne, value: ve } }) => /* @__PURE__ */ a.jsx(ii, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix: x, suffix: j, defaultValue: "", name: ne, value: ve ?? "", placeholder: r ?? n, onFocus: (se) => {
1985
+ /* @__PURE__ */ a.jsx(Za, { control: T, name: t, render: ({ field: { ref: K, onChange: Z, name: ne, value: ve } }) => /* @__PURE__ */ a.jsx(ii, { displayType: "input", thousandSeparator: " ", decimalSeparator: ",", decimalScale: h, fixedDecimalScale: v, prefix: x, suffix: j, defaultValue: "", name: ne, value: ve ?? "", placeholder: r ?? n, onFocus: (se) => {
1986
1986
  !g && se.target.select();
1987
1987
  }, onChange: (se) => {
1988
1988
  var Ce, me;
@@ -1991,13 +1991,13 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
1991
1991
  const le = Q == null || Number.isNaN(Q) ? null : Number(Q);
1992
1992
  Z(le), N && N(le);
1993
1993
  }, hidden: c, disabled: H, className: _("form-control text-end w-100", {
1994
- "is-invalid": T
1994
+ "is-invalid": A
1995
1995
  }, {
1996
1996
  [`form-control-${f}`]: f
1997
1997
  }), step: p, getInputRef: K, min: w, max: y }) }),
1998
1998
  m && /* @__PURE__ */ a.jsx("div", { className: "custom-picker-button", children: m })
1999
1999
  ] }),
2000
- o && O(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: F, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
2000
+ o && O(t) && /* @__PURE__ */ a.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ a.jsx(te, { color: "secondary", size: "sm", onClick: V, children: /* @__PURE__ */ a.jsx(Bt, {}) }) }),
2001
2001
  S && /* @__PURE__ */ a.jsx(en, { message: S.message })
2002
2002
  ] });
2003
2003
  }, sN = ({ color: e = "primary", icon: t = /* @__PURE__ */ a.jsx(jd, { size: 12 }), inputId: n = "context-file-input", accept: r = "*", onUpload: i, multiple: o, className: s, children: l, ...c }) => {
@@ -2036,9 +2036,20 @@ const Fp = ({ InputContainer: e = Zt, value: t, onChange: n, debounceMs: r, labe
2036
2036
  e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo = (e) => !e.member && !e.isDrillThrough, co = (e, t) => typeof e == "function" ? e(t) : e.replace(":id", t), Wp = ({ dataSource: e, settings: t, pivotRef: n, localization: r, licenseKey: i, hyperlinkColumn: o, roomPasportization: s, enabled: l = !0 }) => {
2037
2037
  const { texts: { reports: c } } = $(X), [u, d] = B(!1), p = ae(null), f = n ?? p, m = k(() => ({
2038
2038
  localization: r
2039
- }), [r]), g = A((w) => {
2040
- delete w[0], delete w[1], delete w[2];
2041
- const y = [
2039
+ }), [r]), g = R((y) => {
2040
+ const N = y.find((E) => E.id === "fm-tab-export");
2041
+ if ((N == null ? void 0 : N.menu) == null || f.current == null)
2042
+ return y;
2043
+ const C = N.menu.find((E) => E.id === "fm-tab-export-pdf");
2044
+ return C && (C.handler = () => {
2045
+ f.current.flexmonster.exportTo("pdf", {
2046
+ useCustomizeCellForData: !0,
2047
+ fontUrl: "https://cdn.flexmonster.com/fonts/NotoSans-Regular.ttf"
2048
+ });
2049
+ }), y;
2050
+ }, [f]), b = R((y) => {
2051
+ y = g(y), delete y[0], delete y[1], delete y[2];
2052
+ const N = [
2042
2053
  {
2043
2054
  id: "fm-tab-expand",
2044
2055
  title: c.expandAll,
@@ -2052,110 +2063,116 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2052
2063
  icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'
2053
2064
  }
2054
2065
  ];
2055
- return w.unshift({
2066
+ return y.unshift({
2056
2067
  id: "fm-tab-expand",
2057
2068
  title: c.expand,
2058
2069
  icon: '<svg height="42" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d=" M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z "/></svg>',
2059
- menu: y,
2070
+ menu: N,
2060
2071
  rightGroup: !0
2061
- }), w;
2062
- }, [f, c.collapseAll, c.expand, c.expandAll]), b = (w) => {
2063
- const y = w.getTabs();
2064
- w.getTabs = () => g(y);
2065
- }, h = k(() => e && e.mapping ? Object.values(e.mapping).filter((w) => w.caption.includes("P:")).map((w) => ({ uniqueName: w.caption.replace("P:", ""), caption: w.caption })) : [], [e]), v = k(() => {
2066
- var y, N, C, E;
2067
- const w = (y = f.current) == null ? void 0 : y.flexmonster.getReport();
2068
- return w && w.slice ? {
2069
- ...w.slice,
2072
+ }), y;
2073
+ }, [
2074
+ f,
2075
+ c.collapseAll,
2076
+ c.expand,
2077
+ c.expandAll,
2078
+ g
2079
+ ]), h = (y) => {
2080
+ const N = y.getTabs();
2081
+ y.getTabs = () => b(N);
2082
+ }, v = k(() => e && e.mapping ? Object.values(e.mapping).filter((y) => y.caption.includes("P:")).map((y) => ({ uniqueName: y.caption.replace("P:", ""), caption: y.caption })) : [], [e]), x = k(() => {
2083
+ var N, C, E, I;
2084
+ const y = (N = f.current) == null ? void 0 : N.flexmonster.getReport();
2085
+ return y && y.slice ? {
2086
+ ...y.slice,
2070
2087
  rows: [
2071
- ...((N = w.slice.rows) == null ? void 0 : N.filter((I) => {
2072
- var O;
2073
- return !((O = I.caption) != null && O.includes("P:"));
2088
+ ...((C = y.slice.rows) == null ? void 0 : C.filter((O) => {
2089
+ var T;
2090
+ return !((T = O.caption) != null && T.includes("P:"));
2074
2091
  })) ?? [],
2075
- ...h
2092
+ ...v
2076
2093
  ],
2077
2094
  columns: [
2078
- ...((C = w.slice.columns) == null ? void 0 : C.filter((I) => {
2079
- var O;
2080
- return !((O = I.caption) != null && O.includes("P:"));
2095
+ ...((E = y.slice.columns) == null ? void 0 : E.filter((O) => {
2096
+ var T;
2097
+ return !((T = O.caption) != null && T.includes("P:"));
2081
2098
  })) ?? [],
2082
- ...h
2099
+ ...v
2083
2100
  ],
2084
2101
  measures: [
2085
- ...((E = w.slice.measures) == null ? void 0 : E.filter((I) => {
2086
- var O;
2087
- return !((O = I.caption) != null && O.includes("P:"));
2102
+ ...((I = y.slice.measures) == null ? void 0 : I.filter((O) => {
2103
+ var T;
2104
+ return !((T = O.caption) != null && T.includes("P:"));
2088
2105
  })) ?? [],
2089
- ...h
2106
+ ...v
2090
2107
  ]
2091
2108
  } : null;
2092
- }, [h, f]);
2109
+ }, [v, f]);
2093
2110
  U(() => {
2094
- var w, y, N, C;
2111
+ var y, N, C, E;
2095
2112
  if (u && l) {
2096
- if (s && v) {
2097
- const E = (w = f.current) == null ? void 0 : w.flexmonster.getReport(), I = E && E.options ? {
2098
- ...E.options,
2099
- grid: { ...(y = E.options) == null ? void 0 : y.grid, autoSwitchToCompact: !1 }
2113
+ if (s && x) {
2114
+ const I = (y = f.current) == null ? void 0 : y.flexmonster.getReport(), O = I && I.options ? {
2115
+ ...I.options,
2116
+ grid: { ...(N = I.options) == null ? void 0 : N.grid, autoSwitchToCompact: !1 }
2100
2117
  } : {};
2101
- (N = f.current) == null || N.flexmonster.setReport({
2102
- ...E,
2118
+ (C = f.current) == null || C.flexmonster.setReport({
2119
+ ...I,
2103
2120
  dataSource: e,
2104
- slice: v,
2105
- options: I
2121
+ slice: x,
2122
+ options: O
2106
2123
  });
2107
2124
  } else
2108
- (C = f.current) == null || C.flexmonster.updateData(e);
2125
+ (E = f.current) == null || E.flexmonster.updateData(e);
2109
2126
  console.log("Updating flexmonster dataSource to: ", e);
2110
2127
  }
2111
- }, [e, l, u, h, f, s, v]), U(() => {
2112
- var w, y, N, C, E;
2113
- if (u && l && t !== void 0) {
2114
- const I = (w = f.current) == null ? void 0 : w.flexmonster.getReport();
2115
- if (I === void 0 || typeof I == "string")
2116
- return;
2117
- const O = Up(t);
2118
- O.options = {
2119
- ...t == null ? void 0 : t.options,
2120
- grid: { ...(y = t == null ? void 0 : t.options) == null ? void 0 : y.grid, autoSwitchToCompact: !1 },
2121
- showFieldListSearch: !0,
2122
- datePattern: "dd.MM.yyyy",
2123
- dateTimePattern: "dd.MM.yyyy HH:mm:ss"
2124
- }, s && (O.slice = {
2125
- ...t == null ? void 0 : t.slice,
2126
- rows: [
2127
- ...((C = (N = t == null ? void 0 : t.slice) == null ? void 0 : N.rows) == null ? void 0 : C.filter((M) => {
2128
- var S;
2129
- return !((S = M.caption) != null && S.includes("P:"));
2130
- })) ?? [],
2131
- ...h
2132
- ]
2133
- });
2134
- const R = { ...I, ...O };
2135
- (E = f.current) == null || E.flexmonster.setReport(R), console.log("Refreshing flexmonster settings. New report: ", R);
2136
- }
2137
- }, [l, u, h, f, s, t]);
2138
- const x = A((w, y) => {
2139
- var M, S;
2140
- if (Hp(y)) {
2141
- w.text = ((M = y.member) == null ? void 0 : M.caption) ?? "";
2142
- const P = w.style["padding-left"] ?? "4px", z = parseInt(P, 10);
2143
- w.style["padding-left"] = z + 11 + "px";
2144
- }
2145
- if (!o || !so(y, o.idColumn) || lo(y))
2128
+ }, [e, l, u, v, f, s, x]), U(() => {
2129
+ var E, I, O, T, M;
2130
+ if (!u || !l || t == null)
2146
2131
  return;
2147
- const N = (S = y.escapedLabel) == null ? void 0 : S.toString();
2148
- if (N === void 0)
2132
+ const y = (E = f.current) == null ? void 0 : E.flexmonster.getReport();
2133
+ if (y === void 0 || typeof y == "string")
2149
2134
  return;
2150
- const C = co(o.url, N), E = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", I = y.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", O = y.isDrillThrough || y.type === "header" ? `href='${C}' target='_blank'` : "";
2151
- w.style && (w.style["z-index"] = 1);
2152
- const R = `<a ${O} ${E} ${I}>${y.escapedLabel}</a>`;
2153
- w.text = R;
2154
- }, [o]), j = A((w) => {
2155
- if (!o || !so(w, o.idColumn) || lo(w))
2135
+ const N = Up(t);
2136
+ N.options = {
2137
+ ...t == null ? void 0 : t.options,
2138
+ grid: { ...(I = t == null ? void 0 : t.options) == null ? void 0 : I.grid, autoSwitchToCompact: !1 },
2139
+ showFieldListSearch: !0,
2140
+ datePattern: "dd.MM.yyyy",
2141
+ dateTimePattern: "dd.MM.yyyy HH:mm:ss"
2142
+ }, s && (N.slice = {
2143
+ ...t == null ? void 0 : t.slice,
2144
+ rows: [
2145
+ ...((T = (O = t == null ? void 0 : t.slice) == null ? void 0 : O.rows) == null ? void 0 : T.filter((S) => {
2146
+ var P;
2147
+ return !((P = S.caption) != null && P.includes("P:"));
2148
+ })) ?? [],
2149
+ ...v
2150
+ ]
2151
+ });
2152
+ const C = { ...y, ...N };
2153
+ (M = f.current) == null || M.flexmonster.setReport(C);
2154
+ }, [l, u, v, f, s, t]);
2155
+ const j = R((y, N) => {
2156
+ var S, P;
2157
+ if (Hp(N)) {
2158
+ y.text = ((S = N.member) == null ? void 0 : S.caption) ?? "";
2159
+ const z = y.style["padding-left"] ?? "4px", F = parseInt(z, 10);
2160
+ y.style["padding-left"] = F + 11 + "px";
2161
+ }
2162
+ if (!o || !so(N, o.idColumn) || lo(N))
2163
+ return;
2164
+ const C = (P = N.escapedLabel) == null ? void 0 : P.toString();
2165
+ if (C === void 0)
2156
2166
  return;
2157
- const y = co(o.url, w.escapedLabel ?? "");
2158
- window.open(y ?? "", "_blank", "noreferrer");
2167
+ const E = co(o.url, C), I = "style='color: #00a45a; text-decoration: underline; cursor: pointer;'", O = N.type === "header" ? "onclick='event.stopImmediatePropagation()'" : "", T = N.isDrillThrough || N.type === "header" ? `href='${E}' target='_blank'` : "";
2168
+ y.style && (y.style["z-index"] = 1);
2169
+ const M = `<a ${T} ${I} ${O}>${N.escapedLabel}</a>`;
2170
+ y.text = M;
2171
+ }, [o]), w = R((y) => {
2172
+ if (!o || !so(y, o.idColumn) || lo(y))
2173
+ return;
2174
+ const N = co(o.url, y.escapedLabel ?? "");
2175
+ window.open(N ?? "", "_blank", "noreferrer");
2159
2176
  }, [o]);
2160
2177
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
2161
2178
  bu,
@@ -2165,17 +2182,17 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2165
2182
  licenseKey: i,
2166
2183
  toolbar: !0,
2167
2184
  height: "100%",
2168
- beforetoolbarcreated: b,
2185
+ beforetoolbarcreated: h,
2169
2186
  ready: () => {
2170
2187
  d(!0);
2171
2188
  },
2172
2189
  width: "100%",
2173
- customizeCell: x,
2174
- cellclick: j
2190
+ customizeCell: j,
2191
+ cellclick: w
2175
2192
  }
2176
2193
  ) });
2177
2194
  }, zp = (e, t, n, r) => {
2178
- const { texts: { reports: i } } = $(X), { prompt: o } = Nd(), { confirm: s } = St(), l = Ke(), { user: c } = $(Lt), { startLoading: u, stopLoading: d } = $(xt), { addNotification: p } = tn(), f = A(async (v) => {
2195
+ const { texts: { reports: i } } = $(X), { prompt: o } = Nd(), { confirm: s } = St(), l = Ke(), { user: c } = $(Lt), { startLoading: u, stopLoading: d } = $(xt), { addNotification: p } = tn(), f = R(async (v) => {
2179
2196
  u("report-versionSavingAs");
2180
2197
  try {
2181
2198
  const x = await l.post("/reports/version", v);
@@ -2183,7 +2200,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2183
2200
  } finally {
2184
2201
  d("report-versionSavingAs");
2185
2202
  }
2186
- }, [p, r, l, i.saveSuccessful, u, d]), m = A(async () => {
2203
+ }, [p, r, l, i.saveSuccessful, u, d]), m = R(async () => {
2187
2204
  if (n === null) {
2188
2205
  p("none open", "warning");
2189
2206
  return;
@@ -2204,7 +2221,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2204
2221
  i.confirmOverwriteSave,
2205
2222
  f,
2206
2223
  n
2207
- ]), g = A(async () => {
2224
+ ]), g = R(async () => {
2208
2225
  const v = await o(i.enterName, { input: "input", required: !0 });
2209
2226
  if (v === null)
2210
2227
  return;
@@ -2214,7 +2231,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2214
2231
  name: v,
2215
2232
  settings: x
2216
2233
  });
2217
- }, [t, o, e, i.enterName, f]), b = A(async () => {
2234
+ }, [t, o, e, i.enterName, f]), b = R(async () => {
2218
2235
  u("report-versionSavingAs");
2219
2236
  try {
2220
2237
  await l.post("/reports/version", {
@@ -2233,7 +2250,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2233
2250
  n,
2234
2251
  u,
2235
2252
  d
2236
- ]), h = A(async () => {
2253
+ ]), h = R(async () => {
2237
2254
  u("report-versionSavingAs");
2238
2255
  try {
2239
2256
  await l.post("/reports/version-restrictions", {
@@ -2260,7 +2277,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2260
2277
  return { saveAs: g, save: m, archive: b, detach: h };
2261
2278
  }, qp = (e) => {
2262
2279
  const t = Ke(), { startLoading: n, stopLoading: r } = $(xt);
2263
- return { changeEmployeeRights: A(async (o, s) => {
2280
+ return { changeEmployeeRights: R(async (o, s) => {
2264
2281
  let l = null;
2265
2282
  n("reportSharing-addPerson");
2266
2283
  try {
@@ -2279,17 +2296,17 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2279
2296
  return l;
2280
2297
  }, [t, e, n, r]) };
2281
2298
  }, Yp = ({ isOpen: e, onHide: t, usersData: n, reportVersionId: r, EmployeePicker: i, setReportVersion: o }) => {
2282
- const { ProjectIconComponent: s, texts: { reports: l } } = $(X), { confirm: c } = St(), [u, d] = B(null), { changeEmployeeRights: p } = qp(r), f = A((b) => {
2299
+ const { ProjectIconComponent: s, texts: { reports: l } } = $(X), { confirm: c } = St(), [u, d] = B(null), { changeEmployeeRights: p } = qp(r), f = R((b) => {
2283
2300
  o((h) => h === null ? null : {
2284
2301
  ...h,
2285
2302
  users: b.filter((v) => v.isReportOwner === !1)
2286
2303
  });
2287
- }, [o]), m = A(async () => {
2304
+ }, [o]), m = R(async () => {
2288
2305
  if (u === null)
2289
2306
  return;
2290
2307
  const b = await p(u.id, !0);
2291
2308
  f(b), d(null);
2292
- }, [u, p, f]), g = A(async (b) => {
2309
+ }, [u, p, f]), g = R(async (b) => {
2293
2310
  if (!await c(l.removeSharingWith(b)))
2294
2311
  return;
2295
2312
  const v = await p(b, !1);
@@ -2333,47 +2350,47 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2333
2350
  });
2334
2351
  }, [t, e]), { mappings: n };
2335
2352
  }, lN = ({ reportType: e, title: t, data: n, filterElements: r, getReportRoute: i, localization: o, licenseKey: s, EmployeePicker: l, localizationJsonFile: c, localizationTransformer: u, hyperlinkColumn: d, roomPasportization: p = !1 }) => {
2336
- const { texts: { reports: f } } = $(X), { confirm: m } = St(), g = Mr(), [b] = gu(), { id: h } = qs(), v = k(() => h === void 0 ? null : Number(h), [h]), x = A((Q) => {
2353
+ const { texts: { reports: f } } = $(X), { confirm: m } = St(), g = Mr(), [b] = gu(), { id: h } = qs(), v = k(() => h === void 0 ? null : Number(h), [h]), x = R((Q) => {
2337
2354
  const le = Q === null ? "" : Q.toString();
2338
2355
  g(vn(i(e), { id: le }) + "?" + b.toString(), {
2339
2356
  replace: !0,
2340
2357
  flushSync: !0
2341
2358
  });
2342
- }, [i, g, e, b]), [j, w] = B(!1), y = ae(null), { user: N } = $(Lt), { data: C, reloadData: E } = Be(`/reports/${e}`), { mappings: I } = Kp(c, u), [O, R] = B(void 0), M = A((Q) => {
2359
+ }, [i, g, e, b]), [j, w] = B(!1), y = ae(null), { user: N } = $(Lt), { data: C, reloadData: E } = Be(`/reports/${e}`), { mappings: I } = Kp(c, u), [O, T] = B(void 0), M = R((Q) => {
2343
2360
  const le = Q.target.value, Ce = le === "" ? null : Number(le);
2344
2361
  x(Ce);
2345
- }, [x]), S = A(async (Q) => {
2362
+ }, [x]), S = R(async (Q) => {
2346
2363
  await E(), x(Q);
2347
- }, [E, x]), { data: P, setData: z, isLoading: V } = Be(`/reports/version/${v}`, {
2364
+ }, [E, x]), { data: P, setData: z, isLoading: F } = Be(`/reports/version/${v}`, {
2348
2365
  enabled: v !== null,
2349
2366
  nullStateBeforeLoad: !1,
2350
2367
  nullStateOnFail: !0
2351
2368
  });
2352
2369
  U(() => {
2353
2370
  var le;
2354
- if (V) {
2355
- R(void 0);
2371
+ if (F) {
2372
+ T(void 0);
2356
2373
  return;
2357
2374
  }
2358
2375
  if (P === null) {
2359
- R({});
2376
+ T({});
2360
2377
  return;
2361
2378
  }
2362
2379
  const Q = Gp(P) ?? {};
2363
- R(Q), (le = y.current) == null || le.flexmonster.refresh();
2364
- }, [P, V]);
2365
- const { save: F, saveAs: q, archive: H, detach: W } = zp(e, y, v, S), T = k(() => ({
2380
+ T(Q), (le = y.current) == null || le.flexmonster.refresh();
2381
+ }, [P, F]);
2382
+ const { save: V, saveAs: q, archive: H, detach: W } = zp(e, y, v, S), A = k(() => ({
2366
2383
  data: n ?? [],
2367
2384
  mapping: I ?? void 0
2368
- }), [n, I]), K = A(async () => {
2385
+ }), [n, I]), K = R(async () => {
2369
2386
  var le;
2370
- await m(f.confirmRevertChanges) && ((le = y.current) == null || le.flexmonster.setReport({ dataSource: T, ...O }));
2371
- }, [m, T, f.confirmRevertChanges, O]), Z = k(() => (P == null ? void 0 : P.ownerId) === N.personalNumber, [P == null ? void 0 : P.ownerId, N.personalNumber]), ne = k(() => {
2387
+ await m(f.confirmRevertChanges) && ((le = y.current) == null || le.flexmonster.setReport({ dataSource: A, ...O }));
2388
+ }, [m, A, f.confirmRevertChanges, O]), Z = k(() => (P == null ? void 0 : P.ownerId) === N.personalNumber, [P == null ? void 0 : P.ownerId, N.personalNumber]), ne = k(() => {
2372
2389
  var Q;
2373
2390
  return (Q = P == null ? void 0 : P.users) == null ? void 0 : Q.some((le) => le.id === N.personalNumber && !le.isReportOwner);
2374
- }, [P == null ? void 0 : P.users, N.personalNumber]), ve = A(async () => {
2391
+ }, [P == null ? void 0 : P.users, N.personalNumber]), ve = R(async () => {
2375
2392
  await m(f.confirmDelete(P == null ? void 0 : P.name)) && (await H(), x(null), await E());
2376
- }, [H, m, E, P == null ? void 0 : P.name, f, x]), se = A(async () => {
2393
+ }, [H, m, E, P == null ? void 0 : P.name, f, x]), se = R(async () => {
2377
2394
  await m(f.confirmDetach(P == null ? void 0 : P.name)) && (await W(), x(null), await E());
2378
2395
  }, [m, W, E, P == null ? void 0 : P.name, f, x]);
2379
2396
  return U(() => {
@@ -2389,7 +2406,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2389
2406
  /* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectYour, children: C == null ? void 0 : C.reportVersions.filter((Q) => Q.ownerId === N.personalNumber).map((Q) => /* @__PURE__ */ a.jsx("option", { value: Q.reportVersionId, children: Q.name }, Q.reportVersionId)) }),
2390
2407
  /* @__PURE__ */ a.jsx("optgroup", { label: f.versionSelectSharedWithYou, children: C == null ? void 0 : C.reportVersions.filter((Q) => Q.isSystem === !1 && Q.ownerId !== N.personalNumber).map((Q) => /* @__PURE__ */ a.jsx("option", { value: Q.reportVersionId, children: `${Q.name} [${Q.ownerId}]` }, Q.reportVersionId)) })
2391
2408
  ] }),
2392
- /* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Sd, {}), onClick: F, disabled: v === null || (P == null ? void 0 : P.isSystem) || !Z, children: f.save }),
2409
+ /* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Sd, {}), onClick: V, disabled: v === null || (P == null ? void 0 : P.isSystem) || !Z, children: f.save }),
2393
2410
  /* @__PURE__ */ a.jsx(dt, { icon: /* @__PURE__ */ a.jsx(Cd, {}), onClick: q, className: "flex-shrink-0", children: f.saveAs }),
2394
2411
  /* @__PURE__ */ a.jsxs(Mt, { toggle: /* @__PURE__ */ a.jsx(Ft, { as: nn }), children: [
2395
2412
  /* @__PURE__ */ a.jsx(Ye, { onClick: K, children: f.revertChanges }),
@@ -2398,7 +2415,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2398
2415
  ne && !(P != null && P.isSystem) ? /* @__PURE__ */ a.jsx(Ye, { color: "danger", onClick: se, children: f.detach }) : null
2399
2416
  ] })
2400
2417
  ] })
2401
- ] }), children: /* @__PURE__ */ a.jsx("div", { className: _("h-100 w-100", T.data && T.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ a.jsx(Wp, { dataSource: T, settings: O, pivotRef: y, enabled: T.data && T.data.length > 0, roomPasportization: p, localization: o, licenseKey: s, hyperlinkColumn: d }) }) }),
2418
+ ] }), children: /* @__PURE__ */ a.jsx("div", { className: _("h-100 w-100", A.data && A.data.length > 0 ? "" : "d-none"), children: /* @__PURE__ */ a.jsx(Wp, { dataSource: A, settings: O, pivotRef: y, enabled: A.data && A.data.length > 0, roomPasportization: p, localization: o, licenseKey: s, hyperlinkColumn: d }) }) }),
2402
2419
  P !== null ? /* @__PURE__ */ a.jsx(
2403
2420
  Yp,
2404
2421
  {
@@ -2465,13 +2482,13 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2465
2482
  apiGet: "/messageBoard",
2466
2483
  apiDelete: "/messageBoard/"
2467
2484
  }, dN = ({ renderAsNotifPanel: e, notifIcon: t, apiUrls: { apiGet: n = ta.apiGet, apiDelete: r = ta.apiDelete } = ta, getIcon: i, getLinksTo: o }) => {
2468
- const l = Ke(), [c, u] = B([]), [d, p] = B(!1), [f, m] = B(!1), [g, b] = B(!1), h = A(async () => {
2485
+ const l = Ke(), [c, u] = B([]), [d, p] = B(!1), [f, m] = B(!1), [g, b] = B(!1), h = R(async () => {
2469
2486
  m(!0), await l.get(n).then(({ data: y }) => {
2470
2487
  u(y), p(!0), m(!1);
2471
2488
  }).catch(() => {
2472
2489
  u([]), m(!1);
2473
2490
  });
2474
- }, [n, l]), v = A(async (y) => l.delete(`${r}${y}`).then(() => !0).catch(() => !1), [r, l]), x = A((y) => {
2491
+ }, [n, l]), v = R(async (y) => l.delete(`${r}${y}`).then(() => !0).catch(() => !1), [r, l]), x = R((y) => {
2475
2492
  v(y).then((N) => {
2476
2493
  N && u(c.filter((C) => C.id !== y));
2477
2494
  });
@@ -2547,9 +2564,9 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2547
2564
  }, ff = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteLocation: i }) => {
2548
2565
  const { ProjectIconComponent: o } = $(X), [s, l] = B(e.icon), [c, u] = B(e.name);
2549
2566
  console.log(s, typeof s);
2550
- const d = k(() => !(s === e.icon && c === e.name), [s, c, e.icon, e.name]), p = A(() => {
2567
+ const d = k(() => !(s === e.icon && c === e.name), [s, c, e.icon, e.name]), p = R(() => {
2551
2568
  l(e.icon), u(e.name);
2552
- }, [e]), f = A(() => {
2569
+ }, [e]), f = R(() => {
2553
2570
  r({ ...e, icon: s, name: c });
2554
2571
  }, [r, s, c, e]);
2555
2572
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
@@ -2564,7 +2581,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2564
2581
  ] }) })
2565
2582
  ] });
2566
2583
  }, mf = ({ shortcutLink: e, IconComponent: t, IconTypeArray: n, editShortcutLink: r, deleteShortcutLink: i }) => {
2567
- const o = A(() => {
2584
+ const o = R(() => {
2568
2585
  i(e.id);
2569
2586
  }, [i, e.id]);
2570
2587
  return /* @__PURE__ */ a.jsx("tr", { className: "mb-3", children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
@@ -2590,7 +2607,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2590
2607
  linkAddButton: vf,
2591
2608
  createLinkRow: hf
2592
2609
  }, bf = ({ shortcutLink: e, IconComponent: t }) => /* @__PURE__ */ a.jsx(ze, { text: e.name, placement: "bottom", children: /* @__PURE__ */ a.jsx(He, { to: e.url, className: fn.linkButton, children: /* @__PURE__ */ a.jsx(t, { icon: e.icon }) }) }), xf = ({ closeModal: e, isOpen: t, createLink: n, pageTitlePrefix: r, IconComponent: i, IconTypeArray: o }) => {
2593
- const s = vu(), { texts: l } = $(X), [c, u] = B("star-outline"), [d, p] = B(r ? document.title.replace(r, "") : document.title), f = A(async () => {
2610
+ const s = vu(), { texts: l } = $(X), [c, u] = B("star-outline"), [d, p] = B(r ? document.title.replace(r, "") : document.title), f = R(async () => {
2594
2611
  await n({ icon: c, name: d, url: s.pathname + s.search }), e();
2595
2612
  }, [e, n, c, s.pathname, s.search, d]), m = k(() => s.pathname + s.search, [s.pathname, s.search]);
2596
2613
  return /* @__PURE__ */ a.jsx(ue, { show: t, onHide: e, size: "sm", children: /* @__PURE__ */ a.jsxs("div", { onKeyDown: (g) => {
@@ -2629,21 +2646,21 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2629
2646
  o && /* @__PURE__ */ a.jsx(yf, { IconComponent: e, IconTypeArray: t, pageTitlePrefix: n, createLink: i })
2630
2647
  ] }) });
2631
2648
  }, wf = (e) => {
2632
- const t = Ke(), { startLoading: n, stopLoading: r } = $(xt), i = A(async (l) => {
2649
+ const t = Ke(), { startLoading: n, stopLoading: r } = $(xt), i = R(async (l) => {
2633
2650
  n("submit-createShortcutLink");
2634
2651
  try {
2635
2652
  await t.post(`/dynamicForms/insert?referenceId=${e}`, l);
2636
2653
  } finally {
2637
2654
  r("submit-createShortcutLink");
2638
2655
  }
2639
- }, [t, e, n, r]), o = A(async (l) => {
2656
+ }, [t, e, n, r]), o = R(async (l) => {
2640
2657
  n("submit-updateShortcutLink");
2641
2658
  try {
2642
2659
  await t.post(`/dynamicForms/update?referenceId=${e}`, l);
2643
2660
  } finally {
2644
2661
  r("submit-updateShortcutLink");
2645
2662
  }
2646
- }, [t, e, n, r]), s = A(async (l) => {
2663
+ }, [t, e, n, r]), s = R(async (l) => {
2647
2664
  n("delete-deleteShortcutLink");
2648
2665
  try {
2649
2666
  await t.delete(`/dynamicForms/delete?referenceId=${e}&pk=${l.toString()}`);
@@ -2661,19 +2678,19 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2661
2678
  throw new Error("Tried to make operation on null shortcutLinks.");
2662
2679
  return e;
2663
2680
  }, mN = ({ children: e, referenceId: t }) => {
2664
- const { user: n } = $(Lt), r = A((m) => m.map((g) => ({ id: g.id, icon: g.icon, name: g.name, url: g.url })), []), { data: i, reloadData: o } = Be(`/dynamicForms/lookup-data-all?referenceId=${t}&employee=${n == null ? void 0 : n.personalNumber}`, {
2681
+ const { user: n } = $(Lt), r = R((m) => m.map((g) => ({ id: g.id, icon: g.icon, name: g.name, url: g.url })), []), { data: i, reloadData: o } = Be(`/dynamicForms/lookup-data-all?referenceId=${t}&employee=${n == null ? void 0 : n.personalNumber}`, {
2665
2682
  silent: !0,
2666
2683
  dataTransformer: r,
2667
2684
  enabled: n !== null
2668
- }), { create: s, update: l, remove: c } = wf(t), u = A(async (m) => {
2685
+ }), { create: s, update: l, remove: c } = wf(t), u = R(async (m) => {
2669
2686
  const g = fo(n);
2670
2687
  if (jf(i).length >= Ta)
2671
2688
  throw new Error("Cannot add more shortcut links.");
2672
2689
  await s({ ...m, employee: g.personalNumber }), await o();
2673
- }, [s, o, i, n]), d = A(async (m) => {
2690
+ }, [s, o, i, n]), d = R(async (m) => {
2674
2691
  const g = fo(n);
2675
2692
  await l({ ...m, employee: g.personalNumber }), await o();
2676
- }, [o, l, n]), p = A(async (m) => {
2693
+ }, [o, l, n]), p = R(async (m) => {
2677
2694
  await c(m), await o();
2678
2695
  }, [o, c]), f = k(() => ({
2679
2696
  shortcutLinks: i,
@@ -2695,7 +2712,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2695
2712
  /* @__PURE__ */ a.jsx(te, { size: "sm", color: "danger", onClick: () => t(r.id), children: /* @__PURE__ */ a.jsx(n, { icon: "delete" }) })
2696
2713
  ] }, r.id)) });
2697
2714
  }, Df = ({ show: e, onHide: t, roles: n, onAddTarget: r, EmployeePicker: i, templateId: o }) => {
2698
- const { texts: { notifCentrum: s } } = $(X), [l, c] = B(null), [u, d] = B(null), [p, f] = B("R"), m = A(() => {
2715
+ const { texts: { notifCentrum: s } } = $(X), [l, c] = B(null), [u, d] = B(null), [p, f] = B("R"), m = R(() => {
2699
2716
  c(null), d(null), t();
2700
2717
  }, [t]);
2701
2718
  return /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: () => m(), children: [
@@ -2734,7 +2751,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2734
2751
  U(() => {
2735
2752
  n && (s(n.subjectTemplate), c(n.textTemplate));
2736
2753
  }, [n]);
2737
- const u = A(() => {
2754
+ const u = R(() => {
2738
2755
  !o || !l || (r(o, l), t());
2739
2756
  }, [l, r, t, o]);
2740
2757
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: n && /* @__PURE__ */ a.jsxs(ue, { show: e, onHide: t, size: "lg", scrollable: !0, children: [
@@ -2760,38 +2777,38 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2760
2777
  var q, H, W;
2761
2778
  const { texts: { notifCentrum: u }, ProjectIconComponent: d } = $(X), { confirm: p } = St(), [f, m] = B(null), [g, b] = B(null), [h, v] = B(!1), [x, j] = B(null), [w, y] = $n("notif-kind-id", null);
2762
2779
  U(() => {
2763
- var T;
2764
- e.length > 0 ? y(((T = e.at(0)) == null ? void 0 : T.id) ?? null) : y(null);
2780
+ var A;
2781
+ e.length > 0 ? y(((A = e.at(0)) == null ? void 0 : A.id) ?? null) : y(null);
2765
2782
  }, [e, y]);
2766
2783
  const [N, C] = B([]);
2767
2784
  U(() => {
2768
- w && n(w).then((T) => {
2769
- C(T);
2770
- }).catch((T) => {
2771
- console.log(T), C([]);
2785
+ w && n(w).then((A) => {
2786
+ C(A);
2787
+ }).catch((A) => {
2788
+ console.log(A), C([]);
2772
2789
  });
2773
2790
  }, [n, w]);
2774
- const [E, I] = $n("notif-action-id", ((q = N == null ? void 0 : N.at(0)) == null ? void 0 : q.id) ?? null), [O, R] = B([]);
2791
+ const [E, I] = $n("notif-action-id", ((q = N == null ? void 0 : N.at(0)) == null ? void 0 : q.id) ?? null), [O, T] = B([]);
2775
2792
  U(() => {
2776
- E === null || f === null || r(E, f).then((T) => {
2777
- R(T);
2778
- }).catch((T) => {
2779
- console.log(T), R([]);
2793
+ E === null || f === null || r(E, f).then((A) => {
2794
+ T(A);
2795
+ }).catch((A) => {
2796
+ console.log(A), T([]);
2780
2797
  });
2781
2798
  }, [n, r, E, w, f]);
2782
2799
  const [M, S] = B([]);
2783
2800
  U(() => {
2784
- E !== null && i(E).then((T) => {
2785
- S(T);
2786
- }).catch((T) => {
2787
- console.log(T), S([]);
2801
+ E !== null && i(E).then((A) => {
2802
+ S(A);
2803
+ }).catch((A) => {
2804
+ console.log(A), S([]);
2788
2805
  });
2789
2806
  }, [i, E]);
2790
2807
  const P = k(() => {
2791
- var T;
2792
- return !N || !E ? [] : ((T = N.find((K) => K.id === E)) == null ? void 0 : T.templates) ?? [];
2793
- }, [N, E]), z = A((T, K) => {
2794
- s(T, K).then((Z) => {
2808
+ var A;
2809
+ return !N || !E ? [] : ((A = N.find((K) => K.id === E)) == null ? void 0 : A.templates) ?? [];
2810
+ }, [N, E]), z = R((A, K) => {
2811
+ s(A, K).then((Z) => {
2795
2812
  C(N ? [
2796
2813
  ...N.map((ne) => ne.id !== E ? ne : {
2797
2814
  ...ne,
@@ -2801,23 +2818,23 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2801
2818
  })
2802
2819
  ] : []);
2803
2820
  }).catch((Z) => console.log(Z));
2804
- }, [N, s, E, f, C]), V = A((T, K) => {
2805
- f && l(f, T, K).then(() => {
2821
+ }, [N, s, E, f, C]), F = R((A, K) => {
2822
+ f && l(f, A, K).then(() => {
2806
2823
  C(N ? [
2807
2824
  ...N.map((Z) => Z.id !== E ? Z : {
2808
2825
  ...Z,
2809
2826
  templates: [
2810
- ...Z.templates.map((ne) => ne.id !== f ? ne : { ...ne, subjectTemplate: T, textTemplate: K })
2827
+ ...Z.templates.map((ne) => ne.id !== f ? ne : { ...ne, subjectTemplate: A, textTemplate: K })
2811
2828
  ]
2812
2829
  })
2813
2830
  ] : []);
2814
2831
  }).catch((Z) => console.log(Z));
2815
- }, [N, l, E, f]), F = A(async (T) => {
2816
- await p(u.confirmTargetDelete) && o(T).then(() => C(N ? [
2832
+ }, [N, l, E, f]), V = R(async (A) => {
2833
+ await p(u.confirmTargetDelete) && o(A).then(() => C(N ? [
2817
2834
  ...N.map((K) => K.id !== E ? K : {
2818
2835
  ...K,
2819
2836
  templates: [
2820
- ...K.templates.map((Z) => Z.id !== f ? Z : { ...Z, targets: Z.targets.filter((ne) => ne.id !== T) })
2837
+ ...K.templates.map((Z) => Z.id !== f ? Z : { ...Z, targets: Z.targets.filter((ne) => ne.id !== A) })
2821
2838
  ]
2822
2839
  })
2823
2840
  ] : []));
@@ -2825,30 +2842,30 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2825
2842
  return /* @__PURE__ */ a.jsxs("div", { className: "h-100 overflow-hidden", children: [
2826
2843
  /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between align-items-center mb-2", children: [
2827
2844
  /* @__PURE__ */ a.jsxs("div", { className: "row w-100", children: [
2828
- /* @__PURE__ */ a.jsx("div", { className: "col-2", children: /* @__PURE__ */ a.jsx(ft, { label: u.kind, size: "sm", noEmptyOption: !0, options: ((H = e.filter((T) => (T.targetSystem & t) > 0)) == null ? void 0 : H.map((T) => ({ id: T.id, name: T.name }))) ?? [], value: w ?? null, onChange: (T) => y(Number(T)), dropdownWidth: 200 }) }),
2829
- /* @__PURE__ */ a.jsx("div", { className: "col-3", children: /* @__PURE__ */ a.jsx(ft, { label: u.subkind, size: "sm", noEmptyOption: !0, options: (N == null ? void 0 : N.map((T) => ({ id: T.id, name: T.name }))) ?? [], value: E ?? null, onChange: (T) => I(Number(T)), dropdownWidth: 250 }) })
2845
+ /* @__PURE__ */ a.jsx("div", { className: "col-2", children: /* @__PURE__ */ a.jsx(ft, { label: u.kind, size: "sm", noEmptyOption: !0, options: ((H = e.filter((A) => (A.targetSystem & t) > 0)) == null ? void 0 : H.map((A) => ({ id: A.id, name: A.name }))) ?? [], value: w ?? null, onChange: (A) => y(Number(A)), dropdownWidth: 200 }) }),
2846
+ /* @__PURE__ */ a.jsx("div", { className: "col-3", children: /* @__PURE__ */ a.jsx(ft, { label: u.subkind, size: "sm", noEmptyOption: !0, options: (N == null ? void 0 : N.map((A) => ({ id: A.id, name: A.name }))) ?? [], value: E ?? null, onChange: (A) => I(Number(A)), dropdownWidth: 250 }) })
2830
2847
  ] }),
2831
2848
  /* @__PURE__ */ a.jsx(Xa, { children: /* @__PURE__ */ a.jsx(Nr, { hideOn: "always", cKey: "template-edit", onClick: () => v(!0), disabled: f === null, icon: /* @__PURE__ */ a.jsx(d, { icon: "edit" }), children: u.editTemplate }) })
2832
2849
  ] }),
2833
2850
  /* @__PURE__ */ a.jsxs("div", { className: "vh-100 overflow-hidden d-flex gap-1", children: [
2834
- /* @__PURE__ */ a.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ a.jsx(Sf, { templates: P, roles: M ?? [], onAddNotifTarget: z, onRemoveNotifTarget: F, selectedTemplateId: f, setSelectedTemplateId: (T) => {
2835
- m(T), b(null);
2851
+ /* @__PURE__ */ a.jsx("div", { className: "h-75 w-25 overflow-hidden", children: /* @__PURE__ */ a.jsx(Sf, { templates: P, roles: M ?? [], onAddNotifTarget: z, onRemoveNotifTarget: V, selectedTemplateId: f, setSelectedTemplateId: (A) => {
2852
+ m(A), b(null);
2836
2853
  }, EmployeePicker: c }) }),
2837
- f && /* @__PURE__ */ a.jsx("div", { className: "h-75 w-75 overflow-hidden border rounded bg-white", children: /* @__PURE__ */ a.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (g == null ? void 0 : g.message) ?? ((W = P.find((T) => T.id === f)) == null ? void 0 : W.textTemplate) }) }),
2854
+ f && /* @__PURE__ */ a.jsx("div", { className: "h-75 w-75 overflow-hidden border rounded bg-white", children: /* @__PURE__ */ a.jsx("iframe", { title: "notification", className: "w-100 h-100", srcDoc: (g == null ? void 0 : g.message) ?? ((W = P.find((A) => A.id === f)) == null ? void 0 : W.textTemplate) }) }),
2838
2855
  f && /* @__PURE__ */ a.jsx("div", { className: "w-25 h-75 overflow-y-scroll", children: O.length > 0 ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2839
- /* @__PURE__ */ a.jsx(Qe, { type: "text", value: x, onChange: (T) => j((T == null ? void 0 : T.toString()) ?? ""), InputContainer: Zt, label: u.historyLookup, size: "sm", className: "mx-1 mb-1" }),
2840
- /* @__PURE__ */ a.jsx("div", { children: O.filter((T) => {
2856
+ /* @__PURE__ */ a.jsx(Qe, { type: "text", value: x, onChange: (A) => j((A == null ? void 0 : A.toString()) ?? ""), InputContainer: Zt, label: u.historyLookup, size: "sm", className: "mx-1 mb-1" }),
2857
+ /* @__PURE__ */ a.jsx("div", { children: O.filter((A) => {
2841
2858
  var K;
2842
- return x ? (K = T.recipients) == null ? void 0 : K.map((Z) => Z.name).join(",").toLocaleLowerCase().includes(x) : T;
2843
- }).map((T) => {
2859
+ return x ? (K = A.recipients) == null ? void 0 : K.map((Z) => Z.name).join(",").toLocaleLowerCase().includes(x) : A;
2860
+ }).map((A) => {
2844
2861
  var K;
2845
- return /* @__PURE__ */ a.jsxs("div", { role: "button", onClick: () => b(T), className: `d-flex flex-column align-items-center bg-white border rounded w-auto p-2 mx-1 mb-1 ${(g == null ? void 0 : g.id) === T.id ? "border-primary" : ""}`, children: [
2846
- /* @__PURE__ */ a.jsx(L, { variant: "body", children: bt(T.date, "dd.MM.yyyy") }),
2847
- /* @__PURE__ */ a.jsx("div", { className: "d-flex gap-1", children: (K = T.recipients) == null ? void 0 : K.map((Z) => /* @__PURE__ */ a.jsx(L, { variant: "caption", children: `${Z.name}` }, Z.email)) })
2848
- ] }, T.id);
2862
+ return /* @__PURE__ */ a.jsxs("div", { role: "button", onClick: () => b(A), className: `d-flex flex-column align-items-center bg-white border rounded w-auto p-2 mx-1 mb-1 ${(g == null ? void 0 : g.id) === A.id ? "border-primary" : ""}`, children: [
2863
+ /* @__PURE__ */ a.jsx(L, { variant: "body", children: bt(A.date, "dd.MM.yyyy") }),
2864
+ /* @__PURE__ */ a.jsx("div", { className: "d-flex gap-1", children: (K = A.recipients) == null ? void 0 : K.map((Z) => /* @__PURE__ */ a.jsx(L, { variant: "caption", children: `${Z.name}` }, Z.email)) })
2865
+ ] }, A.id);
2849
2866
  }) })
2850
2867
  ] }) : /* @__PURE__ */ a.jsx(et, { variant: "warning", children: "Empty" }) }),
2851
- /* @__PURE__ */ a.jsx(Cf, { show: h, onHide: () => v(!1), template: P.find((T) => T.id === f) ?? null, onEdit: V })
2868
+ /* @__PURE__ */ a.jsx(Cf, { show: h, onHide: () => v(!1), template: P.find((A) => A.id === f) ?? null, onEdit: F })
2852
2869
  ] })
2853
2870
  ] });
2854
2871
  }, Ef = ({ history: e, onClick: t, BnfTableComponent: n }) => {
@@ -2911,7 +2928,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2911
2928
  type: "string",
2912
2929
  isVisible: !1
2913
2930
  }
2914
- ], [r]), o = A((s) => {
2931
+ ], [r]), o = R((s) => {
2915
2932
  t(s.id);
2916
2933
  }, [t]);
2917
2934
  return /* @__PURE__ */ a.jsx(n, { columnsDef: i, data: e, useScrollableContainer: !0, paginationMode: "enabled", bottomBarProps: { hideFullScreen: !0 }, onRowClick: o });
@@ -2979,9 +2996,9 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
2979
2996
  "browse-btn": "_browse-btn_9ka79_15",
2980
2997
  browseBtn: Of
2981
2998
  }, Pf = ({ file: e, onFileChange: t, onImport: n, children: r, multiple: i, accept: o }) => {
2982
- const { ProjectIconComponent: s, texts: { imports: l } } = $(X), c = A(async (d) => {
2999
+ const { ProjectIconComponent: s, texts: { imports: l } } = $(X), c = R(async (d) => {
2983
3000
  d.length > 0 && t(i === !0 ? [...d] : d[0]);
2984
- }, [e, i, t]), u = A((d) => {
3001
+ }, [e, i, t]), u = R((d) => {
2985
3002
  var f;
2986
3003
  d.preventDefault();
2987
3004
  const p = (f = d.dataTransfer) == null ? void 0 : f.files;
@@ -3008,7 +3025,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3008
3025
  ] })
3009
3026
  ] });
3010
3027
  }, hN = ({ otherSettingId: e, languageOptions: t, tableIdentifier: n, SettingsOutlet: r, BnfTableComponent: i, importLocalization: o }) => {
3011
- const { texts: { localizations: s } } = $(X), [l, c] = B(t[0].id), [u, d] = B(null), [p, f] = B(null), m = A(async () => {
3028
+ const { texts: { localizations: s } } = $(X), [l, c] = B(t[0].id), [u, d] = B(null), [p, f] = B(null), m = R(async () => {
3012
3029
  if (u === null)
3013
3030
  return;
3014
3031
  const g = await o({ file: u, lang: l });
@@ -3033,7 +3050,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3033
3050
  return "";
3034
3051
  const f = Tf(p, n);
3035
3052
  return p !== void 0 && f !== void 0 ? f : "";
3036
- }, [t, n, e]), [l, c] = B(s), u = A(async () => {
3053
+ }, [t, n, e]), [l, c] = B(s), u = R(async () => {
3037
3054
  await i([{ fileName: e + ".json", items: [{ key: n, value: l }] }]), await r();
3038
3055
  }, [n, r, i, e, l]), d = k(() => l !== s, [s, l]);
3039
3056
  return /* @__PURE__ */ a.jsxs("div", { className: "d-flex", children: [
@@ -3069,14 +3086,14 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3069
3086
  r = s;
3070
3087
  }
3071
3088
  }, bN = ({ languageOptions: e, envMode: t, getOtherSettingsUrl: n, downloadXls: r, saveChanges: i, localizationFilesOptions: o, remoteLocalesRoot: s }) => {
3072
- const { texts: { localizations: l }, ProjectIconComponent: c } = $(X), [u, d] = B(1), [p, f] = B(/* @__PURE__ */ new Map()), [m, g] = B(null), [b, h] = B(""), [v, x] = B(/* @__PURE__ */ new Set()), j = A((S) => {
3089
+ const { texts: { localizations: l }, ProjectIconComponent: c } = $(X), [u, d] = B(1), [p, f] = B(/* @__PURE__ */ new Map()), [m, g] = B(null), [b, h] = B(""), [v, x] = B(/* @__PURE__ */ new Set()), j = R((S) => {
3073
3090
  f(/* @__PURE__ */ new Map()), x(S);
3074
3091
  }, []), w = k(() => e.filter((S) => !v.has(S.id)), [v, e]), y = k(() => {
3075
3092
  if (p.size === 0)
3076
3093
  return [];
3077
3094
  const S = /* @__PURE__ */ new Set(), P = (H, W = "") => {
3078
3095
  if (typeof H[1] == "object") {
3079
- Object.entries(H[1]).forEach((T) => P(T, W + H[0] + "."));
3096
+ Object.entries(H[1]).forEach((A) => P(A, W + H[0] + "."));
3080
3097
  return;
3081
3098
  }
3082
3099
  S.add(W + H[0]);
@@ -3084,37 +3101,37 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3084
3101
  Array.from(p).forEach((H) => {
3085
3102
  Object.entries(H[1]).forEach((W) => P(W));
3086
3103
  });
3087
- const z = Array.from(S), V = o.find((H) => H.path === m);
3088
- return ((V == null ? void 0 : V.type) === "report" ? z.filter((H) => {
3104
+ const z = Array.from(S), F = o.find((H) => H.path === m);
3105
+ return ((F == null ? void 0 : F.type) === "report" ? z.filter((H) => {
3089
3106
  const W = H.split(".");
3090
3107
  return W[W.length - 1] === "caption";
3091
3108
  }) : z).map((H) => ({
3092
3109
  key: H,
3093
3110
  lngData: new Map(Array.from(v).map((W) => {
3094
- const T = p.get(W);
3111
+ const A = p.get(W);
3095
3112
  return [
3096
3113
  W,
3097
- (T === void 0 ? void 0 : Wf(T, H)) ?? ""
3114
+ (A === void 0 ? void 0 : Wf(A, H)) ?? ""
3098
3115
  ];
3099
3116
  }))
3100
3117
  }));
3101
- }, [p, o, m, v]), N = k(() => y.filter((S) => qe(S.key, b) || Array.from(S.lngData).some((P) => typeof (P == null ? void 0 : P[1]) != "string" ? !1 : qe((P == null ? void 0 : P[1]) ?? "", b))), [b, y]), C = k(() => Math.ceil(N.length / dr), [N.length]), E = A((S) => {
3118
+ }, [p, o, m, v]), N = k(() => y.filter((S) => qe(S.key, b) || Array.from(S.lngData).some((P) => typeof (P == null ? void 0 : P[1]) != "string" ? !1 : qe((P == null ? void 0 : P[1]) ?? "", b))), [b, y]), C = k(() => Math.ceil(N.length / dr), [N.length]), E = R((S) => {
3102
3119
  S !== null && d(() => Math.max(1, Math.min(S, C)));
3103
- }, [C]), I = A(async () => {
3120
+ }, [C]), I = R(async () => {
3104
3121
  if (m === null)
3105
3122
  return;
3106
3123
  const S = Array.from(v).map((z) => (async () => {
3107
- const V = await Ed.get(
3124
+ const F = await Ed.get(
3108
3125
  `${s}${m == null ? void 0 : m.replace("{{lng}}", z)}&v=${(/* @__PURE__ */ new Date()).getTime()}`,
3109
3126
  // &v to not hit browser cache
3110
3127
  { responseType: "json" }
3111
3128
  );
3112
- return [z, V.data];
3129
+ return [z, F.data];
3113
3130
  })()), P = await Promise.allSettled(S);
3114
3131
  f(new Map(P.map((z) => z.status === "fulfilled" ? z.value : ["", {}])));
3115
- }, [s, m, v]), O = A(async () => {
3132
+ }, [s, m, v]), O = R(async () => {
3116
3133
  I();
3117
- }, [I]), R = k(() => w.length > 0, [w.length]), M = k(() => v.size + 1 + (R ? 1 : 0), [R, v.size]);
3134
+ }, [I]), T = k(() => w.length > 0, [w.length]), M = k(() => v.size + 1 + (T ? 1 : 0), [T, v.size]);
3118
3135
  return U(() => {
3119
3136
  E(u);
3120
3137
  }, [E, u, N]), U(() => {
@@ -3126,7 +3143,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3126
3143
  l.envNotConnectedToRemote(t.toUpperCase())
3127
3144
  ] }) }) : /* @__PURE__ */ a.jsx(Nt, { title: /* @__PURE__ */ a.jsx("div", { className: "d-flex gap-4", children: /* @__PURE__ */ a.jsx(L, { variant: "h3", children: l.localizationSettings }) }), helmet: l.localizationSettings, variant: "fullScreen", children: /* @__PURE__ */ a.jsxs("div", { className: $e.keysTable, style: {
3128
3145
  "--keys-table-columns": M,
3129
- "--adding-column": R ? 1 : 0
3146
+ "--adding-column": T ? 1 : 0
3130
3147
  }, children: [
3131
3148
  /* @__PURE__ */ a.jsxs("div", { className: _($e.tableFullWidth, "d-flex align-items-center justify-content-between gap-2 px-2 mt-1"), children: [
3132
3149
  /* @__PURE__ */ a.jsx(ft, { options: o.map((S) => ({
@@ -3144,8 +3161,8 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3144
3161
  ] }),
3145
3162
  /* @__PURE__ */ a.jsxs("div", { className: _($e.subgrid, $e.lngSelectRow), children: [
3146
3163
  /* @__PURE__ */ a.jsx(L, { variant: "body", children: l.key }),
3147
- Array.from(v).map((S, P) => /* @__PURE__ */ a.jsx(ft, { options: e.filter((z) => z.id === S || !v.has(z.id)), value: S, onChange: (z) => j((V) => z === null ? (V.delete(S), new Set(V)) : (typeof z == "string" && (V.delete(S), V.add(z)), new Set(V))), size: "sm", label: `${l.language} ${P + 1}`, withoutLabel: !0, InputContainer: Te, className: _($e.lngSelect) }, S)),
3148
- R ? /* @__PURE__ */ a.jsx(ft, { options: w, value: null, onChange: (S) => j((P) => (typeof S == "string" && P.add(S), new Set(P))), size: "sm", label: l.addLanguage, InputContainer: Te, className: _($e.lngSelect, $e.addLng) }) : null
3164
+ Array.from(v).map((S, P) => /* @__PURE__ */ a.jsx(ft, { options: e.filter((z) => z.id === S || !v.has(z.id)), value: S, onChange: (z) => j((F) => z === null ? (F.delete(S), new Set(F)) : (typeof z == "string" && (F.delete(S), F.add(z)), new Set(F))), size: "sm", label: `${l.language} ${P + 1}`, withoutLabel: !0, InputContainer: Te, className: _($e.lngSelect) }, S)),
3165
+ T ? /* @__PURE__ */ a.jsx(ft, { options: w, value: null, onChange: (S) => j((P) => (typeof S == "string" && P.add(S), new Set(P))), size: "sm", label: l.addLanguage, InputContainer: Te, className: _($e.lngSelect, $e.addLng) }) : null
3149
3166
  ] }),
3150
3167
  /* @__PURE__ */ a.jsxs("div", { className: _($e.subgrid, $e.tableBody), children: [
3151
3168
  y.length === 0 || N.length === 0 ? /* @__PURE__ */ a.jsx(et, { variant: "warning", className: _($e.tableFullWidth, $e.emptyTableAlert, "my-n1"), children: y.length === 0 ? l.noDataLoaded : N.length === 0 ? l.noDataFiltered : null }) : null,
@@ -3188,7 +3205,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3188
3205
  var n;
3189
3206
  return ((n = t == null ? void 0 : t.customNameBuilder) == null ? void 0 : n.call(t, e)) ?? e.name;
3190
3207
  }, Il = (e, t, n, r, i) => {
3191
- const o = Ke(), [s, l] = B(!1), [c, u] = B([]), d = e === "", p = A(() => {
3208
+ const o = Ke(), [s, l] = B(!1), [c, u] = B([]), d = e === "", p = R(() => {
3192
3209
  u([]), !(t.length < mo) && (l(!0), o.get(Ia(n, {
3193
3210
  path: { query: t },
3194
3211
  query: {
@@ -3335,7 +3352,7 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3335
3352
  }, cm = ({ show: e, handleClose: t, onConfirm: n, apiCreateBackup: r }) => {
3336
3353
  const { texts: { userSettings: i } } = $(X), { zStringRequired: o } = Br(), { addNotification: s } = tn(), l = Ke(), { startLoading: c, stopLoading: u } = $(xt), [d, p] = B(null), f = dn.object({
3337
3354
  name: o()
3338
- }), m = Fr({ resolver: Lr(f) }), g = A(async (h, v) => (c("localStorageSettingPost"), l.post(r, {
3355
+ }), m = Fr({ resolver: Lr(f) }), g = R(async (h, v) => (c("localStorageSettingPost"), l.post(r, {
3339
3356
  name: h,
3340
3357
  setting: v
3341
3358
  }).then(() => !0).catch(() => !1).finally(() => u("localStorageSettingPost"))), [l, r, c, u]), b = async (h) => {
@@ -3358,9 +3375,9 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3358
3375
  apiCreateBackup: "/localStorageSettings",
3359
3376
  apiDeleteBackup: "/localStorageSettings"
3360
3377
  }, jN = ({ apiUrls: { apiGetBackups: e = ur.apiGetBackups, apiCreateBackup: t = ur.apiCreateBackup, apiDeleteBackup: n = ur.apiDeleteBackup } = ur }) => {
3361
- const { ProjectIconComponent: r, texts: { userSettings: i } } = $(X), { confirm: o } = St(), s = Ke(), { startLoading: l, stopLoading: c } = $(xt), { addNotification: u } = tn(), [d, p] = B(!1), { data: f, setData: m, reloadData: g } = Be(e), b = A(async (x) => (l("localStorageSettingDelete"), s.delete(`${n}/${x}`).then(() => !0).catch(() => !1).finally(() => c("localStorageSettingDelete"))), [s, n, l, c]), h = A(async (x) => {
3378
+ const { ProjectIconComponent: r, texts: { userSettings: i } } = $(X), { confirm: o } = St(), s = Ke(), { startLoading: l, stopLoading: c } = $(xt), { addNotification: u } = tn(), [d, p] = B(!1), { data: f, setData: m, reloadData: g } = Be(e), b = R(async (x) => (l("localStorageSettingDelete"), s.delete(`${n}/${x}`).then(() => !0).catch(() => !1).finally(() => c("localStorageSettingDelete"))), [s, n, l, c]), h = R(async (x) => {
3362
3379
  await o(i.localStorageDeleteBackupConfirm) && await b(x) && (u(i.localStorageDeleteBackupSuccess, "success"), m((j) => (j == null ? void 0 : j.filter((w) => w.id !== x)) ?? null));
3363
- }, [o, i, b, u, m]), v = A(async (x) => {
3380
+ }, [o, i, b, u, m]), v = R(async (x) => {
3364
3381
  x.setting && await o(i.localStorageLoadBackup) && (Nu(x.setting) ? u(i.localStorageLoadBackupSuccess, "success") : u(i.localStorageLoadBackupError, "danger"));
3365
3382
  }, [o, i, u]);
3366
3383
  return /* @__PURE__ */ a.jsxs(Qt, { collapsible: !0, title: i.localStorage, defaultOpen: !0, children: [
@@ -3464,13 +3481,13 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3464
3481
  const o = localStorage.getItem(t);
3465
3482
  o ? r(JSON.parse(o)) : e && r(e);
3466
3483
  }, [e, t]);
3467
- const i = A((o) => {
3484
+ const i = R((o) => {
3468
3485
  r(o), localStorage.setItem(t, JSON.stringify(o));
3469
3486
  }, [t]);
3470
3487
  return { dashboardConfig: n, onChangeDashboardConfig: i };
3471
3488
  }, DN = ({ widgetGroups: e, availableWidgets: t, editMode: n, defaultDashboardConfig: r, dashboardConfigKey: i }) => {
3472
3489
  var m;
3473
- const { texts: { homeDashboard: o } } = $(X), { dashboardConfig: s, onChangeDashboardConfig: l } = Im(r, i), c = A((g, b) => {
3490
+ const { texts: { homeDashboard: o } } = $(X), { dashboardConfig: s, onChangeDashboardConfig: l } = Im(r, i), c = R((g, b) => {
3474
3491
  var h, v;
3475
3492
  g === ((h = s.widgets) == null ? void 0 : h.length) ? l({
3476
3493
  ...s,
@@ -3479,19 +3496,19 @@ e.label === "", so = (e, t) => e.hierarchy && e.hierarchy.uniqueName === t, lo =
3479
3496
  ...s,
3480
3497
  widgets: ((v = s.widgets) == null ? void 0 : v.map((x, j) => j === g ? { widgetId: b, fullWidth: !1 } : x)) ?? []
3481
3498
  });
3482
- }, [s, l]), u = A((g) => {
3499
+ }, [s, l]), u = R((g) => {
3483
3500
  var b, h;
3484
3501
  ((b = s.widgets[g]) == null ? void 0 : b.widgetId) === -1 ? l({
3485
3502
  ...s,
3486
3503
  widgets: ((h = s.widgets) == null ? void 0 : h.filter((v, x) => x !== g)) ?? []
3487
3504
  }) : c(g, -1);
3488
- }, [s, l, c]), d = A((g) => {
3505
+ }, [s, l, c]), d = R((g) => {
3489
3506
  var b;
3490
3507
  l({
3491
3508
  ...s,
3492
3509
  widgets: ((b = s.widgets) == null ? void 0 : b.map((h, v) => v === g ? { ...h, fullWidth: !h.fullWidth } : h)) ?? []
3493
3510
  });
3494
- }, [s, l]), p = A((g, b, h) => g ? /* @__PURE__ */ a.jsxs("div", { className: _(vt.widgetWrapper, {
3511
+ }, [s, l]), p = R((g, b, h) => g ? /* @__PURE__ */ a.jsxs("div", { className: _(vt.widgetWrapper, {
3495
3512
  [vt.widgetEdit]: n && g.id !== -1
3496
3513
  }, { [vt.fullWidth]: h }), children: [
3497
3514
  n && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
@@ -4057,8 +4074,8 @@ function dg() {
4057
4074
  }
4058
4075
  }
4059
4076
  }
4060
- var j = o, w = e, y = l, N = n, C = p, E = d, I = t, O = i, R = r, M = c;
4061
- return je.ContextConsumer = s, je.ContextProvider = j, je.Element = w, je.ForwardRef = y, je.Fragment = N, je.Lazy = C, je.Memo = E, je.Portal = I, je.Profiler = O, je.StrictMode = R, je.Suspense = M, je.isAsyncMode = function() {
4077
+ var j = o, w = e, y = l, N = n, C = p, E = d, I = t, O = i, T = r, M = c;
4078
+ return je.ContextConsumer = s, je.ContextProvider = j, je.Element = w, je.ForwardRef = y, je.Fragment = N, je.Lazy = C, je.Memo = E, je.Portal = I, je.Profiler = O, je.StrictMode = T, je.Suspense = M, je.isAsyncMode = function() {
4062
4079
  return !1;
4063
4080
  }, je.isConcurrentMode = function() {
4064
4081
  return !1;
@@ -4140,17 +4157,17 @@ function ug() {
4140
4157
  }
4141
4158
  }
4142
4159
  }
4143
- var y = s, N = o, C = e, E = l, I = n, O = p, R = d, M = t, S = i, P = r, z = c, V = !1, F = !1;
4160
+ var y = s, N = o, C = e, E = l, I = n, O = p, T = d, M = t, S = i, P = r, z = c, F = !1, V = !1;
4144
4161
  function q(J) {
4145
- return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
4162
+ return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
4146
4163
  }
4147
4164
  function H(J) {
4148
- return F || (F = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
4165
+ return V || (V = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
4149
4166
  }
4150
4167
  function W(J) {
4151
4168
  return w(J) === s;
4152
4169
  }
4153
- function T(J) {
4170
+ function A(J) {
4154
4171
  return w(J) === o;
4155
4172
  }
4156
4173
  function K(J) {
@@ -4180,7 +4197,7 @@ function ug() {
4180
4197
  function me(J) {
4181
4198
  return w(J) === c;
4182
4199
  }
4183
- Ne.ContextConsumer = y, Ne.ContextProvider = N, Ne.Element = C, Ne.ForwardRef = E, Ne.Fragment = I, Ne.Lazy = O, Ne.Memo = R, Ne.Portal = M, Ne.Profiler = S, Ne.StrictMode = P, Ne.Suspense = z, Ne.isAsyncMode = q, Ne.isConcurrentMode = H, Ne.isContextConsumer = W, Ne.isContextProvider = T, Ne.isElement = K, Ne.isForwardRef = Z, Ne.isFragment = ne, Ne.isLazy = ve, Ne.isMemo = se, Ne.isPortal = Q, Ne.isProfiler = le, Ne.isStrictMode = Ce, Ne.isSuspense = me, Ne.isValidElementType = j, Ne.typeOf = w;
4200
+ Ne.ContextConsumer = y, Ne.ContextProvider = N, Ne.Element = C, Ne.ForwardRef = E, Ne.Fragment = I, Ne.Lazy = O, Ne.Memo = T, Ne.Portal = M, Ne.Profiler = S, Ne.StrictMode = P, Ne.Suspense = z, Ne.isAsyncMode = q, Ne.isConcurrentMode = H, Ne.isContextConsumer = W, Ne.isContextProvider = A, Ne.isElement = K, Ne.isForwardRef = Z, Ne.isFragment = ne, Ne.isLazy = ve, Ne.isMemo = se, Ne.isPortal = Q, Ne.isProfiler = le, Ne.isStrictMode = Ce, Ne.isSuspense = me, Ne.isValidElementType = j, Ne.typeOf = w;
4184
4201
  }()), Ne;
4185
4202
  }
4186
4203
  process.env.NODE_ENV === "production" ? Aa.exports = dg() : Aa.exports = ug();
@@ -4259,23 +4276,23 @@ function wg(e, t) {
4259
4276
  displayName: I,
4260
4277
  wrappedComponentName: E,
4261
4278
  WrappedComponent: C
4262
- }), R = j.pure;
4263
- function M(F) {
4264
- return e(F.dispatch, O);
4279
+ }), T = j.pure;
4280
+ function M(V) {
4281
+ return e(V.dispatch, O);
4265
4282
  }
4266
- var S = R ? k : function(F) {
4267
- return F();
4283
+ var S = T ? k : function(V) {
4284
+ return V();
4268
4285
  };
4269
- function P(F) {
4286
+ function P(V) {
4270
4287
  var q = k(function() {
4271
- var fe = F.reactReduxForwardedRef, Ve = Dr(F, fg);
4272
- return [F.context, fe, Ve];
4273
- }, [F]), H = q[0], W = q[1], T = q[2], K = k(function() {
4288
+ var fe = V.reactReduxForwardedRef, Ve = Dr(V, fg);
4289
+ return [V.context, fe, Ve];
4290
+ }, [V]), H = q[0], W = q[1], A = q[2], K = k(function() {
4274
4291
  return H && H.Consumer && Po.isContextConsumer(/* @__PURE__ */ de.createElement(H.Consumer, null)) ? H : y;
4275
- }, [H, y]), Z = $(K), ne = !!F.store && !!F.store.getState && !!F.store.dispatch, ve = !!Z && !!Z.store;
4292
+ }, [H, y]), Z = $(K), ne = !!V.store && !!V.store.getState && !!V.store.dispatch, ve = !!Z && !!Z.store;
4276
4293
  if (process.env.NODE_ENV !== "production" && !ne && !ve)
4277
4294
  throw new Error('Could not find "store" in the context of ' + ('"' + I + '". Either wrap the root component in a <Provider>, ') + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + I + " in connect options."));
4278
- var se = ne ? F.store : Z.store, Q = k(function() {
4295
+ var se = ne ? V.store : Z.store, Q = k(function() {
4279
4296
  return M(se);
4280
4297
  }, [se]), le = k(function() {
4281
4298
  if (!d) return gg;
@@ -4288,10 +4305,10 @@ function wg(e, t) {
4288
4305
  }, [ne, Z, Ce]), re = lu(hg, mg, yg), pe = re[0], Pe = pe[0], tt = re[1];
4289
4306
  if (Pe && Pe.error)
4290
4307
  throw Pe.error;
4291
- var yt = ae(), Y = ae(T), G = ae(), ie = ae(!1), ge = S(function() {
4292
- return G.current && T === Y.current ? G.current : Q(se.getState(), T);
4293
- }, [se, Pe, T]);
4294
- To(bg, [Y, yt, ie, T, ge, G, me]), To(xg, [d, se, Ce, Q, Y, yt, ie, G, me, tt], [se, Ce, Q]);
4308
+ var yt = ae(), Y = ae(A), G = ae(), ie = ae(!1), ge = S(function() {
4309
+ return G.current && A === Y.current ? G.current : Q(se.getState(), A);
4310
+ }, [se, Pe, A]);
4311
+ To(bg, [Y, yt, ie, A, ge, G, me]), To(xg, [d, se, Ce, Q, Y, yt, ie, G, me, tt], [se, Ce, Q]);
4295
4312
  var Ie = k(function() {
4296
4313
  return /* @__PURE__ */ de.createElement(C, oe({}, ge, {
4297
4314
  ref: W
@@ -4303,14 +4320,14 @@ function wg(e, t) {
4303
4320
  }, [K, Ie, J]);
4304
4321
  return xe;
4305
4322
  }
4306
- var z = R ? de.memo(P) : P;
4323
+ var z = T ? de.memo(P) : P;
4307
4324
  if (z.WrappedComponent = C, z.displayName = P.displayName = I, h) {
4308
- var V = de.forwardRef(function(q, H) {
4325
+ var F = de.forwardRef(function(q, H) {
4309
4326
  return /* @__PURE__ */ de.createElement(z, oe({}, q, {
4310
4327
  reactReduxForwardedRef: H
4311
4328
  }));
4312
4329
  });
4313
- return V.displayName = I, V.WrappedComponent = C, Io(V, C);
4330
+ return F.displayName = I, F.WrappedComponent = C, Io(F, C);
4314
4331
  }
4315
4332
  return Io(z, C);
4316
4333
  };
@@ -4488,13 +4505,13 @@ function Ug(e) {
4488
4505
  var t = {}, n = t.connectHOC, r = n === void 0 ? wg : n, i = t.mapStateToPropsFactories, o = i === void 0 ? Og : i, s = t.mapDispatchToPropsFactories, l = s === void 0 ? Eg : s, c = t.mergePropsFactories, u = c === void 0 ? kg : c, d = t.selectorFactory, p = d === void 0 ? Vg : d;
4489
4506
  return function(m, g, b, h) {
4490
4507
  h === void 0 && (h = {});
4491
- var v = h, x = v.pure, j = x === void 0 ? !0 : x, w = v.areStatesEqual, y = w === void 0 ? Gg : w, N = v.areOwnPropsEqual, C = N === void 0 ? sa : N, E = v.areStatePropsEqual, I = E === void 0 ? sa : E, O = v.areMergedPropsEqual, R = O === void 0 ? sa : O, M = Dr(v, $g), S = ca(m, o, "mapStateToProps"), P = ca(g, l, "mapDispatchToProps"), z = ca(b, u, "mergeProps");
4508
+ var v = h, x = v.pure, j = x === void 0 ? !0 : x, w = v.areStatesEqual, y = w === void 0 ? Gg : w, N = v.areOwnPropsEqual, C = N === void 0 ? sa : N, E = v.areStatePropsEqual, I = E === void 0 ? sa : E, O = v.areMergedPropsEqual, T = O === void 0 ? sa : O, M = Dr(v, $g), S = ca(m, o, "mapStateToProps"), P = ca(g, l, "mapDispatchToProps"), z = ca(b, u, "mergeProps");
4492
4509
  return r(p, oe({
4493
4510
  // used in error messages
4494
4511
  methodName: "connect",
4495
4512
  // used to compute Connect's displayName from the wrapped component's displayName.
4496
- getDisplayName: function(F) {
4497
- return "Connect(" + F + ")";
4513
+ getDisplayName: function(V) {
4514
+ return "Connect(" + V + ")";
4498
4515
  },
4499
4516
  // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
4500
4517
  shouldHandleStateChanges: !!m,
@@ -4506,7 +4523,7 @@ function Ug(e) {
4506
4523
  areStatesEqual: y,
4507
4524
  areOwnPropsEqual: C,
4508
4525
  areStatePropsEqual: I,
4509
- areMergedPropsEqual: R
4526
+ areMergedPropsEqual: T
4510
4527
  }, M));
4511
4528
  };
4512
4529
  }
@@ -6236,10 +6253,10 @@ var Yo = {
6236
6253
  if (e.phase === "DROP_PENDING")
6237
6254
  return e;
6238
6255
  Yt(e) || (process.env.NODE_ENV !== "production" ? D(!1, "Attempting to move in an unsupported phase " + e.phase) : D());
6239
- var E = t.payload, I = E.id, O = E.isEnabled, R = e.dimensions.droppables[I];
6240
- R || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + I + "] to toggle its enabled state") : D()), R.isEnabled === O && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isEnabled to " + String(O) + `
6241
- but it is already ` + String(R.isEnabled)) : D());
6242
- var M = oe({}, R, {
6256
+ var E = t.payload, I = E.id, O = E.isEnabled, T = e.dimensions.droppables[I];
6257
+ T || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + I + "] to toggle its enabled state") : D()), T.isEnabled === O && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isEnabled to " + String(O) + `
6258
+ but it is already ` + String(T.isEnabled)) : D());
6259
+ var M = oe({}, T, {
6243
6260
  isEnabled: O
6244
6261
  });
6245
6262
  return pa(e, M, !0);
@@ -6248,13 +6265,13 @@ var Yo = {
6248
6265
  if (e.phase === "DROP_PENDING")
6249
6266
  return e;
6250
6267
  Yt(e) || (process.env.NODE_ENV !== "production" ? D(!1, "Attempting to move in an unsupported phase " + e.phase) : D());
6251
- var S = t.payload, P = S.id, z = S.isCombineEnabled, V = e.dimensions.droppables[P];
6252
- V || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + P + "] to toggle its isCombineEnabled state") : D()), V.isCombineEnabled === z && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isCombineEnabled to " + String(z) + `
6253
- but it is already ` + String(V.isCombineEnabled)) : D());
6254
- var F = oe({}, V, {
6268
+ var S = t.payload, P = S.id, z = S.isCombineEnabled, F = e.dimensions.droppables[P];
6269
+ F || (process.env.NODE_ENV !== "production" ? D(!1, "Cannot find Droppable[id: " + P + "] to toggle its isCombineEnabled state") : D()), F.isCombineEnabled === z && (process.env.NODE_ENV !== "production" ? D(!1, "Trying to set droppable isCombineEnabled to " + String(z) + `
6270
+ but it is already ` + String(F.isCombineEnabled)) : D());
6271
+ var V = oe({}, F, {
6255
6272
  isCombineEnabled: z
6256
6273
  });
6257
- return pa(e, F, !0);
6274
+ return pa(e, V, !0);
6258
6275
  }
6259
6276
  if (t.type === "MOVE_BY_WINDOW_SCROLL") {
6260
6277
  if (e.phase === "DROP_PENDING" || e.phase === "DROP_ANIMATING")
@@ -6278,7 +6295,7 @@ var Yo = {
6278
6295
  var W = t.payload.maxScroll;
6279
6296
  if (At(W, e.viewport.scroll.max))
6280
6297
  return e;
6281
- var T = oe({}, e.viewport, {
6298
+ var A = oe({}, e.viewport, {
6282
6299
  scroll: oe({}, e.viewport.scroll, {
6283
6300
  max: W
6284
6301
  })
@@ -6286,7 +6303,7 @@ var Yo = {
6286
6303
  return oe({
6287
6304
  phase: "DRAGGING"
6288
6305
  }, e, {
6289
- viewport: T
6306
+ viewport: A
6290
6307
  });
6291
6308
  }
6292
6309
  if (t.type === "MOVE_UP" || t.type === "MOVE_DOWN" || t.type === "MOVE_LEFT" || t.type === "MOVE_RIGHT") {
@@ -8595,7 +8612,7 @@ function Px(e) {
8595
8612
  if (O === void 0 && (O = {
8596
8613
  shouldBlockNextClick: !1
8597
8614
  }), N.cleanup(), O.shouldBlockNextClick) {
8598
- var R = at(window, [{
8615
+ var T = at(window, [{
8599
8616
  eventName: "click",
8600
8617
  fn: Ox,
8601
8618
  options: {
@@ -8604,7 +8621,7 @@ function Px(e) {
8604
8621
  capture: !0
8605
8622
  }
8606
8623
  }]);
8607
- setTimeout(R);
8624
+ setTimeout(T);
8608
8625
  }
8609
8626
  C(), r.dispatch(gc({
8610
8627
  reason: I
@@ -9087,8 +9104,8 @@ function Jx(e) {
9087
9104
  isDropDisabled: N.isDropDisabled,
9088
9105
  isCombineEnabled: N.isCombineEnabled,
9089
9106
  shouldClipSubject: !N.ignoreContainerClipping
9090
- }), R = E.closestScrollable;
9091
- return R && (R.setAttribute(rs.contextId, n.contextId), R.addEventListener("scroll", m, cs(I.scrollOptions)), process.env.NODE_ENV !== "production" && Hx(R)), O;
9107
+ }), T = E.closestScrollable;
9108
+ return T && (T.setAttribute(rs.contextId, n.contextId), T.addEventListener("scroll", m, cs(I.scrollOptions)), process.env.NODE_ENV !== "production" && Hx(T)), O;
9092
9109
  }, [n.contextId, l, m, s]), b = ee(function() {
9093
9110
  var w = t.current, y = gr(w);
9094
9111
  return w && y || (process.env.NODE_ENV !== "production" ? D(!1, "Can only recollect Droppable client for Droppables that have a scroll container") : D()), Va(y);
@@ -9422,7 +9439,7 @@ function xy(e) {
9422
9439
  }, [o, s, m, g]), N = ee(function(I) {
9423
9440
  x.type === "DRAGGING" && x.dropping && I.propertyName === "transform" && j();
9424
9441
  }, [j, x]), C = he(function() {
9425
- var I = fy(x), O = x.type === "DRAGGING" && x.dropping ? N : null, R = {
9442
+ var I = fy(x), O = x.type === "DRAGGING" && x.dropping ? N : null, T = {
9426
9443
  innerRef: n,
9427
9444
  draggableProps: {
9428
9445
  "data-rbd-draggable-context-id": o,
@@ -9432,7 +9449,7 @@ function xy(e) {
9432
9449
  },
9433
9450
  dragHandleProps: y
9434
9451
  };
9435
- return R;
9452
+ return T;
9436
9453
  }, [o, y, m, x, N, n]), E = he(function() {
9437
9454
  return {
9438
9455
  draggableId: p.id,
@@ -9672,7 +9689,7 @@ function _y(e) {
9672
9689
  isUsingCloneFor: I
9673
9690
  };
9674
9691
  }, [l, I, c]);
9675
- function R() {
9692
+ function T() {
9676
9693
  if (!b)
9677
9694
  return null;
9678
9695
  var M = b.dragging, S = b.render, P = de.createElement(Vc, {
@@ -9682,14 +9699,14 @@ function _y(e) {
9682
9699
  isEnabled: !0,
9683
9700
  shouldRespectForcePress: !1,
9684
9701
  canDragInteractiveElements: !0
9685
- }, function(z, V) {
9686
- return S(z, V, M);
9702
+ }, function(z, F) {
9703
+ return S(z, F, M);
9687
9704
  });
9688
9705
  return Vn.createPortal(P, v());
9689
9706
  }
9690
9707
  return de.createElement(ki.Provider, {
9691
9708
  value: O
9692
- }, s(E, g), R());
9709
+ }, s(E, g), T());
9693
9710
  }
9694
9711
  var ja = function(t, n) {
9695
9712
  return t === n.droppable.type;
@@ -9955,7 +9972,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
9955
9972
  }, [r, e]), U(() => {
9956
9973
  h >= g.length && v(g.length - 1);
9957
9974
  }, [g, h]);
9958
- const y = A((I) => {
9975
+ const y = R((I) => {
9959
9976
  switch (I.key) {
9960
9977
  case "ArrowLeft":
9961
9978
  I.stopPropagation(), j && v((O) => O - 1);
@@ -9968,8 +9985,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
9968
9985
  break;
9969
9986
  }
9970
9987
  }, [w, j, t]), N = (I, O) => {
9971
- const R = Array.from(g), [M] = R.splice(I, 1);
9972
- return R.splice(O, 0, M), R;
9988
+ const T = Array.from(g), [M] = T.splice(I, 1);
9989
+ return T.splice(O, 0, M), T;
9973
9990
  }, C = (I) => {
9974
9991
  if (!I.destination)
9975
9992
  return;
@@ -9996,13 +10013,13 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
9996
10013
  s && /* @__PURE__ */ a.jsx($s, { accept: ".jpg,.jpeg,.png", onUpload: (I) => {
9997
10014
  I.length > 0 && s(Array.from(I));
9998
10015
  }, icon: /* @__PURE__ */ a.jsx(Gs, { style: { fontSize: 18 } }), multiple: !0, className: "me-1 me-lg-3", children: i ?? null }),
9999
- /* @__PURE__ */ a.jsx(Xa, { children: x && (l == null ? void 0 : l.map(({ label: I, onClick: O, ...R }, M) => /* @__PURE__ */ a.jsx(
10016
+ /* @__PURE__ */ a.jsx(Xa, { children: x && (l == null ? void 0 : l.map(({ label: I, onClick: O, ...T }, M) => /* @__PURE__ */ a.jsx(
10000
10017
  Nr,
10001
10018
  {
10002
10019
  hideOn: "sm",
10003
10020
  cKey: `action-${M}`,
10004
10021
  onClick: () => O(x.id),
10005
- ...R,
10022
+ ...T,
10006
10023
  children: typeof I == "string" ? I : I(x.id)
10007
10024
  },
10008
10025
  `action-${M}`
@@ -10017,11 +10034,11 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10017
10034
  /* @__PURE__ */ a.jsx("div", { role: w ? "button" : void 0, className: _("align-items-end", Ge.navButton, Ge.right), onClick: () => w && v((I) => I + 1), children: w && /* @__PURE__ */ a.jsx(Wa, { style: { fontSize: "40px" } }) })
10018
10035
  ] }),
10019
10036
  /* @__PURE__ */ a.jsx("div", { className: _("d-flex justify-content-center", Ge.photosPreviewContainer), children: /* @__PURE__ */ a.jsx(Mx, { onDragEnd: C, children: /* @__PURE__ */ a.jsx(Uy, { droppableId: "droppable", direction: "horizontal", children: (I) => /* @__PURE__ */ a.jsxs("div", { ...I.droppableProps, ref: I.innerRef, className: Ge.photosPreview, children: [
10020
- g.map((O, R) => /* @__PURE__ */ a.jsx(Iy, { draggableId: O.id, index: R, isDragDisabled: f === void 0, children: m((M) => {
10037
+ g.map((O, T) => /* @__PURE__ */ a.jsx(Iy, { draggableId: O.id, index: T, isDragDisabled: f === void 0, children: m((M) => {
10021
10038
  var S;
10022
- return /* @__PURE__ */ a.jsxs("div", { ref: M.innerRef, ...M.draggableProps, ...M.dragHandleProps, role: "button", onClick: () => v(R), className: _(Ge.lightboxDraggablePhoto), children: [
10023
- /* @__PURE__ */ a.jsx(p, { role: R !== h ? "button" : void 0, src: O.smSrc, alt: O.alt, className: _("rounded", Ge.photo, {
10024
- [Ge.selected]: R === h
10039
+ return /* @__PURE__ */ a.jsxs("div", { ref: M.innerRef, ...M.draggableProps, ...M.dragHandleProps, role: "button", onClick: () => v(T), className: _(Ge.lightboxDraggablePhoto), children: [
10040
+ /* @__PURE__ */ a.jsx(p, { role: T !== h ? "button" : void 0, src: O.smSrc, alt: O.alt, className: _("rounded", Ge.photo, {
10041
+ [Ge.selected]: T === h
10025
10042
  }), baseUrl: c, customToken: u, placeholder: d }, O.id),
10026
10043
  O.isDefault || O.customIndicators && O.customIndicators.length > 0 ? /* @__PURE__ */ a.jsxs("div", { className: _(Ge.indicators, "gap-1"), children: [
10027
10044
  O.isDefault && /* @__PURE__ */ a.jsx("div", { className: "text-primary", children: /* @__PURE__ */ a.jsx($d, {}) }),
@@ -10077,7 +10094,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10077
10094
  "type-icon": "_type-icon_z9z4m_28",
10078
10095
  typeIcon: uw
10079
10096
  }, pw = ({ level: e, children: t, customIcon: n, noIcon: r }) => {
10080
- const { ProjectIconComponent: i } = $(X), o = A(() => {
10097
+ const { ProjectIconComponent: i } = $(X), o = R(() => {
10081
10098
  switch (e) {
10082
10099
  case "info":
10083
10100
  return /* @__PURE__ */ a.jsx(i, { icon: "info" });
@@ -10139,7 +10156,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10139
10156
  /* @__PURE__ */ a.jsx("div", { className: _("text-primary", Ht.stepIcon), children: n.icon ?? /* @__PURE__ */ a.jsx(zd, {}) })
10140
10157
  ] }) })
10141
10158
  ] }, r)) }), Dw = (e, t, n, r = !0) => {
10142
- const i = Ke({ silent: r, differentBaseUrl: t, customToken: n }), [o, s] = B(!1), [l, c] = B(null), u = A(async (d) => {
10159
+ const i = Ke({ silent: r, differentBaseUrl: t, customToken: n }), [o, s] = B(!1), [l, c] = B(null), u = R(async (d) => {
10143
10160
  s(!0), c(null), i.get(e, {
10144
10161
  signal: d,
10145
10162
  responseType: "blob"
@@ -10205,7 +10222,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10205
10222
  const n = new Date(e);
10206
10223
  return jr(n).to === t ? "M" : Mn(n).to === t ? "Y" : (console.log(Mn(n), t), "C");
10207
10224
  }, Ow = (e, t, n) => {
10208
- const r = A((s, l) => {
10225
+ const r = R((s, l) => {
10209
10226
  if (e === "C") {
10210
10227
  n((c) => ({ ...c, [s]: l }));
10211
10228
  return;
@@ -10230,7 +10247,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10230
10247
  t("C"), n((c) => ({ ...c, [s]: l }));
10231
10248
  break;
10232
10249
  }
10233
- }, [e, n, t]), i = A((s) => {
10250
+ }, [e, n, t]), i = R((s) => {
10234
10251
  n((l) => {
10235
10252
  if (l.from === null || l.to === null)
10236
10253
  return l;
@@ -10250,7 +10267,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10250
10267
  to: Pt(u.toISOString())
10251
10268
  };
10252
10269
  });
10253
- }, [e, n]), o = A((s) => {
10270
+ }, [e, n]), o = R((s) => {
10254
10271
  s === "D" ? n((l) => ({ from: l.from, to: l.from })) : s === "M" ? n((l) => {
10255
10272
  if (l.from === null)
10256
10273
  return l;
@@ -10285,12 +10302,12 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10285
10302
  }, children: /* @__PURE__ */ a.jsx(o, { icon: "chevron-right" }) })
10286
10303
  ] });
10287
10304
  }, ON = ({ defaultMonth: e, searchKey: t = "monthFrom", yearMin: n, yearMax: r }) => {
10288
- const { localizationContext: i } = $(X), { dateFnsLocale: o } = $(i), { searchParams: s, setSearch: l } = yu(), c = s.get(t), u = c ? pt(c) : e, d = A((p) => {
10305
+ const { localizationContext: i } = $(X), { dateFnsLocale: o } = $(i), { searchParams: s, setSearch: l } = yu(), c = s.get(t), u = c ? pt(c) : e, d = R((p) => {
10289
10306
  l(t, un(p, { representation: "date" }));
10290
10307
  }, [t, l]);
10291
10308
  return /* @__PURE__ */ a.jsx(Xu, { month: u, onChangeMonth: d, locale: o, yearMin: n, yearMax: r });
10292
10309
  }, PN = ({ defaultYear: e, searchKey: t = "yearFrom", ...n }) => {
10293
- const [r, i] = Xt(t, un(e, { representation: "date" })), o = r ? pt(r) : e, s = A((l) => {
10310
+ const [r, i] = Xt(t, un(e, { representation: "date" })), o = r ? pt(r) : e, s = R((l) => {
10294
10311
  i(un(l, { representation: "date" }));
10295
10312
  }, [i]);
10296
10313
  return /* @__PURE__ */ a.jsx(Zu, { year: o, onChangeYear: s, ...n });
@@ -10343,8 +10360,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10343
10360
  ] });
10344
10361
  }, AN = ({ data: e, xKey: t, yKeys: n, translateKey: r, usePercentageValue: i = !1, variant: o = "default", legendPosition: s, noSort: l = !1, unit: c }) => {
10345
10362
  const { confirm: u } = St(), { chartColorPalette: d, texts: { chart: p } } = $(X), [f, m] = B(/* @__PURE__ */ new Set()), g = ae(null), b = async () => {
10346
- var R;
10347
- const O = (R = g.current) == null ? void 0 : R.querySelector("svg");
10363
+ var T;
10364
+ const O = (T = g.current) == null ? void 0 : T.querySelector("svg");
10348
10365
  if (O && await u(p.confirmExport)) {
10349
10366
  const M = O.cloneNode(!0);
10350
10367
  M.setAttribute("fill", "none");
@@ -10354,39 +10371,39 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10354
10371
  }), "graf.svg");
10355
10372
  }
10356
10373
  }, h = (O) => {
10357
- m((R) => {
10358
- const M = new Set(R);
10374
+ m((T) => {
10375
+ const M = new Set(T);
10359
10376
  return M.has(O.id) ? M.delete(O.id) : M.add(O.id), M;
10360
10377
  });
10361
- }, v = k(() => l ? e : e.toSorted((O, R) => {
10378
+ }, v = k(() => l ? e : e.toSorted((O, T) => {
10362
10379
  var M;
10363
- return typeof R[t] == "number" && typeof O[t] == "number" ? O[t] - R[t] : (O[t] ?? "").toString().localeCompare(((M = R[t]) == null ? void 0 : M.toString()) ?? "");
10380
+ return typeof T[t] == "number" && typeof O[t] == "number" ? O[t] - T[t] : (O[t] ?? "").toString().localeCompare(((M = T[t]) == null ? void 0 : M.toString()) ?? "");
10364
10381
  }), [e, l, t]), x = k(() => {
10365
10382
  const O = [];
10366
- return n.forEach((R) => {
10383
+ return n.forEach((T) => {
10367
10384
  if (i) {
10368
- const M = Math.max(...v.map((P) => P[R.key] ?? -1 / 0));
10385
+ const M = Math.max(...v.map((P) => P[T.key] ?? -1 / 0));
10369
10386
  if (M === -1 / 0)
10370
10387
  return;
10371
10388
  const S = [];
10372
10389
  v.forEach((P) => {
10373
- P[R.key] != null && S.push({ x: P[t], y: M === 0 ? 0 : P[R.key] / M });
10390
+ P[T.key] != null && S.push({ x: P[t], y: M === 0 ? 0 : P[T.key] / M });
10374
10391
  }), O.push({
10375
- id: R.key,
10392
+ id: T.key,
10376
10393
  data: S
10377
10394
  });
10378
10395
  } else
10379
10396
  O.push({
10380
- id: R.key,
10381
- data: v.map((M) => ({ x: M[t], y: M[R.key] }))
10397
+ id: T.key,
10398
+ data: v.map((M) => ({ x: M[t], y: M[T.key] }))
10382
10399
  });
10383
10400
  }), O;
10384
- }, [v, i, t, n]), j = A((O) => {
10385
- var R;
10386
- return /* @__PURE__ */ a.jsx(Pw, { data: v, translateKey: r, val: O, unit: ((R = n.find((M) => {
10401
+ }, [v, i, t, n]), j = R((O) => {
10402
+ var T;
10403
+ return /* @__PURE__ */ a.jsx(Pw, { data: v, translateKey: r, val: O, unit: ((T = n.find((M) => {
10387
10404
  var S;
10388
10405
  return M.key === ((S = O.point) == null ? void 0 : S.serieId);
10389
- })) == null ? void 0 : R.unit) ?? c ?? void 0 });
10406
+ })) == null ? void 0 : T.unit) ?? c ?? void 0 });
10390
10407
  }, [v, r, c, n]), w = k(() => Math.min(...e.map((O) => O[t] ?? 1 / 0)), [e, t]), y = k(() => Math.max(...e.map((O) => O[t] ?? -1 / 0)), [e, t]), N = k(() => {
10391
10408
  var O;
10392
10409
  return typeof ((O = e == null ? void 0 : e[0]) == null ? void 0 : O[t]);
@@ -10404,10 +10421,10 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10404
10421
  tickValues: o === "sideContent" ? I : void 0
10405
10422
  }, gridYValues: o === "sideContent" ? [0] : void 0, legends: C !== "none" ? [
10406
10423
  {
10407
- data: n.map((O, R) => ({
10424
+ data: n.map((O, T) => ({
10408
10425
  id: O.key,
10409
10426
  label: r(O.key),
10410
- color: d == null ? void 0 : d[R],
10427
+ color: d == null ? void 0 : d[T],
10411
10428
  hidden: f.has(O.key)
10412
10429
  })),
10413
10430
  onClick: h,
@@ -10518,7 +10535,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10518
10535
  const u = k(() => {
10519
10536
  var w;
10520
10537
  return e ? (w = e == null ? void 0 : e.toString()) == null ? void 0 : w.split(o) : [];
10521
- }, [e, o]), d = A((w, y) => {
10538
+ }, [e, o]), d = R((w, y) => {
10522
10539
  const N = w.split(o), C = y ? N.every((E) => u.includes(E)) && u.length === N.length ? null : N : w === "" ? void 0 : u.includes(w) ? u.filter((E) => E !== w) : [...u, w];
10523
10540
  i(C != null && C.length ? C.join(o) : null);
10524
10541
  }, [i, u, o]), p = k(() => {
@@ -10597,7 +10614,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10597
10614
  }
10598
10615
  }
10599
10616
  }, Xw = ({ schema: e, columns: t, setColumns: n, initialItem: r, onEdit: i, onDelete: o, customPickers: s, appDetail: l }) => {
10600
- const { ProjectIconComponent: c } = $(X), [u, d] = B(r), p = A((g, b) => {
10617
+ const { ProjectIconComponent: c } = $(X), [u, d] = B(r), p = R((g, b) => {
10601
10618
  console.log("changeValue", g, b), d((h) => ({
10602
10619
  ...h,
10603
10620
  [g]: {
@@ -10605,7 +10622,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10605
10622
  value: b
10606
10623
  }
10607
10624
  }));
10608
- }, []), f = (g) => (g == null ? void 0 : g.value) !== (g == null ? void 0 : g.defaultValue), m = A(() => Object.keys(u).some((g) => f(u[g])), [u]);
10625
+ }, []), f = (g) => (g == null ? void 0 : g.value) !== (g == null ? void 0 : g.defaultValue), m = R(() => Object.keys(u).some((g) => f(u[g])), [u]);
10609
10626
  return U(() => {
10610
10627
  d(r);
10611
10628
  }, [r]), /* @__PURE__ */ a.jsxs("tr", { className: _("table-row", De.tableRow), children: [
@@ -10628,7 +10645,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10628
10645
  ] })
10629
10646
  ] });
10630
10647
  }, Qw = ({ schema: e, columns: t, setColumns: n, onCreate: r, customPickers: i }) => {
10631
- const { ProjectIconComponent: o } = $(X), [s, l] = B(null), c = A(() => {
10648
+ const { ProjectIconComponent: o } = $(X), [s, l] = B(null), c = R(() => {
10632
10649
  var p;
10633
10650
  const d = {};
10634
10651
  (p = e.columns) == null || p.forEach((f) => {
@@ -10638,7 +10655,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10638
10655
  defaultValue: m
10639
10656
  };
10640
10657
  }), l(d);
10641
- }, [e]), u = A((d, p) => {
10658
+ }, [e]), u = R((d, p) => {
10642
10659
  l((f) => f && {
10643
10660
  ...f,
10644
10661
  [d]: {
@@ -10772,17 +10789,17 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10772
10789
  apiExportGet: "/dynamicForms/export"
10773
10790
  }, RN = ({ id: e, page: t, setPage: n, filters: r, setFilter: i, sortByField: o, sortByType: s, setSortBy: l, appUrls: { appDetail: c = ws.appDetail } = ws, apiUrls: { apiSchemaGet: u = Wt.apiSchemaGet, apiDataGet: d = Wt.apiDataGet, apiItemPost: p = Wt.apiItemPost, apiItemDelete: f = Wt.apiItemDelete, apiItemCreate: m = Wt.apiItemCreate, apiExportGet: g = Wt.apiExportGet } = Wt, customPickers: b }) => {
10774
10791
  var Ve, ot, st, an, Bi, Li, Mi;
10775
- const { texts: { dynamicForms: h }, ProjectIconComponent: v } = $(X), x = Ke(), { startLoading: j, stopLoading: w } = $(xt), [y, N] = B(null), [C, E] = B(null), [I, O] = B(null), [R, M] = B(null), [S, P] = B(!1), { addNotification: z } = tn(), [V, F] = B([]), { confirm: q } = St(), H = 20, W = H + 1, T = R ? Math.ceil(R.length / H) : 1, K = t ? t > 1 : !1, Z = t ? t < T : !1, ne = t ? (t - 1) * H : 0, ve = t ? t * H : H, se = k(() => R ? R.length > W : !1, [R, W]), Q = k(() => se ? (R == null ? void 0 : R.slice(ne, ve)) ?? null : R ?? null, [se, R, ne, ve]), [le, Ce] = Xt("masterId", null, "string"), [me, J] = B(le);
10792
+ const { texts: { dynamicForms: h }, ProjectIconComponent: v } = $(X), x = Ke(), { startLoading: j, stopLoading: w } = $(xt), [y, N] = B(null), [C, E] = B(null), [I, O] = B(null), [T, M] = B(null), [S, P] = B(!1), { addNotification: z } = tn(), [F, V] = B([]), { confirm: q } = St(), H = 20, W = H + 1, A = T ? Math.ceil(T.length / H) : 1, K = t ? t > 1 : !1, Z = t ? t < A : !1, ne = t ? (t - 1) * H : 0, ve = t ? t * H : H, se = k(() => T ? T.length > W : !1, [T, W]), Q = k(() => se ? (T == null ? void 0 : T.slice(ne, ve)) ?? null : T ?? null, [se, T, ne, ve]), [le, Ce] = Xt("masterId", null, "string"), [me, J] = B(le);
10776
10793
  U(() => {
10777
- N(null), E(null), P(!1), F([]);
10794
+ N(null), E(null), P(!1), V([]);
10778
10795
  }, [e]), U(() => {
10779
10796
  le !== null && (J(le), Ce(null));
10780
10797
  }, [le, e, Ce]);
10781
- const re = A(async () => {
10798
+ const re = R(async () => {
10782
10799
  j("dynamicFormSchema"), await x.get(`${u}?id=${e}`).then(({ data: ce }) => {
10783
10800
  N(ce), w("dynamicFormSchema");
10784
10801
  }).catch(() => w("dynamicFormSchema"));
10785
- }, [x, e, j, w, u]), pe = A(async () => {
10802
+ }, [x, e, j, w, u]), pe = R(async () => {
10786
10803
  var ce;
10787
10804
  if (!(y === null || ((ce = y.id) == null ? void 0 : ce.toString()) !== e)) {
10788
10805
  if (y.masterReference && !me) {
@@ -10800,22 +10817,22 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10800
10817
  E(Ee), w("dynamicFormData");
10801
10818
  }).catch(() => w("dynamicFormData"));
10802
10819
  }
10803
- }, [x, e, y, j, w, S, me, d]), Pe = A(async () => {
10820
+ }, [x, e, y, j, w, S, me, d]), Pe = R(async () => {
10804
10821
  var ce;
10805
10822
  y === null || ((ce = y.id) == null ? void 0 : ce.toString()) !== e || y.masterReference && !me || (j("dynamicFormExport"), await x.get(`${g}?id=${e}&showArchive=${S}${y.masterReference ? `&master=${me}` : ""}`, {
10806
10823
  responseType: "blob"
10807
10824
  }).then((ye) => Zd(ye, { fallbackName: `export-${e}` })).finally(() => w("dynamicFormExport")));
10808
- }, [x, e, y, j, w, S, me, g]), tt = A(async (ce) => (j("dynamicFormEdit"), x.post(`${p}?id=${e}`, ce).then(() => (w("dynamicFormEdit"), F([]), !0)).catch((ye) => (w("dynamicFormEdit"), F(Xr(ye)), !1))), [x, e, j, w, p]), yt = A(async (ce) => (j("dynamicFormDelete"), x.delete(`${f}?id=${e}&pk=${ce}`).then(() => (w("dynamicFormDelete"), F([]), !0)).catch((ye) => (w("dynamicFormDelete"), F(Xr(ye)), !1))), [x, e, j, w, f]), Y = A(async (ce) => (j("dynamicFormCreate"), x.post(`${m}?id=${e}`, ce).then(({ data: ye }) => (w("dynamicFormCreate"), F([]), ye)).catch((ye) => (w("dynamicFormCreate"), F(Xr(ye)), null))), [x, e, j, w, m]), G = A(async (ce) => {
10825
+ }, [x, e, y, j, w, S, me, g]), tt = R(async (ce) => (j("dynamicFormEdit"), x.post(`${p}?id=${e}`, ce).then(() => (w("dynamicFormEdit"), V([]), !0)).catch((ye) => (w("dynamicFormEdit"), V(Xr(ye)), !1))), [x, e, j, w, p]), yt = R(async (ce) => (j("dynamicFormDelete"), x.delete(`${f}?id=${e}&pk=${ce}`).then(() => (w("dynamicFormDelete"), V([]), !0)).catch((ye) => (w("dynamicFormDelete"), V(Xr(ye)), !1))), [x, e, j, w, f]), Y = R(async (ce) => (j("dynamicFormCreate"), x.post(`${m}?id=${e}`, ce).then(({ data: ye }) => (w("dynamicFormCreate"), V([]), ye)).catch((ye) => (w("dynamicFormCreate"), V(Xr(ye)), null))), [x, e, j, w, m]), G = R(async (ce) => {
10809
10826
  y && await tt(y.masterReference ? { ...ce, [y.masterReferenceColumn ?? ""]: me } : ce) && (z(h.editSuccess, "success"), E((ye) => ye && ye.map((Ee) => {
10810
10827
  var we;
10811
10828
  return ((we = Ee[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : we.value) === ce[(y == null ? void 0 : y.primaryKey) ?? ""] ? hs(ce, y) : Ee;
10812
10829
  })));
10813
- }, [z, tt, y, me, h]), ie = A(async (ce) => {
10830
+ }, [z, tt, y, me, h]), ie = R(async (ce) => {
10814
10831
  await q(h.deleteConfirm) && await yt(ce) && (z(h.deleteSuccess, "success"), E((ye) => ye && ye.filter((Ee) => {
10815
10832
  var we;
10816
10833
  return ((we = Ee[(y == null ? void 0 : y.primaryKey) ?? ""]) == null ? void 0 : we.value) !== ce;
10817
10834
  })));
10818
- }, [z, yt, h, q, y]), ge = A(async (ce) => {
10835
+ }, [z, yt, h, q, y]), ge = R(async (ce) => {
10819
10836
  if (!y)
10820
10837
  return !1;
10821
10838
  const ye = await Y(y.masterReference ? { ...ce, [y.masterReferenceColumn ?? ""]: me } : ce);
@@ -10826,8 +10843,8 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10826
10843
  }
10827
10844
  return !1;
10828
10845
  }, [z, Y, h, y, me]), Ie = (ce) => {
10829
- ce > T ? n(T) : ce < 1 && n(1), n(ce);
10830
- }, xe = A(() => {
10846
+ ce > A ? n(A) : ce < 1 && n(1), n(ce);
10847
+ }, xe = R(() => {
10831
10848
  if (!C || !y) {
10832
10849
  O(null);
10833
10850
  return;
@@ -10856,7 +10873,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10856
10873
  }
10857
10874
  }));
10858
10875
  O(ce);
10859
- }, [C, r, y]), fe = A(() => {
10876
+ }, [C, r, y]), fe = R(() => {
10860
10877
  if (!I || !y) {
10861
10878
  M([]);
10862
10879
  return;
@@ -10904,10 +10921,10 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10904
10921
  }, [xe]), U(() => {
10905
10922
  fe();
10906
10923
  }, [fe]), U(() => {
10907
- se ? t || n(1) : R && n(null);
10908
- }, [R, se, t, n]), U(() => {
10909
- !se || !t || (t > T && n(T), t < 1 && n(1));
10910
- }, [t, se, T, n]), /* @__PURE__ */ a.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
10924
+ se ? t || n(1) : T && n(null);
10925
+ }, [T, se, t, n]), U(() => {
10926
+ !se || !t || (t > A && n(A), t < 1 && n(1));
10927
+ }, [t, se, A, n]), /* @__PURE__ */ a.jsxs("div", { className: "h-100 w-100 d-flex flex-column", children: [
10911
10928
  /* @__PURE__ */ a.jsxs("div", { className: "mb-3 d-flex justify-content-between align-items-start", children: [
10912
10929
  /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-3", children: [
10913
10930
  /* @__PURE__ */ a.jsx(L, { variant: "h3", children: (y == null ? void 0 : y.name) ?? "" }),
@@ -10933,15 +10950,15 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10933
10950
  ] }),
10934
10951
  (y == null ? void 0 : y.description) && /* @__PURE__ */ a.jsx(L, { variant: "body2", className: "mb-3", children: y == null ? void 0 : y.description }),
10935
10952
  y != null && y.masterReference && !me ? /* @__PURE__ */ a.jsx(et, { variant: "warning", children: h.selectMaster(((Mi = (Li = y.columns) == null ? void 0 : Li.find((ce) => ce.field === y.masterReferenceColumn)) == null ? void 0 : Mi.caption) ?? "").toLowerCase() }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
10936
- y && V.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "mb-2", children: /* @__PURE__ */ a.jsx(Tw, { errors: V, schema: y }) }),
10953
+ y && F.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "mb-2", children: /* @__PURE__ */ a.jsx(Tw, { errors: F, schema: y }) }),
10937
10954
  y && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
10938
- /* @__PURE__ */ a.jsx("div", { className: _("rounded border overflow-auto", ys.tableContainer), children: /* @__PURE__ */ a.jsx(aj, { schema: y, items: !se && R && (R == null ? void 0 : R.length) > W ? [] : (se ? Q : R) ?? [], onEditItem: G, onDeleteItem: ie, onCreateItem: ge, filters: r, setFilter: i, sortByField: o, sortByType: s, setSortBy: l, selectedMaster: (me == null ? void 0 : me.toString()) ?? null, customPickers: b, appDetail: c }) }),
10955
+ /* @__PURE__ */ a.jsx("div", { className: _("rounded border overflow-auto", ys.tableContainer), children: /* @__PURE__ */ a.jsx(aj, { schema: y, items: !se && T && (T == null ? void 0 : T.length) > W ? [] : (se ? Q : T) ?? [], onEditItem: G, onDeleteItem: ie, onCreateItem: ge, filters: r, setFilter: i, sortByField: o, sortByType: s, setSortBy: l, selectedMaster: (me == null ? void 0 : me.toString()) ?? null, customPickers: b, appDetail: c }) }),
10939
10956
  se && t && /* @__PURE__ */ a.jsxs("div", { className: _(ys.pagination, "d-flex align-items-center gap-3 p-1 border-bottom border-start border-end rounded"), children: [
10940
10957
  /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-1", children: [
10941
10958
  /* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(1), disabled: !K, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-double-left" }) }),
10942
10959
  /* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(t - 1), disabled: !K, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-left" }) }),
10943
10960
  /* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(t + 1), disabled: !Z, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-right" }) }),
10944
- /* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(T), disabled: !Z, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-double-right" }) })
10961
+ /* @__PURE__ */ a.jsx(te, { color: "primary", onClick: () => Ie(A), disabled: !Z, children: /* @__PURE__ */ a.jsx(v, { icon: "chevron-double-right" }) })
10945
10962
  ] }),
10946
10963
  /* @__PURE__ */ a.jsxs(L, { variant: "body", children: [
10947
10964
  h.tablePage,
@@ -10950,7 +10967,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10950
10967
  " ",
10951
10968
  h.tablePageFrom,
10952
10969
  " ",
10953
- T
10970
+ A
10954
10971
  ] })
10955
10972
  ] })
10956
10973
  ] })
@@ -10977,7 +10994,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
10977
10994
  id: x.id,
10978
10995
  name: x.name ?? "",
10979
10996
  items: b.filter((j) => j.group === x.id)
10980
- })).filter((x) => x.items.length > 0), [r, b]), v = A(async () => {
10997
+ })).filter((x) => x.items.length > 0), [r, b]), v = R(async () => {
10981
10998
  u("dynamicForms"), await c.get(l).then(({ data: x }) => {
10982
10999
  f(x), d("dynamicForms");
10983
11000
  }).catch(() => d("dynamicForms"));
@@ -11101,7 +11118,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11101
11118
  reportsGet: "/reports",
11102
11119
  reportsLastUsedGet: "/reports/last-used"
11103
11120
  }, UN = ({ groups: e, apiUrls: { reportsGet: t = Da.reportsGet, reportsLastUsedGet: n = Da.reportsLastUsedGet } = Da, getReportName: r, getReportDescription: i, getGroupTitle: o, getReportRoute: s }) => {
11104
- const { texts: { reports: l } } = $(X), [c, u] = B(""), [d] = Ka(c, 500), p = A((h) => h.map((v) => ({
11121
+ const { texts: { reports: l } } = $(X), [c, u] = B(""), [d] = Ka(c, 500), p = R((h) => h.map((v) => ({
11105
11122
  ...v,
11106
11123
  groupId: !v.groupId || v.groupId === 0 || !e.some((x) => x === v.groupId) ? 999 : v.groupId
11107
11124
  })), [e]), { data: f } = Be(t, { dataTransformer: p }), m = k(() => {
@@ -11180,7 +11197,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11180
11197
  return t === "link" ? /* @__PURE__ */ a.jsx(He, { to: Ia(e.route, o), className: _("link font-size-14", l ? "disabled" : void 0, r), children: c }) : /* @__PURE__ */ a.jsx(u, { as: "link", href: Ia(e.route, o), className: _(l ? "disabled" : void 0, r), children: c });
11181
11198
  }, qN = ({ id: e, getTimelineApiPath: t }) => {
11182
11199
  var s;
11183
- const { texts: { approval: n }, ProjectIconComponent: r } = $(X), { data: i } = Be(t(e)), o = A((l, c = !1) => {
11200
+ const { texts: { approval: n }, ProjectIconComponent: r } = $(X), { data: i } = Be(t(e)), o = R((l, c = !1) => {
11184
11201
  switch (l) {
11185
11202
  case or.Zamitnuto:
11186
11203
  return /* @__PURE__ */ a.jsx(ze, { placement: "left", text: n.stateRejected, children: /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(r, { icon: "cancel-simple", className: c ? "text-danger" : "bg-danger rounded-circle p-1", iconProps: { fontSize: "14px", color: c ? void 0 : "white" } }) }) });
@@ -11290,7 +11307,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11290
11307
  width: 50,
11291
11308
  isVisible: !1
11292
11309
  }
11293
- ], [i]), c = A((u) => vn(r, {
11310
+ ], [i]), c = R((u) => vn(r, {
11294
11311
  id: u.id.toString()
11295
11312
  }), [r]);
11296
11313
  return /* @__PURE__ */ a.jsx(t, { data: o ?? [], columnsDef: l, tableId: n, useSearchState: !0, paginationMode: "enabled", useScrollableContainer: !0, archiveHighlighting: s, rowNavigation: c });
@@ -11320,7 +11337,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11320
11337
  ]), g = Fr({
11321
11338
  resolver: Lr(f),
11322
11339
  defaultValues: m
11323
- }), b = A(async (h) => {
11340
+ }), b = R(async (h) => {
11324
11341
  i("premissions-substitute-submit");
11325
11342
  try {
11326
11343
  await n.post("permissions/substitutions", h), c(p.updateSuccess, "success"), u(), r(t);
@@ -11347,7 +11364,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11347
11364
  var w;
11348
11365
  const { id: t } = qs(), { user: n } = $(Lt), r = Ke(), i = Mr(), { confirm: o } = St(), { texts: { substitutions: { detail: s } } } = $(X), { data: l } = Be(`/permissions/substitutions/${t}`, {
11349
11366
  enabled: t !== void 0
11350
- }), { data: c } = Be("/permissions/users"), { onSubmit: u, formMethods: d } = Ij(l, e), p = d.watch("employeeId"), { data: f } = Be(`/permissions/roles?userName=${(w = c == null ? void 0 : c.find((y) => y.employeeId === p)) == null ? void 0 : w.name}`, { enabled: p > 0 && !!c }), { refreshAvailableDelegations: m } = $(zs), { checkUserHasPermissions: g } = Ws(), b = A(async () => {
11367
+ }), { data: c } = Be("/permissions/users"), { onSubmit: u, formMethods: d } = Ij(l, e), p = d.watch("employeeId"), { data: f } = Be(`/permissions/roles?userName=${(w = c == null ? void 0 : c.find((y) => y.employeeId === p)) == null ? void 0 : w.name}`, { enabled: p > 0 && !!c }), { refreshAvailableDelegations: m } = $(zs), { checkUserHasPermissions: g } = Ws(), b = R(async () => {
11351
11368
  await o(s.deleteConfirm) && (await r.delete(`/permissions/substitutions/${t}`), m(), i(e));
11352
11369
  }, [r, o, t, i, m, s, e]), h = k(() => p !== (n == null ? void 0 : n.personalNumber) && !g(["ZASTUP_MODIFY"]), [g, p, n == null ? void 0 : n.personalNumber]), v = d.watch("roles"), x = k(() => f == null ? void 0 : f.filter((y) => y.canBeRepresented), [f]), j = k(() => (x == null ? void 0 : x.every((y) => v == null ? void 0 : v.includes(y.name))) ?? !1, [x, v]);
11353
11370
  return /* @__PURE__ */ a.jsx(Nt, { title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
@@ -11429,12 +11446,12 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11429
11446
  onMobile: { displayGroup: i.delegations.table.dateGroup }
11430
11447
  },
11431
11448
  { caption: "", fieldName: "archive", type: "boolean", isVisible: !1 }
11432
- ], [i]), l = A((c) => {
11449
+ ], [i]), l = R((c) => {
11433
11450
  n(t.find((u) => u.id === c.id));
11434
11451
  }, [t, n]);
11435
11452
  return /* @__PURE__ */ a.jsx(e, { tableId: r, columnsDef: s, data: o, onRowClick: l, useSearchState: !0, useScrollableContainer: !0 });
11436
11453
  }, Oj = (e, t = "/approval/delegation/runningProcess", n = "/approval/delegation", r = (i) => `/approval/delegation/${i}`) => {
11437
- const i = Ke(), { startLoading: o, stopLoading: s } = $(xt), l = A(async (d, p) => {
11454
+ const i = Ke(), { startLoading: o, stopLoading: s } = $(xt), l = R(async (d, p) => {
11438
11455
  let f = null;
11439
11456
  o("getHasRunningProcesses");
11440
11457
  try {
@@ -11443,11 +11460,11 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11443
11460
  s("getHasRunningProcesses");
11444
11461
  }
11445
11462
  return f;
11446
- }, [i, o, s, t]), c = A(
11463
+ }, [i, o, s, t]), c = R(
11447
11464
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11448
11465
  async (d, p) => (o("approvalDelegationPost"), i.post(n, d).then(() => !0).catch((f) => (Qa(p, f), !1)).finally(() => s("approvalDelegationPost"))),
11449
11466
  [i, o, s, n]
11450
- ), u = A(async () => e != null && e.id ? (o("approvalDelegationDelete"), i.delete(r(e.id)).then(() => !0).catch(() => !1).finally(() => s("approvalDelegationDelete"))) : !1, [i, e, o, s, r]);
11467
+ ), u = R(async () => e != null && e.id ? (o("approvalDelegationDelete"), i.delete(r(e.id)).then(() => !0).catch(() => !1).finally(() => s("approvalDelegationDelete"))) : !1, [i, e, o, s, r]);
11451
11468
  return { getHasRunningProcesses: l, postEditDelegation: c, postDeleteDelegation: u };
11452
11469
  }, Pj = ({ model: e, handleClose: t, onConfirm: n, apiApprovalDefinitions: r, apiHasRunningProcess: i, apiPostEditDelegation: o, apiDeleteDelegation: s, EmployeePickerComponent: l }) => {
11453
11470
  var C, E;
@@ -11459,13 +11476,13 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11459
11476
  approval: p()
11460
11477
  }), v = Fr({ resolver: Lr(h) }), { getHasRunningProcesses: x, postEditDelegation: j, postDeleteDelegation: w } = Oj(e, i, o, s);
11461
11478
  U(() => {
11462
- var I, O, R, M, S, P;
11479
+ var I, O, T, M, S, P;
11463
11480
  e && (v.reset({
11464
11481
  ...e,
11465
11482
  employee: { id: ((I = e.employee) == null ? void 0 : I.id) ?? 0 },
11466
11483
  delegate: { id: ((O = e.delegate) == null ? void 0 : O.id) ?? 0 },
11467
11484
  dateFrom: e.dateFrom ?? "",
11468
- approval: { id: ((R = e.approval) == null ? void 0 : R.id) ?? 0 }
11485
+ approval: { id: ((T = e.approval) == null ? void 0 : T.id) ?? 0 }
11469
11486
  }, { keepDirty: !1 }), (M = e.employee) != null && M.id || xr(v, "employee.id"), (S = e.delegate) != null && S.id || xr(v, "delegate.id"), (P = e.approval) != null && P.id || xr(v, "approval.id"));
11470
11487
  }, [e, v]);
11471
11488
  const y = async (I) => {
@@ -11473,9 +11490,9 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11473
11490
  return;
11474
11491
  const O = { ...e };
11475
11492
  Object.assign(O, I), au(O);
11476
- const R = await x(O.employee.id, O.approval.id);
11477
- O.includeExisting = R && !!await g(u.delegations.delegateExistingsConfirmMessage), await j(O, v) && (m(e.id ? u.delegations.editSuccess : u.delegations.createSuccess, "success"), n());
11478
- }, N = A(async () => {
11493
+ const T = await x(O.employee.id, O.approval.id);
11494
+ O.includeExisting = T && !!await g(u.delegations.delegateExistingsConfirmMessage), await j(O, v) && (m(e.id ? u.delegations.editSuccess : u.delegations.createSuccess, "success"), n());
11495
+ }, N = R(async () => {
11479
11496
  await g(u.delegations.deleteConfirm) && await w() && (m(u.delegations.deleteSuccess, "success"), n());
11480
11497
  }, [g, u, w, m, n]);
11481
11498
  return /* @__PURE__ */ a.jsxs(ue, { show: e !== null, onHide: () => t(), children: [
@@ -11532,7 +11549,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11532
11549
  U(() => {
11533
11550
  e && (g.reset({ employeeId: r == null ? void 0 : r.id }), !(r != null && r.id) && xr(g, "employeeId"));
11534
11551
  }, [e, r, g]);
11535
- const b = A(async (v) => (d("approvalChangeEmployee"), u.post(o, {
11552
+ const b = R(async (v) => (d("approvalChangeEmployee"), u.post(o, {
11536
11553
  id: i,
11537
11554
  employeeId: v
11538
11555
  }).then(() => !0).catch((x) => (Qa(g, x), !1)).finally(() => p("approvalChangeEmployee"))), [u, i, g, d, p, o]), h = async (v) => {
@@ -11651,7 +11668,7 @@ const Hc = ({ src: e, alt: t, baseUrl: n, customToken: r, placeholder: i, render
11651
11668
  /* @__PURE__ */ a.jsx("div", { className: "col-10 overflow-hidden h-100", children: f ? /* @__PURE__ */ a.jsx(kj, { approval: f, reloadApproval: m, appEmployeeDetail: t, apiPostChangeEmployee: i, EmployeePickerComponent: s, apiApprovalDelegations: o }) : null })
11652
11669
  ] }) });
11653
11670
  }, ZN = ({ overviewApiPath: e = (t) => `/notification/email/overview?date=${t}` }) => {
11654
- const { ProjectIconComponent: t, texts: { emailOverview: n } } = $(X), [r, i] = Xt("date", un(/* @__PURE__ */ new Date(), { representation: "date" })), o = k(() => r ? pt(r) : /* @__PURE__ */ new Date(), [r]), { data: s } = Be(e(un(o, { representation: "date" }))), l = A((p) => {
11671
+ const { ProjectIconComponent: t, texts: { emailOverview: n } } = $(X), [r, i] = Xt("date", un(/* @__PURE__ */ new Date(), { representation: "date" })), o = k(() => r ? pt(r) : /* @__PURE__ */ new Date(), [r]), { data: s } = Be(e(un(o, { representation: "date" }))), l = R((p) => {
11655
11672
  i(un(Su(o, p), { representation: "date" }));
11656
11673
  }, [o, i]), [c, u] = Xt("email", null), d = k(() => c ? s == null ? void 0 : s.find((p) => p.id === c) : null, [c, s]);
11657
11674
  return /* @__PURE__ */ a.jsx(Nt, { variant: "fullScreen", title: /* @__PURE__ */ a.jsxs("div", { className: "d-flex align-items-center gap-3", children: [