@archbase/admin 4.0.44 → 4.0.45

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,18 +1,18 @@
1
1
  import { jsx as r, jsxs as R, Fragment as Pe } from "react/jsx-runtime";
2
2
  import * as GA from "react";
3
- import Se, { useState as ge, useRef as _, useEffect as te, useMemo as ce, useContext as ve, useCallback as w, createContext as Ne, memo as BA, Fragment as UA, useLayoutEffect as kr, useImperativeHandle as xr, startTransition as nA, useReducer as Ir, useSyncExternalStore as Tr } from "react";
3
+ import xe, { useState as ge, useRef as _, useEffect as oe, useMemo as ce, useContext as ve, useCallback as S, createContext as Ne, memo as BA, Fragment as UA, useLayoutEffect as kr, useImperativeHandle as xr, startTransition as nA, useReducer as Ir, useSyncExternalStore as Tr } from "react";
4
4
  import { useArchbaseSecurityManager as Er } from "@archbase/security";
5
5
  import { useUncontrolled as aA, useMediaQuery as PA, useHotkeys as Rr, useDisclosure as Pr, useFocusTrap as Lr, useForceUpdate as Mr } from "@mantine/hooks";
6
6
  import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as De, Group as Le, Tooltip as Me, Button as Dr, ScrollArea as ze, Badge as pA, Center as Je, Image as Nr, useMantineTheme as me, px as fe, Burger as zr, Box as B, Avatar as iA, Text as Te, Stack as J, Skeleton as pe, Paper as Or, NavLink as LA, Kbd as HA, UnstyledButton as cA, Collapse as $r, TextInput as YA, Indicator as Qr, Transition as Kr, Divider as dA, AppShell as Be, Drawer as qA } from "@mantine/core";
7
7
  import { IconSun as jA, IconMoonStars as XA, IconTerminal as Fr, IconSearch as _e, IconAlertCircle as Vr, IconDots as JA, IconChevronRight as gA, IconChevronDown as Gr, IconX as _A, IconChevronLeft as Br, IconHome2 as Ur, IconDashboard as Hr, IconUsers as Yr, IconListSearch as WA, IconUserPlus as qr, IconNews as jr, IconFilePlus as Xr, IconSettings as Jr } from "@tabler/icons-react";
8
- import { useArchbaseAppContext as bA, getI18nextInstance as oe, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as _r, ARCHBASE_IOC_API_TYPE as Wr } from "@archbase/core";
8
+ import { useArchbaseAppContext as bA, getI18nextInstance as ne, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as _r, ARCHBASE_IOC_API_TYPE as Wr } from "@archbase/core";
9
9
  import { BRFlag as He, USFlag as ZA, ESFlag as uA, VEFlag as Zr, UYFlag as et, SVFlag as At, PYFlag as rt, PEFlag as tt, PAFlag as ot, NIFlag as nt, MXFlag as st, HNFlag as lt, GTFlag as at, ECFlag as it, DOFlag as ct, CUFlag as dt, CRFlag as ut, COFlag as ht, CLFlag as ft, BOFlag as pt, ARFlag as gt } from "mantine-flagpack";
10
10
  import { spotlight as bt, Spotlight as Ue } from "@mantine/spotlight";
11
11
  import { useNavigate as qe, useLocation as je, matchPath as MA } from "react-router";
12
12
  import { useLocation as Xe, useOutlet as mt, matchPath as yt, Route as Ke, Routes as er, useParams as Ar, useNavigationType as vt, UNSAFE_LocationContext as Ct, useSearchParams as rr, useNavigate as wt } from "react-router-dom";
13
13
  import { useMediaQuery as St } from "usehooks-ts";
14
14
  import { useArchbaseNavigateParams as kt, useArchbaseVisible as xt, ArchbaseNotifications as It, ArchbaseAvatarEdit as Tt, ArchbaseEdit as sA } from "@archbase/components";
15
- import { SubMenu as Et, MenuItem as DA, menuClasses as re, Sidebar as tr, Menu as or, sidebarClasses as nr } from "react-pro-sidebar";
15
+ import { SubMenu as Et, MenuItem as DA, menuClasses as te, Sidebar as tr, Menu as or, sidebarClasses as nr } from "react-pro-sidebar";
16
16
  import { createPortal as Rt } from "react-dom";
17
17
  import Pt from "@rehooks/component-size";
18
18
  import { ArchbaseAdvancedTabs as Lt } from "@archbase/layout";
@@ -21,7 +21,7 @@ import { persist as Dt } from "zustand/middleware";
21
21
  import { useArchbaseStore as Nt, useArchbaseRemoteServiceApi as zt, useArchbaseRemoteDataSource as Ot } from "@archbase/data";
22
22
  import { ArchbaseFormModalTemplate as $t } from "@archbase/template";
23
23
  import { createStore as Qt } from "zustand/vanilla";
24
- const rA = Se.createContext({}), Kt = ({
24
+ const rA = xe.createContext({}), Kt = ({
25
25
  navigationData: A,
26
26
  user: t,
27
27
  owner: o,
@@ -30,114 +30,114 @@ const rA = Se.createContext({}), Kt = ({
30
30
  children: s,
31
31
  enableSecurity: a,
32
32
  securityOptions: l,
33
- onNavigationDataChange: d,
34
- initialSidebarCollapsed: c
33
+ onNavigationDataChange: i,
34
+ initialSidebarCollapsed: h
35
35
  }) => {
36
- const [u, i] = ge(c), [h, p] = ge(!1), [b, C] = ge(() => a === !0), [m, g] = ge(null), f = _(!1), [S, k] = aA({
37
- value: d !== void 0 ? A : void 0,
36
+ const [c, d] = ge(h), [u, p] = ge(!1), [C, b] = ge(() => a === !0), [m, g] = ge(null), f = _(!1), [I, T] = aA({
37
+ value: i !== void 0 ? A : void 0,
38
38
  defaultValue: a ? [] : A,
39
39
  finalValue: [],
40
- onChange: d
40
+ onChange: i
41
41
  });
42
- te(() => {
43
- }, [S, a]);
44
- const { securityManager: D } = Er({
42
+ oe(() => {
43
+ }, [I, a]);
44
+ const { securityManager: L } = Er({
45
45
  resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
46
46
  resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
47
47
  enableSecurity: a
48
48
  });
49
- return te(() => {
49
+ return oe(() => {
50
50
  f.current = !1;
51
- }, [t?.id]), te(() => {
51
+ }, [t?.id]), oe(() => {
52
52
  if (!a) {
53
- C(!1);
53
+ b(!1);
54
54
  return;
55
55
  }
56
56
  if (f.current)
57
57
  return;
58
58
  A.filter((P) => P.showInSidebar).forEach((P) => {
59
- D.registerAction(P.label, P.label), P?.links?.forEach((y) => D.registerAction(`${P.label} -> ${y.label}`, `${P.label} -> ${y.label}`));
59
+ L.registerAction(P.label, P.label), P?.links?.forEach((v) => L.registerAction(`${P.label} -> ${v.label}`, `${P.label} -> ${v.label}`));
60
60
  });
61
- const z = () => {
61
+ const F = () => {
62
62
  f.current = !0;
63
- const P = A.map((y) => ({
64
- ...y,
65
- disabled: !D.hasPermission(y.label),
66
- links: y.links && y.links.map((V) => {
67
- const E = D.hasPermission(`${y.label} -> ${V.label}`);
63
+ const P = A.map((v) => ({
64
+ ...v,
65
+ disabled: !L.hasPermission(v.label),
66
+ links: v.links && v.links.map((K) => {
67
+ const E = L.hasPermission(`${v.label} -> ${K.label}`);
68
68
  return {
69
- ...V,
69
+ ...K,
70
70
  disabled: !E
71
71
  };
72
72
  })
73
73
  }));
74
- k(P), C(!1), g(null);
75
- }, U = !D.isLoading() && !D.isError();
76
- if (D.isError()) {
74
+ T(P), b(!1), g(null);
75
+ }, U = !L.isLoading() && !L.isError();
76
+ if (L.isError()) {
77
77
  f.current = !0;
78
- const P = D.getError() || "Erro ao carregar permissões de navegação";
79
- g(P), C(!1), k(A);
78
+ const P = L.getError() || "Erro ao carregar permissões de navegação";
79
+ g(P), b(!1), T(A);
80
80
  return;
81
81
  }
82
82
  if (U) {
83
- z();
83
+ F();
84
84
  return;
85
85
  }
86
- C(!0), g(null);
87
- let $ = !1;
88
- const M = setInterval(() => {
89
- if (!$ && D.isError()) {
90
- clearInterval(M), f.current = !0;
91
- const P = D.getError() || "Erro ao carregar permissões de navegação";
92
- g(P), C(!1), k(A);
86
+ b(!0), g(null);
87
+ let O = !1;
88
+ const D = setInterval(() => {
89
+ if (!O && L.isError()) {
90
+ clearInterval(D), f.current = !0;
91
+ const P = L.getError() || "Erro ao carregar permissões de navegação";
92
+ g(P), b(!1), T(A);
93
93
  }
94
- }, 100), F = setTimeout(() => {
95
- $ || (clearInterval(M), C((P) => P && (f.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), k(A), !1)));
94
+ }, 100), Q = setTimeout(() => {
95
+ O || (clearInterval(D), b((P) => P && (f.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), T(A), !1)));
96
96
  }, 3e3);
97
- return D.apply(() => {
98
- $ || (clearInterval(M), clearTimeout(F), z());
97
+ return L.apply(() => {
98
+ O || (clearInterval(D), clearTimeout(Q), F());
99
99
  }), () => {
100
- $ = !0, clearInterval(M), clearTimeout(F);
100
+ O = !0, clearInterval(D), clearTimeout(Q);
101
101
  };
102
- }, [t?.id, a, A, D, k]), /* @__PURE__ */ r(
102
+ }, [t?.id, a, A, L, T]), /* @__PURE__ */ r(
103
103
  rA.Provider,
104
104
  {
105
105
  value: {
106
- navigationData: S,
107
- setNavigationData: k,
106
+ navigationData: I,
107
+ setNavigationData: T,
108
108
  user: t,
109
109
  owner: o,
110
110
  company: e,
111
111
  navigationRootLink: n,
112
- collapsed: u,
113
- setCollapsed: i,
114
- hidden: h,
112
+ collapsed: c,
113
+ setCollapsed: d,
114
+ hidden: u,
115
115
  setHidden: p,
116
- onNavigationDataChange: d,
117
- isLoadingPermissions: b,
116
+ onNavigationDataChange: i,
117
+ isLoadingPermissions: C,
118
118
  permissionsError: m
119
119
  },
120
120
  children: s
121
121
  }
122
122
  );
123
123
  }, Rn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ft = () => {
124
- const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(oe().language);
125
- te(() => {
126
- const d = (c) => {
127
- n(c);
124
+ const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(ne().language);
125
+ oe(() => {
126
+ const i = (h) => {
127
+ n(h);
128
128
  };
129
- return oe().on("languageChanged", d), () => {
130
- oe().off("languageChanged", d);
129
+ return ne().on("languageChanged", i), () => {
130
+ ne().off("languageChanged", i);
131
131
  };
132
132
  }, []);
133
- const s = (d) => {
134
- if (!d)
133
+ const s = (i) => {
134
+ if (!i)
135
135
  return /* @__PURE__ */ r(He, { size: 24 });
136
- if (d === "en" || d === "en-US")
136
+ if (i === "en" || i === "en-US")
137
137
  return /* @__PURE__ */ r(ZA, { size: 24 });
138
- if (d === "pt-BR")
138
+ if (i === "pt-BR")
139
139
  return /* @__PURE__ */ r(He, { size: 24 });
140
- if (d.includes("es"))
140
+ if (i.includes("es"))
141
141
  switch (navigator.language || navigator.languages[0]) {
142
142
  case "es":
143
143
  case "es-ES":
@@ -184,20 +184,20 @@ const rA = Se.createContext({}), Kt = ({
184
184
  return /* @__PURE__ */ r(He, { size: 24 });
185
185
  }, a = () => {
186
186
  if (A.languages)
187
- return A.languages.filter((d) => d).map((d) => /* @__PURE__ */ r(
187
+ return A.languages.filter((i) => i).map((i) => /* @__PURE__ */ r(
188
188
  ie.Item,
189
189
  {
190
- onClick: () => l(d.lang),
191
- leftSection: s(d.lang),
192
- children: d.name
190
+ onClick: () => l(i.lang),
191
+ leftSection: s(i.lang),
192
+ children: i.name
193
193
  },
194
- d.name
194
+ i.name
195
195
  ));
196
- }, l = (d) => {
197
- oe().changeLanguage(d);
196
+ }, l = (i) => {
197
+ ne().changeLanguage(i);
198
198
  };
199
199
  return /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", children: [
200
- /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title: oe().t("toggleLanguage"), children: s(e) }) }),
200
+ /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title: ne().t("toggleLanguage"), children: s(e) }) }),
201
201
  /* @__PURE__ */ r(ie.Dropdown, { children: a() })
202
202
  ] });
203
203
  }, Vt = () => {
@@ -226,7 +226,7 @@ const rA = Se.createContext({}), Kt = ({
226
226
  variant: "transparent",
227
227
  fw: 400,
228
228
  gap: 4,
229
- title: oe().t("archbase:toggleLanguage"),
229
+ title: ne().t("archbase:toggleLanguage"),
230
230
  children: [
231
231
  n(e.language),
232
232
  `${A.languages.find((l) => l.lang === e.language)?.name ?? "Português"}`
@@ -249,7 +249,7 @@ const rA = Se.createContext({}), Kt = ({
249
249
  variant: "transparent",
250
250
  color: l ? t : o,
251
251
  onClick: () => a(),
252
- title: oe().t("archbase:toggleColorScheme"),
252
+ title: ne().t("archbase:toggleColorScheme"),
253
253
  children: l ? /* @__PURE__ */ r(jA, { size: "1.5rem" }) : /* @__PURE__ */ r(XA, { size: "1.5rem" })
254
254
  }
255
255
  );
@@ -259,55 +259,55 @@ function Ut({ category: A, label: t, color: o, description: e, image: n, onClick
259
259
  Ue.Action,
260
260
  {
261
261
  onClick: s,
262
- label: `${oe().t(t || "")}`,
263
- description: e ? oe().t(e) : void 0,
264
- leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Nr, { src: n, alt: oe().t(t || ""), width: 24, height: 24 }) }) : void 0,
265
- rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children: oe().t(A) }) : void 0
262
+ label: `${ne().t(t || "")}`,
263
+ description: e ? ne().t(e) : void 0,
264
+ leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Nr, { src: n, alt: ne().t(t || ""), width: 24, height: 24 }) }) : void 0,
265
+ rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children: ne().t(A) }) : void 0
266
266
  },
267
267
  t
268
268
  );
269
269
  }
270
270
  const Ht = ({ navigationData: A, color: t }) => {
271
271
  const [o, e] = ge(""), n = qe(), { t: s } = mA(), a = ce(() => {
272
- const d = new Array();
273
- return A.forEach((c) => {
274
- c.links ? c.links.forEach((u) => {
275
- !u.disabled && u.showInSidebar && d.push({
276
- id: u.label,
277
- category: u.category ? u.category.toUpperCase() : "",
278
- color: u.color,
279
- label: u.label,
280
- link: u.link,
272
+ const i = new Array();
273
+ return A.forEach((h) => {
274
+ h.links ? h.links.forEach((c) => {
275
+ !c.disabled && c.showInSidebar && i.push({
276
+ id: c.label,
277
+ category: c.category ? c.category.toUpperCase() : "",
278
+ color: c.color,
279
+ label: c.label,
280
+ link: c.link,
281
281
  onClick: () => {
282
- u.link && n(u.link);
282
+ c.link && n(c.link);
283
283
  }
284
284
  });
285
- }) : !c.disabled && c.showInSidebar && d.push({
286
- id: c.label,
285
+ }) : !h.disabled && h.showInSidebar && i.push({
286
+ id: h.label,
287
287
  onClick: () => {
288
- c.link && n(c.link);
288
+ h.link && n(h.link);
289
289
  },
290
- category: c.category ? c.category.toUpperCase() : "",
291
- color: c.color,
292
- label: c.label,
293
- link: c.link
290
+ category: h.category ? h.category.toUpperCase() : "",
291
+ color: h.color,
292
+ label: h.label,
293
+ link: h.link
294
294
  });
295
- }), d;
296
- }, [A, n]), l = a.filter((d) => {
297
- const c = `${s(d.label || "")}`;
298
- return c && c.toLowerCase().includes(o.toLowerCase().trim());
299
- }).map((d) => /* @__PURE__ */ r(Ut, { ...d }, d.id));
295
+ }), i;
296
+ }, [A, n]), l = a.filter((i) => {
297
+ const h = `${s(i.label || "")}`;
298
+ return h && h.toLowerCase().includes(o.toLowerCase().trim());
299
+ }).map((i) => /* @__PURE__ */ r(Ut, { ...i }, i.id));
300
300
  return /* @__PURE__ */ r(Pe, { children: a && a.length > 0 ? /* @__PURE__ */ R(Pe, { children: [
301
301
  /* @__PURE__ */ r(Me, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Dr, { color: t, leftSection: /* @__PURE__ */ r(Fr, { size: "24px" }), onClick: () => bt.open() }) }),
302
302
  /* @__PURE__ */ R(
303
303
  Ue.Root,
304
304
  {
305
305
  shortcut: ["mod + M", "/"],
306
- onQueryChange: (d) => e(d),
306
+ onQueryChange: (i) => e(i),
307
307
  query: o,
308
308
  children: [
309
309
  /* @__PURE__ */ r(Ue.Search, { placeholder: `${s("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ r(_e, { size: "1.2rem" }) }),
310
- /* @__PURE__ */ r(ze.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Ue.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Ue.Empty, { children: oe().t("archbase:Nenhum resultado...") }) }) })
310
+ /* @__PURE__ */ r(ze.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Ue.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Ue.Empty, { children: ne().t("archbase:Nenhum resultado...") }) }) })
311
311
  ]
312
312
  }
313
313
  )
@@ -321,37 +321,37 @@ const Ht = ({ navigationData: A, color: t }) => {
321
321
  userMenuItemsAfterToggleColorScheme: s,
322
322
  showMenuItemsBeforeToggleColorScheme: a = !0,
323
323
  userMenuItemsBeforeToggleColorScheme: l,
324
- hideAutoHeaderActionsOnUserMenu: d = !0,
325
- showHeaderActions: c = !0,
326
- showHeaderToggleColorScheme: u = !0,
327
- hideAutoHeaderActionsOnUserMenuBreakPoint: i,
328
- withDividerAfterUserMenuToggleColorScheme: h = !0,
324
+ hideAutoHeaderActionsOnUserMenu: i = !0,
325
+ showHeaderActions: h = !0,
326
+ showHeaderToggleColorScheme: c = !0,
327
+ hideAutoHeaderActionsOnUserMenuBreakPoint: d,
328
+ withDividerAfterUserMenuToggleColorScheme: u = !0,
329
329
  user: p,
330
- navigationData: b = [],
331
- logo: C,
330
+ navigationData: C = [],
331
+ logo: b,
332
332
  headerActions: m,
333
333
  styleLogo: g,
334
334
  showLanguageSelector: f = !1,
335
- sideBarHiddenBreakPoint: S,
336
- headerLeftContent: k,
337
- toggleColorScheme: D,
338
- logoLeftSection: j,
339
- logoRightSection: z,
335
+ sideBarHiddenBreakPoint: I,
336
+ headerLeftContent: T,
337
+ toggleColorScheme: L,
338
+ logoLeftSection: X,
339
+ logoRightSection: F,
340
340
  showBurger: U = !0,
341
- showCommands: O = !0,
342
- sunColor: $,
343
- moonColor: M,
344
- styles: F
341
+ showCommands: M = !0,
342
+ sunColor: O,
343
+ moonColor: D,
344
+ styles: Q
345
345
  }) => {
346
- const P = me(), { colorScheme: y, toggleColorScheme: V } = de(), E = ve(rA), W = PA(
347
- `(max-width: ${S ? fe(S) : P.breakpoints.md})`
348
- ), H = PA(
349
- `(max-width: ${i ? fe(i) : P.breakpoints.md})`
346
+ const P = me(), { colorScheme: v, toggleColorScheme: K } = de(), E = ve(rA), W = PA(
347
+ `(max-width: ${I ? fe(I) : P.breakpoints.md})`
348
+ ), G = PA(
349
+ `(max-width: ${d ? fe(d) : P.breakpoints.md})`
350
350
  );
351
- let I = !1, G = !1;
352
- return d && (c = !H, u = !H, t = H, o = H, a = H, h = H, f && (G = !H, I = H)), /* @__PURE__ */ R(Pe, { children: [
351
+ let x = !1, V = !1;
352
+ return i && (h = !G, c = !G, t = G, o = G, a = G, u = G, f && (V = !G, x = G)), /* @__PURE__ */ R(Pe, { children: [
353
353
  /* @__PURE__ */ R(Ye, { style: { width: 300, height: 50 }, align: "center", children: [
354
- j,
354
+ X,
355
355
  /* @__PURE__ */ r(
356
356
  "img",
357
357
  {
@@ -360,10 +360,10 @@ const Ht = ({ navigationData: A, color: t }) => {
360
360
  ...g
361
361
  },
362
362
  alt: "logo",
363
- src: C
363
+ src: b
364
364
  }
365
365
  ),
366
- z
366
+ F
367
367
  ] }),
368
368
  U && /* @__PURE__ */ r(
369
369
  zr,
@@ -376,13 +376,13 @@ const Ht = ({ navigationData: A, color: t }) => {
376
376
  display: W ? "" : "none"
377
377
  }
378
378
  ),
379
- /* @__PURE__ */ r("div", { children: O && /* @__PURE__ */ r(Ht, { navigationData: b }) }),
380
- /* @__PURE__ */ r(B, { style: { flex: 1 }, children: k }),
379
+ /* @__PURE__ */ r("div", { children: M && /* @__PURE__ */ r(Ht, { navigationData: C }) }),
380
+ /* @__PURE__ */ r(B, { style: { flex: 1 }, children: T }),
381
381
  /* @__PURE__ */ R(Bt, { children: [
382
- c && m,
383
- u && /* @__PURE__ */ r(Gt, { toggleColorScheme: D, sunColor: $, moonColor: M }),
384
- G && /* @__PURE__ */ r(Ft, {}),
385
- /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: F?.menu, children: [
382
+ h && m,
383
+ c && /* @__PURE__ */ r(Gt, { toggleColorScheme: L, sunColor: O, moonColor: D }),
384
+ V && /* @__PURE__ */ r(Ft, {}),
385
+ /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: Q?.menu, children: [
386
386
  /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R("div", { children: [
387
387
  /* @__PURE__ */ r(
388
388
  iA,
@@ -417,26 +417,26 @@ const Ht = ({ navigationData: A, color: t }) => {
417
417
  ] }) }),
418
418
  /* @__PURE__ */ R(ie.Dropdown, { children: [
419
419
  A,
420
- o && /* @__PURE__ */ r(ie.Label, { children: `${oe().t("archbase:Opções")}` }),
420
+ o && /* @__PURE__ */ r(ie.Label, { children: `${ne().t("archbase:Opções")}` }),
421
421
  a && l,
422
422
  t && /* @__PURE__ */ r(
423
423
  ie.Item,
424
424
  {
425
- leftSection: y === "dark" ? /* @__PURE__ */ r(jA, { size: e }) : /* @__PURE__ */ r(XA, { size: e }),
426
- onClick: D || V,
427
- children: `${oe().t("archbase:toggleColorScheme")}`
425
+ leftSection: v === "dark" ? /* @__PURE__ */ r(jA, { size: e }) : /* @__PURE__ */ r(XA, { size: e }),
426
+ onClick: L || K,
427
+ children: `${ne().t("archbase:toggleColorScheme")}`
428
428
  }
429
429
  ),
430
- I && /* @__PURE__ */ r(Vt, {}),
431
- h && /* @__PURE__ */ r(ie.Divider, {}),
430
+ x && /* @__PURE__ */ r(Vt, {}),
431
+ u && /* @__PURE__ */ r(ie.Divider, {}),
432
432
  n && s
433
433
  ] })
434
434
  ] })
435
435
  ] })
436
436
  ] });
437
437
  };
438
- function NA(A, t, o, e, n, s, a, l, d, c) {
439
- const u = s ? A.colorScheme === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][7] : void 0, i = s ? (A.colorScheme === "dark", A.colors[A.primaryColor][0]) : void 0, h = A.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
438
+ function NA(A, t, o, e, n, s, a, l, i, h) {
439
+ const c = s ? A.colorScheme === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][7] : void 0, d = s ? (A.colorScheme === "dark", A.colors[A.primaryColor][0]) : void 0, u = A.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
440
440
  if (e.links) {
441
441
  if (!(e.disabled && e.hideDisabledItem))
442
442
  return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
@@ -444,26 +444,26 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
444
444
  {
445
445
  rootStyles: {
446
446
  fontSize: "16px",
447
- [`.${re.button}`]: {
447
+ [`.${te.button}`]: {
448
448
  "&:hover": {
449
- [`.${re.icon}`]: {
449
+ [`.${te.icon}`]: {
450
450
  color: "white"
451
451
  },
452
- [`.${re.label}`]: {
452
+ [`.${te.label}`]: {
453
453
  color: "white"
454
454
  }
455
455
  }
456
456
  },
457
- [`.${re.subMenuContent}`]: {
458
- width: t && c
457
+ [`.${te.subMenuContent}`]: {
458
+ width: t && h
459
459
  },
460
- [`.${re.disabled}`]: {
460
+ [`.${te.disabled}`]: {
461
461
  opacity: p,
462
- [`.${re.icon}`]: {
463
- color: h + " !important"
462
+ [`.${te.icon}`]: {
463
+ color: u + " !important"
464
464
  },
465
- [`.${re.label}`]: {
466
- color: h + " !important"
465
+ [`.${te.label}`]: {
466
+ color: u + " !important"
467
467
  }
468
468
  }
469
469
  },
@@ -472,47 +472,47 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
472
472
  defaultOpen: !e.disabled,
473
473
  label: t ? "" : Re.t(e.label),
474
474
  disabled: e.disabled,
475
- children: e.links && e.links.filter((b) => b.showInSidebar === !0 && (!b.disabled || !b.hideDisabledItem)).map((b, C) => /* @__PURE__ */ r(
475
+ children: e.links && e.links.filter((C) => C.showInSidebar === !0 && (!C.disabled || !C.hideDisabledItem)).map((C, b) => /* @__PURE__ */ r(
476
476
  DA,
477
477
  {
478
- onClick: () => o(b),
478
+ onClick: () => o(C),
479
479
  rootStyles: {
480
- [`.${re.icon}`]: {
481
- background: u,
482
- color: l && b.link === a ? "white" : i
480
+ [`.${te.icon}`]: {
481
+ background: c,
482
+ color: l && C.link === a ? "white" : d
483
483
  },
484
- [`.${re.label}`]: {
485
- color: l && b.link === a ? "white" : d
484
+ [`.${te.label}`]: {
485
+ color: l && C.link === a ? "white" : i
486
486
  },
487
- [`.${re.button}`]: {
487
+ [`.${te.button}`]: {
488
488
  paddingLeft: "40px !important",
489
489
  "&:hover": {
490
- [`.${re.icon}`]: {
490
+ [`.${te.icon}`]: {
491
491
  color: "white"
492
492
  },
493
- [`.${re.label}`]: {
493
+ [`.${te.label}`]: {
494
494
  color: "white"
495
495
  }
496
496
  }
497
497
  },
498
- [`.${re.disabled}`]: {
498
+ [`.${te.disabled}`]: {
499
499
  opacity: p,
500
- [`.${re.icon}`]: {
501
- background: (u || "") + " !important",
502
- color: h + " !important"
500
+ [`.${te.icon}`]: {
501
+ background: (c || "") + " !important",
502
+ color: u + " !important"
503
503
  },
504
- [`.${re.label}`]: {
505
- color: h + " !important"
504
+ [`.${te.label}`]: {
505
+ color: u + " !important"
506
506
  }
507
507
  }
508
508
  },
509
- id: b.label,
510
- icon: b.icon,
511
- disabled: typeof b.disabled == "function" ? b.disabled() : b.disabled,
512
- active: l && b.link === a,
513
- children: Re.t(b.label)
509
+ id: C.label,
510
+ icon: C.icon,
511
+ disabled: typeof C.disabled == "function" ? C.disabled() : C.disabled,
512
+ active: l && C.link === a,
513
+ children: Re.t(C.label)
514
514
  },
515
- C
515
+ b
516
516
  ))
517
517
  },
518
518
  n
@@ -523,31 +523,31 @@ function NA(A, t, o, e, n, s, a, l, d, c) {
523
523
  {
524
524
  rootStyles: {
525
525
  fontSize: "16px",
526
- [`.${re.button}`]: {
526
+ [`.${te.button}`]: {
527
527
  "&:hover": {
528
- [`.${re.icon}`]: {
528
+ [`.${te.icon}`]: {
529
529
  color: "white"
530
530
  },
531
- [`.${re.label}`]: {
531
+ [`.${te.label}`]: {
532
532
  color: "white"
533
533
  }
534
534
  }
535
535
  },
536
- [`.${re.icon}`]: {
537
- background: u,
538
- color: l && e.link === a ? "white" : i
539
- },
540
- [`.${re.label}`]: {
536
+ [`.${te.icon}`]: {
537
+ background: c,
541
538
  color: l && e.link === a ? "white" : d
542
539
  },
543
- [`.${re.disabled}`]: {
540
+ [`.${te.label}`]: {
541
+ color: l && e.link === a ? "white" : i
542
+ },
543
+ [`.${te.disabled}`]: {
544
544
  opacity: p,
545
- [`.${re.icon}`]: {
546
- background: (u || "") + " !important",
547
- color: h + " !important"
545
+ [`.${te.icon}`]: {
546
+ background: (c || "") + " !important",
547
+ color: u + " !important"
548
548
  },
549
- [`.${re.label}`]: {
550
- color: h + " !important"
549
+ [`.${te.label}`]: {
550
+ color: u + " !important"
551
551
  }
552
552
  }
553
553
  },
@@ -597,20 +597,20 @@ const qt = (A) => ({
597
597
  }
598
598
  }
599
599
  }
600
- }), jt = (A, t, o, e, n, s, a, l, d, c, u) => {
601
- const i = qt(), h = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, b = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
600
+ }), jt = (A, t, o, e, n, s, a, l, i, h, c) => {
601
+ const d = qt(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, C = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
602
602
  return {
603
603
  root: {
604
604
  fontSize: "14px",
605
605
  fontWeight: 400,
606
- backgroundColor: d,
606
+ backgroundColor: i,
607
607
  color: t.white
608
608
  },
609
609
  icon: {
610
- background: b,
611
- color: u,
612
- [`&.${re.disabled}`]: {
613
- color: i[A].menu.disabled.color
610
+ background: C,
611
+ color: c,
612
+ [`&.${te.disabled}`]: {
613
+ color: d[A].menu.disabled.color
614
614
  }
615
615
  },
616
616
  SubMenuExpandIcon: {
@@ -621,29 +621,29 @@ const qt = (A) => ({
621
621
  backgroundColor: A === "dark" ? t.colors.dark[8] : t.colors[t.primaryColor][0]
622
622
  }),
623
623
  button: {
624
- [`&.${re.disabled}`]: {
625
- color: i[A].menu.disabled.color
624
+ [`&.${te.disabled}`]: {
625
+ color: d[A].menu.disabled.color
626
626
  },
627
627
  "&:hover": {
628
628
  backgroundColor: t.colors[t.primaryColor][6],
629
629
  color: t.white
630
630
  },
631
- [`&.${re.active}`]: {
631
+ [`&.${te.active}`]: {
632
632
  backgroundColor: t.colors[t.primaryColor][6]
633
633
  },
634
634
  height: l,
635
- ...h
635
+ ...u
636
636
  },
637
- label: ({ open: C }) => ({
638
- fontWeight: C ? 600 : void 0,
639
- color: c,
637
+ label: ({ open: b }) => ({
638
+ fontWeight: b ? 600 : void 0,
639
+ color: h,
640
640
  "&:hover": {
641
641
  color: t.white
642
642
  }
643
643
  })
644
644
  };
645
645
  };
646
- function Xt(A, t, o, e, n, s, a, l, d, c, u) {
646
+ function Xt(A, t, o, e, n, s, a, l, i, h, c) {
647
647
  return /* @__PURE__ */ R(
648
648
  tr,
649
649
  {
@@ -651,7 +651,7 @@ function Xt(A, t, o, e, n, s, a, l, d, c, u) {
651
651
  rootStyles: {
652
652
  [`.${nr.container}`]: {
653
653
  position: "absolute",
654
- background: u,
654
+ background: c,
655
655
  overflowX: "hidden",
656
656
  overflowY: "hidden",
657
657
  left: 0,
@@ -663,9 +663,9 @@ function Xt(A, t, o, e, n, s, a, l, d, c, u) {
663
663
  width: `${fe(o)}px`,
664
664
  collapsedWidth: `${fe(e)}px`,
665
665
  children: [
666
- d && /* @__PURE__ */ r(Pe, { children: d }),
667
- /* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(or, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
668
- c && /* @__PURE__ */ r(Pe, { children: c })
666
+ i && /* @__PURE__ */ r(Pe, { children: i }),
667
+ /* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(or, { rootStyles: { background: c }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
668
+ h && /* @__PURE__ */ r(Pe, { children: h })
669
669
  ]
670
670
  }
671
671
  );
@@ -747,7 +747,7 @@ function Jt({
747
747
  height: o,
748
748
  backgroundColor: a
749
749
  },
750
- children: Array.from({ length: A }).map((l, d) => /* @__PURE__ */ R(J, { gap: 4, align: "center", children: [
750
+ children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(J, { gap: 4, align: "center", children: [
751
751
  /* @__PURE__ */ r(
752
752
  pe,
753
753
  {
@@ -765,7 +765,7 @@ function Jt({
765
765
  radius: "xl"
766
766
  }
767
767
  )
768
- ] }, d))
768
+ ] }, i))
769
769
  }
770
770
  );
771
771
  }
@@ -789,52 +789,52 @@ function _t({
789
789
  selectedGroupColor: s,
790
790
  groupColor: a,
791
791
  backgroundGroupColor: l,
792
- isHidden: d = !1,
793
- sideBarFooterHeight: c,
794
- sideBarFooterContent: u,
795
- groupLabelDarkColor: i,
796
- groupLabelLightColor: h,
792
+ isHidden: i = !1,
793
+ sideBarFooterHeight: h,
794
+ sideBarFooterContent: c,
795
+ groupLabelDarkColor: d,
796
+ groupLabelLightColor: u,
797
797
  collapsed: p,
798
- onMenuItemClick: b,
799
- onClickActionIcon: C,
798
+ onMenuItemClick: C,
799
+ onClickActionIcon: b,
800
800
  withBorder: m = !1,
801
801
  showGroupLabels: g = !0,
802
802
  theme: f,
803
- sidebarRef: S,
804
- defaultGroupIcon: k,
805
- selectedGroupName: D,
806
- sideBarHeaderContent: j,
807
- iconsWithBackground: z = !1,
803
+ sidebarRef: I,
804
+ defaultGroupIcon: T,
805
+ selectedGroupName: L,
806
+ sideBarHeaderContent: X,
807
+ iconsWithBackground: F = !1,
808
808
  menuItemHeight: U = 40,
809
- highlightActiveMenuItem: O = !0,
810
- backgroundDarkColor: $,
811
- backgroundLightColor: M,
812
- textDarkColor: F,
809
+ highlightActiveMenuItem: M = !0,
810
+ backgroundDarkColor: O,
811
+ backgroundLightColor: D,
812
+ textDarkColor: Q,
813
813
  textLightColor: P,
814
- iconDarkColor: y,
815
- iconLightColor: V,
814
+ iconDarkColor: v,
815
+ iconLightColor: K,
816
816
  collapsedSubmenuWidth: E,
817
817
  isLoading: W = !1,
818
- loadingError: H,
819
- loadingComponent: I,
820
- errorComponent: G,
821
- skeletonItemCount: ne = 8,
822
- skeletonGroupCount: we = 3
818
+ loadingError: G,
819
+ loadingComponent: x,
820
+ errorComponent: V,
821
+ skeletonItemCount: se = 8,
822
+ skeletonGroupCount: Ce = 3
823
823
  }) {
824
- const [se, be] = ge(""), ke = bA(), T = je(), { colorScheme: v } = de(), Q = v === "dark" ? $ ?? f.colors.dark[7] : M ?? f.white, L = s || (v === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), x = v === "dark" ? F ?? "var(--mantine-color-text)" : P ?? "var(--mantine-color-text)", X = v === "dark" ? y ?? f.colors[f.primaryColor][0] : V ?? f.colors[f.primaryColor][7], N = ce(() => {
825
- const Ae = /* @__PURE__ */ new Set();
824
+ const [le, be] = ge(""), we = bA(), Se = je(), { colorScheme: w } = de(), k = w === "dark" ? O ?? f.colors.dark[7] : D ?? f.white, N = s || (w === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), y = w === "dark" ? Q ?? "var(--mantine-color-text)" : P ?? "var(--mantine-color-text)", H = w === "dark" ? v ?? f.colors[f.primaryColor][0] : K ?? f.colors[f.primaryColor][7], Y = ce(() => {
825
+ const re = /* @__PURE__ */ new Set();
826
826
  return A.forEach((q) => {
827
827
  if (q.showInSidebar && (!q.disabled || !q.hideDisabledItem)) {
828
828
  let ye = !1;
829
829
  q.group || (q.group = {
830
- icon: k || /* @__PURE__ */ r(JA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
830
+ icon: T || /* @__PURE__ */ r(JA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
831
831
  label: "Default",
832
832
  name: "Default",
833
833
  hint: "Default",
834
834
  indexOrder: 0
835
- }), Ae.forEach((K) => {
836
- K.name === q.group.name && (ye = !0);
837
- }), ye || Ae.add({
835
+ }), re.forEach(($) => {
836
+ $.name === q.group.name && (ye = !0);
837
+ }), ye || re.add({
838
838
  name: q.group.name,
839
839
  indexOrder: q.group.indexOrder,
840
840
  component: /* @__PURE__ */ r(
@@ -858,10 +858,10 @@ function _t({
858
858
  De,
859
859
  {
860
860
  size: "48px",
861
- variant: q.group.name === se ? "filled" : l ? "subtle" : "light",
862
- color: q.group.name === se ? L : a,
861
+ variant: q.group.name === le ? "filled" : l ? "subtle" : "light",
862
+ color: q.group.name === le ? N : a,
863
863
  onClick: () => {
864
- be((K) => (C && C(K, q.group.name), q.group.name === K && !d ? "" : q.group.name));
864
+ be(($) => (b && b($, q.group.name), q.group.name === $ && !i ? "" : q.group.name));
865
865
  },
866
866
  children: q.group.icon
867
867
  }
@@ -870,7 +870,7 @@ function _t({
870
870
  Te,
871
871
  {
872
872
  size: "xs",
873
- c: v === "dark" ? i || f.colors[f.primaryColor][2] : h || f.colors[f.primaryColor][2],
873
+ c: w === "dark" ? d || f.colors[f.primaryColor][2] : u || f.colors[f.primaryColor][2],
874
874
  children: q.group.label
875
875
  }
876
876
  ) : !1
@@ -882,59 +882,59 @@ function _t({
882
882
  )
883
883
  });
884
884
  }
885
- }), Ae.forEach((q) => {
886
- const ye = A.filter((K) => K.showInSidebar === !0 && (!K.disabled || !K.hideDisabledItem) && K.group && K.group.name === q.name);
887
- q.links = ye.map((K, ue) => NA(f, p, b, K, ue, z, T.pathname, O, x, E));
888
- }), [...Ae].sort((q, ye) => q.indexOrder - ye.indexOrder);
889
- }, [A, se, v, p, ke.selectedCompany, O, T]), Y = jt(
890
- v,
885
+ }), re.forEach((q) => {
886
+ const ye = A.filter(($) => $.showInSidebar === !0 && (!$.disabled || !$.hideDisabledItem) && $.group && $.group.name === q.name);
887
+ q.links = ye.map(($, ue) => NA(f, p, C, $, ue, F, Se.pathname, M, y, E));
888
+ }), [...re].sort((q, ye) => q.indexOrder - ye.indexOrder);
889
+ }, [A, le, w, p, we.selectedCompany, M, Se]), z = jt(
890
+ w,
891
891
  f,
892
892
  p,
893
893
  35,
894
894
  Number(fe(n)),
895
- N.length > 1,
896
- z,
895
+ Y.length > 1,
896
+ F,
897
897
  U,
898
- Q,
899
- x,
900
- X
901
- ), Ce = p || se === "" ? "0px" : `calc(${o} - ${t})`, le = l || (v === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), xe = w(() => {
902
- D && N.map((Ae) => Ae.name).includes(D) ? be(D) : N.length > 1 && be("Default");
898
+ k,
899
+ y,
900
+ H
901
+ ), j = p || le === "" ? "0px" : `calc(${o} - ${t})`, Z = l || (w === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), ke = S(() => {
902
+ L && Y.map((re) => re.name).includes(L) ? be(L) : Y.length > 1 && be("Default");
903
903
  }, []);
904
- te(() => {
905
- xe();
906
- }, []), te(() => {
907
- p ? be("") : se === "" && xe();
904
+ oe(() => {
905
+ ke();
906
+ }, []), oe(() => {
907
+ p ? be("") : le === "" && ke();
908
908
  }, [p]);
909
- const Z = () => H ? G || /* @__PURE__ */ r(
909
+ const ee = () => G ? V || /* @__PURE__ */ r(
910
910
  OA,
911
911
  {
912
- message: H,
913
- backgroundColor: Q
912
+ message: G,
913
+ backgroundColor: k
914
914
  }
915
- ) : W ? I || /* @__PURE__ */ r(
915
+ ) : W ? x || /* @__PURE__ */ r(
916
916
  zA,
917
917
  {
918
- itemCount: ne,
918
+ itemCount: se,
919
919
  collapsed: p,
920
- backgroundColor: Q
920
+ backgroundColor: k
921
921
  }
922
- ) : se !== "" ? /* @__PURE__ */ r(
922
+ ) : le !== "" ? /* @__PURE__ */ r(
923
923
  tr,
924
924
  {
925
- ref: S,
925
+ ref: I,
926
926
  rootStyles: {
927
927
  [`.${nr.container}`]: {
928
- background: Q,
928
+ background: k,
929
929
  overflowX: "hidden",
930
930
  overflowY: "hidden",
931
931
  left: 0,
932
932
  height: `${fe(e)}px`
933
933
  }
934
934
  },
935
- style: { borderColor: v === "dark" ? "#000" : "#efefef" },
935
+ style: { borderColor: w === "dark" ? "#000" : "#efefef" },
936
936
  collapsed: p,
937
- width: `${fe(Ce)}`,
937
+ width: `${fe(j)}`,
938
938
  collapsedWidth: "0px",
939
939
  children: /* @__PURE__ */ r(
940
940
  ze,
@@ -943,20 +943,20 @@ function _t({
943
943
  overflowY: "auto",
944
944
  overflowX: "hidden",
945
945
  height: "100%",
946
- width: Ce
946
+ width: j
947
947
  },
948
- children: /* @__PURE__ */ r(or, { rootStyles: { background: Q }, menuItemStyles: Y, closeOnClick: !0, children: N.find((Ae) => Ae.name === se)?.links || null })
948
+ children: /* @__PURE__ */ r(or, { rootStyles: { background: k }, menuItemStyles: z, closeOnClick: !0, children: Y.find((re) => re.name === le)?.links || null })
949
949
  }
950
950
  )
951
951
  }
952
- ) : null, Ie = () => W && N.length === 0 ? /* @__PURE__ */ r(
952
+ ) : null, Ie = () => W && Y.length === 0 ? /* @__PURE__ */ r(
953
953
  Jt,
954
954
  {
955
- groupCount: we,
955
+ groupCount: Ce,
956
956
  width: t,
957
957
  height: e
958
958
  }
959
- ) : N.length !== 0 ? /* @__PURE__ */ r(
959
+ ) : Y.length !== 0 ? /* @__PURE__ */ r(
960
960
  J,
961
961
  {
962
962
  gap: "4px",
@@ -964,45 +964,45 @@ function _t({
964
964
  height: e,
965
965
  width: t,
966
966
  padding: "4px",
967
- backgroundColor: le
967
+ backgroundColor: Z
968
968
  },
969
- children: N.map((Ae) => /* @__PURE__ */ r(Se.Fragment, { children: Ae.component }, Ae.name))
969
+ children: Y.map((re) => /* @__PURE__ */ r(xe.Fragment, { children: re.component }, re.name))
970
970
  }
971
- ) : null, ee = () => H ? G || /* @__PURE__ */ r(
971
+ ) : null, Ae = () => G ? V || /* @__PURE__ */ r(
972
972
  OA,
973
973
  {
974
- message: H,
975
- backgroundColor: Q
974
+ message: G,
975
+ backgroundColor: k
976
976
  }
977
- ) : W ? I || /* @__PURE__ */ r(
977
+ ) : W ? x || /* @__PURE__ */ r(
978
978
  zA,
979
979
  {
980
- itemCount: ne,
980
+ itemCount: se,
981
981
  collapsed: p,
982
- backgroundColor: Q
982
+ backgroundColor: k
983
983
  }
984
984
  ) : A.map(
985
- (Ae, Ee) => NA(f, p, b, Ae, Ee, z, T.pathname, O, x, E)
985
+ (re, Ee) => NA(f, p, C, re, Ee, F, Se.pathname, M, y, E)
986
986
  );
987
- return /* @__PURE__ */ r(Pe, { children: N.length == 1 ? Xt(
988
- S,
987
+ return /* @__PURE__ */ r(Pe, { children: Y.length == 1 ? Xt(
988
+ I,
989
989
  p,
990
990
  o,
991
991
  n,
992
- Y,
993
- ee(),
994
- d,
992
+ z,
993
+ Ae(),
994
+ i,
995
995
  e,
996
- j,
997
- u,
998
- Q
996
+ X,
997
+ c,
998
+ k
999
999
  ) : /* @__PURE__ */ R(Ye, { direction: "column", w: p ? n : o, children: [
1000
- /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: j }),
1000
+ /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: X }),
1001
1001
  /* @__PURE__ */ R(Or, { withBorder: m, h: e, w: "100%", display: "flex", children: [
1002
1002
  Ie(),
1003
- Z()
1003
+ ee()
1004
1004
  ] }),
1005
- /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: u })
1005
+ /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: c })
1006
1006
  ] }) });
1007
1007
  }
1008
1008
  const yA = Ne(null);
@@ -1024,12 +1024,12 @@ function CA({
1024
1024
  onCollapsedChange: s,
1025
1025
  defaultActiveGroup: a = "",
1026
1026
  activeGroup: l,
1027
- onActiveGroupChange: d,
1028
- showKeyboardShortcuts: c = !1,
1029
- highlightActiveItem: u = !0,
1030
- onMenuItemClick: i
1027
+ onActiveGroupChange: i,
1028
+ showKeyboardShortcuts: h = !1,
1029
+ highlightActiveItem: c = !0,
1030
+ onMenuItemClick: d
1031
1031
  }) {
1032
- const h = je(), p = qe(), [b, C] = aA({
1032
+ const u = je(), p = qe(), [C, b] = aA({
1033
1033
  value: n,
1034
1034
  defaultValue: e,
1035
1035
  finalValue: !1,
@@ -1038,84 +1038,84 @@ function CA({
1038
1038
  value: l,
1039
1039
  defaultValue: a,
1040
1040
  finalValue: "",
1041
- onChange: d
1042
- }), [f, S] = ge(""), [k, D] = ge(() => {
1043
- const y = /* @__PURE__ */ new Set();
1044
- return t.forEach((V, E) => {
1045
- V.initiallyOpened && V.links && V.links.length > 0 && y.add(`group-${E}`);
1046
- }), y;
1047
- }), j = h.pathname, z = w(() => {
1048
- C(!b);
1049
- }, [b, C]), U = w((y) => {
1050
- D((V) => {
1051
- const E = new Set(V);
1052
- return E.has(y) ? E.delete(y) : E.add(y), E;
1041
+ onChange: i
1042
+ }), [f, I] = ge(""), [T, L] = ge(() => {
1043
+ const v = /* @__PURE__ */ new Set();
1044
+ return t.forEach((K, E) => {
1045
+ K.initiallyOpened && K.links && K.links.length > 0 && v.add(`group-${E}`);
1046
+ }), v;
1047
+ }), X = u.pathname, F = S(() => {
1048
+ b(!C);
1049
+ }, [C, b]), U = S((v) => {
1050
+ L((K) => {
1051
+ const E = new Set(K);
1052
+ return E.has(v) ? E.delete(v) : E.add(v), E;
1053
1053
  });
1054
- }, []), O = w((y) => {
1055
- D((V) => {
1056
- const E = new Set(V);
1057
- return E.add(y), E;
1054
+ }, []), M = S((v) => {
1055
+ L((K) => {
1056
+ const E = new Set(K);
1057
+ return E.add(v), E;
1058
1058
  });
1059
- }, []), $ = w((y) => {
1060
- D((V) => {
1061
- const E = new Set(V);
1062
- return E.delete(y), E;
1059
+ }, []), O = S((v) => {
1060
+ L((K) => {
1061
+ const E = new Set(K);
1062
+ return E.delete(v), E;
1063
1063
  });
1064
- }, []), M = ce(() => {
1064
+ }, []), D = ce(() => {
1065
1065
  if (!f.trim())
1066
1066
  return t;
1067
- const y = f.toLowerCase().trim(), V = (E) => E.reduce((W, H) => {
1068
- const I = H.label.toLowerCase().includes(y), G = H.links ? V(H.links) : [];
1069
- return (I || G.length > 0) && W.push({
1070
- ...H,
1071
- links: G.length > 0 ? G : H.links,
1067
+ const v = f.toLowerCase().trim(), K = (E) => E.reduce((W, G) => {
1068
+ const x = G.label.toLowerCase().includes(v), V = G.links ? K(G.links) : [];
1069
+ return (x || V.length > 0) && W.push({
1070
+ ...G,
1071
+ links: V.length > 0 ? V : G.links,
1072
1072
  // Expandir automaticamente quando há match em subitens
1073
- initiallyOpened: G.length > 0 || I
1073
+ initiallyOpened: V.length > 0 || x
1074
1074
  }), W;
1075
1075
  }, []);
1076
- return V(t);
1077
- }, [t, f]), F = w(
1078
- (y) => {
1079
- i && i(y), y.link && (y.routeParams ? p(y.link, { state: y.routeParams }) : p(y.link)), y.redirect && p(y.redirect);
1076
+ return K(t);
1077
+ }, [t, f]), Q = S(
1078
+ (v) => {
1079
+ d && d(v), v.link && (v.routeParams ? p(v.link, { state: v.routeParams }) : p(v.link)), v.redirect && p(v.redirect);
1080
1080
  },
1081
- [p, i]
1081
+ [p, d]
1082
1082
  ), P = ce(
1083
1083
  () => ({
1084
- collapsed: b,
1085
- setCollapsed: C,
1086
- toggleCollapsed: z,
1084
+ collapsed: C,
1085
+ setCollapsed: b,
1086
+ toggleCollapsed: F,
1087
1087
  activeGroup: m,
1088
1088
  setActiveGroup: g,
1089
- activeItemPath: j,
1090
- navigateToItem: F,
1089
+ activeItemPath: X,
1090
+ navigateToItem: Q,
1091
1091
  searchQuery: f,
1092
- setSearchQuery: S,
1093
- filteredItems: M,
1094
- expandedGroups: k,
1092
+ setSearchQuery: I,
1093
+ filteredItems: D,
1094
+ expandedGroups: T,
1095
1095
  toggleGroup: U,
1096
- expandGroup: O,
1097
- collapseGroup: $,
1096
+ expandGroup: M,
1097
+ collapseGroup: O,
1098
1098
  variant: o,
1099
- showKeyboardShortcuts: c,
1100
- highlightActiveItem: u
1099
+ showKeyboardShortcuts: h,
1100
+ highlightActiveItem: c
1101
1101
  }),
1102
1102
  [
1103
- b,
1104
1103
  C,
1105
- z,
1104
+ b,
1105
+ F,
1106
1106
  m,
1107
1107
  g,
1108
- j,
1109
- F,
1108
+ X,
1109
+ Q,
1110
1110
  f,
1111
- M,
1112
- k,
1111
+ D,
1112
+ T,
1113
1113
  U,
1114
+ M,
1114
1115
  O,
1115
- $,
1116
1116
  o,
1117
- c,
1118
- u
1117
+ h,
1118
+ c
1119
1119
  ]
1120
1120
  );
1121
1121
  return /* @__PURE__ */ r(yA.Provider, { value: P, children: A });
@@ -1124,13 +1124,13 @@ function wA({
1124
1124
  navigationData: A,
1125
1125
  onMenuItemClick: t
1126
1126
  }) {
1127
- const o = je(), e = qe(), n = o.pathname, s = w(
1128
- (i) => {
1129
- for (const h of i) {
1130
- if (h.link === n)
1131
- return h;
1132
- if (h.links) {
1133
- const p = s(h.links);
1127
+ const o = je(), e = qe(), n = o.pathname, s = S(
1128
+ (d) => {
1129
+ for (const u of d) {
1130
+ if (u.link === n)
1131
+ return u;
1132
+ if (u.links) {
1133
+ const p = s(u.links);
1134
1134
  if (p)
1135
1135
  return p;
1136
1136
  }
@@ -1138,90 +1138,90 @@ function wA({
1138
1138
  return null;
1139
1139
  },
1140
1140
  [n]
1141
- ), a = ce(() => s(A), [s, A]), l = w(
1142
- (i) => i.link === n,
1141
+ ), a = ce(() => s(A), [s, A]), l = S(
1142
+ (d) => d.link === n,
1143
1143
  [n]
1144
- ), d = w(
1145
- (i) => i.link === n ? !0 : i.links ? i.links.some((h) => d(h)) : !1,
1144
+ ), i = S(
1145
+ (d) => d.link === n ? !0 : d.links ? d.links.some((u) => i(u)) : !1,
1146
1146
  [n]
1147
- ), c = ce(() => {
1148
- const i = [], h = (p, b) => {
1149
- for (const C of p) {
1150
- const m = [...b, C];
1151
- if (C.link === n)
1152
- return i.push(...m), !0;
1153
- if (C.links && h(C.links, m))
1147
+ ), h = ce(() => {
1148
+ const d = [], u = (p, C) => {
1149
+ for (const b of p) {
1150
+ const m = [...C, b];
1151
+ if (b.link === n)
1152
+ return d.push(...m), !0;
1153
+ if (b.links && u(b.links, m))
1154
1154
  return !0;
1155
1155
  }
1156
1156
  return !1;
1157
1157
  };
1158
- return h(A, []), i;
1159
- }, [A, n]), u = w(
1160
- (i) => {
1161
- (typeof i.disabled == "function" ? i.disabled() : i.disabled) || (t && t(i), i.link && (i.routeParams ? e(i.link, { state: i.routeParams }) : e(i.link)), i.redirect && e(i.redirect));
1158
+ return u(A, []), d;
1159
+ }, [A, n]), c = S(
1160
+ (d) => {
1161
+ (typeof d.disabled == "function" ? d.disabled() : d.disabled) || (t && t(d), d.link && (d.routeParams ? e(d.link, { state: d.routeParams }) : e(d.link)), d.redirect && e(d.redirect));
1162
1162
  },
1163
1163
  [e, t]
1164
1164
  );
1165
1165
  return {
1166
1166
  activeItem: a,
1167
1167
  currentPath: n,
1168
- navigateToItem: u,
1168
+ navigateToItem: c,
1169
1169
  isItemActive: l,
1170
- isItemOrChildActive: d,
1171
- activeBreadcrumb: c
1170
+ isItemOrChildActive: i,
1171
+ activeBreadcrumb: h
1172
1172
  };
1173
1173
  }
1174
1174
  function Wt({
1175
1175
  navigationData: A,
1176
1176
  onSearch: t
1177
1177
  }) {
1178
- const [o, e] = ge(""), n = w((c) => c.reduce((u, i) => {
1179
- let h = 1;
1180
- return i.links && (h += n(i.links)), u + h;
1178
+ const [o, e] = ge(""), n = S((h) => h.reduce((c, d) => {
1179
+ let u = 1;
1180
+ return d.links && (u += n(d.links)), c + u;
1181
1181
  }, 0), []), s = ce(() => {
1182
1182
  if (!o.trim())
1183
1183
  return A;
1184
- const c = o.toLowerCase().trim(), u = (i) => i.reduce((h, p) => {
1184
+ const h = o.toLowerCase().trim(), c = (d) => d.reduce((u, p) => {
1185
1185
  if (!p.showInSidebar)
1186
- return h;
1187
- const b = p.label.toLowerCase().includes(c), C = p.links ? u(p.links) : [];
1188
- return (b || C.length > 0) && h.push({
1186
+ return u;
1187
+ const C = p.label.toLowerCase().includes(h), b = p.links ? c(p.links) : [];
1188
+ return (C || b.length > 0) && u.push({
1189
1189
  ...p,
1190
- links: C.length > 0 ? C : p.links,
1190
+ links: b.length > 0 ? b : p.links,
1191
1191
  // Expandir automaticamente grupos com match
1192
1192
  initiallyOpened: !0
1193
- }), h;
1193
+ }), u;
1194
1194
  }, []);
1195
- return u(A);
1196
- }, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = w(
1197
- (c) => {
1198
- if (e(c), t) {
1199
- const u = c.toLowerCase().trim();
1200
- if (!u)
1201
- t(c, A);
1195
+ return c(A);
1196
+ }, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = S(
1197
+ (h) => {
1198
+ if (e(h), t) {
1199
+ const c = h.toLowerCase().trim();
1200
+ if (!c)
1201
+ t(h, A);
1202
1202
  else {
1203
- const i = (h) => h.reduce((p, b) => {
1204
- if (!b.showInSidebar)
1203
+ const d = (u) => u.reduce((p, C) => {
1204
+ if (!C.showInSidebar)
1205
1205
  return p;
1206
- const C = b.label.toLowerCase().includes(u), m = b.links ? i(b.links) : [];
1207
- return (C || m.length > 0) && p.push({
1208
- ...b,
1209
- links: m.length > 0 ? m : b.links,
1206
+ const b = C.label.toLowerCase().includes(c), m = C.links ? d(C.links) : [];
1207
+ return (b || m.length > 0) && p.push({
1208
+ ...C,
1209
+ links: m.length > 0 ? m : C.links,
1210
1210
  initiallyOpened: !0
1211
1211
  }), p;
1212
1212
  }, []);
1213
- t(c, i(A));
1213
+ t(h, d(A));
1214
1214
  }
1215
1215
  }
1216
1216
  },
1217
1217
  [A, t]
1218
- ), d = w(() => {
1218
+ ), i = S(() => {
1219
1219
  l("");
1220
1220
  }, [l]);
1221
1221
  return {
1222
1222
  query: o,
1223
1223
  setQuery: l,
1224
- clearSearch: d,
1224
+ clearSearch: i,
1225
1225
  filteredItems: s,
1226
1226
  hasResults: s.length > 0,
1227
1227
  isSearching: o.trim().length > 0,
@@ -1238,32 +1238,32 @@ function SA({
1238
1238
  enabled: e = !0
1239
1239
  }) {
1240
1240
  const n = ce(() => {
1241
- const d = /* @__PURE__ */ new Map(), c = (u) => {
1242
- u.forEach((i) => {
1243
- const h = i;
1244
- h.shortcut && d.set(h.shortcut, i), i.links && c(i.links);
1241
+ const i = /* @__PURE__ */ new Map(), h = (c) => {
1242
+ c.forEach((d) => {
1243
+ const u = d;
1244
+ u.shortcut && i.set(u.shortcut, d), d.links && h(d.links);
1245
1245
  });
1246
1246
  };
1247
- return c(A), d;
1248
- }, [A]), s = w(
1249
- (d) => !!d.shortcut,
1247
+ return h(A), i;
1248
+ }, [A]), s = S(
1249
+ (i) => !!i.shortcut,
1250
1250
  []
1251
- ), a = w(
1252
- (d) => d.shortcut,
1251
+ ), a = S(
1252
+ (i) => i.shortcut,
1253
1253
  []
1254
1254
  ), l = ce(() => {
1255
1255
  if (!e)
1256
1256
  return [];
1257
- const d = [];
1258
- return o && d.push(["mod+b", o]), n.forEach((c, u) => {
1259
- const i = Zt(u);
1260
- d.push([
1261
- i,
1257
+ const i = [];
1258
+ return o && i.push(["mod+b", o]), n.forEach((h, c) => {
1259
+ const d = Zt(c);
1260
+ i.push([
1261
+ d,
1262
1262
  () => {
1263
- (typeof c.disabled == "function" ? c.disabled() : c.disabled) || t(c);
1263
+ (typeof h.disabled == "function" ? h.disabled() : h.disabled) || t(h);
1264
1264
  }
1265
1265
  ]);
1266
- }), d;
1266
+ }), i;
1267
1267
  }, [e, n, t, o]);
1268
1268
  return Rr(l), {
1269
1269
  shortcuts: n,
@@ -1280,26 +1280,26 @@ function $e({
1280
1280
  textColor: s,
1281
1281
  iconColor: a,
1282
1282
  hoverColor: l,
1283
- itemHeight: d = 40,
1284
- itemBorderRadius: c = 0,
1285
- itemHorizontalGap: u = 0,
1286
- activeBackground: i,
1287
- isActive: h
1283
+ itemHeight: i = 40,
1284
+ itemBorderRadius: h = 0,
1285
+ itemHorizontalGap: c = 0,
1286
+ activeBackground: d,
1287
+ isActive: u
1288
1288
  }) {
1289
- const p = me(), { colorScheme: b } = de(), C = A, [m, g] = ge(!1), f = s || "var(--mantine-color-text)", S = a || p.colors[p.primaryColor][6], k = l || p.colors[p.primaryColor][6], D = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], j = m ? e ? D : k : e ? k : "transparent", z = m || e ? p.white : f, U = m || e ? p.white : S, $ = e && !m && !!i ? { background: i, backgroundColor: void 0 } : { background: void 0, backgroundColor: j }, M = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1290
- if (M && A.hideDisabledItem || !A.showInSidebar)
1289
+ const p = me(), { colorScheme: C } = de(), b = A, [m, g] = ge(!1), f = s || "var(--mantine-color-text)", I = a || p.colors[p.primaryColor][6], T = l || p.colors[p.primaryColor][6], L = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], X = m ? e ? L : T : e ? T : "transparent", F = m || e ? p.white : f, U = m || e ? p.white : I, O = e && !m && !!d ? { background: d, backgroundColor: void 0 } : { background: void 0, backgroundColor: X }, D = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1290
+ if (D && A.hideDisabledItem || !A.showInSidebar)
1291
1291
  return null;
1292
- const F = w(() => {
1293
- !M && n && n(A);
1294
- }, [M, n, A]), P = Re.t(A.label), y = () => C.badge ? /* @__PURE__ */ r(pA, { size: "xs", color: C.badgeColor || "blue", variant: "filled", children: C.badge }) : null, V = () => C.shortcut ? /* @__PURE__ */ r(HA, { size: "xs", style: { marginLeft: "auto" }, children: C.shortcut }) : null;
1292
+ const Q = S(() => {
1293
+ !D && n && n(A);
1294
+ }, [D, n, A]), P = Re.t(A.label), v = () => b.badge ? /* @__PURE__ */ r(pA, { size: "xs", color: b.badgeColor || "blue", variant: "filled", children: b.badge }) : null, K = () => b.shortcut ? /* @__PURE__ */ r(HA, { size: "xs", style: { marginLeft: "auto" }, children: b.shortcut }) : null;
1295
1295
  if (A.links && A.links.length > 0) {
1296
- const E = A.links.filter((I) => {
1297
- const G = typeof I.disabled == "function" ? I.disabled() : I.disabled;
1298
- return I.showInSidebar && (!G || !I.hideDisabledItem);
1296
+ const E = A.links.filter((x) => {
1297
+ const V = typeof x.disabled == "function" ? x.disabled() : x.disabled;
1298
+ return x.showInSidebar && (!V || !x.hideDisabledItem);
1299
1299
  });
1300
- if (E.length === 0 && M && A.hideDisabledItem)
1300
+ if (E.length === 0 && D && A.hideDisabledItem)
1301
1301
  return null;
1302
- const W = (I) => h ? h(I) : e, H = (I) => I.some((G) => W(G) || (G.links ? H(G.links) : !1));
1302
+ const W = (x) => u ? u(x) : e, G = (x) => x.some((V) => W(V) || (V.links ? G(V.links) : !1));
1303
1303
  return o ? /* @__PURE__ */ R(
1304
1304
  ie,
1305
1305
  {
@@ -1323,7 +1323,7 @@ function $e({
1323
1323
  B,
1324
1324
  {
1325
1325
  style: {
1326
- color: S,
1326
+ color: I,
1327
1327
  display: "flex",
1328
1328
  alignItems: "center",
1329
1329
  justifyContent: "center"
@@ -1337,7 +1337,7 @@ function $e({
1337
1337
  size: "8px",
1338
1338
  ta: "center",
1339
1339
  style: {
1340
- color: S,
1340
+ color: I,
1341
1341
  lineHeight: 1,
1342
1342
  maxWidth: 56,
1343
1343
  overflow: "hidden",
@@ -1352,17 +1352,17 @@ function $e({
1352
1352
  ) }) }) }),
1353
1353
  /* @__PURE__ */ R(ie.Dropdown, { children: [
1354
1354
  /* @__PURE__ */ r(ie.Label, { children: P }),
1355
- E.map((I, G) => {
1356
- const ne = typeof I.disabled == "function" ? I.disabled() : I.disabled;
1355
+ E.map((x, V) => {
1356
+ const se = typeof x.disabled == "function" ? x.disabled() : x.disabled;
1357
1357
  return /* @__PURE__ */ r(
1358
1358
  ie.Item,
1359
1359
  {
1360
- leftSection: I.icon,
1361
- disabled: ne,
1362
- onClick: () => n?.(I),
1363
- children: Re.t(I.label)
1360
+ leftSection: x.icon,
1361
+ disabled: se,
1362
+ onClick: () => n?.(x),
1363
+ children: Re.t(x.label)
1364
1364
  },
1365
- G
1365
+ V
1366
1366
  );
1367
1367
  })
1368
1368
  ] })
@@ -1373,8 +1373,8 @@ function $e({
1373
1373
  {
1374
1374
  label: P,
1375
1375
  leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
1376
- rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: z }, children: [
1377
- y(),
1376
+ rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: F }, children: [
1377
+ v(),
1378
1378
  /* @__PURE__ */ r(
1379
1379
  gA,
1380
1380
  {
@@ -1386,46 +1386,46 @@ function $e({
1386
1386
  )
1387
1387
  ] }),
1388
1388
  childrenOffset: 28,
1389
- defaultOpened: A.initiallyOpened || e || H(E),
1390
- disabled: M,
1389
+ defaultOpened: A.initiallyOpened || e || G(E),
1390
+ disabled: D,
1391
1391
  onMouseEnter: () => g(!0),
1392
1392
  onMouseLeave: () => g(!1),
1393
1393
  style: {
1394
- height: d,
1395
- marginInline: u,
1396
- width: u ? "auto" : void 0,
1397
- ...$,
1394
+ height: i,
1395
+ marginInline: c,
1396
+ width: c ? "auto" : void 0,
1397
+ ...O,
1398
1398
  transition: "background 150ms ease, background-color 150ms ease"
1399
1399
  },
1400
1400
  styles: {
1401
1401
  root: {
1402
- borderRadius: c
1402
+ borderRadius: h
1403
1403
  },
1404
1404
  label: {
1405
- color: z
1405
+ color: F
1406
1406
  },
1407
1407
  children: {
1408
1408
  paddingLeft: 0
1409
1409
  }
1410
1410
  },
1411
- children: E.map((I, G) => /* @__PURE__ */ r(
1411
+ children: E.map((x, V) => /* @__PURE__ */ r(
1412
1412
  $e,
1413
1413
  {
1414
- item: I,
1414
+ item: x,
1415
1415
  depth: t + 1,
1416
1416
  collapsed: o,
1417
- active: W(I),
1417
+ active: W(x),
1418
1418
  onClick: n,
1419
1419
  textColor: s,
1420
1420
  iconColor: a,
1421
1421
  hoverColor: l,
1422
- itemHeight: d,
1423
- itemBorderRadius: c,
1424
- itemHorizontalGap: u,
1425
- activeBackground: i,
1426
- isActive: h
1422
+ itemHeight: i,
1423
+ itemBorderRadius: h,
1424
+ itemHorizontalGap: c,
1425
+ activeBackground: d,
1426
+ isActive: u
1427
1427
  },
1428
- G
1428
+ V
1429
1429
  ))
1430
1430
  }
1431
1431
  );
@@ -1433,43 +1433,43 @@ function $e({
1433
1433
  return o ? /* @__PURE__ */ r(
1434
1434
  Me,
1435
1435
  {
1436
- label: C.tooltip || P,
1436
+ label: b.tooltip || P,
1437
1437
  position: "right",
1438
1438
  withArrow: !0,
1439
1439
  children: /* @__PURE__ */ r(
1440
1440
  Je,
1441
1441
  {
1442
1442
  style: {
1443
- width: u ? "auto" : "100%",
1444
- marginInline: u,
1445
- borderRadius: c,
1446
- cursor: M ? "not-allowed" : "pointer",
1447
- opacity: M ? 0.5 : 1,
1443
+ width: c ? "auto" : "100%",
1444
+ marginInline: c,
1445
+ borderRadius: h,
1446
+ cursor: D ? "not-allowed" : "pointer",
1447
+ opacity: D ? 0.5 : 1,
1448
1448
  // Gradiente (activeBackground) via shorthand; senão a cor sólida.
1449
- ...e && i ? { background: i } : { backgroundColor: e ? k : "transparent" },
1449
+ ...e && d ? { background: d } : { backgroundColor: e ? T : "transparent" },
1450
1450
  transition: "background 150ms ease, background-color 150ms ease",
1451
1451
  padding: "2px 0"
1452
1452
  },
1453
- onClick: F,
1453
+ onClick: Q,
1454
1454
  onMouseEnter: (E) => {
1455
- if (!M) {
1456
- if (e && i)
1455
+ if (!D) {
1456
+ if (e && d)
1457
1457
  return;
1458
- E.currentTarget.style.backgroundColor = e ? D : k;
1458
+ E.currentTarget.style.backgroundColor = e ? L : T;
1459
1459
  }
1460
1460
  },
1461
1461
  onMouseLeave: (E) => {
1462
- e && i || (E.currentTarget.style.backgroundColor = e ? k : "transparent");
1462
+ e && d || (E.currentTarget.style.backgroundColor = e ? T : "transparent");
1463
1463
  },
1464
1464
  children: /* @__PURE__ */ R(J, { gap: 1, align: "center", children: [
1465
- /* @__PURE__ */ r(B, { style: { color: e ? p.white : S }, children: A.icon }),
1465
+ /* @__PURE__ */ r(B, { style: { color: e ? p.white : I }, children: A.icon }),
1466
1466
  /* @__PURE__ */ r(
1467
1467
  Te,
1468
1468
  {
1469
1469
  size: "8px",
1470
1470
  ta: "center",
1471
1471
  style: {
1472
- color: e ? p.white : S,
1472
+ color: e ? p.white : I,
1473
1473
  lineHeight: 1,
1474
1474
  maxWidth: 56,
1475
1475
  overflow: "hidden",
@@ -1488,29 +1488,29 @@ function $e({
1488
1488
  {
1489
1489
  label: P,
1490
1490
  leftSection: /* @__PURE__ */ r(B, { style: { color: U }, children: A.icon }),
1491
- rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: z }, children: [
1492
- y(),
1493
- V()
1491
+ rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: F }, children: [
1492
+ v(),
1493
+ K()
1494
1494
  ] }),
1495
1495
  active: e,
1496
- disabled: M,
1497
- onClick: F,
1496
+ disabled: D,
1497
+ onClick: Q,
1498
1498
  onMouseEnter: () => g(!0),
1499
1499
  onMouseLeave: () => g(!1),
1500
1500
  style: {
1501
- height: d,
1501
+ height: i,
1502
1502
  paddingLeft: t > 0 ? t * 16 + 12 : void 0,
1503
- marginInline: u,
1504
- width: u ? "auto" : void 0,
1505
- ...$,
1503
+ marginInline: c,
1504
+ width: c ? "auto" : void 0,
1505
+ ...O,
1506
1506
  transition: "background 150ms ease, background-color 150ms ease"
1507
1507
  },
1508
1508
  styles: {
1509
1509
  root: {
1510
- borderRadius: c
1510
+ borderRadius: h
1511
1511
  },
1512
1512
  label: {
1513
- color: z
1513
+ color: F
1514
1514
  }
1515
1515
  }
1516
1516
  }
@@ -1525,9 +1525,9 @@ function eo({
1525
1525
  onExpandedChange: s,
1526
1526
  groupId: a
1527
1527
  }) {
1528
- const l = me(), { colorScheme: d } = de(), [c, u] = ge(e), i = n !== void 0, h = i ? n : c, p = w(() => {
1529
- i ? s?.(!h) : u((f) => !f);
1530
- }, [i, h, s]), b = d === "dark" ? l.colors.dark[6] : l.colors.gray[1], C = d === "dark" ? l.colors.dark[5] : l.colors.gray[2], m = d === "dark" ? l.colors.gray[4] : l.colors.gray[7], g = d === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
1528
+ const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p = S(() => {
1529
+ d ? s?.(!u) : c((f) => !f);
1530
+ }, [d, u, s]), C = i === "dark" ? l.colors.dark[6] : l.colors.gray[1], b = i === "dark" ? l.colors.dark[5] : l.colors.gray[2], m = i === "dark" ? l.colors.gray[4] : l.colors.gray[7], g = i === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
1531
1531
  return /* @__PURE__ */ R(B, { children: [
1532
1532
  /* @__PURE__ */ r(
1533
1533
  cA,
@@ -1537,13 +1537,13 @@ function eo({
1537
1537
  p: "xs",
1538
1538
  style: {
1539
1539
  borderRadius: l.radius.sm,
1540
- backgroundColor: b,
1540
+ backgroundColor: C,
1541
1541
  transition: "background-color 150ms ease"
1542
1542
  },
1543
1543
  styles: {
1544
1544
  root: {
1545
1545
  "&:hover": {
1546
- backgroundColor: C
1546
+ backgroundColor: b
1547
1547
  }
1548
1548
  }
1549
1549
  },
@@ -1558,7 +1558,7 @@ function eo({
1558
1558
  size: 16,
1559
1559
  color: m,
1560
1560
  style: {
1561
- transform: h ? "rotate(180deg)" : "rotate(0deg)",
1561
+ transform: u ? "rotate(180deg)" : "rotate(0deg)",
1562
1562
  transition: "transform 200ms ease"
1563
1563
  }
1564
1564
  }
@@ -1566,7 +1566,7 @@ function eo({
1566
1566
  ] })
1567
1567
  }
1568
1568
  ),
1569
- /* @__PURE__ */ r($r, { expanded: h, children: /* @__PURE__ */ r(B, { mt: 4, children: o }) })
1569
+ /* @__PURE__ */ r($r, { expanded: u, children: /* @__PURE__ */ r(B, { mt: 4, children: o }) })
1570
1570
  ] });
1571
1571
  }
1572
1572
  function Mn({
@@ -1599,7 +1599,7 @@ function Ao({
1599
1599
  activeColor: n,
1600
1600
  inactiveColor: s
1601
1601
  }) {
1602
- const a = me(), { colorScheme: l } = de(), d = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], c = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], p = /* @__PURE__ */ R(
1602
+ const a = me(), { colorScheme: l } = de(), i = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], h = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], c = a.colors[a.primaryColor][2], p = /* @__PURE__ */ R(
1603
1603
  J,
1604
1604
  {
1605
1605
  gap: 2,
@@ -1612,7 +1612,7 @@ function Ao({
1612
1612
  {
1613
1613
  size: 48,
1614
1614
  variant: t ? "filled" : "subtle",
1615
- color: t ? n ?? d : s ?? c,
1615
+ color: t ? n ?? i : s ?? h,
1616
1616
  onClick: o,
1617
1617
  style: {
1618
1618
  transition: "all 150ms ease"
@@ -1624,7 +1624,7 @@ function Ao({
1624
1624
  Te,
1625
1625
  {
1626
1626
  size: "xs",
1627
- c: u,
1627
+ c,
1628
1628
  style: {
1629
1629
  maxWidth: 70,
1630
1630
  overflow: "hidden",
@@ -1646,14 +1646,14 @@ function Dn({
1646
1646
  onClear: e,
1647
1647
  collapsed: n = !1
1648
1648
  }) {
1649
- const s = me(), { colorScheme: a } = de(), l = w(
1650
- (u) => {
1651
- o?.(u.currentTarget.value);
1649
+ const s = me(), { colorScheme: a } = de(), l = S(
1650
+ (c) => {
1651
+ o?.(c.currentTarget.value);
1652
1652
  },
1653
1653
  [o]
1654
- ), d = w(() => {
1654
+ ), i = S(() => {
1655
1655
  o?.(""), e?.();
1656
- }, [o, e]), c = t && t.length > 0;
1656
+ }, [o, e]), h = t && t.length > 0;
1657
1657
  return n ? /* @__PURE__ */ r(
1658
1658
  De,
1659
1659
  {
@@ -1667,12 +1667,12 @@ function Dn({
1667
1667
  {
1668
1668
  placeholder: A,
1669
1669
  leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
1670
- rightSection: c ? /* @__PURE__ */ r(
1670
+ rightSection: h ? /* @__PURE__ */ r(
1671
1671
  De,
1672
1672
  {
1673
1673
  variant: "subtle",
1674
1674
  size: "sm",
1675
- onClick: d,
1675
+ onClick: i,
1676
1676
  style: { cursor: "pointer" },
1677
1677
  children: /* @__PURE__ */ r(_A, { size: 14 })
1678
1678
  }
@@ -1695,13 +1695,13 @@ function Nn({
1695
1695
  onClick: e,
1696
1696
  collapsed: n = !1
1697
1697
  }) {
1698
- const s = me(), { colorScheme: a } = de(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], d = () => {
1698
+ const s = me(), { colorScheme: a } = de(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], i = () => {
1699
1699
  if (typeof o == "string")
1700
1700
  return /* @__PURE__ */ r(iA, { src: o, radius: "xl", size: n ? "sm" : "md" });
1701
1701
  if (o)
1702
1702
  return o;
1703
- const c = A ? A.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?";
1704
- return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: c });
1703
+ const h = A ? A.split(" ").map((c) => c[0]).slice(0, 2).join("").toUpperCase() : "?";
1704
+ return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: h });
1705
1705
  };
1706
1706
  return n ? /* @__PURE__ */ r(Me, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
1707
1707
  cA,
@@ -1722,7 +1722,7 @@ function Nn({
1722
1722
  }
1723
1723
  }
1724
1724
  },
1725
- children: d()
1725
+ children: i()
1726
1726
  }
1727
1727
  ) }) : /* @__PURE__ */ r(
1728
1728
  cA,
@@ -1742,7 +1742,7 @@ function Nn({
1742
1742
  }
1743
1743
  },
1744
1744
  children: /* @__PURE__ */ R(Le, { wrap: "nowrap", children: [
1745
- d(),
1745
+ i(),
1746
1746
  /* @__PURE__ */ R(B, { style: { flex: 1, overflow: "hidden" }, children: [
1747
1747
  A && /* @__PURE__ */ r(
1748
1748
  Te,
@@ -1816,41 +1816,41 @@ function kA({
1816
1816
  showGroups: n = !0,
1817
1817
  groupCount: s = 2
1818
1818
  }) {
1819
- const a = me(), { colorScheme: l } = de(), d = o || (l === "dark" ? a.colors.dark[7] : a.white);
1819
+ const a = me(), { colorScheme: l } = de(), i = o || (l === "dark" ? a.colors.dark[7] : a.white);
1820
1820
  if (t)
1821
- return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: A }).map((i, h) => /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }, h)) });
1822
- const c = (i, h = !1) => Array.from({ length: i }).map((p, b) => {
1823
- const C = 60 + Math.random() * 30;
1821
+ return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: A }).map((d, u) => /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }, u)) });
1822
+ const h = (d, u = !1) => Array.from({ length: d }).map((p, C) => {
1823
+ const b = 60 + Math.random() * 30;
1824
1824
  return /* @__PURE__ */ R(
1825
1825
  Le,
1826
1826
  {
1827
1827
  gap: "sm",
1828
1828
  p: "xs",
1829
1829
  style: {
1830
- paddingLeft: h ? 24 : void 0,
1830
+ paddingLeft: u ? 24 : void 0,
1831
1831
  height: e
1832
1832
  },
1833
1833
  children: [
1834
1834
  /* @__PURE__ */ r(pe, { circle: !0, height: 24, width: 24 }),
1835
- /* @__PURE__ */ r(pe, { height: 14, width: `${C}%`, radius: "sm" })
1835
+ /* @__PURE__ */ r(pe, { height: 14, width: `${b}%`, radius: "sm" })
1836
1836
  ]
1837
1837
  },
1838
- b
1838
+ C
1839
1839
  );
1840
1840
  });
1841
1841
  if (!n)
1842
- return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: d }, children: c(A) });
1843
- const u = Math.ceil(A / s);
1844
- return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: s }).map((i, h) => /* @__PURE__ */ R(B, { children: [
1842
+ return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: i }, children: h(A) });
1843
+ const c = Math.ceil(A / s);
1844
+ return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: s }).map((d, u) => /* @__PURE__ */ R(B, { children: [
1845
1845
  /* @__PURE__ */ R(Le, { gap: "sm", p: "xs", children: [
1846
1846
  /* @__PURE__ */ r(pe, { circle: !0, height: 20, width: 20 }),
1847
1847
  /* @__PURE__ */ r(pe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
1848
1848
  ] }),
1849
- /* @__PURE__ */ r(J, { gap: 2, mt: 4, children: c(
1850
- h === s - 1 ? A - h * u : u,
1849
+ /* @__PURE__ */ r(J, { gap: 2, mt: 4, children: h(
1850
+ u === s - 1 ? A - u * c : c,
1851
1851
  !0
1852
1852
  ) })
1853
- ] }, h)) });
1853
+ ] }, u)) });
1854
1854
  }
1855
1855
  function ro({
1856
1856
  groupCount: A = 4,
@@ -1940,147 +1940,147 @@ function to({
1940
1940
  searchPlaceholder: s = "Buscar...",
1941
1941
  onSearch: a,
1942
1942
  header: l,
1943
- footer: d,
1944
- footerHeight: c,
1945
- isLoading: u = !1,
1946
- loadingError: i,
1947
- loadingComponent: h,
1943
+ footer: i,
1944
+ footerHeight: h,
1945
+ isLoading: c = !1,
1946
+ loadingError: d,
1947
+ loadingComponent: u,
1948
1948
  errorComponent: p,
1949
- skeletonItemCount: b = 8,
1950
- backgroundDarkColor: C,
1949
+ skeletonItemCount: C = 8,
1950
+ backgroundDarkColor: b,
1951
1951
  backgroundLightColor: m,
1952
1952
  backgroundImage: g,
1953
1953
  textDarkColor: f,
1954
- textLightColor: S,
1955
- iconDarkColor: k,
1956
- iconLightColor: D,
1957
- activeColor: j,
1958
- withBorder: z = !0,
1954
+ textLightColor: I,
1955
+ iconDarkColor: T,
1956
+ iconLightColor: L,
1957
+ activeColor: X,
1958
+ withBorder: F = !0,
1959
1959
  withShadow: U = !1,
1960
- highlightActiveItem: O = !0,
1961
- onMenuItemClick: $,
1962
- itemBorderRadius: M,
1963
- itemHorizontalGap: F,
1960
+ highlightActiveItem: M = !0,
1961
+ onMenuItemClick: O,
1962
+ itemBorderRadius: D,
1963
+ itemHorizontalGap: Q,
1964
1964
  itemActiveBackground: P
1965
1965
  }) {
1966
- const y = me(), { colorScheme: V } = de(), { collapsed: E, toggleCollapsed: W } = vA(), H = V === "dark" ? C ?? y.colors.dark[7] : m ?? y.white, I = V === "dark" ? f ?? y.colors.gray[3] : S ?? y.colors.gray[7], G = V === "dark" ? k ?? y.colors[y.primaryColor][4] : D ?? y.colors[y.primaryColor][6], ne = j ? y.colors[j]?.[6] ?? y.colors[y.primaryColor][6] : y.colors[y.primaryColor][6], we = g ? { background: g } : { backgroundColor: H }, se = g ? "transparent" : H, {
1966
+ const v = me(), { colorScheme: K } = de(), { collapsed: E, toggleCollapsed: W } = vA(), G = K === "dark" ? b ?? v.colors.dark[7] : m ?? v.white, x = K === "dark" ? f ?? v.colors.gray[3] : I ?? v.colors.gray[7], V = K === "dark" ? T ?? v.colors[v.primaryColor][4] : L ?? v.colors[v.primaryColor][6], se = X ? v.colors[X]?.[6] ?? v.colors[v.primaryColor][6] : v.colors[v.primaryColor][6], Ce = g ? { background: g } : { backgroundColor: G }, le = g ? "transparent" : G, {
1967
1967
  query: be,
1968
- setQuery: ke,
1969
- filteredItems: T,
1970
- isSearching: v,
1971
- clearSearch: Q
1968
+ setQuery: we,
1969
+ filteredItems: Se,
1970
+ isSearching: w,
1971
+ clearSearch: k
1972
1972
  } = Wt({
1973
1973
  navigationData: A,
1974
1974
  onSearch: a
1975
- }), { navigateToItem: L, isItemActive: x, isItemOrChildActive: X } = wA({
1975
+ }), { navigateToItem: N, isItemActive: y, isItemOrChildActive: H } = wA({
1976
1976
  navigationData: A,
1977
- onMenuItemClick: $
1978
- }), N = w(
1979
- (Z) => !!O && x(Z),
1980
- [O, x]
1981
- ), Y = {
1982
- itemBorderRadius: M,
1983
- itemHorizontalGap: F,
1977
+ onMenuItemClick: O
1978
+ }), Y = S(
1979
+ (ee) => !!M && y(ee),
1980
+ [M, y]
1981
+ ), z = {
1982
+ itemBorderRadius: D,
1983
+ itemHorizontalGap: Q,
1984
1984
  activeBackground: P,
1985
- isActive: N
1985
+ isActive: Y
1986
1986
  };
1987
1987
  SA({
1988
1988
  navigationData: A,
1989
- navigateToItem: L,
1989
+ navigateToItem: N,
1990
1990
  onToggleSidebar: W,
1991
1991
  enabled: !0
1992
1992
  });
1993
- const Ce = E ? o : t, le = ce(() => {
1994
- const Z = /* @__PURE__ */ new Map(), Ie = [];
1995
- return T.forEach((ee) => {
1996
- if (!(!ee.showInSidebar || (typeof ee.disabled == "function" ? ee.disabled() : ee.disabled) && ee.hideDisabledItem))
1997
- if (ee.category) {
1998
- const Ee = Z.get(ee.category) || [];
1999
- Ee.push(ee), Z.set(ee.category, Ee);
1993
+ const j = E ? o : t, Z = ce(() => {
1994
+ const ee = /* @__PURE__ */ new Map(), Ie = [];
1995
+ return Se.forEach((Ae) => {
1996
+ if (!(!Ae.showInSidebar || (typeof Ae.disabled == "function" ? Ae.disabled() : Ae.disabled) && Ae.hideDisabledItem))
1997
+ if (Ae.category) {
1998
+ const Ee = ee.get(Ae.category) || [];
1999
+ Ee.push(Ae), ee.set(Ae.category, Ee);
2000
2000
  } else
2001
- Ie.push(ee);
2002
- }), { groups: Z, ungrouped: Ie };
2003
- }, [T]), xe = () => {
2004
- if (i)
2005
- return p || /* @__PURE__ */ r(xA, { message: i, backgroundColor: H });
2006
- if (u)
2007
- return h || /* @__PURE__ */ r(
2001
+ Ie.push(Ae);
2002
+ }), { groups: ee, ungrouped: Ie };
2003
+ }, [Se]), ke = () => {
2004
+ if (d)
2005
+ return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: G });
2006
+ if (c)
2007
+ return u || /* @__PURE__ */ r(
2008
2008
  kA,
2009
2009
  {
2010
- itemCount: b,
2010
+ itemCount: C,
2011
2011
  collapsed: E,
2012
- backgroundColor: H,
2012
+ backgroundColor: G,
2013
2013
  showGroups: !E
2014
2014
  }
2015
2015
  );
2016
- const Z = () => le.ungrouped.map((ee, Ae) => /* @__PURE__ */ r(
2016
+ const ee = () => Z.ungrouped.map((Ae, re) => /* @__PURE__ */ r(
2017
2017
  $e,
2018
2018
  {
2019
- item: ee,
2019
+ item: Ae,
2020
2020
  collapsed: E,
2021
- active: O && x(ee),
2022
- onClick: L,
2023
- textColor: I,
2024
- iconColor: G,
2025
- hoverColor: ne,
2026
- ...Y
2021
+ active: M && y(Ae),
2022
+ onClick: N,
2023
+ textColor: x,
2024
+ iconColor: V,
2025
+ hoverColor: se,
2026
+ ...z
2027
2027
  },
2028
- `item-${Ae}`
2029
- )), Ie = () => Array.from(le.groups.entries()).map(([Ae, Ee], q) => /* @__PURE__ */ r(
2028
+ `item-${re}`
2029
+ )), Ie = () => Array.from(Z.groups.entries()).map(([re, Ee], q) => /* @__PURE__ */ r(
2030
2030
  eo,
2031
2031
  {
2032
- label: Ae,
2032
+ label: re,
2033
2033
  groupId: `group-${q}`,
2034
2034
  defaultExpanded: !0,
2035
- children: Ee.map((ye, K) => /* @__PURE__ */ r(
2035
+ children: Ee.map((ye, $) => /* @__PURE__ */ r(
2036
2036
  $e,
2037
2037
  {
2038
2038
  item: ye,
2039
2039
  collapsed: E,
2040
- active: O && x(ye),
2041
- onClick: L,
2042
- textColor: I,
2043
- iconColor: G,
2044
- hoverColor: ne,
2045
- ...Y
2040
+ active: M && y(ye),
2041
+ onClick: N,
2042
+ textColor: x,
2043
+ iconColor: V,
2044
+ hoverColor: se,
2045
+ ...z
2046
2046
  },
2047
- `group-${q}-item-${K}`
2047
+ `group-${q}-item-${$}`
2048
2048
  ))
2049
2049
  },
2050
2050
  `group-${q}`
2051
2051
  ));
2052
2052
  return E ? /* @__PURE__ */ R(J, { gap: 4, children: [
2053
- le.ungrouped.map((ee, Ae) => /* @__PURE__ */ r(
2053
+ Z.ungrouped.map((Ae, re) => /* @__PURE__ */ r(
2054
2054
  $e,
2055
2055
  {
2056
- item: ee,
2056
+ item: Ae,
2057
2057
  collapsed: !0,
2058
- active: O && x(ee),
2059
- onClick: L,
2060
- textColor: I,
2061
- iconColor: G,
2062
- hoverColor: ne,
2063
- ...Y
2058
+ active: M && y(Ae),
2059
+ onClick: N,
2060
+ textColor: x,
2061
+ iconColor: V,
2062
+ hoverColor: se,
2063
+ ...z
2064
2064
  },
2065
- `item-${Ae}`
2065
+ `item-${re}`
2066
2066
  )),
2067
- Array.from(le.groups.values()).flat().map((ee, Ae) => /* @__PURE__ */ r(
2067
+ Array.from(Z.groups.values()).flat().map((Ae, re) => /* @__PURE__ */ r(
2068
2068
  $e,
2069
2069
  {
2070
- item: ee,
2070
+ item: Ae,
2071
2071
  collapsed: !0,
2072
- active: O && x(ee),
2073
- onClick: L,
2074
- textColor: I,
2075
- iconColor: G,
2076
- hoverColor: ne,
2077
- ...Y
2072
+ active: M && y(Ae),
2073
+ onClick: N,
2074
+ textColor: x,
2075
+ iconColor: V,
2076
+ hoverColor: se,
2077
+ ...z
2078
2078
  },
2079
- `grouped-item-${Ae}`
2079
+ `grouped-item-${re}`
2080
2080
  ))
2081
2081
  ] }) : /* @__PURE__ */ R(J, { gap: "xs", children: [
2082
- le.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: Z() }),
2083
- le.groups.size > 0 && le.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
2082
+ Z.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: ee() }),
2083
+ Z.groups.size > 0 && Z.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
2084
2084
  Ie()
2085
2085
  ] });
2086
2086
  };
@@ -2091,21 +2091,21 @@ function to({
2091
2091
  transition: "slide-right",
2092
2092
  duration: 200,
2093
2093
  timingFunction: "ease",
2094
- children: (Z) => /* @__PURE__ */ R(
2094
+ children: (ee) => /* @__PURE__ */ R(
2095
2095
  B,
2096
2096
  {
2097
2097
  style: {
2098
- ...Z,
2099
- width: fe(Ce),
2098
+ ...ee,
2099
+ width: fe(j),
2100
2100
  height: typeof e == "number" ? fe(e) : e,
2101
2101
  minHeight: typeof e == "number" ? fe(e) : e,
2102
- ...we,
2102
+ ...Ce,
2103
2103
  display: "flex",
2104
2104
  flexDirection: "column",
2105
2105
  overflow: "hidden",
2106
2106
  transition: "width 200ms ease",
2107
- borderRight: z ? `1px solid ${V === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0,
2108
- boxShadow: U ? y.shadows.sm : void 0
2107
+ borderRight: F ? `1px solid ${K === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0,
2108
+ boxShadow: U ? v.shadows.sm : void 0
2109
2109
  },
2110
2110
  children: [
2111
2111
  l && /* @__PURE__ */ r(B, { style: { flexShrink: 0 }, children: l }),
@@ -2114,16 +2114,16 @@ function to({
2114
2114
  {
2115
2115
  placeholder: s,
2116
2116
  leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
2117
- rightSection: v ? /* @__PURE__ */ r(
2117
+ rightSection: w ? /* @__PURE__ */ r(
2118
2118
  _A,
2119
2119
  {
2120
2120
  size: 16,
2121
2121
  style: { cursor: "pointer" },
2122
- onClick: Q
2122
+ onClick: k
2123
2123
  }
2124
2124
  ) : null,
2125
2125
  value: be,
2126
- onChange: (Ie) => ke(Ie.currentTarget.value),
2126
+ onChange: (Ie) => we(Ie.currentTarget.value),
2127
2127
  size: "sm"
2128
2128
  }
2129
2129
  ) }),
@@ -2134,19 +2134,19 @@ function to({
2134
2134
  scrollbarSize: 6,
2135
2135
  type: "hover",
2136
2136
  offsetScrollbars: !0,
2137
- children: /* @__PURE__ */ r(B, { p: "xs", children: xe() })
2137
+ children: /* @__PURE__ */ r(B, { p: "xs", children: ke() })
2138
2138
  }
2139
2139
  ),
2140
- d && /* @__PURE__ */ r(
2140
+ i && /* @__PURE__ */ r(
2141
2141
  B,
2142
2142
  {
2143
2143
  style: {
2144
2144
  flexShrink: 0,
2145
- height: c,
2146
- backgroundColor: se,
2147
- borderTop: z ? `1px solid ${V === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0
2145
+ height: h,
2146
+ backgroundColor: le,
2147
+ borderTop: F ? `1px solid ${K === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0
2148
2148
  },
2149
- children: d
2149
+ children: i
2150
2150
  }
2151
2151
  )
2152
2152
  ]
@@ -2193,11 +2193,11 @@ function no({
2193
2193
  return null;
2194
2194
  const l = Re.t(A.label);
2195
2195
  if (A.links && A.links.length > 0) {
2196
- const d = A.links.filter((c) => {
2197
- const u = typeof c.disabled == "function" ? c.disabled() : c.disabled;
2198
- return c.showInSidebar && (!u || !c.hideDisabledItem);
2196
+ const i = A.links.filter((h) => {
2197
+ const c = typeof h.disabled == "function" ? h.disabled() : h.disabled;
2198
+ return h.showInSidebar && (!c || !h.hideDisabledItem);
2199
2199
  });
2200
- return d.length === 0 ? null : /* @__PURE__ */ R(
2200
+ return i.length === 0 ? null : /* @__PURE__ */ R(
2201
2201
  ie,
2202
2202
  {
2203
2203
  position: "right-start",
@@ -2240,17 +2240,17 @@ function no({
2240
2240
  ] }) }) }),
2241
2241
  /* @__PURE__ */ R(ie.Dropdown, { children: [
2242
2242
  /* @__PURE__ */ r(ie.Label, { children: l }),
2243
- d.map((c, u) => {
2244
- const i = typeof c.disabled == "function" ? c.disabled() : c.disabled;
2243
+ i.map((h, c) => {
2244
+ const d = typeof h.disabled == "function" ? h.disabled() : h.disabled;
2245
2245
  return /* @__PURE__ */ r(
2246
2246
  ie.Item,
2247
2247
  {
2248
- leftSection: c.icon,
2249
- disabled: i,
2250
- onClick: () => o(c),
2251
- children: Re.t(c.label)
2248
+ leftSection: h.icon,
2249
+ disabled: d,
2250
+ onClick: () => o(h),
2251
+ children: Re.t(h.label)
2252
2252
  },
2253
- u
2253
+ c
2254
2254
  );
2255
2255
  })
2256
2256
  ] })
@@ -2300,59 +2300,59 @@ function so({
2300
2300
  footerHeight: s,
2301
2301
  isLoading: a = !1,
2302
2302
  loadingError: l,
2303
- loadingComponent: d,
2304
- errorComponent: c,
2305
- skeletonItemCount: u = 8,
2306
- backgroundDarkColor: i,
2307
- backgroundLightColor: h,
2303
+ loadingComponent: i,
2304
+ errorComponent: h,
2305
+ skeletonItemCount: c = 8,
2306
+ backgroundDarkColor: d,
2307
+ backgroundLightColor: u,
2308
2308
  iconDarkColor: p,
2309
- iconLightColor: b,
2310
- activeColor: C,
2309
+ iconLightColor: C,
2310
+ activeColor: b,
2311
2311
  withBorder: m = !0,
2312
2312
  withShadow: g = !1,
2313
2313
  highlightActiveItem: f = !0,
2314
- onMenuItemClick: S
2314
+ onMenuItemClick: I
2315
2315
  }) {
2316
- const k = me(), { colorScheme: D } = de(), { toggleCollapsed: j } = vA(), z = D === "dark" ? i ?? k.colors.dark[7] : h ?? k.white, U = D === "dark" ? p ?? k.colors[k.primaryColor][4] : b ?? k.colors[k.primaryColor][6], O = C ?? k.primaryColor, { navigateToItem: $, isItemActive: M, isItemOrChildActive: F } = wA({
2316
+ const T = me(), { colorScheme: L } = de(), { toggleCollapsed: X } = vA(), F = L === "dark" ? d ?? T.colors.dark[7] : u ?? T.white, U = L === "dark" ? p ?? T.colors[T.primaryColor][4] : C ?? T.colors[T.primaryColor][6], M = b ?? T.primaryColor, { navigateToItem: O, isItemActive: D, isItemOrChildActive: Q } = wA({
2317
2317
  navigationData: A,
2318
- onMenuItemClick: S
2318
+ onMenuItemClick: I
2319
2319
  });
2320
2320
  SA({
2321
2321
  navigationData: A,
2322
- navigateToItem: $,
2323
- onToggleSidebar: j,
2322
+ navigateToItem: O,
2323
+ onToggleSidebar: X,
2324
2324
  enabled: !0
2325
2325
  });
2326
- const P = A.filter((E) => !(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem)), y = () => l ? c || /* @__PURE__ */ r(xA, { message: l, backgroundColor: z }) : a ? d || /* @__PURE__ */ r(
2326
+ const P = A.filter((E) => !(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem)), v = () => l ? h || /* @__PURE__ */ r(xA, { message: l, backgroundColor: F }) : a ? i || /* @__PURE__ */ r(
2327
2327
  kA,
2328
2328
  {
2329
- itemCount: u,
2329
+ itemCount: c,
2330
2330
  collapsed: !0,
2331
- backgroundColor: z
2331
+ backgroundColor: F
2332
2332
  }
2333
2333
  ) : /* @__PURE__ */ r(J, { gap: 8, align: "center", children: P.map((E, W) => /* @__PURE__ */ r(
2334
2334
  no,
2335
2335
  {
2336
2336
  item: E,
2337
- active: f && (M(E) || F(E)),
2338
- onClick: $,
2337
+ active: f && (D(E) || Q(E)),
2338
+ onClick: O,
2339
2339
  iconColor: U,
2340
- activeColor: O
2340
+ activeColor: M
2341
2341
  },
2342
2342
  W
2343
- )) }), V = D === "dark" ? k.colors.dark[5] : k.colors.gray[2];
2343
+ )) }), K = L === "dark" ? T.colors.dark[5] : T.colors.gray[2];
2344
2344
  return /* @__PURE__ */ R(
2345
2345
  B,
2346
2346
  {
2347
2347
  style: {
2348
2348
  width: fe(t),
2349
2349
  height: fe(o),
2350
- backgroundColor: z,
2350
+ backgroundColor: F,
2351
2351
  display: "flex",
2352
2352
  flexDirection: "column",
2353
2353
  overflow: "hidden",
2354
- boxShadow: g ? k.shadows.sm : void 0,
2355
- borderRight: m ? `1px solid ${V}` : void 0
2354
+ boxShadow: g ? T.shadows.sm : void 0,
2355
+ borderRight: m ? `1px solid ${K}` : void 0
2356
2356
  },
2357
2357
  children: [
2358
2358
  e && /* @__PURE__ */ r(
@@ -2362,7 +2362,7 @@ function so({
2362
2362
  flexShrink: 0,
2363
2363
  display: "flex",
2364
2364
  justifyContent: "center",
2365
- padding: k.spacing.xs
2365
+ padding: T.spacing.xs
2366
2366
  },
2367
2367
  children: e
2368
2368
  }
@@ -2374,7 +2374,7 @@ function so({
2374
2374
  style: { flex: 1 },
2375
2375
  scrollbarSize: 4,
2376
2376
  type: "hover",
2377
- children: /* @__PURE__ */ r(B, { p: "xs", children: y() })
2377
+ children: /* @__PURE__ */ r(B, { p: "xs", children: v() })
2378
2378
  }
2379
2379
  ),
2380
2380
  n && /* @__PURE__ */ R(Pe, { children: [
@@ -2387,7 +2387,7 @@ function so({
2387
2387
  height: s,
2388
2388
  display: "flex",
2389
2389
  justifyContent: "center",
2390
- padding: k.spacing.xs
2390
+ padding: T.spacing.xs
2391
2391
  },
2392
2392
  children: n
2393
2393
  }
@@ -2431,59 +2431,59 @@ function ao({
2431
2431
  defaultGroupIcon: s,
2432
2432
  showGroupLabels: a = !0,
2433
2433
  header: l,
2434
- footer: d,
2435
- footerHeight: c,
2436
- isLoading: u = !1,
2437
- loadingError: i,
2438
- loadingComponent: h,
2434
+ footer: i,
2435
+ footerHeight: h,
2436
+ isLoading: c = !1,
2437
+ loadingError: d,
2438
+ loadingComponent: u,
2439
2439
  errorComponent: p,
2440
- skeletonItemCount: b = 8,
2441
- skeletonGroupCount: C = 3,
2440
+ skeletonItemCount: C = 8,
2441
+ skeletonGroupCount: b = 3,
2442
2442
  backgroundDarkColor: m,
2443
2443
  backgroundLightColor: g,
2444
2444
  backgroundImage: f,
2445
- textDarkColor: S,
2446
- textLightColor: k,
2447
- iconDarkColor: D,
2448
- iconLightColor: j,
2449
- activeColor: z,
2445
+ textDarkColor: I,
2446
+ textLightColor: T,
2447
+ iconDarkColor: L,
2448
+ iconLightColor: X,
2449
+ activeColor: F,
2450
2450
  groupBackgroundColor: U,
2451
- selectedGroupColor: O,
2452
- groupColor: $,
2453
- groupLabelDarkColor: M,
2454
- groupLabelLightColor: F,
2451
+ selectedGroupColor: M,
2452
+ groupColor: O,
2453
+ groupLabelDarkColor: D,
2454
+ groupLabelLightColor: Q,
2455
2455
  withBorder: P = !1,
2456
- highlightActiveItem: y = !0,
2457
- onMenuItemClick: V,
2456
+ highlightActiveItem: v = !0,
2457
+ onMenuItemClick: K,
2458
2458
  itemBorderRadius: E,
2459
2459
  itemHorizontalGap: W,
2460
- itemActiveBackground: H
2460
+ itemActiveBackground: G
2461
2461
  }) {
2462
- const I = me(), { colorScheme: G } = de(), {
2463
- collapsed: ne,
2464
- toggleCollapsed: we,
2465
- activeGroup: se,
2462
+ const x = me(), { colorScheme: V } = de(), {
2463
+ collapsed: se,
2464
+ toggleCollapsed: Ce,
2465
+ activeGroup: le,
2466
2466
  setActiveGroup: be
2467
- } = vA(), ke = G === "dark" ? m ?? I.colors.dark[7] : g ?? I.white, T = f ? { background: f } : { backgroundColor: ke }, v = f ? "transparent" : ke, Q = G === "dark" ? S ?? I.colors.gray[3] : k ?? I.colors.gray[7], L = G === "dark" ? D ?? I.colors[I.primaryColor][4] : j ?? I.colors[I.primaryColor][6], x = z ? I.colors[z]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], X = U || (G === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), N = O || (G === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: Y, isItemActive: Ce } = wA({
2467
+ } = vA(), we = V === "dark" ? m ?? x.colors.dark[7] : g ?? x.white, Se = f ? { background: f } : { backgroundColor: we }, w = f ? "transparent" : we, k = V === "dark" ? I ?? x.colors.gray[3] : T ?? x.colors.gray[7], N = V === "dark" ? L ?? x.colors[x.primaryColor][4] : X ?? x.colors[x.primaryColor][6], y = F ? x.colors[F]?.[6] ?? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][6], H = U || (V === "dark" ? x.colors[x.primaryColor][6] : x.colors[x.primaryColor][7]), Y = M || (V === "dark" ? x.colors[x.primaryColor][8] : x.colors[x.primaryColor][0]), { navigateToItem: z, isItemActive: j } = wA({
2468
2468
  navigationData: A,
2469
- onMenuItemClick: V
2470
- }), le = w(
2471
- (K) => !!y && Ce(K),
2472
- [y, Ce]
2473
- ), xe = {
2469
+ onMenuItemClick: K
2470
+ }), Z = S(
2471
+ ($) => !!v && j($),
2472
+ [v, j]
2473
+ ), ke = {
2474
2474
  itemBorderRadius: E,
2475
2475
  itemHorizontalGap: W,
2476
- activeBackground: H,
2477
- isActive: le
2476
+ activeBackground: G,
2477
+ isActive: Z
2478
2478
  };
2479
2479
  SA({
2480
2480
  navigationData: A,
2481
- navigateToItem: Y,
2482
- onToggleSidebar: we,
2481
+ navigateToItem: z,
2482
+ onToggleSidebar: Ce,
2483
2483
  enabled: !0
2484
2484
  });
2485
- const Z = ce(() => {
2486
- const K = /* @__PURE__ */ new Map();
2485
+ const ee = ce(() => {
2486
+ const $ = /* @__PURE__ */ new Map();
2487
2487
  return A.forEach((ue) => {
2488
2488
  if (!ue.showInSidebar || (typeof ue.disabled == "function" ? ue.disabled() : ue.disabled) && ue.hideDisabledItem)
2489
2489
  return;
@@ -2493,26 +2493,26 @@ function ao({
2493
2493
  name: "Default",
2494
2494
  hint: "Default",
2495
2495
  indexOrder: 0
2496
- }, Ve = K.get(Fe.name);
2497
- Ve ? Ve.items.push(ue) : K.set(Fe.name, {
2496
+ }, Ve = $.get(Fe.name);
2497
+ Ve ? Ve.items.push(ue) : $.set(Fe.name, {
2498
2498
  group: Fe,
2499
2499
  items: [ue]
2500
2500
  });
2501
- }), Array.from(K.values()).sort((ue, Qe) => ue.group.indexOrder - Qe.group.indexOrder);
2501
+ }), Array.from($.values()).sort((ue, Qe) => ue.group.indexOrder - Qe.group.indexOrder);
2502
2502
  }, [A, s]);
2503
- te(() => {
2504
- !se && Z.length > 0 && be(Z[0].group.name);
2505
- }, [se, Z, be]);
2506
- const Ie = ce(() => Z.find((ue) => ue.group.name === se)?.items ?? [], [Z, se]), ee = w((K) => {
2507
- ne ? (we(), be(K)) : se === K ? we() : be(K);
2508
- }, [ne, se, we, be]), Ae = ne ? 0 : Number(fe(t)) - Number(fe(n)), Ee = () => u && Z.length === 0 ? /* @__PURE__ */ r(
2503
+ oe(() => {
2504
+ !le && ee.length > 0 && be(ee[0].group.name);
2505
+ }, [le, ee, be]);
2506
+ const Ie = ce(() => ee.find((ue) => ue.group.name === le)?.items ?? [], [ee, le]), Ae = S(($) => {
2507
+ se ? (Ce(), be($)) : le === $ ? Ce() : be($);
2508
+ }, [se, le, Ce, be]), re = se ? 0 : Number(fe(t)) - Number(fe(n)), Ee = () => c && ee.length === 0 ? /* @__PURE__ */ r(
2509
2509
  ro,
2510
2510
  {
2511
- groupCount: C,
2511
+ groupCount: b,
2512
2512
  width: n,
2513
- backgroundColor: X
2513
+ backgroundColor: H
2514
2514
  }
2515
- ) : Z.length <= 1 ? null : /* @__PURE__ */ r(
2515
+ ) : ee.length <= 1 ? null : /* @__PURE__ */ r(
2516
2516
  J,
2517
2517
  {
2518
2518
  gap: 4,
@@ -2521,45 +2521,45 @@ function ao({
2521
2521
  style: {
2522
2522
  width: n,
2523
2523
  height: "100%",
2524
- backgroundColor: X,
2524
+ backgroundColor: H,
2525
2525
  flexShrink: 0
2526
2526
  },
2527
- children: Z.map((K) => /* @__PURE__ */ r(
2527
+ children: ee.map(($) => /* @__PURE__ */ r(
2528
2528
  Ao,
2529
2529
  {
2530
- group: K.group,
2531
- active: K.group.name === se,
2532
- onClick: () => ee(K.group.name),
2530
+ group: $.group,
2531
+ active: $.group.name === le,
2532
+ onClick: () => Ae($.group.name),
2533
2533
  showLabel: a,
2534
- activeColor: N,
2535
- inactiveColor: $
2534
+ activeColor: Y,
2535
+ inactiveColor: O
2536
2536
  },
2537
- K.group.name
2537
+ $.group.name
2538
2538
  ))
2539
2539
  }
2540
- ), q = () => i ? p || /* @__PURE__ */ r(xA, { message: i, backgroundColor: ke }) : u ? h || /* @__PURE__ */ r(
2540
+ ), q = () => d ? p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: we }) : c ? u || /* @__PURE__ */ r(
2541
2541
  kA,
2542
2542
  {
2543
- itemCount: b,
2543
+ itemCount: C,
2544
2544
  collapsed: !1,
2545
- backgroundColor: ke,
2545
+ backgroundColor: we,
2546
2546
  showGroups: !1
2547
2547
  }
2548
- ) : /* @__PURE__ */ r(J, { gap: 2, children: Ie.map((K, ue) => /* @__PURE__ */ r(
2548
+ ) : /* @__PURE__ */ r(J, { gap: 2, children: Ie.map(($, ue) => /* @__PURE__ */ r(
2549
2549
  $e,
2550
2550
  {
2551
- item: K,
2551
+ item: $,
2552
2552
  collapsed: !1,
2553
- active: y && Ce(K),
2554
- onClick: Y,
2555
- textColor: Q,
2556
- iconColor: L,
2557
- hoverColor: x,
2558
- ...xe
2553
+ active: v && j($),
2554
+ onClick: z,
2555
+ textColor: k,
2556
+ iconColor: N,
2557
+ hoverColor: y,
2558
+ ...ke
2559
2559
  },
2560
2560
  ue
2561
- )) }), ye = G === "dark" ? I.colors.dark[5] : I.colors.gray[2];
2562
- return Z.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: ne ? o : t, h: "100%", style: T, children: [
2561
+ )) }), ye = V === "dark" ? x.colors.dark[5] : x.colors.gray[2];
2562
+ return ee.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: se ? o : t, h: "100%", style: Se, children: [
2563
2563
  l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
2564
2564
  /* @__PURE__ */ r(
2565
2565
  B,
@@ -2567,30 +2567,30 @@ function ao({
2567
2567
  style: {
2568
2568
  flex: 1,
2569
2569
  width: "100%",
2570
- backgroundColor: v,
2570
+ backgroundColor: w,
2571
2571
  display: "flex",
2572
2572
  flexDirection: "column",
2573
2573
  overflow: "hidden",
2574
2574
  borderRight: P ? `1px solid ${ye}` : void 0
2575
2575
  },
2576
- children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: ne ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: A.filter((K) => K.showInSidebar ? !((typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem) : !1).map((K, ue) => /* @__PURE__ */ r(
2576
+ children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: se ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: A.filter(($) => $.showInSidebar ? !((typeof $.disabled == "function" ? $.disabled() : $.disabled) && $.hideDisabledItem) : !1).map(($, ue) => /* @__PURE__ */ r(
2577
2577
  $e,
2578
2578
  {
2579
- item: K,
2579
+ item: $,
2580
2580
  collapsed: !0,
2581
- active: y && Ce(K),
2582
- onClick: Y,
2583
- textColor: Q,
2584
- iconColor: L,
2585
- hoverColor: x,
2586
- ...xe
2581
+ active: v && j($),
2582
+ onClick: z,
2583
+ textColor: k,
2584
+ iconColor: N,
2585
+ hoverColor: y,
2586
+ ...ke
2587
2587
  },
2588
2588
  ue
2589
2589
  )) }) : q() }) })
2590
2590
  }
2591
2591
  ),
2592
- d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: v, flexShrink: 0 }, children: d })
2593
- ] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: ne ? n : t, h: "100%", style: T, children: [
2592
+ i && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
2593
+ ] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: se ? n : t, h: "100%", style: Se, children: [
2594
2594
  l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
2595
2595
  /* @__PURE__ */ R(
2596
2596
  B,
@@ -2608,20 +2608,20 @@ function ao({
2608
2608
  B,
2609
2609
  {
2610
2610
  style: {
2611
- width: ne ? 0 : Ae,
2611
+ width: se ? 0 : re,
2612
2612
  height: "100%",
2613
- backgroundColor: v,
2613
+ backgroundColor: w,
2614
2614
  overflow: "hidden",
2615
2615
  transition: "width 200ms ease",
2616
- borderLeft: Z.length > 1 ? `1px solid ${G === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
2616
+ borderLeft: ee.length > 1 ? `1px solid ${V === "dark" ? x.colors.dark[5] : x.colors.gray[2]}` : void 0
2617
2617
  },
2618
- children: !ne && se && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: q() }) })
2618
+ children: !se && le && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: q() }) })
2619
2619
  }
2620
2620
  )
2621
2621
  ]
2622
2622
  }
2623
2623
  ),
2624
- d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: v, flexShrink: 0 }, children: d })
2624
+ i && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
2625
2625
  ] });
2626
2626
  }
2627
2627
  function io(A) {
@@ -2633,9 +2633,9 @@ function io(A) {
2633
2633
  activeGroup: s,
2634
2634
  defaultActiveGroup: a,
2635
2635
  onActiveGroupChange: l,
2636
- showKeyboardShortcuts: d,
2637
- highlightActiveItem: c,
2638
- onMenuItemClick: u
2636
+ showKeyboardShortcuts: i,
2637
+ highlightActiveItem: h,
2638
+ onMenuItemClick: c
2639
2639
  } = A;
2640
2640
  return /* @__PURE__ */ r(
2641
2641
  CA,
@@ -2648,9 +2648,9 @@ function io(A) {
2648
2648
  activeGroup: s,
2649
2649
  defaultActiveGroup: a,
2650
2650
  onActiveGroupChange: l,
2651
- showKeyboardShortcuts: d,
2652
- highlightActiveItem: c,
2653
- onMenuItemClick: u,
2651
+ showKeyboardShortcuts: i,
2652
+ highlightActiveItem: h,
2653
+ onMenuItemClick: c,
2654
2654
  children: /* @__PURE__ */ r(ao, { ...A })
2655
2655
  }
2656
2656
  );
@@ -2700,8 +2700,8 @@ function lA(A) {
2700
2700
  }
2701
2701
  var ir = Ne({ active: !1, refresh: () => {
2702
2702
  }, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), uo = BA(function(A) {
2703
- let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, d = ce(() => ({ active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, e, n, s, a, l]);
2704
- return r(ir.Provider, { value: d, children: t });
2703
+ let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, i = ce(() => ({ active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, e, n, s, a, l]);
2704
+ return r(ir.Provider, { value: i, children: t });
2705
2705
  }), ho = uo, cr = GA.Activity, fo = cr ?? GA.Fragment, po = !!cr, dr = "keepalive-cache-div";
2706
2706
  function ur(A) {
2707
2707
  return A ? Array.from(A.children) : [];
@@ -2725,37 +2725,37 @@ function go(A, t, o) {
2725
2725
  return o ? QA(o, A) : t ? !QA(t, A) : !0;
2726
2726
  }
2727
2727
  var bo = BA(function(A) {
2728
- let { errorElement: t = UA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: d, renderCount: c, destroy: u, transition: i, viewTransition: h, duration: p, containerDivRef: b } = A, C = _(!1);
2729
- C.current = C.current || d;
2728
+ let { errorElement: t = UA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: i, renderCount: h, destroy: c, transition: d, viewTransition: u, duration: p, containerDivRef: C } = A, b = _(!1);
2729
+ b.current = b.current || i;
2730
2730
  let m = ce(() => {
2731
2731
  let g = document.createElement("div");
2732
- return ar(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", c.toString()), g.className = dr + (o ? ` ${o}` : ""), g;
2733
- }, [c, o]);
2734
- return te(() => {
2735
- let g = go(n, s, a), f = b.current;
2732
+ return ar(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", h.toString()), g.className = dr + (o ? ` ${o}` : ""), g;
2733
+ }, [h, o]);
2734
+ return oe(() => {
2735
+ let g = go(n, s, a), f = C.current;
2736
2736
  if (!f) {
2737
2737
  console.warn("keepalive: cache container not found");
2738
2738
  return;
2739
2739
  }
2740
- if (i)
2740
+ if (d)
2741
2741
  (async () => {
2742
- if (d) {
2743
- let S = FA(f, n);
2744
- if (await $A(p - 40), fA(S), f.contains(m))
2742
+ if (i) {
2743
+ let I = FA(f, n);
2744
+ if (await $A(p - 40), fA(I), f.contains(m))
2745
2745
  return;
2746
2746
  KA(f, m);
2747
2747
  } else
2748
- g || (await $A(p), u(n));
2748
+ g || (await $A(p), c(n));
2749
2749
  })();
2750
- else if (d) {
2751
- let S = () => {
2752
- let k = FA(f, n);
2753
- fA(k), !f.contains(m) && KA(f, m);
2750
+ else if (i) {
2751
+ let I = () => {
2752
+ let T = FA(f, n);
2753
+ fA(T), !f.contains(m) && KA(f, m);
2754
2754
  };
2755
- h && document.startViewTransition ? document.startViewTransition(S) : S();
2755
+ u && document.startViewTransition ? document.startViewTransition(I) : I();
2756
2756
  } else
2757
- g || u(n);
2758
- }, [d, b, n, s, a]), C.current ? Rt(r(t, { children: po && l ? R(fo, { mode: d ? "visible" : "hidden", children: [" ", e] }) : e }), m, n) : null;
2757
+ g || c(n);
2758
+ }, [i, C, n, s, a]), b.current ? Rt(r(t, { children: po && l ? R(fo, { mode: i ? "visible" : "hidden", children: [" ", e] }) : e }), m, n) : null;
2759
2759
  }, (A, t) => A.active === t.active && A.renderCount === t.renderCount && A.children === t.children && A.exclude === t.exclude && A.include === t.include), mo = bo, yo = (A) => {
2760
2760
  typeof nA < "u" && We(nA) ? nA(A) : A();
2761
2761
  }, vo = yo;
@@ -2763,62 +2763,62 @@ function hr() {
2763
2763
  return _(null);
2764
2764
  }
2765
2765
  function Co(A) {
2766
- let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: c, transition: u = !1, viewTransition: i = !1, duration: h = 200, children: p, aliveRef: b, maxAliveTime: C = 0, enableActivity: m = !1 } = A, g = a || _(null), [f, S] = ge([]);
2766
+ let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: i = "keep-alive-render", errorElement: h, transition: c = !1, viewTransition: d = !1, duration: u = 200, children: p, aliveRef: C, maxAliveTime: b = 0, enableActivity: m = !1 } = A, g = a || _(null), [f, I] = ge([]);
2767
2767
  kr(() => {
2768
2768
  IA(t) || vo(() => {
2769
- S((O) => {
2770
- let $ = Date.now();
2771
- if (O.find((M) => M.cacheKey === t))
2772
- return O.map((M) => {
2773
- if (M.cacheKey === t) {
2774
- let F = !1;
2775
- if (We(s) && s(t), C) {
2776
- let P = M.lastActiveTime;
2777
- if (hA(C)) {
2778
- let y = C.find((V) => lr(V.match) ? V.match.test(t) : V.match === t);
2779
- y && (F = y && P + y.expire * 1e3 < $);
2769
+ I((M) => {
2770
+ let O = Date.now();
2771
+ if (M.find((D) => D.cacheKey === t))
2772
+ return M.map((D) => {
2773
+ if (D.cacheKey === t) {
2774
+ let Q = !1;
2775
+ if (We(s) && s(t), b) {
2776
+ let P = D.lastActiveTime;
2777
+ if (hA(b)) {
2778
+ let v = b.find((K) => lr(K.match) ? K.match.test(t) : K.match === t);
2779
+ v && (Q = v && P + v.expire * 1e3 < O);
2780
2780
  } else
2781
- F = P + C * 1e3 < $;
2781
+ Q = P + b * 1e3 < O;
2782
2782
  }
2783
- return { ...M, ele: p, lastActiveTime: $, renderCount: F ? M.renderCount + 1 : M.renderCount };
2783
+ return { ...D, ele: p, lastActiveTime: O, renderCount: Q ? D.renderCount + 1 : D.renderCount };
2784
2784
  }
2785
- return M;
2785
+ return D;
2786
2786
  });
2787
- if (We(s) && s(t), O.length > o) {
2788
- let M = O.reduce((F, P) => F.lastActiveTime < P.lastActiveTime ? F : P);
2789
- O.splice(O.indexOf(M), 1);
2787
+ if (We(s) && s(t), M.length > o) {
2788
+ let D = M.reduce((Q, P) => Q.lastActiveTime < P.lastActiveTime ? Q : P);
2789
+ M.splice(M.indexOf(D), 1);
2790
2790
  }
2791
- return [...O, { cacheKey: t, lastActiveTime: $, ele: p, renderCount: 0 }];
2791
+ return [...M, { cacheKey: t, lastActiveTime: O, ele: p, renderCount: 0 }];
2792
2792
  });
2793
2793
  });
2794
2794
  }, [t, p]);
2795
- let k = w((O) => {
2796
- S(($) => {
2797
- let M = O || t;
2798
- return $.map((F) => F.cacheKey === M ? { ...F, renderCount: F.renderCount + 1 } : F);
2795
+ let T = S((M) => {
2796
+ I((O) => {
2797
+ let D = M || t;
2798
+ return O.map((Q) => Q.cacheKey === D ? { ...Q, renderCount: Q.renderCount + 1 } : Q);
2799
2799
  });
2800
- }, [S, t]), D = w((O) => {
2801
- let $ = O || t, M = hA($) ? $ : [$];
2802
- return new Promise((F) => {
2800
+ }, [I, t]), L = S((M) => {
2801
+ let O = M || t, D = hA(O) ? O : [O];
2802
+ return new Promise((Q) => {
2803
2803
  lA(() => {
2804
- S((P) => [...P.filter((y) => !M.includes(y.cacheKey))]), F();
2804
+ I((P) => [...P.filter((v) => !D.includes(v.cacheKey))]), Q();
2805
2805
  });
2806
2806
  });
2807
- }, [S, t]), j = w(() => new Promise((O) => {
2807
+ }, [I, t]), X = S(() => new Promise((M) => {
2808
2808
  lA(() => {
2809
- S([]), O();
2809
+ I([]), M();
2810
2810
  });
2811
- }), [S]), z = w((O) => {
2812
- let $ = O || t;
2813
- return new Promise((M) => {
2811
+ }), [I]), F = S((M) => {
2812
+ let O = M || t;
2813
+ return new Promise((D) => {
2814
2814
  lA(() => {
2815
- S((F) => [...F.filter((P) => P.cacheKey === $)]), M();
2815
+ I((Q) => [...Q.filter((P) => P.cacheKey === O)]), D();
2816
2816
  });
2817
2817
  });
2818
- }, [t, S]), U = w(() => f, [f]);
2819
- return xr(b, () => ({ refresh: k, destroy: D, destroyAll: j, destroyOther: z, getCacheNodes: U })), R(UA, { children: [r("div", { ref: g, className: d, style: { height: "100%" } }), f.map((O) => {
2820
- let { cacheKey: $, ele: M, renderCount: F } = O;
2821
- return r(ho, { active: t === $, refresh: k, destroy: D, destroyAll: j, destroyOther: z, getCacheNodes: U, children: r(mo, { destroy: D, include: n, exclude: e, transition: u, viewTransition: i, duration: h, renderCount: F, containerDivRef: g, errorElement: c, active: t === $, cacheNodeClassName: l, cacheKey: $, enableActivity: m, children: M }) }, `${$}-${F}`);
2818
+ }, [t, I]), U = S(() => f, [f]);
2819
+ return xr(C, () => ({ refresh: T, destroy: L, destroyAll: X, destroyOther: F, getCacheNodes: U })), R(UA, { children: [r("div", { ref: g, className: i, style: { height: "100%" } }), f.map((M) => {
2820
+ let { cacheKey: O, ele: D, renderCount: Q } = M;
2821
+ return r(ho, { active: t === O, refresh: T, destroy: L, destroyAll: X, destroyOther: F, getCacheNodes: U, children: r(mo, { destroy: L, include: n, exclude: e, transition: c, viewTransition: d, duration: u, renderCount: Q, containerDivRef: g, errorElement: h, active: t === O, cacheNodeClassName: l, cacheKey: O, enableActivity: m, children: D }) }, `${O}-${Q}`);
2822
2822
  })] });
2823
2823
  }
2824
2824
  var wo = Co, So = () => ve(ir), fr = So;
@@ -2838,7 +2838,7 @@ function ko(A, t, o = !1, e) {
2838
2838
  }, [n, ...t]);
2839
2839
  }
2840
2840
  var xo = ko, Io = (A, t, o = !1) => {
2841
- xo(A, t, o, te);
2841
+ xo(A, t, o, oe);
2842
2842
  }, To = Io;
2843
2843
  const pr = Ne({
2844
2844
  isVisible: !0,
@@ -2872,28 +2872,28 @@ const pr = Ne({
2872
2872
  }, gr = Ne(null), eA = (A) => null, Po = (A) => A.includes(":"), Lo = (A, t) => Po(A) ? t : A, Mo = ({ children: A }) => {
2873
2873
  const { active: t } = fr(), o = Ar(), e = Xe(), n = vt(), s = _(o), [a, l] = ge(o);
2874
2874
  s.current = o;
2875
- const d = _({ location: e, navigationType: n });
2876
- t && (d.current = { location: e, navigationType: n });
2877
- const c = ce(
2878
- () => t ? { location: e, navigationType: n } : d.current,
2875
+ const i = _({ location: e, navigationType: n });
2876
+ t && (i.current = { location: e, navigationType: n });
2877
+ const h = ce(
2878
+ () => t ? { location: e, navigationType: n } : i.current,
2879
2879
  [t, e, n]
2880
- ), [u, i] = ge(0), h = _(t);
2880
+ ), [c, d] = ge(0), u = _(t);
2881
2881
  To(() => {
2882
2882
  l(s.current), requestAnimationFrame(() => {
2883
2883
  window.dispatchEvent(new Event("resize"));
2884
2884
  });
2885
- }, []), te(() => {
2886
- t && (l(s.current), h.current || i((b) => b + 1)), h.current = t;
2885
+ }, []), oe(() => {
2886
+ t && (l(s.current), u.current || d((C) => C + 1)), u.current = t;
2887
2887
  }, [t]);
2888
2888
  const p = ce(
2889
- () => ({ isVisible: t, wasRestored: u > 0, restoreCount: u }),
2890
- [t, u]
2889
+ () => ({ isVisible: t, wasRestored: c > 0, restoreCount: c }),
2890
+ [t, c]
2891
2891
  );
2892
- return /* @__PURE__ */ r(Ct.Provider, { value: c, children: /* @__PURE__ */ r(pr.Provider, { value: p, children: /* @__PURE__ */ r(TA.Provider, { value: { params: a }, children: A }) }) });
2893
- }, Do = "__nokeep__:", br = Se.memo(({ keepAlivePaths: A, maxKeepAliveTabs: t, aliveRef: o }) => {
2892
+ return /* @__PURE__ */ r(Ct.Provider, { value: h, children: /* @__PURE__ */ r(pr.Provider, { value: p, children: /* @__PURE__ */ r(TA.Provider, { value: { params: a }, children: A }) }) });
2893
+ }, Do = "__nokeep__:", br = xe.memo(({ keepAlivePaths: A, maxKeepAliveTabs: t, aliveRef: o }) => {
2894
2894
  const e = Xe(), n = mt(), s = ce(() => {
2895
2895
  const l = A.find(
2896
- (d) => yt({ path: d, end: !0 }, e.pathname)
2896
+ (i) => yt({ path: i, end: !0 }, e.pathname)
2897
2897
  );
2898
2898
  return l ? Lo(l, e.pathname) : Do + e.pathname;
2899
2899
  }, [A, e.pathname]), a = ce(() => [/^__nokeep__:/], []);
@@ -2910,40 +2910,40 @@ const pr = Ne({
2910
2910
  });
2911
2911
  br.displayName = "KeepAliveLayout";
2912
2912
  const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
2913
- const e = hr(), s = ve(gr) || e, a = _(null), l = _(""), { keepAlivePaths: d, routeElements: c } = ce(() => {
2914
- const p = Se.Children.toArray(A), b = p.map((f) => {
2915
- if (Se.isValidElement(f)) {
2916
- const S = f.props?.path || "", k = f.type === eA;
2917
- return `${S}:${k}`;
2913
+ const e = hr(), s = ve(gr) || e, a = _(null), l = _(""), { keepAlivePaths: i, routeElements: h } = ce(() => {
2914
+ const p = xe.Children.toArray(A), C = p.map((f) => {
2915
+ if (xe.isValidElement(f)) {
2916
+ const I = f.props?.path || "", T = f.type === eA;
2917
+ return `${I}:${T}`;
2918
2918
  }
2919
2919
  return "";
2920
2920
  }).join("|");
2921
- if (a.current && l.current === b)
2921
+ if (a.current && l.current === C)
2922
2922
  return a.current;
2923
- l.current = b;
2924
- const C = [], m = [];
2923
+ l.current = C;
2924
+ const b = [], m = [];
2925
2925
  p.forEach((f) => {
2926
- if (Se.isValidElement(f))
2926
+ if (xe.isValidElement(f))
2927
2927
  if (f.type === eA) {
2928
- const S = f.props;
2929
- S.path && C.push(S.path);
2930
- const k = S.component, D = typeof k == "function" ? Se.createElement(k) : k;
2928
+ const I = f.props;
2929
+ I.path && b.push(I.path);
2930
+ const T = I.component, L = typeof T == "function" ? xe.createElement(T) : T;
2931
2931
  m.push(
2932
2932
  /* @__PURE__ */ r(
2933
2933
  Ke,
2934
2934
  {
2935
- path: S.path,
2936
- element: /* @__PURE__ */ r(Mo, { children: D })
2935
+ path: I.path,
2936
+ element: /* @__PURE__ */ r(Mo, { children: L })
2937
2937
  },
2938
- S.path || f.key
2938
+ I.path || f.key
2939
2939
  )
2940
2940
  );
2941
2941
  } else
2942
2942
  m.push(f);
2943
2943
  });
2944
- const g = { keepAlivePaths: C, routeElements: m };
2944
+ const g = { keepAlivePaths: b, routeElements: m };
2945
2945
  return a.current = g, g;
2946
- }, [A]), u = ve(Ze), i = ce(() => ({
2946
+ }, [A]), c = ve(Ze), d = ce(() => ({
2947
2947
  requestUnregister: (p) => {
2948
2948
  s.current?.destroy(p);
2949
2949
  },
@@ -2957,15 +2957,15 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
2957
2957
  s.current?.destroyOther(p);
2958
2958
  },
2959
2959
  getCacheNodes: () => s.current?.getCacheNodes() || []
2960
- }), [s]), h = /* @__PURE__ */ r(er, { ...o, children: /* @__PURE__ */ r(Ke, { element: /* @__PURE__ */ r(
2960
+ }), [s]), u = /* @__PURE__ */ r(er, { ...o, children: /* @__PURE__ */ r(Ke, { element: /* @__PURE__ */ r(
2961
2961
  br,
2962
2962
  {
2963
- keepAlivePaths: d,
2963
+ keepAlivePaths: i,
2964
2964
  maxKeepAliveTabs: t,
2965
2965
  aliveRef: s
2966
2966
  }
2967
- ), children: c }) });
2968
- return u ? h : /* @__PURE__ */ r(Ze.Provider, { value: i, children: h });
2967
+ ), children: h }) });
2968
+ return c ? u : /* @__PURE__ */ r(Ze.Provider, { value: d, children: u });
2969
2969
  }, mr = Ne({
2970
2970
  start: () => {
2971
2971
  },
@@ -2974,13 +2974,13 @@ const No = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
2974
2974
  isNavigating: !1
2975
2975
  }), yr = () => ve(mr), zo = 150;
2976
2976
  function Oo({ children: A }) {
2977
- const [t, o] = ge(!1), e = _(null), n = _(0), s = w(() => {
2977
+ const [t, o] = ge(!1), e = _(null), n = _(0), s = S(() => {
2978
2978
  e.current && clearTimeout(e.current), n.current = Date.now(), o(!0);
2979
- }, []), a = w(() => {
2980
- const l = Date.now() - n.current, d = Math.max(0, zo - l);
2979
+ }, []), a = S(() => {
2980
+ const l = Date.now() - n.current, i = Math.max(0, zo - l);
2981
2981
  e.current = setTimeout(() => {
2982
2982
  o(!1);
2983
- }, d);
2983
+ }, i);
2984
2984
  }, []);
2985
2985
  return /* @__PURE__ */ R(mr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
2986
2986
  /* @__PURE__ */ r("div", { className: "archbase-nav-progress", "data-active": t, children: /* @__PURE__ */ r("div", { className: "archbase-nav-progress-bar" }) }),
@@ -3020,59 +3020,59 @@ function Qo({
3020
3020
  sideBarHiddenBreakPoint: s,
3021
3021
  sideBarFooterHeight: a,
3022
3022
  sideBarFooterContent: l,
3023
- onCollapsedSideBar: d,
3024
- onHiddenSidebar: c,
3025
- sidebarSelectedGroupName: u,
3026
- sidebarDefaultGroupIcon: i,
3027
- sideBarHeaderHeight: h,
3023
+ onCollapsedSideBar: i,
3024
+ onHiddenSidebar: h,
3025
+ sidebarSelectedGroupName: c,
3026
+ sidebarDefaultGroupIcon: d,
3027
+ sideBarHeaderHeight: u,
3028
3028
  sideBarHeaderContent: p,
3029
- selectedGroupColor: b = "#132441",
3030
- groupColor: C = "white",
3029
+ selectedGroupColor: C = "#132441",
3030
+ groupColor: b = "white",
3031
3031
  backgroundGroupColor: m = "#132441",
3032
3032
  groupLabelDarkColor: g = "white",
3033
3033
  groupLabelLightColor: f = "white",
3034
- headerColor: S,
3035
- footerHeight: k,
3036
- iconsWithBackground: D,
3037
- menuItemHeight: j,
3038
- showSideBar: z = !0,
3034
+ headerColor: I,
3035
+ footerHeight: T,
3036
+ iconsWithBackground: L,
3037
+ menuItemHeight: X,
3038
+ showSideBar: F = !0,
3039
3039
  showHeader: U = !0,
3040
- headerStyle: O = {},
3041
- highlightActiveMenuItem: $ = !0,
3042
- customRenderSidebar: M,
3043
- showCollapsedButton: F = !0,
3040
+ headerStyle: M = {},
3041
+ highlightActiveMenuItem: O = !0,
3042
+ customRenderSidebar: D,
3043
+ showCollapsedButton: Q = !0,
3044
3044
  sideBarBackgroundDarkColor: P,
3045
- sideBarBackgroundLightColor: y,
3046
- sideBarTextDarkColor: V,
3045
+ sideBarBackgroundLightColor: v,
3046
+ sideBarTextDarkColor: K,
3047
3047
  sideBarTextLightColor: E,
3048
3048
  sideBarIconDarkColor: W,
3049
- sideBarIconLightColor: H,
3050
- sideBarBackgroundImage: I,
3051
- mainBackground: G,
3052
- sideBarItemBorderRadius: ne,
3053
- sideBarItemHorizontalGap: we,
3054
- sideBarItemActiveBackground: se,
3049
+ sideBarIconLightColor: G,
3050
+ sideBarBackgroundImage: x,
3051
+ mainBackground: V,
3052
+ sideBarItemBorderRadius: se,
3053
+ sideBarItemHorizontalGap: Ce,
3054
+ sideBarItemActiveBackground: le,
3055
3055
  sideBarCollapsedSubmenuWidth: be,
3056
- sidebarActiveColor: ke,
3057
- maxKeepAliveTabs: T = 10,
3058
- sidebarVariant: v = "legacy",
3059
- sidebarShowSearch: Q = !1
3056
+ sidebarActiveColor: we,
3057
+ maxKeepAliveTabs: Se = 10,
3058
+ sidebarVariant: w = "legacy",
3059
+ sidebarShowSearch: k = !1
3060
3060
  }) {
3061
- const L = me(), x = ve(rA), { colorScheme: X } = de(), N = kt(), [Y, Ce] = xt(), le = St(
3062
- `(max-width: ${s ? fe(s) : L.breakpoints.md})`
3063
- ), xe = (ae) => {
3064
- ae.link && (ae.routeParams ? N(ae.link, {}, ae.routeParams) : N(ae.link));
3065
- }, Z = (ae, he) => {
3066
- ae == he && x.collapsed && x.setCollapsed(!1), x.setCollapsed(ae == he);
3061
+ const N = me(), y = ve(rA), { colorScheme: H } = de(), Y = kt(), [z, j] = xt(), Z = St(
3062
+ `(max-width: ${s ? fe(s) : N.breakpoints.md})`
3063
+ ), ke = (ae) => {
3064
+ ae.link && (ae.routeParams ? Y(ae.link, {}, ae.routeParams) : Y(ae.link));
3065
+ }, ee = (ae, he) => {
3066
+ ae == he && y.collapsed && y.setCollapsed(!1), y.setCollapsed(ae == he);
3067
3067
  }, Ie = () => {
3068
3068
  let ae = 0, he = 0;
3069
- return h && (ae = Number(fe(h))), a && (he = Number(fe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + he}px)`;
3070
- }, ee = () => {
3069
+ return u && (ae = Number(fe(u))), a && (he = Number(fe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + he}px)`;
3070
+ }, Ae = () => {
3071
3071
  let ae = 0, he = 0;
3072
- return h && (ae = Number(fe(h))), a && (he = Number(fe(a))), `calc(100vh - 28px - ${ae + he}px)`;
3073
- }, Ae = ce(() => {
3072
+ return u && (ae = Number(fe(u))), a && (he = Number(fe(a))), `calc(100vh - 28px - ${ae + he}px)`;
3073
+ }, re = ce(() => {
3074
3074
  const ae = [];
3075
- return x.navigationData.forEach((he, Ge) => {
3075
+ return y.navigationData.forEach((he, Ge) => {
3076
3076
  he.links ? he.links.forEach((Oe, RA) => {
3077
3077
  Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${RA}`)) : ae.push(
3078
3078
  /* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${RA}`)
@@ -3083,103 +3083,103 @@ function Qo({
3083
3083
  /* @__PURE__ */ r(eA, { path: he.link, component: he.component }, `${he.link}_${Ge}`)
3084
3084
  );
3085
3085
  }), ae;
3086
- }, [x.navigationData, x.collapsed]), Ee = w(() => {
3087
- x.setCollapsed(!x.collapsed);
3088
- }, [x.setCollapsed, x.collapsed]), q = w(() => {
3089
- x.setHidden(!x.hidden);
3090
- }, [x.setHidden, x.hidden]);
3091
- te(() => {
3092
- c && c(x.hidden);
3093
- }, [x.hidden, q]), te(() => {
3094
- d && d(x.collapsed);
3095
- }, [x.collapsed, d]);
3096
- const ye = v === "minimal" || x.collapsed ? n : e, K = (ae, he = !1) => M ? M({ width: e, height: ae, isHidden: le }) : v === "legacy" ? /* @__PURE__ */ r(
3086
+ }, [y.navigationData, y.collapsed]), Ee = S(() => {
3087
+ y.setCollapsed(!y.collapsed);
3088
+ }, [y.setCollapsed, y.collapsed]), q = S(() => {
3089
+ y.setHidden(!y.hidden);
3090
+ }, [y.setHidden, y.hidden]);
3091
+ oe(() => {
3092
+ h && h(y.hidden);
3093
+ }, [y.hidden, q]), oe(() => {
3094
+ i && i(y.collapsed);
3095
+ }, [y.collapsed, i]);
3096
+ const ye = w === "minimal" || y.collapsed ? n : e, $ = (ae, he = !1) => D ? D({ width: e, height: ae, isHidden: Z }) : w === "legacy" ? /* @__PURE__ */ r(
3097
3097
  _t,
3098
3098
  {
3099
- navigationData: x.navigationData,
3099
+ navigationData: y.navigationData,
3100
3100
  sidebarHeight: ae,
3101
3101
  sidebarGroupWidth: n,
3102
3102
  sidebarCollapsedWidth: n,
3103
- selectedGroupColor: b,
3104
- groupColor: C,
3103
+ selectedGroupColor: C,
3104
+ groupColor: b,
3105
3105
  backgroundGroupColor: m,
3106
3106
  groupLabelDarkColor: g,
3107
3107
  groupLabelLightColor: f,
3108
3108
  showGroupLabels: !1,
3109
- collapsed: he ? !1 : x.collapsed,
3109
+ collapsed: he ? !1 : y.collapsed,
3110
3110
  sidebarWidth: e,
3111
- isHidden: le,
3112
- onMenuItemClick: xe,
3113
- onClickActionIcon: Z,
3111
+ isHidden: Z,
3112
+ onMenuItemClick: ke,
3113
+ onClickActionIcon: ee,
3114
3114
  sideBarFooterHeight: a,
3115
3115
  sideBarFooterContent: l,
3116
3116
  sideBarHeaderContent: p,
3117
- theme: L,
3118
- sidebarRef: Y,
3119
- defaultGroupIcon: i,
3120
- selectedGroupName: u,
3121
- iconsWithBackground: D,
3122
- menuItemHeight: j,
3123
- highlightActiveMenuItem: $,
3117
+ theme: N,
3118
+ sidebarRef: z,
3119
+ defaultGroupIcon: d,
3120
+ selectedGroupName: c,
3121
+ iconsWithBackground: L,
3122
+ menuItemHeight: X,
3123
+ highlightActiveMenuItem: O,
3124
3124
  backgroundDarkColor: P,
3125
- backgroundLightColor: y,
3126
- textDarkColor: V,
3125
+ backgroundLightColor: v,
3126
+ textDarkColor: K,
3127
3127
  textLightColor: E,
3128
3128
  iconDarkColor: W,
3129
- iconLightColor: H,
3129
+ iconLightColor: G,
3130
3130
  collapsedSubmenuWidth: be,
3131
- isLoading: x.isLoadingPermissions,
3132
- loadingError: x.permissionsError
3131
+ isLoading: y.isLoadingPermissions,
3132
+ loadingError: y.permissionsError
3133
3133
  }
3134
3134
  ) : /* @__PURE__ */ r(
3135
3135
  co,
3136
3136
  {
3137
- navigationData: x.navigationData,
3138
- variant: v,
3137
+ navigationData: y.navigationData,
3138
+ variant: w,
3139
3139
  width: ye,
3140
3140
  collapsedWidth: n,
3141
3141
  height: ae,
3142
3142
  groupColumnWidth: n,
3143
- collapsed: he ? !1 : x.collapsed,
3144
- onCollapsedChange: (Ge) => x.setCollapsed(Ge),
3145
- activeGroup: u,
3143
+ collapsed: he ? !1 : y.collapsed,
3144
+ onCollapsedChange: (Ge) => y.setCollapsed(Ge),
3145
+ activeGroup: c,
3146
3146
  onActiveGroupChange: (Ge) => {
3147
3147
  },
3148
- defaultGroupIcon: i,
3148
+ defaultGroupIcon: d,
3149
3149
  showGroupLabels: !1,
3150
- onMenuItemClick: xe,
3151
- showSearch: Q,
3150
+ onMenuItemClick: ke,
3151
+ showSearch: k,
3152
3152
  header: p,
3153
3153
  footer: l,
3154
3154
  footerHeight: a,
3155
- isLoading: x.isLoadingPermissions,
3156
- loadingError: x.permissionsError,
3157
- theme: L,
3158
- highlightActiveItem: $,
3155
+ isLoading: y.isLoadingPermissions,
3156
+ loadingError: y.permissionsError,
3157
+ theme: N,
3158
+ highlightActiveItem: O,
3159
3159
  backgroundDarkColor: P,
3160
- backgroundLightColor: y,
3161
- backgroundImage: I,
3162
- textDarkColor: V,
3160
+ backgroundLightColor: v,
3161
+ backgroundImage: x,
3162
+ textDarkColor: K,
3163
3163
  textLightColor: E,
3164
3164
  iconDarkColor: W,
3165
- iconLightColor: H,
3165
+ iconLightColor: G,
3166
3166
  groupBackgroundColor: m,
3167
- selectedGroupColor: b,
3168
- groupColor: C,
3167
+ selectedGroupColor: C,
3168
+ groupColor: b,
3169
3169
  groupLabelDarkColor: g,
3170
3170
  groupLabelLightColor: f,
3171
- activeColor: ke,
3172
- itemBorderRadius: ne,
3173
- itemHorizontalGap: we,
3174
- itemActiveBackground: se,
3171
+ activeColor: we,
3172
+ itemBorderRadius: se,
3173
+ itemHorizontalGap: Ce,
3174
+ itemActiveBackground: le,
3175
3175
  withBorder: !1,
3176
- sidebarRef: Y
3176
+ sidebarRef: z
3177
3177
  }
3178
- ), ue = X === "dark" ? P ?? L.colors.dark[7] : y ?? L.white, Qe = v === "legacy", Fe = Qe ? void 0 : {
3178
+ ), ue = H === "dark" ? P ?? N.colors.dark[7] : v ?? N.white, Qe = w === "legacy", Fe = Qe ? void 0 : {
3179
3179
  width: { base: ye },
3180
3180
  breakpoint: "sm",
3181
- collapsed: { mobile: le || !z, desktop: le || !z }
3182
- }, Ve = G ?? (X === "dark" ? L.colors.dark[8] : L.colors.gray[0]), wr = Qe ? {
3181
+ collapsed: { mobile: Z || !F, desktop: Z || !F }
3182
+ }, Ve = V ?? (H === "dark" ? N.colors.dark[8] : N.colors.gray[0]), wr = Qe ? {
3183
3183
  main: {
3184
3184
  background: Ve,
3185
3185
  overflow: "hidden"
@@ -3190,15 +3190,15 @@ function Qo({
3190
3190
  overflow: "hidden"
3191
3191
  },
3192
3192
  navbar: {
3193
- background: I ?? ue,
3193
+ background: x ?? ue,
3194
3194
  border: "none"
3195
3195
  }
3196
3196
  }, Sr = Qe ? {
3197
3197
  height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
3198
- width: `calc(100vw - var(--app-shell-padding) - calc(${le ? "0px" : ye} + 1rem))`,
3198
+ width: `calc(100vw - var(--app-shell-padding) - calc(${Z ? "0px" : ye} + 1rem))`,
3199
3199
  marginTop: "0.5rem",
3200
- marginLeft: `calc(${le ? "0px" : ye} + 0.5rem)`,
3201
- border: `1px solid ${X === "dark" ? L.colors.dark[4] : "#e4e9ef"}`,
3200
+ marginLeft: `calc(${Z ? "0px" : ye} + 0.5rem)`,
3201
+ border: `1px solid ${H === "dark" ? N.colors.dark[4] : "#e4e9ef"}`,
3202
3202
  borderRadius: "4px",
3203
3203
  overflow: "hidden"
3204
3204
  } : {
@@ -3207,7 +3207,7 @@ function Qo({
3207
3207
  marginTop: "0.5rem",
3208
3208
  marginLeft: "0.5rem",
3209
3209
  marginRight: "0.5rem",
3210
- border: `1px solid ${X === "dark" ? L.colors.dark[4] : "#e4e9ef"}`,
3210
+ border: `1px solid ${H === "dark" ? N.colors.dark[4] : "#e4e9ef"}`,
3211
3211
  borderRadius: "4px",
3212
3212
  overflow: "hidden"
3213
3213
  };
@@ -3216,49 +3216,49 @@ function Qo({
3216
3216
  {
3217
3217
  header: { height: "60px", collapsed: !U },
3218
3218
  navbar: Fe,
3219
- footer: { height: k || "0px" },
3219
+ footer: { height: T || "0px" },
3220
3220
  styles: wr,
3221
3221
  children: [
3222
3222
  /* @__PURE__ */ r(
3223
3223
  Be.Header,
3224
3224
  {
3225
3225
  p: "xs",
3226
- color: S,
3226
+ color: I,
3227
3227
  display: "flex",
3228
3228
  style: {
3229
3229
  backgroundColor: "var(--mantine-primary-color-8)",
3230
3230
  alignItems: "center",
3231
3231
  borderBottom: "none",
3232
- ...O
3232
+ ...M
3233
3233
  },
3234
3234
  children: t
3235
3235
  }
3236
3236
  ),
3237
- !le && z && /* @__PURE__ */ r(Be.Navbar, { children: K(Ie(), !1) }),
3237
+ !Z && F && /* @__PURE__ */ r(Be.Navbar, { children: $(Ie(), !1) }),
3238
3238
  /* @__PURE__ */ R(Be.Main, { children: [
3239
- !le && F && $o(
3240
- X,
3241
- L,
3242
- x,
3239
+ !Z && Q && $o(
3240
+ H,
3241
+ N,
3242
+ y,
3243
3243
  e,
3244
3244
  n,
3245
3245
  Ee
3246
3246
  ),
3247
3247
  /* @__PURE__ */ r(Ro, { children: /* @__PURE__ */ R("div", { style: Sr, children: [
3248
3248
  A,
3249
- /* @__PURE__ */ r(Ko, { maxKeepAliveTabs: T, routes: Ae })
3249
+ /* @__PURE__ */ r(Ko, { maxKeepAliveTabs: Se, routes: re })
3250
3250
  ] }) }),
3251
- z && /* @__PURE__ */ r(
3251
+ F && /* @__PURE__ */ r(
3252
3252
  qA,
3253
3253
  {
3254
- opened: x.hidden || !1,
3254
+ opened: y.hidden || !1,
3255
3255
  onClose: q,
3256
3256
  size: e,
3257
3257
  padding: 0,
3258
3258
  styles: {
3259
3259
  header: { minHeight: "10px" }
3260
3260
  },
3261
- children: K(ee(), !0)
3261
+ children: $(Ae(), !0)
3262
3262
  }
3263
3263
  )
3264
3264
  ] }),
@@ -3287,52 +3287,52 @@ function Gn({
3287
3287
  footer: s,
3288
3288
  owner: a,
3289
3289
  company: l,
3290
- sideBarWidth: d,
3291
- sideBarCollapsedWidth: c,
3292
- sideBarHiddenBreakPoint: u,
3293
- sideBarFooterHeight: i,
3294
- sideBarFooterContent: h,
3290
+ sideBarWidth: i,
3291
+ sideBarCollapsedWidth: h,
3292
+ sideBarHiddenBreakPoint: c,
3293
+ sideBarFooterHeight: d,
3294
+ sideBarFooterContent: u,
3295
3295
  onCollapsedSideBar: p,
3296
- onHiddenSidebar: b,
3297
- sidebarDefaultGroupIcon: C,
3296
+ onHiddenSidebar: C,
3297
+ sidebarDefaultGroupIcon: b,
3298
3298
  sidebarSelectedGroupName: m,
3299
3299
  sideBarHeaderHeight: g,
3300
3300
  sideBarHeaderContent: f,
3301
- selectedGroupColor: S = "#132441",
3302
- groupColor: k = "white",
3303
- backgroundGroupColor: D = "#132441",
3304
- groupLabelDarkColor: j = "white",
3305
- groupLabelLightColor: z = "white",
3301
+ selectedGroupColor: I = "#132441",
3302
+ groupColor: T = "white",
3303
+ backgroundGroupColor: L = "#132441",
3304
+ groupLabelDarkColor: X = "white",
3305
+ groupLabelLightColor: F = "white",
3306
3306
  headerColor: U,
3307
- footerHeight: O,
3308
- iconsWithBackground: $,
3309
- menuItemHeight: M,
3310
- showSideBar: F,
3307
+ footerHeight: M,
3308
+ iconsWithBackground: O,
3309
+ menuItemHeight: D,
3310
+ showSideBar: Q,
3311
3311
  showHeader: P,
3312
- headerStyle: y,
3313
- highlightActiveMenuItem: V,
3312
+ headerStyle: v,
3313
+ highlightActiveMenuItem: K,
3314
3314
  enableSecurity: E = !1,
3315
3315
  securityOptions: W,
3316
- customRenderSidebar: H,
3317
- onNavigationDataChange: I,
3318
- showCollapsedButton: G,
3319
- initialSidebarCollapsed: ne = !1,
3320
- sideBarBackgroundDarkColor: we,
3321
- sideBarBackgroundLightColor: se,
3316
+ customRenderSidebar: G,
3317
+ onNavigationDataChange: x,
3318
+ showCollapsedButton: V,
3319
+ initialSidebarCollapsed: se = !1,
3320
+ sideBarBackgroundDarkColor: Ce,
3321
+ sideBarBackgroundLightColor: le,
3322
3322
  sideBarTextDarkColor: be,
3323
- sideBarTextLightColor: ke,
3324
- sideBarIconDarkColor: T,
3325
- sideBarIconLightColor: v,
3326
- sideBarBackgroundImage: Q,
3327
- mainBackground: L,
3328
- sideBarItemBorderRadius: x,
3329
- sideBarItemHorizontalGap: X,
3330
- sideBarItemActiveBackground: N,
3331
- sideBarCollapsedSubmenuWidth: Y,
3332
- sidebarActiveColor: Ce,
3333
- maxKeepAliveTabs: le = 10,
3334
- sidebarVariant: xe = "legacy",
3335
- sidebarShowSearch: Z = !1
3323
+ sideBarTextLightColor: we,
3324
+ sideBarIconDarkColor: Se,
3325
+ sideBarIconLightColor: w,
3326
+ sideBarBackgroundImage: k,
3327
+ mainBackground: N,
3328
+ sideBarItemBorderRadius: y,
3329
+ sideBarItemHorizontalGap: H,
3330
+ sideBarItemActiveBackground: Y,
3331
+ sideBarCollapsedSubmenuWidth: z,
3332
+ sidebarActiveColor: j,
3333
+ maxKeepAliveTabs: Z = 10,
3334
+ sidebarVariant: ke = "legacy",
3335
+ sidebarShowSearch: ee = !1
3336
3336
  }) {
3337
3337
  return /* @__PURE__ */ r(
3338
3338
  Kt,
@@ -3344,8 +3344,8 @@ function Gn({
3344
3344
  company: l,
3345
3345
  enableSecurity: E,
3346
3346
  securityOptions: W,
3347
- onNavigationDataChange: I,
3348
- initialSidebarCollapsed: ne,
3347
+ onNavigationDataChange: x,
3348
+ initialSidebarCollapsed: se,
3349
3349
  children: /* @__PURE__ */ r(
3350
3350
  Qo,
3351
3351
  {
@@ -3355,49 +3355,49 @@ function Gn({
3355
3355
  footer: s,
3356
3356
  owner: a,
3357
3357
  company: l,
3358
- sideBarWidth: d,
3359
- sideBarCollapsedWidth: c,
3360
- sideBarHiddenBreakPoint: u,
3358
+ sideBarWidth: i,
3359
+ sideBarCollapsedWidth: h,
3360
+ sideBarHiddenBreakPoint: c,
3361
3361
  sideBarHeaderHeight: g,
3362
3362
  sideBarHeaderContent: f,
3363
- sideBarFooterHeight: i,
3364
- sideBarFooterContent: h,
3365
- selectedGroupColor: S,
3366
- groupColor: k,
3367
- backgroundGroupColor: D,
3368
- groupLabelDarkColor: j,
3369
- groupLabelLightColor: z,
3363
+ sideBarFooterHeight: d,
3364
+ sideBarFooterContent: u,
3365
+ selectedGroupColor: I,
3366
+ groupColor: T,
3367
+ backgroundGroupColor: L,
3368
+ groupLabelDarkColor: X,
3369
+ groupLabelLightColor: F,
3370
3370
  onCollapsedSideBar: p,
3371
- onHiddenSidebar: b,
3372
- sidebarDefaultGroupIcon: C,
3371
+ onHiddenSidebar: C,
3372
+ sidebarDefaultGroupIcon: b,
3373
3373
  sidebarSelectedGroupName: m,
3374
3374
  headerColor: U,
3375
- footerHeight: O,
3376
- iconsWithBackground: $,
3377
- menuItemHeight: M,
3378
- showSideBar: F,
3375
+ footerHeight: M,
3376
+ iconsWithBackground: O,
3377
+ menuItemHeight: D,
3378
+ showSideBar: Q,
3379
3379
  showHeader: P,
3380
- headerStyle: y,
3381
- highlightActiveMenuItem: V,
3380
+ headerStyle: v,
3381
+ highlightActiveMenuItem: K,
3382
3382
  enableSecurity: E,
3383
- customRenderSidebar: H,
3384
- showCollapsedButton: G,
3385
- sideBarBackgroundDarkColor: we,
3386
- sideBarBackgroundLightColor: se,
3383
+ customRenderSidebar: G,
3384
+ showCollapsedButton: V,
3385
+ sideBarBackgroundDarkColor: Ce,
3386
+ sideBarBackgroundLightColor: le,
3387
3387
  sideBarTextDarkColor: be,
3388
- sideBarTextLightColor: ke,
3389
- sideBarIconDarkColor: T,
3390
- sideBarIconLightColor: v,
3391
- sideBarBackgroundImage: Q,
3392
- mainBackground: L,
3393
- sideBarItemBorderRadius: x,
3394
- sideBarItemHorizontalGap: X,
3395
- sideBarItemActiveBackground: N,
3396
- sideBarCollapsedSubmenuWidth: Y,
3397
- sidebarActiveColor: Ce,
3398
- maxKeepAliveTabs: le,
3399
- sidebarVariant: xe,
3400
- sidebarShowSearch: Z,
3388
+ sideBarTextLightColor: we,
3389
+ sideBarIconDarkColor: Se,
3390
+ sideBarIconLightColor: w,
3391
+ sideBarBackgroundImage: k,
3392
+ mainBackground: N,
3393
+ sideBarItemBorderRadius: y,
3394
+ sideBarItemHorizontalGap: H,
3395
+ sideBarItemActiveBackground: Y,
3396
+ sideBarCollapsedSubmenuWidth: z,
3397
+ sidebarActiveColor: j,
3398
+ maxKeepAliveTabs: Z,
3399
+ sidebarVariant: ke,
3400
+ sidebarShowSearch: ee,
3401
3401
  children: e
3402
3402
  }
3403
3403
  )
@@ -3427,7 +3427,7 @@ const vr = Ne({
3427
3427
  return s;
3428
3428
  }
3429
3429
  }, [e, n] = Ir(o, t);
3430
- return Se.useEffect(() => {
3430
+ return xe.useEffect(() => {
3431
3431
  let s = null;
3432
3432
  return e.userCloseLinkRequest && !e.linkClosed && (s = setTimeout(() => {
3433
3433
  n({ type: "CLOSE_ALLOWED", link: e.userCloseLinkRequest });
@@ -3441,10 +3441,10 @@ const vr = Ne({
3441
3441
  throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
3442
3442
  return A;
3443
3443
  }, Un = (A, t) => {
3444
- const o = Cr(), { state: e, dispatch: n } = o, s = w((d) => {
3445
- n({ type: "CLOSE_ALLOWED", link: A, payload: d });
3444
+ const o = Cr(), { state: e, dispatch: n } = o, s = S((i) => {
3445
+ n({ type: "CLOSE_ALLOWED", link: A, payload: i });
3446
3446
  }, [n, A]), a = _(t);
3447
- a.current = t, te(() => {
3447
+ a.current = t, oe(() => {
3448
3448
  e && e.userCloseLinkRequest && e.userCloseLinkRequest === A && a.current();
3449
3449
  }, [e, A]);
3450
3450
  const l = e.isClosing && e.userCloseLinkRequest === A;
@@ -3510,202 +3510,204 @@ function Hn({
3510
3510
  onChangeOpenedTabs: t,
3511
3511
  onChangeActiveTabId: o,
3512
3512
  activeTabId: e,
3513
- openedTabs: n = []
3513
+ openedTabs: n = [],
3514
+ colors: s
3514
3515
  }) {
3515
- const [s, a] = Se.useTransition(), l = qe(), { colorScheme: d } = de(), [c, u] = ge(n), [i, h] = ge(e), p = _(void 0), b = je(), C = _([]);
3516
- Pt(C);
3517
- const m = Cr(), { state: g, dispatch: f } = m, S = ve(rA), k = Eo(), { start: D, done: j } = yr(), z = AA((T) => T.clearSnapshot), U = AA((T) => T.removeTab), O = _(t), $ = _(o);
3518
- te(() => {
3519
- O.current = t, $.current = o;
3516
+ const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e), C = _(void 0), b = je(), m = _([]);
3517
+ Pt(m);
3518
+ const g = Cr(), { state: f, dispatch: I } = g, T = ve(rA), L = Eo(), { start: X, done: F } = yr(), U = AA((w) => w.clearSnapshot), M = AA((w) => w.removeTab), O = _(t), D = _(o);
3519
+ oe(() => {
3520
+ O.current = t, D.current = o;
3520
3521
  });
3521
- const M = _(i);
3522
- te(() => {
3523
- p.current = M.current, M.current = i;
3524
- }, [i]);
3525
- const F = _(!1), P = w((T, v) => {
3526
- D(), k ? k.destroy(T) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), z(T), U(T);
3527
- const Q = c.findIndex((Y) => Y.path === T);
3528
- let L = v?.redirectUrl;
3529
- !L && Q >= 0 && (L = c[Q].redirect);
3530
- const x = c.filter((Y) => Y.id !== T);
3531
- let X = null;
3532
- if (p.current && p.current !== T) {
3533
- const Y = x.find((Ce) => Ce.id === p.current);
3534
- Y && (X = Y.id);
3522
+ const Q = _(u);
3523
+ oe(() => {
3524
+ C.current = Q.current, Q.current = u;
3525
+ }, [u]);
3526
+ const P = _(!1), v = S((w, k) => {
3527
+ X(), L ? L.destroy(w) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), U(w), M(w);
3528
+ const N = c.findIndex((j) => j.path === w);
3529
+ let y = k?.redirectUrl;
3530
+ !y && N >= 0 && (y = c[N].redirect);
3531
+ const H = c.filter((j) => j.id !== w);
3532
+ let Y = null;
3533
+ if (C.current && C.current !== w) {
3534
+ const j = H.find((Z) => Z.id === C.current);
3535
+ j && (Y = j.id);
3535
3536
  }
3536
- if (!X) {
3537
- let Y = -1;
3538
- x.forEach((Ce, le) => Ce.id === i && (Y = le)), x.length > 0 && x[Y] ? X = x[Y].id : x.length > 0 && (X = x[x.length - 1].id);
3537
+ if (!Y) {
3538
+ let j = -1;
3539
+ H.forEach((Z, ke) => Z.id === u && (j = ke)), H.length > 0 && H[j] ? Y = H[j].id : H.length > 0 && (Y = H[H.length - 1].id);
3539
3540
  }
3540
- const N = x.map((Y) => ({
3541
- ...Y,
3542
- active: X === Y.id
3541
+ const z = H.map((j) => ({
3542
+ ...j,
3543
+ active: Y === j.id
3543
3544
  }));
3544
- if (u(N), X && X != null)
3545
- h(X), l(L || X);
3545
+ if (d(z), Y && Y != null)
3546
+ p(Y), i(y || Y);
3546
3547
  else {
3547
- if (h(void 0), !S.navigationRootLink) {
3548
+ if (p(void 0), !T.navigationRootLink) {
3548
3549
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3549
3550
  return;
3550
3551
  }
3551
- l(S.navigationRootLink);
3552
+ i(T.navigationRootLink);
3552
3553
  }
3553
- f({ type: "DONE", link: "" }), j();
3554
- }, [c, i, l, S.navigationRootLink, f, k, D, j, z, U]);
3555
- te(() => {
3556
- g?.linkClosed && P(g?.linkClosed, g?.payload);
3557
- }, [g?.linkClosed, g?.payload, P]);
3558
- const y = (T) => {
3559
- const v = {
3554
+ I({ type: "DONE", link: "" }), F();
3555
+ }, [c, u, i, T.navigationRootLink, I, L, X, F, U, M]);
3556
+ oe(() => {
3557
+ f?.linkClosed && v(f?.linkClosed, f?.payload);
3558
+ }, [f?.linkClosed, f?.payload, v]);
3559
+ const K = (w) => {
3560
+ const k = {
3560
3561
  item: void 0,
3561
3562
  title: void 0,
3562
- link: T,
3563
+ link: w,
3563
3564
  redirect: void 0,
3564
3565
  customTitle: void 0
3565
3566
  };
3566
- return A.forEach((Q) => {
3567
- if (Q.links)
3568
- Q.links.forEach((L) => {
3569
- MA({ path: L.link || "" }, location.pathname) && (v.item = L, v.title = `${oe().t(L.label)}`, v.redirect = L.redirect, v.customTitle = L.customTitle);
3567
+ return A.forEach((N) => {
3568
+ if (N.links)
3569
+ N.links.forEach((y) => {
3570
+ MA({ path: y.link || "" }, location.pathname) && (k.item = y, k.title = `${ne().t(y.label)}`, k.redirect = y.redirect, k.customTitle = y.customTitle);
3570
3571
  });
3571
- else if (Q.link && !v.item) {
3572
- const L = MA({ path: Q.link }, location.pathname);
3573
- L && (L.params && Object.keys(L.params).length > 0 ? v.title = `${L.params[Object.keys(L.params)[0]]}` : v.title = `${oe().t(Q.label)}`, v.item = Q, v.redirect = Q.redirect, v.customTitle = Q.customTitle);
3572
+ else if (N.link && !k.item) {
3573
+ const y = MA({ path: N.link }, location.pathname);
3574
+ y && (y.params && Object.keys(y.params).length > 0 ? k.title = `${y.params[Object.keys(y.params)[0]]}` : k.title = `${ne().t(N.label)}`, k.item = N, k.redirect = N.redirect, k.customTitle = N.customTitle);
3574
3575
  }
3575
- }), v.customTitle && (v.customTitle = v.customTitle.replace("$title", v.title)), v;
3576
+ }), k.customTitle && (k.customTitle = k.customTitle.replace("$title", k.title)), k;
3576
3577
  };
3577
- te(() => {
3578
- u(n), F.current = !0;
3578
+ oe(() => {
3579
+ d(n), P.current = !0;
3579
3580
  }, [JSON.stringify(n)]);
3580
- const V = _(c), E = _(i);
3581
- te(() => {
3582
- if (F.current) {
3583
- F.current = !1, V.current = c, E.current = i;
3581
+ const E = _(c), W = _(u);
3582
+ oe(() => {
3583
+ if (P.current) {
3584
+ P.current = !1, E.current = c, W.current = u;
3584
3585
  return;
3585
3586
  }
3586
- const T = JSON.stringify(V.current) !== JSON.stringify(c), v = E.current !== i;
3587
- if (T || v) {
3588
- const Q = setTimeout(() => {
3589
- O.current?.(c), $.current?.(i);
3587
+ const w = JSON.stringify(E.current) !== JSON.stringify(c), k = W.current !== u;
3588
+ if (w || k) {
3589
+ const N = setTimeout(() => {
3590
+ O.current?.(c), D.current?.(u);
3590
3591
  }, 0);
3591
- return V.current = c, E.current = i, () => clearTimeout(Q);
3592
+ return E.current = c, W.current = u, () => clearTimeout(N);
3592
3593
  }
3593
- }, [c, i]);
3594
- const W = _("");
3595
- te(() => {
3596
- if (W.current === b.pathname)
3594
+ }, [c, u]);
3595
+ const G = _("");
3596
+ oe(() => {
3597
+ if (G.current === b.pathname)
3597
3598
  return;
3598
- W.current = b.pathname;
3599
- const T = y(b.pathname);
3600
- if (T && T.item) {
3601
- const v = c.findIndex((Q) => Q.path === T.link);
3602
- if (v !== -1) {
3603
- if (c[v].title !== T.title) {
3604
- const Q = [...c];
3605
- Q[v] = { ...Q[v], title: T.title }, u(Q);
3599
+ G.current = b.pathname;
3600
+ const w = K(b.pathname);
3601
+ if (w && w.item) {
3602
+ const k = c.findIndex((N) => N.path === w.link);
3603
+ if (k !== -1) {
3604
+ if (c[k].title !== w.title) {
3605
+ const N = [...c];
3606
+ N[k] = { ...N[k], title: w.title }, d(N);
3606
3607
  }
3607
- h(c[v].id);
3608
+ p(c[k].id);
3608
3609
  } else {
3609
- const Q = {
3610
- id: `${T.link}`,
3611
- title: `${T.title}`,
3612
- path: `${T.link}`,
3610
+ const N = {
3611
+ id: `${w.link}`,
3612
+ title: `${w.title}`,
3613
+ path: `${w.link}`,
3613
3614
  active: !0,
3614
- content: T.item.component,
3615
- iconClass: T.item.icon,
3615
+ content: w.item.component,
3616
+ iconClass: w.item.icon,
3616
3617
  closeButton: !0,
3617
- redirect: T.redirect,
3618
- customTitle: T.customTitle
3619
- }, L = [...c.map((x) => ({ ...x, active: !1 })), Q];
3620
- u(L), h(Q.id);
3618
+ redirect: w.redirect,
3619
+ customTitle: w.customTitle
3620
+ }, y = [...c.map((H) => ({ ...H, active: !1 })), N];
3621
+ d(y), p(N.id);
3621
3622
  }
3622
3623
  }
3623
3624
  }, [b.pathname]);
3624
- const H = (T) => {
3625
- const v = c.filter((Q) => Q.id === T);
3626
- v && v.length > 0 && b.pathname !== v[0].path && (D(), l(v[0].path)), a(() => {
3627
- h(T), j();
3625
+ const x = (w) => {
3626
+ const k = c.filter((N) => N.id === w);
3627
+ k && k.length > 0 && b.pathname !== k[0].path && (X(), i(k[0].path)), l(() => {
3628
+ p(w), F();
3628
3629
  });
3629
- }, I = (T) => {
3630
+ }, V = (w) => {
3630
3631
  try {
3631
- D(), f({ type: "USER_CLOSE_REQUEST", link: T });
3632
- } catch (v) {
3633
- console.error("[TabContainer] Dispatch failed:", v), j();
3632
+ X(), I({ type: "USER_CLOSE_REQUEST", link: w });
3633
+ } catch (k) {
3634
+ console.error("[TabContainer] Dispatch failed:", k), F();
3634
3635
  }
3635
- }, G = w(() => {
3636
- if (k?.destroyAll(), c.forEach((T) => {
3637
- z(T.id), U(T.id);
3638
- }), u([]), h(void 0), !S.navigationRootLink) {
3636
+ }, se = S(() => {
3637
+ if (L?.destroyAll(), c.forEach((w) => {
3638
+ U(w.id), M(w.id);
3639
+ }), d([]), p(void 0), !T.navigationRootLink) {
3639
3640
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3640
3641
  return;
3641
3642
  }
3642
- l(S.navigationRootLink);
3643
- }, [l, S.navigationRootLink, k, c, z, U]), ne = w((T) => {
3644
- const v = c.findIndex((N) => N.id === T);
3645
- if (v <= 0)
3643
+ i(T.navigationRootLink);
3644
+ }, [i, T.navigationRootLink, L, c, U, M]), Ce = S((w) => {
3645
+ const k = c.findIndex((z) => z.id === w);
3646
+ if (k <= 0)
3646
3647
  return;
3647
- c.slice(0, v).forEach((N) => {
3648
- k?.destroy(N.path), z(N.id), U(N.id);
3648
+ c.slice(0, k).forEach((z) => {
3649
+ L?.destroy(z.path), U(z.id), M(z.id);
3649
3650
  });
3650
- const L = c.slice(v), x = L.find((N) => N.id === i)?.id || L[0]?.id, X = L.map((N) => ({
3651
- ...N,
3652
- active: N.id === x
3651
+ const y = c.slice(k), H = y.find((z) => z.id === u)?.id || y[0]?.id, Y = y.map((z) => ({
3652
+ ...z,
3653
+ active: z.id === H
3653
3654
  }));
3654
- if (u(X), x) {
3655
- h(x);
3656
- const N = X.find((Y) => Y.id === x);
3657
- N && b.pathname !== N.path && l(N.path);
3655
+ if (d(Y), H) {
3656
+ p(H);
3657
+ const z = Y.find((j) => j.id === H);
3658
+ z && b.pathname !== z.path && i(z.path);
3658
3659
  }
3659
- }, [c, i, l, b.pathname, k, z, U]), we = w((T) => {
3660
- const v = c.findIndex((N) => N.id === T);
3661
- if (v === -1 || v >= c.length - 1)
3660
+ }, [c, u, i, b.pathname, L, U, M]), le = S((w) => {
3661
+ const k = c.findIndex((z) => z.id === w);
3662
+ if (k === -1 || k >= c.length - 1)
3662
3663
  return;
3663
- c.slice(v + 1).forEach((N) => {
3664
- k?.destroy(N.path), z(N.id), U(N.id);
3664
+ c.slice(k + 1).forEach((z) => {
3665
+ L?.destroy(z.path), U(z.id), M(z.id);
3665
3666
  });
3666
- const L = c.slice(0, v + 1), x = L.find((N) => N.id === i)?.id || L[L.length - 1]?.id, X = L.map((N) => ({
3667
- ...N,
3668
- active: N.id === x
3667
+ const y = c.slice(0, k + 1), H = y.find((z) => z.id === u)?.id || y[y.length - 1]?.id, Y = y.map((z) => ({
3668
+ ...z,
3669
+ active: z.id === H
3669
3670
  }));
3670
- if (u(X), x) {
3671
- h(x);
3672
- const N = X.find((Y) => Y.id === x);
3673
- N && b.pathname !== N.path && l(N.path);
3671
+ if (d(Y), H) {
3672
+ p(H);
3673
+ const z = Y.find((j) => j.id === H);
3674
+ z && b.pathname !== z.path && i(z.path);
3674
3675
  }
3675
- }, [c, i, l, b.pathname, k, z, U]), se = w((T) => {
3676
- const v = c.find((L) => L.id === T);
3677
- if (!v)
3676
+ }, [c, u, i, b.pathname, L, U, M]), be = S((w) => {
3677
+ const k = c.find((y) => y.id === w);
3678
+ if (!k)
3678
3679
  return;
3679
- k?.destroyOther(v.path), c.forEach((L) => {
3680
- L.id !== T && (z(L.id), U(L.id));
3680
+ L?.destroyOther(k.path), c.forEach((y) => {
3681
+ y.id !== w && (U(y.id), M(y.id));
3681
3682
  });
3682
- const Q = [{ ...v, active: !0 }];
3683
- u(Q), h(T), b.pathname !== v.path && l(v.path);
3684
- }, [c, l, b.pathname, k, z, U]), be = g?.isClosing ? g?.userCloseLinkRequest : void 0;
3685
- return /* @__PURE__ */ r("div", { ref: C, children: /* @__PURE__ */ r(
3683
+ const N = [{ ...k, active: !0 }];
3684
+ d(N), p(w), b.pathname !== k.path && i(k.path);
3685
+ }, [c, i, b.pathname, L, U, M]), we = f?.isClosing ? f?.userCloseLinkRequest : void 0;
3686
+ return /* @__PURE__ */ r("div", { ref: m, children: /* @__PURE__ */ r(
3686
3687
  Lt,
3687
3688
  {
3688
3689
  buttonCloseOnlyActiveTab: !0,
3689
- onClick: (T) => H(T),
3690
- onTabClose: (T) => I(T),
3691
- onTabChange: (T) => null,
3692
- onCloseAllTabs: G,
3693
- onCloseLeftTabs: ne,
3694
- onCloseRightTabs: we,
3695
- onCloseOtherTabs: se,
3696
- currentTabs: ((T) => T.map((v) => ({
3697
- key: v.id,
3698
- favicon: v.iconClass,
3699
- title: v.title,
3700
- customTitle: v.customTitle,
3701
- closing: be === v.id
3690
+ onClick: (w) => x(w),
3691
+ onTabClose: (w) => V(w),
3692
+ onTabChange: (w) => null,
3693
+ onCloseAllTabs: se,
3694
+ onCloseLeftTabs: Ce,
3695
+ onCloseRightTabs: le,
3696
+ onCloseOtherTabs: be,
3697
+ currentTabs: ((w) => w.map((k) => ({
3698
+ key: k.id,
3699
+ favicon: k.iconClass,
3700
+ title: k.title,
3701
+ customTitle: k.customTitle,
3702
+ closing: we === k.id
3702
3703
  })))(c),
3703
- activeTab: i,
3704
- dark: d === "dark"
3704
+ activeTab: u,
3705
+ colors: s,
3706
+ dark: h === "dark"
3705
3707
  }
3706
3708
  ) });
3707
3709
  }
3708
- const Fo = () => Se.createElement("div", null, "Home View"), Vo = () => Se.createElement("div", null, "Pedido Form"), Go = () => Se.createElement("div", null, "Pedido View"), Bo = () => Se.createElement("div", null, "Pessoa Form"), Uo = () => Se.createElement("div", null, "Pessoa View"), Ho = {
3710
+ const Fo = () => xe.createElement("div", null, "Home View"), Vo = () => xe.createElement("div", null, "Pedido Form"), Go = () => xe.createElement("div", null, "Pedido View"), Bo = () => xe.createElement("div", null, "Pessoa Form"), Uo = () => xe.createElement("div", null, "Pessoa View"), Ho = {
3709
3711
  label: "Dashboard",
3710
3712
  icon: /* @__PURE__ */ r(Hr, {}),
3711
3713
  link: "/dashboard",
@@ -3788,20 +3790,20 @@ const Fo = () => Se.createElement("div", null, "Home View"), Vo = () => Se.creat
3788
3790
  Zo
3789
3791
  ];
3790
3792
  function qn({ children: A, title: t = "", size: o = "440px", drawerKey: e, styles: n }) {
3791
- const [s, { open: a, close: l }] = Pr(!1), [d] = rr(), c = wt(), u = Xe();
3792
- return te(() => {
3793
- d.get("drawer") === e && a();
3794
- }, [d]), /* @__PURE__ */ r(
3793
+ const [s, { open: a, close: l }] = Pr(!1), [i] = rr(), h = wt(), c = Xe();
3794
+ return oe(() => {
3795
+ i.get("drawer") === e && a();
3796
+ }, [i]), /* @__PURE__ */ r(
3795
3797
  qA,
3796
3798
  {
3797
3799
  position: "right",
3798
3800
  opened: s,
3799
3801
  onClose: () => {
3800
3802
  l();
3801
- const h = new URLSearchParams(d);
3802
- h.delete("drawer"), c({
3803
- pathname: u.pathname,
3804
- search: h.toString()
3803
+ const u = new URLSearchParams(i);
3804
+ u.delete("drawer"), h({
3805
+ pathname: c.pathname,
3806
+ search: u.toString()
3805
3807
  });
3806
3808
  },
3807
3809
  title: t,
@@ -3823,7 +3825,7 @@ function en(A) {
3823
3825
  }
3824
3826
  function jn({ drawerKey: A }) {
3825
3827
  const { openDrawer: t } = en(A);
3826
- return te(() => {
3828
+ return oe(() => {
3827
3829
  t();
3828
3830
  }, []), null;
3829
3831
  }
@@ -3837,11 +3839,11 @@ const An = {
3837
3839
  avatarMaxOutputSizePx: 512
3838
3840
  };
3839
3841
  function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n }) {
3840
- const s = Lr(), a = Mr(), l = _r(), d = Nt(`myProfile${o}Store`), c = zt(Wr.User), u = { ...An, ...n ?? {} }, { dataSource: i, isLoading: h, error: p, isError: b, clearError: C } = Ot({
3842
+ const s = Lr(), a = Mr(), l = _r(), i = Nt(`myProfile${o}Store`), h = zt(Wr.User), c = { ...An, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError: C, clearError: b } = Ot({
3841
3843
  name: `dsUser${o}`,
3842
- label: `${oe().t("archbase:My Profile")}`,
3843
- service: c,
3844
- store: d,
3844
+ label: `${ne().t("archbase:My Profile")}`,
3845
+ service: h,
3846
+ store: i,
3845
3847
  pageSize: 50,
3846
3848
  loadOnStart: !0,
3847
3849
  validator: l,
@@ -3852,24 +3854,24 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
3852
3854
  onDestroy: (g) => {
3853
3855
  },
3854
3856
  onError: (g, f) => {
3855
- const S = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
3856
- It.showError(oe().t("archbase:WARNING"), S, f);
3857
+ const I = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
3858
+ It.showError(ne().t("archbase:WARNING"), I, f);
3857
3859
  }
3858
3860
  });
3859
- te(() => {
3860
- A && i && i.isBrowsing() && i.edit();
3861
- }, [i, A]);
3861
+ oe(() => {
3862
+ A && d && d.isBrowsing() && d.edit();
3863
+ }, [d, A]);
3862
3864
  const m = (g) => {
3863
3865
  g && (console.log(g), e(g.name, g.avatar));
3864
3866
  };
3865
3867
  return /* @__PURE__ */ r(
3866
3868
  $t,
3867
3869
  {
3868
- title: oe().t("archbase:My Profile"),
3870
+ title: ne().t("archbase:My Profile"),
3869
3871
  size: 800,
3870
3872
  height: "500px",
3871
3873
  opened: A,
3872
- dataSource: i,
3874
+ dataSource: d,
3873
3875
  onClickOk: t,
3874
3876
  onClickCancel: t,
3875
3877
  onAfterSave: m,
@@ -3877,41 +3879,41 @@ function Xn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
3877
3879
  /* @__PURE__ */ r(J, { align: "center", children: /* @__PURE__ */ r(
3878
3880
  Tt,
3879
3881
  {
3880
- dataSource: i,
3882
+ dataSource: d,
3881
3883
  dataField: "avatar",
3882
3884
  width: 200,
3883
3885
  height: 200,
3884
- maxSizeKB: u.avatarMaxSizeKB,
3885
- imageQuality: u.avatarImageQuality,
3886
- maxOutputSizePx: u.avatarMaxOutputSizePx
3886
+ maxSizeKB: c.avatarMaxSizeKB,
3887
+ imageQuality: c.avatarImageQuality,
3888
+ maxOutputSizePx: c.avatarMaxOutputSizePx
3887
3889
  }
3888
3890
  ) }),
3889
3891
  /* @__PURE__ */ r(
3890
3892
  sA,
3891
3893
  {
3892
- label: `${oe().t("archbase:Nome completo")}`,
3893
- placeholder: `${oe().t("archbase:Informe o nome completo do usuário")}`,
3894
- dataSource: i,
3894
+ label: `${ne().t("archbase:Nome completo")}`,
3895
+ placeholder: `${ne().t("archbase:Informe o nome completo do usuário")}`,
3896
+ dataSource: d,
3895
3897
  dataField: "name",
3896
3898
  required: !0
3897
3899
  }
3898
3900
  ),
3899
- u.showNickname && /* @__PURE__ */ r(
3901
+ c.showNickname && /* @__PURE__ */ r(
3900
3902
  sA,
3901
3903
  {
3902
- label: `${oe().t("archbase:Apelido")}`,
3903
- placeholder: `${oe().t("archbase:Apelido")}`,
3904
- dataSource: i,
3904
+ label: `${ne().t("archbase:Apelido")}`,
3905
+ placeholder: `${ne().t("archbase:Apelido")}`,
3906
+ dataSource: d,
3905
3907
  dataField: "nickname",
3906
- required: u.requiredNickname
3908
+ required: c.requiredNickname
3907
3909
  }
3908
3910
  ),
3909
3911
  /* @__PURE__ */ r(
3910
3912
  sA,
3911
3913
  {
3912
- label: `${oe().t("archbase:Descrição do usuário")}`,
3913
- placeholder: `${oe().t("archbase:Informe a descrição do usuário")}`,
3914
- dataSource: i,
3914
+ label: `${ne().t("archbase:Descrição do usuário")}`,
3915
+ placeholder: `${ne().t("archbase:Informe a descrição do usuário")}`,
3916
+ dataSource: d,
3915
3917
  dataField: "description",
3916
3918
  required: !0
3917
3919
  }
@@ -4027,7 +4029,7 @@ const Jn = sr((A) => ({
4027
4029
  const s = o(A);
4028
4030
  n.current = rn(s);
4029
4031
  }
4030
- return te(() => () => {
4032
+ return oe(() => () => {
4031
4033
  if (n.current) {
4032
4034
  const s = n.current.getState();
4033
4035
  e(A, s.serialize());
@@ -4057,7 +4059,7 @@ function oA(A, t) {
4057
4059
  });
4058
4060
  const n = e.current.value, [s, a] = ge(n), l = Tr(
4059
4061
  // subscribe
4060
- (u) => o ? o.subscribe(u) : () => {
4062
+ (c) => o ? o.subscribe(c) : () => {
4061
4063
  },
4062
4064
  // getSnapshot
4063
4065
  () => {
@@ -4067,15 +4069,15 @@ function oA(A, t) {
4067
4069
  // getServerSnapshot
4068
4070
  () => {
4069
4071
  }
4070
- ), d = o ? l !== void 0 ? l : n : s, c = w((u) => {
4072
+ ), i = o ? l !== void 0 ? l : n : s, h = S((c) => {
4071
4073
  if (!o) {
4072
- a(u);
4074
+ a(c);
4073
4075
  return;
4074
4076
  }
4075
- const i = o.getState().customState[A] ?? n, h = typeof u == "function" ? u(i) : u;
4076
- o.getState().setCustomState(A, h);
4077
+ const d = o.getState().customState[A] ?? n, u = typeof c == "function" ? c(d) : c;
4078
+ o.getState().setCustomState(A, u);
4077
4079
  }, [o, A, n]);
4078
- return [d, c];
4080
+ return [i, h];
4079
4081
  }
4080
4082
  function Zn(A, t) {
4081
4083
  return oA(A, t);
@@ -4096,36 +4098,36 @@ function es(A, t) {
4096
4098
  const o = { ...on, ...t }, [e, n] = oA(
4097
4099
  `grid_${A}`,
4098
4100
  o
4099
- ), s = w((f) => {
4100
- n((S) => ({ ...S, ...f }));
4101
- }, [n]), a = w((f) => s({ page: f }), [s]), l = w((f) => s({ pageSize: f, page: 0 }), [s]), d = w((f) => s({ sortModel: f }), [s]), c = w((f) => s({ filterModel: f, page: 0 }), [s]), u = w((f) => s({ selectedRowIds: f }), [s]), i = w((f) => {
4102
- n((S) => ({
4103
- ...S,
4104
- selectedRowIds: S.selectedRowIds.includes(f) ? S.selectedRowIds.filter((k) => k !== f) : [...S.selectedRowIds, f]
4101
+ ), s = S((f) => {
4102
+ n((I) => ({ ...I, ...f }));
4103
+ }, [n]), a = S((f) => s({ page: f }), [s]), l = S((f) => s({ pageSize: f, page: 0 }), [s]), i = S((f) => s({ sortModel: f }), [s]), h = S((f) => s({ filterModel: f, page: 0 }), [s]), c = S((f) => s({ selectedRowIds: f }), [s]), d = S((f) => {
4104
+ n((I) => ({
4105
+ ...I,
4106
+ selectedRowIds: I.selectedRowIds.includes(f) ? I.selectedRowIds.filter((T) => T !== f) : [...I.selectedRowIds, f]
4105
4107
  }));
4106
- }, [n]), h = w((f) => s({ selectedRowIds: f }), [s]), p = w(() => s({ selectedRowIds: [] }), [s]), b = w((f) => {
4107
- n((S) => ({
4108
- ...S,
4109
- expandedRowIds: S.expandedRowIds.includes(f) ? S.expandedRowIds.filter((k) => k !== f) : [...S.expandedRowIds, f]
4108
+ }, [n]), u = S((f) => s({ selectedRowIds: f }), [s]), p = S(() => s({ selectedRowIds: [] }), [s]), C = S((f) => {
4109
+ n((I) => ({
4110
+ ...I,
4111
+ expandedRowIds: I.expandedRowIds.includes(f) ? I.expandedRowIds.filter((T) => T !== f) : [...I.expandedRowIds, f]
4110
4112
  }));
4111
- }, [n]), C = w(() => n(o), [n, o]), m = w((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), g = w((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
4113
+ }, [n]), b = S(() => n(o), [n, o]), m = S((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), g = S((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
4112
4114
  return {
4113
4115
  /** Estado completo do grid */
4114
4116
  state: e,
4115
4117
  /** Atualizar multiplos campos */
4116
4118
  update: s,
4117
4119
  /** Resetar para estado inicial */
4118
- reset: C,
4120
+ reset: b,
4119
4121
  // Paginacao
4120
4122
  setPage: a,
4121
4123
  setPageSize: l,
4122
4124
  // Ordenacao e Filtros
4123
- setSortModel: d,
4124
- setFilterModel: c,
4125
+ setSortModel: i,
4126
+ setFilterModel: h,
4125
4127
  // Selecao
4126
- setSelectedRowIds: u,
4127
- toggleRowSelection: i,
4128
- selectAllRows: h,
4128
+ setSelectedRowIds: c,
4129
+ toggleRowSelection: d,
4130
+ selectAllRows: u,
4129
4131
  clearSelection: p,
4130
4132
  isRowSelected: m,
4131
4133
  /** Quantidade de linhas selecionadas */
@@ -4133,7 +4135,7 @@ function es(A, t) {
4133
4135
  /** Se tem alguma linha selecionada */
4134
4136
  hasSelection: e.selectedRowIds.length > 0,
4135
4137
  // Expansao (master-detail)
4136
- toggleRowExpansion: b,
4138
+ toggleRowExpansion: C,
4137
4139
  isRowExpanded: g
4138
4140
  };
4139
4141
  }
@@ -4146,58 +4148,58 @@ function As(A, t = []) {
4146
4148
  const [o, e] = oA(
4147
4149
  `tree_${A}`,
4148
4150
  { ...VA, expandedNodeIds: t }
4149
- ), n = w((m) => {
4151
+ ), n = S((m) => {
4150
4152
  e((g) => ({
4151
4153
  ...g,
4152
4154
  expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((f) => f !== m) : [...g.expandedNodeIds, m]
4153
4155
  }));
4154
- }, [e]), s = w((m) => {
4156
+ }, [e]), s = S((m) => {
4155
4157
  e((g) => ({
4156
4158
  ...g,
4157
4159
  expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
4158
4160
  }));
4159
- }, [e]), a = w((m) => {
4161
+ }, [e]), a = S((m) => {
4160
4162
  e((g) => ({
4161
4163
  ...g,
4162
4164
  expandedNodeIds: g.expandedNodeIds.filter((f) => f !== m)
4163
4165
  }));
4164
- }, [e]), l = w((m) => {
4166
+ }, [e]), l = S((m) => {
4165
4167
  e((g) => ({ ...g, expandedNodeIds: m }));
4166
- }, [e]), d = w(() => {
4168
+ }, [e]), i = S(() => {
4167
4169
  e((m) => ({ ...m, expandedNodeIds: [] }));
4168
- }, [e]), c = w((m) => {
4170
+ }, [e]), h = S((m) => {
4169
4171
  e((g) => ({ ...g, selectedNodeIds: m }));
4170
- }, [e]), u = w((m) => {
4172
+ }, [e]), c = S((m) => {
4171
4173
  e((g) => ({
4172
4174
  ...g,
4173
4175
  selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((f) => f !== m) : [...g.selectedNodeIds, m]
4174
4176
  }));
4175
- }, [e]), i = w(() => {
4177
+ }, [e]), d = S(() => {
4176
4178
  e((m) => ({ ...m, selectedNodeIds: [] }));
4177
- }, [e]), h = w((m) => {
4179
+ }, [e]), u = S((m) => {
4178
4180
  e((g) => ({ ...g, focusedNodeId: m }));
4179
- }, [e]), p = w((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), b = w((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), C = w(() => {
4181
+ }, [e]), p = S((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), C = S((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), b = S(() => {
4180
4182
  e({ ...VA, expandedNodeIds: t });
4181
4183
  }, [e, t]);
4182
4184
  return {
4183
4185
  state: o,
4184
- reset: C,
4186
+ reset: b,
4185
4187
  // Expansao
4186
4188
  toggleExpanded: n,
4187
4189
  expand: s,
4188
4190
  collapse: a,
4189
4191
  expandAll: l,
4190
- collapseAll: d,
4192
+ collapseAll: i,
4191
4193
  isExpanded: p,
4192
4194
  // Selecao
4193
- setSelected: c,
4194
- toggleSelected: u,
4195
- clearSelection: i,
4196
- isSelected: b,
4195
+ setSelected: h,
4196
+ toggleSelected: c,
4197
+ clearSelection: d,
4198
+ isSelected: C,
4197
4199
  selectedCount: o.selectedNodeIds.length,
4198
4200
  hasSelection: o.selectedNodeIds.length > 0,
4199
4201
  // Foco
4200
- setFocused: h,
4202
+ setFocused: u,
4201
4203
  focusedNodeId: o.focusedNodeId
4202
4204
  };
4203
4205
  }
@@ -4205,14 +4207,14 @@ function rs(A, t = [], o = !0) {
4205
4207
  const [e, n] = oA(
4206
4208
  `accordion_${A}`,
4207
4209
  t
4208
- ), s = w((i) => {
4209
- n((h) => h.includes(i) ? h.filter((p) => p !== i) : o ? [...h, i] : [i]);
4210
- }, [n, o]), a = w((i) => {
4211
- n((h) => h.includes(i) ? h : o ? [...h, i] : [i]);
4212
- }, [n, o]), l = w((i) => {
4213
- n((h) => h.filter((p) => p !== i));
4214
- }, [n]), d = w(() => n([]), [n]), c = w((i) => e.includes(i), [e]), u = w((i) => {
4215
- n(i === null ? [] : typeof i == "string" ? [i] : i);
4210
+ ), s = S((d) => {
4211
+ n((u) => u.includes(d) ? u.filter((p) => p !== d) : o ? [...u, d] : [d]);
4212
+ }, [n, o]), a = S((d) => {
4213
+ n((u) => u.includes(d) ? u : o ? [...u, d] : [d]);
4214
+ }, [n, o]), l = S((d) => {
4215
+ n((u) => u.filter((p) => p !== d));
4216
+ }, [n]), i = S(() => n([]), [n]), h = S((d) => e.includes(d), [e]), c = S((d) => {
4217
+ n(d === null ? [] : typeof d == "string" ? [d] : d);
4216
4218
  }, [n]);
4217
4219
  return {
4218
4220
  /** IDs dos paineis expandidos */
@@ -4220,24 +4222,24 @@ function rs(A, t = [], o = !0) {
4220
4222
  /** Para usar direto no Accordion.value */
4221
4223
  value: o ? e : e[0] ?? null,
4222
4224
  /** Setar expandidos (compativel com Mantine Accordion.onChange) */
4223
- setExpanded: u,
4225
+ setExpanded: c,
4224
4226
  toggle: s,
4225
4227
  expand: a,
4226
4228
  collapse: l,
4227
- collapseAll: d,
4228
- isExpanded: c
4229
+ collapseAll: i,
4230
+ isExpanded: h
4229
4231
  };
4230
4232
  }
4231
4233
  function ts(A, t = {}) {
4232
4234
  const { debounceMs: o = 100 } = t, e = EA();
4233
- te(() => {
4235
+ oe(() => {
4234
4236
  if (!e || !A.current)
4235
4237
  return;
4236
4238
  const n = e.getState().scrollY;
4237
4239
  n > 0 && requestAnimationFrame(() => {
4238
4240
  A.current && (A.current.scrollTop = n);
4239
4241
  });
4240
- }, []), te(() => {
4242
+ }, []), oe(() => {
4241
4243
  if (!e || !A.current)
4242
4244
  return;
4243
4245
  const n = A.current;
@@ -4254,7 +4256,7 @@ function ts(A, t = {}) {
4254
4256
  }
4255
4257
  function os(A) {
4256
4258
  const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = _(n), a = _(!0);
4257
- return te(() => {
4259
+ return oe(() => {
4258
4260
  if (a.current) {
4259
4261
  a.current = !1, s.current = n;
4260
4262
  return;
@@ -4263,19 +4265,19 @@ function os(A) {
4263
4265
  }, [n, A]), n;
4264
4266
  }
4265
4267
  function ns(A) {
4266
- const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = _(!1), s = _(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, d = w((i) => {
4267
- t ? (i !== void 0 && t.getState().setCustomState(e, i), t.getState().setCustomState(o, !0)) : (i !== void 0 && (s.current = i), n.current = !0);
4268
- }, [t, o, e]), c = w(() => {
4268
+ const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = _(!1), s = _(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, i = S((d) => {
4269
+ t ? (d !== void 0 && t.getState().setCustomState(e, d), t.getState().setCustomState(o, !0)) : (d !== void 0 && (s.current = d), n.current = !0);
4270
+ }, [t, o, e]), h = S(() => {
4269
4271
  t ? t.getState().setCustomState(o, !1) : n.current = !1;
4270
- }, [t, o]), u = w(() => {
4272
+ }, [t, o]), c = S(() => {
4271
4273
  t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(e)) : (n.current = !1, s.current = null);
4272
4274
  }, [t, o, e]);
4273
4275
  return {
4274
4276
  isOpen: a,
4275
4277
  data: l,
4276
- open: d,
4277
- close: c,
4278
- closeAndClear: u
4278
+ open: i,
4279
+ close: h,
4280
+ closeAndClear: c
4279
4281
  };
4280
4282
  }
4281
4283
  const ss = ({