{"version":3,"sources":["authConfig.js","components/SignInButton.jsx","components/SignOutButton.jsx","components/PageLayout.jsx","App.jsx","index.js"],"names":["msalConfig","auth","clientId","authority","redirectUri","cache","cacheLocation","storeAuthStateInCookie","system","loggerOptions","loggerCallback","level","message","containsPii","LogLevel","Error","console","error","Info","info","Verbose","debug","Warning","warn","loginRequest","scopes","SignInButton","instance","useMsal","Button","variant","onClick","loginType","loginPopup","catch","e","loginRedirect","RequestProfileData","SignOutButton","logoutType","logoutPopup","postLogoutRedirectUri","mainWindowRedirectUri","logoutRedirect","PageLayout","props","isAuthenticated","useIsAuthenticated","src","width","height","children","ProfileContent","accounts","useState","window","location","href","username","localAccountId","className","name","MainContent","App","msalInstance","PublicClientApplication","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"uQAYaA,EAAa,CACtBC,KAAM,CACFC,SAAU,uCACVC,UAAW,yEACXC,YAAa,mCAEjBC,MAAO,CACHC,cAAe,iBACfC,wBAAwB,GAE5BC,OAAQ,CACJC,cAAe,CACXC,eAAgB,SAACC,EAAOC,EAASC,GAC7B,IAAIA,EAGJ,OAAQF,GACJ,KAAKG,IAASC,MAEV,YADAC,QAAQC,MAAML,GAElB,KAAKE,IAASI,KAEV,YADAF,QAAQG,KAAKP,GAEjB,KAAKE,IAASM,QAEV,YADAJ,QAAQK,MAAMT,GAElB,KAAKE,IAASQ,QAEV,YADAN,QAAQO,KAAKX,QAcxBY,EAAe,CACxBC,OAAQ,CAAC,c,eC5CAC,EAAe,WACxB,IAAQC,EAAaC,cAAbD,SAgBR,OACI,cAACE,EAAA,EAAD,CAAQC,QAAQ,YAAYC,QAAS,WAfrB,IAACC,EACC,WADDA,EAeqC,YAblDL,EAASM,WAAWT,GAAcU,OAAM,SAAAC,OAGnB,aAAdH,GACPL,EAASS,cAAcZ,GAAcU,OAAM,SAAAC,GACvCE,yBAQR,gCCpBKC,EAAgB,WACzB,IAAQX,EAAaC,cAAbD,SAcR,OACI,cAACE,EAAA,EAAD,CAAQC,QAAQ,YAAYC,QAAS,WAbpB,IAACQ,EACC,WADDA,EAaqC,YAXnDZ,EAASa,YAAY,CACjBC,sBAAuB,IACvBC,sBAAuB,MAEL,aAAfH,GACPZ,EAASgB,eAAe,CACpBF,sBAAuB,OAK/B,qBCRKG,EAAa,SAACC,GACvB,IAAMC,EAAkBC,cAExB,OACI,qCAKI,uBACA,uBACA,uBACA,uBACA,uBACA,uBACA,uBACA,uBAEA,6BAAI,iCAAQ,qBAAKC,IAAI,6EAA6EC,MAAM,MAAMC,OAAO,YAErH,uBACA,iCACEJ,EAAkB,cAAC,EAAD,IAAoB,cAAC,EAAD,MAGxC,uBAECD,EAAMM,a,sBC/BbC,EAAiB,WACnB,MAA+BxB,cAAbyB,GAAlB,EAAQ1B,SAAR,EAAkB0B,UAClB,EAAkCC,mBAAS,MAA3C,6BAgBA,OAfEC,OAAOC,SAASC,KAAK,kEAAkEJ,EAAS,GAAGK,SAAS,UAAUL,EAAS,GAAGM,eAgBhI,qCACK,qBAAIC,UAAU,aAAd,wBAAuCP,EAAS,GAAGQ,QAGpD,uBAEA,uBACA,2BASNC,EAAc,WAIhB,OACI,sBAAKF,UAAU,MAAf,UACK,cAAC/B,EAAA,EAAD,CAAQC,QAAQ,YAAYC,QAAS,WAJ1CwB,OAAOC,SAASC,KAAK,qEAIhB,2BACD,cAAC,IAAD,UACI,cAAC,EAAD,MAGJ,cAAC,IAAD,UAEI,oBAAIG,UAAU,qBASf,SAASG,IAEpB,OAEI,cAAC,EAAD,UACI,cAAC,EAAD,M,IC7DNC,EAAe,I,MAAIC,GAAwBjE,GAKjDkE,IAASC,OACL,cAAC,IAAMC,WAAP,UACI,cAAC,IAAD,CAAczC,SAAUqC,EAAxB,SACI,cAAC,EAAD,QAGRK,SAASC,eAAe,W","file":"static/js/main.30d2dc86.chunk.js","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { LogLevel } from \"@azure/msal-browser\";\n\n/**\n * Configuration object to be passed to MSAL instance on creation. \n * For a full list of MSAL.js configuration parameters, visit:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md \n */\nexport const msalConfig = {\n auth: {\n clientId: \"f169ab85-4155-44fe-aeb5-227e81631666\",\n authority: \"https://login.microsoftonline.com/1ea99d78-fada-4676-b729-2af60e94688b\",\n redirectUri: \"https://interno.gruposerex.com/\"\n },\n cache: {\n cacheLocation: \"sessionStorage\", // This configures where your cache will be stored\n storeAuthStateInCookie: false, // Set this to \"true\" if you are having issues on IE11 or Edge\n },\n system: {\t\n loggerOptions: {\t\n loggerCallback: (level, message, containsPii) => {\t\n if (containsPii) {\t\t\n return;\t\t\n }\t\t\n switch (level) {\t\t\n case LogLevel.Error:\t\t\n console.error(message);\t\t\n return;\t\t\n case LogLevel.Info:\t\t\n console.info(message);\t\t\n return;\t\t\n case LogLevel.Verbose:\t\t\n console.debug(message);\t\t\n return;\t\t\n case LogLevel.Warning:\t\t\n console.warn(message);\t\t\n return;\t\t\n }\t\n }\t\n }\t\n }\n};\n\n/**\n * Scopes you add here will be prompted for user consent during sign-in.\n * By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.\n * For more information about OIDC scopes, visit: \n * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes\n */\nexport const loginRequest = {\n scopes: [\"User.Read\"]\n};\n\n/**\n * Add here the scopes to request when obtaining an access token for MS Graph API. For more information, see:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md\n */\nexport const graphConfig = {\n graphMeEndpoint: \"https://graph.microsoft.com/v1.0/me\"\n};\n","import React from \"react\";\nimport { useMsal } from \"@azure/msal-react\";\nimport { loginRequest } from \"../authConfig\";\nimport DropdownButton from \"react-bootstrap/DropdownButton\";\nimport Dropdown from \"react-bootstrap/esm/Dropdown\";\nimport Button from \"react-bootstrap/Button\";\n\n/**\n * Renders a drop down button with child buttons for logging in with a popup or redirect\n */\nexport const SignInButton = () => {\n const { instance } = useMsal();\n\n const handleLogin = (loginType) => {\n if (loginType === \"popup\") {\n instance.loginPopup(loginRequest).catch(e => {\n //console.log(e);\n });\n } else if (loginType === \"redirect\") {\n instance.loginRedirect(loginRequest).catch(e => {\n RequestProfileData();\n //console.log(e);\n });\n }\n }\n\n \n return (\n \n \n )\n}","import React from \"react\";\nimport { useMsal } from \"@azure/msal-react\";\nimport DropdownButton from \"react-bootstrap/DropdownButton\";\nimport Dropdown from \"react-bootstrap/esm/Dropdown\";\nimport Button from \"react-bootstrap/Button\";\n/**\n * Renders a sign-out button\n */\nexport const SignOutButton = () => {\n const { instance } = useMsal();\n\n const handleLogout = (logoutType) => {\n if (logoutType === \"popup\") {\n instance.logoutPopup({\n postLogoutRedirectUri: \"/\",\n mainWindowRedirectUri: \"/\"\n });\n } else if (logoutType === \"redirect\") {\n instance.logoutRedirect({\n postLogoutRedirectUri: \"/\",\n });\n }\n }\n return (\n \n )\n}","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport React from \"react\";\n/* import Navbar from \"react-bootstrap/Navbar\"; */\n\nimport { useIsAuthenticated } from \"@azure/msal-react\";\nimport { SignInButton } from \"./SignInButton\";\nimport { SignOutButton } from \"./SignOutButton\";\n\n/**\n * Renders the navbar component with a sign-in or sign-out button depending on whether or not a user is authenticated\n * @param props \n */\nexport const PageLayout = (props) => {\n const isAuthenticated = useIsAuthenticated();\n \n return (\n <>\n {/* \n Grupo Serex\n \n */}\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n { isAuthenticated ? : }\n
\n \n
\n \n {props.children}\n \n );\n};\n","import React, { useState } from \"react\";\nimport { AuthenticatedTemplate, UnauthenticatedTemplate, useMsal } from \"@azure/msal-react\";\nimport { loginRequest } from \"./authConfig\";\nimport { PageLayout } from \"./components/PageLayout\";\nimport { ProfileData } from \"./components/ProfileData\";\nimport { callMsGraph } from \"./graph\";\nimport Button from \"react-bootstrap/Button\";\nimport \"./styles/App.css\";\n\n/**\n * Renders information about the signed-in user or a button to retrieve data about the user\n */\nconst ProfileContent = () => {\n const { instance, accounts } = useMsal();\n const [graphData, setGraphData] = useState(null);\n { window.location.href=\"https://interno.gruposerex.com/intranet/procet_login.php?email=\"+accounts[0].username+\"&token=\"+accounts[0].localAccountId} \n function RequestProfileData() {\n \n // Silently acquires an access token which is then attached to a request for MS Graph data\n instance.acquireTokenSilent({\n ...loginRequest,\n account: accounts[0],\n \n }).then((response) => {\n callMsGraph(response.accessToken).then(response => setGraphData(response));\n });\n }\n \n\n \n return (\n <>\n
Bienvenido {accounts[0].name}
\n\n \n
\n \n
\n
\n \n \n );\n};\n\n/**\n * If a user is authenticated the ProfileContent component above is rendered. Otherwise a message indicating a user is not authenticated is rendered.\n */\nconst MainContent = () => { \n function Registrar(){\n window.location.href=\"https://interno.gruposerex.com/intranet/Admin/Nomina/Registro.php\";\n } \n return (\n
\n \n \n \n \n\n \n \n
\n \n
\n \n \n
\n );\n};\n\nexport default function App() {\n \n return (\n \n \n \n \n );\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"bootstrap/dist/css/bootstrap.min.css\";\nimport \"./styles/index.css\";\nimport App from \"./App.jsx\";\nimport { PublicClientApplication } from \"@azure/msal-browser\";\nimport { MsalProvider } from \"@azure/msal-react\";\nimport { msalConfig } from \"./authConfig\";\n\n/**\n * Initialize a PublicClientApplication instance which is provided to the MsalProvider component\n * We recommend initializing this outside of your root component to ensure it is not re-initialized on re-renders\n */\nconst msalInstance = new PublicClientApplication(msalConfig);\n\n/**\n * We recommend wrapping most or all of your components in the MsalProvider component. It's best to render the MsalProvider as close to the root as possible.\n */\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById(\"root\")\n);\n"],"sourceRoot":""}