@archbase/admin 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,219 +1,219 @@
1
- import { jsx as A, jsxs as P, Fragment as iA } from "react/jsx-runtime";
2
- import AA, { useState as _, useRef as rA, useEffect as U, useMemo as dA, useContext as cA, useCallback as sA, createContext as yA, useLayoutEffect as bA, useReducer as ce } from "react";
3
- import { useArchbaseSecurityManager as de } from "@archbase/security";
4
- import { useUncontrolled as ue, useMediaQuery as VA, useDisclosure as he, useFocusTrap as pe, useForceUpdate as ge } from "@mantine/hooks";
5
- import { Flex as DA, useMantineColorScheme as nA, Menu as j, ActionIcon as EA, Group as OA, Tooltip as wA, Button as fe, Badge as be, Center as XA, Image as me, useMantineTheme as vA, px as Z, Burger as Ce, Box as ve, Avatar as ke, Text as QA, ScrollArea as zA, Stack as lA, Paper as we, AppShell as pA, Drawer as JA, Skeleton as mA } from "@mantine/core";
6
- import { IconSun as jA, IconMoonStars as WA, IconTerminal as xe, IconSearch as ye, IconDots as Ee, IconChevronRight as Se, IconChevronLeft as Re, IconHome2 as Le, IconDashboard as Te, IconUsers as Ie, IconListSearch as ZA, IconUserPlus as Pe, IconNews as De, IconFilePlus as Oe, IconSettings as Qe, IconAlertCircle as ze } from "@tabler/icons-react";
7
- import { useArchbaseAppContext as MA, getI18nextInstance as I, useArchbaseTranslation as NA, archbaseI18next as gA, useArchbaseValidator as Me, ARCHBASE_IOC_API_TYPE as Ne } from "@archbase/core";
8
- import { BRFlag as CA, USFlag as _A, ESFlag as IA, VEFlag as $e, UYFlag as Ue, SVFlag as Fe, PYFlag as qe, PEFlag as Be, PAFlag as Ve, NIFlag as He, MXFlag as Ge, HNFlag as Ke, GTFlag as Ye, ECFlag as Xe, DOFlag as Je, CUFlag as je, CRFlag as We, COFlag as Ze, CLFlag as _e, BOFlag as Ar, ARFlag as er } from "mantine-flagpack";
9
- import { spotlight as rr, Spotlight as fA } from "@mantine/spotlight";
10
- import { useNavigate as $A, useLocation as UA, matchPath as HA } from "react-router";
11
- import { Routes as Ae, useParams as or, useLocation as FA, matchPath as nr, Route as PA, useSearchParams as ee, useNavigate as tr } from "react-router-dom";
12
- import { useMediaQuery as ar } from "usehooks-ts";
13
- import { useArchbaseNavigateParams as sr, useArchbaseVisible as ir, ArchbaseNotifications as lr, ArchbaseAvatarEdit as cr, ArchbaseEdit as TA } from "@archbase/components";
14
- import { SubMenu as dr, MenuItem as GA, menuClasses as L, Sidebar as re, Menu as oe, sidebarClasses as ne } from "react-pro-sidebar";
15
- import ur from "@rehooks/component-size";
16
- import { ArchbaseAdvancedTabs as hr } from "@archbase/layout";
17
- import { useArchbaseStore as pr, useArchbaseRemoteServiceApi as gr, useArchbaseRemoteDataSource as fr } from "@archbase/data";
18
- import { ArchbaseFormModalTemplate as br } from "@archbase/template";
19
- import { create as mr } from "zustand";
20
- const SA = AA.createContext({}), Cr = ({
1
+ import { jsx as A, jsxs as z, Fragment as lA } from "react/jsx-runtime";
2
+ import AA, { useState as _, useRef as nA, useEffect as B, useMemo as uA, useContext as hA, useCallback as X, createContext as DA, useLayoutEffect as kA, useReducer as me } from "react";
3
+ import { useArchbaseSecurityManager as Ce } from "@archbase/security";
4
+ import { useUncontrolled as ve, useMediaQuery as XA, useDisclosure as ke, useFocusTrap as we, useForceUpdate as xe } from "@mantine/hooks";
5
+ import { Flex as $A, useMantineColorScheme as sA, Menu as j, ActionIcon as PA, Group as NA, Tooltip as IA, Button as ye, Badge as Ee, Center as ee, Image as Se, useMantineTheme as yA, px as Z, Burger as Re, Box as Le, Avatar as Ie, Text as UA, ScrollArea as FA, Stack as cA, Skeleton as wA, Paper as Te, AppShell as mA, Drawer as re } from "@mantine/core";
6
+ import { IconSun as oe, IconMoonStars as ne, IconTerminal as De, IconSearch as Pe, IconAlertCircle as Oe, IconDots as ze, IconChevronRight as Qe, IconChevronLeft as Me, IconHome2 as $e, IconDashboard as Ne, IconUsers as Ue, IconListSearch as te, IconUserPlus as Fe, IconNews as qe, IconFilePlus as Be, IconSettings as Ve } from "@tabler/icons-react";
7
+ import { useArchbaseAppContext as qA, getI18nextInstance as O, useArchbaseTranslation as BA, archbaseI18next as CA, useArchbaseValidator as He, ARCHBASE_IOC_API_TYPE as Ge } from "@archbase/core";
8
+ import { BRFlag as xA, USFlag as ae, ESFlag as QA, VEFlag as Ye, UYFlag as Ke, SVFlag as Xe, PYFlag as Je, PEFlag as je, PAFlag as We, NIFlag as Ze, MXFlag as _e, HNFlag as Ar, GTFlag as er, ECFlag as rr, DOFlag as or, CUFlag as nr, CRFlag as tr, COFlag as ar, CLFlag as sr, BOFlag as ir, ARFlag as lr } from "mantine-flagpack";
9
+ import { spotlight as cr, Spotlight as vA } from "@mantine/spotlight";
10
+ import { useNavigate as VA, useLocation as HA, matchPath as JA } from "react-router";
11
+ import { Routes as se, useParams as dr, useLocation as GA, matchPath as ur, Route as MA, useSearchParams as ie, useNavigate as hr } from "react-router-dom";
12
+ import { useMediaQuery as pr } from "usehooks-ts";
13
+ import { useArchbaseNavigateParams as fr, useArchbaseVisible as gr, ArchbaseNotifications as br, ArchbaseAvatarEdit as mr, ArchbaseEdit as zA } from "@archbase/components";
14
+ import { SubMenu as Cr, MenuItem as jA, menuClasses as P, Sidebar as le, Menu as ce, sidebarClasses as de } from "react-pro-sidebar";
15
+ import vr from "@rehooks/component-size";
16
+ import { ArchbaseAdvancedTabs as kr } from "@archbase/layout";
17
+ import { useArchbaseStore as wr, useArchbaseRemoteServiceApi as xr, useArchbaseRemoteDataSource as yr } from "@archbase/data";
18
+ import { ArchbaseFormModalTemplate as Er } from "@archbase/template";
19
+ import { create as Sr } from "zustand";
20
+ const OA = AA.createContext({}), Rr = ({
21
21
  navigationData: e,
22
22
  user: o,
23
23
  owner: c,
24
24
  company: r,
25
- navigationRootLink: s,
26
- children: l,
27
- enableSecurity: i,
28
- securityOptions: t,
29
- onNavigationDataChange: d,
30
- initialSidebarCollapsed: n
25
+ navigationRootLink: t,
26
+ children: d,
27
+ enableSecurity: a,
28
+ securityOptions: n,
29
+ onNavigationDataChange: u,
30
+ initialSidebarCollapsed: i
31
31
  }) => {
32
- const [p, C] = _(n), [w, m] = _(!1), [h, f] = _(i === !0), [k, x] = _(null), g = rA(!1), [Q, O] = ue({
33
- value: d !== void 0 ? e : void 0,
34
- defaultValue: i ? [] : e,
32
+ const [s, C] = _(i), [w, b] = _(!1), [y, I] = _(() => a === !0), [x, l] = _(null), h = nA(!1), [v, E] = ve({
33
+ value: u !== void 0 ? e : void 0,
34
+ defaultValue: a ? [] : e,
35
35
  finalValue: [],
36
- onChange: d
36
+ onChange: u
37
37
  });
38
- U(() => {
39
- }, [Q, i]);
40
- const { securityManager: S } = de({
41
- resourceName: t?.navigationResourceName ? t.navigationResourceName : "ArchbaseAdvancedSidebar",
42
- resourceDescription: t?.navigationResourceDescription ? t.navigationResourceDescription : "archbase:Navegação",
43
- enableSecurity: i
38
+ B(() => {
39
+ }, [v, a]);
40
+ const { securityManager: k } = Ce({
41
+ resourceName: n?.navigationResourceName ? n.navigationResourceName : "ArchbaseAdvancedSidebar",
42
+ resourceDescription: n?.navigationResourceDescription ? n.navigationResourceDescription : "archbase:Navegação",
43
+ enableSecurity: a
44
44
  });
45
- return U(() => {
46
- g.current = !1;
47
- }, [o?.id]), U(() => {
48
- if (!i) {
49
- f(!1);
45
+ return B(() => {
46
+ h.current = !1;
47
+ }, [o?.id]), B(() => {
48
+ if (!a) {
49
+ I(!1);
50
50
  return;
51
51
  }
52
- if (g.current)
52
+ if (h.current)
53
53
  return;
54
- e.filter((R) => R.showInSidebar).forEach((R) => {
55
- S.registerAction(R.label, R.label), R?.links?.forEach((M) => S.registerAction(`${R.label} -> ${M.label}`, `${R.label} -> ${M.label}`));
54
+ e.filter((T) => T.showInSidebar).forEach((T) => {
55
+ k.registerAction(T.label, T.label), T?.links?.forEach((U) => k.registerAction(`${T.label} -> ${U.label}`, `${T.label} -> ${U.label}`));
56
56
  });
57
- const H = () => {
58
- g.current = !0;
59
- const R = e.map((M) => ({
60
- ...M,
61
- disabled: !S.hasPermission(M.label),
62
- links: M.links && M.links.map((W) => {
63
- const q = S.hasPermission(`${M.label} -> ${W.label}`);
57
+ const $ = () => {
58
+ h.current = !0;
59
+ const T = e.map((U) => ({
60
+ ...U,
61
+ disabled: !k.hasPermission(U.label),
62
+ links: U.links && U.links.map((W) => {
63
+ const G = k.hasPermission(`${U.label} -> ${W.label}`);
64
64
  return {
65
65
  ...W,
66
- disabled: !q
66
+ disabled: !G
67
67
  };
68
68
  })
69
69
  }));
70
- O(R), f(!1), x(null);
71
- }, oA = !S.isLoading() && !S.isError();
72
- if (S.isError()) {
73
- g.current = !0;
74
- const R = S.getError() || "Erro ao carregar permissões de navegação";
75
- x(R), f(!1), O(e);
70
+ E(T), I(!1), l(null);
71
+ }, tA = !k.isLoading() && !k.isError();
72
+ if (k.isError()) {
73
+ h.current = !0;
74
+ const T = k.getError() || "Erro ao carregar permissões de navegação";
75
+ l(T), I(!1), E(e);
76
76
  return;
77
77
  }
78
- if (oA) {
79
- H();
78
+ if (tA) {
79
+ $();
80
80
  return;
81
81
  }
82
- f(!0), x(null);
83
- let F = !1;
84
- const $ = setInterval(() => {
85
- if (!F && S.isError()) {
86
- clearInterval($), g.current = !0;
87
- const R = S.getError() || "Erro ao carregar permissões de navegação";
88
- x(R), f(!1), O(e);
82
+ I(!0), l(null);
83
+ let H = !1;
84
+ const V = setInterval(() => {
85
+ if (!H && k.isError()) {
86
+ clearInterval(V), h.current = !0;
87
+ const T = k.getError() || "Erro ao carregar permissões de navegação";
88
+ l(T), I(!1), E(e);
89
89
  }
90
90
  }, 100), eA = setTimeout(() => {
91
- F || (clearInterval($), f((R) => R && (g.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), O(e), !1)));
91
+ H || (clearInterval(V), I((T) => T && (h.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), E(e), !1)));
92
92
  }, 3e3);
93
- return S.apply(() => {
94
- F || (clearInterval($), clearTimeout(eA), H());
93
+ return k.apply(() => {
94
+ H || (clearInterval(V), clearTimeout(eA), $());
95
95
  }), () => {
96
- F = !0, clearInterval($), clearTimeout(eA);
96
+ H = !0, clearInterval(V), clearTimeout(eA);
97
97
  };
98
- }, [o?.id, i, e, S, O]), /* @__PURE__ */ A(
99
- SA.Provider,
98
+ }, [o?.id, a, e, k, E]), /* @__PURE__ */ A(
99
+ OA.Provider,
100
100
  {
101
101
  value: {
102
- navigationData: Q,
103
- setNavigationData: O,
102
+ navigationData: v,
103
+ setNavigationData: E,
104
104
  user: o,
105
105
  owner: c,
106
106
  company: r,
107
- navigationRootLink: s,
108
- collapsed: p,
107
+ navigationRootLink: t,
108
+ collapsed: s,
109
109
  setCollapsed: C,
110
110
  hidden: w,
111
- setHidden: m,
112
- onNavigationDataChange: d,
113
- isLoadingPermissions: h,
114
- permissionsError: k
111
+ setHidden: b,
112
+ onNavigationDataChange: u,
113
+ isLoadingPermissions: y,
114
+ permissionsError: x
115
115
  },
116
- children: l
116
+ children: d
117
117
  }
118
118
  );
119
- }, Co = ({ children: e }) => /* @__PURE__ */ A(DA, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), vr = () => {
120
- const e = MA(), { colorScheme: o } = nA(), c = o === "dark", [r, s] = _(I().language);
121
- U(() => {
122
- const d = (n) => {
123
- s(n);
119
+ }, Lo = ({ children: e }) => /* @__PURE__ */ A($A, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), Lr = () => {
120
+ const e = qA(), { colorScheme: o } = sA(), c = o === "dark", [r, t] = _(O().language);
121
+ B(() => {
122
+ const u = (i) => {
123
+ t(i);
124
124
  };
125
- return I().on("languageChanged", d), () => {
126
- I().off("languageChanged", d);
125
+ return O().on("languageChanged", u), () => {
126
+ O().off("languageChanged", u);
127
127
  };
128
128
  }, []);
129
- const l = (d) => {
130
- if (!d)
131
- return /* @__PURE__ */ A(CA, { size: 24 });
132
- if (d === "en" || d === "en-US")
133
- return /* @__PURE__ */ A(_A, { size: 24 });
134
- if (d === "pt-BR")
135
- return /* @__PURE__ */ A(CA, { size: 24 });
136
- if (d.includes("es"))
129
+ const d = (u) => {
130
+ if (!u)
131
+ return /* @__PURE__ */ A(xA, { size: 24 });
132
+ if (u === "en" || u === "en-US")
133
+ return /* @__PURE__ */ A(ae, { size: 24 });
134
+ if (u === "pt-BR")
135
+ return /* @__PURE__ */ A(xA, { size: 24 });
136
+ if (u.includes("es"))
137
137
  switch (navigator.language || navigator.languages[0]) {
138
138
  case "es":
139
139
  case "es-ES":
140
- return /* @__PURE__ */ A(IA, { size: 24 });
140
+ return /* @__PURE__ */ A(QA, { size: 24 });
141
141
  case "es-AR":
142
- return /* @__PURE__ */ A(er, { size: 24 });
142
+ return /* @__PURE__ */ A(lr, { size: 24 });
143
143
  case "es-BO":
144
- return /* @__PURE__ */ A(Ar, { size: 24 });
144
+ return /* @__PURE__ */ A(ir, { size: 24 });
145
145
  case "es-CL":
146
- return /* @__PURE__ */ A(_e, { size: 24 });
146
+ return /* @__PURE__ */ A(sr, { size: 24 });
147
147
  case "es-CO":
148
- return /* @__PURE__ */ A(Ze, { size: 24 });
148
+ return /* @__PURE__ */ A(ar, { size: 24 });
149
149
  case "es-CR":
150
- return /* @__PURE__ */ A(We, { size: 24 });
150
+ return /* @__PURE__ */ A(tr, { size: 24 });
151
151
  case "es-CU":
152
- return /* @__PURE__ */ A(je, { size: 24 });
152
+ return /* @__PURE__ */ A(nr, { size: 24 });
153
153
  case "es-DO":
154
- return /* @__PURE__ */ A(Je, { size: 24 });
154
+ return /* @__PURE__ */ A(or, { size: 24 });
155
155
  case "es-EC":
156
- return /* @__PURE__ */ A(Xe, { size: 24 });
156
+ return /* @__PURE__ */ A(rr, { size: 24 });
157
157
  case "es-GT":
158
- return /* @__PURE__ */ A(Ye, { size: 24 });
158
+ return /* @__PURE__ */ A(er, { size: 24 });
159
159
  case "es-HN":
160
- return /* @__PURE__ */ A(Ke, { size: 24 });
160
+ return /* @__PURE__ */ A(Ar, { size: 24 });
161
161
  case "es-MX":
162
- return /* @__PURE__ */ A(Ge, { size: 24 });
162
+ return /* @__PURE__ */ A(_e, { size: 24 });
163
163
  case "es-NI":
164
- return /* @__PURE__ */ A(He, { size: 24 });
164
+ return /* @__PURE__ */ A(Ze, { size: 24 });
165
165
  case "es-PA":
166
- return /* @__PURE__ */ A(Ve, { size: 24 });
166
+ return /* @__PURE__ */ A(We, { size: 24 });
167
167
  case "es-PE":
168
- return /* @__PURE__ */ A(Be, { size: 24 });
168
+ return /* @__PURE__ */ A(je, { size: 24 });
169
169
  case "es-PY":
170
- return /* @__PURE__ */ A(qe, { size: 24 });
170
+ return /* @__PURE__ */ A(Je, { size: 24 });
171
171
  case "es-SV":
172
- return /* @__PURE__ */ A(Fe, { size: 24 });
172
+ return /* @__PURE__ */ A(Xe, { size: 24 });
173
173
  case "es-UY":
174
- return /* @__PURE__ */ A(Ue, { size: 24 });
174
+ return /* @__PURE__ */ A(Ke, { size: 24 });
175
175
  case "es-VE":
176
- return /* @__PURE__ */ A($e, { size: 24 });
176
+ return /* @__PURE__ */ A(Ye, { size: 24 });
177
177
  default:
178
- return /* @__PURE__ */ A(IA, { size: 24 });
178
+ return /* @__PURE__ */ A(QA, { size: 24 });
179
179
  }
180
- return /* @__PURE__ */ A(CA, { size: 24 });
181
- }, i = () => {
180
+ return /* @__PURE__ */ A(xA, { size: 24 });
181
+ }, a = () => {
182
182
  if (e.languages)
183
- return e.languages.filter((d) => d).map((d) => /* @__PURE__ */ A(
183
+ return e.languages.filter((u) => u).map((u) => /* @__PURE__ */ A(
184
184
  j.Item,
185
185
  {
186
- onClick: () => t(d.lang),
187
- leftSection: l(d.lang),
188
- children: d.name
186
+ onClick: () => n(u.lang),
187
+ leftSection: d(u.lang),
188
+ children: u.name
189
189
  },
190
- d.name
190
+ u.name
191
191
  ));
192
- }, t = (d) => {
193
- I().changeLanguage(d);
192
+ }, n = (u) => {
193
+ O().changeLanguage(u);
194
194
  };
195
- return /* @__PURE__ */ P(j, { shadow: "md", width: 200, position: "bottom-end", children: [
196
- /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ A(EA, { variant: "transparent", color: c ? "white" : "blue", title: I().t("toggleLanguage"), children: l(r) }) }),
197
- /* @__PURE__ */ A(j.Dropdown, { children: i() })
195
+ return /* @__PURE__ */ z(j, { shadow: "md", width: 200, position: "bottom-end", children: [
196
+ /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ A(PA, { variant: "transparent", color: c ? "white" : "blue", title: O().t("toggleLanguage"), children: d(r) }) }),
197
+ /* @__PURE__ */ A(j.Dropdown, { children: a() })
198
198
  ] });
199
- }, kr = () => {
200
- const e = MA(), { colorScheme: o } = nA(), { t: c, i18n: r } = NA(), s = (t) => t === "en" ? /* @__PURE__ */ A(_A, { size: 24 }) : t === "pt-BR" ? /* @__PURE__ */ A(CA, { size: 24 }) : t === "es" ? /* @__PURE__ */ A(IA, { size: 24 }) : /* @__PURE__ */ A(CA, { size: 24 }), l = () => {
199
+ }, Ir = () => {
200
+ const e = qA(), { colorScheme: o } = sA(), { t: c, i18n: r } = BA(), t = (n) => n === "en" ? /* @__PURE__ */ A(ae, { size: 24 }) : n === "pt-BR" ? /* @__PURE__ */ A(xA, { size: 24 }) : n === "es" ? /* @__PURE__ */ A(QA, { size: 24 }) : /* @__PURE__ */ A(xA, { size: 24 }), d = () => {
201
201
  if (e.languages)
202
- return e.languages.filter((t) => t).map((t) => /* @__PURE__ */ A(
202
+ return e.languages.filter((n) => n).map((n) => /* @__PURE__ */ A(
203
203
  j.Item,
204
204
  {
205
- onClick: () => i(t.lang),
206
- leftSection: s(t.lang),
207
- children: t.name
205
+ onClick: () => a(n.lang),
206
+ leftSection: t(n.lang),
207
+ children: n.name
208
208
  },
209
- t.name
209
+ n.name
210
210
  ));
211
- }, i = (t) => {
212
- r.changeLanguage(t);
211
+ }, a = (n) => {
212
+ r.changeLanguage(n);
213
213
  };
214
- return /* @__PURE__ */ P(j, { children: [
215
- /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ P(
216
- OA,
214
+ return /* @__PURE__ */ z(j, { children: [
215
+ /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ z(
216
+ NA,
217
217
  {
218
218
  w: "100%",
219
219
  justify: "flex-start",
@@ -222,175 +222,175 @@ const SA = AA.createContext({}), Cr = ({
222
222
  variant: "transparent",
223
223
  fw: 400,
224
224
  gap: 4,
225
- title: I().t("archbase:toggleLanguage"),
225
+ title: O().t("archbase:toggleLanguage"),
226
226
  children: [
227
- s(r.language),
228
- `${e.languages.find((t) => t.lang === r.language)?.name ?? "Português"}`
227
+ t(r.language),
228
+ `${e.languages.find((n) => n.lang === r.language)?.name ?? "Português"}`
229
229
  ]
230
230
  }
231
231
  ) }),
232
- /* @__PURE__ */ A(j.Dropdown, { children: l() })
232
+ /* @__PURE__ */ A(j.Dropdown, { children: d() })
233
233
  ] });
234
- }, wr = ({
234
+ }, Tr = ({
235
235
  toggleColorScheme: e,
236
236
  sunColor: o = "white",
237
237
  moonColor: c = "blue"
238
238
  }) => {
239
- const { t: r } = NA(), { colorScheme: s, toggleColorScheme: l } = nA(), i = () => {
240
- e ? e() : l();
241
- }, t = s === "dark";
239
+ const { t: r } = BA(), { colorScheme: t, toggleColorScheme: d } = sA(), a = () => {
240
+ e ? e() : d();
241
+ }, n = t === "dark";
242
242
  return /* @__PURE__ */ A(
243
- EA,
243
+ PA,
244
244
  {
245
245
  variant: "transparent",
246
- color: t ? o : c,
247
- onClick: () => i(),
248
- title: I().t("archbase:toggleColorScheme"),
249
- children: t ? /* @__PURE__ */ A(jA, { size: "1.5rem" }) : /* @__PURE__ */ A(WA, { size: "1.5rem" })
246
+ color: n ? o : c,
247
+ onClick: () => a(),
248
+ title: O().t("archbase:toggleColorScheme"),
249
+ children: n ? /* @__PURE__ */ A(oe, { size: "1.5rem" }) : /* @__PURE__ */ A(ne, { size: "1.5rem" })
250
250
  }
251
251
  );
252
- }, xr = (e) => /* @__PURE__ */ A(OA, { gap: "sm", children: e.children });
253
- function yr({ category: e, label: o, color: c, description: r, image: s, onClick: l }) {
252
+ }, Dr = (e) => /* @__PURE__ */ A(NA, { gap: "sm", children: e.children });
253
+ function Pr({ category: e, label: o, color: c, description: r, image: t, onClick: d }) {
254
254
  return /* @__PURE__ */ A(
255
- fA.Action,
255
+ vA.Action,
256
256
  {
257
- onClick: l,
258
- label: `${I().t(o || "")}`,
259
- description: r ? I().t(r) : void 0,
260
- leftSection: s ? /* @__PURE__ */ A(XA, { children: /* @__PURE__ */ A(me, { src: s, alt: I().t(o || ""), width: 24, height: 24 }) }) : void 0,
261
- rightSection: e ? /* @__PURE__ */ A(be, { color: c, size: "sm", children: I().t(e) }) : void 0
257
+ onClick: d,
258
+ label: `${O().t(o || "")}`,
259
+ description: r ? O().t(r) : void 0,
260
+ leftSection: t ? /* @__PURE__ */ A(ee, { children: /* @__PURE__ */ A(Se, { src: t, alt: O().t(o || ""), width: 24, height: 24 }) }) : void 0,
261
+ rightSection: e ? /* @__PURE__ */ A(Ee, { color: c, size: "sm", children: O().t(e) }) : void 0
262
262
  },
263
263
  o
264
264
  );
265
265
  }
266
- const Er = ({ navigationData: e, color: o }) => {
267
- const [c, r] = _(""), s = $A(), { t: l } = NA(), i = dA(() => {
268
- const d = new Array();
269
- return e.forEach((n) => {
270
- n.links ? n.links.forEach((p) => {
271
- !p.disabled && p.showInSidebar && d.push({
272
- id: p.label,
273
- category: p.category ? p.category.toUpperCase() : "",
274
- color: p.color,
275
- label: p.label,
276
- link: p.link,
266
+ const Or = ({ navigationData: e, color: o }) => {
267
+ const [c, r] = _(""), t = VA(), { t: d } = BA(), a = uA(() => {
268
+ const u = new Array();
269
+ return e.forEach((i) => {
270
+ i.links ? i.links.forEach((s) => {
271
+ !s.disabled && s.showInSidebar && u.push({
272
+ id: s.label,
273
+ category: s.category ? s.category.toUpperCase() : "",
274
+ color: s.color,
275
+ label: s.label,
276
+ link: s.link,
277
277
  onClick: () => {
278
- p.link && s(p.link);
278
+ s.link && t(s.link);
279
279
  }
280
280
  });
281
- }) : !n.disabled && n.showInSidebar && d.push({
282
- id: n.label,
281
+ }) : !i.disabled && i.showInSidebar && u.push({
282
+ id: i.label,
283
283
  onClick: () => {
284
- n.link && s(n.link);
284
+ i.link && t(i.link);
285
285
  },
286
- category: n.category ? n.category.toUpperCase() : "",
287
- color: n.color,
288
- label: n.label,
289
- link: n.link
286
+ category: i.category ? i.category.toUpperCase() : "",
287
+ color: i.color,
288
+ label: i.label,
289
+ link: i.link
290
290
  });
291
- }), d;
292
- }, [e, s]), t = i.filter((d) => {
293
- const n = `${l(d.label || "")}`;
294
- return n && n.toLowerCase().includes(c.toLowerCase().trim());
295
- }).map((d) => /* @__PURE__ */ A(yr, { ...d }, d.id));
296
- return /* @__PURE__ */ A(iA, { children: i && i.length > 0 ? /* @__PURE__ */ P(iA, { children: [
297
- /* @__PURE__ */ A(wA, { withinPortal: !0, withArrow: !0, label: `${l("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ A(fe, { color: o, leftSection: /* @__PURE__ */ A(xe, { size: "24px" }), onClick: () => rr.open() }) }),
298
- /* @__PURE__ */ P(
299
- fA.Root,
291
+ }), u;
292
+ }, [e, t]), n = a.filter((u) => {
293
+ const i = `${d(u.label || "")}`;
294
+ return i && i.toLowerCase().includes(c.toLowerCase().trim());
295
+ }).map((u) => /* @__PURE__ */ A(Pr, { ...u }, u.id));
296
+ return /* @__PURE__ */ A(lA, { children: a && a.length > 0 ? /* @__PURE__ */ z(lA, { children: [
297
+ /* @__PURE__ */ A(IA, { withinPortal: !0, withArrow: !0, label: `${d("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ A(ye, { color: o, leftSection: /* @__PURE__ */ A(De, { size: "24px" }), onClick: () => cr.open() }) }),
298
+ /* @__PURE__ */ z(
299
+ vA.Root,
300
300
  {
301
301
  shortcut: ["mod + M", "/"],
302
- onQueryChange: (d) => r(d),
302
+ onQueryChange: (u) => r(u),
303
303
  query: c,
304
304
  children: [
305
- /* @__PURE__ */ A(fA.Search, { placeholder: `${l("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ A(ye, { size: "1.2rem" }) }),
306
- /* @__PURE__ */ A(fA.ActionsList, { children: t.length > 0 ? t : /* @__PURE__ */ A(fA.Empty, { children: I().t("archbase:Nenhum resultado...") }) })
305
+ /* @__PURE__ */ A(vA.Search, { placeholder: `${d("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ A(Pe, { size: "1.2rem" }) }),
306
+ /* @__PURE__ */ A(vA.ActionsList, { children: n.length > 0 ? n : /* @__PURE__ */ A(vA.Empty, { children: O().t("archbase:Nenhum resultado...") }) })
307
307
  ]
308
308
  }
309
309
  )
310
310
  ] }) : null });
311
- }, Sr = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAsLCwsMCw0ODg0SExETEhoYFhYYGiccHhweHCc8JSslJSslPDVANDA0QDVfSkJCSl9tXFdcbYR2doSnnqfa2v8BCwsLCwwLDQ4ODRITERMSGhgWFhgaJxweHB4cJzwlKyUlKyU8NUA0MDRANV9KQkJKX21cV1xthHZ2hKeep9ra///CABEIA7IDsgMBIgACEQEDEQH/xAAaAAEAAwEBAQAAAAAAAAAAAAAAAwQFAgEH/9oACAEBAAAAAPoQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHMMUfPg9de9ddSd9gAAAAAAAAAAAAAAAOK9eIAAHUs08gAAAAAAAAAAAAAACCrAAAABLbsAAAAAAAAAAAAAAHNWtwAAA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GqnEKOr5HJuhq0w8yi5L8x/5h4jufmNwhzDpkcxhIqPofY9BMyqKkgYeaGiD3OGd35jdEmIi9x3wkxDbX5TfnjImpz2GHmXPKKYJJNSa3hXZeUkYWaYcwBwseG3rTzeXmETLU9sPHiP60Gwvyu68rEYWaccwBwsxDb1p5xW5vMIuQzOHjO+poNh0GrsnKxGFmmHMK4WNDfRvY2+JMIuQzOHiu+py26ISLETRsLND9y4V0fNSDanjonc9sPGd9TQbDowEjTCTMRdfmGEmIbetD3szx0Tudhh4zv60Gw6RSI6aHCTSnmFMAhhUGosLx0T1qe2Hju/rQbDpVWZTVSRhJr0ce4wrKwqpr+teYRdPmOHjRH1NBsOmQxU1BocQ5r0ce4wGDCoNR+piTKjJczh4jvzN06rshqpphJlTk+RwCD+liRkh9zth4rxNTlt1CkR05ThJlTkwof8AmAQf0JIAqTTEWZJyTIb9SpEdOU4hzKtk2R/3xIqw9ddsPEeIc+qEivD0OW2IcZHy0O3+yLMAZJmd8Ekmp6rhzDLk2YwrqwqpqP8ATMZQj1dLk/FH+P8A/8QAFBEBAAAAAAAAAAAAAAAAAAAAsP/aAAgBAgEBPwBhD//EABQRAQAAAAAAAAAAAAAAAAAAALD/2gAIAQMBAT8AYQ//2Q==", Io = ({
312
312
  userMenuItems: e,
313
313
  showUserMenuToggleColorScheme: o = !0,
314
314
  showUserMenuOptionsLabel: c = !0,
315
315
  userMenuToggleColorSchemeIconSize: r = 14,
316
- showMenuItemsAfterToggleColorScheme: s = !0,
317
- userMenuItemsAfterToggleColorScheme: l,
318
- showMenuItemsBeforeToggleColorScheme: i = !0,
319
- userMenuItemsBeforeToggleColorScheme: t,
320
- hideAutoHeaderActionsOnUserMenu: d = !0,
321
- showHeaderActions: n = !0,
322
- showHeaderToggleColorScheme: p = !0,
316
+ showMenuItemsAfterToggleColorScheme: t = !0,
317
+ userMenuItemsAfterToggleColorScheme: d,
318
+ showMenuItemsBeforeToggleColorScheme: a = !0,
319
+ userMenuItemsBeforeToggleColorScheme: n,
320
+ hideAutoHeaderActionsOnUserMenu: u = !0,
321
+ showHeaderActions: i = !0,
322
+ showHeaderToggleColorScheme: s = !0,
323
323
  hideAutoHeaderActionsOnUserMenuBreakPoint: C,
324
324
  withDividerAfterUserMenuToggleColorScheme: w = !0,
325
- user: m,
326
- navigationData: h = [],
327
- logo: f,
328
- headerActions: k,
329
- styleLogo: x,
330
- showLanguageSelector: g = !1,
331
- sideBarHiddenBreakPoint: Q,
332
- headerLeftContent: O,
333
- toggleColorScheme: S,
334
- logoLeftSection: V,
335
- logoRightSection: H,
336
- showBurger: oA = !0,
325
+ user: b,
326
+ navigationData: y = [],
327
+ logo: I,
328
+ headerActions: x,
329
+ styleLogo: l,
330
+ showLanguageSelector: h = !1,
331
+ sideBarHiddenBreakPoint: v,
332
+ headerLeftContent: E,
333
+ toggleColorScheme: k,
334
+ logoLeftSection: R,
335
+ logoRightSection: $,
336
+ showBurger: tA = !0,
337
337
  showCommands: J = !0,
338
- sunColor: F,
339
- moonColor: $,
338
+ sunColor: H,
339
+ moonColor: V,
340
340
  styles: eA
341
341
  }) => {
342
- const R = vA(), { colorScheme: M, toggleColorScheme: W } = nA(), q = cA(SA), G = VA(
343
- `(max-width: ${Q ? Z(Q) : R.breakpoints.md})`
344
- ), N = VA(
345
- `(max-width: ${C ? Z(C) : R.breakpoints.md})`
342
+ const T = yA(), { colorScheme: U, toggleColorScheme: W } = sA(), G = hA(OA), rA = XA(
343
+ `(max-width: ${v ? Z(v) : T.breakpoints.md})`
344
+ ), F = XA(
345
+ `(max-width: ${C ? Z(C) : T.breakpoints.md})`
346
346
  );
347
- let b = !1, u = !1;
348
- return d && (n = !N, p = !N, o = N, c = N, i = N, w = N, g && (u = !N, b = N)), /* @__PURE__ */ P(iA, { children: [
349
- /* @__PURE__ */ P(DA, { style: { width: 300, height: 50 }, align: "center", children: [
350
- V,
347
+ let g = !1, f = !1;
348
+ return u && (i = !F, s = !F, o = F, c = F, a = F, w = F, h && (f = !F, g = F)), /* @__PURE__ */ z(lA, { children: [
349
+ /* @__PURE__ */ z($A, { style: { width: 300, height: 50 }, align: "center", children: [
350
+ R,
351
351
  /* @__PURE__ */ A(
352
352
  "img",
353
353
  {
354
354
  style: {
355
355
  height: 50,
356
- ...x
356
+ ...l
357
357
  },
358
358
  alt: "logo",
359
- src: f
359
+ src: I
360
360
  }
361
361
  ),
362
- H
362
+ $
363
363
  ] }),
364
- oA && /* @__PURE__ */ A(
365
- Ce,
364
+ tA && /* @__PURE__ */ A(
365
+ Re,
366
366
  {
367
- opened: q.hidden ? q.hidden : !1,
368
- onClick: () => q.setHidden(!q.hidden),
367
+ opened: G.hidden ? G.hidden : !1,
368
+ onClick: () => G.setHidden(!G.hidden),
369
369
  size: "sm",
370
- color: R.colors.gray[7],
370
+ color: T.colors.gray[7],
371
371
  mx: { base: "xs", xs: "lg", sm: "xl" },
372
- display: G ? "" : "none"
372
+ display: rA ? "" : "none"
373
373
  }
374
374
  ),
375
- /* @__PURE__ */ A("div", { children: J && /* @__PURE__ */ A(Er, { navigationData: h }) }),
376
- /* @__PURE__ */ A(ve, { style: { flex: 1 }, children: O }),
377
- /* @__PURE__ */ P(xr, { children: [
378
- n && k,
379
- p && /* @__PURE__ */ A(wr, { toggleColorScheme: S, sunColor: F, moonColor: $ }),
380
- u && /* @__PURE__ */ A(vr, {}),
381
- /* @__PURE__ */ P(j, { shadow: "md", width: 200, position: "bottom-end", styles: eA?.menu, children: [
382
- /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ P("div", { children: [
375
+ /* @__PURE__ */ A("div", { children: J && /* @__PURE__ */ A(Or, { navigationData: y }) }),
376
+ /* @__PURE__ */ A(Le, { style: { flex: 1 }, children: E }),
377
+ /* @__PURE__ */ z(Dr, { children: [
378
+ i && x,
379
+ s && /* @__PURE__ */ A(Tr, { toggleColorScheme: k, sunColor: H, moonColor: V }),
380
+ f && /* @__PURE__ */ A(Lr, {}),
381
+ /* @__PURE__ */ z(j, { shadow: "md", width: 200, position: "bottom-end", styles: eA?.menu, children: [
382
+ /* @__PURE__ */ A(j.Target, { children: /* @__PURE__ */ z("div", { children: [
383
383
  /* @__PURE__ */ A(
384
- ke,
384
+ Ie,
385
385
  {
386
386
  style: { cursor: "pointer" },
387
387
  radius: "xl",
388
388
  ml: 8,
389
- src: m ? m.photo : Sr,
390
- alt: m ? m.displayName : ""
389
+ src: b ? b.photo : zr,
390
+ alt: b ? b.displayName : ""
391
391
  }
392
392
  ),
393
- m && m.isAdmin ? /* @__PURE__ */ A(
393
+ b && b.isAdmin ? /* @__PURE__ */ A(
394
394
  "div",
395
395
  {
396
396
  style: {
@@ -407,58 +407,58 @@ const Er = ({ navigationData: e, color: o }) => {
407
407
  borderRadius: 50,
408
408
  backgroundColor: "green"
409
409
  },
410
- children: /* @__PURE__ */ A(QA, { size: "xs", c: "white", children: "A" })
410
+ children: /* @__PURE__ */ A(UA, { size: "xs", c: "white", children: "A" })
411
411
  }
412
412
  ) : null
413
413
  ] }) }),
414
- /* @__PURE__ */ P(j.Dropdown, { children: [
414
+ /* @__PURE__ */ z(j.Dropdown, { children: [
415
415
  e,
416
- c && /* @__PURE__ */ A(j.Label, { children: `${I().t("archbase:Opções")}` }),
417
- i && t,
416
+ c && /* @__PURE__ */ A(j.Label, { children: `${O().t("archbase:Opções")}` }),
417
+ a && n,
418
418
  o && /* @__PURE__ */ A(
419
419
  j.Item,
420
420
  {
421
- leftSection: M === "dark" ? /* @__PURE__ */ A(jA, { size: r }) : /* @__PURE__ */ A(WA, { size: r }),
422
- onClick: S || W,
423
- children: `${I().t("archbase:toggleColorScheme")}`
421
+ leftSection: U === "dark" ? /* @__PURE__ */ A(oe, { size: r }) : /* @__PURE__ */ A(ne, { size: r }),
422
+ onClick: k || W,
423
+ children: `${O().t("archbase:toggleColorScheme")}`
424
424
  }
425
425
  ),
426
- b && /* @__PURE__ */ A(kr, {}),
426
+ g && /* @__PURE__ */ A(Ir, {}),
427
427
  w && /* @__PURE__ */ A(j.Divider, {}),
428
- s && l
428
+ t && d
429
429
  ] })
430
430
  ] })
431
431
  ] })
432
432
  ] });
433
433
  };
434
- function KA(e, o, c, r, s, l, i, t, d, n) {
435
- const p = l ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, C = l ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, w = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", m = "0.5";
434
+ function WA(e, o, c, r, t, d, a, n, u, i) {
435
+ const s = d ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, C = d ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, w = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", b = "0.5";
436
436
  if (r.links) {
437
437
  if (!(r.disabled && r.hideDisabledItem))
438
- return /* @__PURE__ */ A(wA, { disabled: !o, label: gA.t(r.label), children: /* @__PURE__ */ A(
439
- dr,
438
+ return /* @__PURE__ */ A(IA, { disabled: !o, label: CA.t(r.label), children: /* @__PURE__ */ A(
439
+ Cr,
440
440
  {
441
441
  rootStyles: {
442
442
  fontSize: "16px",
443
- [`.${L.button}`]: {
443
+ [`.${P.button}`]: {
444
444
  "&:hover": {
445
- [`.${L.icon}`]: {
445
+ [`.${P.icon}`]: {
446
446
  color: "white"
447
447
  },
448
- [`.${L.label}`]: {
448
+ [`.${P.label}`]: {
449
449
  color: "white"
450
450
  }
451
451
  }
452
452
  },
453
- [`.${L.subMenuContent}`]: {
454
- width: o && n
453
+ [`.${P.subMenuContent}`]: {
454
+ width: o && i
455
455
  },
456
- [`.${L.disabled}`]: {
457
- opacity: m,
458
- [`.${L.icon}`]: {
456
+ [`.${P.disabled}`]: {
457
+ opacity: b,
458
+ [`.${P.icon}`]: {
459
459
  color: w + " !important"
460
460
  },
461
- [`.${L.label}`]: {
461
+ [`.${P.label}`]: {
462
462
  color: w + " !important"
463
463
  }
464
464
  }
@@ -466,83 +466,83 @@ function KA(e, o, c, r, s, l, i, t, d, n) {
466
466
  id: r.label,
467
467
  icon: r.icon,
468
468
  defaultOpen: !r.disabled,
469
- label: o ? "" : gA.t(r.label),
469
+ label: o ? "" : CA.t(r.label),
470
470
  disabled: r.disabled,
471
- children: r.links && r.links.filter((h) => h.showInSidebar === !0 && (!h.disabled || !h.hideDisabledItem)).map((h, f) => /* @__PURE__ */ A(
472
- GA,
471
+ children: r.links && r.links.filter((y) => y.showInSidebar === !0 && (!y.disabled || !y.hideDisabledItem)).map((y, I) => /* @__PURE__ */ A(
472
+ jA,
473
473
  {
474
- onClick: () => c(h),
474
+ onClick: () => c(y),
475
475
  rootStyles: {
476
- [`.${L.icon}`]: {
477
- background: p,
478
- color: t && h.link === i ? "white" : C
476
+ [`.${P.icon}`]: {
477
+ background: s,
478
+ color: n && y.link === a ? "white" : C
479
479
  },
480
- [`.${L.label}`]: {
481
- color: t && h.link === i ? "white" : d
480
+ [`.${P.label}`]: {
481
+ color: n && y.link === a ? "white" : u
482
482
  },
483
- [`.${L.button}`]: {
483
+ [`.${P.button}`]: {
484
484
  paddingLeft: "40px !important",
485
485
  "&:hover": {
486
- [`.${L.icon}`]: {
486
+ [`.${P.icon}`]: {
487
487
  color: "white"
488
488
  },
489
- [`.${L.label}`]: {
489
+ [`.${P.label}`]: {
490
490
  color: "white"
491
491
  }
492
492
  }
493
493
  },
494
- [`.${L.disabled}`]: {
495
- opacity: m,
496
- [`.${L.icon}`]: {
497
- background: (p || "") + " !important",
494
+ [`.${P.disabled}`]: {
495
+ opacity: b,
496
+ [`.${P.icon}`]: {
497
+ background: (s || "") + " !important",
498
498
  color: w + " !important"
499
499
  },
500
- [`.${L.label}`]: {
500
+ [`.${P.label}`]: {
501
501
  color: w + " !important"
502
502
  }
503
503
  }
504
504
  },
505
- id: h.label,
506
- icon: h.icon,
507
- disabled: typeof h.disabled == "function" ? h.disabled() : h.disabled,
508
- active: t && h.link === i,
509
- children: gA.t(h.label)
505
+ id: y.label,
506
+ icon: y.icon,
507
+ disabled: typeof y.disabled == "function" ? y.disabled() : y.disabled,
508
+ active: n && y.link === a,
509
+ children: CA.t(y.label)
510
510
  },
511
- f
511
+ I
512
512
  ))
513
513
  },
514
- s
514
+ t
515
515
  ) });
516
516
  } else if (r.showInSidebar && (!r.disabled || !r.hideDisabledItem))
517
- return /* @__PURE__ */ A(wA, { disabled: !o, label: gA.t(r.label), children: /* @__PURE__ */ A(
518
- GA,
517
+ return /* @__PURE__ */ A(IA, { disabled: !o, label: CA.t(r.label), children: /* @__PURE__ */ A(
518
+ jA,
519
519
  {
520
520
  rootStyles: {
521
521
  fontSize: "16px",
522
- [`.${L.button}`]: {
522
+ [`.${P.button}`]: {
523
523
  "&:hover": {
524
- [`.${L.icon}`]: {
524
+ [`.${P.icon}`]: {
525
525
  color: "white"
526
526
  },
527
- [`.${L.label}`]: {
527
+ [`.${P.label}`]: {
528
528
  color: "white"
529
529
  }
530
530
  }
531
531
  },
532
- [`.${L.icon}`]: {
533
- background: p,
534
- color: t && r.link === i ? "white" : C
532
+ [`.${P.icon}`]: {
533
+ background: s,
534
+ color: n && r.link === a ? "white" : C
535
535
  },
536
- [`.${L.label}`]: {
537
- color: t && r.link === i ? "white" : d
536
+ [`.${P.label}`]: {
537
+ color: n && r.link === a ? "white" : u
538
538
  },
539
- [`.${L.disabled}`]: {
540
- opacity: m,
541
- [`.${L.icon}`]: {
542
- background: (p || "") + " !important",
539
+ [`.${P.disabled}`]: {
540
+ opacity: b,
541
+ [`.${P.icon}`]: {
542
+ background: (s || "") + " !important",
543
543
  color: w + " !important"
544
544
  },
545
- [`.${L.label}`]: {
545
+ [`.${P.label}`]: {
546
546
  color: w + " !important"
547
547
  }
548
548
  }
@@ -551,14 +551,14 @@ function KA(e, o, c, r, s, l, i, t, d, n) {
551
551
  disabled: typeof r.disabled == "function" ? r.disabled() : r.disabled,
552
552
  onClick: () => c(r),
553
553
  icon: r.icon,
554
- active: t && r.link === i,
555
- children: o ? "" : gA.t(r.label)
554
+ active: n && r.link === a,
555
+ children: o ? "" : CA.t(r.label)
556
556
  },
557
- s
557
+ t
558
558
  ) });
559
559
  return null;
560
560
  }
561
- const Rr = (e) => ({
561
+ const Qr = (e) => ({
562
562
  light: {
563
563
  sidebar: {
564
564
  backgroundColor: "#ffffff",
@@ -593,140 +593,254 @@ const Rr = (e) => ({
593
593
  }
594
594
  }
595
595
  }
596
- }), Lr = (e, o, c, r, s, l, i, t, d, n, p) => {
597
- const C = Rr(), w = l ? {} : { padding: c ? `0 ${(s - r) / 2}px` : "0 20px" }, m = l ? {} : { display: "none" }, h = i ? e === "dark" ? o.colors[o.primaryColor][8] : o.colors[o.primaryColor][0] : void 0;
596
+ }), Mr = (e, o, c, r, t, d, a, n, u, i, s) => {
597
+ const C = Qr(), w = d ? {} : { padding: c ? `0 ${(t - r) / 2}px` : "0 20px" }, b = d ? {} : { display: "none" }, y = a ? e === "dark" ? o.colors[o.primaryColor][8] : o.colors[o.primaryColor][0] : void 0;
598
598
  return {
599
599
  root: {
600
600
  fontSize: "14px",
601
601
  fontWeight: 400,
602
- backgroundColor: d,
602
+ backgroundColor: u,
603
603
  color: o.white
604
604
  },
605
605
  icon: {
606
- background: h,
607
- color: p,
608
- [`&.${L.disabled}`]: {
606
+ background: y,
607
+ color: s,
608
+ [`&.${P.disabled}`]: {
609
609
  color: C[e].menu.disabled.color
610
610
  }
611
611
  },
612
612
  SubMenuExpandIcon: {
613
613
  color: "#b6b7b9",
614
- ...m
614
+ ...b
615
615
  },
616
616
  subMenuContent: () => ({
617
617
  backgroundColor: e === "dark" ? o.colors.dark[8] : o.colors[o.primaryColor][0]
618
618
  }),
619
619
  button: {
620
- [`&.${L.disabled}`]: {
620
+ [`&.${P.disabled}`]: {
621
621
  color: C[e].menu.disabled.color
622
622
  },
623
623
  "&:hover": {
624
624
  backgroundColor: o.colors[o.primaryColor][6],
625
625
  color: o.white
626
626
  },
627
- [`&.${L.active}`]: {
627
+ [`&.${P.active}`]: {
628
628
  backgroundColor: o.colors[o.primaryColor][6]
629
629
  },
630
- height: t,
630
+ height: n,
631
631
  ...w
632
632
  },
633
- label: ({ open: f }) => ({
634
- fontWeight: f ? 600 : void 0,
635
- color: n,
633
+ label: ({ open: I }) => ({
634
+ fontWeight: I ? 600 : void 0,
635
+ color: i,
636
636
  "&:hover": {
637
637
  color: o.white
638
638
  }
639
639
  })
640
640
  };
641
641
  };
642
- function Tr(e, o, c, r, s, l, i, t, d, n, p) {
643
- return /* @__PURE__ */ P(
644
- re,
642
+ function $r(e, o, c, r, t, d, a, n, u, i, s) {
643
+ return /* @__PURE__ */ z(
644
+ le,
645
645
  {
646
646
  ref: e,
647
647
  rootStyles: {
648
- [`.${ne.container}`]: {
648
+ [`.${de.container}`]: {
649
649
  position: "absolute",
650
- background: p,
650
+ background: s,
651
651
  overflowX: "hidden",
652
652
  overflowY: "hidden",
653
653
  left: 0,
654
654
  right: 0,
655
- height: i ? "calc(100vh - 28px)" : `${Z(t)}px`
655
+ height: a ? "calc(100vh - 28px)" : `${Z(n)}px`
656
656
  }
657
657
  },
658
658
  collapsed: o,
659
659
  width: `${Z(c)}px`,
660
660
  collapsedWidth: `${Z(r)}px`,
661
661
  children: [
662
- d && /* @__PURE__ */ A(iA, { children: d }),
663
- /* @__PURE__ */ A(zA, { style: { overflowY: "auto", overflowX: "hidden", height: t }, children: /* @__PURE__ */ A(oe, { rootStyles: { background: p }, menuItemStyles: s, closeOnClick: !0, children: l && /* @__PURE__ */ A(iA, { children: l }) }) }),
664
- n && /* @__PURE__ */ A(iA, { children: n })
662
+ u && /* @__PURE__ */ A(lA, { children: u }),
663
+ /* @__PURE__ */ A(FA, { style: { overflowY: "auto", overflowX: "hidden", height: n }, children: /* @__PURE__ */ A(ce, { rootStyles: { background: s }, menuItemStyles: t, closeOnClick: !0, children: d && /* @__PURE__ */ A(lA, { children: d }) }) }),
664
+ i && /* @__PURE__ */ A(lA, { children: i })
665
665
  ]
666
666
  }
667
667
  );
668
668
  }
669
- function YA({
669
+ function ZA({
670
+ itemCount: e = 8,
671
+ collapsed: o = !1,
672
+ backgroundColor: c
673
+ }) {
674
+ const r = yA(), { colorScheme: t } = sA(), d = c ?? (t === "dark" ? r.colors.dark[7] : r.white);
675
+ return o ? /* @__PURE__ */ A(
676
+ cA,
677
+ {
678
+ gap: "sm",
679
+ p: "xs",
680
+ align: "center",
681
+ style: {
682
+ backgroundColor: d,
683
+ width: "100%",
684
+ height: "100%"
685
+ },
686
+ children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */ A(
687
+ wA,
688
+ {
689
+ height: 32,
690
+ width: 32,
691
+ radius: "sm"
692
+ },
693
+ n
694
+ ))
695
+ }
696
+ ) : /* @__PURE__ */ A(
697
+ cA,
698
+ {
699
+ gap: "xs",
700
+ p: "md",
701
+ style: {
702
+ backgroundColor: d,
703
+ flex: 1,
704
+ width: "100%",
705
+ height: "100%"
706
+ },
707
+ children: Array.from({ length: e }).map((a, n) => /* @__PURE__ */ z(NA, { gap: "sm", wrap: "nowrap", children: [
708
+ /* @__PURE__ */ A(
709
+ wA,
710
+ {
711
+ height: 24,
712
+ width: 24,
713
+ radius: "sm"
714
+ }
715
+ ),
716
+ /* @__PURE__ */ A(
717
+ wA,
718
+ {
719
+ height: 18,
720
+ radius: "xl",
721
+ style: { flex: 1 }
722
+ }
723
+ )
724
+ ] }, n))
725
+ }
726
+ );
727
+ }
728
+ function Nr({
729
+ groupCount: e = 3,
730
+ width: o = "80px",
731
+ height: c = "100%",
732
+ backgroundColor: r
733
+ }) {
734
+ const t = yA(), { colorScheme: d } = sA(), a = r ?? (d === "dark" ? t.colors.dark[6] : t.colors.gray[2]);
735
+ return /* @__PURE__ */ A(
736
+ cA,
737
+ {
738
+ gap: "md",
739
+ p: "xs",
740
+ align: "center",
741
+ style: {
742
+ width: o,
743
+ height: c,
744
+ backgroundColor: a
745
+ },
746
+ children: Array.from({ length: e }).map((n, u) => /* @__PURE__ */ z(cA, { gap: 4, align: "center", children: [
747
+ /* @__PURE__ */ A(
748
+ wA,
749
+ {
750
+ height: 48,
751
+ width: 48,
752
+ radius: "md",
753
+ circle: !1
754
+ }
755
+ ),
756
+ /* @__PURE__ */ A(
757
+ wA,
758
+ {
759
+ height: 10,
760
+ width: 40,
761
+ radius: "xl"
762
+ }
763
+ )
764
+ ] }, u))
765
+ }
766
+ );
767
+ }
768
+ function _A({
769
+ message: e,
770
+ backgroundColor: o,
771
+ children: c
772
+ }) {
773
+ const r = yA(), { colorScheme: t } = sA(), d = o ?? (t === "dark" ? r.colors.dark[7] : r.white), a = t === "dark" ? r.colors.red[4] : r.colors.red[6];
774
+ return c ? /* @__PURE__ */ A(lA, { children: c }) : /* @__PURE__ */ A(ee, { p: "md", style: { backgroundColor: d, flex: 1, height: "100%" }, children: /* @__PURE__ */ z(cA, { align: "center", gap: "xs", children: [
775
+ /* @__PURE__ */ A(Oe, { size: 32, color: a }),
776
+ /* @__PURE__ */ A(UA, { size: "sm", c: a, ta: "center", children: e })
777
+ ] }) });
778
+ }
779
+ function Ae({
670
780
  navigationData: e,
671
781
  sidebarGroupWidth: o = "80px",
672
782
  sidebarWidth: c = "360px",
673
783
  sidebarHeight: r = "calc(100vh - var(--app-shell-header-offset, 0px))",
674
- sidebarCollapsedWidth: s = "60px",
675
- selectedGroupColor: l,
676
- groupColor: i,
677
- backgroundGroupColor: t,
678
- isHidden: d = !1,
679
- sideBarFooterHeight: n,
680
- sideBarFooterContent: p,
784
+ sidebarCollapsedWidth: t = "60px",
785
+ selectedGroupColor: d,
786
+ groupColor: a,
787
+ backgroundGroupColor: n,
788
+ isHidden: u = !1,
789
+ sideBarFooterHeight: i,
790
+ sideBarFooterContent: s,
681
791
  groupLabelDarkColor: C,
682
792
  groupLabelLightColor: w,
683
- collapsed: m,
684
- onMenuItemClick: h,
685
- onClickActionIcon: f,
686
- withBorder: k = !1,
687
- showGroupLabels: x = !0,
688
- theme: g,
689
- sidebarRef: Q,
690
- defaultGroupIcon: O,
691
- selectedGroupName: S,
692
- sideBarHeaderContent: V,
693
- iconsWithBackground: H = !1,
694
- menuItemHeight: oA = 40,
793
+ collapsed: b,
794
+ onMenuItemClick: y,
795
+ onClickActionIcon: I,
796
+ withBorder: x = !1,
797
+ showGroupLabels: l = !0,
798
+ theme: h,
799
+ sidebarRef: v,
800
+ defaultGroupIcon: E,
801
+ selectedGroupName: k,
802
+ sideBarHeaderContent: R,
803
+ iconsWithBackground: $ = !1,
804
+ menuItemHeight: tA = 40,
695
805
  highlightActiveMenuItem: J = !0,
696
- backgroundDarkColor: F,
697
- backgroundLightColor: $,
806
+ backgroundDarkColor: H,
807
+ backgroundLightColor: V,
698
808
  textDarkColor: eA,
699
- textLightColor: R,
700
- iconDarkColor: M,
809
+ textLightColor: T,
810
+ iconDarkColor: U,
701
811
  iconLightColor: W,
702
- collapsedSubmenuWidth: q
703
- // Props de skeleton desativadas temporariamente - funcionalidade não está funcionando corretamente
704
- // isLoading, loadingError, loadingComponent, errorComponent, skeletonItemCount, skeletonGroupCount
812
+ collapsedSubmenuWidth: G,
813
+ isLoading: rA = !1,
814
+ loadingError: F,
815
+ loadingComponent: g,
816
+ errorComponent: f,
817
+ skeletonItemCount: m = 8,
818
+ skeletonGroupCount: p = 3
705
819
  }) {
706
- const [G, N] = _(""), b = MA(), u = UA(), { colorScheme: a } = nA(), y = a === "dark" ? F ?? g.colors.dark[7] : $ ?? g.white, D = l || (a === "dark" ? g.colors[g.primaryColor][8] : g.colors[g.primaryColor][0]), E = a === "dark" ? eA ?? "var(--mantine-color-text)" : R ?? "var(--mantine-color-text)", B = a === "dark" ? M ?? g.colors[g.primaryColor][0] : W ?? g.colors[g.primaryColor][7], z = dA(() => {
820
+ const [L, S] = _(""), q = qA(), dA = HA(), { colorScheme: D } = sA(), K = D === "dark" ? H ?? h.colors.dark[7] : V ?? h.white, pA = d || (D === "dark" ? h.colors[h.primaryColor][8] : h.colors[h.primaryColor][0]), fA = D === "dark" ? eA ?? "var(--mantine-color-text)" : T ?? "var(--mantine-color-text)", EA = D === "dark" ? U ?? h.colors[h.primaryColor][0] : W ?? h.colors[h.primaryColor][7], aA = uA(() => {
707
821
  const Y = /* @__PURE__ */ new Set();
708
- return e.forEach((v) => {
709
- if (v.showInSidebar && (!v.disabled || !v.hideDisabledItem)) {
710
- let T = !1;
711
- v.group || (v.group = {
712
- icon: O || /* @__PURE__ */ A(Ee, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
822
+ return e.forEach((M) => {
823
+ if (M.showInSidebar && (!M.disabled || !M.hideDisabledItem)) {
824
+ let gA = !1;
825
+ M.group || (M.group = {
826
+ icon: E || /* @__PURE__ */ A(ze, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
713
827
  label: "Default",
714
828
  name: "Default",
715
829
  hint: "Default",
716
830
  indexOrder: 0
717
- }), Y.forEach((X) => {
718
- X.name === v.group.name && (T = !0);
719
- }), T || Y.add({
720
- name: v.group.name,
721
- indexOrder: v.group.indexOrder,
831
+ }), Y.forEach((oA) => {
832
+ oA.name === M.group.name && (gA = !0);
833
+ }), gA || Y.add({
834
+ name: M.group.name,
835
+ indexOrder: M.group.indexOrder,
722
836
  component: /* @__PURE__ */ A(
723
- wA,
837
+ IA,
724
838
  {
725
- content: v.group.hint,
726
- label: v.group.label,
727
- disabled: x,
728
- children: /* @__PURE__ */ P(
729
- lA,
839
+ content: M.group.hint,
840
+ label: M.group.label,
841
+ disabled: l,
842
+ children: /* @__PURE__ */ z(
843
+ cA,
730
844
  {
731
845
  gap: "2px",
732
846
  style: {
@@ -737,368 +851,434 @@ function YA({
737
851
  },
738
852
  children: [
739
853
  /* @__PURE__ */ A(
740
- EA,
854
+ PA,
741
855
  {
742
856
  size: "48px",
743
- variant: v.group.name === G ? "filled" : t ? "subtle" : "light",
744
- color: v.group.name === G ? D : i,
857
+ variant: M.group.name === L ? "filled" : n ? "subtle" : "light",
858
+ color: M.group.name === L ? pA : a,
745
859
  onClick: () => {
746
- N((X) => (f && f(X, v.group.name), v.group.name === X && !d ? "" : v.group.name));
860
+ S((oA) => (I && I(oA, M.group.name), M.group.name === oA && !u ? "" : M.group.name));
747
861
  },
748
- children: v.group.icon
862
+ children: M.group.icon
749
863
  }
750
864
  ),
751
- x ? /* @__PURE__ */ A(
752
- QA,
865
+ l ? /* @__PURE__ */ A(
866
+ UA,
753
867
  {
754
868
  size: "xs",
755
- c: a === "dark" ? C || g.colors[g.primaryColor][2] : w || g.colors[g.primaryColor][2],
756
- children: v.group.label
869
+ c: D === "dark" ? C || h.colors[h.primaryColor][2] : w || h.colors[h.primaryColor][2],
870
+ children: M.group.label
757
871
  }
758
872
  ) : !1
759
873
  ]
760
874
  }
761
875
  )
762
876
  },
763
- v.group.name
877
+ M.group.name
764
878
  )
765
879
  });
766
880
  }
767
- }), Y.forEach((v) => {
768
- const T = e.filter((X) => X.showInSidebar === !0 && (!X.disabled || !X.hideDisabledItem) && X.group && X.group.name === v.name);
769
- v.links = T.map((X, aA) => KA(g, m, h, X, aA, H, u.pathname, J, E, q));
770
- }), [...Y].sort((v, T) => v.indexOrder - T.indexOrder);
771
- }, [e, G, a, m, b.selectedCompany, J, u]), K = Lr(
772
- a,
773
- g,
774
- m,
881
+ }), Y.forEach((M) => {
882
+ const gA = e.filter((oA) => oA.showInSidebar === !0 && (!oA.disabled || !oA.hideDisabledItem) && oA.group && oA.group.name === M.name);
883
+ M.links = gA.map((oA, be) => WA(h, b, y, oA, be, $, dA.pathname, J, fA, G));
884
+ }), [...Y].sort((M, gA) => M.indexOrder - gA.indexOrder);
885
+ }, [e, L, D, b, q.selectedCompany, J, dA]), SA = Mr(
886
+ D,
887
+ h,
888
+ b,
775
889
  35,
776
- Number(Z(s)),
777
- z.length > 1,
778
- H,
779
- oA,
780
- y,
781
- E,
782
- B
783
- ), tA = m || G === "" ? "0px" : `calc(${c} - ${o})`, kA = t || (a === "dark" ? g.colors[g.primaryColor][6] : g.colors[g.primaryColor][7]), uA = sA(() => {
784
- S && z.map((Y) => Y.name).includes(S) ? N(S) : z.length > 1 && N("Default");
890
+ Number(Z(t)),
891
+ aA.length > 1,
892
+ $,
893
+ tA,
894
+ K,
895
+ fA,
896
+ EA
897
+ ), bA = b || L === "" ? "0px" : `calc(${c} - ${o})`, RA = n || (D === "dark" ? h.colors[h.primaryColor][6] : h.colors[h.primaryColor][7]), Q = X(() => {
898
+ k && aA.map((Y) => Y.name).includes(k) ? S(k) : aA.length > 1 && S("Default");
785
899
  }, []);
786
- U(() => {
787
- uA();
788
- }, []), U(() => {
789
- m ? N("") : G === "" && uA();
790
- }, [m]);
791
- const RA = () => G !== "" ? /* @__PURE__ */ A(
792
- re,
900
+ B(() => {
901
+ Q();
902
+ }, []), B(() => {
903
+ b ? S("") : L === "" && Q();
904
+ }, [b]);
905
+ const N = () => F ? f || /* @__PURE__ */ A(
906
+ _A,
907
+ {
908
+ message: F,
909
+ backgroundColor: K
910
+ }
911
+ ) : rA ? g || /* @__PURE__ */ A(
912
+ ZA,
793
913
  {
794
- ref: Q,
914
+ itemCount: m,
915
+ collapsed: b,
916
+ backgroundColor: K
917
+ }
918
+ ) : L !== "" ? /* @__PURE__ */ A(
919
+ le,
920
+ {
921
+ ref: v,
795
922
  rootStyles: {
796
- [`.${ne.container}`]: {
797
- background: y,
923
+ [`.${de.container}`]: {
924
+ background: K,
798
925
  overflowX: "hidden",
799
926
  overflowY: "hidden",
800
927
  left: 0,
801
928
  height: `${Z(r)}px`
802
929
  }
803
930
  },
804
- style: { borderColor: a === "dark" ? "#000" : "#efefef" },
805
- collapsed: m,
806
- width: `${Z(tA)}`,
931
+ style: { borderColor: D === "dark" ? "#000" : "#efefef" },
932
+ collapsed: b,
933
+ width: `${Z(bA)}`,
807
934
  collapsedWidth: "0px",
808
935
  children: /* @__PURE__ */ A(
809
- zA,
936
+ FA,
810
937
  {
811
938
  style: {
812
939
  overflowY: "auto",
813
940
  overflowX: "hidden",
814
941
  height: "100%",
815
- width: tA
942
+ width: bA
816
943
  },
817
- children: /* @__PURE__ */ A(oe, { rootStyles: { background: y }, menuItemStyles: K, closeOnClick: !0, children: z.find((Y) => Y.name === G)?.links || null })
944
+ children: /* @__PURE__ */ A(ce, { rootStyles: { background: K }, menuItemStyles: SA, closeOnClick: !0, children: aA.find((Y) => Y.name === L)?.links || null })
818
945
  }
819
946
  )
820
947
  }
821
- ) : null, LA = () => z.length !== 0 ? /* @__PURE__ */ A(
822
- lA,
948
+ ) : null, LA = () => rA && aA.length === 0 ? /* @__PURE__ */ A(
949
+ Nr,
950
+ {
951
+ groupCount: p,
952
+ width: o,
953
+ height: r
954
+ }
955
+ ) : aA.length !== 0 ? /* @__PURE__ */ A(
956
+ cA,
823
957
  {
824
958
  gap: "4px",
825
959
  style: {
826
960
  height: r,
827
961
  width: o,
828
962
  padding: "4px",
829
- backgroundColor: kA
963
+ backgroundColor: RA
830
964
  },
831
- children: z.map((Y) => /* @__PURE__ */ A(AA.Fragment, { children: Y.component }, Y.name))
965
+ children: aA.map((Y) => /* @__PURE__ */ A(AA.Fragment, { children: Y.component }, Y.name))
966
+ }
967
+ ) : null, iA = () => F ? f || /* @__PURE__ */ A(
968
+ _A,
969
+ {
970
+ message: F,
971
+ backgroundColor: K
972
+ }
973
+ ) : rA ? g || /* @__PURE__ */ A(
974
+ ZA,
975
+ {
976
+ itemCount: m,
977
+ collapsed: b,
978
+ backgroundColor: K
832
979
  }
833
- ) : null;
834
- return /* @__PURE__ */ A(iA, { children: z.length == 1 ? Tr(
835
- Q,
836
- m,
980
+ ) : e.map(
981
+ (Y, KA) => WA(h, b, y, Y, KA, $, dA.pathname, J, fA, G)
982
+ );
983
+ return /* @__PURE__ */ A(lA, { children: aA.length == 1 ? $r(
984
+ v,
985
+ b,
837
986
  c,
838
- s,
839
- K,
840
- e.map((Y, hA) => KA(g, m, h, Y, hA, H, u.pathname, J, E, q)),
841
- d,
987
+ t,
988
+ SA,
989
+ iA(),
990
+ u,
842
991
  r,
843
- V,
844
- p,
845
- y
846
- ) : /* @__PURE__ */ P(DA, { direction: "column", w: m ? s : c, children: [
847
- /* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: V }),
848
- /* @__PURE__ */ P(we, { withBorder: k, h: r, w: "100%", display: "flex", children: [
992
+ R,
993
+ s,
994
+ K
995
+ ) : /* @__PURE__ */ z($A, { direction: "column", w: b ? t : c, children: [
996
+ /* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: R }),
997
+ /* @__PURE__ */ z(Te, { withBorder: x, h: r, w: "100%", display: "flex", children: [
849
998
  LA(),
850
- RA()
999
+ N()
851
1000
  ] }),
852
- /* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: p })
1001
+ /* @__PURE__ */ A("div", { style: { height: "auto", width: "100%" }, children: s })
853
1002
  ] }) });
854
1003
  }
855
- const te = yA({
1004
+ const ue = DA({
856
1005
  isVisible: !0
857
- }), ko = () => cA(te), qA = yA({ params: {} }), wo = () => cA(qA).params, xo = () => {
858
- const e = or(), c = cA(qA).params;
859
- return dA(() => {
1006
+ }), To = () => hA(ue), YA = DA({ params: {} }), Do = () => hA(YA).params, Po = () => {
1007
+ const e = dr(), c = hA(YA).params;
1008
+ return uA(() => {
860
1009
  if (!e)
861
1010
  return !1;
862
- const s = Object.keys(e);
863
- return s.length === 0 ? !1 : s.some((l) => e[l] !== void 0);
1011
+ const t = Object.keys(e);
1012
+ return t.length === 0 ? !1 : t.some((d) => e[d] !== void 0);
864
1013
  }, [e]) ? e : c;
865
- }, ae = yA(null), se = () => cA(ae), xA = (e) => null, Ir = (e) => e.includes(":"), Pr = (e, o) => Ir(e) ? o : e, Dr = ({ children: e, ...o }) => {
866
- const [c, r] = _(/* @__PURE__ */ new Map()), [s, l] = _(/* @__PURE__ */ new Set()), i = (h, f, k) => {
867
- if (!h || typeof h != "string") {
868
- console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:", h);
1014
+ }, he = DA(null), pe = () => hA(he), TA = (e) => null, Ur = (e) => e.includes(":"), Fr = (e, o) => Ur(e) ? o : e, qr = ({ children: e, maxKeepAliveTabs: o = 10, ...c }) => {
1015
+ const [r, t] = _(/* @__PURE__ */ new Map()), [d, a] = _(/* @__PURE__ */ new Set()), n = X((l, h) => {
1016
+ let v = null, E = 1 / 0;
1017
+ return l.forEach((k, R) => {
1018
+ R !== h && k.lastAccessedAt < E && (E = k.lastAccessedAt, v = R);
1019
+ }), v;
1020
+ }, []), u = X((l, h, v) => {
1021
+ if (!l || typeof l != "string") {
1022
+ console.error("[ArchbaseAliveAbleRoutes] Invalid cacheKey for component registration:", l);
869
1023
  return;
870
1024
  }
871
- if (f === void 0) {
872
- console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for cacheKey:", h);
1025
+ if (h === void 0) {
1026
+ console.warn("[ArchbaseAliveAbleRoutes] Attempting to register undefined component for cacheKey:", l);
873
1027
  return;
874
1028
  }
875
- r((x) => {
876
- if (x.has(h))
877
- return x;
878
- const g = new Map(x);
879
- return g.set(h, { element: f, params: k }), g;
1029
+ t((E) => {
1030
+ if (E.has(l)) {
1031
+ const R = new Map(E), $ = E.get(l);
1032
+ return R.set(l, { ...$, lastAccessedAt: Date.now() }), R;
1033
+ }
1034
+ const k = new Map(E);
1035
+ if (k.size >= o) {
1036
+ const R = n(k, l);
1037
+ R && (k.delete(R), console.log(`[ArchbaseAliveAbleRoutes] LRU eviction: removed "${R}" (cache size: ${k.size}/${o})`));
1038
+ }
1039
+ return k.set(l, {
1040
+ element: h,
1041
+ params: v,
1042
+ lastAccessedAt: Date.now()
1043
+ }), k;
1044
+ });
1045
+ }, [o, n]), i = X((l) => {
1046
+ t((h) => {
1047
+ const v = h.get(l);
1048
+ if (!v)
1049
+ return h;
1050
+ const E = Date.now();
1051
+ if (E - v.lastAccessedAt < 1e3)
1052
+ return h;
1053
+ const k = new Map(h);
1054
+ return k.set(l, { ...v, lastAccessedAt: E }), k;
880
1055
  });
881
- }, t = (h, f) => {
882
- r((k) => {
883
- const x = k.get(h);
884
- if (!x || !(JSON.stringify(x.params) !== JSON.stringify(f)))
885
- return k;
886
- const Q = new Map(k);
887
- return Q.set(h, { ...x, params: f }), Q;
1056
+ }, []), s = X((l, h) => {
1057
+ t((v) => {
1058
+ const E = v.get(l);
1059
+ if (!E || !(JSON.stringify(E.params) !== JSON.stringify(h)))
1060
+ return v;
1061
+ const R = new Map(v);
1062
+ return R.set(l, { ...E, params: h, lastAccessedAt: Date.now() }), R;
888
1063
  });
889
- }, d = (h) => {
890
- if (!h) {
1064
+ }, []), C = X((l) => {
1065
+ if (!l) {
891
1066
  console.error("[ArchbaseAliveAbleRoutes] Cannot unregister: invalid cacheKey");
892
1067
  return;
893
1068
  }
894
- r((f) => {
895
- f.has(h) || console.warn("[ArchbaseAliveAbleRoutes] Attempting to unregister non-existent cacheKey:", h);
896
- const k = new Map(f);
897
- return k.delete(h), k;
898
- }), l((f) => {
899
- const k = new Set(f);
900
- return k.delete(h), k;
1069
+ t((h) => {
1070
+ h.has(l) || console.warn("[ArchbaseAliveAbleRoutes] Attempting to unregister non-existent cacheKey:", l);
1071
+ const v = new Map(h);
1072
+ return v.delete(l), v;
1073
+ }), a((h) => {
1074
+ const v = new Set(h);
1075
+ return v.delete(l), v;
901
1076
  });
902
- }, n = (h) => {
903
- l((f) => {
904
- const k = new Set(f);
905
- return k.add(h), k;
1077
+ }, []), w = X((l) => {
1078
+ a((h) => {
1079
+ const v = new Set(h);
1080
+ return v.add(l), v;
906
1081
  });
907
- }, p = AA.Children.toArray(e), C = p.filter((h) => AA.isValidElement(h) ? h.type === xA : !1), w = p.filter((h) => AA.isValidElement(h) ? h.type !== xA : !1), m = {
908
- cache: c,
909
- requestedUnregister: s,
910
- register: i,
911
- unregister: d,
912
- updateParams: t,
913
- requestUnregister: n
914
- };
915
- return /* @__PURE__ */ P(ae.Provider, { value: m, children: [
916
- C.map((h) => /* @__PURE__ */ A(Or, { ...h.props, routesProps: o }, h.key)),
917
- /* @__PURE__ */ A(Ae, { ...o, children: w })
1082
+ }, []), b = AA.Children.toArray(e), y = b.filter((l) => AA.isValidElement(l) ? l.type === TA : !1), I = b.filter((l) => AA.isValidElement(l) ? l.type !== TA : !1), x = uA(() => ({
1083
+ cache: r,
1084
+ requestedUnregister: d,
1085
+ register: u,
1086
+ unregister: C,
1087
+ updateParams: s,
1088
+ requestUnregister: w,
1089
+ touchAccess: i,
1090
+ maxKeepAliveTabs: o
1091
+ }), [r, d, u, C, s, w, i, o]);
1092
+ return /* @__PURE__ */ z(he.Provider, { value: x, children: [
1093
+ y.map((l) => /* @__PURE__ */ A(Br, { ...l.props, routesProps: c }, l.key)),
1094
+ /* @__PURE__ */ A(se, { ...c, children: I })
918
1095
  ] });
919
- }, Or = ({ component: e, routesProps: o, ...c }) => {
920
- const r = se();
1096
+ }, Br = ({ component: e, routesProps: o, ...c }) => {
1097
+ const r = pe();
921
1098
  if (!r)
922
1099
  throw new Error("DisplayRoute must be used within ArchbaseAliveAbleRoutes provider");
923
- const { cache: s, requestedUnregister: l, register: i, unregister: t, updateParams: d } = r, [n, p] = _(!1), [C, w] = _({}), m = rA(null), h = FA(), f = dA(() => c.path ? Pr(c.path, h.pathname) : null, [c.path, h.pathname]), k = dA(() => c.path ? nr({ path: c.path, end: !0 }, h.pathname)?.params || {} : {}, [c.path, h.pathname]), x = rA(/* @__PURE__ */ new Set());
924
- bA(() => {
925
- if (n && e && f && !x.current.has(f)) {
926
- const S = typeof e == "function" ? AA.createElement(e) : e;
927
- i(f, S, k), x.current.add(f);
1100
+ const { cache: t, requestedUnregister: d, register: a, unregister: n, updateParams: u, touchAccess: i } = r, [s, C] = _(!1), [w, b] = _({}), y = nA(null), I = GA(), x = uA(() => c.path ? Fr(c.path, I.pathname) : null, [c.path, I.pathname]), l = uA(() => c.path ? ur({ path: c.path, end: !0 }, I.pathname)?.params || {} : {}, [c.path, I.pathname]), h = nA(/* @__PURE__ */ new Set());
1101
+ kA(() => {
1102
+ if (s && e && x && !h.current.has(x)) {
1103
+ const R = typeof e == "function" ? AA.createElement(e) : e;
1104
+ a(x, R, l), h.current.add(x);
928
1105
  }
929
- }, [n, e, f, i, k]), bA(() => {
930
- n && f && x.current.has(f) && (d(f, k), w(k));
931
- }, [n, f, k, d]), bA(() => {
932
- f && l.has(f) && (t(f), x.current.delete(f));
933
- }, [f, l, t]);
934
- const g = f ? s.get(f) : null, Q = dA(() => n ? k : g ? g.params : C, [n, k, g, C]), O = rA(n);
935
- return U(() => {
936
- const S = O.current;
937
- if (O.current = n, n && !S && m.current) {
938
- const V = setTimeout(() => {
939
- window.dispatchEvent(new Event("resize")), m.current?.dispatchEvent(
1106
+ }, [s, e, x, a, l]), kA(() => {
1107
+ s && x && h.current.has(x) && (u(x, l), b(l));
1108
+ }, [s, x, l, u]), B(() => {
1109
+ s && x && t.has(x) && i(x);
1110
+ }, [s, x, i, t]), kA(() => {
1111
+ x && d.has(x) && (n(x), h.current.delete(x));
1112
+ }, [x, d, n]);
1113
+ const v = x ? t.get(x) : null, E = uA(() => s ? l : v ? v.params : w, [s, l, v, w]), k = nA(s);
1114
+ return B(() => {
1115
+ const R = k.current;
1116
+ if (k.current = s, s && !R && y.current) {
1117
+ const $ = setTimeout(() => {
1118
+ window.dispatchEvent(new Event("resize")), y.current?.dispatchEvent(
940
1119
  new CustomEvent("keepalive:visible", { bubbles: !0 })
941
1120
  );
942
1121
  }, 50);
943
- return () => clearTimeout(V);
1122
+ return () => clearTimeout($);
944
1123
  }
945
- }, [n]), /* @__PURE__ */ P(iA, { children: [
946
- g && /* @__PURE__ */ A(te.Provider, { value: { isVisible: n }, children: /* @__PURE__ */ A(qA.Provider, { value: { params: Q }, children: /* @__PURE__ */ A(
1124
+ }, [s]), /* @__PURE__ */ z(lA, { children: [
1125
+ v && /* @__PURE__ */ A(ue.Provider, { value: { isVisible: s }, children: /* @__PURE__ */ A(YA.Provider, { value: { params: E }, children: /* @__PURE__ */ A(
947
1126
  "div",
948
1127
  {
949
- ref: m,
1128
+ ref: y,
950
1129
  style: {
951
1130
  // Usa visibility + position ao invés de display:none
952
1131
  // para manter dimensões e permitir que ResizeObserver funcione
953
- position: n ? "relative" : "absolute",
954
- visibility: n ? "visible" : "hidden",
955
- pointerEvents: n ? "auto" : "none",
1132
+ position: s ? "relative" : "absolute",
1133
+ visibility: s ? "visible" : "hidden",
1134
+ pointerEvents: s ? "auto" : "none",
956
1135
  width: "100%",
957
1136
  height: "100%",
958
- top: n ? void 0 : 0,
959
- left: n ? void 0 : 0,
960
- zIndex: n ? 1 : -1,
961
- overflow: n ? "auto" : "hidden"
1137
+ top: s ? void 0 : 0,
1138
+ left: s ? void 0 : 0,
1139
+ zIndex: s ? 1 : -1,
1140
+ overflow: s ? "auto" : "hidden"
962
1141
  },
963
- children: g.element
1142
+ children: v.element
964
1143
  }
965
1144
  ) }) }),
966
- /* @__PURE__ */ A(Ae, { ...o, children: /* @__PURE__ */ A(
967
- PA,
1145
+ /* @__PURE__ */ A(se, { ...o, children: /* @__PURE__ */ A(
1146
+ MA,
968
1147
  {
969
1148
  ...c,
970
1149
  element: /* @__PURE__ */ A(
971
- Qr,
1150
+ Vr,
972
1151
  {
973
- onRouteMatchChange: p,
974
- onParamsChange: w
1152
+ onRouteMatchChange: C,
1153
+ onParamsChange: b
975
1154
  }
976
1155
  )
977
1156
  }
978
1157
  ) })
979
1158
  ] });
980
- }, Qr = ({ onRouteMatchChange: e, onParamsChange: o }) => {
981
- const c = FA();
982
- return bA(() => (e(!0), () => {
1159
+ }, Vr = ({ onRouteMatchChange: e, onParamsChange: o }) => {
1160
+ const c = GA();
1161
+ return kA(() => (e(!0), () => {
983
1162
  e(!1);
984
- }), [e]), bA(() => {
1163
+ }), [e]), kA(() => {
985
1164
  }, [c.pathname, o]), null;
986
1165
  };
987
- function zr(e, o, c, r, s, l) {
1166
+ function Hr(e, o, c, r, t, d) {
988
1167
  return /* @__PURE__ */ A(
989
1168
  "div",
990
1169
  {
991
1170
  style: {
992
1171
  position: "absolute",
993
- left: c.collapsed ? `calc(${s} - 14px)` : `calc(${r} - 14px)`,
1172
+ left: c.collapsed ? `calc(${t} - 14px)` : `calc(${r} - 14px)`,
994
1173
  top: "calc(100vh / 2)",
995
1174
  zIndex: "101"
996
1175
  },
997
1176
  children: /* @__PURE__ */ A(
998
- EA,
1177
+ PA,
999
1178
  {
1000
1179
  bg: o.colors[o.primaryColor][4],
1001
1180
  color: o.colors[o.primaryColor][6],
1002
1181
  variant: "filled",
1003
1182
  radius: "xl",
1004
- onClick: l,
1005
- children: c.collapsed ? /* @__PURE__ */ A(Se, {}) : /* @__PURE__ */ A(Re, {})
1183
+ onClick: d,
1184
+ children: c.collapsed ? /* @__PURE__ */ A(Qe, {}) : /* @__PURE__ */ A(Me, {})
1006
1185
  }
1007
1186
  )
1008
1187
  }
1009
1188
  );
1010
1189
  }
1011
- function Mr({
1190
+ function Gr({
1012
1191
  children: e,
1013
1192
  header: o,
1014
1193
  footer: c,
1015
1194
  sideBarWidth: r = "360px",
1016
- sideBarCollapsedWidth: s = "74px",
1017
- sideBarHiddenBreakPoint: l,
1018
- sideBarFooterHeight: i,
1019
- sideBarFooterContent: t,
1020
- onCollapsedSideBar: d,
1021
- onHiddenSidebar: n,
1022
- sidebarSelectedGroupName: p,
1195
+ sideBarCollapsedWidth: t = "74px",
1196
+ sideBarHiddenBreakPoint: d,
1197
+ sideBarFooterHeight: a,
1198
+ sideBarFooterContent: n,
1199
+ onCollapsedSideBar: u,
1200
+ onHiddenSidebar: i,
1201
+ sidebarSelectedGroupName: s,
1023
1202
  sidebarDefaultGroupIcon: C,
1024
1203
  sideBarHeaderHeight: w,
1025
- sideBarHeaderContent: m,
1026
- selectedGroupColor: h = "#132441",
1027
- groupColor: f = "white",
1028
- backgroundGroupColor: k = "#132441",
1029
- groupLabelDarkColor: x = "white",
1030
- groupLabelLightColor: g = "white",
1031
- headerColor: Q,
1032
- footerHeight: O,
1033
- iconsWithBackground: S,
1034
- menuItemHeight: V,
1035
- showSideBar: H = !0,
1036
- showHeader: oA = !0,
1204
+ sideBarHeaderContent: b,
1205
+ selectedGroupColor: y = "#132441",
1206
+ groupColor: I = "white",
1207
+ backgroundGroupColor: x = "#132441",
1208
+ groupLabelDarkColor: l = "white",
1209
+ groupLabelLightColor: h = "white",
1210
+ headerColor: v,
1211
+ footerHeight: E,
1212
+ iconsWithBackground: k,
1213
+ menuItemHeight: R,
1214
+ showSideBar: $ = !0,
1215
+ showHeader: tA = !0,
1037
1216
  headerStyle: J = {},
1038
- highlightActiveMenuItem: F = !0,
1039
- customRenderSidebar: $,
1217
+ highlightActiveMenuItem: H = !0,
1218
+ customRenderSidebar: V,
1040
1219
  showCollapsedButton: eA = !0,
1041
- sideBarBackgroundDarkColor: R,
1042
- sideBarBackgroundLightColor: M,
1220
+ sideBarBackgroundDarkColor: T,
1221
+ sideBarBackgroundLightColor: U,
1043
1222
  sideBarTextDarkColor: W,
1044
- sideBarTextLightColor: q,
1045
- sideBarIconDarkColor: G,
1046
- sideBarIconLightColor: N,
1047
- sideBarCollapsedSubmenuWidth: b
1223
+ sideBarTextLightColor: G,
1224
+ sideBarIconDarkColor: rA,
1225
+ sideBarIconLightColor: F,
1226
+ sideBarCollapsedSubmenuWidth: g,
1227
+ maxKeepAliveTabs: f = 10
1048
1228
  }) {
1049
- const u = vA(), a = cA(SA), { colorScheme: y } = nA(), D = sr(), [E, B] = ir(), z = ar(
1050
- `(max-width: ${l ? Z(l) : u.breakpoints.md})`
1051
- ), K = (v) => {
1052
- v.link && (v.routeParams ? D(v.link, {}, v.routeParams) : D(v.link));
1053
- }, tA = (v, T) => {
1054
- v == T && a.collapsed && a.setCollapsed(!1), a.setCollapsed(v == T);
1055
- }, kA = () => {
1056
- let v = 0, T = 0;
1057
- return w && (v = Number(Z(w))), i && (T = Number(Z(i))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${v + T}px)`;
1058
- }, uA = () => {
1059
- let v = 0, T = 0;
1060
- return w && (v = Number(Z(w))), i && (T = Number(Z(i))), `calc(100vh - 28px - ${v + T}px)`;
1061
- }, RA = dA(() => {
1062
- const v = [];
1063
- return a.navigationData.forEach((T, X) => {
1064
- T.links ? T.links.forEach((aA, BA) => {
1065
- aA.keepAlive ? v.push(
1066
- /* @__PURE__ */ A(xA, { path: aA.link, component: aA.component }, `${aA.link}_${BA}`)
1067
- ) : v.push(/* @__PURE__ */ A(PA, { path: aA.link, element: aA.component }, `${aA.link}_${BA}`));
1068
- }) : T.keepAlive ? v.push(
1069
- /* @__PURE__ */ A(xA, { path: T.link, component: T.component }, `${T.link}_${X}`)
1070
- ) : v.push(
1071
- /* @__PURE__ */ A(PA, { path: T.link, element: T.component }, `${T.link}_${X}`)
1229
+ const m = yA(), p = hA(OA), { colorScheme: L } = sA(), S = fr(), [q, dA] = gr(), D = pr(
1230
+ `(max-width: ${d ? Z(d) : m.breakpoints.md})`
1231
+ ), K = (Q) => {
1232
+ Q.link && (Q.routeParams ? S(Q.link, {}, Q.routeParams) : S(Q.link));
1233
+ }, pA = (Q, N) => {
1234
+ Q == N && p.collapsed && p.setCollapsed(!1), p.setCollapsed(Q == N);
1235
+ }, fA = () => {
1236
+ let Q = 0, N = 0;
1237
+ return w && (Q = Number(Z(w))), a && (N = Number(Z(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${Q + N}px)`;
1238
+ }, EA = () => {
1239
+ let Q = 0, N = 0;
1240
+ return w && (Q = Number(Z(w))), a && (N = Number(Z(a))), `calc(100vh - 28px - ${Q + N}px)`;
1241
+ }, aA = uA(() => {
1242
+ const Q = [];
1243
+ return p.navigationData.forEach((N, LA) => {
1244
+ N.links ? N.links.forEach((iA, Y) => {
1245
+ iA.keepAlive ? Q.push(
1246
+ /* @__PURE__ */ A(TA, { path: iA.link, component: iA.component }, `${iA.link}_${Y}`)
1247
+ ) : Q.push(/* @__PURE__ */ A(MA, { path: iA.link, element: iA.component }, `${iA.link}_${Y}`));
1248
+ }) : N.keepAlive ? Q.push(
1249
+ /* @__PURE__ */ A(TA, { path: N.link, component: N.component }, `${N.link}_${LA}`)
1250
+ ) : Q.push(
1251
+ /* @__PURE__ */ A(MA, { path: N.link, element: N.component }, `${N.link}_${LA}`)
1072
1252
  );
1073
- }), v;
1074
- }, [a.navigationData, a.collapsed]), LA = sA(() => {
1075
- a.setCollapsed(!a.collapsed);
1076
- }, [a.setCollapsed, a.collapsed]), Y = sA(() => {
1077
- a.setHidden(!a.hidden);
1078
- }, [a.setHidden, a.hidden]);
1079
- U(() => {
1080
- n && n(a.hidden);
1081
- }, [a.hidden, Y]), U(() => {
1082
- d && d(a.collapsed);
1083
- }, [a.collapsed, d]);
1084
- const hA = a.collapsed ? s : r;
1085
- return /* @__PURE__ */ P(
1086
- pA,
1253
+ }), Q;
1254
+ }, [p.navigationData, p.collapsed]), SA = X(() => {
1255
+ p.setCollapsed(!p.collapsed);
1256
+ }, [p.setCollapsed, p.collapsed]), bA = X(() => {
1257
+ p.setHidden(!p.hidden);
1258
+ }, [p.setHidden, p.hidden]);
1259
+ B(() => {
1260
+ i && i(p.hidden);
1261
+ }, [p.hidden, bA]), B(() => {
1262
+ u && u(p.collapsed);
1263
+ }, [p.collapsed, u]);
1264
+ const RA = p.collapsed ? t : r;
1265
+ return /* @__PURE__ */ z(
1266
+ mA,
1087
1267
  {
1088
- header: { height: "60px", collapsed: !oA },
1089
- footer: { height: O || "0px" },
1268
+ header: { height: "60px", collapsed: !tA },
1269
+ footer: { height: E || "0px" },
1090
1270
  styles: {
1091
1271
  main: {
1092
- background: y === "dark" ? u.colors.dark[8] : u.colors.gray[0],
1272
+ background: L === "dark" ? m.colors.dark[8] : m.colors.gray[0],
1093
1273
  overflow: "hidden"
1094
1274
  }
1095
1275
  },
1096
1276
  children: [
1097
1277
  /* @__PURE__ */ A(
1098
- pA.Header,
1278
+ mA.Header,
1099
1279
  {
1100
1280
  p: "xs",
1101
- color: Q,
1281
+ color: v,
1102
1282
  display: "flex",
1103
1283
  style: {
1104
1284
  backgroundColor: "var(--mantine-primary-color-8)",
@@ -1109,697 +1289,589 @@ function Mr({
1109
1289
  children: o
1110
1290
  }
1111
1291
  ),
1112
- /* @__PURE__ */ A(pA.Navbar, { children: !z && H ? $ ? $({ width: r, height: kA(), isHidden: z }) : /* @__PURE__ */ A(
1113
- YA,
1292
+ /* @__PURE__ */ A(mA.Navbar, { children: !D && $ ? V ? V({ width: r, height: fA(), isHidden: D }) : /* @__PURE__ */ A(
1293
+ Ae,
1114
1294
  {
1115
- navigationData: a.navigationData,
1116
- sidebarHeight: kA(),
1117
- sidebarGroupWidth: s,
1118
- sidebarCollapsedWidth: s,
1119
- selectedGroupColor: h,
1120
- groupColor: f,
1121
- backgroundGroupColor: k,
1122
- groupLabelDarkColor: x,
1123
- groupLabelLightColor: g,
1295
+ navigationData: p.navigationData,
1296
+ sidebarHeight: fA(),
1297
+ sidebarGroupWidth: t,
1298
+ sidebarCollapsedWidth: t,
1299
+ selectedGroupColor: y,
1300
+ groupColor: I,
1301
+ backgroundGroupColor: x,
1302
+ groupLabelDarkColor: l,
1303
+ groupLabelLightColor: h,
1124
1304
  showGroupLabels: !1,
1125
- collapsed: a.collapsed,
1305
+ collapsed: p.collapsed,
1126
1306
  sidebarWidth: r,
1127
- isHidden: z,
1307
+ isHidden: D,
1128
1308
  onMenuItemClick: K,
1129
- onClickActionIcon: tA,
1130
- sideBarFooterHeight: i,
1131
- sideBarFooterContent: t,
1132
- sideBarHeaderContent: m,
1133
- theme: u,
1134
- sidebarRef: E,
1309
+ onClickActionIcon: pA,
1310
+ sideBarFooterHeight: a,
1311
+ sideBarFooterContent: n,
1312
+ sideBarHeaderContent: b,
1313
+ theme: m,
1314
+ sidebarRef: q,
1135
1315
  defaultGroupIcon: C,
1136
- selectedGroupName: p,
1137
- iconsWithBackground: S,
1138
- menuItemHeight: V,
1139
- highlightActiveMenuItem: F,
1140
- backgroundDarkColor: R,
1141
- backgroundLightColor: M,
1316
+ selectedGroupName: s,
1317
+ iconsWithBackground: k,
1318
+ menuItemHeight: R,
1319
+ highlightActiveMenuItem: H,
1320
+ backgroundDarkColor: T,
1321
+ backgroundLightColor: U,
1142
1322
  textDarkColor: W,
1143
- textLightColor: q,
1144
- iconDarkColor: G,
1145
- iconLightColor: N,
1146
- collapsedSubmenuWidth: b,
1147
- isLoading: a.isLoadingPermissions,
1148
- loadingError: a.permissionsError
1323
+ textLightColor: G,
1324
+ iconDarkColor: rA,
1325
+ iconLightColor: F,
1326
+ collapsedSubmenuWidth: g,
1327
+ isLoading: p.isLoadingPermissions,
1328
+ loadingError: p.permissionsError
1149
1329
  }
1150
1330
  ) : void 0 }),
1151
- /* @__PURE__ */ P(pA.Main, { bg: y === "dark" ? u.colors.dark[8] : u.colors.gray[0], children: [
1152
- !z && eA && zr(
1153
- y,
1154
- u,
1155
- a,
1331
+ /* @__PURE__ */ z(mA.Main, { bg: L === "dark" ? m.colors.dark[8] : m.colors.gray[0], children: [
1332
+ !D && eA && Hr(
1333
+ L,
1334
+ m,
1335
+ p,
1156
1336
  r,
1157
- s,
1158
- LA
1337
+ t,
1338
+ SA
1159
1339
  ),
1160
- /* @__PURE__ */ P(
1340
+ /* @__PURE__ */ z(
1161
1341
  "div",
1162
1342
  {
1163
1343
  style: {
1164
1344
  height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
1165
- width: `calc(100vw - var(--app-shell-padding) - calc(${z ? "0px" : hA} + 1rem))`,
1345
+ width: `calc(100vw - var(--app-shell-padding) - calc(${D ? "0px" : RA} + 1rem))`,
1166
1346
  marginTop: "0.5rem",
1167
- marginLeft: `calc(${z ? "0px" : hA} + 0.5rem)`,
1168
- border: `1px solid ${y === "dark" ? u.colors.dark[4] : "#e4e9ef"}`,
1347
+ marginLeft: `calc(${D ? "0px" : RA} + 0.5rem)`,
1348
+ border: `1px solid ${L === "dark" ? m.colors.dark[4] : "#e4e9ef"}`,
1169
1349
  borderRadius: "4px",
1170
1350
  overflow: "none"
1171
1351
  },
1172
1352
  children: [
1173
1353
  e,
1174
- /* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */ P(Dr, { children: [
1175
- ...RA
1354
+ /* @__PURE__ */ A("div", { style: { width: "100%", height: "calc(100% - 48px)" }, children: /* @__PURE__ */ z(qr, { maxKeepAliveTabs: f, children: [
1355
+ ...aA
1176
1356
  ] }) })
1177
1357
  ]
1178
1358
  }
1179
1359
  ),
1180
- H && /* @__PURE__ */ A(
1181
- JA,
1360
+ $ && /* @__PURE__ */ A(
1361
+ re,
1182
1362
  {
1183
- opened: a.hidden || !1,
1184
- onClose: Y,
1363
+ opened: p.hidden || !1,
1364
+ onClose: bA,
1185
1365
  size: r,
1186
1366
  padding: 0,
1187
1367
  styles: {
1188
1368
  header: { minHeight: "10px" }
1189
1369
  },
1190
- children: $ ? $({ width: r, height: uA(), isHidden: z }) : /* @__PURE__ */ A(
1191
- YA,
1370
+ children: V ? V({ width: r, height: EA(), isHidden: D }) : /* @__PURE__ */ A(
1371
+ Ae,
1192
1372
  {
1193
- navigationData: a.navigationData,
1373
+ navigationData: p.navigationData,
1194
1374
  sidebarWidth: r,
1195
- sidebarHeight: uA(),
1196
- sidebarCollapsedWidth: s,
1197
- sidebarGroupWidth: s,
1198
- selectedGroupColor: h,
1199
- groupColor: f,
1200
- backgroundGroupColor: k,
1201
- groupLabelDarkColor: x,
1202
- groupLabelLightColor: g,
1375
+ sidebarHeight: EA(),
1376
+ sidebarCollapsedWidth: t,
1377
+ sidebarGroupWidth: t,
1378
+ selectedGroupColor: y,
1379
+ groupColor: I,
1380
+ backgroundGroupColor: x,
1381
+ groupLabelDarkColor: l,
1382
+ groupLabelLightColor: h,
1203
1383
  showGroupLabels: !1,
1204
- isHidden: z,
1384
+ isHidden: D,
1205
1385
  onMenuItemClick: K,
1206
- onClickActionIcon: tA,
1207
- theme: u,
1208
- sidebarRef: E,
1386
+ onClickActionIcon: pA,
1387
+ theme: m,
1388
+ sidebarRef: q,
1209
1389
  defaultGroupIcon: C,
1210
- selectedGroupName: p,
1211
- iconsWithBackground: S,
1212
- menuItemHeight: V,
1213
- sideBarHeaderContent: m,
1214
- sideBarFooterContent: t,
1215
- sideBarFooterHeight: i,
1216
- highlightActiveMenuItem: F,
1217
- backgroundDarkColor: R,
1218
- backgroundLightColor: M,
1390
+ selectedGroupName: s,
1391
+ iconsWithBackground: k,
1392
+ menuItemHeight: R,
1393
+ sideBarHeaderContent: b,
1394
+ sideBarFooterContent: n,
1395
+ sideBarFooterHeight: a,
1396
+ highlightActiveMenuItem: H,
1397
+ backgroundDarkColor: T,
1398
+ backgroundLightColor: U,
1219
1399
  textDarkColor: W,
1220
- textLightColor: q,
1221
- iconDarkColor: G,
1222
- iconLightColor: N,
1223
- collapsedSubmenuWidth: b,
1224
- isLoading: a.isLoadingPermissions,
1225
- loadingError: a.permissionsError
1400
+ textLightColor: G,
1401
+ iconDarkColor: rA,
1402
+ iconLightColor: F,
1403
+ collapsedSubmenuWidth: g,
1404
+ isLoading: p.isLoadingPermissions,
1405
+ loadingError: p.permissionsError
1226
1406
  }
1227
1407
  )
1228
1408
  }
1229
1409
  )
1230
1410
  ] }),
1231
- /* @__PURE__ */ A(pA.Footer, { children: c })
1411
+ /* @__PURE__ */ A(mA.Footer, { children: c })
1232
1412
  ]
1233
1413
  }
1234
1414
  );
1235
1415
  }
1236
- function yo({
1416
+ function Oo({
1237
1417
  navigationRootLink: e = "/",
1238
1418
  navigationData: o,
1239
1419
  user: c,
1240
1420
  children: r,
1241
- header: s,
1242
- footer: l,
1243
- owner: i,
1244
- company: t,
1245
- sideBarWidth: d,
1246
- sideBarCollapsedWidth: n,
1247
- sideBarHiddenBreakPoint: p,
1421
+ header: t,
1422
+ footer: d,
1423
+ owner: a,
1424
+ company: n,
1425
+ sideBarWidth: u,
1426
+ sideBarCollapsedWidth: i,
1427
+ sideBarHiddenBreakPoint: s,
1248
1428
  sideBarFooterHeight: C,
1249
1429
  sideBarFooterContent: w,
1250
- onCollapsedSideBar: m,
1251
- onHiddenSidebar: h,
1252
- sidebarDefaultGroupIcon: f,
1253
- sidebarSelectedGroupName: k,
1254
- sideBarHeaderHeight: x,
1255
- sideBarHeaderContent: g,
1256
- selectedGroupColor: Q = "#132441",
1257
- groupColor: O = "white",
1258
- backgroundGroupColor: S = "#132441",
1259
- groupLabelDarkColor: V = "white",
1260
- groupLabelLightColor: H = "white",
1261
- headerColor: oA,
1430
+ onCollapsedSideBar: b,
1431
+ onHiddenSidebar: y,
1432
+ sidebarDefaultGroupIcon: I,
1433
+ sidebarSelectedGroupName: x,
1434
+ sideBarHeaderHeight: l,
1435
+ sideBarHeaderContent: h,
1436
+ selectedGroupColor: v = "#132441",
1437
+ groupColor: E = "white",
1438
+ backgroundGroupColor: k = "#132441",
1439
+ groupLabelDarkColor: R = "white",
1440
+ groupLabelLightColor: $ = "white",
1441
+ headerColor: tA,
1262
1442
  footerHeight: J,
1263
- iconsWithBackground: F,
1264
- menuItemHeight: $,
1443
+ iconsWithBackground: H,
1444
+ menuItemHeight: V,
1265
1445
  showSideBar: eA,
1266
- showHeader: R,
1267
- headerStyle: M,
1446
+ showHeader: T,
1447
+ headerStyle: U,
1268
1448
  highlightActiveMenuItem: W,
1269
- enableSecurity: q = !1,
1270
- securityOptions: G,
1271
- customRenderSidebar: N,
1272
- onNavigationDataChange: b,
1273
- showCollapsedButton: u,
1274
- initialSidebarCollapsed: a = !1,
1275
- sideBarBackgroundDarkColor: y,
1276
- sideBarBackgroundLightColor: D,
1277
- sideBarTextDarkColor: E,
1278
- sideBarTextLightColor: B,
1279
- sideBarIconDarkColor: z,
1280
- sideBarIconLightColor: K,
1281
- sideBarCollapsedSubmenuWidth: tA
1449
+ enableSecurity: G = !1,
1450
+ securityOptions: rA,
1451
+ customRenderSidebar: F,
1452
+ onNavigationDataChange: g,
1453
+ showCollapsedButton: f,
1454
+ initialSidebarCollapsed: m = !1,
1455
+ sideBarBackgroundDarkColor: p,
1456
+ sideBarBackgroundLightColor: L,
1457
+ sideBarTextDarkColor: S,
1458
+ sideBarTextLightColor: q,
1459
+ sideBarIconDarkColor: dA,
1460
+ sideBarIconLightColor: D,
1461
+ sideBarCollapsedSubmenuWidth: K,
1462
+ maxKeepAliveTabs: pA = 10
1282
1463
  }) {
1283
1464
  return /* @__PURE__ */ A(
1284
- Cr,
1465
+ Rr,
1285
1466
  {
1286
1467
  navigationData: o,
1287
1468
  navigationRootLink: e,
1288
1469
  user: c,
1289
- owner: i,
1290
- company: t,
1291
- enableSecurity: q,
1292
- securityOptions: G,
1293
- onNavigationDataChange: b,
1294
- initialSidebarCollapsed: a,
1470
+ owner: a,
1471
+ company: n,
1472
+ enableSecurity: G,
1473
+ securityOptions: rA,
1474
+ onNavigationDataChange: g,
1475
+ initialSidebarCollapsed: m,
1295
1476
  children: /* @__PURE__ */ A(
1296
- Mr,
1477
+ Gr,
1297
1478
  {
1298
1479
  navigationRootLink: e,
1299
1480
  user: c,
1300
- header: s,
1301
- footer: l,
1302
- owner: i,
1303
- company: t,
1304
- sideBarWidth: d,
1305
- sideBarCollapsedWidth: n,
1306
- sideBarHiddenBreakPoint: p,
1307
- sideBarHeaderHeight: x,
1308
- sideBarHeaderContent: g,
1481
+ header: t,
1482
+ footer: d,
1483
+ owner: a,
1484
+ company: n,
1485
+ sideBarWidth: u,
1486
+ sideBarCollapsedWidth: i,
1487
+ sideBarHiddenBreakPoint: s,
1488
+ sideBarHeaderHeight: l,
1489
+ sideBarHeaderContent: h,
1309
1490
  sideBarFooterHeight: C,
1310
1491
  sideBarFooterContent: w,
1311
- selectedGroupColor: Q,
1312
- groupColor: O,
1313
- backgroundGroupColor: S,
1314
- groupLabelDarkColor: V,
1315
- groupLabelLightColor: H,
1316
- onCollapsedSideBar: m,
1317
- onHiddenSidebar: h,
1318
- sidebarDefaultGroupIcon: f,
1319
- sidebarSelectedGroupName: k,
1320
- headerColor: oA,
1492
+ selectedGroupColor: v,
1493
+ groupColor: E,
1494
+ backgroundGroupColor: k,
1495
+ groupLabelDarkColor: R,
1496
+ groupLabelLightColor: $,
1497
+ onCollapsedSideBar: b,
1498
+ onHiddenSidebar: y,
1499
+ sidebarDefaultGroupIcon: I,
1500
+ sidebarSelectedGroupName: x,
1501
+ headerColor: tA,
1321
1502
  footerHeight: J,
1322
- iconsWithBackground: F,
1323
- menuItemHeight: $,
1503
+ iconsWithBackground: H,
1504
+ menuItemHeight: V,
1324
1505
  showSideBar: eA,
1325
- showHeader: R,
1326
- headerStyle: M,
1506
+ showHeader: T,
1507
+ headerStyle: U,
1327
1508
  highlightActiveMenuItem: W,
1328
- enableSecurity: q,
1329
- customRenderSidebar: N,
1330
- showCollapsedButton: u,
1331
- sideBarBackgroundDarkColor: y,
1332
- sideBarBackgroundLightColor: D,
1333
- sideBarTextDarkColor: E,
1334
- sideBarTextLightColor: B,
1335
- sideBarIconDarkColor: z,
1336
- sideBarIconLightColor: K,
1337
- sideBarCollapsedSubmenuWidth: tA,
1509
+ enableSecurity: G,
1510
+ customRenderSidebar: F,
1511
+ showCollapsedButton: f,
1512
+ sideBarBackgroundDarkColor: p,
1513
+ sideBarBackgroundLightColor: L,
1514
+ sideBarTextDarkColor: S,
1515
+ sideBarTextLightColor: q,
1516
+ sideBarIconDarkColor: dA,
1517
+ sideBarIconLightColor: D,
1518
+ sideBarCollapsedSubmenuWidth: K,
1519
+ maxKeepAliveTabs: pA,
1338
1520
  children: r
1339
1521
  }
1340
1522
  )
1341
1523
  }
1342
1524
  );
1343
1525
  }
1344
- const ie = yA({
1526
+ const fe = DA({
1345
1527
  state: { userCloseLinkRequest: "", linkClosed: "", isClosing: !1 },
1346
1528
  dispatch: (e) => null
1347
- }), Eo = ({ children: e }) => {
1529
+ }), zo = ({ children: e }) => {
1348
1530
  const o = {
1349
1531
  userCloseLinkRequest: "",
1350
1532
  linkClosed: "",
1351
1533
  isClosing: !1
1352
- }, c = (l, i) => {
1353
- switch (i.type) {
1534
+ }, c = (d, a) => {
1535
+ switch (a.type) {
1354
1536
  case "USER_CLOSE_REQUEST":
1355
- return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${i.link}`), { ...l, userCloseLinkRequest: i.link, isClosing: !0 };
1537
+ return console.log(`[Navigation Reducer] USER_CLOSE_REQUEST link: ${a.link}`), { ...d, userCloseLinkRequest: a.link, isClosing: !0 };
1356
1538
  case "CLOSE_ALLOWED":
1357
- return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${i.link}`), { ...l, linkClosed: i.link, userCloseLinkRequest: "", isClosing: !1, payload: i.payload };
1539
+ return console.log(`[Navigation Reducer] CLOSE_ALLOWED link: ${a.link}`), { ...d, linkClosed: a.link, userCloseLinkRequest: "", isClosing: !1, payload: a.payload };
1358
1540
  case "DONE":
1359
- return console.log(`[Navigation Reducer] DONE link: ${i.link}`), { ...l, linkClosed: i.link, isClosing: !1 };
1541
+ return console.log(`[Navigation Reducer] DONE link: ${a.link}`), { ...d, linkClosed: a.link, isClosing: !1 };
1360
1542
  case "CLEAR_PAYLOAD":
1361
- const t = { ...l };
1362
- return delete t.payload, t;
1543
+ const n = { ...d };
1544
+ return delete n.payload, n;
1363
1545
  default:
1364
- return l;
1546
+ return d;
1365
1547
  }
1366
- }, [r, s] = ce(c, o);
1548
+ }, [r, t] = me(c, o);
1367
1549
  return AA.useEffect(() => {
1368
- let l = null;
1369
- return r.userCloseLinkRequest && !r.linkClosed && (console.log(`[NavigationProvider] Waiting for close response for: ${r.userCloseLinkRequest}`), l = setTimeout(() => {
1370
- console.log(`[NavigationProvider] No response received, auto-closing: ${r.userCloseLinkRequest}`), s({ type: "CLOSE_ALLOWED", link: r.userCloseLinkRequest });
1550
+ let d = null;
1551
+ return r.userCloseLinkRequest && !r.linkClosed && (console.log(`[NavigationProvider] Waiting for close response for: ${r.userCloseLinkRequest}`), d = setTimeout(() => {
1552
+ console.log(`[NavigationProvider] No response received, auto-closing: ${r.userCloseLinkRequest}`), t({ type: "CLOSE_ALLOWED", link: r.userCloseLinkRequest });
1371
1553
  }, 100)), () => {
1372
- l && clearTimeout(l);
1554
+ d && clearTimeout(d);
1373
1555
  };
1374
- }, [r.userCloseLinkRequest, r.linkClosed, s]), /* @__PURE__ */ A(ie.Provider, { value: { state: r, dispatch: s }, children: e });
1375
- }, le = () => {
1376
- const e = cA(ie);
1556
+ }, [r.userCloseLinkRequest, r.linkClosed, t]), /* @__PURE__ */ A(fe.Provider, { value: { state: r, dispatch: t }, children: e });
1557
+ }, ge = () => {
1558
+ const e = hA(fe);
1377
1559
  if (!e)
1378
1560
  throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
1379
1561
  return e;
1380
- }, So = (e, o) => {
1381
- const c = le(), { state: r, dispatch: s } = c, l = sA((d) => {
1382
- console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`), s({ type: "CLOSE_ALLOWED", link: e, payload: d });
1383
- }, [s, e]), i = rA(o);
1384
- i.current = o, U(() => {
1385
- console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${r?.userCloseLinkRequest}, id: ${e}`), r && r.userCloseLinkRequest && r.userCloseLinkRequest === e && (console.log(`[useArchbaseNavigationListener] Calling onUserCloseRequest for: ${e}`), i.current());
1562
+ }, Qo = (e, o) => {
1563
+ const c = ge(), { state: r, dispatch: t } = c, d = X((u) => {
1564
+ console.log(`[useArchbaseNavigationListener] closeAllowed called for: ${e}`), t({ type: "CLOSE_ALLOWED", link: e, payload: u });
1565
+ }, [t, e]), a = nA(o);
1566
+ a.current = o, B(() => {
1567
+ console.log(`[useArchbaseNavigationListener] Effect check - userCloseLinkRequest: ${r?.userCloseLinkRequest}, id: ${e}`), r && r.userCloseLinkRequest && r.userCloseLinkRequest === e && (console.log(`[useArchbaseNavigationListener] Calling onUserCloseRequest for: ${e}`), a.current());
1386
1568
  }, [r, e]);
1387
- const t = r.isClosing && r.userCloseLinkRequest === e;
1388
- return { closeAllowed: l, isClosing: t };
1569
+ const n = r.isClosing && r.userCloseLinkRequest === e;
1570
+ return { closeAllowed: d, isClosing: n };
1389
1571
  };
1390
- function Ro({
1572
+ function Mo({
1391
1573
  navigationData: e,
1392
1574
  onChangeOpenedTabs: o,
1393
1575
  onChangeActiveTabId: c,
1394
1576
  activeTabId: r,
1395
- openedTabs: s = []
1577
+ openedTabs: t = []
1396
1578
  }) {
1397
- const [l, i] = AA.useTransition(), t = $A(), { colorScheme: d } = nA(), [n, p] = _(s), [C, w] = _(r), m = UA(), h = rA([]);
1398
- ur(h);
1399
- const f = le(), { state: k, dispatch: x } = f, g = cA(SA), Q = se(), O = rA(o), S = rA(c);
1400
- U(() => {
1401
- O.current = o, S.current = c;
1579
+ const [d, a] = AA.useTransition(), n = VA(), { colorScheme: u } = sA(), [i, s] = _(t), [C, w] = _(r), b = HA(), y = nA([]);
1580
+ vr(y);
1581
+ const I = ge(), { state: x, dispatch: l } = I, h = hA(OA), v = pe(), E = nA(o), k = nA(c);
1582
+ B(() => {
1583
+ E.current = o, k.current = c;
1402
1584
  });
1403
- const V = rA(!1), H = sA((b, u) => {
1404
- console.log(`[TabContainer] handleOnClose called for: ${b}`), Q ? Q.requestUnregister(b) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
1405
- const a = n.findIndex((K) => K.path === b);
1406
- let y = u?.redirectUrl;
1407
- !y && a >= 0 && (y = n[a].redirect);
1408
- const D = n.filter((K) => K.id !== b);
1409
- let E = -1;
1410
- D.forEach((K, tA) => K.id === C && (E = tA));
1411
- let B = null;
1412
- D.length > 0 && D[E] ? B = D[E].id : D.length > 0 ? B = D[D.length - 1].id : B = null;
1413
- const z = D.map((K) => ({
1414
- ...K,
1415
- active: B === K.id
1585
+ const R = nA(!1), $ = X((g, f) => {
1586
+ console.log(`[TabContainer] handleOnClose called for: ${g}`), v ? v.requestUnregister(g) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks.");
1587
+ const m = i.findIndex((D) => D.path === g);
1588
+ let p = f?.redirectUrl;
1589
+ !p && m >= 0 && (p = i[m].redirect);
1590
+ const L = i.filter((D) => D.id !== g);
1591
+ let S = -1;
1592
+ L.forEach((D, K) => D.id === C && (S = K));
1593
+ let q = null;
1594
+ L.length > 0 && L[S] ? q = L[S].id : L.length > 0 ? q = L[L.length - 1].id : q = null;
1595
+ const dA = L.map((D) => ({
1596
+ ...D,
1597
+ active: q === D.id
1416
1598
  }));
1417
- if (p(z), B && B != null)
1418
- w(B), t(y || B);
1599
+ if (s(dA), q && q != null)
1600
+ w(q), n(p || q);
1419
1601
  else {
1420
- if (w(void 0), !g.navigationRootLink) {
1602
+ if (w(void 0), !h.navigationRootLink) {
1421
1603
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
1422
1604
  return;
1423
1605
  }
1424
- t(g.navigationRootLink);
1606
+ n(h.navigationRootLink);
1425
1607
  }
1426
- x({ type: "DONE", link: "" });
1427
- }, [n, C, t, g.navigationRootLink, x, Q]);
1428
- U(() => {
1429
- k?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${k?.linkClosed}`), H(k?.linkClosed, k?.payload));
1430
- }, [k?.linkClosed, k?.payload, H]);
1431
- const oA = (b) => {
1432
- const u = {
1608
+ l({ type: "DONE", link: "" });
1609
+ }, [i, C, n, h.navigationRootLink, l, v]);
1610
+ B(() => {
1611
+ x?.linkClosed && (console.log(`[TabContainer] useEffect - linkClosed: ${x?.linkClosed}`), $(x?.linkClosed, x?.payload));
1612
+ }, [x?.linkClosed, x?.payload, $]);
1613
+ const tA = (g) => {
1614
+ const f = {
1433
1615
  item: void 0,
1434
1616
  title: void 0,
1435
- link: b,
1617
+ link: g,
1436
1618
  redirect: void 0,
1437
1619
  customTitle: void 0
1438
1620
  };
1439
- return e.forEach((a) => {
1440
- if (a.links)
1441
- a.links.forEach((y) => {
1442
- HA({ path: y.link || "" }, location.pathname) && (u.item = y, u.title = `${I().t(y.label)}`, u.redirect = y.redirect, u.customTitle = y.customTitle);
1621
+ return e.forEach((m) => {
1622
+ if (m.links)
1623
+ m.links.forEach((p) => {
1624
+ JA({ path: p.link || "" }, location.pathname) && (f.item = p, f.title = `${O().t(p.label)}`, f.redirect = p.redirect, f.customTitle = p.customTitle);
1443
1625
  });
1444
- else if (a.link && !u.item) {
1445
- const y = HA({ path: a.link }, location.pathname);
1446
- y && (y.params && Object.keys(y.params).length > 0 ? u.title = `${y.params[Object.keys(y.params)[0]]}` : u.title = `${I().t(a.label)}`, u.item = a, u.redirect = a.redirect, u.customTitle = a.customTitle);
1626
+ else if (m.link && !f.item) {
1627
+ const p = JA({ path: m.link }, location.pathname);
1628
+ p && (p.params && Object.keys(p.params).length > 0 ? f.title = `${p.params[Object.keys(p.params)[0]]}` : f.title = `${O().t(m.label)}`, f.item = m, f.redirect = m.redirect, f.customTitle = m.customTitle);
1447
1629
  }
1448
- }), u.customTitle && (u.customTitle = u.customTitle.replace("$title", u.title)), u;
1630
+ }), f.customTitle && (f.customTitle = f.customTitle.replace("$title", f.title)), f;
1449
1631
  };
1450
- U(() => {
1451
- p(s), V.current = !0;
1452
- }, [JSON.stringify(s)]);
1453
- const J = rA(n), F = rA(C);
1454
- U(() => {
1455
- if (V.current) {
1456
- V.current = !1, J.current = n, F.current = C;
1632
+ B(() => {
1633
+ s(t), R.current = !0;
1634
+ }, [JSON.stringify(t)]);
1635
+ const J = nA(i), H = nA(C);
1636
+ B(() => {
1637
+ if (R.current) {
1638
+ R.current = !1, J.current = i, H.current = C;
1457
1639
  return;
1458
1640
  }
1459
- const b = JSON.stringify(J.current) !== JSON.stringify(n), u = F.current !== C;
1460
- if (b || u) {
1461
- const a = setTimeout(() => {
1462
- O.current?.(n), S.current?.(C);
1641
+ const g = JSON.stringify(J.current) !== JSON.stringify(i), f = H.current !== C;
1642
+ if (g || f) {
1643
+ const m = setTimeout(() => {
1644
+ E.current?.(i), k.current?.(C);
1463
1645
  }, 0);
1464
- return J.current = n, F.current = C, () => clearTimeout(a);
1646
+ return J.current = i, H.current = C, () => clearTimeout(m);
1465
1647
  }
1466
- }, [n, C]);
1467
- const $ = rA("");
1468
- U(() => {
1469
- if ($.current === m.pathname)
1648
+ }, [i, C]);
1649
+ const V = nA("");
1650
+ B(() => {
1651
+ if (V.current === b.pathname)
1470
1652
  return;
1471
- $.current = m.pathname;
1472
- const b = oA(m.pathname);
1473
- if (b && b.item) {
1474
- const u = n.findIndex((a) => a.path === b.link);
1475
- if (u !== -1) {
1476
- if (n[u].title !== b.title) {
1477
- const a = [...n];
1478
- a[u] = { ...a[u], title: b.title }, p(a);
1653
+ V.current = b.pathname;
1654
+ const g = tA(b.pathname);
1655
+ if (g && g.item) {
1656
+ const f = i.findIndex((m) => m.path === g.link);
1657
+ if (f !== -1) {
1658
+ if (i[f].title !== g.title) {
1659
+ const m = [...i];
1660
+ m[f] = { ...m[f], title: g.title }, s(m);
1479
1661
  }
1480
- w(n[u].id);
1662
+ w(i[f].id);
1481
1663
  } else {
1482
- const a = {
1483
- id: `${b.link}`,
1484
- title: `${b.title}`,
1485
- path: `${b.link}`,
1664
+ const m = {
1665
+ id: `${g.link}`,
1666
+ title: `${g.title}`,
1667
+ path: `${g.link}`,
1486
1668
  active: !0,
1487
- content: b.item.component,
1488
- iconClass: b.item.icon,
1669
+ content: g.item.component,
1670
+ iconClass: g.item.icon,
1489
1671
  closeButton: !0,
1490
- redirect: b.redirect,
1491
- customTitle: b.customTitle
1492
- }, y = [...n.map((D) => ({ ...D, active: !1 })), a];
1493
- p(y), w(a.id);
1672
+ redirect: g.redirect,
1673
+ customTitle: g.customTitle
1674
+ }, p = [...i.map((L) => ({ ...L, active: !1 })), m];
1675
+ s(p), w(m.id);
1494
1676
  }
1495
1677
  }
1496
- }, [m.pathname]);
1497
- const eA = (b) => {
1498
- const u = n.filter((a) => a.id === b);
1499
- u && u.length > 0 && m.pathname !== u[0].path && t(u[0].path), i(() => {
1500
- w(b);
1678
+ }, [b.pathname]);
1679
+ const eA = (g) => {
1680
+ const f = i.filter((m) => m.id === g);
1681
+ f && f.length > 0 && b.pathname !== f[0].path && n(f[0].path), a(() => {
1682
+ w(g);
1501
1683
  });
1502
- }, R = (b) => {
1503
- console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${b}`);
1684
+ }, T = (g) => {
1685
+ console.log(`[TabContainer] handleOnCloseRequest - User clicked close on tab: ${g}`);
1504
1686
  try {
1505
- x({ type: "USER_CLOSE_REQUEST", link: b });
1506
- } catch (u) {
1507
- console.error("[TabContainer] Dispatch failed:", u);
1687
+ l({ type: "USER_CLOSE_REQUEST", link: g });
1688
+ } catch (f) {
1689
+ console.error("[TabContainer] Dispatch failed:", f);
1508
1690
  }
1509
- }, M = sA(() => {
1510
- if (p([]), w(void 0), !g.navigationRootLink) {
1691
+ }, U = X(() => {
1692
+ if (s([]), w(void 0), !h.navigationRootLink) {
1511
1693
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
1512
1694
  return;
1513
1695
  }
1514
- t(g.navigationRootLink);
1515
- }, [t, g.navigationRootLink]), W = sA((b) => {
1516
- const u = n.findIndex((E) => E.id === b);
1517
- if (u <= 0)
1696
+ n(h.navigationRootLink);
1697
+ }, [n, h.navigationRootLink]), W = X((g) => {
1698
+ const f = i.findIndex((S) => S.id === g);
1699
+ if (f <= 0)
1518
1700
  return;
1519
- const a = n.slice(u), y = a.find((E) => E.id === C)?.id || a[0]?.id, D = a.map((E) => ({
1520
- ...E,
1521
- active: E.id === y
1701
+ const m = i.slice(f), p = m.find((S) => S.id === C)?.id || m[0]?.id, L = m.map((S) => ({
1702
+ ...S,
1703
+ active: S.id === p
1522
1704
  }));
1523
- if (p(D), y) {
1524
- w(y);
1525
- const E = D.find((B) => B.id === y);
1526
- E && m.pathname !== E.path && t(E.path);
1705
+ if (s(L), p) {
1706
+ w(p);
1707
+ const S = L.find((q) => q.id === p);
1708
+ S && b.pathname !== S.path && n(S.path);
1527
1709
  }
1528
- }, [n, C, t, m.pathname]), q = sA((b) => {
1529
- const u = n.findIndex((E) => E.id === b);
1530
- if (u === -1 || u >= n.length - 1)
1710
+ }, [i, C, n, b.pathname]), G = X((g) => {
1711
+ const f = i.findIndex((S) => S.id === g);
1712
+ if (f === -1 || f >= i.length - 1)
1531
1713
  return;
1532
- const a = n.slice(0, u + 1), y = a.find((E) => E.id === C)?.id || a[a.length - 1]?.id, D = a.map((E) => ({
1533
- ...E,
1534
- active: E.id === y
1714
+ const m = i.slice(0, f + 1), p = m.find((S) => S.id === C)?.id || m[m.length - 1]?.id, L = m.map((S) => ({
1715
+ ...S,
1716
+ active: S.id === p
1535
1717
  }));
1536
- if (p(D), y) {
1537
- w(y);
1538
- const E = D.find((B) => B.id === y);
1539
- E && m.pathname !== E.path && t(E.path);
1718
+ if (s(L), p) {
1719
+ w(p);
1720
+ const S = L.find((q) => q.id === p);
1721
+ S && b.pathname !== S.path && n(S.path);
1540
1722
  }
1541
- }, [n, C, t, m.pathname]), G = sA((b) => {
1542
- const u = n.find((y) => y.id === b);
1543
- if (!u)
1723
+ }, [i, C, n, b.pathname]), rA = X((g) => {
1724
+ const f = i.find((p) => p.id === g);
1725
+ if (!f)
1544
1726
  return;
1545
- const a = [{ ...u, active: !0 }];
1546
- p(a), w(b), m.pathname !== u.path && t(u.path);
1547
- }, [n, t, m.pathname]);
1548
- return /* @__PURE__ */ A("div", { ref: h, children: /* @__PURE__ */ A(
1549
- hr,
1727
+ const m = [{ ...f, active: !0 }];
1728
+ s(m), w(g), b.pathname !== f.path && n(f.path);
1729
+ }, [i, n, b.pathname]);
1730
+ return /* @__PURE__ */ A("div", { ref: y, children: /* @__PURE__ */ A(
1731
+ kr,
1550
1732
  {
1551
1733
  buttonCloseOnlyActiveTab: !0,
1552
- onClick: (b) => eA(b),
1553
- onTabClose: (b) => R(b),
1554
- onTabChange: (b) => null,
1555
- onCloseAllTabs: M,
1734
+ onClick: (g) => eA(g),
1735
+ onTabClose: (g) => T(g),
1736
+ onTabChange: (g) => null,
1737
+ onCloseAllTabs: U,
1556
1738
  onCloseLeftTabs: W,
1557
- onCloseRightTabs: q,
1558
- onCloseOtherTabs: G,
1559
- currentTabs: ((b) => b.map((u) => ({
1560
- key: u.id,
1561
- favicon: u.iconClass,
1562
- title: u.title,
1563
- customTitle: u.customTitle
1564
- })))(n),
1739
+ onCloseRightTabs: G,
1740
+ onCloseOtherTabs: rA,
1741
+ currentTabs: ((g) => g.map((f) => ({
1742
+ key: f.id,
1743
+ favicon: f.iconClass,
1744
+ title: f.title,
1745
+ customTitle: f.customTitle
1746
+ })))(i),
1565
1747
  activeTab: C,
1566
- dark: d === "dark"
1748
+ dark: u === "dark"
1567
1749
  }
1568
1750
  ) });
1569
1751
  }
1570
- const Nr = () => AA.createElement("div", null, "Home View"), $r = () => AA.createElement("div", null, "Pedido Form"), Ur = () => AA.createElement("div", null, "Pedido View"), Fr = () => AA.createElement("div", null, "Pessoa Form"), qr = () => AA.createElement("div", null, "Pessoa View"), Br = {
1752
+ const Yr = () => AA.createElement("div", null, "Home View"), Kr = () => AA.createElement("div", null, "Pedido Form"), Xr = () => AA.createElement("div", null, "Pedido View"), Jr = () => AA.createElement("div", null, "Pessoa Form"), jr = () => AA.createElement("div", null, "Pessoa View"), Wr = {
1571
1753
  label: "Dashboard",
1572
- icon: /* @__PURE__ */ A(Te, {}),
1754
+ icon: /* @__PURE__ */ A(Ne, {}),
1573
1755
  link: "/dashboard",
1574
1756
  category: "DASHBOARD",
1575
1757
  color: "teal",
1576
1758
  component: /* @__PURE__ */ A("div", {}),
1577
1759
  showInSidebar: !0
1578
- }, Vr = {
1760
+ }, Zr = {
1579
1761
  label: "Home",
1580
- icon: /* @__PURE__ */ A(Le, {}),
1762
+ icon: /* @__PURE__ */ A($e, {}),
1581
1763
  link: "/home",
1582
1764
  category: "HOME",
1583
1765
  color: "teal",
1584
- component: /* @__PURE__ */ A(Nr, {}),
1766
+ component: /* @__PURE__ */ A(Yr, {}),
1585
1767
  showInSidebar: !0,
1586
1768
  keepAlive: !0
1587
- }, Hr = {
1769
+ }, _r = {
1588
1770
  label: "Consulta lista pessoas",
1589
1771
  link: "/pessoa/consulta",
1590
- icon: /* @__PURE__ */ A(ZA, {}),
1772
+ icon: /* @__PURE__ */ A(te, {}),
1591
1773
  category: "PESSOAS",
1592
1774
  color: "pink",
1593
- component: /* @__PURE__ */ A(qr, {}),
1775
+ component: /* @__PURE__ */ A(jr, {}),
1594
1776
  showInSidebar: !0,
1595
1777
  keepAlive: !0
1596
- }, Gr = {
1778
+ }, Ao = {
1597
1779
  label: "Nova pessoa",
1598
1780
  link: "/pessoa/nova",
1599
- icon: /* @__PURE__ */ A(Pe, {}),
1781
+ icon: /* @__PURE__ */ A(Fe, {}),
1600
1782
  category: "PESSOAS",
1601
1783
  color: "pink",
1602
- component: /* @__PURE__ */ A(Fr, {}),
1784
+ component: /* @__PURE__ */ A(Jr, {}),
1603
1785
  showInSidebar: !0,
1604
1786
  keepAlive: !0
1605
- }, Kr = {
1787
+ }, eo = {
1606
1788
  label: "Pessoas",
1607
- icon: /* @__PURE__ */ A(Ie, {}),
1608
- links: [Hr, Gr],
1789
+ icon: /* @__PURE__ */ A(Ue, {}),
1790
+ links: [_r, Ao],
1609
1791
  category: "PESSOAS",
1610
1792
  color: "pink",
1611
1793
  showInSidebar: !0
1612
- }, Yr = {
1794
+ }, ro = {
1613
1795
  label: "Consulta lista pedidos",
1614
1796
  link: "/pedido/consulta",
1615
- icon: /* @__PURE__ */ A(ZA, {}),
1797
+ icon: /* @__PURE__ */ A(te, {}),
1616
1798
  category: "PEDIDOS",
1617
1799
  color: "yellow",
1618
- component: /* @__PURE__ */ A(Ur, {}),
1800
+ component: /* @__PURE__ */ A(Xr, {}),
1619
1801
  showInSidebar: !0,
1620
1802
  keepAlive: !0
1621
- }, Xr = {
1803
+ }, oo = {
1622
1804
  label: "Novo pedido",
1623
1805
  link: "/pedido/novo",
1624
- icon: /* @__PURE__ */ A(Oe, {}),
1806
+ icon: /* @__PURE__ */ A(Be, {}),
1625
1807
  category: "PEDIDOS",
1626
1808
  color: "yellow",
1627
- component: /* @__PURE__ */ A($r, {}),
1809
+ component: /* @__PURE__ */ A(Kr, {}),
1628
1810
  showInSidebar: !0,
1629
1811
  keepAlive: !0
1630
- }, Jr = {
1812
+ }, no = {
1631
1813
  label: "Pedidos",
1632
- icon: /* @__PURE__ */ A(De, {}),
1633
- links: [Yr, Xr],
1814
+ icon: /* @__PURE__ */ A(qe, {}),
1815
+ links: [ro, oo],
1634
1816
  category: "PEDIDOS",
1635
1817
  color: "yellow",
1636
1818
  showInSidebar: !0
1637
- }, jr = {
1819
+ }, to = {
1638
1820
  label: "Configurações",
1639
1821
  link: "/config",
1640
- icon: /* @__PURE__ */ A(Qe, {}),
1822
+ icon: /* @__PURE__ */ A(Ve, {}),
1641
1823
  category: "CONFIGURAÇÕES",
1642
1824
  color: "lime",
1643
1825
  component: /* @__PURE__ */ A("div", {}),
1644
1826
  showInSidebar: !0
1645
- }, Lo = [
1646
- Vr,
1647
- Br,
1648
- Kr,
1649
- Jr,
1650
- jr
1827
+ }, $o = [
1828
+ Zr,
1829
+ Wr,
1830
+ eo,
1831
+ no,
1832
+ to
1651
1833
  ];
1652
- function To({
1653
- itemCount: e = 8,
1654
- collapsed: o = !1,
1655
- backgroundColor: c
1656
- }) {
1657
- const r = vA(), { colorScheme: s } = nA(), l = c ?? (s === "dark" ? r.colors.dark[7] : r.white);
1658
- return o ? /* @__PURE__ */ A(
1659
- lA,
1660
- {
1661
- gap: "sm",
1662
- p: "xs",
1663
- align: "center",
1664
- style: {
1665
- backgroundColor: l,
1666
- width: "100%",
1667
- height: "100%"
1668
- },
1669
- children: Array.from({ length: e }).map((i, t) => /* @__PURE__ */ A(
1670
- mA,
1671
- {
1672
- height: 32,
1673
- width: 32,
1674
- radius: "sm"
1675
- },
1676
- t
1677
- ))
1678
- }
1679
- ) : /* @__PURE__ */ A(
1680
- lA,
1681
- {
1682
- gap: "xs",
1683
- p: "md",
1684
- style: {
1685
- backgroundColor: l,
1686
- flex: 1,
1687
- width: "100%",
1688
- height: "100%"
1689
- },
1690
- children: Array.from({ length: e }).map((i, t) => /* @__PURE__ */ P(OA, { gap: "sm", wrap: "nowrap", children: [
1691
- /* @__PURE__ */ A(
1692
- mA,
1693
- {
1694
- height: 24,
1695
- width: 24,
1696
- radius: "sm"
1697
- }
1698
- ),
1699
- /* @__PURE__ */ A(
1700
- mA,
1701
- {
1702
- height: 18,
1703
- radius: "xl",
1704
- style: { flex: 1 }
1705
- }
1706
- )
1707
- ] }, t))
1708
- }
1709
- );
1710
- }
1711
- function Io({
1712
- groupCount: e = 3,
1713
- width: o = "80px",
1714
- height: c = "100%",
1715
- backgroundColor: r
1716
- }) {
1717
- const s = vA(), { colorScheme: l } = nA(), i = r ?? (l === "dark" ? s.colors[s.primaryColor][6] : s.colors[s.primaryColor][7]);
1718
- return /* @__PURE__ */ A(
1719
- lA,
1720
- {
1721
- gap: "md",
1722
- p: "xs",
1723
- align: "center",
1724
- style: {
1725
- width: o,
1726
- height: c,
1727
- backgroundColor: i
1728
- },
1729
- children: Array.from({ length: e }).map((t, d) => /* @__PURE__ */ P(lA, { gap: 4, align: "center", children: [
1730
- /* @__PURE__ */ A(
1731
- mA,
1732
- {
1733
- height: 48,
1734
- width: 48,
1735
- radius: "md",
1736
- circle: !1
1737
- }
1738
- ),
1739
- /* @__PURE__ */ A(
1740
- mA,
1741
- {
1742
- height: 10,
1743
- width: 40,
1744
- radius: "xl"
1745
- }
1746
- )
1747
- ] }, d))
1748
- }
1749
- );
1750
- }
1751
- function Po({
1752
- message: e,
1753
- backgroundColor: o,
1754
- children: c
1755
- }) {
1756
- const r = vA(), { colorScheme: s } = nA(), l = o ?? (s === "dark" ? r.colors.dark[7] : r.white), i = s === "dark" ? r.colors.red[4] : r.colors.red[6];
1757
- return c ? /* @__PURE__ */ A(iA, { children: c }) : /* @__PURE__ */ A(XA, { p: "md", style: { backgroundColor: l, flex: 1, height: "100%" }, children: /* @__PURE__ */ P(lA, { align: "center", gap: "xs", children: [
1758
- /* @__PURE__ */ A(ze, { size: 32, color: i }),
1759
- /* @__PURE__ */ A(QA, { size: "sm", c: i, ta: "center", children: e })
1760
- ] }) });
1761
- }
1762
- function Do({ children: e, title: o = "", size: c = "440px", drawerKey: r, styles: s }) {
1763
- const [l, { open: i, close: t }] = he(!1), [d] = ee(), n = tr(), p = FA();
1764
- return U(() => {
1765
- d.get("drawer") === r && i();
1766
- }, [d]), /* @__PURE__ */ A(
1767
- JA,
1834
+ function No({ children: e, title: o = "", size: c = "440px", drawerKey: r, styles: t }) {
1835
+ const [d, { open: a, close: n }] = ke(!1), [u] = ie(), i = hr(), s = GA();
1836
+ return B(() => {
1837
+ u.get("drawer") === r && a();
1838
+ }, [u]), /* @__PURE__ */ A(
1839
+ re,
1768
1840
  {
1769
1841
  position: "right",
1770
- opened: l,
1842
+ opened: d,
1771
1843
  onClose: () => {
1772
- t();
1773
- const w = new URLSearchParams(d);
1774
- w.delete("drawer"), n({
1775
- pathname: p.pathname,
1844
+ n();
1845
+ const w = new URLSearchParams(u);
1846
+ w.delete("drawer"), i({
1847
+ pathname: s.pathname,
1776
1848
  search: w.toString()
1777
1849
  });
1778
1850
  },
1779
1851
  title: o,
1780
1852
  size: c,
1781
- styles: s,
1853
+ styles: t,
1782
1854
  children: e
1783
1855
  }
1784
1856
  );
1785
1857
  }
1786
- function Wr(e) {
1787
- const o = $A(), c = UA(), [r] = ee();
1858
+ function ao(e) {
1859
+ const o = VA(), c = HA(), [r] = ie();
1788
1860
  return { openDrawer: () => {
1789
- const l = new URLSearchParams(r);
1790
- l.set("drawer", e), o({
1861
+ const d = new URLSearchParams(r);
1862
+ d.set("drawer", e), o({
1791
1863
  pathname: c.pathname,
1792
- search: l.toString()
1864
+ search: d.toString()
1793
1865
  });
1794
1866
  } };
1795
1867
  }
1796
- function Oo({ drawerKey: e }) {
1797
- const { openDrawer: o } = Wr(e);
1798
- return U(() => {
1868
+ function Uo({ drawerKey: e }) {
1869
+ const { openDrawer: o } = ao(e);
1870
+ return B(() => {
1799
1871
  o();
1800
1872
  }, []), null;
1801
1873
  }
1802
- const Zr = {
1874
+ const so = {
1803
1875
  // Campos de identificação
1804
1876
  showNickname: !0,
1805
1877
  // Configurações de campos obrigatórios
@@ -1807,79 +1879,79 @@ const Zr = {
1807
1879
  avatarMaxSizeKB: 2e3,
1808
1880
  avatarImageQuality: 1
1809
1881
  };
1810
- function Qo({ opened: e, handleClose: o, userId: c, updateUser: r, options: s }) {
1811
- const l = pe(), i = ge(), t = Me(), d = pr(`myProfile${c}Store`), n = gr(Ne.User), p = { ...Zr, ...s ?? {} }, { dataSource: C, isLoading: w, error: m, isError: h, clearError: f } = fr({
1882
+ function Fo({ opened: e, handleClose: o, userId: c, updateUser: r, options: t }) {
1883
+ const d = we(), a = xe(), n = He(), u = wr(`myProfile${c}Store`), i = xr(Ge.User), s = { ...so, ...t ?? {} }, { dataSource: C, isLoading: w, error: b, isError: y, clearError: I } = yr({
1812
1884
  name: `dsUser${c}`,
1813
- label: `${I().t("archbase:My Profile")}`,
1814
- service: n,
1815
- store: d,
1885
+ label: `${O().t("archbase:My Profile")}`,
1886
+ service: i,
1887
+ store: u,
1816
1888
  pageSize: 50,
1817
1889
  loadOnStart: !0,
1818
- validator: t,
1890
+ validator: n,
1819
1891
  id: c,
1820
- onLoadComplete: (x) => {
1821
- x.isBrowsing() && x.edit(), i();
1892
+ onLoadComplete: (l) => {
1893
+ l.isBrowsing() && l.edit(), a();
1822
1894
  },
1823
- onDestroy: (x) => {
1895
+ onDestroy: (l) => {
1824
1896
  },
1825
- onError: (x, g) => {
1826
- lr.showError(I().t("archbase:WARNING"), x, g);
1897
+ onError: (l, h) => {
1898
+ br.showError(O().t("archbase:WARNING"), l, h);
1827
1899
  }
1828
1900
  });
1829
- U(() => {
1901
+ B(() => {
1830
1902
  e && C && C.isBrowsing() && C.edit();
1831
1903
  }, [C, e]);
1832
- const k = (x) => {
1833
- x && (console.log(x), r(x.name, x.avatar));
1904
+ const x = (l) => {
1905
+ l && (console.log(l), r(l.name, l.avatar));
1834
1906
  };
1835
1907
  return /* @__PURE__ */ A(
1836
- br,
1908
+ Er,
1837
1909
  {
1838
- title: I().t("archbase:My Profile"),
1910
+ title: O().t("archbase:My Profile"),
1839
1911
  size: 800,
1840
1912
  height: "500px",
1841
1913
  opened: e,
1842
1914
  dataSource: C,
1843
1915
  onClickOk: o,
1844
1916
  onClickCancel: o,
1845
- onAfterSave: k,
1846
- children: /* @__PURE__ */ A(zA, { style: { height: "440px" }, ref: l, children: /* @__PURE__ */ P(lA, { children: [
1847
- /* @__PURE__ */ A(lA, { align: "center", children: /* @__PURE__ */ A(
1848
- cr,
1917
+ onAfterSave: x,
1918
+ children: /* @__PURE__ */ A(FA, { style: { height: "440px" }, ref: d, children: /* @__PURE__ */ z(cA, { children: [
1919
+ /* @__PURE__ */ A(cA, { align: "center", children: /* @__PURE__ */ A(
1920
+ mr,
1849
1921
  {
1850
1922
  dataSource: C,
1851
1923
  dataField: "avatar",
1852
1924
  width: 200,
1853
1925
  height: 200,
1854
- maxSizeKB: p.avatarMaxSizeKB,
1855
- imageQuality: p.avatarImageQuality
1926
+ maxSizeKB: s.avatarMaxSizeKB,
1927
+ imageQuality: s.avatarImageQuality
1856
1928
  }
1857
1929
  ) }),
1858
1930
  /* @__PURE__ */ A(
1859
- TA,
1931
+ zA,
1860
1932
  {
1861
- label: `${I().t("archbase:Nome completo")}`,
1862
- placeholder: `${I().t("archbase:Informe o nome completo do usuário")}`,
1933
+ label: `${O().t("archbase:Nome completo")}`,
1934
+ placeholder: `${O().t("archbase:Informe o nome completo do usuário")}`,
1863
1935
  dataSource: C,
1864
1936
  dataField: "name",
1865
1937
  required: !0
1866
1938
  }
1867
1939
  ),
1868
- p.showNickname && /* @__PURE__ */ A(
1869
- TA,
1940
+ s.showNickname && /* @__PURE__ */ A(
1941
+ zA,
1870
1942
  {
1871
- label: `${I().t("archbase:Apelido")}`,
1872
- placeholder: `${I().t("archbase:Apelido")}`,
1943
+ label: `${O().t("archbase:Apelido")}`,
1944
+ placeholder: `${O().t("archbase:Apelido")}`,
1873
1945
  dataSource: C,
1874
1946
  dataField: "nickname",
1875
- required: p.requiredNickname
1947
+ required: s.requiredNickname
1876
1948
  }
1877
1949
  ),
1878
1950
  /* @__PURE__ */ A(
1879
- TA,
1951
+ zA,
1880
1952
  {
1881
- label: `${I().t("archbase:Descrição do usuário")}`,
1882
- placeholder: `${I().t("archbase:Informe a descrição do usuário")}`,
1953
+ label: `${O().t("archbase:Descrição do usuário")}`,
1954
+ placeholder: `${O().t("archbase:Informe a descrição do usuário")}`,
1883
1955
  dataSource: C,
1884
1956
  dataField: "description",
1885
1957
  required: !0
@@ -1889,7 +1961,7 @@ function Qo({ opened: e, handleClose: o, userId: c, updateUser: r, options: s })
1889
1961
  }
1890
1962
  );
1891
1963
  }
1892
- const zo = mr((e) => ({
1964
+ const qo = Sr((e) => ({
1893
1965
  nameStore: "ADMIN_STORE",
1894
1966
  openedTabs: [],
1895
1967
  activeTabId: void 0,
@@ -1899,36 +1971,36 @@ const zo = mr((e) => ({
1899
1971
  setCollapsed: (o) => e({ collapsed: o })
1900
1972
  }));
1901
1973
  export {
1902
- SA as ArchbaseAdminLayoutContext,
1903
- Co as ArchbaseAdminLayoutFooter,
1904
- vo as ArchbaseAdminLayoutHeader,
1905
- Cr as ArchbaseAdminLayoutProvider,
1906
- yo as ArchbaseAdminMainLayout,
1907
- Ro as ArchbaseAdminTabContainer,
1908
- YA as ArchbaseAdvancedSidebar,
1909
- Dr as ArchbaseAliveAbleRoutes,
1910
- vr as ArchbaseChangeLanguageAction,
1911
- wr as ArchbaseColorSchemeAction,
1912
- Do as ArchbaseDrawerContent,
1913
- Oo as ArchbaseDrawerTrigger,
1914
- xr as ArchbaseHeaderNavAction,
1915
- xA as ArchbaseKeepAliveRoute,
1916
- Qo as ArchbaseMyProfileModal,
1917
- ie as ArchbaseNavigationContext,
1918
- Eo as ArchbaseNavigationProvider,
1919
- Er as CommandPaletteButton,
1920
- Po as SidebarErrorMessage,
1921
- Io as SidebarGroupsSkeleton,
1922
- To as SidebarMenuSkeleton,
1923
- Sr as defaultAvatar,
1924
- Zr as defaultMyProfileModalOptions,
1925
- Lo as navigationDataSample,
1926
- zo as useArchbaseAdminStore,
1927
- Wr as useArchbaseDrawer,
1928
- le as useArchbaseNavigationContext,
1929
- So as useArchbaseNavigationListener,
1930
- wo as useArchbaseRouteParams,
1931
- se as useKeepAliveCache,
1932
- ko as useKeepAliveVisibility,
1933
- xo as useParams
1974
+ OA as ArchbaseAdminLayoutContext,
1975
+ Lo as ArchbaseAdminLayoutFooter,
1976
+ Io as ArchbaseAdminLayoutHeader,
1977
+ Rr as ArchbaseAdminLayoutProvider,
1978
+ Oo as ArchbaseAdminMainLayout,
1979
+ Mo as ArchbaseAdminTabContainer,
1980
+ Ae as ArchbaseAdvancedSidebar,
1981
+ qr as ArchbaseAliveAbleRoutes,
1982
+ Lr as ArchbaseChangeLanguageAction,
1983
+ Tr as ArchbaseColorSchemeAction,
1984
+ No as ArchbaseDrawerContent,
1985
+ Uo as ArchbaseDrawerTrigger,
1986
+ Dr as ArchbaseHeaderNavAction,
1987
+ TA as ArchbaseKeepAliveRoute,
1988
+ Fo as ArchbaseMyProfileModal,
1989
+ fe as ArchbaseNavigationContext,
1990
+ zo as ArchbaseNavigationProvider,
1991
+ Or as CommandPaletteButton,
1992
+ _A as SidebarErrorMessage,
1993
+ Nr as SidebarGroupsSkeleton,
1994
+ ZA as SidebarMenuSkeleton,
1995
+ zr as defaultAvatar,
1996
+ so as defaultMyProfileModalOptions,
1997
+ $o as navigationDataSample,
1998
+ qo as useArchbaseAdminStore,
1999
+ ao as useArchbaseDrawer,
2000
+ ge as useArchbaseNavigationContext,
2001
+ Qo as useArchbaseNavigationListener,
2002
+ Do as useArchbaseRouteParams,
2003
+ pe as useKeepAliveCache,
2004
+ To as useKeepAliveVisibility,
2005
+ Po as useParams
1934
2006
  };