@archbase/admin 4.0.25 → 4.0.26

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
- import { jsx as r, jsxs as R, Fragment as ke } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as E, Fragment as xe } from "react/jsx-runtime";
2
2
  import * as QA from "react";
3
- import ve, { useState as pe, useRef as ee, useEffect as Ae, useMemo as ae, useContext as ge, useCallback as w, createContext as Pe, memo as KA, Fragment as FA, useLayoutEffect as mr, useImperativeHandle as yr, startTransition as AA, useReducer as vr, useSyncExternalStore as Cr } from "react";
3
+ import Ce, { useState as fe, useRef as Ae, useEffect as re, useMemo as ie, useContext as be, useCallback as C, createContext as Pe, memo as KA, Fragment as FA, useLayoutEffect as mr, useImperativeHandle as yr, startTransition as AA, useReducer as vr, useSyncExternalStore as Cr } from "react";
4
4
  import { useArchbaseSecurityManager as wr } from "@archbase/security";
5
5
  import { useUncontrolled as oA, useMediaQuery as IA, useHotkeys as Sr, useDisclosure as kr, useFocusTrap as xr, useForceUpdate as Ir } from "@mantine/hooks";
6
- import { Flex as Ve, useMantineColorScheme as ne, Menu as oe, ActionIcon as Re, Group as xe, Tooltip as Ie, Button as Tr, ScrollArea as De, Badge as dA, Center as Ue, Image as Er, useMantineTheme as fe, px as ce, Burger as Rr, Box as B, Avatar as nA, Text as we, Stack as X, Skeleton as de, Paper as Pr, NavLink as TA, Kbd as GA, UnstyledButton as sA, Collapse as Lr, TextInput as VA, Indicator as Mr, Transition as Dr, Divider as lA, AppShell as Ke, Drawer as BA } from "@mantine/core";
6
+ import { Flex as Ve, useMantineColorScheme as se, Menu as ne, ActionIcon as Re, Group as Ie, Tooltip as Te, Button as Tr, ScrollArea as De, Badge as dA, Center as Ue, Image as Er, useMantineTheme as ge, px as de, Burger as Rr, Box as B, Avatar as nA, Text as we, Stack as J, Skeleton as ue, Paper as Pr, NavLink as TA, Kbd as GA, UnstyledButton as sA, Collapse as Lr, TextInput as VA, Indicator as Mr, Transition as Dr, Divider as lA, AppShell as Ke, Drawer as BA } from "@mantine/core";
7
7
  import { IconSun as HA, IconMoonStars as UA, IconTerminal as Nr, IconSearch as Ye, IconAlertCircle as zr, IconDots as YA, IconChevronRight as uA, IconChevronDown as Or, IconX as qA, IconChevronLeft as $r, IconHome2 as Qr, IconDashboard as Kr, IconUsers as Fr, IconListSearch as jA, IconUserPlus as Gr, IconNews as Vr, IconFilePlus as Br, IconSettings as Hr } from "@tabler/icons-react";
8
- import { useArchbaseAppContext as hA, getI18nextInstance as te, useArchbaseTranslation as pA, archbaseI18next as Se, useArchbaseValidator as Ur, ARCHBASE_IOC_API_TYPE as Yr } from "@archbase/core";
8
+ import { useArchbaseAppContext as hA, getI18nextInstance as oe, useArchbaseTranslation as pA, archbaseI18next as ke, useArchbaseValidator as Ur, ARCHBASE_IOC_API_TYPE as Yr } from "@archbase/core";
9
9
  import { BRFlag as Ge, USFlag as XA, ESFlag as aA, VEFlag as qr, UYFlag as jr, SVFlag as Xr, PYFlag as Jr, PEFlag as _r, PAFlag as Wr, NIFlag as Zr, MXFlag as et, HNFlag as At, GTFlag as rt, ECFlag as tt, DOFlag as ot, CUFlag as nt, CRFlag as st, COFlag as lt, CLFlag as at, BOFlag as it, ARFlag as ct } from "mantine-flagpack";
10
10
  import { spotlight as dt, Spotlight as Fe } from "@mantine/spotlight";
11
11
  import { useNavigate as Be, useLocation as He, matchPath as EA } from "react-router";
12
12
  import { useLocation as _e, useOutlet as ut, matchPath as ht, Route as $e, Routes as JA, useParams as _A, useSearchParams as WA, useNavigate as pt } from "react-router-dom";
13
13
  import { useMediaQuery as ft } from "usehooks-ts";
14
14
  import { useArchbaseNavigateParams as gt, useArchbaseVisible as bt, ArchbaseNotifications as mt, ArchbaseAvatarEdit as yt, ArchbaseEdit as rA } from "@archbase/components";
15
- import { SubMenu as vt, MenuItem as RA, menuClasses as Z, Sidebar as ZA, Menu as er, sidebarClasses as Ar } from "react-pro-sidebar";
15
+ import { SubMenu as vt, MenuItem as RA, menuClasses as ee, Sidebar as ZA, Menu as er, sidebarClasses as Ar } from "react-pro-sidebar";
16
16
  import { createPortal as Ct } from "react-dom";
17
17
  import wt from "@rehooks/component-size";
18
18
  import { ArchbaseAdvancedTabs as St } from "@archbase/layout";
@@ -21,7 +21,7 @@ import { persist as xt } from "zustand/middleware";
21
21
  import { useArchbaseStore as It, useArchbaseRemoteServiceApi as Tt, useArchbaseRemoteDataSource as Et } from "@archbase/data";
22
22
  import { ArchbaseFormModalTemplate as Rt } from "@archbase/template";
23
23
  import { createStore as Pt } from "zustand/vanilla";
24
- const We = ve.createContext({}), Lt = ({
24
+ const We = Ce.createContext({}), Lt = ({
25
25
  navigationData: e,
26
26
  user: t,
27
27
  owner: o,
@@ -33,22 +33,22 @@ const We = ve.createContext({}), Lt = ({
33
33
  onNavigationDataChange: d,
34
34
  initialSidebarCollapsed: i
35
35
  }) => {
36
- const [u, c] = pe(i), [h, f] = pe(!1), [m, v] = pe(() => a === !0), [y, b] = pe(null), p = ee(!1), [S, x] = oA({
36
+ const [u, c] = fe(i), [h, f] = fe(!1), [b, v] = fe(() => a === !0), [m, g] = fe(null), p = Ae(!1), [w, x] = oA({
37
37
  value: d !== void 0 ? e : void 0,
38
38
  defaultValue: a ? [] : e,
39
39
  finalValue: [],
40
40
  onChange: d
41
41
  });
42
- Ae(() => {
43
- }, [S, a]);
44
- const { securityManager: P } = wr({
42
+ re(() => {
43
+ }, [w, a]);
44
+ const { securityManager: R } = wr({
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 Ae(() => {
49
+ return re(() => {
50
50
  p.current = !1;
51
- }, [t?.id]), Ae(() => {
51
+ }, [t?.id]), re(() => {
52
52
  if (!a) {
53
53
  v(!1);
54
54
  return;
@@ -56,54 +56,54 @@ const We = ve.createContext({}), Lt = ({
56
56
  if (p.current)
57
57
  return;
58
58
  e.filter((z) => z.showInSidebar).forEach((z) => {
59
- P.registerAction(z.label, z.label), z?.links?.forEach((L) => P.registerAction(`${z.label} -> ${L.label}`, `${z.label} -> ${L.label}`));
59
+ R.registerAction(z.label, z.label), z?.links?.forEach((P) => R.registerAction(`${z.label} -> ${P.label}`, `${z.label} -> ${P.label}`));
60
60
  });
61
- const $ = () => {
61
+ const O = () => {
62
62
  p.current = !0;
63
- const z = e.map((L) => ({
64
- ...L,
65
- disabled: !P.hasPermission(L.label),
66
- links: L.links && L.links.map((I) => {
67
- const M = P.hasPermission(`${L.label} -> ${I.label}`);
63
+ const z = e.map((P) => ({
64
+ ...P,
65
+ disabled: !R.hasPermission(P.label),
66
+ links: P.links && P.links.map((I) => {
67
+ const L = R.hasPermission(`${P.label} -> ${I.label}`);
68
68
  return {
69
69
  ...I,
70
- disabled: !M
70
+ disabled: !L
71
71
  };
72
72
  })
73
73
  }));
74
- x(z), v(!1), b(null);
75
- }, G = !P.isLoading() && !P.isError();
76
- if (P.isError()) {
74
+ x(z), v(!1), g(null);
75
+ }, G = !R.isLoading() && !R.isError();
76
+ if (R.isError()) {
77
77
  p.current = !0;
78
- const z = P.getError() || "Erro ao carregar permissões de navegação";
79
- b(z), v(!1), x(e);
78
+ const z = R.getError() || "Erro ao carregar permissões de navegação";
79
+ g(z), v(!1), x(e);
80
80
  return;
81
81
  }
82
82
  if (G) {
83
- $();
83
+ O();
84
84
  return;
85
85
  }
86
- v(!0), b(null);
87
- let k = !1;
86
+ v(!0), g(null);
87
+ let S = !1;
88
88
  const T = setInterval(() => {
89
- if (!k && P.isError()) {
89
+ if (!S && R.isError()) {
90
90
  clearInterval(T), p.current = !0;
91
- const z = P.getError() || "Erro ao carregar permissões de navegação";
92
- b(z), v(!1), x(e);
91
+ const z = R.getError() || "Erro ao carregar permissões de navegação";
92
+ g(z), v(!1), x(e);
93
93
  }
94
- }, 100), N = setTimeout(() => {
95
- k || (clearInterval(T), v((z) => z && (p.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), x(e), !1)));
94
+ }, 100), D = setTimeout(() => {
95
+ S || (clearInterval(T), v((z) => z && (p.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), x(e), !1)));
96
96
  }, 3e3);
97
- return P.apply(() => {
98
- k || (clearInterval(T), clearTimeout(N), $());
97
+ return R.apply(() => {
98
+ S || (clearInterval(T), clearTimeout(D), O());
99
99
  }), () => {
100
- k = !0, clearInterval(T), clearTimeout(N);
100
+ S = !0, clearInterval(T), clearTimeout(D);
101
101
  };
102
- }, [t?.id, a, e, P, x]), /* @__PURE__ */ r(
102
+ }, [t?.id, a, e, R, x]), /* @__PURE__ */ r(
103
103
  We.Provider,
104
104
  {
105
105
  value: {
106
- navigationData: S,
106
+ navigationData: w,
107
107
  setNavigationData: x,
108
108
  user: t,
109
109
  owner: o,
@@ -114,20 +114,20 @@ const We = ve.createContext({}), Lt = ({
114
114
  hidden: h,
115
115
  setHidden: f,
116
116
  onNavigationDataChange: d,
117
- isLoadingPermissions: m,
118
- permissionsError: y
117
+ isLoadingPermissions: b,
118
+ permissionsError: m
119
119
  },
120
120
  children: s
121
121
  }
122
122
  );
123
123
  }, vn = ({ children: e }) => /* @__PURE__ */ r(Ve, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: e }), Mt = () => {
124
- const e = hA(), { colorScheme: t } = ne(), o = t === "dark", [A, n] = pe(te().language);
125
- Ae(() => {
124
+ const e = hA(), { colorScheme: t } = se(), o = t === "dark", [A, n] = fe(oe().language);
125
+ re(() => {
126
126
  const d = (i) => {
127
127
  n(i);
128
128
  };
129
- return te().on("languageChanged", d), () => {
130
- te().off("languageChanged", d);
129
+ return oe().on("languageChanged", d), () => {
130
+ oe().off("languageChanged", d);
131
131
  };
132
132
  }, []);
133
133
  const s = (d) => {
@@ -185,7 +185,7 @@ const We = ve.createContext({}), Lt = ({
185
185
  }, a = () => {
186
186
  if (e.languages)
187
187
  return e.languages.filter((d) => d).map((d) => /* @__PURE__ */ r(
188
- oe.Item,
188
+ ne.Item,
189
189
  {
190
190
  onClick: () => l(d.lang),
191
191
  leftSection: s(d.lang),
@@ -194,17 +194,17 @@ const We = ve.createContext({}), Lt = ({
194
194
  d.name
195
195
  ));
196
196
  }, l = (d) => {
197
- te().changeLanguage(d);
197
+ oe().changeLanguage(d);
198
198
  };
199
- return /* @__PURE__ */ R(oe, { shadow: "md", width: 200, position: "bottom-end", children: [
200
- /* @__PURE__ */ r(oe.Target, { children: /* @__PURE__ */ r(Re, { variant: "transparent", color: o ? "white" : "blue", title: te().t("toggleLanguage"), children: s(A) }) }),
201
- /* @__PURE__ */ r(oe.Dropdown, { children: a() })
199
+ return /* @__PURE__ */ E(ne, { shadow: "md", width: 200, position: "bottom-end", children: [
200
+ /* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Re, { variant: "transparent", color: o ? "white" : "blue", title: oe().t("toggleLanguage"), children: s(A) }) }),
201
+ /* @__PURE__ */ r(ne.Dropdown, { children: a() })
202
202
  ] });
203
203
  }, Dt = () => {
204
- const e = hA(), { colorScheme: t } = ne(), { t: o, i18n: A } = pA(), n = (l) => l === "en" ? /* @__PURE__ */ r(XA, { size: 24 }) : l === "pt-BR" ? /* @__PURE__ */ r(Ge, { size: 24 }) : l === "es" ? /* @__PURE__ */ r(aA, { size: 24 }) : /* @__PURE__ */ r(Ge, { size: 24 }), s = () => {
204
+ const e = hA(), { colorScheme: t } = se(), { t: o, i18n: A } = pA(), n = (l) => l === "en" ? /* @__PURE__ */ r(XA, { size: 24 }) : l === "pt-BR" ? /* @__PURE__ */ r(Ge, { size: 24 }) : l === "es" ? /* @__PURE__ */ r(aA, { size: 24 }) : /* @__PURE__ */ r(Ge, { size: 24 }), s = () => {
205
205
  if (e.languages)
206
206
  return e.languages.filter((l) => l).map((l) => /* @__PURE__ */ r(
207
- oe.Item,
207
+ ne.Item,
208
208
  {
209
209
  onClick: () => a(l.lang),
210
210
  leftSection: n(l.lang),
@@ -215,9 +215,9 @@ const We = ve.createContext({}), Lt = ({
215
215
  }, a = (l) => {
216
216
  A.changeLanguage(l);
217
217
  };
218
- return /* @__PURE__ */ R(oe, { children: [
219
- /* @__PURE__ */ r(oe.Target, { children: /* @__PURE__ */ R(
220
- xe,
218
+ return /* @__PURE__ */ E(ne, { children: [
219
+ /* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ E(
220
+ Ie,
221
221
  {
222
222
  w: "100%",
223
223
  justify: "flex-start",
@@ -226,21 +226,21 @@ const We = ve.createContext({}), Lt = ({
226
226
  variant: "transparent",
227
227
  fw: 400,
228
228
  gap: 4,
229
- title: te().t("archbase:toggleLanguage"),
229
+ title: oe().t("archbase:toggleLanguage"),
230
230
  children: [
231
231
  n(A.language),
232
232
  `${e.languages.find((l) => l.lang === A.language)?.name ?? "Português"}`
233
233
  ]
234
234
  }
235
235
  ) }),
236
- /* @__PURE__ */ r(oe.Dropdown, { children: s() })
236
+ /* @__PURE__ */ r(ne.Dropdown, { children: s() })
237
237
  ] });
238
238
  }, Nt = ({
239
239
  toggleColorScheme: e,
240
240
  sunColor: t = "white",
241
241
  moonColor: o = "blue"
242
242
  }) => {
243
- const { t: A } = pA(), { colorScheme: n, toggleColorScheme: s } = ne(), a = () => {
243
+ const { t: A } = pA(), { colorScheme: n, toggleColorScheme: s } = se(), a = () => {
244
244
  e ? e() : s();
245
245
  }, l = n === "dark";
246
246
  return /* @__PURE__ */ r(
@@ -249,26 +249,26 @@ const We = ve.createContext({}), Lt = ({
249
249
  variant: "transparent",
250
250
  color: l ? t : o,
251
251
  onClick: () => a(),
252
- title: te().t("archbase:toggleColorScheme"),
252
+ title: oe().t("archbase:toggleColorScheme"),
253
253
  children: l ? /* @__PURE__ */ r(HA, { size: "1.5rem" }) : /* @__PURE__ */ r(UA, { size: "1.5rem" })
254
254
  }
255
255
  );
256
- }, zt = (e) => /* @__PURE__ */ r(xe, { gap: "sm", children: e.children });
256
+ }, zt = (e) => /* @__PURE__ */ r(Ie, { gap: "sm", children: e.children });
257
257
  function Ot({ category: e, label: t, color: o, description: A, image: n, onClick: s }) {
258
258
  return /* @__PURE__ */ r(
259
259
  Fe.Action,
260
260
  {
261
261
  onClick: s,
262
- label: `${te().t(t || "")}`,
263
- description: A ? te().t(A) : void 0,
264
- leftSection: n ? /* @__PURE__ */ r(Ue, { children: /* @__PURE__ */ r(Er, { src: n, alt: te().t(t || ""), width: 24, height: 24 }) }) : void 0,
265
- rightSection: e ? /* @__PURE__ */ r(dA, { color: o, size: "sm", children: te().t(e) }) : void 0
262
+ label: `${oe().t(t || "")}`,
263
+ description: A ? oe().t(A) : void 0,
264
+ leftSection: n ? /* @__PURE__ */ r(Ue, { children: /* @__PURE__ */ r(Er, { src: n, alt: oe().t(t || ""), width: 24, height: 24 }) }) : void 0,
265
+ rightSection: e ? /* @__PURE__ */ r(dA, { color: o, size: "sm", children: oe().t(e) }) : void 0
266
266
  },
267
267
  t
268
268
  );
269
269
  }
270
270
  const $t = ({ navigationData: e, color: t }) => {
271
- const [o, A] = pe(""), n = Be(), { t: s } = pA(), a = ae(() => {
271
+ const [o, A] = fe(""), n = Be(), { t: s } = pA(), a = ie(() => {
272
272
  const d = new Array();
273
273
  return e.forEach((i) => {
274
274
  i.links ? i.links.forEach((u) => {
@@ -297,9 +297,9 @@ const $t = ({ navigationData: e, color: t }) => {
297
297
  const i = `${s(d.label || "")}`;
298
298
  return i && i.toLowerCase().includes(o.toLowerCase().trim());
299
299
  }).map((d) => /* @__PURE__ */ r(Ot, { ...d }, d.id));
300
- return /* @__PURE__ */ r(ke, { children: a && a.length > 0 ? /* @__PURE__ */ R(ke, { children: [
301
- /* @__PURE__ */ r(Ie, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Tr, { color: t, leftSection: /* @__PURE__ */ r(Nr, { size: "24px" }), onClick: () => dt.open() }) }),
302
- /* @__PURE__ */ R(
300
+ return /* @__PURE__ */ r(xe, { children: a && a.length > 0 ? /* @__PURE__ */ E(xe, { children: [
301
+ /* @__PURE__ */ r(Te, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r(Tr, { color: t, leftSection: /* @__PURE__ */ r(Nr, { size: "24px" }), onClick: () => dt.open() }) }),
302
+ /* @__PURE__ */ E(
303
303
  Fe.Root,
304
304
  {
305
305
  shortcut: ["mod + M", "/"],
@@ -307,7 +307,7 @@ const $t = ({ navigationData: e, color: t }) => {
307
307
  query: o,
308
308
  children: [
309
309
  /* @__PURE__ */ r(Fe.Search, { placeholder: `${s("archbase:Localizar...")}`, leftSection: /* @__PURE__ */ r(Ye, { size: "1.2rem" }) }),
310
- /* @__PURE__ */ r(De.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Fe.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Fe.Empty, { children: te().t("archbase:Nenhum resultado...") }) }) })
310
+ /* @__PURE__ */ r(De.Autosize, { mah: "calc(100vh - 200px)", type: "scroll", scrollbarSize: 8, children: /* @__PURE__ */ r(Fe.ActionsList, { children: l.length > 0 ? l : /* @__PURE__ */ r(Fe.Empty, { children: oe().t("archbase:Nenhum resultado...") }) }) })
311
311
  ]
312
312
  }
313
313
  )
@@ -327,63 +327,63 @@ const $t = ({ navigationData: e, color: t }) => {
327
327
  hideAutoHeaderActionsOnUserMenuBreakPoint: c,
328
328
  withDividerAfterUserMenuToggleColorScheme: h = !0,
329
329
  user: f,
330
- navigationData: m = [],
330
+ navigationData: b = [],
331
331
  logo: v,
332
- headerActions: y,
333
- styleLogo: b,
332
+ headerActions: m,
333
+ styleLogo: g,
334
334
  showLanguageSelector: p = !1,
335
- sideBarHiddenBreakPoint: S,
335
+ sideBarHiddenBreakPoint: w,
336
336
  headerLeftContent: x,
337
- toggleColorScheme: P,
337
+ toggleColorScheme: R,
338
338
  logoLeftSection: Y,
339
- logoRightSection: $,
339
+ logoRightSection: O,
340
340
  showBurger: G = !0,
341
- showCommands: K = !0,
342
- sunColor: k,
341
+ showCommands: F = !0,
342
+ sunColor: S,
343
343
  moonColor: T,
344
- styles: N
344
+ styles: D
345
345
  }) => {
346
- const z = fe(), { colorScheme: L, toggleColorScheme: I } = ne(), M = ge(We), q = IA(
347
- `(max-width: ${S ? ce(S) : z.breakpoints.md})`
346
+ const z = ge(), { colorScheme: P, toggleColorScheme: I } = se(), L = be(We), j = IA(
347
+ `(max-width: ${w ? de(w) : z.breakpoints.md})`
348
348
  ), H = IA(
349
- `(max-width: ${c ? ce(c) : z.breakpoints.md})`
349
+ `(max-width: ${c ? de(c) : z.breakpoints.md})`
350
350
  );
351
- let J = !1, _ = !1;
352
- return d && (i = !H, u = !H, t = H, o = H, a = H, h = H, p && (_ = !H, J = H)), /* @__PURE__ */ R(ke, { children: [
353
- /* @__PURE__ */ R(Ve, { style: { width: 300, height: 50 }, align: "center", children: [
351
+ let _ = !1, W = !1;
352
+ return d && (i = !H, u = !H, t = H, o = H, a = H, h = H, p && (W = !H, _ = H)), /* @__PURE__ */ E(xe, { children: [
353
+ /* @__PURE__ */ E(Ve, { style: { width: 300, height: 50 }, align: "center", children: [
354
354
  Y,
355
355
  /* @__PURE__ */ r(
356
356
  "img",
357
357
  {
358
358
  style: {
359
359
  height: 50,
360
- ...b
360
+ ...g
361
361
  },
362
362
  alt: "logo",
363
363
  src: v
364
364
  }
365
365
  ),
366
- $
366
+ O
367
367
  ] }),
368
368
  G && /* @__PURE__ */ r(
369
369
  Rr,
370
370
  {
371
- opened: M.hidden ? M.hidden : !1,
372
- onClick: () => M.setHidden(!M.hidden),
371
+ opened: L.hidden ? L.hidden : !1,
372
+ onClick: () => L.setHidden(!L.hidden),
373
373
  size: "sm",
374
374
  color: z.colors.gray[7],
375
375
  mx: { base: "xs", xs: "lg", sm: "xl" },
376
- display: q ? "" : "none"
376
+ display: j ? "" : "none"
377
377
  }
378
378
  ),
379
- /* @__PURE__ */ r("div", { children: K && /* @__PURE__ */ r($t, { navigationData: m }) }),
379
+ /* @__PURE__ */ r("div", { children: F && /* @__PURE__ */ r($t, { navigationData: b }) }),
380
380
  /* @__PURE__ */ r(B, { style: { flex: 1 }, children: x }),
381
- /* @__PURE__ */ R(zt, { children: [
382
- i && y,
383
- u && /* @__PURE__ */ r(Nt, { toggleColorScheme: P, sunColor: k, moonColor: T }),
384
- _ && /* @__PURE__ */ r(Mt, {}),
385
- /* @__PURE__ */ R(oe, { shadow: "md", width: 200, position: "bottom-end", styles: N?.menu, children: [
386
- /* @__PURE__ */ r(oe.Target, { children: /* @__PURE__ */ R("div", { children: [
381
+ /* @__PURE__ */ E(zt, { children: [
382
+ i && m,
383
+ u && /* @__PURE__ */ r(Nt, { toggleColorScheme: R, sunColor: S, moonColor: T }),
384
+ W && /* @__PURE__ */ r(Mt, {}),
385
+ /* @__PURE__ */ E(ne, { shadow: "md", width: 200, position: "bottom-end", styles: D?.menu, children: [
386
+ /* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ E("div", { children: [
387
387
  /* @__PURE__ */ r(
388
388
  nA,
389
389
  {
@@ -415,20 +415,20 @@ const $t = ({ navigationData: e, color: t }) => {
415
415
  }
416
416
  ) : null
417
417
  ] }) }),
418
- /* @__PURE__ */ R(oe.Dropdown, { children: [
418
+ /* @__PURE__ */ E(ne.Dropdown, { children: [
419
419
  e,
420
- o && /* @__PURE__ */ r(oe.Label, { children: `${te().t("archbase:Opções")}` }),
420
+ o && /* @__PURE__ */ r(ne.Label, { children: `${oe().t("archbase:Opções")}` }),
421
421
  a && l,
422
422
  t && /* @__PURE__ */ r(
423
- oe.Item,
423
+ ne.Item,
424
424
  {
425
- leftSection: L === "dark" ? /* @__PURE__ */ r(HA, { size: A }) : /* @__PURE__ */ r(UA, { size: A }),
426
- onClick: P || I,
427
- children: `${te().t("archbase:toggleColorScheme")}`
425
+ leftSection: P === "dark" ? /* @__PURE__ */ r(HA, { size: A }) : /* @__PURE__ */ r(UA, { size: A }),
426
+ onClick: R || I,
427
+ children: `${oe().t("archbase:toggleColorScheme")}`
428
428
  }
429
429
  ),
430
- J && /* @__PURE__ */ r(Dt, {}),
431
- h && /* @__PURE__ */ r(oe.Divider, {}),
430
+ _ && /* @__PURE__ */ r(Dt, {}),
431
+ h && /* @__PURE__ */ r(ne.Divider, {}),
432
432
  n && s
433
433
  ] })
434
434
  ] })
@@ -439,30 +439,30 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
439
439
  const u = s ? e.colorScheme === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][7] : void 0, c = s ? (e.colorScheme === "dark", e.colors[e.primaryColor][0]) : void 0, h = e.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", f = "0.5";
440
440
  if (A.links) {
441
441
  if (!(A.disabled && A.hideDisabledItem))
442
- return /* @__PURE__ */ r(Ie, { disabled: !t, label: Se.t(A.label), children: /* @__PURE__ */ r(
442
+ return /* @__PURE__ */ r(Te, { disabled: !t, label: ke.t(A.label), children: /* @__PURE__ */ r(
443
443
  vt,
444
444
  {
445
445
  rootStyles: {
446
446
  fontSize: "16px",
447
- [`.${Z.button}`]: {
447
+ [`.${ee.button}`]: {
448
448
  "&:hover": {
449
- [`.${Z.icon}`]: {
449
+ [`.${ee.icon}`]: {
450
450
  color: "white"
451
451
  },
452
- [`.${Z.label}`]: {
452
+ [`.${ee.label}`]: {
453
453
  color: "white"
454
454
  }
455
455
  }
456
456
  },
457
- [`.${Z.subMenuContent}`]: {
457
+ [`.${ee.subMenuContent}`]: {
458
458
  width: t && i
459
459
  },
460
- [`.${Z.disabled}`]: {
460
+ [`.${ee.disabled}`]: {
461
461
  opacity: f,
462
- [`.${Z.icon}`]: {
462
+ [`.${ee.icon}`]: {
463
463
  color: h + " !important"
464
464
  },
465
- [`.${Z.label}`]: {
465
+ [`.${ee.label}`]: {
466
466
  color: h + " !important"
467
467
  }
468
468
  }
@@ -470,47 +470,47 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
470
470
  id: A.label,
471
471
  icon: A.icon,
472
472
  defaultOpen: !A.disabled,
473
- label: t ? "" : Se.t(A.label),
473
+ label: t ? "" : ke.t(A.label),
474
474
  disabled: A.disabled,
475
- children: A.links && A.links.filter((m) => m.showInSidebar === !0 && (!m.disabled || !m.hideDisabledItem)).map((m, v) => /* @__PURE__ */ r(
475
+ children: A.links && A.links.filter((b) => b.showInSidebar === !0 && (!b.disabled || !b.hideDisabledItem)).map((b, v) => /* @__PURE__ */ r(
476
476
  RA,
477
477
  {
478
- onClick: () => o(m),
478
+ onClick: () => o(b),
479
479
  rootStyles: {
480
- [`.${Z.icon}`]: {
480
+ [`.${ee.icon}`]: {
481
481
  background: u,
482
- color: l && m.link === a ? "white" : c
482
+ color: l && b.link === a ? "white" : c
483
483
  },
484
- [`.${Z.label}`]: {
485
- color: l && m.link === a ? "white" : d
484
+ [`.${ee.label}`]: {
485
+ color: l && b.link === a ? "white" : d
486
486
  },
487
- [`.${Z.button}`]: {
487
+ [`.${ee.button}`]: {
488
488
  paddingLeft: "40px !important",
489
489
  "&:hover": {
490
- [`.${Z.icon}`]: {
490
+ [`.${ee.icon}`]: {
491
491
  color: "white"
492
492
  },
493
- [`.${Z.label}`]: {
493
+ [`.${ee.label}`]: {
494
494
  color: "white"
495
495
  }
496
496
  }
497
497
  },
498
- [`.${Z.disabled}`]: {
498
+ [`.${ee.disabled}`]: {
499
499
  opacity: f,
500
- [`.${Z.icon}`]: {
500
+ [`.${ee.icon}`]: {
501
501
  background: (u || "") + " !important",
502
502
  color: h + " !important"
503
503
  },
504
- [`.${Z.label}`]: {
504
+ [`.${ee.label}`]: {
505
505
  color: h + " !important"
506
506
  }
507
507
  }
508
508
  },
509
- id: m.label,
510
- icon: m.icon,
511
- disabled: typeof m.disabled == "function" ? m.disabled() : m.disabled,
512
- active: l && m.link === a,
513
- children: Se.t(m.label)
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: ke.t(b.label)
514
514
  },
515
515
  v
516
516
  ))
@@ -518,35 +518,35 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
518
518
  n
519
519
  ) });
520
520
  } else if (A.showInSidebar && (!A.disabled || !A.hideDisabledItem))
521
- return /* @__PURE__ */ r(Ie, { disabled: !t, label: Se.t(A.label), children: /* @__PURE__ */ r(
521
+ return /* @__PURE__ */ r(Te, { disabled: !t, label: ke.t(A.label), children: /* @__PURE__ */ r(
522
522
  RA,
523
523
  {
524
524
  rootStyles: {
525
525
  fontSize: "16px",
526
- [`.${Z.button}`]: {
526
+ [`.${ee.button}`]: {
527
527
  "&:hover": {
528
- [`.${Z.icon}`]: {
528
+ [`.${ee.icon}`]: {
529
529
  color: "white"
530
530
  },
531
- [`.${Z.label}`]: {
531
+ [`.${ee.label}`]: {
532
532
  color: "white"
533
533
  }
534
534
  }
535
535
  },
536
- [`.${Z.icon}`]: {
536
+ [`.${ee.icon}`]: {
537
537
  background: u,
538
538
  color: l && A.link === a ? "white" : c
539
539
  },
540
- [`.${Z.label}`]: {
540
+ [`.${ee.label}`]: {
541
541
  color: l && A.link === a ? "white" : d
542
542
  },
543
- [`.${Z.disabled}`]: {
543
+ [`.${ee.disabled}`]: {
544
544
  opacity: f,
545
- [`.${Z.icon}`]: {
545
+ [`.${ee.icon}`]: {
546
546
  background: (u || "") + " !important",
547
547
  color: h + " !important"
548
548
  },
549
- [`.${Z.label}`]: {
549
+ [`.${ee.label}`]: {
550
550
  color: h + " !important"
551
551
  }
552
552
  }
@@ -556,7 +556,7 @@ function PA(e, t, o, A, n, s, a, l, d, i) {
556
556
  onClick: () => o(A),
557
557
  icon: A.icon,
558
558
  active: l && A.link === a,
559
- children: t ? "" : Se.t(A.label)
559
+ children: t ? "" : ke.t(A.label)
560
560
  },
561
561
  n
562
562
  ) });
@@ -598,7 +598,7 @@ const Kt = (e) => ({
598
598
  }
599
599
  }
600
600
  }), Ft = (e, t, o, A, n, s, a, l, d, i, u) => {
601
- const c = Kt(), h = s ? {} : { padding: o ? `0 ${(n - A) / 2}px` : "0 20px" }, f = s ? {} : { display: "none" }, m = a ? e === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
601
+ const c = Kt(), h = s ? {} : { padding: o ? `0 ${(n - A) / 2}px` : "0 20px" }, f = s ? {} : { display: "none" }, b = a ? e === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
602
602
  return {
603
603
  root: {
604
604
  fontSize: "14px",
@@ -607,9 +607,9 @@ const Kt = (e) => ({
607
607
  color: t.white
608
608
  },
609
609
  icon: {
610
- background: m,
610
+ background: b,
611
611
  color: u,
612
- [`&.${Z.disabled}`]: {
612
+ [`&.${ee.disabled}`]: {
613
613
  color: c[e].menu.disabled.color
614
614
  }
615
615
  },
@@ -621,14 +621,14 @@ const Kt = (e) => ({
621
621
  backgroundColor: e === "dark" ? t.colors.dark[8] : t.colors[t.primaryColor][0]
622
622
  }),
623
623
  button: {
624
- [`&.${Z.disabled}`]: {
624
+ [`&.${ee.disabled}`]: {
625
625
  color: c[e].menu.disabled.color
626
626
  },
627
627
  "&:hover": {
628
628
  backgroundColor: t.colors[t.primaryColor][6],
629
629
  color: t.white
630
630
  },
631
- [`&.${Z.active}`]: {
631
+ [`&.${ee.active}`]: {
632
632
  backgroundColor: t.colors[t.primaryColor][6]
633
633
  },
634
634
  height: l,
@@ -644,7 +644,7 @@ const Kt = (e) => ({
644
644
  };
645
645
  };
646
646
  function Gt(e, t, o, A, n, s, a, l, d, i, u) {
647
- return /* @__PURE__ */ R(
647
+ return /* @__PURE__ */ E(
648
648
  ZA,
649
649
  {
650
650
  ref: e,
@@ -656,16 +656,16 @@ function Gt(e, t, o, A, n, s, a, l, d, i, u) {
656
656
  overflowY: "hidden",
657
657
  left: 0,
658
658
  right: 0,
659
- height: a ? "calc(100vh - 28px)" : `${ce(l)}px`
659
+ height: a ? "calc(100vh - 28px)" : `${de(l)}px`
660
660
  }
661
661
  },
662
662
  collapsed: t,
663
- width: `${ce(o)}px`,
664
- collapsedWidth: `${ce(A)}px`,
663
+ width: `${de(o)}px`,
664
+ collapsedWidth: `${de(A)}px`,
665
665
  children: [
666
- d && /* @__PURE__ */ r(ke, { children: d }),
667
- /* @__PURE__ */ r(De, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(er, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(ke, { children: s }) }) }),
668
- i && /* @__PURE__ */ r(ke, { children: i })
666
+ d && /* @__PURE__ */ r(xe, { children: d }),
667
+ /* @__PURE__ */ r(De, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(er, { rootStyles: { background: u }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(xe, { children: s }) }) }),
668
+ i && /* @__PURE__ */ r(xe, { children: i })
669
669
  ]
670
670
  }
671
671
  );
@@ -675,9 +675,9 @@ function LA({
675
675
  collapsed: t = !1,
676
676
  backgroundColor: o
677
677
  }) {
678
- const A = fe(), { colorScheme: n } = ne(), s = o ?? (n === "dark" ? A.colors.dark[7] : A.white);
678
+ const A = ge(), { colorScheme: n } = se(), s = o ?? (n === "dark" ? A.colors.dark[7] : A.white);
679
679
  return t ? /* @__PURE__ */ r(
680
- X,
680
+ J,
681
681
  {
682
682
  gap: "sm",
683
683
  p: "xs",
@@ -688,7 +688,7 @@ function LA({
688
688
  height: "100%"
689
689
  },
690
690
  children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ r(
691
- de,
691
+ ue,
692
692
  {
693
693
  height: 32,
694
694
  width: 32,
@@ -698,7 +698,7 @@ function LA({
698
698
  ))
699
699
  }
700
700
  ) : /* @__PURE__ */ r(
701
- X,
701
+ J,
702
702
  {
703
703
  gap: "xs",
704
704
  p: "md",
@@ -708,9 +708,9 @@ function LA({
708
708
  width: "100%",
709
709
  height: "100%"
710
710
  },
711
- children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ R(xe, { gap: "sm", wrap: "nowrap", children: [
711
+ children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ E(Ie, { gap: "sm", wrap: "nowrap", children: [
712
712
  /* @__PURE__ */ r(
713
- de,
713
+ ue,
714
714
  {
715
715
  height: 24,
716
716
  width: 24,
@@ -718,7 +718,7 @@ function LA({
718
718
  }
719
719
  ),
720
720
  /* @__PURE__ */ r(
721
- de,
721
+ ue,
722
722
  {
723
723
  height: 18,
724
724
  radius: "xl",
@@ -735,9 +735,9 @@ function Vt({
735
735
  height: o = "100%",
736
736
  backgroundColor: A
737
737
  }) {
738
- const n = fe(), { colorScheme: s } = ne(), a = A ?? (s === "dark" ? n.colors.dark[6] : n.colors.gray[2]);
738
+ const n = ge(), { colorScheme: s } = se(), a = A ?? (s === "dark" ? n.colors.dark[6] : n.colors.gray[2]);
739
739
  return /* @__PURE__ */ r(
740
- X,
740
+ J,
741
741
  {
742
742
  gap: "md",
743
743
  p: "xs",
@@ -747,9 +747,9 @@ function Vt({
747
747
  height: o,
748
748
  backgroundColor: a
749
749
  },
750
- children: Array.from({ length: e }).map((l, d) => /* @__PURE__ */ R(X, { gap: 4, align: "center", children: [
750
+ children: Array.from({ length: e }).map((l, d) => /* @__PURE__ */ E(J, { gap: 4, align: "center", children: [
751
751
  /* @__PURE__ */ r(
752
- de,
752
+ ue,
753
753
  {
754
754
  height: 48,
755
755
  width: 48,
@@ -758,7 +758,7 @@ function Vt({
758
758
  }
759
759
  ),
760
760
  /* @__PURE__ */ r(
761
- de,
761
+ ue,
762
762
  {
763
763
  height: 10,
764
764
  width: 40,
@@ -774,8 +774,8 @@ function MA({
774
774
  backgroundColor: t,
775
775
  children: o
776
776
  }) {
777
- const A = fe(), { colorScheme: n } = ne(), s = t ?? (n === "dark" ? A.colors.dark[7] : A.white), a = n === "dark" ? A.colors.red[4] : A.colors.red[6];
778
- return o ? /* @__PURE__ */ r(ke, { children: o }) : /* @__PURE__ */ r(Ue, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(X, { align: "center", gap: "xs", children: [
777
+ const A = ge(), { colorScheme: n } = se(), s = t ?? (n === "dark" ? A.colors.dark[7] : A.white), a = n === "dark" ? A.colors.red[4] : A.colors.red[6];
778
+ return o ? /* @__PURE__ */ r(xe, { children: o }) : /* @__PURE__ */ r(Ue, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ E(J, { align: "center", gap: "xs", children: [
779
779
  /* @__PURE__ */ r(zr, { size: 32, color: a }),
780
780
  /* @__PURE__ */ r(we, { size: "sm", c: a, ta: "center", children: e })
781
781
  ] }) });
@@ -795,56 +795,56 @@ function Bt({
795
795
  groupLabelDarkColor: c,
796
796
  groupLabelLightColor: h,
797
797
  collapsed: f,
798
- onMenuItemClick: m,
798
+ onMenuItemClick: b,
799
799
  onClickActionIcon: v,
800
- withBorder: y = !1,
801
- showGroupLabels: b = !0,
800
+ withBorder: m = !1,
801
+ showGroupLabels: g = !0,
802
802
  theme: p,
803
- sidebarRef: S,
803
+ sidebarRef: w,
804
804
  defaultGroupIcon: x,
805
- selectedGroupName: P,
805
+ selectedGroupName: R,
806
806
  sideBarHeaderContent: Y,
807
- iconsWithBackground: $ = !1,
807
+ iconsWithBackground: O = !1,
808
808
  menuItemHeight: G = 40,
809
- highlightActiveMenuItem: K = !0,
810
- backgroundDarkColor: k,
809
+ highlightActiveMenuItem: F = !0,
810
+ backgroundDarkColor: S,
811
811
  backgroundLightColor: T,
812
- textDarkColor: N,
812
+ textDarkColor: D,
813
813
  textLightColor: z,
814
- iconDarkColor: L,
814
+ iconDarkColor: P,
815
815
  iconLightColor: I,
816
- collapsedSubmenuWidth: M,
817
- isLoading: q = !1,
816
+ collapsedSubmenuWidth: L,
817
+ isLoading: j = !1,
818
818
  loadingError: H,
819
- loadingComponent: J,
820
- errorComponent: _,
821
- skeletonItemCount: ue = 8,
822
- skeletonGroupCount: be = 3
819
+ loadingComponent: _,
820
+ errorComponent: W,
821
+ skeletonItemCount: he = 8,
822
+ skeletonGroupCount: me = 3
823
823
  }) {
824
- const [se, j] = pe(""), g = hA(), C = He(), { colorScheme: D } = ne(), O = D === "dark" ? k ?? p.colors.dark[7] : T ?? p.white, Q = s || (D === "dark" ? p.colors[p.primaryColor][8] : p.colors[p.primaryColor][0]), V = D === "dark" ? N ?? "var(--mantine-color-text)" : z ?? "var(--mantine-color-text)", E = D === "dark" ? L ?? p.colors[p.primaryColor][0] : I ?? p.colors[p.primaryColor][7], F = ae(() => {
825
- const he = /* @__PURE__ */ new Set();
826
- return e.forEach((re) => {
827
- if (re.showInSidebar && (!re.disabled || !re.hideDisabledItem)) {
824
+ const [le, q] = fe(""), V = hA(), k = He(), { colorScheme: y } = se(), $ = y === "dark" ? S ?? p.colors.dark[7] : T ?? p.white, M = s || (y === "dark" ? p.colors[p.primaryColor][8] : p.colors[p.primaryColor][0]), Q = y === "dark" ? D ?? "var(--mantine-color-text)" : z ?? "var(--mantine-color-text)", K = y === "dark" ? P ?? p.colors[p.primaryColor][0] : I ?? p.colors[p.primaryColor][7], N = ie(() => {
825
+ const pe = /* @__PURE__ */ new Set();
826
+ return e.forEach((te) => {
827
+ if (te.showInSidebar && (!te.disabled || !te.hideDisabledItem)) {
828
828
  let Me = !1;
829
- re.group || (re.group = {
829
+ te.group || (te.group = {
830
830
  icon: x || /* @__PURE__ */ r(YA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
831
831
  label: "Default",
832
832
  name: "Default",
833
833
  hint: "Default",
834
834
  indexOrder: 0
835
- }), he.forEach((ye) => {
836
- ye.name === re.group.name && (Me = !0);
837
- }), Me || he.add({
838
- name: re.group.name,
839
- indexOrder: re.group.indexOrder,
835
+ }), pe.forEach((ve) => {
836
+ ve.name === te.group.name && (Me = !0);
837
+ }), Me || pe.add({
838
+ name: te.group.name,
839
+ indexOrder: te.group.indexOrder,
840
840
  component: /* @__PURE__ */ r(
841
- Ie,
841
+ Te,
842
842
  {
843
- content: re.group.hint,
844
- label: re.group.label,
845
- disabled: b,
846
- children: /* @__PURE__ */ R(
847
- X,
843
+ content: te.group.hint,
844
+ label: te.group.label,
845
+ disabled: g,
846
+ children: /* @__PURE__ */ E(
847
+ J,
848
848
  {
849
849
  gap: "2px",
850
850
  style: {
@@ -858,83 +858,83 @@ function Bt({
858
858
  Re,
859
859
  {
860
860
  size: "48px",
861
- variant: re.group.name === se ? "filled" : l ? "subtle" : "light",
862
- color: re.group.name === se ? Q : a,
861
+ variant: te.group.name === le ? "filled" : l ? "subtle" : "light",
862
+ color: te.group.name === le ? M : a,
863
863
  onClick: () => {
864
- j((ye) => (v && v(ye, re.group.name), re.group.name === ye && !d ? "" : re.group.name));
864
+ q((ve) => (v && v(ve, te.group.name), te.group.name === ve && !d ? "" : te.group.name));
865
865
  },
866
- children: re.group.icon
866
+ children: te.group.icon
867
867
  }
868
868
  ),
869
- b ? /* @__PURE__ */ r(
869
+ g ? /* @__PURE__ */ r(
870
870
  we,
871
871
  {
872
872
  size: "xs",
873
- c: D === "dark" ? c || p.colors[p.primaryColor][2] : h || p.colors[p.primaryColor][2],
874
- children: re.group.label
873
+ c: y === "dark" ? c || p.colors[p.primaryColor][2] : h || p.colors[p.primaryColor][2],
874
+ children: te.group.label
875
875
  }
876
876
  ) : !1
877
877
  ]
878
878
  }
879
879
  )
880
880
  },
881
- re.group.name
881
+ te.group.name
882
882
  )
883
883
  });
884
884
  }
885
- }), he.forEach((re) => {
886
- const Me = e.filter((ye) => ye.showInSidebar === !0 && (!ye.disabled || !ye.hideDisabledItem) && ye.group && ye.group.name === re.name);
887
- re.links = Me.map((ye, W) => PA(p, f, m, ye, W, $, C.pathname, K, V, M));
888
- }), [...he].sort((re, Me) => re.indexOrder - Me.indexOrder);
889
- }, [e, se, D, f, g.selectedCompany, K, C]), me = Ft(
890
- D,
885
+ }), pe.forEach((te) => {
886
+ const Me = e.filter((ve) => ve.showInSidebar === !0 && (!ve.disabled || !ve.hideDisabledItem) && ve.group && ve.group.name === te.name);
887
+ te.links = Me.map((ve, Z) => PA(p, f, b, ve, Z, O, k.pathname, F, Q, L));
888
+ }), [...pe].sort((te, Me) => te.indexOrder - Me.indexOrder);
889
+ }, [e, le, y, f, V.selectedCompany, F, k]), X = Ft(
890
+ y,
891
891
  p,
892
892
  f,
893
893
  35,
894
- Number(ce(n)),
895
- F.length > 1,
896
- $,
897
- G,
894
+ Number(de(n)),
895
+ N.length > 1,
898
896
  O,
899
- V,
900
- E
901
- ), Ce = f || se === "" ? "0px" : `calc(${o} - ${t})`, Te = l || (D === "dark" ? p.colors[p.primaryColor][6] : p.colors[p.primaryColor][7]), U = w(() => {
902
- P && F.map((he) => he.name).includes(P) ? j(P) : F.length > 1 && j("Default");
897
+ G,
898
+ $,
899
+ Q,
900
+ K
901
+ ), ye = f || le === "" ? "0px" : `calc(${o} - ${t})`, Se = l || (y === "dark" ? p.colors[p.primaryColor][6] : p.colors[p.primaryColor][7]), U = C(() => {
902
+ R && N.map((pe) => pe.name).includes(R) ? q(R) : N.length > 1 && q("Default");
903
903
  }, []);
904
- Ae(() => {
904
+ re(() => {
905
905
  U();
906
- }, []), Ae(() => {
907
- f ? j("") : se === "" && U();
906
+ }, []), re(() => {
907
+ f ? q("") : le === "" && U();
908
908
  }, [f]);
909
- const le = () => H ? _ || /* @__PURE__ */ r(
909
+ const ae = () => H ? W || /* @__PURE__ */ r(
910
910
  MA,
911
911
  {
912
912
  message: H,
913
- backgroundColor: O
913
+ backgroundColor: $
914
914
  }
915
- ) : q ? J || /* @__PURE__ */ r(
915
+ ) : j ? _ || /* @__PURE__ */ r(
916
916
  LA,
917
917
  {
918
- itemCount: ue,
918
+ itemCount: he,
919
919
  collapsed: f,
920
- backgroundColor: O
920
+ backgroundColor: $
921
921
  }
922
- ) : se !== "" ? /* @__PURE__ */ r(
922
+ ) : le !== "" ? /* @__PURE__ */ r(
923
923
  ZA,
924
924
  {
925
- ref: S,
925
+ ref: w,
926
926
  rootStyles: {
927
927
  [`.${Ar.container}`]: {
928
- background: O,
928
+ background: $,
929
929
  overflowX: "hidden",
930
930
  overflowY: "hidden",
931
931
  left: 0,
932
- height: `${ce(A)}px`
932
+ height: `${de(A)}px`
933
933
  }
934
934
  },
935
- style: { borderColor: D === "dark" ? "#000" : "#efefef" },
935
+ style: { borderColor: y === "dark" ? "#000" : "#efefef" },
936
936
  collapsed: f,
937
- width: `${ce(Ce)}`,
937
+ width: `${de(ye)}`,
938
938
  collapsedWidth: "0px",
939
939
  children: /* @__PURE__ */ r(
940
940
  De,
@@ -943,77 +943,77 @@ function Bt({
943
943
  overflowY: "auto",
944
944
  overflowX: "hidden",
945
945
  height: "100%",
946
- width: Ce
946
+ width: ye
947
947
  },
948
- children: /* @__PURE__ */ r(er, { rootStyles: { background: O }, menuItemStyles: me, closeOnClick: !0, children: F.find((he) => he.name === se)?.links || null })
948
+ children: /* @__PURE__ */ r(er, { rootStyles: { background: $ }, menuItemStyles: X, closeOnClick: !0, children: N.find((pe) => pe.name === le)?.links || null })
949
949
  }
950
950
  )
951
951
  }
952
- ) : null, Ee = () => q && F.length === 0 ? /* @__PURE__ */ r(
952
+ ) : null, Ee = () => j && N.length === 0 ? /* @__PURE__ */ r(
953
953
  Vt,
954
954
  {
955
- groupCount: be,
955
+ groupCount: me,
956
956
  width: t,
957
957
  height: A
958
958
  }
959
- ) : F.length !== 0 ? /* @__PURE__ */ r(
960
- X,
959
+ ) : N.length !== 0 ? /* @__PURE__ */ r(
960
+ J,
961
961
  {
962
962
  gap: "4px",
963
963
  style: {
964
964
  height: A,
965
965
  width: t,
966
966
  padding: "4px",
967
- backgroundColor: Te
967
+ backgroundColor: Se
968
968
  },
969
- children: F.map((he) => /* @__PURE__ */ r(ve.Fragment, { children: he.component }, he.name))
969
+ children: N.map((pe) => /* @__PURE__ */ r(Ce.Fragment, { children: pe.component }, pe.name))
970
970
  }
971
- ) : null, Le = () => H ? _ || /* @__PURE__ */ r(
971
+ ) : null, Le = () => H ? W || /* @__PURE__ */ r(
972
972
  MA,
973
973
  {
974
974
  message: H,
975
- backgroundColor: O
975
+ backgroundColor: $
976
976
  }
977
- ) : q ? J || /* @__PURE__ */ r(
977
+ ) : j ? _ || /* @__PURE__ */ r(
978
978
  LA,
979
979
  {
980
- itemCount: ue,
980
+ itemCount: he,
981
981
  collapsed: f,
982
- backgroundColor: O
982
+ backgroundColor: $
983
983
  }
984
984
  ) : e.map(
985
- (he, Oe) => PA(p, f, m, he, Oe, $, C.pathname, K, V, M)
985
+ (pe, Oe) => PA(p, f, b, pe, Oe, O, k.pathname, F, Q, L)
986
986
  );
987
- return /* @__PURE__ */ r(ke, { children: F.length == 1 ? Gt(
988
- S,
987
+ return /* @__PURE__ */ r(xe, { children: N.length == 1 ? Gt(
988
+ w,
989
989
  f,
990
990
  o,
991
991
  n,
992
- me,
992
+ X,
993
993
  Le(),
994
994
  d,
995
995
  A,
996
996
  Y,
997
997
  u,
998
- O
999
- ) : /* @__PURE__ */ R(Ve, { direction: "column", w: f ? n : o, children: [
998
+ $
999
+ ) : /* @__PURE__ */ E(Ve, { direction: "column", w: f ? n : o, children: [
1000
1000
  /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: Y }),
1001
- /* @__PURE__ */ R(Pr, { withBorder: y, h: A, w: "100%", display: "flex", children: [
1001
+ /* @__PURE__ */ E(Pr, { withBorder: m, h: A, w: "100%", display: "flex", children: [
1002
1002
  Ee(),
1003
- le()
1003
+ ae()
1004
1004
  ] }),
1005
1005
  /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: u })
1006
1006
  ] }) });
1007
1007
  }
1008
1008
  const fA = Pe(null);
1009
1009
  function gA() {
1010
- const e = ge(fA);
1010
+ const e = be(fA);
1011
1011
  if (!e)
1012
1012
  throw new Error("useSidebar must be used within a SidebarProvider");
1013
1013
  return e;
1014
1014
  }
1015
1015
  function wn() {
1016
- return ge(fA);
1016
+ return be(fA);
1017
1017
  }
1018
1018
  function bA({
1019
1019
  children: e,
@@ -1029,90 +1029,90 @@ function bA({
1029
1029
  highlightActiveItem: u = !0,
1030
1030
  onMenuItemClick: c
1031
1031
  }) {
1032
- const h = He(), f = Be(), [m, v] = oA({
1032
+ const h = He(), f = Be(), [b, v] = oA({
1033
1033
  value: n,
1034
1034
  defaultValue: A,
1035
1035
  finalValue: !1,
1036
1036
  onChange: s
1037
- }), [y, b] = oA({
1037
+ }), [m, g] = oA({
1038
1038
  value: l,
1039
1039
  defaultValue: a,
1040
1040
  finalValue: "",
1041
1041
  onChange: d
1042
- }), [p, S] = pe(""), [x, P] = pe(() => {
1043
- const L = /* @__PURE__ */ new Set();
1044
- return t.forEach((I, M) => {
1045
- I.initiallyOpened && I.links && I.links.length > 0 && L.add(`group-${M}`);
1046
- }), L;
1047
- }), Y = h.pathname, $ = w(() => {
1048
- v(!m);
1049
- }, [m, v]), G = w((L) => {
1050
- P((I) => {
1051
- const M = new Set(I);
1052
- return M.has(L) ? M.delete(L) : M.add(L), M;
1042
+ }), [p, w] = fe(""), [x, R] = fe(() => {
1043
+ const P = /* @__PURE__ */ new Set();
1044
+ return t.forEach((I, L) => {
1045
+ I.initiallyOpened && I.links && I.links.length > 0 && P.add(`group-${L}`);
1046
+ }), P;
1047
+ }), Y = h.pathname, O = C(() => {
1048
+ v(!b);
1049
+ }, [b, v]), G = C((P) => {
1050
+ R((I) => {
1051
+ const L = new Set(I);
1052
+ return L.has(P) ? L.delete(P) : L.add(P), L;
1053
1053
  });
1054
- }, []), K = w((L) => {
1055
- P((I) => {
1056
- const M = new Set(I);
1057
- return M.add(L), M;
1054
+ }, []), F = C((P) => {
1055
+ R((I) => {
1056
+ const L = new Set(I);
1057
+ return L.add(P), L;
1058
1058
  });
1059
- }, []), k = w((L) => {
1060
- P((I) => {
1061
- const M = new Set(I);
1062
- return M.delete(L), M;
1059
+ }, []), S = C((P) => {
1060
+ R((I) => {
1061
+ const L = new Set(I);
1062
+ return L.delete(P), L;
1063
1063
  });
1064
- }, []), T = ae(() => {
1064
+ }, []), T = ie(() => {
1065
1065
  if (!p.trim())
1066
1066
  return t;
1067
- const L = p.toLowerCase().trim(), I = (M) => M.reduce((q, H) => {
1068
- const J = H.label.toLowerCase().includes(L), _ = H.links ? I(H.links) : [];
1069
- return (J || _.length > 0) && q.push({
1067
+ const P = p.toLowerCase().trim(), I = (L) => L.reduce((j, H) => {
1068
+ const _ = H.label.toLowerCase().includes(P), W = H.links ? I(H.links) : [];
1069
+ return (_ || W.length > 0) && j.push({
1070
1070
  ...H,
1071
- links: _.length > 0 ? _ : H.links,
1071
+ links: W.length > 0 ? W : H.links,
1072
1072
  // Expandir automaticamente quando há match em subitens
1073
- initiallyOpened: _.length > 0 || J
1074
- }), q;
1073
+ initiallyOpened: W.length > 0 || _
1074
+ }), j;
1075
1075
  }, []);
1076
1076
  return I(t);
1077
- }, [t, p]), N = w(
1078
- (L) => {
1079
- c && c(L), L.link && (L.routeParams ? f(L.link, { state: L.routeParams }) : f(L.link)), L.redirect && f(L.redirect);
1077
+ }, [t, p]), D = C(
1078
+ (P) => {
1079
+ c && c(P), P.link && (P.routeParams ? f(P.link, { state: P.routeParams }) : f(P.link)), P.redirect && f(P.redirect);
1080
1080
  },
1081
1081
  [f, c]
1082
- ), z = ae(
1082
+ ), z = ie(
1083
1083
  () => ({
1084
- collapsed: m,
1084
+ collapsed: b,
1085
1085
  setCollapsed: v,
1086
- toggleCollapsed: $,
1087
- activeGroup: y,
1088
- setActiveGroup: b,
1086
+ toggleCollapsed: O,
1087
+ activeGroup: m,
1088
+ setActiveGroup: g,
1089
1089
  activeItemPath: Y,
1090
- navigateToItem: N,
1090
+ navigateToItem: D,
1091
1091
  searchQuery: p,
1092
- setSearchQuery: S,
1092
+ setSearchQuery: w,
1093
1093
  filteredItems: T,
1094
1094
  expandedGroups: x,
1095
1095
  toggleGroup: G,
1096
- expandGroup: K,
1097
- collapseGroup: k,
1096
+ expandGroup: F,
1097
+ collapseGroup: S,
1098
1098
  variant: o,
1099
1099
  showKeyboardShortcuts: i,
1100
1100
  highlightActiveItem: u
1101
1101
  }),
1102
1102
  [
1103
- m,
1104
- v,
1105
- $,
1106
- y,
1107
1103
  b,
1104
+ v,
1105
+ O,
1106
+ m,
1107
+ g,
1108
1108
  Y,
1109
- N,
1109
+ D,
1110
1110
  p,
1111
1111
  T,
1112
1112
  x,
1113
1113
  G,
1114
- K,
1115
- k,
1114
+ F,
1115
+ S,
1116
1116
  o,
1117
1117
  i,
1118
1118
  u
@@ -1124,7 +1124,7 @@ function mA({
1124
1124
  navigationData: e,
1125
1125
  onMenuItemClick: t
1126
1126
  }) {
1127
- const o = He(), A = Be(), n = o.pathname, s = w(
1127
+ const o = He(), A = Be(), n = o.pathname, s = C(
1128
1128
  (c) => {
1129
1129
  for (const h of c) {
1130
1130
  if (h.link === n)
@@ -1138,25 +1138,25 @@ function mA({
1138
1138
  return null;
1139
1139
  },
1140
1140
  [n]
1141
- ), a = ae(() => s(e), [s, e]), l = w(
1141
+ ), a = ie(() => s(e), [s, e]), l = C(
1142
1142
  (c) => c.link === n,
1143
1143
  [n]
1144
- ), d = w(
1144
+ ), d = C(
1145
1145
  (c) => c.link === n ? !0 : c.links ? c.links.some((h) => d(h)) : !1,
1146
1146
  [n]
1147
- ), i = ae(() => {
1148
- const c = [], h = (f, m) => {
1147
+ ), i = ie(() => {
1148
+ const c = [], h = (f, b) => {
1149
1149
  for (const v of f) {
1150
- const y = [...m, v];
1150
+ const m = [...b, v];
1151
1151
  if (v.link === n)
1152
- return c.push(...y), !0;
1153
- if (v.links && h(v.links, y))
1152
+ return c.push(...m), !0;
1153
+ if (v.links && h(v.links, m))
1154
1154
  return !0;
1155
1155
  }
1156
1156
  return !1;
1157
1157
  };
1158
1158
  return h(e, []), c;
1159
- }, [e, n]), u = w(
1159
+ }, [e, n]), u = C(
1160
1160
  (c) => {
1161
1161
  (typeof c.disabled == "function" ? c.disabled() : c.disabled) || (t && t(c), c.link && (c.routeParams ? A(c.link, { state: c.routeParams }) : A(c.link)), c.redirect && A(c.redirect));
1162
1162
  },
@@ -1175,17 +1175,17 @@ function Ht({
1175
1175
  navigationData: e,
1176
1176
  onSearch: t
1177
1177
  }) {
1178
- const [o, A] = pe(""), n = w((i) => i.reduce((u, c) => {
1178
+ const [o, A] = fe(""), n = C((i) => i.reduce((u, c) => {
1179
1179
  let h = 1;
1180
1180
  return c.links && (h += n(c.links)), u + h;
1181
- }, 0), []), s = ae(() => {
1181
+ }, 0), []), s = ie(() => {
1182
1182
  if (!o.trim())
1183
1183
  return e;
1184
1184
  const i = o.toLowerCase().trim(), u = (c) => c.reduce((h, f) => {
1185
1185
  if (!f.showInSidebar)
1186
1186
  return h;
1187
- const m = f.label.toLowerCase().includes(i), v = f.links ? u(f.links) : [];
1188
- return (m || v.length > 0) && h.push({
1187
+ const b = f.label.toLowerCase().includes(i), v = f.links ? u(f.links) : [];
1188
+ return (b || v.length > 0) && h.push({
1189
1189
  ...f,
1190
1190
  links: v.length > 0 ? v : f.links,
1191
1191
  // Expandir automaticamente grupos com match
@@ -1193,20 +1193,20 @@ function Ht({
1193
1193
  }), h;
1194
1194
  }, []);
1195
1195
  return u(e);
1196
- }, [e, o]), a = ae(() => o.trim() ? n(s) : n(e), [o, e, s, n]), l = w(
1196
+ }, [e, o]), a = ie(() => o.trim() ? n(s) : n(e), [o, e, s, n]), l = C(
1197
1197
  (i) => {
1198
1198
  if (A(i), t) {
1199
1199
  const u = i.toLowerCase().trim();
1200
1200
  if (!u)
1201
1201
  t(i, e);
1202
1202
  else {
1203
- const c = (h) => h.reduce((f, m) => {
1204
- if (!m.showInSidebar)
1203
+ const c = (h) => h.reduce((f, b) => {
1204
+ if (!b.showInSidebar)
1205
1205
  return f;
1206
- const v = m.label.toLowerCase().includes(u), y = m.links ? c(m.links) : [];
1207
- return (v || y.length > 0) && f.push({
1208
- ...m,
1209
- links: y.length > 0 ? y : m.links,
1206
+ const v = b.label.toLowerCase().includes(u), m = b.links ? c(b.links) : [];
1207
+ return (v || m.length > 0) && f.push({
1208
+ ...b,
1209
+ links: m.length > 0 ? m : b.links,
1210
1210
  initiallyOpened: !0
1211
1211
  }), f;
1212
1212
  }, []);
@@ -1215,7 +1215,7 @@ function Ht({
1215
1215
  }
1216
1216
  },
1217
1217
  [e, t]
1218
- ), d = w(() => {
1218
+ ), d = C(() => {
1219
1219
  l("");
1220
1220
  }, [l]);
1221
1221
  return {
@@ -1237,7 +1237,7 @@ function yA({
1237
1237
  onToggleSidebar: o,
1238
1238
  enabled: A = !0
1239
1239
  }) {
1240
- const n = ae(() => {
1240
+ const n = ie(() => {
1241
1241
  const d = /* @__PURE__ */ new Map(), i = (u) => {
1242
1242
  u.forEach((c) => {
1243
1243
  const h = c;
@@ -1245,13 +1245,13 @@ function yA({
1245
1245
  });
1246
1246
  };
1247
1247
  return i(e), d;
1248
- }, [e]), s = w(
1248
+ }, [e]), s = C(
1249
1249
  (d) => !!d.shortcut,
1250
1250
  []
1251
- ), a = w(
1251
+ ), a = C(
1252
1252
  (d) => d.shortcut,
1253
1253
  []
1254
- ), l = ae(() => {
1254
+ ), l = ie(() => {
1255
1255
  if (!A)
1256
1256
  return [];
1257
1257
  const d = [];
@@ -1282,19 +1282,19 @@ function ze({
1282
1282
  hoverColor: l,
1283
1283
  itemHeight: d = 40
1284
1284
  }) {
1285
- const i = fe(), { colorScheme: u } = ne(), c = e, [h, f] = pe(!1), m = s || "var(--mantine-color-text)", v = a || i.colors[i.primaryColor][6], y = l || i.colors[i.primaryColor][6], b = l ? `color-mix(in srgb, ${l} 80%, black)` : i.colors[i.primaryColor][8], p = h ? A ? b : y : A ? y : "transparent", S = h || A ? i.white : m, x = h || A ? i.white : v, P = typeof e.disabled == "function" ? e.disabled() : e.disabled;
1286
- if (P && e.hideDisabledItem || !e.showInSidebar)
1285
+ const i = ge(), { colorScheme: u } = se(), c = e, [h, f] = fe(!1), b = s || "var(--mantine-color-text)", v = a || i.colors[i.primaryColor][6], m = l || i.colors[i.primaryColor][6], g = l ? `color-mix(in srgb, ${l} 80%, black)` : i.colors[i.primaryColor][8], p = h ? A ? g : m : A ? m : "transparent", w = h || A ? i.white : b, x = h || A ? i.white : v, R = typeof e.disabled == "function" ? e.disabled() : e.disabled;
1286
+ if (R && e.hideDisabledItem || !e.showInSidebar)
1287
1287
  return null;
1288
- const Y = w(() => {
1289
- !P && n && n(e);
1290
- }, [P, n, e]), $ = Se.t(e.label), G = () => c.badge ? /* @__PURE__ */ r(dA, { size: "xs", color: c.badgeColor || "blue", variant: "filled", children: c.badge }) : null, K = () => c.shortcut ? /* @__PURE__ */ r(GA, { size: "xs", style: { marginLeft: "auto" }, children: c.shortcut }) : null;
1288
+ const Y = C(() => {
1289
+ !R && n && n(e);
1290
+ }, [R, n, e]), O = ke.t(e.label), G = () => c.badge ? /* @__PURE__ */ r(dA, { size: "xs", color: c.badgeColor || "blue", variant: "filled", children: c.badge }) : null, F = () => c.shortcut ? /* @__PURE__ */ r(GA, { size: "xs", style: { marginLeft: "auto" }, children: c.shortcut }) : null;
1291
1291
  if (e.links && e.links.length > 0) {
1292
- const k = e.links.filter((T) => {
1293
- const N = typeof T.disabled == "function" ? T.disabled() : T.disabled;
1294
- return T.showInSidebar && (!N || !T.hideDisabledItem);
1292
+ const S = e.links.filter((T) => {
1293
+ const D = typeof T.disabled == "function" ? T.disabled() : T.disabled;
1294
+ return T.showInSidebar && (!D || !T.hideDisabledItem);
1295
1295
  });
1296
- return k.length === 0 && P && e.hideDisabledItem ? null : o ? /* @__PURE__ */ R(
1297
- oe,
1296
+ return S.length === 0 && R && e.hideDisabledItem ? null : o ? /* @__PURE__ */ E(
1297
+ ne,
1298
1298
  {
1299
1299
  position: "right-start",
1300
1300
  withArrow: !0,
@@ -1303,8 +1303,8 @@ function ze({
1303
1303
  openDelay: 100,
1304
1304
  closeDelay: 200,
1305
1305
  children: [
1306
- /* @__PURE__ */ r(oe.Target, { children: /* @__PURE__ */ r(Ue, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(Ie, { label: $, position: "right", withArrow: !0, children: /* @__PURE__ */ R(
1307
- X,
1306
+ /* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Ue, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(Te, { label: O, position: "right", withArrow: !0, children: /* @__PURE__ */ E(
1307
+ J,
1308
1308
  {
1309
1309
  gap: 1,
1310
1310
  align: "center",
@@ -1337,25 +1337,25 @@ function ze({
1337
1337
  textOverflow: "ellipsis",
1338
1338
  whiteSpace: "nowrap"
1339
1339
  },
1340
- children: $
1340
+ children: O
1341
1341
  }
1342
1342
  )
1343
1343
  ]
1344
1344
  }
1345
1345
  ) }) }) }),
1346
- /* @__PURE__ */ R(oe.Dropdown, { children: [
1347
- /* @__PURE__ */ r(oe.Label, { children: $ }),
1348
- k.map((T, N) => {
1346
+ /* @__PURE__ */ E(ne.Dropdown, { children: [
1347
+ /* @__PURE__ */ r(ne.Label, { children: O }),
1348
+ S.map((T, D) => {
1349
1349
  const z = typeof T.disabled == "function" ? T.disabled() : T.disabled;
1350
1350
  return /* @__PURE__ */ r(
1351
- oe.Item,
1351
+ ne.Item,
1352
1352
  {
1353
1353
  leftSection: T.icon,
1354
1354
  disabled: z,
1355
1355
  onClick: () => n?.(T),
1356
- children: Se.t(T.label)
1356
+ children: ke.t(T.label)
1357
1357
  },
1358
- N
1358
+ D
1359
1359
  );
1360
1360
  })
1361
1361
  ] })
@@ -1364,9 +1364,9 @@ function ze({
1364
1364
  ) : /* @__PURE__ */ r(
1365
1365
  TA,
1366
1366
  {
1367
- label: $,
1367
+ label: O,
1368
1368
  leftSection: /* @__PURE__ */ r(B, { style: { color: x }, children: e.icon }),
1369
- rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: S }, children: [
1369
+ rightSection: /* @__PURE__ */ E(B, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
1370
1370
  G(),
1371
1371
  /* @__PURE__ */ r(
1372
1372
  uA,
@@ -1380,7 +1380,7 @@ function ze({
1380
1380
  ] }),
1381
1381
  childrenOffset: 28,
1382
1382
  defaultOpened: e.initiallyOpened || A,
1383
- disabled: P,
1383
+ disabled: R,
1384
1384
  onMouseEnter: () => f(!0),
1385
1385
  onMouseLeave: () => f(!1),
1386
1386
  style: {
@@ -1393,13 +1393,13 @@ function ze({
1393
1393
  borderRadius: 0
1394
1394
  },
1395
1395
  label: {
1396
- color: S
1396
+ color: w
1397
1397
  },
1398
1398
  children: {
1399
1399
  paddingLeft: 0
1400
1400
  }
1401
1401
  },
1402
- children: k.map((T, N) => /* @__PURE__ */ r(
1402
+ children: S.map((T, D) => /* @__PURE__ */ r(
1403
1403
  ze,
1404
1404
  {
1405
1405
  item: T,
@@ -1412,15 +1412,15 @@ function ze({
1412
1412
  hoverColor: l,
1413
1413
  itemHeight: d
1414
1414
  },
1415
- N
1415
+ D
1416
1416
  ))
1417
1417
  }
1418
1418
  );
1419
1419
  }
1420
1420
  return o ? /* @__PURE__ */ r(
1421
- Ie,
1421
+ Te,
1422
1422
  {
1423
- label: c.tooltip || $,
1423
+ label: c.tooltip || O,
1424
1424
  position: "right",
1425
1425
  withArrow: !0,
1426
1426
  children: /* @__PURE__ */ r(
@@ -1428,20 +1428,20 @@ function ze({
1428
1428
  {
1429
1429
  style: {
1430
1430
  width: "100%",
1431
- cursor: P ? "not-allowed" : "pointer",
1432
- opacity: P ? 0.5 : 1,
1433
- backgroundColor: A ? y : "transparent",
1431
+ cursor: R ? "not-allowed" : "pointer",
1432
+ opacity: R ? 0.5 : 1,
1433
+ backgroundColor: A ? m : "transparent",
1434
1434
  transition: "background-color 150ms ease",
1435
1435
  padding: "2px 0"
1436
1436
  },
1437
1437
  onClick: Y,
1438
- onMouseEnter: (k) => {
1439
- P || (k.currentTarget.style.backgroundColor = A ? b : y);
1438
+ onMouseEnter: (S) => {
1439
+ R || (S.currentTarget.style.backgroundColor = A ? g : m);
1440
1440
  },
1441
- onMouseLeave: (k) => {
1442
- k.currentTarget.style.backgroundColor = A ? y : "transparent";
1441
+ onMouseLeave: (S) => {
1442
+ S.currentTarget.style.backgroundColor = A ? m : "transparent";
1443
1443
  },
1444
- children: /* @__PURE__ */ R(X, { gap: 1, align: "center", children: [
1444
+ children: /* @__PURE__ */ E(J, { gap: 1, align: "center", children: [
1445
1445
  /* @__PURE__ */ r(B, { style: { color: A ? i.white : v }, children: e.icon }),
1446
1446
  /* @__PURE__ */ r(
1447
1447
  we,
@@ -1456,7 +1456,7 @@ function ze({
1456
1456
  textOverflow: "ellipsis",
1457
1457
  whiteSpace: "nowrap"
1458
1458
  },
1459
- children: $
1459
+ children: O
1460
1460
  }
1461
1461
  )
1462
1462
  ] })
@@ -1466,14 +1466,14 @@ function ze({
1466
1466
  ) : /* @__PURE__ */ r(
1467
1467
  TA,
1468
1468
  {
1469
- label: $,
1469
+ label: O,
1470
1470
  leftSection: /* @__PURE__ */ r(B, { style: { color: x }, children: e.icon }),
1471
- rightSection: /* @__PURE__ */ R(B, { style: { display: "flex", alignItems: "center", gap: 4, color: S }, children: [
1471
+ rightSection: /* @__PURE__ */ E(B, { style: { display: "flex", alignItems: "center", gap: 4, color: w }, children: [
1472
1472
  G(),
1473
- K()
1473
+ F()
1474
1474
  ] }),
1475
1475
  active: A,
1476
- disabled: P,
1476
+ disabled: R,
1477
1477
  onClick: Y,
1478
1478
  onMouseEnter: () => f(!0),
1479
1479
  onMouseLeave: () => f(!1),
@@ -1488,7 +1488,7 @@ function ze({
1488
1488
  borderRadius: 0
1489
1489
  },
1490
1490
  label: {
1491
- color: S
1491
+ color: w
1492
1492
  }
1493
1493
  }
1494
1494
  }
@@ -1503,10 +1503,10 @@ function Yt({
1503
1503
  onExpandedChange: s,
1504
1504
  groupId: a
1505
1505
  }) {
1506
- const l = fe(), { colorScheme: d } = ne(), [i, u] = pe(A), c = n !== void 0, h = c ? n : i, f = w(() => {
1506
+ const l = ge(), { colorScheme: d } = se(), [i, u] = fe(A), c = n !== void 0, h = c ? n : i, f = C(() => {
1507
1507
  c ? s?.(!h) : u((p) => !p);
1508
- }, [c, h, s]), m = d === "dark" ? l.colors.dark[6] : l.colors.gray[1], v = d === "dark" ? l.colors.dark[5] : l.colors.gray[2], y = d === "dark" ? l.colors.gray[4] : l.colors.gray[7], b = d === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
1509
- return /* @__PURE__ */ R(B, { children: [
1508
+ }, [c, h, s]), b = d === "dark" ? l.colors.dark[6] : l.colors.gray[1], v = 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];
1509
+ return /* @__PURE__ */ E(B, { children: [
1510
1510
  /* @__PURE__ */ r(
1511
1511
  sA,
1512
1512
  {
@@ -1515,7 +1515,7 @@ function Yt({
1515
1515
  p: "xs",
1516
1516
  style: {
1517
1517
  borderRadius: l.radius.sm,
1518
- backgroundColor: m,
1518
+ backgroundColor: b,
1519
1519
  transition: "background-color 150ms ease"
1520
1520
  },
1521
1521
  styles: {
@@ -1525,16 +1525,16 @@ function Yt({
1525
1525
  }
1526
1526
  }
1527
1527
  },
1528
- children: /* @__PURE__ */ R(xe, { justify: "space-between", wrap: "nowrap", children: [
1529
- /* @__PURE__ */ R(xe, { gap: "xs", wrap: "nowrap", children: [
1530
- t && /* @__PURE__ */ r(B, { style: { color: b }, children: t }),
1531
- /* @__PURE__ */ r(we, { size: "sm", fw: 600, c: y, children: Se.t(e) })
1528
+ children: /* @__PURE__ */ E(Ie, { justify: "space-between", wrap: "nowrap", children: [
1529
+ /* @__PURE__ */ E(Ie, { gap: "xs", wrap: "nowrap", children: [
1530
+ t && /* @__PURE__ */ r(B, { style: { color: g }, children: t }),
1531
+ /* @__PURE__ */ r(we, { size: "sm", fw: 600, c: m, children: ke.t(e) })
1532
1532
  ] }),
1533
1533
  /* @__PURE__ */ r(
1534
1534
  Or,
1535
1535
  {
1536
1536
  size: 16,
1537
- color: y,
1537
+ color: m,
1538
1538
  style: {
1539
1539
  transform: h ? "rotate(180deg)" : "rotate(0deg)",
1540
1540
  transition: "transform 200ms ease"
@@ -1551,8 +1551,8 @@ function Sn({
1551
1551
  label: e,
1552
1552
  children: t
1553
1553
  }) {
1554
- const o = fe(), { colorScheme: A } = ne(), n = A === "dark" ? o.colors.gray[5] : o.colors.gray[6];
1555
- return /* @__PURE__ */ R(B, { children: [
1554
+ const o = ge(), { colorScheme: A } = se(), n = A === "dark" ? o.colors.gray[5] : o.colors.gray[6];
1555
+ return /* @__PURE__ */ E(B, { children: [
1556
1556
  /* @__PURE__ */ r(
1557
1557
  we,
1558
1558
  {
@@ -1563,7 +1563,7 @@ function Sn({
1563
1563
  px: "sm",
1564
1564
  py: "xs",
1565
1565
  style: { letterSpacing: "0.5px" },
1566
- children: Se.t(e)
1566
+ children: ke.t(e)
1567
1567
  }
1568
1568
  ),
1569
1569
  t
@@ -1577,8 +1577,8 @@ function qt({
1577
1577
  activeColor: n,
1578
1578
  inactiveColor: s
1579
1579
  }) {
1580
- const a = fe(), { colorScheme: l } = ne(), d = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], i = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], f = /* @__PURE__ */ R(
1581
- X,
1580
+ const a = ge(), { colorScheme: l } = se(), d = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], i = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], u = a.colors[a.primaryColor][2], f = /* @__PURE__ */ E(
1581
+ J,
1582
1582
  {
1583
1583
  gap: 2,
1584
1584
  align: "center",
@@ -1615,7 +1615,7 @@ function qt({
1615
1615
  ]
1616
1616
  }
1617
1617
  );
1618
- return A ? f : /* @__PURE__ */ r(Ie, { label: e.hint || e.label, position: "right", withArrow: !0, children: f });
1618
+ return A ? f : /* @__PURE__ */ r(Te, { label: e.hint || e.label, position: "right", withArrow: !0, children: f });
1619
1619
  }
1620
1620
  function kn({
1621
1621
  placeholder: e = "Buscar...",
@@ -1624,12 +1624,12 @@ function kn({
1624
1624
  onClear: A,
1625
1625
  collapsed: n = !1
1626
1626
  }) {
1627
- const s = fe(), { colorScheme: a } = ne(), l = w(
1627
+ const s = ge(), { colorScheme: a } = se(), l = C(
1628
1628
  (u) => {
1629
1629
  o?.(u.currentTarget.value);
1630
1630
  },
1631
1631
  [o]
1632
- ), d = w(() => {
1632
+ ), d = C(() => {
1633
1633
  o?.(""), A?.();
1634
1634
  }, [o, A]), i = t && t.length > 0;
1635
1635
  return n ? /* @__PURE__ */ r(
@@ -1673,7 +1673,7 @@ function xn({
1673
1673
  onClick: A,
1674
1674
  collapsed: n = !1
1675
1675
  }) {
1676
- const s = fe(), { colorScheme: a } = ne(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], d = () => {
1676
+ const s = ge(), { colorScheme: a } = se(), l = a === "dark" ? s.colors.dark[5] : s.colors.gray[1], d = () => {
1677
1677
  if (typeof o == "string")
1678
1678
  return /* @__PURE__ */ r(nA, { src: o, radius: "xl", size: n ? "sm" : "md" });
1679
1679
  if (o)
@@ -1681,7 +1681,7 @@ function xn({
1681
1681
  const i = e ? e.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?";
1682
1682
  return /* @__PURE__ */ r(nA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: i });
1683
1683
  };
1684
- return n ? /* @__PURE__ */ r(Ie, { label: e || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
1684
+ return n ? /* @__PURE__ */ r(Te, { label: e || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
1685
1685
  sA,
1686
1686
  {
1687
1687
  onClick: A,
@@ -1719,9 +1719,9 @@ function xn({
1719
1719
  }
1720
1720
  }
1721
1721
  },
1722
- children: /* @__PURE__ */ R(xe, { wrap: "nowrap", children: [
1722
+ children: /* @__PURE__ */ E(Ie, { wrap: "nowrap", children: [
1723
1723
  d(),
1724
- /* @__PURE__ */ R(B, { style: { flex: 1, overflow: "hidden" }, children: [
1724
+ /* @__PURE__ */ E(B, { style: { flex: 1, overflow: "hidden" }, children: [
1725
1725
  e && /* @__PURE__ */ r(
1726
1726
  we,
1727
1727
  {
@@ -1794,13 +1794,13 @@ function vA({
1794
1794
  showGroups: n = !0,
1795
1795
  groupCount: s = 2
1796
1796
  }) {
1797
- const a = fe(), { colorScheme: l } = ne(), d = o || (l === "dark" ? a.colors.dark[7] : a.white);
1797
+ const a = ge(), { colorScheme: l } = se(), d = o || (l === "dark" ? a.colors.dark[7] : a.white);
1798
1798
  if (t)
1799
- return /* @__PURE__ */ r(X, { gap: "sm", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: e }).map((c, h) => /* @__PURE__ */ r(de, { circle: !0, height: 32, width: 32 }, h)) });
1800
- const i = (c, h = !1) => Array.from({ length: c }).map((f, m) => {
1799
+ return /* @__PURE__ */ r(J, { gap: "sm", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: e }).map((c, h) => /* @__PURE__ */ r(ue, { circle: !0, height: 32, width: 32 }, h)) });
1800
+ const i = (c, h = !1) => Array.from({ length: c }).map((f, b) => {
1801
1801
  const v = 60 + Math.random() * 30;
1802
- return /* @__PURE__ */ R(
1803
- xe,
1802
+ return /* @__PURE__ */ E(
1803
+ Ie,
1804
1804
  {
1805
1805
  gap: "sm",
1806
1806
  p: "xs",
@@ -1809,22 +1809,22 @@ function vA({
1809
1809
  height: A
1810
1810
  },
1811
1811
  children: [
1812
- /* @__PURE__ */ r(de, { circle: !0, height: 24, width: 24 }),
1813
- /* @__PURE__ */ r(de, { height: 14, width: `${v}%`, radius: "sm" })
1812
+ /* @__PURE__ */ r(ue, { circle: !0, height: 24, width: 24 }),
1813
+ /* @__PURE__ */ r(ue, { height: 14, width: `${v}%`, radius: "sm" })
1814
1814
  ]
1815
1815
  },
1816
- m
1816
+ b
1817
1817
  );
1818
1818
  });
1819
1819
  if (!n)
1820
- return /* @__PURE__ */ r(X, { gap: 2, p: "xs", style: { backgroundColor: d }, children: i(e) });
1820
+ return /* @__PURE__ */ r(J, { gap: 2, p: "xs", style: { backgroundColor: d }, children: i(e) });
1821
1821
  const u = Math.ceil(e / s);
1822
- return /* @__PURE__ */ r(X, { gap: "md", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: s }).map((c, h) => /* @__PURE__ */ R(B, { children: [
1823
- /* @__PURE__ */ R(xe, { gap: "sm", p: "xs", children: [
1824
- /* @__PURE__ */ r(de, { circle: !0, height: 20, width: 20 }),
1825
- /* @__PURE__ */ r(de, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
1822
+ return /* @__PURE__ */ r(J, { gap: "md", p: "xs", style: { backgroundColor: d }, children: Array.from({ length: s }).map((c, h) => /* @__PURE__ */ E(B, { children: [
1823
+ /* @__PURE__ */ E(Ie, { gap: "sm", p: "xs", children: [
1824
+ /* @__PURE__ */ r(ue, { circle: !0, height: 20, width: 20 }),
1825
+ /* @__PURE__ */ r(ue, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
1826
1826
  ] }),
1827
- /* @__PURE__ */ r(X, { gap: 2, mt: 4, children: i(
1827
+ /* @__PURE__ */ r(J, { gap: 2, mt: 4, children: i(
1828
1828
  h === s - 1 ? e - h * u : u,
1829
1829
  !0
1830
1830
  ) })
@@ -1835,9 +1835,9 @@ function jt({
1835
1835
  width: t = 80,
1836
1836
  backgroundColor: o
1837
1837
  }) {
1838
- const A = fe(), { colorScheme: n } = ne(), s = o || (n === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][6]);
1838
+ const A = ge(), { colorScheme: n } = se(), s = o || (n === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][6]);
1839
1839
  return /* @__PURE__ */ r(
1840
- X,
1840
+ J,
1841
1841
  {
1842
1842
  gap: "sm",
1843
1843
  p: "xs",
@@ -1847,9 +1847,9 @@ function jt({
1847
1847
  backgroundColor: s,
1848
1848
  height: "100%"
1849
1849
  },
1850
- children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ R(X, { gap: 4, align: "center", children: [
1851
- /* @__PURE__ */ r(de, { circle: !0, height: 48, width: 48 }),
1852
- /* @__PURE__ */ r(de, { height: 10, width: 40, radius: "sm" })
1850
+ children: Array.from({ length: e }).map((a, l) => /* @__PURE__ */ E(J, { gap: 4, align: "center", children: [
1851
+ /* @__PURE__ */ r(ue, { circle: !0, height: 48, width: 48 }),
1852
+ /* @__PURE__ */ r(ue, { height: 10, width: 40, radius: "sm" })
1853
1853
  ] }, l))
1854
1854
  }
1855
1855
  );
@@ -1857,22 +1857,22 @@ function jt({
1857
1857
  function En({
1858
1858
  collapsed: e = !1
1859
1859
  }) {
1860
- return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(de, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(xe, { gap: "sm", p: "md", children: [
1861
- /* @__PURE__ */ r(de, { circle: !0, height: 40, width: 40 }),
1862
- /* @__PURE__ */ R(X, { gap: 4, style: { flex: 1 }, children: [
1863
- /* @__PURE__ */ r(de, { height: 14, width: "70%", radius: "sm" }),
1864
- /* @__PURE__ */ r(de, { height: 10, width: "50%", radius: "sm" })
1860
+ return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(ue, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ E(Ie, { gap: "sm", p: "md", children: [
1861
+ /* @__PURE__ */ r(ue, { circle: !0, height: 40, width: 40 }),
1862
+ /* @__PURE__ */ E(J, { gap: 4, style: { flex: 1 }, children: [
1863
+ /* @__PURE__ */ r(ue, { height: 14, width: "70%", radius: "sm" }),
1864
+ /* @__PURE__ */ r(ue, { height: 10, width: "50%", radius: "sm" })
1865
1865
  ] })
1866
1866
  ] });
1867
1867
  }
1868
1868
  function Rn({
1869
1869
  collapsed: e = !1
1870
1870
  }) {
1871
- return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(de, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(xe, { gap: "sm", p: "sm", children: [
1872
- /* @__PURE__ */ r(de, { circle: !0, height: 36, width: 36 }),
1873
- /* @__PURE__ */ R(X, { gap: 4, style: { flex: 1 }, children: [
1874
- /* @__PURE__ */ r(de, { height: 12, width: "60%", radius: "sm" }),
1875
- /* @__PURE__ */ r(de, { height: 10, width: "80%", radius: "sm" })
1871
+ return e ? /* @__PURE__ */ r(B, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(ue, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ E(Ie, { gap: "sm", p: "sm", children: [
1872
+ /* @__PURE__ */ r(ue, { circle: !0, height: 36, width: 36 }),
1873
+ /* @__PURE__ */ E(J, { gap: 4, style: { flex: 1 }, children: [
1874
+ /* @__PURE__ */ r(ue, { height: 12, width: "60%", radius: "sm" }),
1875
+ /* @__PURE__ */ r(ue, { height: 10, width: "80%", radius: "sm" })
1876
1876
  ] })
1877
1877
  ] });
1878
1878
  }
@@ -1880,7 +1880,7 @@ function CA({
1880
1880
  message: e,
1881
1881
  backgroundColor: t
1882
1882
  }) {
1883
- const o = fe(), { colorScheme: A } = ne(), n = t || (A === "dark" ? o.colors.dark[7] : o.white), s = A === "dark" ? o.colors.red[4] : o.colors.red[6];
1883
+ const o = ge(), { colorScheme: A } = se(), n = t || (A === "dark" ? o.colors.dark[7] : o.white), s = A === "dark" ? o.colors.red[4] : o.colors.red[6];
1884
1884
  return /* @__PURE__ */ r(
1885
1885
  B,
1886
1886
  {
@@ -1924,123 +1924,123 @@ function Xt({
1924
1924
  loadingError: c,
1925
1925
  loadingComponent: h,
1926
1926
  errorComponent: f,
1927
- skeletonItemCount: m = 8,
1927
+ skeletonItemCount: b = 8,
1928
1928
  backgroundDarkColor: v,
1929
- backgroundLightColor: y,
1930
- textDarkColor: b,
1929
+ backgroundLightColor: m,
1930
+ textDarkColor: g,
1931
1931
  textLightColor: p,
1932
- iconDarkColor: S,
1932
+ iconDarkColor: w,
1933
1933
  iconLightColor: x,
1934
- activeColor: P,
1934
+ activeColor: R,
1935
1935
  withBorder: Y = !0,
1936
- withShadow: $ = !1,
1936
+ withShadow: O = !1,
1937
1937
  highlightActiveItem: G = !0,
1938
- onMenuItemClick: K
1938
+ onMenuItemClick: F
1939
1939
  }) {
1940
- const k = fe(), { colorScheme: T } = ne(), { collapsed: N, toggleCollapsed: z } = gA(), L = T === "dark" ? v ?? k.colors.dark[7] : y ?? k.white, I = T === "dark" ? b ?? k.colors.gray[3] : p ?? k.colors.gray[7], M = T === "dark" ? S ?? k.colors[k.primaryColor][4] : x ?? k.colors[k.primaryColor][6], q = P ? k.colors[P]?.[6] ?? k.colors[k.primaryColor][6] : k.colors[k.primaryColor][6], {
1940
+ const S = ge(), { colorScheme: T } = se(), { collapsed: D, toggleCollapsed: z } = gA(), P = T === "dark" ? v ?? S.colors.dark[7] : m ?? S.white, I = T === "dark" ? g ?? S.colors.gray[3] : p ?? S.colors.gray[7], L = T === "dark" ? w ?? S.colors[S.primaryColor][4] : x ?? S.colors[S.primaryColor][6], j = R ? S.colors[R]?.[6] ?? S.colors[S.primaryColor][6] : S.colors[S.primaryColor][6], {
1941
1941
  query: H,
1942
- setQuery: J,
1943
- filteredItems: _,
1944
- isSearching: ue,
1945
- clearSearch: be
1942
+ setQuery: _,
1943
+ filteredItems: W,
1944
+ isSearching: he,
1945
+ clearSearch: me
1946
1946
  } = Ht({
1947
1947
  navigationData: e,
1948
1948
  onSearch: a
1949
- }), { navigateToItem: se, isItemActive: j, isItemOrChildActive: g } = mA({
1949
+ }), { navigateToItem: le, isItemActive: q, isItemOrChildActive: V } = mA({
1950
1950
  navigationData: e,
1951
- onMenuItemClick: K
1951
+ onMenuItemClick: F
1952
1952
  });
1953
1953
  yA({
1954
1954
  navigationData: e,
1955
- navigateToItem: se,
1955
+ navigateToItem: le,
1956
1956
  onToggleSidebar: z,
1957
1957
  enabled: !0
1958
1958
  });
1959
- const C = N ? o : t, D = ae(() => {
1960
- const Q = /* @__PURE__ */ new Map(), V = [];
1961
- return _.forEach((E) => {
1962
- if (!(!E.showInSidebar || (typeof E.disabled == "function" ? E.disabled() : E.disabled) && E.hideDisabledItem))
1963
- if (E.category) {
1964
- const me = Q.get(E.category) || [];
1965
- me.push(E), Q.set(E.category, me);
1959
+ const k = D ? o : t, y = ie(() => {
1960
+ const M = /* @__PURE__ */ new Map(), Q = [];
1961
+ return W.forEach((K) => {
1962
+ if (!(!K.showInSidebar || (typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem))
1963
+ if (K.category) {
1964
+ const X = M.get(K.category) || [];
1965
+ X.push(K), M.set(K.category, X);
1966
1966
  } else
1967
- V.push(E);
1968
- }), { groups: Q, ungrouped: V };
1969
- }, [_]), O = () => {
1967
+ Q.push(K);
1968
+ }), { groups: M, ungrouped: Q };
1969
+ }, [W]), $ = () => {
1970
1970
  if (c)
1971
- return f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: L });
1971
+ return f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: P });
1972
1972
  if (u)
1973
1973
  return h || /* @__PURE__ */ r(
1974
1974
  vA,
1975
1975
  {
1976
- itemCount: m,
1977
- collapsed: N,
1978
- backgroundColor: L,
1979
- showGroups: !N
1976
+ itemCount: b,
1977
+ collapsed: D,
1978
+ backgroundColor: P,
1979
+ showGroups: !D
1980
1980
  }
1981
1981
  );
1982
- const Q = () => D.ungrouped.map((E, F) => /* @__PURE__ */ r(
1982
+ const M = () => y.ungrouped.map((K, N) => /* @__PURE__ */ r(
1983
1983
  ze,
1984
1984
  {
1985
- item: E,
1986
- collapsed: N,
1987
- active: G && j(E),
1988
- onClick: se,
1985
+ item: K,
1986
+ collapsed: D,
1987
+ active: G && q(K),
1988
+ onClick: le,
1989
1989
  textColor: I,
1990
- iconColor: M,
1991
- hoverColor: q
1990
+ iconColor: L,
1991
+ hoverColor: j
1992
1992
  },
1993
- `item-${F}`
1994
- )), V = () => Array.from(D.groups.entries()).map(([F, me], Ce) => /* @__PURE__ */ r(
1993
+ `item-${N}`
1994
+ )), Q = () => Array.from(y.groups.entries()).map(([N, X], ye) => /* @__PURE__ */ r(
1995
1995
  Yt,
1996
1996
  {
1997
- label: F,
1998
- groupId: `group-${Ce}`,
1997
+ label: N,
1998
+ groupId: `group-${ye}`,
1999
1999
  defaultExpanded: !0,
2000
- children: me.map((Te, U) => /* @__PURE__ */ r(
2000
+ children: X.map((Se, U) => /* @__PURE__ */ r(
2001
2001
  ze,
2002
2002
  {
2003
- item: Te,
2004
- collapsed: N,
2005
- active: G && j(Te),
2006
- onClick: se,
2003
+ item: Se,
2004
+ collapsed: D,
2005
+ active: G && q(Se),
2006
+ onClick: le,
2007
2007
  textColor: I,
2008
- iconColor: M
2008
+ iconColor: L
2009
2009
  },
2010
- `group-${Ce}-item-${U}`
2010
+ `group-${ye}-item-${U}`
2011
2011
  ))
2012
2012
  },
2013
- `group-${Ce}`
2013
+ `group-${ye}`
2014
2014
  ));
2015
- return N ? /* @__PURE__ */ R(X, { gap: 4, children: [
2016
- D.ungrouped.map((E, F) => /* @__PURE__ */ r(
2015
+ return D ? /* @__PURE__ */ E(J, { gap: 4, children: [
2016
+ y.ungrouped.map((K, N) => /* @__PURE__ */ r(
2017
2017
  ze,
2018
2018
  {
2019
- item: E,
2019
+ item: K,
2020
2020
  collapsed: !0,
2021
- active: G && j(E),
2022
- onClick: se,
2021
+ active: G && q(K),
2022
+ onClick: le,
2023
2023
  textColor: I,
2024
- iconColor: M
2024
+ iconColor: L
2025
2025
  },
2026
- `item-${F}`
2026
+ `item-${N}`
2027
2027
  )),
2028
- Array.from(D.groups.values()).flat().map((E, F) => /* @__PURE__ */ r(
2028
+ Array.from(y.groups.values()).flat().map((K, N) => /* @__PURE__ */ r(
2029
2029
  ze,
2030
2030
  {
2031
- item: E,
2031
+ item: K,
2032
2032
  collapsed: !0,
2033
- active: G && j(E),
2034
- onClick: se,
2033
+ active: G && q(K),
2034
+ onClick: le,
2035
2035
  textColor: I,
2036
- iconColor: M
2036
+ iconColor: L
2037
2037
  },
2038
- `grouped-item-${F}`
2038
+ `grouped-item-${N}`
2039
2039
  ))
2040
- ] }) : /* @__PURE__ */ R(X, { gap: "xs", children: [
2041
- D.ungrouped.length > 0 && /* @__PURE__ */ r(X, { gap: 2, children: Q() }),
2042
- D.groups.size > 0 && D.ungrouped.length > 0 && /* @__PURE__ */ r(lA, { my: "xs" }),
2043
- V()
2040
+ ] }) : /* @__PURE__ */ E(J, { gap: "xs", children: [
2041
+ y.ungrouped.length > 0 && /* @__PURE__ */ r(J, { gap: 2, children: M() }),
2042
+ y.groups.size > 0 && y.ungrouped.length > 0 && /* @__PURE__ */ r(lA, { my: "xs" }),
2043
+ Q()
2044
2044
  ] });
2045
2045
  };
2046
2046
  return /* @__PURE__ */ r(
@@ -2050,39 +2050,39 @@ function Xt({
2050
2050
  transition: "slide-right",
2051
2051
  duration: 200,
2052
2052
  timingFunction: "ease",
2053
- children: (Q) => /* @__PURE__ */ R(
2053
+ children: (M) => /* @__PURE__ */ E(
2054
2054
  B,
2055
2055
  {
2056
2056
  style: {
2057
- ...Q,
2058
- width: ce(C),
2059
- height: typeof A == "number" ? ce(A) : A,
2060
- minHeight: typeof A == "number" ? ce(A) : A,
2061
- backgroundColor: L,
2057
+ ...M,
2058
+ width: de(k),
2059
+ height: typeof A == "number" ? de(A) : A,
2060
+ minHeight: typeof A == "number" ? de(A) : A,
2061
+ backgroundColor: P,
2062
2062
  display: "flex",
2063
2063
  flexDirection: "column",
2064
2064
  overflow: "hidden",
2065
2065
  transition: "width 200ms ease",
2066
- borderRight: Y ? `1px solid ${T === "dark" ? k.colors.dark[5] : k.colors.gray[2]}` : void 0,
2067
- boxShadow: $ ? k.shadows.sm : void 0
2066
+ borderRight: Y ? `1px solid ${T === "dark" ? S.colors.dark[5] : S.colors.gray[2]}` : void 0,
2067
+ boxShadow: O ? S.shadows.sm : void 0
2068
2068
  },
2069
2069
  children: [
2070
2070
  l && /* @__PURE__ */ r(B, { style: { flexShrink: 0 }, children: l }),
2071
- n && !N && /* @__PURE__ */ r(B, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
2071
+ n && !D && /* @__PURE__ */ r(B, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
2072
2072
  VA,
2073
2073
  {
2074
2074
  placeholder: s,
2075
2075
  leftSection: /* @__PURE__ */ r(Ye, { size: 16 }),
2076
- rightSection: ue ? /* @__PURE__ */ r(
2076
+ rightSection: he ? /* @__PURE__ */ r(
2077
2077
  qA,
2078
2078
  {
2079
2079
  size: 16,
2080
2080
  style: { cursor: "pointer" },
2081
- onClick: be
2081
+ onClick: me
2082
2082
  }
2083
2083
  ) : null,
2084
2084
  value: H,
2085
- onChange: (V) => J(V.currentTarget.value),
2085
+ onChange: (Q) => _(Q.currentTarget.value),
2086
2086
  size: "sm"
2087
2087
  }
2088
2088
  ) }),
@@ -2093,7 +2093,7 @@ function Xt({
2093
2093
  scrollbarSize: 6,
2094
2094
  type: "hover",
2095
2095
  offsetScrollbars: !0,
2096
- children: /* @__PURE__ */ r(B, { p: "xs", children: O() })
2096
+ children: /* @__PURE__ */ r(B, { p: "xs", children: $() })
2097
2097
  }
2098
2098
  ),
2099
2099
  d && /* @__PURE__ */ r(
@@ -2102,8 +2102,8 @@ function Xt({
2102
2102
  style: {
2103
2103
  flexShrink: 0,
2104
2104
  height: i,
2105
- backgroundColor: L,
2106
- borderTop: Y ? `1px solid ${T === "dark" ? k.colors.dark[5] : k.colors.gray[2]}` : void 0
2105
+ backgroundColor: P,
2106
+ borderTop: Y ? `1px solid ${T === "dark" ? S.colors.dark[5] : S.colors.gray[2]}` : void 0
2107
2107
  },
2108
2108
  children: d
2109
2109
  }
@@ -2146,18 +2146,18 @@ function _t({
2146
2146
  iconColor: A,
2147
2147
  activeColor: n
2148
2148
  }) {
2149
- fe();
2150
- const { colorScheme: s } = ne(), a = typeof e.disabled == "function" ? e.disabled() : e.disabled;
2149
+ ge();
2150
+ const { colorScheme: s } = se(), a = typeof e.disabled == "function" ? e.disabled() : e.disabled;
2151
2151
  if (a && e.hideDisabledItem || !e.showInSidebar)
2152
2152
  return null;
2153
- const l = Se.t(e.label);
2153
+ const l = ke.t(e.label);
2154
2154
  if (e.links && e.links.length > 0) {
2155
2155
  const d = e.links.filter((i) => {
2156
2156
  const u = typeof i.disabled == "function" ? i.disabled() : i.disabled;
2157
2157
  return i.showInSidebar && (!u || !i.hideDisabledItem);
2158
2158
  });
2159
- return d.length === 0 ? null : /* @__PURE__ */ R(
2160
- oe,
2159
+ return d.length === 0 ? null : /* @__PURE__ */ E(
2160
+ ne,
2161
2161
  {
2162
2162
  position: "right-start",
2163
2163
  withArrow: !0,
@@ -2166,7 +2166,7 @@ function _t({
2166
2166
  openDelay: 100,
2167
2167
  closeDelay: 200,
2168
2168
  children: [
2169
- /* @__PURE__ */ r(oe.Target, { children: /* @__PURE__ */ r(Ie, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(X, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2169
+ /* @__PURE__ */ r(ne.Target, { children: /* @__PURE__ */ r(Te, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ E(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2170
2170
  /* @__PURE__ */ r(
2171
2171
  Re,
2172
2172
  {
@@ -2197,17 +2197,17 @@ function _t({
2197
2197
  }
2198
2198
  )
2199
2199
  ] }) }) }),
2200
- /* @__PURE__ */ R(oe.Dropdown, { children: [
2201
- /* @__PURE__ */ r(oe.Label, { children: l }),
2200
+ /* @__PURE__ */ E(ne.Dropdown, { children: [
2201
+ /* @__PURE__ */ r(ne.Label, { children: l }),
2202
2202
  d.map((i, u) => {
2203
2203
  const c = typeof i.disabled == "function" ? i.disabled() : i.disabled;
2204
2204
  return /* @__PURE__ */ r(
2205
- oe.Item,
2205
+ ne.Item,
2206
2206
  {
2207
2207
  leftSection: i.icon,
2208
2208
  disabled: c,
2209
2209
  onClick: () => o(i),
2210
- children: Se.t(i.label)
2210
+ children: ke.t(i.label)
2211
2211
  },
2212
2212
  u
2213
2213
  );
@@ -2217,7 +2217,7 @@ function _t({
2217
2217
  }
2218
2218
  );
2219
2219
  }
2220
- return /* @__PURE__ */ r(Ie, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(X, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2220
+ return /* @__PURE__ */ r(Te, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ E(J, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2221
2221
  /* @__PURE__ */ r(
2222
2222
  Re,
2223
2223
  {
@@ -2265,53 +2265,53 @@ function Wt({
2265
2265
  backgroundDarkColor: c,
2266
2266
  backgroundLightColor: h,
2267
2267
  iconDarkColor: f,
2268
- iconLightColor: m,
2268
+ iconLightColor: b,
2269
2269
  activeColor: v,
2270
- withBorder: y = !0,
2271
- withShadow: b = !1,
2270
+ withBorder: m = !0,
2271
+ withShadow: g = !1,
2272
2272
  highlightActiveItem: p = !0,
2273
- onMenuItemClick: S
2273
+ onMenuItemClick: w
2274
2274
  }) {
2275
- const x = fe(), { colorScheme: P } = ne(), { toggleCollapsed: Y } = gA(), $ = P === "dark" ? c ?? x.colors.dark[7] : h ?? x.white, G = P === "dark" ? f ?? x.colors[x.primaryColor][4] : m ?? x.colors[x.primaryColor][6], K = v ?? x.primaryColor, { navigateToItem: k, isItemActive: T, isItemOrChildActive: N } = mA({
2275
+ const x = ge(), { colorScheme: R } = se(), { toggleCollapsed: Y } = gA(), O = R === "dark" ? c ?? x.colors.dark[7] : h ?? x.white, G = R === "dark" ? f ?? x.colors[x.primaryColor][4] : b ?? x.colors[x.primaryColor][6], F = v ?? x.primaryColor, { navigateToItem: S, isItemActive: T, isItemOrChildActive: D } = mA({
2276
2276
  navigationData: e,
2277
- onMenuItemClick: S
2277
+ onMenuItemClick: w
2278
2278
  });
2279
2279
  yA({
2280
2280
  navigationData: e,
2281
- navigateToItem: k,
2281
+ navigateToItem: S,
2282
2282
  onToggleSidebar: Y,
2283
2283
  enabled: !0
2284
2284
  });
2285
- const z = e.filter((M) => !(!M.showInSidebar || (typeof M.disabled == "function" ? M.disabled() : M.disabled) && M.hideDisabledItem)), L = () => l ? i || /* @__PURE__ */ r(CA, { message: l, backgroundColor: $ }) : a ? d || /* @__PURE__ */ r(
2285
+ const z = e.filter((L) => !(!L.showInSidebar || (typeof L.disabled == "function" ? L.disabled() : L.disabled) && L.hideDisabledItem)), P = () => l ? i || /* @__PURE__ */ r(CA, { message: l, backgroundColor: O }) : a ? d || /* @__PURE__ */ r(
2286
2286
  vA,
2287
2287
  {
2288
2288
  itemCount: u,
2289
2289
  collapsed: !0,
2290
- backgroundColor: $
2290
+ backgroundColor: O
2291
2291
  }
2292
- ) : /* @__PURE__ */ r(X, { gap: 8, align: "center", children: z.map((M, q) => /* @__PURE__ */ r(
2292
+ ) : /* @__PURE__ */ r(J, { gap: 8, align: "center", children: z.map((L, j) => /* @__PURE__ */ r(
2293
2293
  _t,
2294
2294
  {
2295
- item: M,
2296
- active: p && (T(M) || N(M)),
2297
- onClick: k,
2295
+ item: L,
2296
+ active: p && (T(L) || D(L)),
2297
+ onClick: S,
2298
2298
  iconColor: G,
2299
- activeColor: K
2299
+ activeColor: F
2300
2300
  },
2301
- q
2302
- )) }), I = P === "dark" ? x.colors.dark[5] : x.colors.gray[2];
2303
- return /* @__PURE__ */ R(
2301
+ j
2302
+ )) }), I = R === "dark" ? x.colors.dark[5] : x.colors.gray[2];
2303
+ return /* @__PURE__ */ E(
2304
2304
  B,
2305
2305
  {
2306
2306
  style: {
2307
- width: ce(t),
2308
- height: ce(o),
2309
- backgroundColor: $,
2307
+ width: de(t),
2308
+ height: de(o),
2309
+ backgroundColor: O,
2310
2310
  display: "flex",
2311
2311
  flexDirection: "column",
2312
2312
  overflow: "hidden",
2313
- boxShadow: b ? x.shadows.sm : void 0,
2314
- borderRight: y ? `1px solid ${I}` : void 0
2313
+ boxShadow: g ? x.shadows.sm : void 0,
2314
+ borderRight: m ? `1px solid ${I}` : void 0
2315
2315
  },
2316
2316
  children: [
2317
2317
  A && /* @__PURE__ */ r(
@@ -2333,10 +2333,10 @@ function Wt({
2333
2333
  style: { flex: 1 },
2334
2334
  scrollbarSize: 4,
2335
2335
  type: "hover",
2336
- children: /* @__PURE__ */ r(B, { p: "xs", children: L() })
2336
+ children: /* @__PURE__ */ r(B, { p: "xs", children: P() })
2337
2337
  }
2338
2338
  ),
2339
- n && /* @__PURE__ */ R(ke, { children: [
2339
+ n && /* @__PURE__ */ E(xe, { children: [
2340
2340
  /* @__PURE__ */ r(lA, {}),
2341
2341
  /* @__PURE__ */ r(
2342
2342
  B,
@@ -2396,71 +2396,71 @@ function eo({
2396
2396
  loadingError: c,
2397
2397
  loadingComponent: h,
2398
2398
  errorComponent: f,
2399
- skeletonItemCount: m = 8,
2399
+ skeletonItemCount: b = 8,
2400
2400
  skeletonGroupCount: v = 3,
2401
- backgroundDarkColor: y,
2402
- backgroundLightColor: b,
2401
+ backgroundDarkColor: m,
2402
+ backgroundLightColor: g,
2403
2403
  textDarkColor: p,
2404
- textLightColor: S,
2404
+ textLightColor: w,
2405
2405
  iconDarkColor: x,
2406
- iconLightColor: P,
2406
+ iconLightColor: R,
2407
2407
  activeColor: Y,
2408
- groupBackgroundColor: $,
2408
+ groupBackgroundColor: O,
2409
2409
  selectedGroupColor: G,
2410
- groupColor: K,
2411
- groupLabelDarkColor: k,
2410
+ groupColor: F,
2411
+ groupLabelDarkColor: S,
2412
2412
  groupLabelLightColor: T,
2413
- withBorder: N = !1,
2413
+ withBorder: D = !1,
2414
2414
  highlightActiveItem: z = !0,
2415
- onMenuItemClick: L
2415
+ onMenuItemClick: P
2416
2416
  }) {
2417
- const I = fe(), { colorScheme: M } = ne(), {
2418
- collapsed: q,
2417
+ const I = ge(), { colorScheme: L } = se(), {
2418
+ collapsed: j,
2419
2419
  toggleCollapsed: H,
2420
- activeGroup: J,
2421
- setActiveGroup: _
2422
- } = gA(), ue = M === "dark" ? y ?? I.colors.dark[7] : b ?? I.white, be = M === "dark" ? p ?? I.colors.gray[3] : S ?? I.colors.gray[7], se = M === "dark" ? x ?? I.colors[I.primaryColor][4] : P ?? I.colors[I.primaryColor][6], j = Y ? I.colors[Y]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], g = $ || (M === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), C = G || (M === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: D, isItemActive: O } = mA({
2420
+ activeGroup: _,
2421
+ setActiveGroup: W
2422
+ } = gA(), he = L === "dark" ? m ?? I.colors.dark[7] : g ?? I.white, me = L === "dark" ? p ?? I.colors.gray[3] : w ?? I.colors.gray[7], le = L === "dark" ? x ?? I.colors[I.primaryColor][4] : R ?? I.colors[I.primaryColor][6], q = Y ? I.colors[Y]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], V = O || (L === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), k = G || (L === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: y, isItemActive: $ } = mA({
2423
2423
  navigationData: e,
2424
- onMenuItemClick: L
2424
+ onMenuItemClick: P
2425
2425
  });
2426
2426
  yA({
2427
2427
  navigationData: e,
2428
- navigateToItem: D,
2428
+ navigateToItem: y,
2429
2429
  onToggleSidebar: H,
2430
2430
  enabled: !0
2431
2431
  });
2432
- const Q = ae(() => {
2432
+ const M = ie(() => {
2433
2433
  const U = /* @__PURE__ */ new Map();
2434
- return e.forEach((le) => {
2435
- if (!le.showInSidebar || (typeof le.disabled == "function" ? le.disabled() : le.disabled) && le.hideDisabledItem)
2434
+ return e.forEach((ae) => {
2435
+ if (!ae.showInSidebar || (typeof ae.disabled == "function" ? ae.disabled() : ae.disabled) && ae.hideDisabledItem)
2436
2436
  return;
2437
- const Le = le.group ?? {
2437
+ const Le = ae.group ?? {
2438
2438
  icon: s ?? /* @__PURE__ */ r(YA, { size: "2.2rem", stroke: 1 }),
2439
2439
  label: "Default",
2440
2440
  name: "Default",
2441
2441
  hint: "Default",
2442
2442
  indexOrder: 0
2443
- }, he = U.get(Le.name);
2444
- he ? he.items.push(le) : U.set(Le.name, {
2443
+ }, pe = U.get(Le.name);
2444
+ pe ? pe.items.push(ae) : U.set(Le.name, {
2445
2445
  group: Le,
2446
- items: [le]
2446
+ items: [ae]
2447
2447
  });
2448
- }), Array.from(U.values()).sort((le, Ee) => le.group.indexOrder - Ee.group.indexOrder);
2448
+ }), Array.from(U.values()).sort((ae, Ee) => ae.group.indexOrder - Ee.group.indexOrder);
2449
2449
  }, [e, s]);
2450
- Ae(() => {
2451
- !J && Q.length > 0 && _(Q[0].group.name);
2452
- }, [J, Q, _]);
2453
- const V = ae(() => Q.find((le) => le.group.name === J)?.items ?? [], [Q, J]), E = w((U) => {
2454
- q ? (H(), _(U)) : J === U ? H() : _(U);
2455
- }, [q, J, H, _]), F = q ? 0 : Number(ce(t)) - Number(ce(n)), me = () => u && Q.length === 0 ? /* @__PURE__ */ r(
2450
+ re(() => {
2451
+ !_ && M.length > 0 && W(M[0].group.name);
2452
+ }, [_, M, W]);
2453
+ const Q = ie(() => M.find((ae) => ae.group.name === _)?.items ?? [], [M, _]), K = C((U) => {
2454
+ j ? (H(), W(U)) : _ === U ? H() : W(U);
2455
+ }, [j, _, H, W]), N = j ? 0 : Number(de(t)) - Number(de(n)), X = () => u && M.length === 0 ? /* @__PURE__ */ r(
2456
2456
  jt,
2457
2457
  {
2458
2458
  groupCount: v,
2459
2459
  width: n,
2460
- backgroundColor: g
2460
+ backgroundColor: V
2461
2461
  }
2462
- ) : Q.length <= 1 ? null : /* @__PURE__ */ r(
2463
- X,
2462
+ ) : M.length <= 1 ? null : /* @__PURE__ */ r(
2463
+ J,
2464
2464
  {
2465
2465
  gap: 4,
2466
2466
  p: 4,
@@ -2468,44 +2468,44 @@ function eo({
2468
2468
  style: {
2469
2469
  width: n,
2470
2470
  height: "100%",
2471
- backgroundColor: g,
2471
+ backgroundColor: V,
2472
2472
  flexShrink: 0
2473
2473
  },
2474
- children: Q.map((U) => /* @__PURE__ */ r(
2474
+ children: M.map((U) => /* @__PURE__ */ r(
2475
2475
  qt,
2476
2476
  {
2477
2477
  group: U.group,
2478
- active: U.group.name === J,
2479
- onClick: () => E(U.group.name),
2478
+ active: U.group.name === _,
2479
+ onClick: () => K(U.group.name),
2480
2480
  showLabel: a,
2481
- activeColor: C,
2482
- inactiveColor: K
2481
+ activeColor: k,
2482
+ inactiveColor: F
2483
2483
  },
2484
2484
  U.group.name
2485
2485
  ))
2486
2486
  }
2487
- ), Ce = () => c ? f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: ue }) : u ? h || /* @__PURE__ */ r(
2487
+ ), ye = () => c ? f || /* @__PURE__ */ r(CA, { message: c, backgroundColor: he }) : u ? h || /* @__PURE__ */ r(
2488
2488
  vA,
2489
2489
  {
2490
- itemCount: m,
2490
+ itemCount: b,
2491
2491
  collapsed: !1,
2492
- backgroundColor: ue,
2492
+ backgroundColor: he,
2493
2493
  showGroups: !1
2494
2494
  }
2495
- ) : /* @__PURE__ */ r(X, { gap: 2, children: V.map((U, le) => /* @__PURE__ */ r(
2495
+ ) : /* @__PURE__ */ r(J, { gap: 2, children: Q.map((U, ae) => /* @__PURE__ */ r(
2496
2496
  ze,
2497
2497
  {
2498
2498
  item: U,
2499
2499
  collapsed: !1,
2500
- active: z && O(U),
2501
- onClick: D,
2502
- textColor: be,
2503
- iconColor: se,
2504
- hoverColor: j
2500
+ active: z && $(U),
2501
+ onClick: y,
2502
+ textColor: me,
2503
+ iconColor: le,
2504
+ hoverColor: q
2505
2505
  },
2506
- le
2507
- )) }), Te = M === "dark" ? I.colors.dark[5] : I.colors.gray[2];
2508
- return Q.length <= 1 ? /* @__PURE__ */ R(Ve, { direction: "column", w: q ? o : t, h: "100%", style: { backgroundColor: ue }, children: [
2506
+ ae
2507
+ )) }), Se = L === "dark" ? I.colors.dark[5] : I.colors.gray[2];
2508
+ return M.length <= 1 ? /* @__PURE__ */ E(Ve, { direction: "column", w: j ? o : t, h: "100%", style: { backgroundColor: he }, children: [
2509
2509
  l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
2510
2510
  /* @__PURE__ */ r(
2511
2511
  B,
@@ -2513,31 +2513,31 @@ function eo({
2513
2513
  style: {
2514
2514
  flex: 1,
2515
2515
  width: "100%",
2516
- backgroundColor: ue,
2516
+ backgroundColor: he,
2517
2517
  display: "flex",
2518
2518
  flexDirection: "column",
2519
2519
  overflow: "hidden",
2520
- borderRight: N ? `1px solid ${Te}` : void 0
2520
+ borderRight: D ? `1px solid ${Se}` : void 0
2521
2521
  },
2522
- children: /* @__PURE__ */ r(De, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: q ? /* @__PURE__ */ r(X, { gap: 8, align: "center", children: e.filter((U) => U.showInSidebar ? !((typeof U.disabled == "function" ? U.disabled() : U.disabled) && U.hideDisabledItem) : !1).map((U, le) => /* @__PURE__ */ r(
2522
+ children: /* @__PURE__ */ r(De, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: j ? /* @__PURE__ */ r(J, { gap: 8, align: "center", children: e.filter((U) => U.showInSidebar ? !((typeof U.disabled == "function" ? U.disabled() : U.disabled) && U.hideDisabledItem) : !1).map((U, ae) => /* @__PURE__ */ r(
2523
2523
  ze,
2524
2524
  {
2525
2525
  item: U,
2526
2526
  collapsed: !0,
2527
- active: z && O(U),
2528
- onClick: D,
2529
- textColor: be,
2530
- iconColor: se,
2531
- hoverColor: j
2527
+ active: z && $(U),
2528
+ onClick: y,
2529
+ textColor: me,
2530
+ iconColor: le,
2531
+ hoverColor: q
2532
2532
  },
2533
- le
2534
- )) }) : Ce() }) })
2533
+ ae
2534
+ )) }) : ye() }) })
2535
2535
  }
2536
2536
  ),
2537
- d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: ue, flexShrink: 0 }, children: d })
2538
- ] }) : /* @__PURE__ */ R(Ve, { direction: "column", w: q ? n : t, h: "100%", style: { backgroundColor: ue }, children: [
2537
+ d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: he, flexShrink: 0 }, children: d })
2538
+ ] }) : /* @__PURE__ */ E(Ve, { direction: "column", w: j ? n : t, h: "100%", style: { backgroundColor: he }, children: [
2539
2539
  l && /* @__PURE__ */ r(B, { style: { width: "100%", flexShrink: 0 }, children: l }),
2540
- /* @__PURE__ */ R(
2540
+ /* @__PURE__ */ E(
2541
2541
  B,
2542
2542
  {
2543
2543
  style: {
@@ -2545,28 +2545,28 @@ function eo({
2545
2545
  width: "100%",
2546
2546
  display: "flex",
2547
2547
  overflow: "hidden",
2548
- borderRight: N ? `1px solid ${Te}` : void 0
2548
+ borderRight: D ? `1px solid ${Se}` : void 0
2549
2549
  },
2550
2550
  children: [
2551
- me(),
2551
+ X(),
2552
2552
  /* @__PURE__ */ r(
2553
2553
  B,
2554
2554
  {
2555
2555
  style: {
2556
- width: q ? 0 : F,
2556
+ width: j ? 0 : N,
2557
2557
  height: "100%",
2558
- backgroundColor: ue,
2558
+ backgroundColor: he,
2559
2559
  overflow: "hidden",
2560
2560
  transition: "width 200ms ease",
2561
- borderLeft: Q.length > 1 ? `1px solid ${M === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
2561
+ borderLeft: M.length > 1 ? `1px solid ${L === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
2562
2562
  },
2563
- children: !q && J && /* @__PURE__ */ r(De, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: Ce() }) })
2563
+ children: !j && _ && /* @__PURE__ */ r(De, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(B, { p: "xs", children: ye() }) })
2564
2564
  }
2565
2565
  )
2566
2566
  ]
2567
2567
  }
2568
2568
  ),
2569
- d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: ue, flexShrink: 0 }, children: d })
2569
+ d && /* @__PURE__ */ r(B, { style: { width: "100%", backgroundColor: he, flexShrink: 0 }, children: d })
2570
2570
  ] });
2571
2571
  }
2572
2572
  function Ao(e) {
@@ -2645,7 +2645,7 @@ function tA(e) {
2645
2645
  }
2646
2646
  var nr = Pe({ active: !1, refresh: () => {
2647
2647
  }, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), to = KA(function(e) {
2648
- let { children: t, active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = e, d = ae(() => ({ active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, A, n, s, a, l]);
2648
+ let { children: t, active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = e, d = ie(() => ({ active: o, refresh: A, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, A, n, s, a, l]);
2649
2649
  return r(nr.Provider, { value: d, children: t });
2650
2650
  }), oo = to, sr = QA.Activity, no = sr ?? QA.Fragment, so = !!sr, lr = "keepalive-cache-div";
2651
2651
  function ar(e) {
@@ -2670,14 +2670,14 @@ function lo(e, t, o) {
2670
2670
  return o ? NA(o, e) : t ? !NA(t, e) : !0;
2671
2671
  }
2672
2672
  var ao = KA(function(e) {
2673
- let { errorElement: t = FA, cacheNodeClassName: o, children: A, cacheKey: n, exclude: s, include: a, enableActivity: l } = e, { active: d, renderCount: i, destroy: u, transition: c, viewTransition: h, duration: f, containerDivRef: m } = e, v = ee(!1);
2673
+ let { errorElement: t = FA, cacheNodeClassName: o, children: A, cacheKey: n, exclude: s, include: a, enableActivity: l } = e, { active: d, renderCount: i, destroy: u, transition: c, viewTransition: h, duration: f, containerDivRef: b } = e, v = Ae(!1);
2674
2674
  v.current = v.current || d;
2675
- let y = ae(() => {
2676
- let b = document.createElement("div");
2677
- return or(b).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", i.toString()), b.className = lr + (o ? ` ${o}` : ""), b;
2675
+ let m = ie(() => {
2676
+ let g = document.createElement("div");
2677
+ return or(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", i.toString()), g.className = lr + (o ? ` ${o}` : ""), g;
2678
2678
  }, [i, o]);
2679
- return Ae(() => {
2680
- let b = lo(n, s, a), p = m.current;
2679
+ return re(() => {
2680
+ let g = lo(n, s, a), p = b.current;
2681
2681
  if (!p) {
2682
2682
  console.warn("keepalive: cache container not found");
2683
2683
  return;
@@ -2685,90 +2685,90 @@ var ao = KA(function(e) {
2685
2685
  if (c)
2686
2686
  (async () => {
2687
2687
  if (d) {
2688
- let S = OA(p, n);
2689
- if (await DA(f - 40), cA(S), p.contains(y))
2688
+ let w = OA(p, n);
2689
+ if (await DA(f - 40), cA(w), p.contains(m))
2690
2690
  return;
2691
- zA(p, y);
2691
+ zA(p, m);
2692
2692
  } else
2693
- b || (await DA(f), u(n));
2693
+ g || (await DA(f), u(n));
2694
2694
  })();
2695
2695
  else if (d) {
2696
- let S = () => {
2696
+ let w = () => {
2697
2697
  let x = OA(p, n);
2698
- cA(x), !p.contains(y) && zA(p, y);
2698
+ cA(x), !p.contains(m) && zA(p, m);
2699
2699
  };
2700
- h && document.startViewTransition ? document.startViewTransition(S) : S();
2700
+ h && document.startViewTransition ? document.startViewTransition(w) : w();
2701
2701
  } else
2702
- b || u(n);
2703
- }, [d, m, n, s, a]), v.current ? Ct(r(t, { children: so && l ? R(no, { mode: d ? "visible" : "hidden", children: [" ", A] }) : A }), y, n) : null;
2702
+ g || u(n);
2703
+ }, [d, b, n, s, a]), v.current ? Ct(r(t, { children: so && l ? E(no, { mode: d ? "visible" : "hidden", children: [" ", A] }) : A }), m, n) : null;
2704
2704
  }, (e, t) => e.active === t.active && e.renderCount === t.renderCount && e.children === t.children && e.exclude === t.exclude && e.include === t.include), io = ao, co = (e) => {
2705
2705
  typeof AA < "u" && qe(AA) ? AA(e) : e();
2706
2706
  }, uo = co;
2707
2707
  function ir() {
2708
- return ee(null);
2708
+ return Ae(null);
2709
2709
  }
2710
2710
  function ho(e) {
2711
- let { activeCacheKey: t, max: o = 10, exclude: A, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: c = !1, duration: h = 200, children: f, aliveRef: m, maxAliveTime: v = 0, enableActivity: y = !1 } = e, b = a || ee(null), [p, S] = pe([]);
2711
+ let { activeCacheKey: t, max: o = 10, exclude: A, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: d = "keep-alive-render", errorElement: i, transition: u = !1, viewTransition: c = !1, duration: h = 200, children: f, aliveRef: b, maxAliveTime: v = 0, enableActivity: m = !1 } = e, g = a || Ae(null), [p, w] = fe([]);
2712
2712
  mr(() => {
2713
2713
  wA(t) || uo(() => {
2714
- S((K) => {
2715
- let k = Date.now();
2716
- if (K.find((T) => T.cacheKey === t))
2717
- return K.map((T) => {
2714
+ w((F) => {
2715
+ let S = Date.now();
2716
+ if (F.find((T) => T.cacheKey === t))
2717
+ return F.map((T) => {
2718
2718
  if (T.cacheKey === t) {
2719
- let N = !1;
2719
+ let D = !1;
2720
2720
  if (qe(s) && s(t), v) {
2721
2721
  let z = T.lastActiveTime;
2722
2722
  if (iA(v)) {
2723
- let L = v.find((I) => tr(I.match) ? I.match.test(t) : I.match === t);
2724
- L && (N = L && z + L.expire * 1e3 < k);
2723
+ let P = v.find((I) => tr(I.match) ? I.match.test(t) : I.match === t);
2724
+ P && (D = P && z + P.expire * 1e3 < S);
2725
2725
  } else
2726
- N = z + v * 1e3 < k;
2726
+ D = z + v * 1e3 < S;
2727
2727
  }
2728
- return { ...T, ele: f, lastActiveTime: k, renderCount: N ? T.renderCount + 1 : T.renderCount };
2728
+ return { ...T, ele: f, lastActiveTime: S, renderCount: D ? T.renderCount + 1 : T.renderCount };
2729
2729
  }
2730
2730
  return T;
2731
2731
  });
2732
- if (qe(s) && s(t), K.length > o) {
2733
- let T = K.reduce((N, z) => N.lastActiveTime < z.lastActiveTime ? N : z);
2734
- K.splice(K.indexOf(T), 1);
2732
+ if (qe(s) && s(t), F.length > o) {
2733
+ let T = F.reduce((D, z) => D.lastActiveTime < z.lastActiveTime ? D : z);
2734
+ F.splice(F.indexOf(T), 1);
2735
2735
  }
2736
- return [...K, { cacheKey: t, lastActiveTime: k, ele: f, renderCount: 0 }];
2736
+ return [...F, { cacheKey: t, lastActiveTime: S, ele: f, renderCount: 0 }];
2737
2737
  });
2738
2738
  });
2739
2739
  }, [t, f]);
2740
- let x = w((K) => {
2741
- S((k) => {
2742
- let T = K || t;
2743
- return k.map((N) => N.cacheKey === T ? { ...N, renderCount: N.renderCount + 1 } : N);
2740
+ let x = C((F) => {
2741
+ w((S) => {
2742
+ let T = F || t;
2743
+ return S.map((D) => D.cacheKey === T ? { ...D, renderCount: D.renderCount + 1 } : D);
2744
2744
  });
2745
- }, [S, t]), P = w((K) => {
2746
- let k = K || t, T = iA(k) ? k : [k];
2747
- return new Promise((N) => {
2745
+ }, [w, t]), R = C((F) => {
2746
+ let S = F || t, T = iA(S) ? S : [S];
2747
+ return new Promise((D) => {
2748
2748
  tA(() => {
2749
- S((z) => [...z.filter((L) => !T.includes(L.cacheKey))]), N();
2749
+ w((z) => [...z.filter((P) => !T.includes(P.cacheKey))]), D();
2750
2750
  });
2751
2751
  });
2752
- }, [S, t]), Y = w(() => new Promise((K) => {
2752
+ }, [w, t]), Y = C(() => new Promise((F) => {
2753
2753
  tA(() => {
2754
- S([]), K();
2754
+ w([]), F();
2755
2755
  });
2756
- }), [S]), $ = w((K) => {
2757
- let k = K || t;
2756
+ }), [w]), O = C((F) => {
2757
+ let S = F || t;
2758
2758
  return new Promise((T) => {
2759
2759
  tA(() => {
2760
- S((N) => [...N.filter((z) => z.cacheKey === k)]), T();
2760
+ w((D) => [...D.filter((z) => z.cacheKey === S)]), T();
2761
2761
  });
2762
2762
  });
2763
- }, [t, S]), G = w(() => p, [p]);
2764
- return yr(m, () => ({ refresh: x, destroy: P, destroyAll: Y, destroyOther: $, getCacheNodes: G })), R(FA, { children: [r("div", { ref: b, className: d, style: { height: "100%" } }), p.map((K) => {
2765
- let { cacheKey: k, ele: T, renderCount: N } = K;
2766
- return r(oo, { active: t === k, refresh: x, destroy: P, destroyAll: Y, destroyOther: $, getCacheNodes: G, children: r(io, { destroy: P, include: n, exclude: A, transition: u, viewTransition: c, duration: h, renderCount: N, containerDivRef: b, errorElement: i, active: t === k, cacheNodeClassName: l, cacheKey: k, enableActivity: y, children: T }) }, `${k}-${N}`);
2763
+ }, [t, w]), G = C(() => p, [p]);
2764
+ return yr(b, () => ({ refresh: x, destroy: R, destroyAll: Y, destroyOther: O, getCacheNodes: G })), E(FA, { children: [r("div", { ref: g, className: d, style: { height: "100%" } }), p.map((F) => {
2765
+ let { cacheKey: S, ele: T, renderCount: D } = F;
2766
+ return r(oo, { active: t === S, refresh: x, destroy: R, destroyAll: Y, destroyOther: O, getCacheNodes: G, children: r(io, { destroy: R, include: n, exclude: A, transition: u, viewTransition: c, duration: h, renderCount: D, containerDivRef: g, errorElement: i, active: t === S, cacheNodeClassName: l, cacheKey: S, enableActivity: m, children: T }) }, `${S}-${D}`);
2767
2767
  })] });
2768
2768
  }
2769
- var po = ho, fo = () => ge(nr), cr = fo;
2769
+ var po = ho, fo = () => be(nr), cr = fo;
2770
2770
  function go(e, t, o = !1, A) {
2771
- let { active: n } = cr(), s = ee(!1);
2771
+ let { active: n } = cr(), s = Ae(!1);
2772
2772
  A(() => {
2773
2773
  if (!n)
2774
2774
  return;
@@ -2783,20 +2783,20 @@ function go(e, t, o = !1, A) {
2783
2783
  }, [n, ...t]);
2784
2784
  }
2785
2785
  var bo = go, mo = (e, t, o = !1) => {
2786
- bo(e, t, o, Ae);
2786
+ bo(e, t, o, re);
2787
2787
  }, yo = mo;
2788
2788
  const dr = Pe({
2789
2789
  isVisible: !0
2790
- }), Pn = () => ge(dr), SA = Pe({ params: {} }), Ln = () => ge(SA).params, Mn = () => {
2791
- const e = _A(), o = ge(SA).params;
2792
- return ae(() => {
2790
+ }), Pn = () => be(dr), SA = Pe({ params: {} }), Ln = () => be(SA).params, Mn = () => {
2791
+ const e = _A(), o = be(SA).params;
2792
+ return ie(() => {
2793
2793
  if (!e)
2794
2794
  return !1;
2795
2795
  const n = Object.keys(e);
2796
2796
  return n.length === 0 ? !1 : n.some((s) => e[s] !== void 0);
2797
2797
  }, [e]) ? e : o;
2798
- }, je = Pe(null), vo = () => ge(je), Co = ({ children: e }) => {
2799
- const t = ir(), o = ae(() => ({
2798
+ }, je = Pe(null), vo = () => be(je), Co = ({ children: e }) => {
2799
+ const t = ir(), o = ie(() => ({
2800
2800
  requestUnregister: (A) => {
2801
2801
  t.current?.destroy(A);
2802
2802
  },
@@ -2813,21 +2813,21 @@ const dr = Pe({
2813
2813
  }), [t]);
2814
2814
  return /* @__PURE__ */ r(je.Provider, { value: o, children: /* @__PURE__ */ r(ur.Provider, { value: t, children: e }) });
2815
2815
  }, ur = Pe(null), Xe = (e) => null, wo = (e) => e.includes(":"), So = (e, t) => wo(e) ? t : e, ko = ({ children: e }) => {
2816
- const { active: t } = cr(), o = _A(), A = ee(o), [n, s] = pe(o);
2816
+ const { active: t } = cr(), o = _A(), A = Ae(o), [n, s] = fe(o);
2817
2817
  return A.current = o, yo(() => {
2818
2818
  s(A.current), requestAnimationFrame(() => {
2819
2819
  window.dispatchEvent(new Event("resize"));
2820
2820
  });
2821
- }, []), Ae(() => {
2821
+ }, []), re(() => {
2822
2822
  t && s(A.current);
2823
2823
  }, [t]), /* @__PURE__ */ r(dr.Provider, { value: { isVisible: t }, children: /* @__PURE__ */ r(SA.Provider, { value: { params: n }, children: e }) });
2824
- }, xo = "__nokeep__:", hr = ve.memo(({ keepAlivePaths: e, maxKeepAliveTabs: t, aliveRef: o }) => {
2825
- const A = _e(), n = ut(), s = ae(() => {
2824
+ }, xo = "__nokeep__:", hr = Ce.memo(({ keepAlivePaths: e, maxKeepAliveTabs: t, aliveRef: o }) => {
2825
+ const A = _e(), n = ut(), s = ie(() => {
2826
2826
  const l = e.find(
2827
2827
  (d) => ht({ path: d, end: !0 }, A.pathname)
2828
2828
  );
2829
2829
  return l ? So(l, A.pathname) : xo + A.pathname;
2830
- }, [e, A.pathname]), a = ae(() => [/^__nokeep__:/], []);
2830
+ }, [e, A.pathname]), a = ie(() => [/^__nokeep__:/], []);
2831
2831
  return /* @__PURE__ */ r(
2832
2832
  po,
2833
2833
  {
@@ -2841,40 +2841,40 @@ const dr = Pe({
2841
2841
  });
2842
2842
  hr.displayName = "KeepAliveLayout";
2843
2843
  const Io = ({ children: e, maxKeepAliveTabs: t = 10, ...o }) => {
2844
- const A = ir(), s = ge(ur) || A, a = ee(null), l = ee(""), { keepAlivePaths: d, routeElements: i } = ae(() => {
2845
- const f = ve.Children.toArray(e), m = f.map((p) => {
2846
- if (ve.isValidElement(p)) {
2847
- const S = p.props?.path || "", x = p.type === Xe;
2848
- return `${S}:${x}`;
2844
+ const A = ir(), s = be(ur) || A, a = Ae(null), l = Ae(""), { keepAlivePaths: d, routeElements: i } = ie(() => {
2845
+ const f = Ce.Children.toArray(e), b = f.map((p) => {
2846
+ if (Ce.isValidElement(p)) {
2847
+ const w = p.props?.path || "", x = p.type === Xe;
2848
+ return `${w}:${x}`;
2849
2849
  }
2850
2850
  return "";
2851
2851
  }).join("|");
2852
- if (a.current && l.current === m)
2852
+ if (a.current && l.current === b)
2853
2853
  return a.current;
2854
- l.current = m;
2855
- const v = [], y = [];
2854
+ l.current = b;
2855
+ const v = [], m = [];
2856
2856
  f.forEach((p) => {
2857
- if (ve.isValidElement(p))
2857
+ if (Ce.isValidElement(p))
2858
2858
  if (p.type === Xe) {
2859
- const S = p.props;
2860
- S.path && v.push(S.path);
2861
- const x = S.component, P = typeof x == "function" ? ve.createElement(x) : x;
2862
- y.push(
2859
+ const w = p.props;
2860
+ w.path && v.push(w.path);
2861
+ const x = w.component, R = typeof x == "function" ? Ce.createElement(x) : x;
2862
+ m.push(
2863
2863
  /* @__PURE__ */ r(
2864
2864
  $e,
2865
2865
  {
2866
- path: S.path,
2867
- element: /* @__PURE__ */ r(ko, { children: P })
2866
+ path: w.path,
2867
+ element: /* @__PURE__ */ r(ko, { children: R })
2868
2868
  },
2869
- S.path || p.key
2869
+ w.path || p.key
2870
2870
  )
2871
2871
  );
2872
2872
  } else
2873
- y.push(p);
2873
+ m.push(p);
2874
2874
  });
2875
- const b = { keepAlivePaths: v, routeElements: y };
2876
- return a.current = b, b;
2877
- }, [e]), u = ge(je), c = ae(() => ({
2875
+ const g = { keepAlivePaths: v, routeElements: m };
2876
+ return a.current = g, g;
2877
+ }, [e]), u = be(je), c = ie(() => ({
2878
2878
  requestUnregister: (f) => {
2879
2879
  s.current?.destroy(f);
2880
2880
  },
@@ -2903,17 +2903,17 @@ const Io = ({ children: e, maxKeepAliveTabs: t = 10, ...o }) => {
2903
2903
  done: () => {
2904
2904
  },
2905
2905
  isNavigating: !1
2906
- }), fr = () => ge(pr), To = 150;
2906
+ }), fr = () => be(pr), To = 150;
2907
2907
  function Eo({ children: e }) {
2908
- const [t, o] = pe(!1), A = ee(null), n = ee(0), s = w(() => {
2908
+ const [t, o] = fe(!1), A = Ae(null), n = Ae(0), s = C(() => {
2909
2909
  A.current && clearTimeout(A.current), n.current = Date.now(), o(!0);
2910
- }, []), a = w(() => {
2910
+ }, []), a = C(() => {
2911
2911
  const l = Date.now() - n.current, d = Math.max(0, To - l);
2912
2912
  A.current = setTimeout(() => {
2913
2913
  o(!1);
2914
2914
  }, d);
2915
2915
  }, []);
2916
- return /* @__PURE__ */ R(pr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
2916
+ return /* @__PURE__ */ E(pr.Provider, { value: { start: s, done: a, isNavigating: t }, children: [
2917
2917
  /* @__PURE__ */ r("div", { className: "archbase-nav-progress", "data-active": t, children: /* @__PURE__ */ r("div", { className: "archbase-nav-progress-bar" }) }),
2918
2918
  e
2919
2919
  ] });
@@ -2957,170 +2957,170 @@ function Po({
2957
2957
  sidebarDefaultGroupIcon: c,
2958
2958
  sideBarHeaderHeight: h,
2959
2959
  sideBarHeaderContent: f,
2960
- selectedGroupColor: m = "#132441",
2960
+ selectedGroupColor: b = "#132441",
2961
2961
  groupColor: v = "white",
2962
- backgroundGroupColor: y = "#132441",
2963
- groupLabelDarkColor: b = "white",
2962
+ backgroundGroupColor: m = "#132441",
2963
+ groupLabelDarkColor: g = "white",
2964
2964
  groupLabelLightColor: p = "white",
2965
- headerColor: S,
2965
+ headerColor: w,
2966
2966
  footerHeight: x,
2967
- iconsWithBackground: P,
2967
+ iconsWithBackground: R,
2968
2968
  menuItemHeight: Y,
2969
- showSideBar: $ = !0,
2969
+ showSideBar: O = !0,
2970
2970
  showHeader: G = !0,
2971
- headerStyle: K = {},
2972
- highlightActiveMenuItem: k = !0,
2971
+ headerStyle: F = {},
2972
+ highlightActiveMenuItem: S = !0,
2973
2973
  customRenderSidebar: T,
2974
- showCollapsedButton: N = !0,
2974
+ showCollapsedButton: D = !0,
2975
2975
  sideBarBackgroundDarkColor: z,
2976
- sideBarBackgroundLightColor: L,
2976
+ sideBarBackgroundLightColor: P,
2977
2977
  sideBarTextDarkColor: I,
2978
- sideBarTextLightColor: M,
2979
- sideBarIconDarkColor: q,
2978
+ sideBarTextLightColor: L,
2979
+ sideBarIconDarkColor: j,
2980
2980
  sideBarIconLightColor: H,
2981
- sideBarCollapsedSubmenuWidth: J,
2982
- sidebarActiveColor: _,
2983
- maxKeepAliveTabs: ue = 10,
2984
- sidebarVariant: be = "legacy",
2985
- sidebarShowSearch: se = !1
2981
+ sideBarCollapsedSubmenuWidth: _,
2982
+ sidebarActiveColor: W,
2983
+ maxKeepAliveTabs: he = 10,
2984
+ sidebarVariant: me = "legacy",
2985
+ sidebarShowSearch: le = !1
2986
2986
  }) {
2987
- const j = fe(), g = ge(We), { colorScheme: C } = ne(), D = gt(), [O, Q] = bt(), V = ft(
2988
- `(max-width: ${s ? ce(s) : j.breakpoints.md})`
2989
- ), E = (W) => {
2990
- W.link && (W.routeParams ? D(W.link, {}, W.routeParams) : D(W.link));
2991
- }, F = (W, ie) => {
2992
- W == ie && g.collapsed && g.setCollapsed(!1), g.setCollapsed(W == ie);
2993
- }, me = () => {
2994
- let W = 0, ie = 0;
2995
- return h && (W = Number(ce(h))), a && (ie = Number(ce(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${W + ie}px)`;
2996
- }, Ce = () => {
2997
- let W = 0, ie = 0;
2998
- return h && (W = Number(ce(h))), a && (ie = Number(ce(a))), `calc(100vh - 28px - ${W + ie}px)`;
2999
- }, Te = ae(() => {
3000
- const W = [];
3001
- return g.navigationData.forEach((ie, Qe) => {
3002
- ie.links ? ie.links.forEach((Ne, xA) => {
3003
- Ne.keepAlive === !1 ? W.push(/* @__PURE__ */ r($e, { path: Ne.link, element: Ne.component }, `${Ne.link}_${xA}`)) : W.push(
2987
+ const q = ge(), V = be(We), { colorScheme: k } = se(), y = gt(), [$, M] = bt(), Q = ft(
2988
+ `(max-width: ${s ? de(s) : q.breakpoints.md})`
2989
+ ), K = (Z) => {
2990
+ Z.link && (Z.routeParams ? y(Z.link, {}, Z.routeParams) : y(Z.link));
2991
+ }, N = (Z, ce) => {
2992
+ Z == ce && V.collapsed && V.setCollapsed(!1), V.setCollapsed(Z == ce);
2993
+ }, X = () => {
2994
+ let Z = 0, ce = 0;
2995
+ return h && (Z = Number(de(h))), a && (ce = Number(de(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${Z + ce}px)`;
2996
+ }, ye = () => {
2997
+ let Z = 0, ce = 0;
2998
+ return h && (Z = Number(de(h))), a && (ce = Number(de(a))), `calc(100vh - 28px - ${Z + ce}px)`;
2999
+ }, Se = ie(() => {
3000
+ const Z = [];
3001
+ return V.navigationData.forEach((ce, Qe) => {
3002
+ ce.links ? ce.links.forEach((Ne, xA) => {
3003
+ Ne.keepAlive === !1 ? Z.push(/* @__PURE__ */ r($e, { path: Ne.link, element: Ne.component }, `${Ne.link}_${xA}`)) : Z.push(
3004
3004
  /* @__PURE__ */ r(Xe, { path: Ne.link, component: Ne.component }, `${Ne.link}_${xA}`)
3005
3005
  );
3006
- }) : ie.keepAlive === !1 ? W.push(
3007
- /* @__PURE__ */ r($e, { path: ie.link, element: ie.component }, `${ie.link}_${Qe}`)
3008
- ) : W.push(
3009
- /* @__PURE__ */ r(Xe, { path: ie.link, component: ie.component }, `${ie.link}_${Qe}`)
3006
+ }) : ce.keepAlive === !1 ? Z.push(
3007
+ /* @__PURE__ */ r($e, { path: ce.link, element: ce.component }, `${ce.link}_${Qe}`)
3008
+ ) : Z.push(
3009
+ /* @__PURE__ */ r(Xe, { path: ce.link, component: ce.component }, `${ce.link}_${Qe}`)
3010
3010
  );
3011
- }), W;
3012
- }, [g.navigationData, g.collapsed]), U = w(() => {
3013
- g.setCollapsed(!g.collapsed);
3014
- }, [g.setCollapsed, g.collapsed]), le = w(() => {
3015
- g.setHidden(!g.hidden);
3016
- }, [g.setHidden, g.hidden]);
3017
- Ae(() => {
3018
- i && i(g.hidden);
3019
- }, [g.hidden, le]), Ae(() => {
3020
- d && d(g.collapsed);
3021
- }, [g.collapsed, d]);
3022
- const Ee = be === "minimal" || g.collapsed ? n : A, Le = (W, ie = !1) => T ? T({ width: A, height: W, isHidden: V }) : be === "legacy" ? /* @__PURE__ */ r(
3011
+ }), Z;
3012
+ }, [V.navigationData, V.collapsed]), U = C(() => {
3013
+ V.setCollapsed(!V.collapsed);
3014
+ }, [V.setCollapsed, V.collapsed]), ae = C(() => {
3015
+ V.setHidden(!V.hidden);
3016
+ }, [V.setHidden, V.hidden]);
3017
+ re(() => {
3018
+ i && i(V.hidden);
3019
+ }, [V.hidden, ae]), re(() => {
3020
+ d && d(V.collapsed);
3021
+ }, [V.collapsed, d]);
3022
+ const Ee = me === "minimal" || V.collapsed ? n : A, Le = (Z, ce = !1) => T ? T({ width: A, height: Z, isHidden: Q }) : me === "legacy" ? /* @__PURE__ */ r(
3023
3023
  Bt,
3024
3024
  {
3025
- navigationData: g.navigationData,
3026
- sidebarHeight: W,
3025
+ navigationData: V.navigationData,
3026
+ sidebarHeight: Z,
3027
3027
  sidebarGroupWidth: n,
3028
3028
  sidebarCollapsedWidth: n,
3029
- selectedGroupColor: m,
3029
+ selectedGroupColor: b,
3030
3030
  groupColor: v,
3031
- backgroundGroupColor: y,
3032
- groupLabelDarkColor: b,
3031
+ backgroundGroupColor: m,
3032
+ groupLabelDarkColor: g,
3033
3033
  groupLabelLightColor: p,
3034
3034
  showGroupLabels: !1,
3035
- collapsed: ie ? !1 : g.collapsed,
3035
+ collapsed: ce ? !1 : V.collapsed,
3036
3036
  sidebarWidth: A,
3037
- isHidden: V,
3038
- onMenuItemClick: E,
3039
- onClickActionIcon: F,
3037
+ isHidden: Q,
3038
+ onMenuItemClick: K,
3039
+ onClickActionIcon: N,
3040
3040
  sideBarFooterHeight: a,
3041
3041
  sideBarFooterContent: l,
3042
3042
  sideBarHeaderContent: f,
3043
- theme: j,
3044
- sidebarRef: O,
3043
+ theme: q,
3044
+ sidebarRef: $,
3045
3045
  defaultGroupIcon: c,
3046
3046
  selectedGroupName: u,
3047
- iconsWithBackground: P,
3047
+ iconsWithBackground: R,
3048
3048
  menuItemHeight: Y,
3049
- highlightActiveMenuItem: k,
3049
+ highlightActiveMenuItem: S,
3050
3050
  backgroundDarkColor: z,
3051
- backgroundLightColor: L,
3051
+ backgroundLightColor: P,
3052
3052
  textDarkColor: I,
3053
- textLightColor: M,
3054
- iconDarkColor: q,
3053
+ textLightColor: L,
3054
+ iconDarkColor: j,
3055
3055
  iconLightColor: H,
3056
- collapsedSubmenuWidth: J,
3057
- isLoading: g.isLoadingPermissions,
3058
- loadingError: g.permissionsError
3056
+ collapsedSubmenuWidth: _,
3057
+ isLoading: V.isLoadingPermissions,
3058
+ loadingError: V.permissionsError
3059
3059
  }
3060
3060
  ) : /* @__PURE__ */ r(
3061
3061
  ro,
3062
3062
  {
3063
- navigationData: g.navigationData,
3064
- variant: be,
3063
+ navigationData: V.navigationData,
3064
+ variant: me,
3065
3065
  width: Ee,
3066
3066
  collapsedWidth: n,
3067
- height: W,
3067
+ height: Z,
3068
3068
  groupColumnWidth: n,
3069
- collapsed: ie ? !1 : g.collapsed,
3070
- onCollapsedChange: (Qe) => g.setCollapsed(Qe),
3069
+ collapsed: ce ? !1 : V.collapsed,
3070
+ onCollapsedChange: (Qe) => V.setCollapsed(Qe),
3071
3071
  activeGroup: u,
3072
3072
  onActiveGroupChange: (Qe) => {
3073
3073
  },
3074
3074
  defaultGroupIcon: c,
3075
3075
  showGroupLabels: !1,
3076
- onMenuItemClick: E,
3077
- showSearch: se,
3076
+ onMenuItemClick: K,
3077
+ showSearch: le,
3078
3078
  header: f,
3079
3079
  footer: l,
3080
3080
  footerHeight: a,
3081
- isLoading: g.isLoadingPermissions,
3082
- loadingError: g.permissionsError,
3083
- theme: j,
3084
- highlightActiveItem: k,
3081
+ isLoading: V.isLoadingPermissions,
3082
+ loadingError: V.permissionsError,
3083
+ theme: q,
3084
+ highlightActiveItem: S,
3085
3085
  backgroundDarkColor: z,
3086
- backgroundLightColor: L,
3086
+ backgroundLightColor: P,
3087
3087
  textDarkColor: I,
3088
- textLightColor: M,
3089
- iconDarkColor: q,
3088
+ textLightColor: L,
3089
+ iconDarkColor: j,
3090
3090
  iconLightColor: H,
3091
- groupBackgroundColor: y,
3092
- selectedGroupColor: m,
3091
+ groupBackgroundColor: m,
3092
+ selectedGroupColor: b,
3093
3093
  groupColor: v,
3094
- groupLabelDarkColor: b,
3094
+ groupLabelDarkColor: g,
3095
3095
  groupLabelLightColor: p,
3096
- activeColor: _,
3096
+ activeColor: W,
3097
3097
  withBorder: !1,
3098
- sidebarRef: O
3098
+ sidebarRef: $
3099
3099
  }
3100
- ), he = C === "dark" ? z ?? j.colors.dark[7] : L ?? j.white, Oe = be === "legacy", re = Oe ? void 0 : {
3100
+ ), pe = k === "dark" ? z ?? q.colors.dark[7] : P ?? q.white, Oe = me === "legacy", te = Oe ? void 0 : {
3101
3101
  width: { base: Ee },
3102
3102
  breakpoint: "sm",
3103
- collapsed: { mobile: V || !$, desktop: V || !$ }
3103
+ collapsed: { mobile: Q || !O, desktop: Q || !O }
3104
3104
  }, Me = Oe ? {
3105
3105
  main: {
3106
- background: C === "dark" ? j.colors.dark[8] : j.colors.gray[0],
3106
+ background: k === "dark" ? q.colors.dark[8] : q.colors.gray[0],
3107
3107
  overflow: "hidden"
3108
3108
  }
3109
3109
  } : {
3110
3110
  main: {
3111
- background: C === "dark" ? j.colors.dark[8] : j.colors.gray[0],
3111
+ background: k === "dark" ? q.colors.dark[8] : q.colors.gray[0],
3112
3112
  overflow: "hidden"
3113
3113
  },
3114
3114
  navbar: {
3115
- background: he,
3115
+ background: pe,
3116
3116
  border: "none"
3117
3117
  }
3118
- }, ye = Oe ? {
3118
+ }, ve = Oe ? {
3119
3119
  height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
3120
- width: `calc(100vw - var(--app-shell-padding) - calc(${V ? "0px" : Ee} + 1rem))`,
3120
+ width: `calc(100vw - var(--app-shell-padding) - calc(${Q ? "0px" : Ee} + 1rem))`,
3121
3121
  marginTop: "0.5rem",
3122
- marginLeft: `calc(${V ? "0px" : Ee} + 0.5rem)`,
3123
- border: `1px solid ${C === "dark" ? j.colors.dark[4] : "#e4e9ef"}`,
3122
+ marginLeft: `calc(${Q ? "0px" : Ee} + 0.5rem)`,
3123
+ border: `1px solid ${k === "dark" ? q.colors.dark[4] : "#e4e9ef"}`,
3124
3124
  borderRadius: "4px",
3125
3125
  overflow: "hidden"
3126
3126
  } : {
@@ -3129,15 +3129,15 @@ function Po({
3129
3129
  marginTop: "0.5rem",
3130
3130
  marginLeft: "0.5rem",
3131
3131
  marginRight: "0.5rem",
3132
- border: `1px solid ${C === "dark" ? j.colors.dark[4] : "#e4e9ef"}`,
3132
+ border: `1px solid ${k === "dark" ? q.colors.dark[4] : "#e4e9ef"}`,
3133
3133
  borderRadius: "4px",
3134
3134
  overflow: "hidden"
3135
3135
  };
3136
- return /* @__PURE__ */ r(Eo, { children: /* @__PURE__ */ R(
3136
+ return /* @__PURE__ */ r(Eo, { children: /* @__PURE__ */ E(
3137
3137
  Ke,
3138
3138
  {
3139
3139
  header: { height: "60px", collapsed: !G },
3140
- navbar: re,
3140
+ navbar: te,
3141
3141
  footer: { height: x || "0px" },
3142
3142
  styles: Me,
3143
3143
  children: [
@@ -3145,42 +3145,42 @@ function Po({
3145
3145
  Ke.Header,
3146
3146
  {
3147
3147
  p: "xs",
3148
- color: S,
3148
+ color: w,
3149
3149
  display: "flex",
3150
3150
  style: {
3151
3151
  backgroundColor: "var(--mantine-primary-color-8)",
3152
3152
  alignItems: "center",
3153
3153
  borderBottom: "none",
3154
- ...K
3154
+ ...F
3155
3155
  },
3156
3156
  children: t
3157
3157
  }
3158
3158
  ),
3159
- !V && $ && /* @__PURE__ */ r(Ke.Navbar, { children: Le(me(), !1) }),
3160
- /* @__PURE__ */ R(Ke.Main, { bg: C === "dark" ? j.colors.dark[8] : j.colors.gray[0], children: [
3161
- !V && N && Ro(
3162
- C,
3163
- j,
3164
- g,
3159
+ !Q && O && /* @__PURE__ */ r(Ke.Navbar, { children: Le(X(), !1) }),
3160
+ /* @__PURE__ */ E(Ke.Main, { bg: k === "dark" ? q.colors.dark[8] : q.colors.gray[0], children: [
3161
+ !Q && D && Ro(
3162
+ k,
3163
+ q,
3164
+ V,
3165
3165
  A,
3166
3166
  n,
3167
3167
  U
3168
3168
  ),
3169
- /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ R("div", { style: ye, children: [
3169
+ /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ E("div", { style: ve, children: [
3170
3170
  e,
3171
- /* @__PURE__ */ r(Lo, { maxKeepAliveTabs: ue, routes: Te })
3171
+ /* @__PURE__ */ r(Lo, { maxKeepAliveTabs: he, routes: Se })
3172
3172
  ] }) }),
3173
- $ && /* @__PURE__ */ r(
3173
+ O && /* @__PURE__ */ r(
3174
3174
  BA,
3175
3175
  {
3176
- opened: g.hidden || !1,
3177
- onClose: le,
3176
+ opened: V.hidden || !1,
3177
+ onClose: ae,
3178
3178
  size: A,
3179
3179
  padding: 0,
3180
3180
  styles: {
3181
3181
  header: { minHeight: "10px" }
3182
3182
  },
3183
- children: Le(Ce(), !0)
3183
+ children: Le(ye(), !0)
3184
3184
  }
3185
3185
  )
3186
3186
  ] }),
@@ -3196,7 +3196,7 @@ function Lo({ maxKeepAliveTabs: e, routes: t }) {
3196
3196
  height: "calc(100% - 48px)",
3197
3197
  opacity: o ? 0.6 : 1,
3198
3198
  transition: "opacity 0.15s ease-out"
3199
- }, children: /* @__PURE__ */ R(Io, { maxKeepAliveTabs: e, children: [
3199
+ }, children: /* @__PURE__ */ E(Io, { maxKeepAliveTabs: e, children: [
3200
3200
  ...t
3201
3201
  ] }) });
3202
3202
  }
@@ -3215,41 +3215,41 @@ function Dn({
3215
3215
  sideBarFooterHeight: c,
3216
3216
  sideBarFooterContent: h,
3217
3217
  onCollapsedSideBar: f,
3218
- onHiddenSidebar: m,
3218
+ onHiddenSidebar: b,
3219
3219
  sidebarDefaultGroupIcon: v,
3220
- sidebarSelectedGroupName: y,
3221
- sideBarHeaderHeight: b,
3220
+ sidebarSelectedGroupName: m,
3221
+ sideBarHeaderHeight: g,
3222
3222
  sideBarHeaderContent: p,
3223
- selectedGroupColor: S = "#132441",
3223
+ selectedGroupColor: w = "#132441",
3224
3224
  groupColor: x = "white",
3225
- backgroundGroupColor: P = "#132441",
3225
+ backgroundGroupColor: R = "#132441",
3226
3226
  groupLabelDarkColor: Y = "white",
3227
- groupLabelLightColor: $ = "white",
3227
+ groupLabelLightColor: O = "white",
3228
3228
  headerColor: G,
3229
- footerHeight: K,
3230
- iconsWithBackground: k,
3229
+ footerHeight: F,
3230
+ iconsWithBackground: S,
3231
3231
  menuItemHeight: T,
3232
- showSideBar: N,
3232
+ showSideBar: D,
3233
3233
  showHeader: z,
3234
- headerStyle: L,
3234
+ headerStyle: P,
3235
3235
  highlightActiveMenuItem: I,
3236
- enableSecurity: M = !1,
3237
- securityOptions: q,
3236
+ enableSecurity: L = !1,
3237
+ securityOptions: j,
3238
3238
  customRenderSidebar: H,
3239
- onNavigationDataChange: J,
3240
- showCollapsedButton: _,
3241
- initialSidebarCollapsed: ue = !1,
3242
- sideBarBackgroundDarkColor: be,
3243
- sideBarBackgroundLightColor: se,
3244
- sideBarTextDarkColor: j,
3245
- sideBarTextLightColor: g,
3246
- sideBarIconDarkColor: C,
3247
- sideBarIconLightColor: D,
3248
- sideBarCollapsedSubmenuWidth: O,
3249
- sidebarActiveColor: Q,
3250
- maxKeepAliveTabs: V = 10,
3251
- sidebarVariant: E = "legacy",
3252
- sidebarShowSearch: F = !1
3239
+ onNavigationDataChange: _,
3240
+ showCollapsedButton: W,
3241
+ initialSidebarCollapsed: he = !1,
3242
+ sideBarBackgroundDarkColor: me,
3243
+ sideBarBackgroundLightColor: le,
3244
+ sideBarTextDarkColor: q,
3245
+ sideBarTextLightColor: V,
3246
+ sideBarIconDarkColor: k,
3247
+ sideBarIconLightColor: y,
3248
+ sideBarCollapsedSubmenuWidth: $,
3249
+ sidebarActiveColor: M,
3250
+ maxKeepAliveTabs: Q = 10,
3251
+ sidebarVariant: K = "legacy",
3252
+ sidebarShowSearch: N = !1
3253
3253
  }) {
3254
3254
  return /* @__PURE__ */ r(
3255
3255
  Lt,
@@ -3259,10 +3259,10 @@ function Dn({
3259
3259
  user: o,
3260
3260
  owner: a,
3261
3261
  company: l,
3262
- enableSecurity: M,
3263
- securityOptions: q,
3264
- onNavigationDataChange: J,
3265
- initialSidebarCollapsed: ue,
3262
+ enableSecurity: L,
3263
+ securityOptions: j,
3264
+ onNavigationDataChange: _,
3265
+ initialSidebarCollapsed: he,
3266
3266
  children: /* @__PURE__ */ r(
3267
3267
  Po,
3268
3268
  {
@@ -3275,41 +3275,41 @@ function Dn({
3275
3275
  sideBarWidth: d,
3276
3276
  sideBarCollapsedWidth: i,
3277
3277
  sideBarHiddenBreakPoint: u,
3278
- sideBarHeaderHeight: b,
3278
+ sideBarHeaderHeight: g,
3279
3279
  sideBarHeaderContent: p,
3280
3280
  sideBarFooterHeight: c,
3281
3281
  sideBarFooterContent: h,
3282
- selectedGroupColor: S,
3282
+ selectedGroupColor: w,
3283
3283
  groupColor: x,
3284
- backgroundGroupColor: P,
3284
+ backgroundGroupColor: R,
3285
3285
  groupLabelDarkColor: Y,
3286
- groupLabelLightColor: $,
3286
+ groupLabelLightColor: O,
3287
3287
  onCollapsedSideBar: f,
3288
- onHiddenSidebar: m,
3288
+ onHiddenSidebar: b,
3289
3289
  sidebarDefaultGroupIcon: v,
3290
- sidebarSelectedGroupName: y,
3290
+ sidebarSelectedGroupName: m,
3291
3291
  headerColor: G,
3292
- footerHeight: K,
3293
- iconsWithBackground: k,
3292
+ footerHeight: F,
3293
+ iconsWithBackground: S,
3294
3294
  menuItemHeight: T,
3295
- showSideBar: N,
3295
+ showSideBar: D,
3296
3296
  showHeader: z,
3297
- headerStyle: L,
3297
+ headerStyle: P,
3298
3298
  highlightActiveMenuItem: I,
3299
- enableSecurity: M,
3299
+ enableSecurity: L,
3300
3300
  customRenderSidebar: H,
3301
- showCollapsedButton: _,
3302
- sideBarBackgroundDarkColor: be,
3303
- sideBarBackgroundLightColor: se,
3304
- sideBarTextDarkColor: j,
3305
- sideBarTextLightColor: g,
3306
- sideBarIconDarkColor: C,
3307
- sideBarIconLightColor: D,
3308
- sideBarCollapsedSubmenuWidth: O,
3309
- sidebarActiveColor: Q,
3310
- maxKeepAliveTabs: V,
3311
- sidebarVariant: E,
3312
- sidebarShowSearch: F,
3301
+ showCollapsedButton: W,
3302
+ sideBarBackgroundDarkColor: me,
3303
+ sideBarBackgroundLightColor: le,
3304
+ sideBarTextDarkColor: q,
3305
+ sideBarTextLightColor: V,
3306
+ sideBarIconDarkColor: k,
3307
+ sideBarIconLightColor: y,
3308
+ sideBarCollapsedSubmenuWidth: $,
3309
+ sidebarActiveColor: M,
3310
+ maxKeepAliveTabs: Q,
3311
+ sidebarVariant: K,
3312
+ sidebarShowSearch: N,
3313
3313
  children: A
3314
3314
  }
3315
3315
  )
@@ -3339,24 +3339,24 @@ const gr = Pe({
3339
3339
  return s;
3340
3340
  }
3341
3341
  }, [A, n] = vr(o, t);
3342
- return ve.useEffect(() => {
3342
+ return Ce.useEffect(() => {
3343
3343
  let s = null;
3344
3344
  return A.userCloseLinkRequest && !A.linkClosed && (s = setTimeout(() => {
3345
3345
  n({ type: "CLOSE_ALLOWED", link: A.userCloseLinkRequest });
3346
- }, 100)), () => {
3346
+ }, 0)), () => {
3347
3347
  s && clearTimeout(s);
3348
3348
  };
3349
3349
  }, [A.userCloseLinkRequest, A.linkClosed, n]), /* @__PURE__ */ r(gr.Provider, { value: { state: A, dispatch: n }, children: e });
3350
3350
  }, br = () => {
3351
- const e = ge(gr);
3351
+ const e = be(gr);
3352
3352
  if (!e)
3353
3353
  throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
3354
3354
  return e;
3355
3355
  }, zn = (e, t) => {
3356
- const o = br(), { state: A, dispatch: n } = o, s = w((d) => {
3356
+ const o = br(), { state: A, dispatch: n } = o, s = C((d) => {
3357
3357
  n({ type: "CLOSE_ALLOWED", link: e, payload: d });
3358
- }, [n, e]), a = ee(t);
3359
- a.current = t, Ae(() => {
3358
+ }, [n, e]), a = Ae(t);
3359
+ a.current = t, re(() => {
3360
3360
  A && A.userCloseLinkRequest && A.userCloseLinkRequest === e && a.current();
3361
3361
  }, [A, e]);
3362
3362
  const l = A.isClosing && A.userCloseLinkRequest === e;
@@ -3424,199 +3424,200 @@ function On({
3424
3424
  activeTabId: A,
3425
3425
  openedTabs: n = []
3426
3426
  }) {
3427
- const [s, a] = ve.useTransition(), l = Be(), { colorScheme: d } = ne(), [i, u] = pe(n), [c, h] = pe(A), f = ee(void 0), m = He(), v = ee([]);
3427
+ const [s, a] = Ce.useTransition(), l = Be(), { colorScheme: d } = se(), [i, u] = fe(n), [c, h] = fe(A), f = Ae(void 0), b = He(), v = Ae([]);
3428
3428
  wt(v);
3429
- const y = br(), { state: b, dispatch: p } = y, S = ge(We), x = vo(), { start: P, done: Y } = fr(), $ = Je((g) => g.clearSnapshot), G = Je((g) => g.removeTab), K = ee(t), k = ee(o);
3430
- Ae(() => {
3431
- K.current = t, k.current = o;
3429
+ const m = br(), { state: g, dispatch: p } = m, w = be(We), x = vo(), { start: R, done: Y } = fr(), O = Je((k) => k.clearSnapshot), G = Je((k) => k.removeTab), F = Ae(t), S = Ae(o);
3430
+ re(() => {
3431
+ F.current = t, S.current = o;
3432
3432
  });
3433
- const T = ee(c);
3434
- Ae(() => {
3433
+ const T = Ae(c);
3434
+ re(() => {
3435
3435
  f.current = T.current, T.current = c;
3436
3436
  }, [c]);
3437
- const N = ee(!1), z = w((g, C) => {
3438
- P(), x ? x.destroy(g) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), $(g), G(g);
3439
- const D = i.findIndex((F) => F.path === g);
3440
- let O = C?.redirectUrl;
3441
- !O && D >= 0 && (O = i[D].redirect);
3442
- const Q = i.filter((F) => F.id !== g);
3443
- let V = null;
3444
- if (f.current && f.current !== g) {
3445
- const F = Q.find((me) => me.id === f.current);
3446
- F && (V = F.id);
3437
+ const D = Ae(!1), z = C((k, y) => {
3438
+ R(), x ? x.destroy(k) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), O(k), G(k);
3439
+ const $ = i.findIndex((X) => X.path === k);
3440
+ let M = y?.redirectUrl;
3441
+ !M && $ >= 0 && (M = i[$].redirect);
3442
+ const Q = i.filter((X) => X.id !== k);
3443
+ let K = null;
3444
+ if (f.current && f.current !== k) {
3445
+ const X = Q.find((ye) => ye.id === f.current);
3446
+ X && (K = X.id);
3447
3447
  }
3448
- if (!V) {
3449
- let F = -1;
3450
- Q.forEach((me, Ce) => me.id === c && (F = Ce)), Q.length > 0 && Q[F] ? V = Q[F].id : Q.length > 0 && (V = Q[Q.length - 1].id);
3448
+ if (!K) {
3449
+ let X = -1;
3450
+ Q.forEach((ye, Se) => ye.id === c && (X = Se)), Q.length > 0 && Q[X] ? K = Q[X].id : Q.length > 0 && (K = Q[Q.length - 1].id);
3451
3451
  }
3452
- const E = Q.map((F) => ({
3453
- ...F,
3454
- active: V === F.id
3452
+ const N = Q.map((X) => ({
3453
+ ...X,
3454
+ active: K === X.id
3455
3455
  }));
3456
- if (u(E), V && V != null)
3457
- h(V), l(O || V);
3456
+ if (u(N), K && K != null)
3457
+ h(K), l(M || K);
3458
3458
  else {
3459
- if (h(void 0), !S.navigationRootLink) {
3459
+ if (h(void 0), !w.navigationRootLink) {
3460
3460
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3461
3461
  return;
3462
3462
  }
3463
- l(S.navigationRootLink);
3463
+ l(w.navigationRootLink);
3464
3464
  }
3465
3465
  p({ type: "DONE", link: "" }), Y();
3466
- }, [i, c, l, S.navigationRootLink, p, x, P, Y, $, G]);
3467
- Ae(() => {
3468
- b?.linkClosed && z(b?.linkClosed, b?.payload);
3469
- }, [b?.linkClosed, b?.payload, z]);
3470
- const L = (g) => {
3471
- const C = {
3466
+ }, [i, c, l, w.navigationRootLink, p, x, R, Y, O, G]);
3467
+ re(() => {
3468
+ g?.linkClosed && z(g?.linkClosed, g?.payload);
3469
+ }, [g?.linkClosed, g?.payload, z]);
3470
+ const P = (k) => {
3471
+ const y = {
3472
3472
  item: void 0,
3473
3473
  title: void 0,
3474
- link: g,
3474
+ link: k,
3475
3475
  redirect: void 0,
3476
3476
  customTitle: void 0
3477
3477
  };
3478
- return e.forEach((D) => {
3479
- if (D.links)
3480
- D.links.forEach((O) => {
3481
- EA({ path: O.link || "" }, location.pathname) && (C.item = O, C.title = `${te().t(O.label)}`, C.redirect = O.redirect, C.customTitle = O.customTitle);
3478
+ return e.forEach(($) => {
3479
+ if ($.links)
3480
+ $.links.forEach((M) => {
3481
+ EA({ path: M.link || "" }, location.pathname) && (y.item = M, y.title = `${oe().t(M.label)}`, y.redirect = M.redirect, y.customTitle = M.customTitle);
3482
3482
  });
3483
- else if (D.link && !C.item) {
3484
- const O = EA({ path: D.link }, location.pathname);
3485
- O && (O.params && Object.keys(O.params).length > 0 ? C.title = `${O.params[Object.keys(O.params)[0]]}` : C.title = `${te().t(D.label)}`, C.item = D, C.redirect = D.redirect, C.customTitle = D.customTitle);
3483
+ else if ($.link && !y.item) {
3484
+ const M = EA({ path: $.link }, location.pathname);
3485
+ M && (M.params && Object.keys(M.params).length > 0 ? y.title = `${M.params[Object.keys(M.params)[0]]}` : y.title = `${oe().t($.label)}`, y.item = $, y.redirect = $.redirect, y.customTitle = $.customTitle);
3486
3486
  }
3487
- }), C.customTitle && (C.customTitle = C.customTitle.replace("$title", C.title)), C;
3487
+ }), y.customTitle && (y.customTitle = y.customTitle.replace("$title", y.title)), y;
3488
3488
  };
3489
- Ae(() => {
3490
- u(n), N.current = !0;
3489
+ re(() => {
3490
+ u(n), D.current = !0;
3491
3491
  }, [JSON.stringify(n)]);
3492
- const I = ee(i), M = ee(c);
3493
- Ae(() => {
3494
- if (N.current) {
3495
- N.current = !1, I.current = i, M.current = c;
3492
+ const I = Ae(i), L = Ae(c);
3493
+ re(() => {
3494
+ if (D.current) {
3495
+ D.current = !1, I.current = i, L.current = c;
3496
3496
  return;
3497
3497
  }
3498
- const g = JSON.stringify(I.current) !== JSON.stringify(i), C = M.current !== c;
3499
- if (g || C) {
3500
- const D = setTimeout(() => {
3501
- K.current?.(i), k.current?.(c);
3498
+ const k = JSON.stringify(I.current) !== JSON.stringify(i), y = L.current !== c;
3499
+ if (k || y) {
3500
+ const $ = setTimeout(() => {
3501
+ F.current?.(i), S.current?.(c);
3502
3502
  }, 0);
3503
- return I.current = i, M.current = c, () => clearTimeout(D);
3503
+ return I.current = i, L.current = c, () => clearTimeout($);
3504
3504
  }
3505
3505
  }, [i, c]);
3506
- const q = ee("");
3507
- Ae(() => {
3508
- if (q.current === m.pathname)
3506
+ const j = Ae("");
3507
+ re(() => {
3508
+ if (j.current === b.pathname)
3509
3509
  return;
3510
- q.current = m.pathname;
3511
- const g = L(m.pathname);
3512
- if (g && g.item) {
3513
- const C = i.findIndex((D) => D.path === g.link);
3514
- if (C !== -1) {
3515
- if (i[C].title !== g.title) {
3516
- const D = [...i];
3517
- D[C] = { ...D[C], title: g.title }, u(D);
3510
+ j.current = b.pathname;
3511
+ const k = P(b.pathname);
3512
+ if (k && k.item) {
3513
+ const y = i.findIndex(($) => $.path === k.link);
3514
+ if (y !== -1) {
3515
+ if (i[y].title !== k.title) {
3516
+ const $ = [...i];
3517
+ $[y] = { ...$[y], title: k.title }, u($);
3518
3518
  }
3519
- h(i[C].id);
3519
+ h(i[y].id);
3520
3520
  } else {
3521
- const D = {
3522
- id: `${g.link}`,
3523
- title: `${g.title}`,
3524
- path: `${g.link}`,
3521
+ const $ = {
3522
+ id: `${k.link}`,
3523
+ title: `${k.title}`,
3524
+ path: `${k.link}`,
3525
3525
  active: !0,
3526
- content: g.item.component,
3527
- iconClass: g.item.icon,
3526
+ content: k.item.component,
3527
+ iconClass: k.item.icon,
3528
3528
  closeButton: !0,
3529
- redirect: g.redirect,
3530
- customTitle: g.customTitle
3531
- }, O = [...i.map((Q) => ({ ...Q, active: !1 })), D];
3532
- u(O), h(D.id);
3529
+ redirect: k.redirect,
3530
+ customTitle: k.customTitle
3531
+ }, M = [...i.map((Q) => ({ ...Q, active: !1 })), $];
3532
+ u(M), h($.id);
3533
3533
  }
3534
3534
  }
3535
- }, [m.pathname]);
3536
- const H = (g) => {
3537
- const C = i.filter((D) => D.id === g);
3538
- C && C.length > 0 && m.pathname !== C[0].path && (P(), l(C[0].path)), a(() => {
3539
- h(g), Y();
3535
+ }, [b.pathname]);
3536
+ const H = (k) => {
3537
+ const y = i.filter(($) => $.id === k);
3538
+ y && y.length > 0 && b.pathname !== y[0].path && (R(), l(y[0].path)), a(() => {
3539
+ h(k), Y();
3540
3540
  });
3541
- }, J = (g) => {
3541
+ }, _ = (k) => {
3542
3542
  try {
3543
- p({ type: "USER_CLOSE_REQUEST", link: g });
3544
- } catch (C) {
3545
- console.error("[TabContainer] Dispatch failed:", C);
3543
+ R(), p({ type: "USER_CLOSE_REQUEST", link: k });
3544
+ } catch (y) {
3545
+ console.error("[TabContainer] Dispatch failed:", y), Y();
3546
3546
  }
3547
- }, _ = w(() => {
3548
- if (x?.destroyAll(), i.forEach((g) => {
3549
- $(g.id), G(g.id);
3550
- }), u([]), h(void 0), !S.navigationRootLink) {
3547
+ }, W = C(() => {
3548
+ if (x?.destroyAll(), i.forEach((k) => {
3549
+ O(k.id), G(k.id);
3550
+ }), u([]), h(void 0), !w.navigationRootLink) {
3551
3551
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3552
3552
  return;
3553
3553
  }
3554
- l(S.navigationRootLink);
3555
- }, [l, S.navigationRootLink, x, i, $, G]), ue = w((g) => {
3556
- const C = i.findIndex((E) => E.id === g);
3557
- if (C <= 0)
3554
+ l(w.navigationRootLink);
3555
+ }, [l, w.navigationRootLink, x, i, O, G]), he = C((k) => {
3556
+ const y = i.findIndex((N) => N.id === k);
3557
+ if (y <= 0)
3558
3558
  return;
3559
- i.slice(0, C).forEach((E) => {
3560
- x?.destroy(E.path), $(E.id), G(E.id);
3559
+ i.slice(0, y).forEach((N) => {
3560
+ x?.destroy(N.path), O(N.id), G(N.id);
3561
3561
  });
3562
- const O = i.slice(C), Q = O.find((E) => E.id === c)?.id || O[0]?.id, V = O.map((E) => ({
3563
- ...E,
3564
- active: E.id === Q
3562
+ const M = i.slice(y), Q = M.find((N) => N.id === c)?.id || M[0]?.id, K = M.map((N) => ({
3563
+ ...N,
3564
+ active: N.id === Q
3565
3565
  }));
3566
- if (u(V), Q) {
3566
+ if (u(K), Q) {
3567
3567
  h(Q);
3568
- const E = V.find((F) => F.id === Q);
3569
- E && m.pathname !== E.path && l(E.path);
3568
+ const N = K.find((X) => X.id === Q);
3569
+ N && b.pathname !== N.path && l(N.path);
3570
3570
  }
3571
- }, [i, c, l, m.pathname, x, $, G]), be = w((g) => {
3572
- const C = i.findIndex((E) => E.id === g);
3573
- if (C === -1 || C >= i.length - 1)
3571
+ }, [i, c, l, b.pathname, x, O, G]), me = C((k) => {
3572
+ const y = i.findIndex((N) => N.id === k);
3573
+ if (y === -1 || y >= i.length - 1)
3574
3574
  return;
3575
- i.slice(C + 1).forEach((E) => {
3576
- x?.destroy(E.path), $(E.id), G(E.id);
3575
+ i.slice(y + 1).forEach((N) => {
3576
+ x?.destroy(N.path), O(N.id), G(N.id);
3577
3577
  });
3578
- const O = i.slice(0, C + 1), Q = O.find((E) => E.id === c)?.id || O[O.length - 1]?.id, V = O.map((E) => ({
3579
- ...E,
3580
- active: E.id === Q
3578
+ const M = i.slice(0, y + 1), Q = M.find((N) => N.id === c)?.id || M[M.length - 1]?.id, K = M.map((N) => ({
3579
+ ...N,
3580
+ active: N.id === Q
3581
3581
  }));
3582
- if (u(V), Q) {
3582
+ if (u(K), Q) {
3583
3583
  h(Q);
3584
- const E = V.find((F) => F.id === Q);
3585
- E && m.pathname !== E.path && l(E.path);
3584
+ const N = K.find((X) => X.id === Q);
3585
+ N && b.pathname !== N.path && l(N.path);
3586
3586
  }
3587
- }, [i, c, l, m.pathname, x, $, G]), se = w((g) => {
3588
- const C = i.find((O) => O.id === g);
3589
- if (!C)
3587
+ }, [i, c, l, b.pathname, x, O, G]), le = C((k) => {
3588
+ const y = i.find((M) => M.id === k);
3589
+ if (!y)
3590
3590
  return;
3591
- x?.destroyOther(C.path), i.forEach((O) => {
3592
- O.id !== g && ($(O.id), G(O.id));
3591
+ x?.destroyOther(y.path), i.forEach((M) => {
3592
+ M.id !== k && (O(M.id), G(M.id));
3593
3593
  });
3594
- const D = [{ ...C, active: !0 }];
3595
- u(D), h(g), m.pathname !== C.path && l(C.path);
3596
- }, [i, l, m.pathname, x, $, G]);
3594
+ const $ = [{ ...y, active: !0 }];
3595
+ u($), h(k), b.pathname !== y.path && l(y.path);
3596
+ }, [i, l, b.pathname, x, O, G]), q = g?.isClosing ? g?.userCloseLinkRequest : void 0;
3597
3597
  return /* @__PURE__ */ r("div", { ref: v, children: /* @__PURE__ */ r(
3598
3598
  St,
3599
3599
  {
3600
3600
  buttonCloseOnlyActiveTab: !0,
3601
- onClick: (g) => H(g),
3602
- onTabClose: (g) => J(g),
3603
- onTabChange: (g) => null,
3604
- onCloseAllTabs: _,
3605
- onCloseLeftTabs: ue,
3606
- onCloseRightTabs: be,
3607
- onCloseOtherTabs: se,
3608
- currentTabs: ((g) => g.map((C) => ({
3609
- key: C.id,
3610
- favicon: C.iconClass,
3611
- title: C.title,
3612
- customTitle: C.customTitle
3601
+ onClick: (k) => H(k),
3602
+ onTabClose: (k) => _(k),
3603
+ onTabChange: (k) => null,
3604
+ onCloseAllTabs: W,
3605
+ onCloseLeftTabs: he,
3606
+ onCloseRightTabs: me,
3607
+ onCloseOtherTabs: le,
3608
+ currentTabs: ((k) => k.map((y) => ({
3609
+ key: y.id,
3610
+ favicon: y.iconClass,
3611
+ title: y.title,
3612
+ customTitle: y.customTitle,
3613
+ closing: q === y.id
3613
3614
  })))(i),
3614
3615
  activeTab: c,
3615
3616
  dark: d === "dark"
3616
3617
  }
3617
3618
  ) });
3618
3619
  }
3619
- const Mo = () => ve.createElement("div", null, "Home View"), Do = () => ve.createElement("div", null, "Pedido Form"), No = () => ve.createElement("div", null, "Pedido View"), zo = () => ve.createElement("div", null, "Pessoa Form"), Oo = () => ve.createElement("div", null, "Pessoa View"), $o = {
3620
+ const Mo = () => Ce.createElement("div", null, "Home View"), Do = () => Ce.createElement("div", null, "Pedido Form"), No = () => Ce.createElement("div", null, "Pedido View"), zo = () => Ce.createElement("div", null, "Pessoa Form"), Oo = () => Ce.createElement("div", null, "Pessoa View"), $o = {
3620
3621
  label: "Dashboard",
3621
3622
  icon: /* @__PURE__ */ r(Kr, {}),
3622
3623
  link: "/dashboard",
@@ -3700,7 +3701,7 @@ const Mo = () => ve.createElement("div", null, "Home View"), Do = () => ve.creat
3700
3701
  ];
3701
3702
  function Qn({ children: e, title: t = "", size: o = "440px", drawerKey: A, styles: n }) {
3702
3703
  const [s, { open: a, close: l }] = kr(!1), [d] = WA(), i = pt(), u = _e();
3703
- return Ae(() => {
3704
+ return re(() => {
3704
3705
  d.get("drawer") === A && a();
3705
3706
  }, [d]), /* @__PURE__ */ r(
3706
3707
  BA,
@@ -3734,7 +3735,7 @@ function Yo(e) {
3734
3735
  }
3735
3736
  function Kn({ drawerKey: e }) {
3736
3737
  const { openDrawer: t } = Yo(e);
3737
- return Ae(() => {
3738
+ return re(() => {
3738
3739
  t();
3739
3740
  }, []), null;
3740
3741
  }
@@ -3747,44 +3748,44 @@ const qo = {
3747
3748
  avatarImageQuality: 1
3748
3749
  };
3749
3750
  function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n }) {
3750
- const s = xr(), a = Ir(), l = Ur(), d = It(`myProfile${o}Store`), i = Tt(Yr.User), u = { ...qo, ...n ?? {} }, { dataSource: c, isLoading: h, error: f, isError: m, clearError: v } = Et({
3751
+ const s = xr(), a = Ir(), l = Ur(), d = It(`myProfile${o}Store`), i = Tt(Yr.User), u = { ...qo, ...n ?? {} }, { dataSource: c, isLoading: h, error: f, isError: b, clearError: v } = Et({
3751
3752
  name: `dsUser${o}`,
3752
- label: `${te().t("archbase:My Profile")}`,
3753
+ label: `${oe().t("archbase:My Profile")}`,
3753
3754
  service: i,
3754
3755
  store: d,
3755
3756
  pageSize: 50,
3756
3757
  loadOnStart: !0,
3757
3758
  validator: l,
3758
3759
  id: o,
3759
- onLoadComplete: (b) => {
3760
- b.isBrowsing() && b.edit(), a();
3760
+ onLoadComplete: (g) => {
3761
+ g.isBrowsing() && g.edit(), a();
3761
3762
  },
3762
- onDestroy: (b) => {
3763
+ onDestroy: (g) => {
3763
3764
  },
3764
- onError: (b, p) => {
3765
- const S = b instanceof Error ? b.message : typeof b == "string" ? b : JSON.stringify(b);
3766
- mt.showError(te().t("archbase:WARNING"), S, p);
3765
+ onError: (g, p) => {
3766
+ const w = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
3767
+ mt.showError(oe().t("archbase:WARNING"), w, p);
3767
3768
  }
3768
3769
  });
3769
- Ae(() => {
3770
+ re(() => {
3770
3771
  e && c && c.isBrowsing() && c.edit();
3771
3772
  }, [c, e]);
3772
- const y = (b) => {
3773
- b && (console.log(b), A(b.name, b.avatar));
3773
+ const m = (g) => {
3774
+ g && (console.log(g), A(g.name, g.avatar));
3774
3775
  };
3775
3776
  return /* @__PURE__ */ r(
3776
3777
  Rt,
3777
3778
  {
3778
- title: te().t("archbase:My Profile"),
3779
+ title: oe().t("archbase:My Profile"),
3779
3780
  size: 800,
3780
3781
  height: "500px",
3781
3782
  opened: e,
3782
3783
  dataSource: c,
3783
3784
  onClickOk: t,
3784
3785
  onClickCancel: t,
3785
- onAfterSave: y,
3786
- children: /* @__PURE__ */ r(De, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(X, { children: [
3787
- /* @__PURE__ */ r(X, { align: "center", children: /* @__PURE__ */ r(
3786
+ onAfterSave: m,
3787
+ children: /* @__PURE__ */ r(De, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ E(J, { children: [
3788
+ /* @__PURE__ */ r(J, { align: "center", children: /* @__PURE__ */ r(
3788
3789
  yt,
3789
3790
  {
3790
3791
  dataSource: c,
@@ -3798,8 +3799,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
3798
3799
  /* @__PURE__ */ r(
3799
3800
  rA,
3800
3801
  {
3801
- label: `${te().t("archbase:Nome completo")}`,
3802
- placeholder: `${te().t("archbase:Informe o nome completo do usuário")}`,
3802
+ label: `${oe().t("archbase:Nome completo")}`,
3803
+ placeholder: `${oe().t("archbase:Informe o nome completo do usuário")}`,
3803
3804
  dataSource: c,
3804
3805
  dataField: "name",
3805
3806
  required: !0
@@ -3808,8 +3809,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
3808
3809
  u.showNickname && /* @__PURE__ */ r(
3809
3810
  rA,
3810
3811
  {
3811
- label: `${te().t("archbase:Apelido")}`,
3812
- placeholder: `${te().t("archbase:Apelido")}`,
3812
+ label: `${oe().t("archbase:Apelido")}`,
3813
+ placeholder: `${oe().t("archbase:Apelido")}`,
3813
3814
  dataSource: c,
3814
3815
  dataField: "nickname",
3815
3816
  required: u.requiredNickname
@@ -3818,8 +3819,8 @@ function Fn({ opened: e, handleClose: t, userId: o, updateUser: A, options: n })
3818
3819
  /* @__PURE__ */ r(
3819
3820
  rA,
3820
3821
  {
3821
- label: `${te().t("archbase:Descrição do usuário")}`,
3822
- placeholder: `${te().t("archbase:Informe a descrição do usuário")}`,
3822
+ label: `${oe().t("archbase:Descrição do usuário")}`,
3823
+ placeholder: `${oe().t("archbase:Informe a descrição do usuário")}`,
3823
3824
  dataSource: c,
3824
3825
  dataField: "description",
3825
3826
  required: !0
@@ -3931,12 +3932,12 @@ const Gn = rr((e) => ({
3931
3932
  tabId: e,
3932
3933
  children: t
3933
3934
  }) => {
3934
- const { getSnapshot: o, saveSnapshot: A } = Je(), n = ee(void 0);
3935
+ const { getSnapshot: o, saveSnapshot: A } = Je(), n = Ae(void 0);
3935
3936
  if (!n.current) {
3936
3937
  const s = o(e);
3937
3938
  n.current = jo(s);
3938
3939
  }
3939
- return Ae(() => () => {
3940
+ return re(() => () => {
3940
3941
  if (n.current) {
3941
3942
  const s = n.current.getState();
3942
3943
  A(e, s.serialize());
@@ -3944,27 +3945,27 @@ const Gn = rr((e) => ({
3944
3945
  }, [e, A]), /* @__PURE__ */ r(Ze.Provider, { value: n.current ?? null, children: t });
3945
3946
  };
3946
3947
  function Vn(e) {
3947
- const t = ge(Ze);
3948
+ const t = be(Ze);
3948
3949
  if (!t)
3949
3950
  throw new Error("useTabStore must be used within TabStoreProvider");
3950
3951
  return kt(t, e);
3951
3952
  }
3952
3953
  function Bn() {
3953
- const e = ge(Ze);
3954
+ const e = be(Ze);
3954
3955
  if (!e)
3955
3956
  throw new Error("useTabStoreApi must be used within TabStoreProvider");
3956
3957
  return e;
3957
3958
  }
3958
3959
  function kA() {
3959
- return ge(Ze);
3960
+ return be(Ze);
3960
3961
  }
3961
3962
  function eA(e, t) {
3962
- const o = kA(), A = ee({ resolved: !1, value: void 0 });
3963
+ const o = kA(), A = Ae({ resolved: !1, value: void 0 });
3963
3964
  A.current.resolved || (A.current = {
3964
3965
  resolved: !0,
3965
3966
  value: typeof t == "function" ? t() : t
3966
3967
  });
3967
- const n = A.current.value, [s, a] = pe(n), l = Cr(
3968
+ const n = A.current.value, [s, a] = fe(n), l = Cr(
3968
3969
  // subscribe
3969
3970
  (u) => o ? o.subscribe(u) : () => {
3970
3971
  },
@@ -3976,7 +3977,7 @@ function eA(e, t) {
3976
3977
  // getServerSnapshot
3977
3978
  () => {
3978
3979
  }
3979
- ), d = o ? l !== void 0 ? l : n : s, i = w((u) => {
3980
+ ), d = o ? l !== void 0 ? l : n : s, i = C((u) => {
3980
3981
  if (!o) {
3981
3982
  a(u);
3982
3983
  return;
@@ -4005,19 +4006,19 @@ function Un(e, t) {
4005
4006
  const o = { ...Jo, ...t }, [A, n] = eA(
4006
4007
  `grid_${e}`,
4007
4008
  o
4008
- ), s = w((p) => {
4009
- n((S) => ({ ...S, ...p }));
4010
- }, [n]), a = w((p) => s({ page: p }), [s]), l = w((p) => s({ pageSize: p, page: 0 }), [s]), d = w((p) => s({ sortModel: p }), [s]), i = w((p) => s({ filterModel: p, page: 0 }), [s]), u = w((p) => s({ selectedRowIds: p }), [s]), c = w((p) => {
4011
- n((S) => ({
4012
- ...S,
4013
- selectedRowIds: S.selectedRowIds.includes(p) ? S.selectedRowIds.filter((x) => x !== p) : [...S.selectedRowIds, p]
4009
+ ), s = C((p) => {
4010
+ n((w) => ({ ...w, ...p }));
4011
+ }, [n]), a = C((p) => s({ page: p }), [s]), l = C((p) => s({ pageSize: p, page: 0 }), [s]), d = C((p) => s({ sortModel: p }), [s]), i = C((p) => s({ filterModel: p, page: 0 }), [s]), u = C((p) => s({ selectedRowIds: p }), [s]), c = C((p) => {
4012
+ n((w) => ({
4013
+ ...w,
4014
+ selectedRowIds: w.selectedRowIds.includes(p) ? w.selectedRowIds.filter((x) => x !== p) : [...w.selectedRowIds, p]
4014
4015
  }));
4015
- }, [n]), h = w((p) => s({ selectedRowIds: p }), [s]), f = w(() => s({ selectedRowIds: [] }), [s]), m = w((p) => {
4016
- n((S) => ({
4017
- ...S,
4018
- expandedRowIds: S.expandedRowIds.includes(p) ? S.expandedRowIds.filter((x) => x !== p) : [...S.expandedRowIds, p]
4016
+ }, [n]), h = C((p) => s({ selectedRowIds: p }), [s]), f = C(() => s({ selectedRowIds: [] }), [s]), b = C((p) => {
4017
+ n((w) => ({
4018
+ ...w,
4019
+ expandedRowIds: w.expandedRowIds.includes(p) ? w.expandedRowIds.filter((x) => x !== p) : [...w.expandedRowIds, p]
4019
4020
  }));
4020
- }, [n]), v = w(() => n(o), [n, o]), y = w((p) => A.selectedRowIds.includes(p), [A.selectedRowIds]), b = w((p) => A.expandedRowIds.includes(p), [A.expandedRowIds]);
4021
+ }, [n]), v = C(() => n(o), [n, o]), m = C((p) => A.selectedRowIds.includes(p), [A.selectedRowIds]), g = C((p) => A.expandedRowIds.includes(p), [A.expandedRowIds]);
4021
4022
  return {
4022
4023
  /** Estado completo do grid */
4023
4024
  state: A,
@@ -4036,14 +4037,14 @@ function Un(e, t) {
4036
4037
  toggleRowSelection: c,
4037
4038
  selectAllRows: h,
4038
4039
  clearSelection: f,
4039
- isRowSelected: y,
4040
+ isRowSelected: m,
4040
4041
  /** Quantidade de linhas selecionadas */
4041
4042
  selectedCount: A.selectedRowIds.length,
4042
4043
  /** Se tem alguma linha selecionada */
4043
4044
  hasSelection: A.selectedRowIds.length > 0,
4044
4045
  // Expansao (master-detail)
4045
- toggleRowExpansion: m,
4046
- isRowExpanded: b
4046
+ toggleRowExpansion: b,
4047
+ isRowExpanded: g
4047
4048
  };
4048
4049
  }
4049
4050
  const $A = {
@@ -4055,37 +4056,37 @@ function Yn(e, t = []) {
4055
4056
  const [o, A] = eA(
4056
4057
  `tree_${e}`,
4057
4058
  { ...$A, expandedNodeIds: t }
4058
- ), n = w((y) => {
4059
- A((b) => ({
4060
- ...b,
4061
- expandedNodeIds: b.expandedNodeIds.includes(y) ? b.expandedNodeIds.filter((p) => p !== y) : [...b.expandedNodeIds, y]
4059
+ ), n = C((m) => {
4060
+ A((g) => ({
4061
+ ...g,
4062
+ expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((p) => p !== m) : [...g.expandedNodeIds, m]
4062
4063
  }));
4063
- }, [A]), s = w((y) => {
4064
- A((b) => ({
4065
- ...b,
4066
- expandedNodeIds: b.expandedNodeIds.includes(y) ? b.expandedNodeIds : [...b.expandedNodeIds, y]
4064
+ }, [A]), s = C((m) => {
4065
+ A((g) => ({
4066
+ ...g,
4067
+ expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
4067
4068
  }));
4068
- }, [A]), a = w((y) => {
4069
- A((b) => ({
4070
- ...b,
4071
- expandedNodeIds: b.expandedNodeIds.filter((p) => p !== y)
4069
+ }, [A]), a = C((m) => {
4070
+ A((g) => ({
4071
+ ...g,
4072
+ expandedNodeIds: g.expandedNodeIds.filter((p) => p !== m)
4072
4073
  }));
4073
- }, [A]), l = w((y) => {
4074
- A((b) => ({ ...b, expandedNodeIds: y }));
4075
- }, [A]), d = w(() => {
4076
- A((y) => ({ ...y, expandedNodeIds: [] }));
4077
- }, [A]), i = w((y) => {
4078
- A((b) => ({ ...b, selectedNodeIds: y }));
4079
- }, [A]), u = w((y) => {
4080
- A((b) => ({
4081
- ...b,
4082
- selectedNodeIds: b.selectedNodeIds.includes(y) ? b.selectedNodeIds.filter((p) => p !== y) : [...b.selectedNodeIds, y]
4074
+ }, [A]), l = C((m) => {
4075
+ A((g) => ({ ...g, expandedNodeIds: m }));
4076
+ }, [A]), d = C(() => {
4077
+ A((m) => ({ ...m, expandedNodeIds: [] }));
4078
+ }, [A]), i = C((m) => {
4079
+ A((g) => ({ ...g, selectedNodeIds: m }));
4080
+ }, [A]), u = C((m) => {
4081
+ A((g) => ({
4082
+ ...g,
4083
+ selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((p) => p !== m) : [...g.selectedNodeIds, m]
4083
4084
  }));
4084
- }, [A]), c = w(() => {
4085
- A((y) => ({ ...y, selectedNodeIds: [] }));
4086
- }, [A]), h = w((y) => {
4087
- A((b) => ({ ...b, focusedNodeId: y }));
4088
- }, [A]), f = w((y) => o.expandedNodeIds.includes(y), [o.expandedNodeIds]), m = w((y) => o.selectedNodeIds.includes(y), [o.selectedNodeIds]), v = w(() => {
4085
+ }, [A]), c = C(() => {
4086
+ A((m) => ({ ...m, selectedNodeIds: [] }));
4087
+ }, [A]), h = C((m) => {
4088
+ A((g) => ({ ...g, focusedNodeId: m }));
4089
+ }, [A]), f = C((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), b = C((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), v = C(() => {
4089
4090
  A({ ...$A, expandedNodeIds: t });
4090
4091
  }, [A, t]);
4091
4092
  return {
@@ -4102,7 +4103,7 @@ function Yn(e, t = []) {
4102
4103
  setSelected: i,
4103
4104
  toggleSelected: u,
4104
4105
  clearSelection: c,
4105
- isSelected: m,
4106
+ isSelected: b,
4106
4107
  selectedCount: o.selectedNodeIds.length,
4107
4108
  hasSelection: o.selectedNodeIds.length > 0,
4108
4109
  // Foco
@@ -4114,13 +4115,13 @@ function qn(e, t = [], o = !0) {
4114
4115
  const [A, n] = eA(
4115
4116
  `accordion_${e}`,
4116
4117
  t
4117
- ), s = w((c) => {
4118
+ ), s = C((c) => {
4118
4119
  n((h) => h.includes(c) ? h.filter((f) => f !== c) : o ? [...h, c] : [c]);
4119
- }, [n, o]), a = w((c) => {
4120
+ }, [n, o]), a = C((c) => {
4120
4121
  n((h) => h.includes(c) ? h : o ? [...h, c] : [c]);
4121
- }, [n, o]), l = w((c) => {
4122
+ }, [n, o]), l = C((c) => {
4122
4123
  n((h) => h.filter((f) => f !== c));
4123
- }, [n]), d = w(() => n([]), [n]), i = w((c) => A.includes(c), [A]), u = w((c) => {
4124
+ }, [n]), d = C(() => n([]), [n]), i = C((c) => A.includes(c), [A]), u = C((c) => {
4124
4125
  n(c === null ? [] : typeof c == "string" ? [c] : c);
4125
4126
  }, [n]);
4126
4127
  return {
@@ -4139,14 +4140,14 @@ function qn(e, t = [], o = !0) {
4139
4140
  }
4140
4141
  function jn(e, t = {}) {
4141
4142
  const { debounceMs: o = 100 } = t, A = kA();
4142
- Ae(() => {
4143
+ re(() => {
4143
4144
  if (!A || !e.current)
4144
4145
  return;
4145
4146
  const n = A.getState().scrollY;
4146
4147
  n > 0 && requestAnimationFrame(() => {
4147
4148
  e.current && (e.current.scrollTop = n);
4148
4149
  });
4149
- }, []), Ae(() => {
4150
+ }, []), re(() => {
4150
4151
  if (!A || !e.current)
4151
4152
  return;
4152
4153
  const n = e.current;
@@ -4162,8 +4163,8 @@ function jn(e, t = {}) {
4162
4163
  }, [A, e, o]);
4163
4164
  }
4164
4165
  function Xn(e) {
4165
- const t = _e(), o = Je((l) => l.activeTabId), A = t.pathname + t.search, n = o === A, s = ee(n), a = ee(!0);
4166
- return Ae(() => {
4166
+ const t = _e(), o = Je((l) => l.activeTabId), A = t.pathname + t.search, n = o === A, s = Ae(n), a = Ae(!0);
4167
+ return re(() => {
4167
4168
  if (a.current) {
4168
4169
  a.current = !1, s.current = n;
4169
4170
  return;
@@ -4172,11 +4173,11 @@ function Xn(e) {
4172
4173
  }, [n, e]), n;
4173
4174
  }
4174
4175
  function Jn(e) {
4175
- const t = kA(), o = `drawer_${e}_open`, A = `drawer_${e}_data`, n = ee(!1), s = ee(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[A] ?? null : s.current, d = w((c) => {
4176
+ const t = kA(), o = `drawer_${e}_open`, A = `drawer_${e}_data`, n = Ae(!1), s = Ae(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[A] ?? null : s.current, d = C((c) => {
4176
4177
  t ? (c !== void 0 && t.getState().setCustomState(A, c), t.getState().setCustomState(o, !0)) : (c !== void 0 && (s.current = c), n.current = !0);
4177
- }, [t, o, A]), i = w(() => {
4178
+ }, [t, o, A]), i = C(() => {
4178
4179
  t ? t.getState().setCustomState(o, !1) : n.current = !1;
4179
- }, [t, o]), u = w(() => {
4180
+ }, [t, o]), u = C(() => {
4180
4181
  t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(A)) : (n.current = !1, s.current = null);
4181
4182
  }, [t, o, A]);
4182
4183
  return {
@@ -4193,9 +4194,9 @@ const _n = ({
4193
4194
  getTabId: o = (A, n) => A + n
4194
4195
  }) => {
4195
4196
  const A = _e(), n = o(A.pathname, A.search);
4196
- return /* @__PURE__ */ r(Xo, { tabId: n, children: /* @__PURE__ */ R(JA, { children: [
4197
+ return /* @__PURE__ */ r(Xo, { tabId: n, children: /* @__PURE__ */ E(JA, { children: [
4197
4198
  e.map(({ path: s, element: a }) => /* @__PURE__ */ r($e, { path: s, element: a }, s)),
4198
- t && /* @__PURE__ */ r($e, { path: "*", element: /* @__PURE__ */ r(ke, { children: t }) })
4199
+ t && /* @__PURE__ */ r($e, { path: "*", element: /* @__PURE__ */ r(xe, { children: t }) })
4199
4200
  ] }) }, n);
4200
4201
  };
4201
4202
  export {