frontend-plus-react 0.4.0 → 0.4.2

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
@@ -4193,8 +4193,8 @@ var GenericDataGrid = ({
4193
4193
  var GenericDataGrid_default = GenericDataGrid;
4194
4194
 
4195
4195
  // src/App.tsx
4196
- import React27, { useEffect as useEffect15, useMemo as useMemo14 } from "react";
4197
- import { BrowserRouter, Routes, Route, useLocation as useLocation7, Navigate as Navigate3, Outlet as Outlet2 } from "react-router-dom";
4196
+ import React29, { useEffect as useEffect17, useMemo as useMemo14 } from "react";
4197
+ import { BrowserRouter, Routes, Route, useLocation as useLocation7, Navigate as Navigate4, Outlet as Outlet2 } from "react-router-dom";
4198
4198
 
4199
4199
  // src/components/MainLayout.tsx
4200
4200
  import { useEffect as useEffect8 } from "react";
@@ -4326,13 +4326,33 @@ import ExpandMore from "@mui/icons-material/ExpandMore";
4326
4326
  import TableChartIcon from "@mui/icons-material/TableChart";
4327
4327
  import FolderIcon from "@mui/icons-material/Folder";
4328
4328
  import DnsIcon from "@mui/icons-material/Dns";
4329
- import HomeIcon from "@mui/icons-material/Home";
4330
4329
  import WarningAmberIcon3 from "@mui/icons-material/WarningAmber";
4331
4330
  import DesktopWindowsIcon from "@mui/icons-material/DesktopWindows";
4332
4331
  import UnfoldMoreIcon from "@mui/icons-material/UnfoldMore";
4333
4332
  import UnfoldLessIcon from "@mui/icons-material/UnfoldLess";
4334
4333
  import { useNavigate as useNavigate2, useLocation as useLocation2 } from "react-router-dom";
4335
4334
  import { blue, orange, teal, red, grey } from "@mui/material/colors";
4335
+
4336
+ // src/utils/menuInicial.ts
4337
+ function rutaDeItemDeMenu(item) {
4338
+ if (item.menuType === "table") {
4339
+ const consulta = new URLSearchParams();
4340
+ if (item.td) consulta.append("td", JSON.stringify(item.td));
4341
+ if (item.fc) consulta.append("fc", JSON.stringify(item.fc));
4342
+ return `/menu/${item.name}${consulta.size ? `?${consulta.toString()}` : ""}`;
4343
+ }
4344
+ if (item.menuType === "proc") return `/procedures/${item.name}`;
4345
+ if (wScreens[item.menuType] !== void 0) return `/wScreens/${item.menuType}`;
4346
+ console.warn(`Menu type '${item.menuType}' no reconocido o WScreen no mapeada.`);
4347
+ return `/wScreens-fallback/${item.menuType}`;
4348
+ }
4349
+ function itemInicial(menu) {
4350
+ const elegido = menu.find((item) => item.selectedByDefault);
4351
+ if (!elegido) return void 0;
4352
+ return elegido.menuType === "menu" ? itemInicial(elegido.menuContent) : elegido;
4353
+ }
4354
+
4355
+ // src/components/SideMenu.tsx
4336
4356
  import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
4337
4357
  var MenuListItem = ({ item, level, onMenuItemClick }) => {
4338
4358
  const navigate = useNavigate2();
@@ -4343,29 +4363,7 @@ var MenuListItem = ({ item, level, onMenuItemClick }) => {
4343
4363
  if (item.menuType === "menu") {
4344
4364
  dispatch(toggleSubMenu(item.name));
4345
4365
  } else {
4346
- let path = "";
4347
- const queryParams = new URLSearchParams();
4348
- if (item.menuType === "table") {
4349
- path = `/menu/${item.name}`;
4350
- if (item.td) queryParams.append("td", JSON.stringify(item.td));
4351
- if (item.fc) queryParams.append("fc", JSON.stringify(item.fc));
4352
- if (queryParams.toString()) {
4353
- path = `${path}?${queryParams.toString()}`;
4354
- }
4355
- } else if (item.menuType === "proc") {
4356
- path = `/procedures/${item.name}`;
4357
- } else {
4358
- const WScreenComponent = wScreens[item.menuType];
4359
- if (WScreenComponent !== void 0) {
4360
- path = `/wScreens/${item.menuType}`;
4361
- } else {
4362
- path = `/wScreens-fallback/${item.menuType}`;
4363
- console.warn(`Menu type '${item.menuType}' no reconocido o WScreen no mapeada.`);
4364
- }
4365
- }
4366
- if (path) {
4367
- navigate(path);
4368
- }
4366
+ navigate(rutaDeItemDeMenu(item));
4369
4367
  if (onMenuItemClick) {
4370
4368
  onMenuItemClick();
4371
4369
  }
@@ -4438,19 +4436,12 @@ var SideMenu = ({ onMenuItemClick }) => {
4438
4436
  const allSubMenusKeys = Object.keys(subMenuOpenStates);
4439
4437
  const openSubMenusCount = allSubMenusKeys.filter((key) => subMenuOpenStates[key]).length;
4440
4438
  const isMostlyOpen = allSubMenusKeys.length > 0 && openSubMenusCount / allSubMenusKeys.length > 0.5;
4441
- const handleHomeClick = () => {
4442
- navigate("/home");
4443
- if (onMenuItemClick) {
4444
- onMenuItemClick();
4445
- }
4446
- };
4447
4439
  const handleToggleAllSubMenus = () => {
4448
4440
  dispatch(setAllSubMenusOpen(!isMostlyOpen));
4449
4441
  };
4450
4442
  if (!clientContext || !clientContext.menu) {
4451
4443
  return /* @__PURE__ */ jsx20(Box13, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx20(Typography9, { variant: "body2", color: "text.secondary", children: "Cargando men\xFA..." }) });
4452
4444
  }
4453
- const isHomeSelected = location.pathname === "/home";
4454
4445
  useEffect7(() => {
4455
4446
  if (!clientContext?.menu) return;
4456
4447
  const expandParents = (items, targetPath, parentNames = []) => {
@@ -4486,22 +4477,15 @@ var SideMenu = ({ onMenuItemClick }) => {
4486
4477
  /* @__PURE__ */ jsx20(ListItemText2, { primary: isMostlyOpen ? "colapsar " : "expandir" })
4487
4478
  ] }) }),
4488
4479
  /* @__PURE__ */ jsx20(Divider2, {}),
4489
- /* @__PURE__ */ jsxs14(List2, { children: [
4490
- /* @__PURE__ */ jsx20(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs14(ListItemButton2, { onClick: handleHomeClick, selected: isHomeSelected, children: [
4491
- /* @__PURE__ */ jsx20(ListItemIcon2, { sx: { minWidth: "38px" }, children: /* @__PURE__ */ jsx20(HomeIcon, {}) }),
4492
- /* @__PURE__ */ jsx20(ListItemText2, { primary: "Inicio" })
4493
- ] }) }),
4494
- /* @__PURE__ */ jsx20(Divider2, {}),
4495
- clientContext.menu.map((menuItem) => /* @__PURE__ */ jsx20(
4496
- MenuListItem,
4497
- {
4498
- item: menuItem,
4499
- level: 1,
4500
- onMenuItemClick
4501
- },
4502
- menuItem.name
4503
- ))
4504
- ] })
4480
+ /* @__PURE__ */ jsx20(List2, { children: clientContext.menu.map((menuItem) => /* @__PURE__ */ jsx20(
4481
+ MenuListItem,
4482
+ {
4483
+ item: menuItem,
4484
+ level: 1,
4485
+ onMenuItemClick
4486
+ },
4487
+ menuItem.name
4488
+ )) })
4505
4489
  ] });
4506
4490
  };
4507
4491
  var SideMenu_default = SideMenu;
@@ -4560,7 +4544,6 @@ var MainLayout = () => {
4560
4544
  if (!clientContext) {
4561
4545
  return /* @__PURE__ */ jsx21(Box14, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: "100vh" }, children: /* @__PURE__ */ jsx21(Typography10, { children: "Cargando dise\xF1o de la aplicaci\xF3n..." }) });
4562
4546
  }
4563
- const appBarOffset = theme.mixins.toolbar;
4564
4547
  return /* @__PURE__ */ jsxs15(Box14, { sx: { display: "flex", height: "100vh" }, children: [
4565
4548
  /* @__PURE__ */ jsx21(CssBaseline, {}),
4566
4549
  /* @__PURE__ */ jsx21(
@@ -4664,7 +4647,7 @@ var MainLayout = () => {
4664
4647
  ]
4665
4648
  }
4666
4649
  ),
4667
- /* @__PURE__ */ jsx21(
4650
+ /* @__PURE__ */ jsxs15(
4668
4651
  Box14,
4669
4652
  {
4670
4653
  component: "main",
@@ -4684,15 +4667,16 @@ var MainLayout = () => {
4684
4667
  },
4685
4668
  minWidth: 0,
4686
4669
  flexShrink: 0,
4687
- // Asegúrate de que el paddingTop sea suficiente para la AppBar
4688
- paddingTop: `${appBarOffset.minHeight}px`,
4689
4670
  height: "100%",
4690
4671
  boxSizing: "border-box",
4691
4672
  display: "flex",
4692
4673
  flexDirection: "column",
4693
4674
  width: isDrawerOpen ? `calc(100% - ${drawerWidth}px)` : "100%"
4694
4675
  },
4695
- children: /* @__PURE__ */ jsx21(Outlet, {})
4676
+ children: [
4677
+ /* @__PURE__ */ jsx21(Toolbar, {}),
4678
+ /* @__PURE__ */ jsx21(Box14, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx21(Outlet, {}) })
4679
+ ]
4696
4680
  }
4697
4681
  )
4698
4682
  ] });
@@ -4750,28 +4734,26 @@ var SessionExpiredMessage = () => {
4750
4734
  };
4751
4735
  var SessionExpiredMessage_default = SessionExpiredMessage;
4752
4736
 
4753
- // src/pages/HomePage.tsx
4754
- import { Box as Box16, Typography as Typography12 } from "@mui/material";
4755
- import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
4756
- var HomePage = () => {
4737
+ // src/pages/PantallaInicial.tsx
4738
+ import { Navigate } from "react-router-dom";
4739
+ import { jsx as jsx23 } from "react/jsx-runtime";
4740
+ var PantallaInicial = () => {
4757
4741
  const { clientContext } = useApp();
4758
- return /* @__PURE__ */ jsxs17(Box16, { sx: { p: 3 }, children: [
4759
- /* @__PURE__ */ jsx23(Typography12, { variant: "h4", component: "h1", gutterBottom: true, children: `Bienvenido/a ${clientContext?.username}` }),
4760
- /* @__PURE__ */ jsx23(Typography12, { variant: "body1", children: "Usa el men\xFA lateral para navegar por las diferentes secciones." })
4761
- ] });
4742
+ const item = clientContext.menu ? itemInicial(clientContext.menu) : void 0;
4743
+ return item ? /* @__PURE__ */ jsx23(Navigate, { to: rutaDeItemDeMenu(item), replace: true }) : null;
4762
4744
  };
4763
- var HomePage_default = HomePage;
4745
+ var PantallaInicial_default = PantallaInicial;
4764
4746
 
4765
4747
  // src/pages/LogoutPage.tsx
4766
4748
  import { useEffect as useEffect9 } from "react";
4767
- import { Box as Box17, Typography as Typography13, CircularProgress as CircularProgress5 } from "@mui/material";
4768
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
4749
+ import { Box as Box16, Typography as Typography12, CircularProgress as CircularProgress5 } from "@mui/material";
4750
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
4769
4751
  var LogoutPage = () => {
4770
4752
  const logout = useLogout_default();
4771
4753
  useEffect9(() => {
4772
4754
  logout();
4773
4755
  }, [logout]);
4774
- return /* @__PURE__ */ jsxs18(Box17, { sx: {
4756
+ return /* @__PURE__ */ jsxs17(Box16, { sx: {
4775
4757
  display: "flex",
4776
4758
  flexDirection: "column",
4777
4759
  justifyContent: "center",
@@ -4780,20 +4762,19 @@ var LogoutPage = () => {
4780
4762
  textAlign: "center"
4781
4763
  }, children: [
4782
4764
  /* @__PURE__ */ jsx24(CircularProgress5, { size: 60 }),
4783
- /* @__PURE__ */ jsx24(Typography13, { variant: "h6", sx: { mt: 2 }, children: "Cerrando sesi\xF3n..." })
4765
+ /* @__PURE__ */ jsx24(Typography12, { variant: "h6", sx: { mt: 2 }, children: "Cerrando sesi\xF3n..." })
4784
4766
  ] });
4785
4767
  };
4786
4768
  var LogoutPage_default = LogoutPage;
4787
4769
 
4788
4770
  // src/pages/LoginPage.tsx
4789
4771
  import { useState as useState14 } from "react";
4790
- import { Button as Button8, TextField as TextField2, Typography as Typography14, Alert as Alert3, AlertTitle, Box as Box18, CircularProgress as CircularProgress6 } from "@mui/material";
4772
+ import { Button as Button8, TextField as TextField2, Typography as Typography13, Alert as Alert3, AlertTitle, Box as Box17, CircularProgress as CircularProgress6 } from "@mui/material";
4791
4773
  import { useForm, Controller } from "react-hook-form";
4792
4774
  import { zodResolver } from "@hookform/resolvers/zod";
4793
4775
  import * as z from "zod";
4794
- import { useNavigate as useNavigate4 } from "react-router-dom";
4795
4776
  import { useDispatch as useDispatch4 } from "react-redux";
4796
- import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
4777
+ import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
4797
4778
  var loginSchema = z.object({
4798
4779
  username: z.string().min(1, "El usuario es requerido"),
4799
4780
  // Añadir validación básica
@@ -4801,7 +4782,6 @@ var loginSchema = z.object({
4801
4782
  // Añadir validación básica
4802
4783
  });
4803
4784
  var LoginPage = () => {
4804
- const navigate = useNavigate4();
4805
4785
  const [loginError, setLoginError] = useState14(null);
4806
4786
  const [isSubmitting, setIsSubmitting] = useState14(false);
4807
4787
  const { setIsLoggedIn, checkSession } = useApp();
@@ -4839,7 +4819,6 @@ var LoginPage = () => {
4839
4819
  setIsLoggedIn(true);
4840
4820
  await dispatch(fetchClientContext()).unwrap();
4841
4821
  console.log("Login exitoso y clientContext cargado.");
4842
- navigate("/home");
4843
4822
  reset();
4844
4823
  } catch (error) {
4845
4824
  console.error("Error al iniciar sesi\xF3n:", error);
@@ -4850,15 +4829,15 @@ var LoginPage = () => {
4850
4829
  }
4851
4830
  };
4852
4831
  return /* @__PURE__ */ jsx25(
4853
- Box18,
4832
+ Box17,
4854
4833
  {
4855
4834
  display: "flex",
4856
4835
  alignItems: "center",
4857
4836
  justifyContent: "center",
4858
4837
  minHeight: "100vh",
4859
4838
  bgcolor: "#f5f5f5",
4860
- children: /* @__PURE__ */ jsxs19(
4861
- Box18,
4839
+ children: /* @__PURE__ */ jsxs18(
4840
+ Box17,
4862
4841
  {
4863
4842
  width: "100%",
4864
4843
  maxWidth: "400px",
@@ -4867,7 +4846,7 @@ var LoginPage = () => {
4867
4846
  borderRadius: 8,
4868
4847
  boxShadow: 3,
4869
4848
  children: [
4870
- /* @__PURE__ */ jsx25(Box18, { sx: { display: "flex", justifyContent: "center", mb: 3 }, children: /* @__PURE__ */ jsx25(
4849
+ /* @__PURE__ */ jsx25(Box17, { sx: { display: "flex", justifyContent: "center", mb: 3 }, children: /* @__PURE__ */ jsx25(
4871
4850
  "img",
4872
4851
  {
4873
4852
  src: `${envConfig.backendUrl}/img/login-logo-icon.png`,
@@ -4875,10 +4854,10 @@ var LoginPage = () => {
4875
4854
  style: { height: "192px", maxWidth: "100%", objectFit: "contain" }
4876
4855
  }
4877
4856
  ) }),
4878
- /* @__PURE__ */ jsx25(Typography14, { variant: "h5", align: "center", gutterBottom: true, sx: { fontWeight: "bold", color: "primary.main" }, children: "Iniciar Sesi\xF3n" }),
4879
- /* @__PURE__ */ jsxs19("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
4880
- /* @__PURE__ */ jsxs19("div", { children: [
4881
- /* @__PURE__ */ jsx25("label", { htmlFor: "username", children: /* @__PURE__ */ jsx25(Typography14, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Usuario" }) }),
4857
+ /* @__PURE__ */ jsx25(Typography13, { variant: "h5", align: "center", gutterBottom: true, sx: { fontWeight: "bold", color: "primary.main" }, children: "Iniciar Sesi\xF3n" }),
4858
+ /* @__PURE__ */ jsxs18("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
4859
+ /* @__PURE__ */ jsxs18("div", { children: [
4860
+ /* @__PURE__ */ jsx25("label", { htmlFor: "username", children: /* @__PURE__ */ jsx25(Typography13, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Usuario" }) }),
4882
4861
  /* @__PURE__ */ jsx25(
4883
4862
  Controller,
4884
4863
  {
@@ -4900,8 +4879,8 @@ var LoginPage = () => {
4900
4879
  }
4901
4880
  )
4902
4881
  ] }),
4903
- /* @__PURE__ */ jsxs19("div", { children: [
4904
- /* @__PURE__ */ jsx25("label", { htmlFor: "password", children: /* @__PURE__ */ jsx25(Typography14, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Contrase\xF1a" }) }),
4882
+ /* @__PURE__ */ jsxs18("div", { children: [
4883
+ /* @__PURE__ */ jsx25("label", { htmlFor: "password", children: /* @__PURE__ */ jsx25(Typography13, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Contrase\xF1a" }) }),
4905
4884
  /* @__PURE__ */ jsx25(
4906
4885
  Controller,
4907
4886
  {
@@ -4923,12 +4902,12 @@ var LoginPage = () => {
4923
4902
  }
4924
4903
  )
4925
4904
  ] }),
4926
- /* @__PURE__ */ jsx25(Button8, { type: "submit", fullWidth: true, variant: "contained", color: "primary", disabled: isSubmitting, sx: { mt: 2 }, children: isSubmitting ? /* @__PURE__ */ jsxs19(Fragment3, { children: [
4905
+ /* @__PURE__ */ jsx25(Button8, { type: "submit", fullWidth: true, variant: "contained", color: "primary", disabled: isSubmitting, sx: { mt: 2 }, children: isSubmitting ? /* @__PURE__ */ jsxs18(Fragment3, { children: [
4927
4906
  /* @__PURE__ */ jsx25(CircularProgress6, { size: 20, sx: { mr: 1 } }),
4928
4907
  "Iniciando sesi\xF3n..."
4929
4908
  ] }) : "Iniciar Sesi\xF3n" })
4930
4909
  ] }),
4931
- loginError && /* @__PURE__ */ jsxs19(Alert3, { severity: "error", sx: { mt: 2, maxHeight: "200px" }, children: [
4910
+ loginError && /* @__PURE__ */ jsxs18(Alert3, { severity: "error", sx: { mt: 2, maxHeight: "200px" }, children: [
4932
4911
  " ",
4933
4912
  /* @__PURE__ */ jsx25(AlertTitle, { children: "Error" }),
4934
4913
  loginError
@@ -4954,8 +4933,8 @@ import {
4954
4933
  Checkbox as Checkbox3,
4955
4934
  FormControlLabel as FormControlLabel3,
4956
4935
  FormHelperText as FormHelperText2,
4957
- Typography as Typography16,
4958
- Box as Box20,
4936
+ Typography as Typography15,
4937
+ Box as Box19,
4959
4938
  CircularProgress as CircularProgress7,
4960
4939
  Alert as Alert4,
4961
4940
  Divider as Divider3,
@@ -4963,14 +4942,14 @@ import {
4963
4942
  } from "@mui/material";
4964
4943
 
4965
4944
  // src/pages/procedure-results/SuccessDisplay.tsx
4966
- import { Box as Box19, Typography as Typography15, Paper as Paper3 } from "@mui/material";
4967
- import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
4945
+ import { Box as Box18, Typography as Typography14, Paper as Paper3 } from "@mui/material";
4946
+ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
4968
4947
  var SuccessDisplay = ({ data }) => {
4969
- return /* @__PURE__ */ jsxs20(Paper3, { elevation: 2, sx: { p: 2, mt: 2, bgcolor: "success.light", color: "success.contrastText" }, children: [
4970
- /* @__PURE__ */ jsx26(Typography15, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: "\xA1Operaci\xF3n Exitosa!" }),
4971
- /* @__PURE__ */ jsx26(Typography15, { variant: "body2", sx: { fontSize: "0.85rem" }, children: "Detalles del resultado:" }),
4972
- /* @__PURE__ */ jsx26(Box19, { sx: { bgcolor: "success.dark", p: 1, borderRadius: 1, mt: 1, overflowX: "auto" }, children: /* @__PURE__ */ jsx26("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(data, null, 2) }) }),
4973
- /* @__PURE__ */ jsx26(Typography15, { variant: "body2", sx: { fontSize: "0.8rem", mt: 1 }, children: "Puedes revisar los detalles anteriores o cerrar este mensaje." })
4948
+ return /* @__PURE__ */ jsxs19(Paper3, { elevation: 2, sx: { p: 2, mt: 2, bgcolor: "success.light", color: "success.contrastText" }, children: [
4949
+ /* @__PURE__ */ jsx26(Typography14, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: "\xA1Operaci\xF3n Exitosa!" }),
4950
+ /* @__PURE__ */ jsx26(Typography14, { variant: "body2", sx: { fontSize: "0.85rem" }, children: "Detalles del resultado:" }),
4951
+ /* @__PURE__ */ jsx26(Box18, { sx: { bgcolor: "success.dark", p: 1, borderRadius: 1, mt: 1, overflowX: "auto" }, children: /* @__PURE__ */ jsx26("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(data, null, 2) }) }),
4952
+ /* @__PURE__ */ jsx26(Typography14, { variant: "body2", sx: { fontSize: "0.8rem", mt: 1 }, children: "Puedes revisar los detalles anteriores o cerrar este mensaje." })
4974
4953
  ] });
4975
4954
  };
4976
4955
  var SuccessDisplay_default = SuccessDisplay;
@@ -4984,7 +4963,7 @@ var extendResultsOk = (newComponents) => {
4984
4963
  };
4985
4964
 
4986
4965
  // src/components/ProcedureForm.tsx
4987
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
4966
+ import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
4988
4967
  var ProcedureForm = () => {
4989
4968
  const { procedureName } = useParams();
4990
4969
  const { clientContext } = useApp();
@@ -5199,9 +5178,9 @@ var ProcedureForm = () => {
5199
5178
  sx: { fontSize: "0.8rem" }
5200
5179
  };
5201
5180
  if (param.options && param.options.length > 0) {
5202
- return /* @__PURE__ */ jsxs21(FormControl3, { fullWidth: true, margin: "dense", size: "small", error: hasError, required: commonProps.required, children: [
5181
+ return /* @__PURE__ */ jsxs20(FormControl3, { fullWidth: true, margin: "dense", size: "small", error: hasError, required: commonProps.required, children: [
5203
5182
  /* @__PURE__ */ jsx27(InputLabel2, { id: `${param.name}-label`, sx: { fontSize: "0.8rem" }, children: param.label || param.name }),
5204
- /* @__PURE__ */ jsxs21(
5183
+ /* @__PURE__ */ jsxs20(
5205
5184
  Select2,
5206
5185
  {
5207
5186
  labelId: `${param.name}-label`,
@@ -5212,7 +5191,7 @@ var ProcedureForm = () => {
5212
5191
  label: param.label || param.name,
5213
5192
  disabled: apiLoading,
5214
5193
  sx: { fontSize: "0.8rem" },
5215
- renderValue: (selected) => /* @__PURE__ */ jsx27(Typography16, { sx: { fontSize: "0.8rem" }, children: selected }),
5194
+ renderValue: (selected) => /* @__PURE__ */ jsx27(Typography15, { sx: { fontSize: "0.8rem" }, children: selected }),
5216
5195
  children: [
5217
5196
  (!commonProps.required || formValues[param.name] === "") && /* @__PURE__ */ jsx27(MenuItem2, { value: "", sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ jsx27("em", { children: "Seleccione..." }) }),
5218
5197
  param.options.map((option) => /* @__PURE__ */ jsx27(MenuItem2, { value: option, sx: { fontSize: "0.8rem" }, children: option }, option))
@@ -5250,7 +5229,7 @@ var ProcedureForm = () => {
5250
5229
  size: "small"
5251
5230
  }
5252
5231
  ),
5253
- label: /* @__PURE__ */ jsx27(Typography16, { sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "inherit" }, children: param.label || param.name }),
5232
+ label: /* @__PURE__ */ jsx27(Typography15, { sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "inherit" }, children: param.label || param.name }),
5254
5233
  sx: { mt: 1, mb: 0 }
5255
5234
  }
5256
5235
  );
@@ -5262,8 +5241,8 @@ var ProcedureForm = () => {
5262
5241
  case "jsona":
5263
5242
  return /* @__PURE__ */ jsx27(TextField3, { multiline: true, rows: 5, value: formValues[param.name] || "", ...commonProps, InputProps: { sx: { fontSize: "0.8rem" } } });
5264
5243
  case "bytea":
5265
- return /* @__PURE__ */ jsxs21(FormControl3, { fullWidth: true, margin: "dense", error: hasError, required: commonProps.required, children: [
5266
- /* @__PURE__ */ jsx27(Typography16, { variant: "body2", color: "textSecondary", component: "label", htmlFor: param.name, sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "text.secondary" }, children: param.label || param.name }),
5244
+ return /* @__PURE__ */ jsxs20(FormControl3, { fullWidth: true, margin: "dense", error: hasError, required: commonProps.required, children: [
5245
+ /* @__PURE__ */ jsx27(Typography15, { variant: "body2", color: "textSecondary", component: "label", htmlFor: param.name, sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "text.secondary" }, children: param.label || param.name }),
5267
5246
  /* @__PURE__ */ jsx27(
5268
5247
  "input",
5269
5248
  {
@@ -5290,13 +5269,13 @@ var ProcedureForm = () => {
5290
5269
  if (ComponentToRender) {
5291
5270
  return /* @__PURE__ */ jsx27(ComponentToRender, { data: procedureResultData });
5292
5271
  } else {
5293
- return /* @__PURE__ */ jsxs21(Paper4, { elevation: 2, sx: { p: 2, mt: 0, bgcolor: "warning.light" }, children: [
5294
- /* @__PURE__ */ jsxs21(Typography16, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: [
5272
+ return /* @__PURE__ */ jsxs20(Paper4, { elevation: 2, sx: { p: 2, mt: 0, bgcolor: "warning.light" }, children: [
5273
+ /* @__PURE__ */ jsxs20(Typography15, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: [
5295
5274
  "el componente para resolver el resultOk: '",
5296
5275
  procedure.resultOk,
5297
5276
  "' definido en el procedure no existe o no est\xE1 mapeado."
5298
5277
  ] }),
5299
- /* @__PURE__ */ jsx27(Box20, { sx: {
5278
+ /* @__PURE__ */ jsx27(Box19, { sx: {
5300
5279
  bgcolor: "warning.dark",
5301
5280
  p: 1,
5302
5281
  borderRadius: 1
@@ -5305,7 +5284,7 @@ var ProcedureForm = () => {
5305
5284
  }
5306
5285
  }, [procedureResultData, procedure]);
5307
5286
  if (!procedure) {
5308
- return /* @__PURE__ */ jsxs21(Box20, { sx: {
5287
+ return /* @__PURE__ */ jsxs20(Box19, { sx: {
5309
5288
  p: 2,
5310
5289
  width: "100%",
5311
5290
  boxSizing: "border-box",
@@ -5316,12 +5295,12 @@ var ProcedureForm = () => {
5316
5295
  textAlign: "center"
5317
5296
  }, children: [
5318
5297
  /* @__PURE__ */ jsx27(CircularProgress7, { sx: { mb: 2 } }),
5319
- /* @__PURE__ */ jsx27(Typography16, { variant: "h6", color: "text.secondary", children: "Cargando procedimiento o no encontrado..." })
5298
+ /* @__PURE__ */ jsx27(Typography15, { variant: "h6", color: "text.secondary", children: "Cargando procedimiento o no encontrado..." })
5320
5299
  ] });
5321
5300
  }
5322
5301
  return (
5323
5302
  // Esta es la Box más externa que ahora controlará el scroll
5324
- /* @__PURE__ */ jsxs21(Box20, { sx: {
5303
+ /* @__PURE__ */ jsxs20(Box19, { sx: {
5325
5304
  p: 2,
5326
5305
  ml: 1,
5327
5306
  mt: 2,
@@ -5338,14 +5317,14 @@ var ProcedureForm = () => {
5338
5317
  overflowX: "hidden"
5339
5318
  // Oculta el scroll horizontal si no es necesario para el contenedor principal
5340
5319
  }, children: [
5341
- /* @__PURE__ */ jsx27(Typography16, { variant: "h5", component: "h2", gutterBottom: true, align: "left", children: cambiarGuionesBajosPorEspacios(procedure.proceedLabel || procedure.action) }),
5342
- Object.values(validationErrors).some((err) => err !== null) && /* @__PURE__ */ jsxs21(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: [
5320
+ /* @__PURE__ */ jsx27(Typography15, { variant: "h5", component: "h2", gutterBottom: true, align: "left", children: cambiarGuionesBajosPorEspacios(procedure.proceedLabel || procedure.action) }),
5321
+ Object.values(validationErrors).some((err) => err !== null) && /* @__PURE__ */ jsxs20(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: [
5343
5322
  "Por favor, corrige los errores en el formulario antes de enviar.",
5344
5323
  /* @__PURE__ */ jsx27("ul", { children: Object.values(validationErrors).map((err, idx) => err && /* @__PURE__ */ jsx27("li", { children: err }, idx)) })
5345
5324
  ] }),
5346
5325
  !Object.values(validationErrors).some((err) => err !== null) && apiError && /* @__PURE__ */ jsx27(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: apiError.message }),
5347
5326
  !Object.values(validationErrors).some((err) => err !== null) && !apiError && successMessage && /* @__PURE__ */ jsx27(Alert4, { severity: "success", sx: { mb: 2, fontSize: "0.8rem" }, children: successMessage }),
5348
- /* @__PURE__ */ jsxs21("form", { onSubmit: handleSubmit, children: [
5327
+ /* @__PURE__ */ jsxs20("form", { onSubmit: handleSubmit, children: [
5349
5328
  procedure.parameters.map((param) => /* @__PURE__ */ jsx27("div", { children: renderInputField(param) }, param.name)),
5350
5329
  /* @__PURE__ */ jsx27(
5351
5330
  Button9,
@@ -5361,15 +5340,15 @@ var ProcedureForm = () => {
5361
5340
  }
5362
5341
  )
5363
5342
  ] }),
5364
- ResultDisplayContent && /* @__PURE__ */ jsxs21(Box20, { sx: { mt: 2 }, children: [
5343
+ ResultDisplayContent && /* @__PURE__ */ jsxs20(Box19, { sx: { mt: 2 }, children: [
5365
5344
  " ",
5366
5345
  ResultDisplayContent
5367
5346
  ] }),
5368
- executionLog.length > 0 && /* @__PURE__ */ jsxs21(Box20, { sx: { mt: 3 }, children: [
5347
+ executionLog.length > 0 && /* @__PURE__ */ jsxs20(Box19, { sx: { mt: 3 }, children: [
5369
5348
  /* @__PURE__ */ jsx27(Divider3, { sx: { mb: 2 } }),
5370
- /* @__PURE__ */ jsx27(Typography16, { variant: "h6", gutterBottom: true, sx: { fontSize: "0.9rem" }, children: "Registro de Ejecuci\xF3n" }),
5349
+ /* @__PURE__ */ jsx27(Typography15, { variant: "h6", gutterBottom: true, sx: { fontSize: "0.9rem" }, children: "Registro de Ejecuci\xF3n" }),
5371
5350
  /* @__PURE__ */ jsx27(
5372
- Box20,
5351
+ Box19,
5373
5352
  {
5374
5353
  sx: {
5375
5354
  bgcolor: "grey.100",
@@ -5383,7 +5362,7 @@ var ProcedureForm = () => {
5383
5362
  whiteSpace: "pre-wrap"
5384
5363
  },
5385
5364
  children: executionLog.map((log, index) => /* @__PURE__ */ jsx27(
5386
- Typography16,
5365
+ Typography15,
5387
5366
  {
5388
5367
  component: "pre",
5389
5368
  sx: {
@@ -5409,7 +5388,7 @@ import { PersistGate } from "redux-persist/integration/react";
5409
5388
 
5410
5389
  // src/components/PrivateRoute.tsx
5411
5390
  import { useEffect as useEffect10 } from "react";
5412
- import { Navigate, useLocation as useLocation3 } from "react-router-dom";
5391
+ import { Navigate as Navigate2, useLocation as useLocation3 } from "react-router-dom";
5413
5392
  import { Fragment as Fragment4, jsx as jsx28 } from "react/jsx-runtime";
5414
5393
  var PrivateRoute = ({ children }) => {
5415
5394
  const location = useLocation3();
@@ -5421,7 +5400,7 @@ var PrivateRoute = ({ children }) => {
5421
5400
  useEffect10(() => {
5422
5401
  console.log(`[PrivateRoute] Effect: Path=${location.pathname}, AuthStatus=${clientContextStatus}, IsAuthenticated=${isAuthenticated}, IsLoadingAuth=${isLoadingAuth}`);
5423
5402
  if (!isAuthenticated && !isLoadingAuth && location.pathname !== "/login") {
5424
- const path = location.pathname + location.search;
5403
+ const path = location.pathname + location.search + location.hash;
5425
5404
  console.log(`[PrivateRoute] ACTION: Dispatching setRedirectPath(${path})`);
5426
5405
  dispatch(setRedirectPath(path));
5427
5406
  } else if (isAuthenticated) {
@@ -5438,7 +5417,7 @@ var PrivateRoute = ({ children }) => {
5438
5417
  }
5439
5418
  if (!isAuthenticated) {
5440
5419
  console.log(`[PrivateRoute] User not authenticated, navigating to /login`);
5441
- return /* @__PURE__ */ jsx28(Navigate, { to: "/login", replace: true });
5420
+ return /* @__PURE__ */ jsx28(Navigate2, { to: "/login", replace: true });
5442
5421
  }
5443
5422
  console.log(`[PrivateRoute] User authenticated, rendering children.`);
5444
5423
  return /* @__PURE__ */ jsx28(Fragment4, { children });
@@ -5447,10 +5426,10 @@ var PrivateRoute_default = PrivateRoute;
5447
5426
 
5448
5427
  // src/components/InitialRedirectHandler.tsx
5449
5428
  import { useEffect as useEffect11, useRef as useRef8 } from "react";
5450
- import { useLocation as useLocation4, useNavigate as useNavigate5 } from "react-router-dom";
5429
+ import { useLocation as useLocation4, useNavigate as useNavigate4 } from "react-router-dom";
5451
5430
  var InitialRedirectHandler = () => {
5452
5431
  const location = useLocation4();
5453
- const navigate = useNavigate5();
5432
+ const navigate = useNavigate4();
5454
5433
  const dispatch = useAppDispatch();
5455
5434
  const redirectPath = useRedirectPath();
5456
5435
  const clientContextStatus = useClientContextStatus();
@@ -5468,9 +5447,9 @@ var InitialRedirectHandler = () => {
5468
5447
  navegandoRef.current = true;
5469
5448
  navigate(redirectPath);
5470
5449
  dispatch(setRedirectPath(null));
5471
- } else if (!navegandoRef.current && (location.pathname === "/login" || location.pathname === "/")) {
5472
- console.log("Usuario autenticado, redirigiendo a /home por defecto.");
5473
- navigate("/home");
5450
+ } else if (!navegandoRef.current && location.pathname === "/login") {
5451
+ console.log("Usuario autenticado, redirigiendo a la pantalla de inicio.");
5452
+ navigate("/");
5474
5453
  }
5475
5454
  }
5476
5455
  }, [clientContextStatus, redirectPath, location.pathname, navigate, dispatch]);
@@ -5481,9 +5460,9 @@ var InitialRedirectHandler_default = InitialRedirectHandler;
5481
5460
  // src/pages/GenericDataGridPage.tsx
5482
5461
  import React22, { useState as useState16, useCallback as useCallback15 } from "react";
5483
5462
  import { useParams as useParams2, useLocation as useLocation5 } from "react-router-dom";
5484
- import { Box as Box21, Alert as Alert5, Typography as Typography17, Tabs, Tab, IconButton as IconButton5 } from "@mui/material";
5463
+ import { Box as Box20, Alert as Alert5, Typography as Typography16, Tabs, Tab, IconButton as IconButton5 } from "@mui/material";
5485
5464
  import CloseIcon2 from "@mui/icons-material/Close";
5486
- import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
5465
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
5487
5466
  var GenericDataGridPage = ({
5488
5467
  initialTableName,
5489
5468
  initialFixedFields = []
@@ -5529,21 +5508,21 @@ var GenericDataGridPage = ({
5529
5508
  else if (activeTabIdx === index) setActiveTabIdx(index - 1);
5530
5509
  };
5531
5510
  if (!effectiveTableName) {
5532
- return /* @__PURE__ */ jsx29(Box21, { p: 3, children: /* @__PURE__ */ jsx29(Alert5, { severity: "error", children: "No se especific\xF3 una tabla." }) });
5511
+ return /* @__PURE__ */ jsx29(Box20, { p: 3, children: /* @__PURE__ */ jsx29(Alert5, { severity: "error", children: "No se especific\xF3 una tabla." }) });
5533
5512
  }
5534
- return /* @__PURE__ */ jsxs22(Box21, { sx: { width: "100%", height: "calc(100vh - 64px)", display: "flex", flexDirection: "column" }, children: [
5535
- /* @__PURE__ */ jsx29(Box21, { sx: { borderBottom: 1, borderColor: "divider", bgcolor: "background.paper" }, children: /* @__PURE__ */ jsx29(Tabs, { value: activeTabIdx, onChange: (_, v) => setActiveTabIdx(v), variant: "scrollable", children: tabs.map((tab, index) => /* @__PURE__ */ jsx29(
5513
+ return /* @__PURE__ */ jsxs21(Box20, { sx: { width: "100%", height: "calc(100vh - 64px)", display: "flex", flexDirection: "column" }, children: [
5514
+ /* @__PURE__ */ jsx29(Box20, { sx: { borderBottom: 1, borderColor: "divider", bgcolor: "background.paper" }, children: /* @__PURE__ */ jsx29(Tabs, { value: activeTabIdx, onChange: (_, v) => setActiveTabIdx(v), variant: "scrollable", children: tabs.map((tab, index) => /* @__PURE__ */ jsx29(
5536
5515
  Tab,
5537
5516
  {
5538
- label: /* @__PURE__ */ jsxs22(Box21, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5539
- /* @__PURE__ */ jsx29(Typography17, { variant: "caption", sx: { fontWeight: "bold" }, children: tab.label }),
5517
+ label: /* @__PURE__ */ jsxs21(Box20, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
5518
+ /* @__PURE__ */ jsx29(Typography16, { variant: "caption", sx: { fontWeight: "bold" }, children: tab.label }),
5540
5519
  index !== 0 && /* @__PURE__ */ jsx29(IconButton5, { size: "small", onClick: (e) => handleCloseTab(index, e), children: /* @__PURE__ */ jsx29(CloseIcon2, { fontSize: "inherit" }) })
5541
5520
  ] })
5542
5521
  },
5543
5522
  tab.id
5544
5523
  )) }) }),
5545
5524
  tabs.map((tab, index) => /* @__PURE__ */ jsx29(
5546
- Box21,
5525
+ Box20,
5547
5526
  {
5548
5527
  role: "tabpanel",
5549
5528
  hidden: activeTabIdx !== index,
@@ -5567,20 +5546,20 @@ var GenericDataGridPage_default = GenericDataGridPage;
5567
5546
  // src/pages/PantallaDeRuta.tsx
5568
5547
  import { useMemo as useMemo12 } from "react";
5569
5548
  import { useSearchParams } from "react-router-dom";
5570
- import { Box as Box22 } from "@mui/material";
5549
+ import { Box as Box21 } from "@mui/material";
5571
5550
  import { jsx as jsx30 } from "react/jsx-runtime";
5572
5551
  var PantallaDeRuta = ({ screenName }) => {
5573
5552
  const [busqueda] = useSearchParams();
5574
5553
  const params = useMemo12(() => Object.fromEntries(busqueda.entries()), [busqueda]);
5575
5554
  const Pantalla = wScreens[screenName];
5576
- return /* @__PURE__ */ jsx30(Box22, { sx: { pt: 3, pl: 4 }, children: Pantalla ? /* @__PURE__ */ jsx30(Pantalla, { screenName, params }) : /* @__PURE__ */ jsx30(FallbackWScreen, { screenName }) });
5555
+ return /* @__PURE__ */ jsx30(Box21, { sx: { pt: 3, pl: 4 }, children: Pantalla ? /* @__PURE__ */ jsx30(Pantalla, { screenName, params }) : /* @__PURE__ */ jsx30(FallbackWScreen, { screenName }) });
5577
5556
  };
5578
5557
 
5579
5558
  // src/pages/MenuTablePage.tsx
5580
5559
  import { useMemo as useMemo13 } from "react";
5581
5560
  import { useParams as useParams3 } from "react-router-dom";
5582
- import { Box as Box23, Alert as Alert6, Typography as Typography18 } from "@mui/material";
5583
- import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
5561
+ import { Box as Box22, Alert as Alert6, Typography as Typography17 } from "@mui/material";
5562
+ import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
5584
5563
  function fixedFieldsDeMenu(ff) {
5585
5564
  if (!ff) return [];
5586
5565
  if (Array.isArray(ff)) {
@@ -5621,9 +5600,9 @@ var MenuTablePage = () => {
5621
5600
  };
5622
5601
  }, [menuName, clientContext]);
5623
5602
  if (!currentTableName) {
5624
- return /* @__PURE__ */ jsx31(Box23, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsxs23(Alert6, { severity: "error", children: [
5625
- /* @__PURE__ */ jsx31(Typography18, { variant: "h6", children: "Error: No se pudo cargar la informaci\xF3n de la tabla." }),
5626
- /* @__PURE__ */ jsx31(Typography18, { variant: "body1", children: "Verifique la configuraci\xF3n del men\xFA o el nombre de la tabla en la URL." })
5603
+ return /* @__PURE__ */ jsx31(Box22, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsxs22(Alert6, { severity: "error", children: [
5604
+ /* @__PURE__ */ jsx31(Typography17, { variant: "h6", children: "Error: No se pudo cargar la informaci\xF3n de la tabla." }),
5605
+ /* @__PURE__ */ jsx31(Typography17, { variant: "body1", children: "Verifique la configuraci\xF3n del men\xFA o el nombre de la tabla en la URL." })
5627
5606
  ] }) });
5628
5607
  }
5629
5608
  return /* @__PURE__ */ jsx31(
@@ -5637,8 +5616,8 @@ var MenuTablePage = () => {
5637
5616
  var MenuTablePage_default = MenuTablePage;
5638
5617
 
5639
5618
  // src/puente/PantallaBP.tsx
5640
- import { useEffect as useEffect13, useRef as useRef9, useState as useState17 } from "react";
5641
- import { Navigate as Navigate2, useLocation as useLocation6, useNavigate as useNavigate6, useParams as useParams4 } from "react-router-dom";
5619
+ import { useEffect as useEffect14, useRef as useRef9, useState as useState17 } from "react";
5620
+ import { Navigate as Navigate3, useLocation as useLocation6, useParams as useParams4 } from "react-router-dom";
5642
5621
  import { Alert as Alert7, Box as Box24, CircularProgress as CircularProgress8 } from "@mui/material";
5643
5622
 
5644
5623
  // src/puente/clienteBP.ts
@@ -5669,6 +5648,28 @@ function cargarScript(ruta) {
5669
5648
  document.head.appendChild(script);
5670
5649
  });
5671
5650
  }
5651
+ function esperarCargaDeVentana() {
5652
+ if (document.readyState === "complete") return Promise.resolve();
5653
+ return new Promise((resolver) => window.addEventListener("load", () => resolver(), { once: true }));
5654
+ }
5655
+ async function sinEscuchasDeVentana(tipos, inyectar) {
5656
+ const original = window.addEventListener;
5657
+ const filtrada = function(tipo, escucha, opciones) {
5658
+ if (tipos.includes(tipo)) return;
5659
+ original.call(this, tipo, escucha, opciones);
5660
+ };
5661
+ window.addEventListener = filtrada;
5662
+ try {
5663
+ return await inyectar();
5664
+ } finally {
5665
+ if (window.addEventListener === filtrada) window.addEventListener = original;
5666
+ }
5667
+ }
5668
+ async function cargarScripts(rutas) {
5669
+ for (const ruta of rutas) {
5670
+ await cargarScript(ruta);
5671
+ }
5672
+ }
5672
5673
  var carga = null;
5673
5674
  function cargarClienteBP(urlBackend) {
5674
5675
  if (!carga) {
@@ -5696,9 +5697,8 @@ async function cargarSinMemoria(urlBackend) {
5696
5697
  enlace.href = ruta;
5697
5698
  document.head.appendChild(enlace);
5698
5699
  });
5699
- for (const ruta of recursos.scripts) {
5700
- await cargarScript(ruta);
5701
- }
5700
+ await esperarCargaDeVentana();
5701
+ await sinEscuchasDeVentana(["popstate"], () => cargarScripts(recursos.scripts));
5702
5702
  const myOwn = window.myOwn;
5703
5703
  if (!myOwn) throw new Error("El backend no defini\xF3 myOwn.");
5704
5704
  window.my = myOwn;
@@ -5706,6 +5706,81 @@ async function cargarSinMemoria(urlBackend) {
5706
5706
  return myOwn;
5707
5707
  }
5708
5708
 
5709
+ // src/puente/ConsolaBP.tsx
5710
+ import { useEffect as useEffect13 } from "react";
5711
+ import { Box as Box23 } from "@mui/material";
5712
+ import { jsx as jsx32 } from "react/jsx-runtime";
5713
+ var MARGEN_DE_REPETIDO_MS = 1e3;
5714
+ function descartarRepetidos(consola, agregados, ahora) {
5715
+ for (const nodo of agregados) {
5716
+ if (!(nodo instanceof HTMLElement)) continue;
5717
+ const repetido = Array.from(consola.children).find(
5718
+ (otro) => otro instanceof HTMLElement && otro !== nodo && otro.className === nodo.className && otro.textContent === nodo.textContent && ahora - Number(otro.dataset.instante) < MARGEN_DE_REPETIDO_MS
5719
+ );
5720
+ if (repetido) nodo.remove();
5721
+ else nodo.dataset.instante = String(ahora);
5722
+ }
5723
+ }
5724
+ var ConsolaBP = () => {
5725
+ useEffect13(() => {
5726
+ const consola = document.getElementById("mini-console");
5727
+ if (!consola) return;
5728
+ const observador = new MutationObserver(
5729
+ (registros) => descartarRepetidos(consola, registros.flatMap((registro) => Array.from(registro.addedNodes)), Date.now())
5730
+ );
5731
+ observador.observe(consola, { childList: true });
5732
+ return () => observador.disconnect();
5733
+ }, []);
5734
+ return /* @__PURE__ */ jsx32(
5735
+ Box23,
5736
+ {
5737
+ id: "mini-console",
5738
+ sx: (tema) => ({
5739
+ "&#mini-console": {
5740
+ position: "fixed",
5741
+ top: { xs: 64, sm: 72 },
5742
+ left: "auto",
5743
+ right: 16,
5744
+ bottom: "auto",
5745
+ float: "none",
5746
+ zIndex: tema.zIndex.snackbar,
5747
+ width: "auto",
5748
+ minWidth: 0,
5749
+ maxWidth: "min(480px, calc(100vw - 32px))",
5750
+ minHeight: 0,
5751
+ maxHeight: "none",
5752
+ overflow: "visible",
5753
+ padding: 0,
5754
+ border: "none",
5755
+ borderRadius: 0,
5756
+ boxShadow: "none",
5757
+ backgroundColor: "transparent",
5758
+ fontSize: "inherit",
5759
+ display: "flex",
5760
+ flexDirection: "column",
5761
+ gap: 1
5762
+ },
5763
+ "&#mini-console:not(:empty)": { display: "flex" },
5764
+ "&#mini-console:empty": { display: "none" },
5765
+ "& > div": {
5766
+ p: "6px 12px",
5767
+ borderRadius: 1,
5768
+ boxShadow: tema.shadows[3],
5769
+ fontSize: "0.875rem",
5770
+ whiteSpace: "pre-wrap",
5771
+ overflowWrap: "anywhere",
5772
+ backgroundColor: tema.palette.grey[800],
5773
+ color: tema.palette.common.white
5774
+ },
5775
+ "& > .status-error": {
5776
+ backgroundColor: tema.palette.error.main,
5777
+ color: tema.palette.error.contrastText
5778
+ }
5779
+ })
5780
+ }
5781
+ );
5782
+ };
5783
+
5709
5784
  // src/puente/pantallaDeBP.ts
5710
5785
  var RUTA_PANTALLA_BP = "/bp/menu";
5711
5786
  function rutaDePantallaBP(nombre, parametros = "") {
@@ -5745,40 +5820,6 @@ function resolverPantallaBP(myOwn, nombre, contenedor) {
5745
5820
  return null;
5746
5821
  }
5747
5822
 
5748
- // src/puente/capturaDeNavegacion.ts
5749
- function apiDeNavegacion() {
5750
- const api = Reflect.get(window, "navigation");
5751
- return typeof api === "object" && api !== null && "addEventListener" in api && typeof api.addEventListener === "function" ? api : null;
5752
- }
5753
- function capturarNavegacionBP(urlBackend, navegar) {
5754
- const alHacerClick = (evento) => {
5755
- if (evento.defaultPrevented || evento.button !== 0 || evento.ctrlKey || evento.metaKey || evento.shiftKey) return;
5756
- const enlace = evento.target instanceof Element ? evento.target.closest("a[href]") : null;
5757
- if (!enlace || enlace.hasAttribute("download") || (enlace.getAttribute("target") ?? "_self") !== "_self") return;
5758
- const ruta = rutaDeEnlaceBP(enlace.getAttribute("href") ?? "", document.baseURI, urlBackend);
5759
- if (ruta) {
5760
- evento.preventDefault();
5761
- evento.stopPropagation();
5762
- navegar(ruta);
5763
- }
5764
- };
5765
- document.addEventListener("click", alHacerClick, true);
5766
- const navegacion = apiDeNavegacion();
5767
- const alNavegar = (evento) => {
5768
- if (!evento.cancelable || evento.destination.sameDocument || evento.downloadRequest !== null) return;
5769
- const ruta = rutaDeEnlaceBP(evento.destination.url, document.baseURI, urlBackend);
5770
- if (ruta) {
5771
- evento.preventDefault();
5772
- navegar(ruta);
5773
- }
5774
- };
5775
- navegacion?.addEventListener("navigate", alNavegar);
5776
- return () => {
5777
- document.removeEventListener("click", alHacerClick, true);
5778
- navegacion?.removeEventListener("navigate", alNavegar);
5779
- };
5780
- }
5781
-
5782
5823
  // src/puente/habilitacion.ts
5783
5824
  var habilitado = false;
5784
5825
  var habilitarPuenteBP = () => {
@@ -5787,7 +5828,7 @@ var habilitarPuenteBP = () => {
5787
5828
  var puenteBPHabilitado = () => habilitado;
5788
5829
 
5789
5830
  // src/puente/PantallaBP.tsx
5790
- import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
5831
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
5791
5832
  function buscarItemDeMenu(items, tipo) {
5792
5833
  for (const item of items) {
5793
5834
  if (item.menuType === tipo) return item;
@@ -5799,21 +5840,19 @@ function buscarItemDeMenu(items, tipo) {
5799
5840
  return void 0;
5800
5841
  }
5801
5842
  var PantallaBP = ({ nombre, direccion }) => {
5802
- const navigate = useNavigate6();
5803
5843
  const { clientContext } = useApp();
5804
5844
  const [cargando, setCargando] = useState17(true);
5805
5845
  const [error, setError] = useState17(null);
5806
5846
  const [noExiste, setNoExiste] = useState17(false);
5807
5847
  const contenedor = useRef9(null);
5808
5848
  const menu = clientContext.menu;
5809
- useEffect13(() => {
5849
+ useEffect14(() => {
5810
5850
  const elemento = contenedor.current;
5811
5851
  if (!elemento) return;
5812
5852
  let vigente = true;
5813
5853
  setError(null);
5814
5854
  setNoExiste(false);
5815
5855
  setCargando(true);
5816
- const dejarDeCapturar = capturarNavegacionBP(envConfig.backendUrl, navigate);
5817
5856
  cargarClienteBP(envConfig.backendUrl).then((myOwn) => {
5818
5857
  if (!vigente) return;
5819
5858
  setCargando(false);
@@ -5835,49 +5874,52 @@ var PantallaBP = ({ nombre, direccion }) => {
5835
5874
  });
5836
5875
  return () => {
5837
5876
  vigente = false;
5838
- dejarDeCapturar();
5839
5877
  elemento.replaceChildren();
5840
5878
  };
5841
- }, [nombre, direccion, menu, navigate]);
5842
- if (noExiste) return /* @__PURE__ */ jsx32(FallbackWScreen, { screenName: nombre });
5843
- return /* @__PURE__ */ jsxs24(Box24, { children: [
5844
- cargando && /* @__PURE__ */ jsx32(CircularProgress8, { size: 24, sx: { m: 2 } }),
5845
- error && /* @__PURE__ */ jsx32(Alert7, { severity: "error", sx: { m: 2 }, children: error }),
5846
- /* @__PURE__ */ jsx32("div", { id: "main_layout", ref: contenedor })
5847
- ] });
5879
+ }, [nombre, direccion, menu]);
5880
+ if (noExiste) return /* @__PURE__ */ jsx33(FallbackWScreen, { screenName: nombre });
5881
+ return (
5882
+ // el indicador de carga flota: si ocupara lugar, el contenido de backend-plus empezaría más abajo mientras carga y subiría al terminar
5883
+ /* @__PURE__ */ jsxs23(Box24, { sx: { position: "relative" }, children: [
5884
+ cargando && /* @__PURE__ */ jsx33(CircularProgress8, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
5885
+ error && /* @__PURE__ */ jsx33(Alert7, { severity: "error", sx: { m: 2 }, children: error }),
5886
+ /* @__PURE__ */ jsx33("div", { id: "main_layout", ref: contenedor }),
5887
+ /* @__PURE__ */ jsx33(ConsolaBP, {})
5888
+ ] })
5889
+ );
5848
5890
  };
5849
5891
  var PantallaDeRespaldo = () => {
5850
5892
  const { screenName = "" } = useParams4();
5851
5893
  const { search } = useLocation6();
5852
5894
  if (!puenteBPHabilitado()) {
5853
- return /* @__PURE__ */ jsx32(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsx32(FallbackWScreen, { screenName }) });
5895
+ return /* @__PURE__ */ jsx33(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsx33(FallbackWScreen, { screenName }) });
5854
5896
  }
5855
- return /* @__PURE__ */ jsx32(Navigate2, { to: rutaDePantallaBP(screenName, search), replace: true });
5897
+ return /* @__PURE__ */ jsx33(Navigate3, { to: rutaDePantallaBP(screenName, search), replace: true });
5856
5898
  };
5857
5899
  var PaginaBP = () => {
5858
5900
  const { hash, search } = useLocation6();
5859
5901
  const direccion = hash || search;
5860
5902
  const nombre = new URLSearchParams(direccion.replace(/^[#?]/, "")).get("w");
5861
- if (!puenteBPHabilitado()) return /* @__PURE__ */ jsx32(Navigate2, { to: "/", replace: true });
5862
- if (!nombre) return /* @__PURE__ */ jsx32(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsxs24(Alert7, { severity: "warning", children: [
5903
+ if (!puenteBPHabilitado()) return /* @__PURE__ */ jsx33(Navigate3, { to: "/", replace: true });
5904
+ if (!nombre) return /* @__PURE__ */ jsx33(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsxs23(Alert7, { severity: "warning", children: [
5863
5905
  "Falta la pantalla de backend-plus (",
5864
- /* @__PURE__ */ jsx32("code", { children: "#w=..." }),
5906
+ /* @__PURE__ */ jsx33("code", { children: "#w=..." }),
5865
5907
  ")."
5866
5908
  ] }) });
5867
- return /* @__PURE__ */ jsx32(PantallaBP, { nombre, direccion }, nombre);
5909
+ return /* @__PURE__ */ jsx33(PantallaBP, { nombre, direccion }, nombre);
5868
5910
  };
5869
5911
 
5870
5912
  // src/puente/GrillaBP.tsx
5871
- import { useEffect as useEffect14, useRef as useRef10, useState as useState18 } from "react";
5913
+ import { useEffect as useEffect15, useRef as useRef10, useState as useState18 } from "react";
5872
5914
  import { useParams as useParams5 } from "react-router-dom";
5873
5915
  import { Alert as Alert8, Box as Box25, CircularProgress as CircularProgress9 } from "@mui/material";
5874
- import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
5916
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
5875
5917
  var GrillaBP = ({ tabla, fixedFields }) => {
5876
5918
  const contenedor = useRef10(null);
5877
5919
  const [cargando, setCargando] = useState18(true);
5878
5920
  const [error, setError] = useState18(null);
5879
5921
  const clave = JSON.stringify(fixedFields ?? []);
5880
- useEffect14(() => {
5922
+ useEffect15(() => {
5881
5923
  const elemento = contenedor.current;
5882
5924
  if (!elemento) return;
5883
5925
  let vigente = true;
@@ -5898,68 +5940,124 @@ var GrillaBP = ({ tabla, fixedFields }) => {
5898
5940
  elemento.replaceChildren();
5899
5941
  };
5900
5942
  }, [tabla, clave]);
5901
- return /* @__PURE__ */ jsxs25(Box25, { children: [
5902
- cargando && /* @__PURE__ */ jsx33(CircularProgress9, { size: 24, sx: { m: 2 } }),
5903
- error && /* @__PURE__ */ jsx33(Alert8, { severity: "error", sx: { m: 2 }, children: error }),
5904
- /* @__PURE__ */ jsx33("div", { ref: contenedor })
5905
- ] });
5943
+ return (
5944
+ // el indicador de carga flota: si ocupara lugar, el contenido de backend-plus empezaría más abajo mientras carga y subiría al terminar
5945
+ /* @__PURE__ */ jsxs24(Box25, { sx: { position: "relative" }, children: [
5946
+ cargando && /* @__PURE__ */ jsx34(CircularProgress9, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
5947
+ error && /* @__PURE__ */ jsx34(Alert8, { severity: "error", sx: { m: 2 }, children: error }),
5948
+ /* @__PURE__ */ jsx34("div", { ref: contenedor }),
5949
+ /* @__PURE__ */ jsx34(ConsolaBP, {})
5950
+ ] })
5951
+ );
5906
5952
  };
5907
5953
  var PaginaGrillaBP = () => {
5908
5954
  const { tableName = "" } = useParams5();
5909
- return /* @__PURE__ */ jsx33(GrillaBP, { tabla: tableName }, tableName);
5955
+ return /* @__PURE__ */ jsx34(GrillaBP, { tabla: tableName }, tableName);
5956
+ };
5957
+
5958
+ // src/puente/CapturaBP.tsx
5959
+ import { useEffect as useEffect16 } from "react";
5960
+ import { useNavigate as useNavigate5 } from "react-router-dom";
5961
+
5962
+ // src/puente/capturaDeNavegacion.ts
5963
+ function apiDeNavegacion() {
5964
+ const api = Reflect.get(window, "navigation");
5965
+ return typeof api === "object" && api !== null && "addEventListener" in api && typeof api.addEventListener === "function" ? api : null;
5966
+ }
5967
+ function capturarNavegacionBP(urlBackend, navegar) {
5968
+ const alHacerClick = (evento) => {
5969
+ if (evento.defaultPrevented || evento.button !== 0 || evento.ctrlKey || evento.metaKey || evento.shiftKey) return;
5970
+ const enlace = evento.target instanceof Element ? evento.target.closest("a[href]") : null;
5971
+ if (!enlace || enlace.hasAttribute("download") || (enlace.getAttribute("target") ?? "_self") !== "_self") return;
5972
+ const ruta = rutaDeEnlaceBP(enlace.getAttribute("href") ?? "", document.baseURI, urlBackend);
5973
+ if (ruta) {
5974
+ evento.preventDefault();
5975
+ evento.stopPropagation();
5976
+ navegar(ruta);
5977
+ }
5978
+ };
5979
+ document.addEventListener("click", alHacerClick, true);
5980
+ const navegacion = apiDeNavegacion();
5981
+ const alNavegar = (evento) => {
5982
+ if (!evento.cancelable || evento.destination.sameDocument || evento.downloadRequest !== null) return;
5983
+ const ruta = rutaDeEnlaceBP(evento.destination.url, document.baseURI, urlBackend);
5984
+ if (ruta) {
5985
+ evento.preventDefault();
5986
+ navegar(ruta);
5987
+ }
5988
+ };
5989
+ navegacion?.addEventListener("navigate", alNavegar);
5990
+ const reemplazarOriginal = history.replaceState;
5991
+ const reemplazar = (estado, titulo, url) => {
5992
+ const ruta = url === void 0 || url === null ? null : rutaDeEnlaceBP(String(url), document.baseURI, urlBackend);
5993
+ reemplazarOriginal.call(history, estado, titulo, ruta === null ? url : rutaBase + ruta);
5994
+ };
5995
+ history.replaceState = reemplazar;
5996
+ return () => {
5997
+ if (history.replaceState === reemplazar) history.replaceState = reemplazarOriginal;
5998
+ document.removeEventListener("click", alHacerClick, true);
5999
+ navegacion?.removeEventListener("navigate", alNavegar);
6000
+ };
6001
+ }
6002
+
6003
+ // src/puente/CapturaBP.tsx
6004
+ var CapturaBP = () => {
6005
+ const navigate = useNavigate5();
6006
+ useEffect16(() => capturarNavegacionBP(envConfig.backendUrl, navigate), [navigate]);
6007
+ return null;
5910
6008
  };
5911
6009
 
5912
6010
  // src/App.tsx
5913
6011
  import typeStore6 from "type-store";
5914
- import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
6012
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
5915
6013
  var LocationTracker = () => {
5916
6014
  const location = useLocation7();
5917
6015
  const dispatch = useAppDispatch();
5918
- useEffect15(() => {
6016
+ useEffect17(() => {
5919
6017
  dispatch(setCurrentPath(location.pathname + location.search));
5920
6018
  }, [location, dispatch]);
5921
6019
  return null;
5922
6020
  };
5923
6021
  function FrontendPlusReactRoutes({ myRoutes, myUnloggedRoutes, layout: Layout = MainLayout_default, unloggedLayout: UnloggedLayout }) {
5924
- return /* @__PURE__ */ jsxs26(Fragment5, { children: [
5925
- /* @__PURE__ */ jsx34(InitialRedirectHandler_default, {}),
5926
- /* @__PURE__ */ jsxs26(Routes, { children: [
5927
- /* @__PURE__ */ jsxs26(Route, { element: UnloggedLayout ? /* @__PURE__ */ jsx34(UnloggedLayout, {}) : /* @__PURE__ */ jsx34(Outlet2, {}), children: [
5928
- /* @__PURE__ */ jsx34(Route, { path: "/login", element: /* @__PURE__ */ jsx34(LoginPage_default, {}) }),
5929
- /* @__PURE__ */ jsx34(Route, { path: "/logout", element: /* @__PURE__ */ jsx34(LogoutPage_default, {}) }),
6022
+ return /* @__PURE__ */ jsxs25(Fragment5, { children: [
6023
+ /* @__PURE__ */ jsx35(InitialRedirectHandler_default, {}),
6024
+ puenteBPHabilitado() && /* @__PURE__ */ jsx35(CapturaBP, {}),
6025
+ /* @__PURE__ */ jsxs25(Routes, { children: [
6026
+ /* @__PURE__ */ jsxs25(Route, { element: UnloggedLayout ? /* @__PURE__ */ jsx35(UnloggedLayout, {}) : /* @__PURE__ */ jsx35(Outlet2, {}), children: [
6027
+ /* @__PURE__ */ jsx35(Route, { path: "/login", element: /* @__PURE__ */ jsx35(LoginPage_default, {}) }),
6028
+ /* @__PURE__ */ jsx35(Route, { path: "/logout", element: /* @__PURE__ */ jsx35(LogoutPage_default, {}) }),
5930
6029
  myUnloggedRoutes
5931
6030
  ] }),
5932
- /* @__PURE__ */ jsxs26(Route, { element: /* @__PURE__ */ jsx34(PrivateRoute_default, { children: /* @__PURE__ */ jsx34(Layout, {}) }), children: [
5933
- /* @__PURE__ */ jsx34(Route, { path: "/", element: /* @__PURE__ */ jsx34(HomePage_default, {}) }),
5934
- /* @__PURE__ */ jsx34(Route, { path: "/home", element: /* @__PURE__ */ jsx34(HomePage_default, {}) }),
5935
- /* @__PURE__ */ jsx34(Route, { path: "/table/:tableName", element: /* @__PURE__ */ jsx34(GenericDataGridPage_default, {}) }),
5936
- /* @__PURE__ */ jsx34(Route, { path: "/menu/:menuName", element: /* @__PURE__ */ jsx34(MenuTablePage_default, {}) }),
5937
- /* @__PURE__ */ jsx34(Route, { path: "/procedures/:procedureName", element: /* @__PURE__ */ jsx34(ProcedureForm_default, {}) }),
5938
- Object.keys(wScreens).map((screenName) => /* @__PURE__ */ jsx34(
6031
+ /* @__PURE__ */ jsxs25(Route, { element: /* @__PURE__ */ jsx35(PrivateRoute_default, { children: /* @__PURE__ */ jsx35(Layout, {}) }), children: [
6032
+ /* @__PURE__ */ jsx35(Route, { path: "/", element: /* @__PURE__ */ jsx35(PantallaInicial_default, {}) }),
6033
+ /* @__PURE__ */ jsx35(Route, { path: "/table/:tableName", element: /* @__PURE__ */ jsx35(GenericDataGridPage_default, {}) }),
6034
+ /* @__PURE__ */ jsx35(Route, { path: "/menu/:menuName", element: /* @__PURE__ */ jsx35(MenuTablePage_default, {}) }),
6035
+ /* @__PURE__ */ jsx35(Route, { path: "/procedures/:procedureName", element: /* @__PURE__ */ jsx35(ProcedureForm_default, {}) }),
6036
+ Object.keys(wScreens).map((screenName) => /* @__PURE__ */ jsx35(
5939
6037
  Route,
5940
6038
  {
5941
6039
  path: `/wScreens/${screenName}`,
5942
- element: /* @__PURE__ */ jsx34(PantallaDeRuta, { screenName })
6040
+ element: /* @__PURE__ */ jsx35(PantallaDeRuta, { screenName })
5943
6041
  },
5944
6042
  screenName
5945
6043
  )),
5946
- /* @__PURE__ */ jsx34(Route, { path: "/wScreens-fallback/:screenName", element: /* @__PURE__ */ jsx34(PantallaDeRespaldo, {}) }),
5947
- puenteBPHabilitado() && /* @__PURE__ */ jsx34(Route, { path: "/bp/menu", element: /* @__PURE__ */ jsx34(PaginaBP, {}) }),
5948
- puenteBPHabilitado() && /* @__PURE__ */ jsx34(Route, { path: "/bp/table/:tableName", element: /* @__PURE__ */ jsx34(PaginaGrillaBP, {}) }),
6044
+ /* @__PURE__ */ jsx35(Route, { path: "/wScreens-fallback/:screenName", element: /* @__PURE__ */ jsx35(PantallaDeRespaldo, {}) }),
6045
+ puenteBPHabilitado() && /* @__PURE__ */ jsx35(Route, { path: "/bp/menu", element: /* @__PURE__ */ jsx35(PaginaBP, {}) }),
6046
+ puenteBPHabilitado() && /* @__PURE__ */ jsx35(Route, { path: "/bp/table/:tableName", element: /* @__PURE__ */ jsx35(PaginaGrillaBP, {}) }),
5949
6047
  myRoutes,
5950
- /* @__PURE__ */ jsx34(Route, { path: "*", element: /* @__PURE__ */ jsx34("div", { style: { marginTop: "20px", marginLeft: "10px" }, children: "404 - Recurso No Encontrado" }) })
6048
+ /* @__PURE__ */ jsx35(Route, { path: "*", element: /* @__PURE__ */ jsx35("div", { style: { marginTop: "20px", marginLeft: "10px" }, children: "404 - Recurso No Encontrado" }) })
5951
6049
  ] }),
5952
- /* @__PURE__ */ jsx34(Route, { path: "*", element: /* @__PURE__ */ jsx34(Navigate3, { to: "/", replace: true }) })
6050
+ /* @__PURE__ */ jsx35(Route, { path: "*", element: /* @__PURE__ */ jsx35(Navigate4, { to: "/", replace: true }) })
5953
6051
  ] })
5954
6052
  ] });
5955
6053
  }
5956
6054
  var FrontendPlusProviders = ({ children, publicPaths }) => {
5957
- return /* @__PURE__ */ jsx34(Provider, { store, children: /* @__PURE__ */ jsx34(PersistGate, { loading: null, persistor, children: /* @__PURE__ */ jsxs26(BrowserRouter, { basename: rutaBase, children: [
5958
- /* @__PURE__ */ jsx34(LocationTracker, {}),
6055
+ return /* @__PURE__ */ jsx35(Provider, { store, children: /* @__PURE__ */ jsx35(PersistGate, { loading: null, persistor, children: /* @__PURE__ */ jsxs25(BrowserRouter, { basename: rutaBase, children: [
6056
+ /* @__PURE__ */ jsx35(LocationTracker, {}),
5959
6057
  " ",
5960
- /* @__PURE__ */ jsx34(AppProvider, { publicPaths, children: /* @__PURE__ */ jsxs26(SnackbarProvider, { children: [
6058
+ /* @__PURE__ */ jsx35(AppProvider, { publicPaths, children: /* @__PURE__ */ jsxs25(SnackbarProvider, { children: [
5961
6059
  children,
5962
- /* @__PURE__ */ jsx34(SessionExpiredMessage_default, {})
6060
+ /* @__PURE__ */ jsx35(SessionExpiredMessage_default, {})
5963
6061
  ] }) })
5964
6062
  ] }) }) });
5965
6063
  };
@@ -5990,7 +6088,7 @@ var App = ({
5990
6088
  habilitarPuenteBP();
5991
6089
  }
5992
6090
  }, [myClientSides, myResultsOk, myWScreens, myConditions, puenteBP]);
5993
- useEffect15(() => {
6091
+ useEffect17(() => {
5994
6092
  typeStore6.messages = typeStore6.i18n.messages.es;
5995
6093
  typeStore6.locale = typeStore6.i18n.locale.es;
5996
6094
  const link = document.querySelector("link[rel*='icon']") || document.createElement("link");
@@ -5999,11 +6097,11 @@ var App = ({
5999
6097
  link.href = `${envConfig.backendUrl}/img/logo-128.png`;
6000
6098
  document.getElementsByTagName("head")[0].appendChild(link);
6001
6099
  }, []);
6002
- const safePaths = React27.useMemo(() => {
6100
+ const safePaths = React29.useMemo(() => {
6003
6101
  const extracted = extractPathsFromRoutes(myUnloggedRoutes);
6004
6102
  return ["/login", "/logout", ...extracted];
6005
6103
  }, [myUnloggedRoutes]);
6006
- return /* @__PURE__ */ jsx34(FrontendPlusProviders, { publicPaths: safePaths, children: /* @__PURE__ */ jsx34(
6104
+ return /* @__PURE__ */ jsx35(FrontendPlusProviders, { publicPaths: safePaths, children: /* @__PURE__ */ jsx35(
6007
6105
  FrontendPlusReactRoutes,
6008
6106
  {
6009
6107
  myRoutes,