{"version":3,"sources":["constants/index.js","utils/settings.js","context/SettingsContext.tsx","serviceWorker.js","components/SplashScreen.js","components/Auth.tsx","components/CookiesNotification.js","components/GoogleAnalytics.js","components/ScrollReset.js","hooks/useSettings.js","theme/shadows.js","theme/index.js","theme/typography.js","components/GuestGuard.tsx","components/LoadingScreen.js","views/pages/AccountView/License/LicenseStatus.tsx","components/RolesGuard.tsx","utils/role.ts","layouts/DashboardLayout/NavBar/NavItem.js","layouts/DashboardLayout/NavBar/index.js","components/LogoTop.js","layouts/DashboardLayout/TopBar/Account.js","layouts/DashboardLayout/TopBar/index.js","layouts/DashboardLayout/index.js","Routes.tsx","App.tsx","index.tsx","utils/client.ts","store/account/actions.ts","config/index.ts","store/account/selectors.ts","components/Logo.js","api/auth.ts","store/account/reducers.ts","store/index.ts","api/physicians.ts","store/account/types.ts","utils/auth.ts"],"names":["THEMES","storeSettings","settings","localStorage","setItem","JSON","stringify","defaultSettings","direction","responsiveFontSizes","theme","openNavBar","SettingsContext","createContext","SettingsProvider","children","useState","currentSettings","setCurrentSettings","useEffect","document","dir","Provider","value","saveSettings","updatedSettings","mergedSettings","_","merge","Consumer","Boolean","window","location","hostname","match","useStyles","makeStyles","root","alignItems","backgroundColor","palette","background","default","display","flexDirection","height","justifyContent","left","padding","spacing","position","top","width","zIndex","SlashScreen","classes","className","Box","mb","Logo","CircularProgress","Auth","dispatch","useDispatch","isLoading","setLoading","a","isValidToken","setUserData","parse","getUser","initAuth","SplashScreen","common","black","color","white","maxWidth","bottom","margin","outline","action","CookiesNotification","open","setOpen","Cookies","get","Portal","Typography","variant","Link","component","underline","href","target","mt","Button","onClick","set","data-cy","GA_MEASUREMENT_ID","process","REACT_APP_GA_MEASUREMENT_ID","GoogleAnalytics","Helmet","async","src","ScrollReset","useLocation","scrollTo","pathname","useSettings","useContext","strongShadows","baseConfig","typography","h1","fontWeight","fontSize","letterSpacing","h2","h3","h4","h5","h6","overline","overrides","MuiLinearProgress","borderRadius","overflow","MuiListItemIcon","minWidth","MuiChip","themeConfigs","name","MuiInputBase","input","opacity","colors","blueGrey","type","active","dark","paper","primary","main","secondary","text","shadows","hover","selected","disabled","disabledBackground","focus","createTheme","themeConfig","find","console","warn","Error","createMuiTheme","GuestGuard","useSelector","state","account","user","to","minHeight","LoadingScreen","NProgress","start","done","LinearProgress","pos","marginBottom","LicenseStatus","onClose","onApply","setUser","currentUser","useCurrentUser","licenseExpiration","moment","license_expiration","todayNow","Dialog","DialogTitle","DialogContent","dividers","style","textAlign","diff","CardContent","Grid","container","item","md","xs","CancelOutlined","red","textTransform","format","VerifiedUserRounded","green","fromNow","DialogActions","autoFocus","rolesGuard","allowedRoles","modalLicense","setModelLicense","licenseValidation","setLicenseValidation","history","useHistory","enqueueSnackbar","useSnackbar","handleModelLicenseOpen","handleLogout","logout","push","role","includes","isVerifyLicense","length","setLicenseVerify","Date","now","toString","getRoleName","physician","odonologiaSpeciality","specialties","speciality","paddingTop","paddingBottom","itemLeaf","button","buttonLeaf","fontWeightRegular","fontWeightMedium","icon","marginRight","title","NavItem","depth","Icon","openProp","Info","info","rest","paddingLeft","ListItem","clsx","disableGutters","prevOpen","size","Collapse","in","activeClassName","RouterLink","exact","defaultProps","dashboardItem","PieChartIcon","adminNavConfig","subheader","items","AssignmentIcon","EventAvailableIcon","LocalHospitalIcon","physicianNavConfig","FaceIcon","operatorNavConfig","patientNavConfig","analyticsNavConfig","monitorNavConfig","renderNavItems","List","disablePadding","reduce","acc","key","matchPath","path","reduceChildRoutes","mobileDrawer","desktopDrawer","avatar","cursor","helpText","marginTop","helpButton","NavBar","openMobile","onMobileClose","openDesktop","modalOpen","setModalOpen","navigationItems","setNavigationItems","setPhysician","fetchPhysician","physicianId","getPhysician","currentPhysician","id","content","options","suppressScrollX","Hidden","lgUp","p","Avatar","alt","logo","photo","first_name","last_name","Divider","map","config","ListSubheader","disableSticky","justify","gutterBottom","bgcolor","APP_VERSION","Drawer","anchor","mdDown","props","maxHeight","popover","Account","ref","useRef","isOpen","handleClose","ButtonBase","smDown","Menu","anchorOrigin","vertical","horizontal","keepMounted","PaperProps","getContentAnchorEl","anchorEl","current","MenuItem","drawer","boxShadow","toolbar","marginLeft","TopBar","onMobileNavOpen","onDesktopNavTouch","AppBar","Toolbar","IconButton","SvgIcon","LogoTop","ml","flexGrow","wrapper","flex","wrapperNavBarOpen","breakpoints","up","contentContainer","DashboardLayout","isMobileNavOpen","setMobileNavOpen","routesConfig","lazy","guard","layout","routes","renderRoutes","fallback","route","i","Guard","Fragment","Layout","Component","render","Routes","createBrowserHistory","jss","create","plugins","jssPreset","rtl","createStyles","boxSizing","html","body","App","ThemeProvider","StylesProvider","utils","MomentUtils","maxSnack","locale","enableES5","store","configureStore","storedData","getItem","err","restoreSettings","ReactDOM","getElementById","navigator","serviceWorker","ready","then","registration","unregister","api","ky","timeout","prefixUrl","API_PREFIX","hooks","beforeRequest","request","token","getAuthToken","headers","afterResponse","response","url","status","login","username","password","LOGIN_REQUEST","loginUser","userToken","setAuthToken","jwtDecode","LOGIN_SUCCESS","payload","LOGIN_FAILURE","SILENT_LOGIN","deleteAuthToken","LOGOUT","updatePhoto","obj","authToken","UPDATE_PHOTO","updateLogo","SOCKET_URL","ENABLE_REDUX_LOGGER","accountState","useMemo","alignSelf","down","client","post","json","email","updateProfileRequest","update","patch","updatePasswordRequest","createPhoto","formData","createLogo","initialState","accountReducer","produce","draft","UPDATE_PROFILE","loggerMiddleware","createLogger","rootReducer","combineReducers","preloadedState","thunkMiddleware","reduxThunk","middleware","applyMiddleware","middlewareEnhancer","composeWithDevTools","createStore","getPhysicianSpecialties","getPhysicians","searchParams","createPhysician","getPublicInfo","slug","deletePhysician","delete","updatePhysician","put","updatePhysicianPassword","getPhysicianAvailabilities","getPhysicianTimeSlot","getPhysiciansAvailabilities","getPhysiciansExcel","blob","addPhysicianLicenseRenew","getPhysicianPasswordReset","createPhysicianAcademic","academic","getPhysicianAcademic","getPublicInfoAcademics","getPublicInfoLanguages","getPublicInfoLinks","getPublicInfoMedias","updatePhysicianAcademic","deletePhysicianAcademic","createPhysicianLanguage","language","getPhysicianLanguage","updatePhysicianLanguage","deletePhysicianLanguage","createPhysicianLink","link","getPhysicianLink","updatePhysicianLink","createPhysicianMediaPhoto","getPhysicianMedia","updatePhysicianMedia","media","deletePhysicianMedia","UPDATE_PASSWORD","expiration","removeItem","license","decoded","JwtDecode","currentTime","exp"],"mappings":"unDACaA,EACJ,QADIA,EAED,WAFCA,EAGF,UCYJ,SAASC,EAAcC,GAC5BC,aAAaC,QAAQ,WAAYC,KAAKC,UAAUJ,ICNlD,IAAMK,EAAkB,CACtBC,UAAW,MACXC,qBAAqB,EACrBC,MAAOV,EACPW,YAAY,GAGRC,EAAkBC,wBAAwC,IAMnDC,EAA8B,SAAC,GAA4B,IAA1BZ,EAAyB,EAAzBA,SAAUa,EAAe,EAAfA,SAAe,EACvBC,mBAC5Cd,GAAYK,GAFuD,mBAC9DU,EAD8D,KAC7CC,EAD6C,KAerE,OAJAC,qBAAU,WACRC,SAASC,IAAMJ,EAAgBT,YAC9B,CAACS,IAGF,cAACL,EAAgBU,SAAjB,CACEC,MAAO,CACLrB,SAAUe,EACVO,aAdqB,WAA2B,IAA1BC,EAAyB,uDAAP,GACtCC,EAAiBC,IAAEC,MAAM,GAAIX,EAAiBQ,GACpDP,EAAmBQ,GACnBzB,EAAcyB,KAQd,SAMGX,KAOQH,GAFiBA,EAAgBiB,SAEjCjB,GCxCKkB,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2D,kMCfAC,EAAYC,aAAW,SAAC1B,GAAD,MAAY,CACvC2B,KAAM,CACJC,WAAY,SACZC,gBAAiB7B,EAAM8B,QAAQC,WAAWC,QAC1CC,QAAS,OACTC,cAAe,SACfC,OAAQ,OACRC,eAAgB,SAChBC,KAAM,EACNC,QAAStC,EAAMuC,QAAQ,GACvBC,SAAU,QACVC,IAAK,EACLC,MAAO,OACP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aAAauZ,QAAQ,SAErCsC,EAAkB,kBAAM7b,aAAaihB,WAAW,UAEhDrT,EAAkB,WAC7B,IAAMsT,EAP8BlhB,aAAauZ,QAAQ,kBAQzD,OAAgB,OAAZ2H,GAIG,IAAInT,KADgBmT,KACK,IAAInT,MAGzB/J,EAAe,WAC1B,IAAM0W,EAAQC,IACd,GAAc,OAAVD,EACF,OAAO,EAET,IAAMyG,EAAUC,IAAgB1G,GAC1B2G,EAActT,KAAKC,MAAQ,IAEjC,OAAOmT,EAAQG,IAAMD,K","file":"static/js/main.83132350.chunk.js","sourcesContent":["/* eslint-disable import/prefer-default-export */\nexport const THEMES = {\n LIGHT: 'LIGHT',\n ONE_DARK: 'ONE_DARK',\n UNICORN: 'UNICORN'\n};\n","export function restoreSettings() {\n let settings = null;\n\n try {\n const storedData = localStorage.getItem('settings');\n if (storedData) {\n settings = JSON.parse(storedData);\n }\n } catch (err) {\n // If stored data is not a strigified JSON this might fail,\n // that's why we catch the error\n }\n\n return settings;\n}\n\nexport function storeSettings(settings) {\n localStorage.setItem('settings', JSON.stringify(settings));\n}\n","// @ts-ignore\nimport _ from 'lodash';\nimport React, { createContext, FC, useEffect, useState } from 'react';\nimport { THEMES } from 'src/constants';\nimport { storeSettings } from 'src/utils/settings';\n\nexport interface SettingsContextInterface {\n settings?: any;\n saveSettings?: any;\n}\n\nconst defaultSettings = {\n direction: 'ltr',\n responsiveFontSizes: true,\n theme: THEMES.LIGHT,\n openNavBar: true\n};\n\nconst SettingsContext = createContext({});\n\ntype Props = {\n settings: any;\n};\n\nexport const SettingsProvider: FC = ({ settings, children }) => {\n const [currentSettings, setCurrentSettings] = useState(\n settings || defaultSettings\n );\n\n const handleSaveSettings = (updatedSettings = {}) => {\n const mergedSettings = _.merge({}, currentSettings, updatedSettings);\n setCurrentSettings(mergedSettings);\n storeSettings(mergedSettings);\n };\n\n useEffect(() => {\n document.dir = currentSettings.direction;\n }, [currentSettings]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const SettingsConsumer = SettingsContext.Consumer;\n\nexport default SettingsContext;\n","/* eslint-disable */\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in projection, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'projection' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import { Box, CircularProgress, makeStyles } from '@material-ui/core';\nimport React from 'react';\nimport Logo from 'src/components/Logo';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n alignItems: 'center',\n backgroundColor: theme.palette.background.default,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n justifyContent: 'center',\n left: 0,\n padding: theme.spacing(3),\n position: 'fixed',\n top: 0,\n width: '100%',\n zIndex: 2000\n }\n}));\n\nfunction SlashScreen() {\n const classes = useStyles();\n\n return (\n
\n \n \n \n \n
\n );\n}\n\nexport default SlashScreen;\n","import React, { FC, useEffect, useState } from 'react';\nimport { useDispatch } from 'react-redux';\nimport SplashScreen from 'src/components/SplashScreen';\nimport { setUserData } from 'src/store/account/actions';\nimport { getUser, isValidToken } from 'src/utils/auth';\n\nconst Auth: FC = ({ children }) => {\n const dispatch = useDispatch();\n const [isLoading, setLoading] = useState(true);\n\n useEffect(() => {\n const initAuth = async () => {\n if (isValidToken()) {\n dispatch(setUserData(JSON.parse(getUser()!)));\n }\n\n setLoading(false);\n };\n\n initAuth();\n }, [dispatch]);\n\n if (isLoading) {\n return ;\n }\n\n return <>{children};\n};\n\nexport default Auth;\n","import React, { useEffect, useState } from 'react';\nimport Cookies from 'js-cookie';\nimport {\n Box,\n Button,\n Link,\n makeStyles,\n Portal,\n Typography\n} from '@material-ui/core';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.palette.common.black,\n color: theme.palette.common.white,\n maxWidth: 600,\n position: 'fixed',\n bottom: 0,\n left: 0,\n margin: theme.spacing(3),\n padding: theme.spacing(3),\n outline: 'none',\n zIndex: 2000\n },\n action: {\n backgroundColor: theme.palette.common.white,\n color: theme.palette.common.black\n }\n}));\n\nfunction CookiesNotification() {\n const classes = useStyles();\n const [open, setOpen] = useState(false);\n\n const handleClose = () => {\n Cookies.set('consent', 'true');\n setOpen(false);\n };\n\n useEffect(() => {\n const consent = Cookies.get('consent');\n\n if (!consent) {\n setOpen(true);\n }\n }, []);\n\n if (!open) {\n return null;\n }\n\n return (\n \n
\n \n Nuestro sitio web utiliza Cookies para garantizar que tendrás la mejor\n experiencia posible. Lee nuestra{' '}\n \n Política de Privacidad\n {' '}\n para más información.\n \n \n \n Aceptar\n \n \n
\n
\n );\n}\n\nexport default CookiesNotification;\n","import React from 'react';\nimport { Helmet } from 'react-helmet';\n\nconst GA_MEASUREMENT_ID = process.env.REACT_APP_GA_MEASUREMENT_ID;\n\nfunction GoogleAnalytics() {\n return (\n \n \n \n \n );\n}\n\nexport default GoogleAnalytics;\n","import { useEffect } from 'react';\nimport { useLocation } from 'react-router';\n\nfunction ScrollReset() {\n const location = useLocation();\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, [location.pathname]);\n\n return null;\n}\n\nexport default ScrollReset;\n","import { useContext } from 'react';\nimport SettingsContext from 'src/context/SettingsContext';\n\nexport default function useSettings() {\n const context = useContext(SettingsContext);\n return context;\n}\n","export const softShadows = [\n 'none',\n '0 0 0 1px rgba(63,63,68,0.05), 0 1px 2px 0 rgba(63,63,68,0.15)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 2px 2px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 3px 4px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 3px 4px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 6px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 6px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 4px 8px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 5px 8px -2px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 6px 12px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 7px 12px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 6px 16px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 7px 16px -4px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 8px 18px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 9px 18px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 10px 20px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 11px 20px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 12px 22px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 13px 22px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 14px 24px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 16px 28px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 18px 30px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 20px 32px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 22px 34px -8px rgba(0,0,0,0.25)',\n '0 0 1px 0 rgba(0,0,0,0.31), 0 24px 36px -8px rgba(0,0,0,0.25)'\n];\n\nexport const strongShadows = [\n 'none',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 3px 4px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 2px 2px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 3px 4px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 3px 4px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 4px 6px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 4px 6px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 4px 8px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 5px 8px -2px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 6px 12px -4px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 7px 12px -4px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 6px 16px -4px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 7px 16px -4px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 8px 18px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 9px 18px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 10px 20px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 11px 20px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 12px 22px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 13px 22px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 14px 24px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 16px 28px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 18px 30px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 20px 32px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 22px 34px -8px rgba(0,0,0,0.50)',\n '0 0 1px 0 rgba(0,0,0,0.70), 0 24px 36px -8px rgba(0,0,0,0.50)'\n];\n","/* eslint-disable no-console */\n/* eslint-disable import/prefer-default-export */\nimport _ from 'lodash';\nimport { colors, createMuiTheme, responsiveFontSizes } from '@material-ui/core';\nimport typography from './typography';\nimport { softShadows, strongShadows } from './shadows';\nimport { THEMES } from '../constants';\n\nconst baseConfig = {\n direction: 'ltr',\n typography,\n overrides: {\n MuiLinearProgress: {\n root: {\n borderRadius: 3,\n overflow: 'hidden'\n }\n },\n MuiListItemIcon: {\n root: {\n minWidth: 32\n }\n },\n MuiChip: {\n root: {\n backgroundColor: 'rgba(0,0,0,0.075)'\n }\n }\n }\n};\n\nconst themeConfigs = [\n {\n name: THEMES.LIGHT,\n overrides: {\n MuiInputBase: {\n input: {\n '&::placeholder': {\n opacity: 1,\n color: colors.blueGrey[600]\n }\n }\n }\n },\n palette: {\n type: 'light',\n action: {\n active: colors.blueGrey[600]\n },\n background: {\n default: colors.common.white,\n dark: '#f4f6f8',\n paper: colors.common.white\n },\n primary: {\n main: '#3f6cb3'\n },\n secondary: {\n main: '#5dc3e9'\n },\n text: {\n primary: colors.blueGrey[900],\n secondary: colors.blueGrey[600]\n }\n },\n shadows: softShadows\n },\n {\n name: THEMES.ONE_DARK,\n palette: {\n type: 'dark',\n action: {\n active: 'rgba(255, 255, 255, 0.54)',\n hover: 'rgba(255, 255, 255, 0.04)',\n selected: 'rgba(255, 255, 255, 0.08)',\n disabled: 'rgba(255, 255, 255, 0.26)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n focus: 'rgba(255, 255, 255, 0.12)'\n },\n background: {\n default: '#282C34',\n dark: '#1c2025',\n paper: '#282C34'\n },\n primary: {\n main: '#8a85ff'\n },\n secondary: {\n main: '#8a85ff'\n },\n text: {\n primary: '#e6e5e8',\n secondary: '#adb0bb'\n }\n },\n shadows: strongShadows\n },\n {\n name: THEMES.UNICORN,\n palette: {\n type: 'dark',\n action: {\n active: 'rgba(255, 255, 255, 0.54)',\n hover: 'rgba(255, 255, 255, 0.04)',\n selected: 'rgba(255, 255, 255, 0.08)',\n disabled: 'rgba(255, 255, 255, 0.26)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n focus: 'rgba(255, 255, 255, 0.12)'\n },\n background: {\n default: '#2a2d3d',\n dark: '#222431',\n paper: '#2a2d3d'\n },\n primary: {\n main: '#a67dff'\n },\n secondary: {\n main: '#a67dff'\n },\n text: {\n primary: '#f6f5f8',\n secondary: '#9699a4'\n }\n },\n shadows: strongShadows\n }\n];\n\nexport function createTheme(settings = {}) {\n let themeConfig = themeConfigs.find((theme) => theme.name === settings.theme);\n\n if (!themeConfig) {\n console.warn(new Error(`The theme ${settings.theme} is not valid`));\n [themeConfig] = themeConfigs;\n }\n\n let theme = createMuiTheme(\n _.merge({}, baseConfig, themeConfig, { direction: settings.direction })\n );\n\n if (settings.responsiveFontSizes) {\n theme = responsiveFontSizes(theme);\n }\n\n return theme;\n}\n","export default {\n h1: {\n fontWeight: 500,\n fontSize: 35,\n letterSpacing: '-0.24px'\n },\n h2: {\n fontWeight: 500,\n fontSize: 29,\n letterSpacing: '-0.24px'\n },\n h3: {\n fontWeight: 500,\n fontSize: 24,\n letterSpacing: '-0.06px'\n },\n h4: {\n fontWeight: 500,\n fontSize: 20,\n letterSpacing: '-0.06px'\n },\n h5: {\n fontWeight: 500,\n fontSize: 16,\n letterSpacing: '-0.05px'\n },\n h6: {\n fontWeight: 500,\n fontSize: 14,\n letterSpacing: '-0.05px'\n },\n overline: {\n fontWeight: 500\n }\n};\n","import React, { FC } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { AppState } from 'src/store';\nimport { AccountState } from 'src/store/account/types';\n\nconst GuestGuard: FC = ({ children }) => {\n const account = useSelector((state) => state.account);\n\n if (account.user) {\n return ;\n }\n\n return <>{children};\n};\n\nexport default GuestGuard;\n","import React, { useEffect } from 'react';\nimport NProgress from 'nprogress';\nimport { Box, LinearProgress, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n alignItems: 'center',\n backgroundColor: theme.palette.background.default,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n justifyContent: 'center',\n minHeight: '100%',\n padding: theme.spacing(3)\n }\n}));\n\nfunction LoadingScreen() {\n const classes = useStyles();\n\n useEffect(() => {\n NProgress.start();\n\n return () => {\n NProgress.done();\n };\n }, []);\n\n return (\n
\n \n \n \n
\n );\n}\n\nexport default LoadingScreen;\n","import {\n Button,\n CardContent,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Grid,\n makeStyles,\n Typography\n} from '@material-ui/core';\nimport { green, red } from '@material-ui/core/colors';\nimport { CancelOutlined, VerifiedUserRounded } from '@material-ui/icons';\nimport moment from 'moment';\nimport React, { FC, useEffect, useState } from 'react';\nimport { useCurrentUser } from 'src/store/account/selectors';\n\ntype Props = {\n open: boolean;\n onClose: () => void;\n onApply: () => void;\n};\n\nconst useStyles = makeStyles(() => ({\n pos: {\n marginBottom: 12\n }\n}));\n\nconst LicenseStatus: FC = ({ open, onClose, onApply }) => {\n const classes = useStyles();\n const [user, setUser] = useState(null);\n const currentUser = useCurrentUser();\n const licenseExpiration = moment(user?.license_expiration);\n const todayNow = moment();\n\n useEffect(() => {\n setUser(currentUser);\n }, [currentUser]);\n\n if (!user) {\n return null;\n }\n\n return (\n \n Estado de la licencia\n \n {licenseExpiration.diff(todayNow, 'seconds') < 0 ? (\n \n \n \n \n \n \n \n Licencia Vencida\n \n \n \n {licenseExpiration.diff(todayNow, 'days') === 0 ? (\n \n ¡Tu licencia venció hoy!\n \n ) : (\n \n Tu licencia venció hace{' '}\n {licenseExpiration.diff(todayNow, 'days')} días\n \n )}\n \n \n \n Su licencia se venció el {licenseExpiration.format('LL')}{' '}\n
se recomienda renovarla para seguir disfrutando del\n servicio.\n
\n
\n \n
\n ) : (\n \n \n \n \n \n \n \n Licencia Activa\n \n \n \n {licenseExpiration.diff(todayNow, 'days') === 0 ? (\n \n Ya no le quedan días, su licencia vence{' '}\n {licenseExpiration.fromNow()}\n \n ) : (\n \n Te quedan{' '}\n \n {licenseExpiration.diff(todayNow, 'days')} días\n {' '}\n de licencia\n \n )}\n \n \n \n Su licencia se vencerá el {licenseExpiration.format('LL')}\n , se recomienda renovarla
al menos un día antes para\n seguir disfrutando del servicio.\n
\n
\n \n
\n )}\n \n \n \n \n
\n );\n};\n\nexport default LicenseStatus;\n","import React, { FC, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { AppState } from 'src/store';\nimport { AccountState } from 'src/store/account/types';\nimport { useHistory } from 'react-router';\nimport { useSnackbar } from 'notistack';\nimport { logout } from 'src/store/account/actions';\nimport moment from 'moment';\nimport { isVerifyLicense, setLicenseVerify } from 'src/utils/auth';\nimport LicenseStatus from '../views/pages/AccountView/License/LicenseStatus';\n\ntype Props = (allowedRoles?: Role[]) => FC;\n\nconst rolesGuard: Props = (allowedRoles) => ({ children }) => {\n const [modalLicense, setModelLicense] = useState(false);\n const [licenseValidation, setLicenseValidation] = useState(false);\n const account = useSelector((state) => state.account);\n const history = useHistory();\n const dispatch = useDispatch();\n const { enqueueSnackbar } = useSnackbar();\n const LicenseNotice = [30, 15, 7, 3, 2, 1, 0];\n\n const handleLicenseValidation = () => {\n setLicenseValidation(true);\n return null;\n };\n const handleModelLicenseOpen = () => {\n setModelLicense(true);\n return null;\n };\n const handleModelLicenseClose = () => {\n setLicenseVerify(Date.now().toString());\n setModelLicense(false);\n return null;\n };\n\n const handleLogout = async () => {\n try {\n await dispatch(logout());\n history.push('/');\n } catch (error) {\n enqueueSnackbar('Unable to logout', {\n variant: 'error'\n });\n }\n };\n\n if (account.user?.role === 'PHYSICIAN') {\n const licenseExpiration = moment(account.user.license_expiration);\n const todayNow = moment();\n if (licenseExpiration.diff(todayNow, 'seconds') < 0) {\n handleLogout();\n return null;\n }\n\n if (\n LicenseNotice.includes(licenseExpiration.diff(todayNow, 'days')) &&\n !isVerifyLicense() &&\n !licenseValidation\n ) {\n handleModelLicenseOpen();\n handleLicenseValidation();\n return null;\n }\n }\n\n if (\n allowedRoles &&\n allowedRoles.length > 0 &&\n account.user &&\n allowedRoles.includes(account.user.role)\n ) {\n return (\n <>\n {account.user?.role === 'PHYSICIAN' ? (\n \n ) : null}\n {children}\n \n );\n }\n\n return ;\n};\n\nexport default rolesGuard;\n","export const getRoleName = (role: Role, physician: Physician | null = null) => {\n if (role === 'ADMIN') {\n return 'Administrador';\n }\n if (role === 'PHYSICIAN') {\n if (physician) {\n const odonologiaSpeciality = physician?.specialties.find((speciality) => {\n return speciality.name === 'Odontología';\n });\n if (odonologiaSpeciality) {\n return 'Odontólogo';\n }\n return 'Médico';\n }\n return 'Médico';\n }\n if (role === 'PATIENT') {\n return 'Paciente';\n }\n if (role === 'OPERATOR') {\n return 'Operador';\n }\n if (role === 'ANALYTICS') {\n return 'Analytics';\n }\n if (role === 'MONITOR') {\n return 'Monitor';\n }\n return '';\n};\n","import React, { useState } from 'react';\nimport { NavLink as RouterLink } from 'react-router-dom';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport {\n Button,\n Collapse,\n ListItem,\n makeStyles\n} from '@material-ui/core';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\n\nconst useStyles = makeStyles((theme) => ({\n item: {\n display: 'block',\n paddingTop: 0,\n paddingBottom: 0\n },\n itemLeaf: {\n display: 'flex',\n paddingTop: 0,\n paddingBottom: 0\n },\n button: {\n color: theme.palette.text.secondary,\n padding: '10px 8px',\n justifyContent: 'flex-start',\n textTransform: 'none',\n letterSpacing: 0,\n width: '100%'\n },\n buttonLeaf: {\n color: theme.palette.text.secondary,\n padding: '10px 8px',\n justifyContent: 'flex-start',\n textTransform: 'none',\n letterSpacing: 0,\n width: '100%',\n fontWeight: theme.typography.fontWeightRegular,\n '&.depth-0': {\n '& $title': {\n fontWeight: theme.typography.fontWeightMedium\n }\n }\n },\n icon: {\n display: 'flex',\n alignItems: 'center',\n marginRight: theme.spacing(1)\n },\n title: {\n marginRight: 'auto'\n },\n active: {\n color: theme.palette.secondary.main,\n '& $title': {\n fontWeight: theme.typography.fontWeightMedium\n },\n '& $icon': {\n color: theme.palette.secondary.main\n }\n }\n}));\n\nfunction NavItem({\n title,\n href,\n depth,\n children,\n icon: Icon,\n className,\n open: openProp,\n info: Info,\n ...rest\n}) {\n const classes = useStyles();\n const [open, setOpen] = useState(openProp);\n\n const handleToggle = () => {\n setOpen((prevOpen) => !prevOpen);\n };\n\n let paddingLeft = 8;\n\n if (depth > 0) {\n paddingLeft = 32 + 8 * depth;\n }\n\n const style = { paddingLeft };\n\n if (children) {\n return (\n \n \n {Icon && (\n \n )}\n \n {title}\n \n {open ? (\n \n ) : (\n \n )}\n \n \n {children}\n \n \n );\n }\n\n return (\n \n \n {Icon && (\n \n )}\n \n {title}\n \n {Info && }\n \n \n );\n}\n\nNavItem.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n depth: PropTypes.number.isRequired,\n href: PropTypes.string,\n icon: PropTypes.any,\n info: PropTypes.any,\n open: PropTypes.bool,\n title: PropTypes.string.isRequired\n};\n\nNavItem.defaultProps = {\n open: false\n};\n\nexport default NavItem;\n","/* eslint-disable no-use-before-define */\n/* eslint-disable react/prop-types */\nimport {\n Avatar,\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n Drawer,\n Grid,\n Hidden,\n Link,\n List,\n ListSubheader,\n makeStyles,\n Typography\n} from '@material-ui/core';\nimport AssignmentIcon from '@material-ui/icons/Assignment';\nimport EventAvailableIcon from '@material-ui/icons/EventAvailable';\nimport FaceIcon from '@material-ui/icons/Face';\nimport LocalHospitalIcon from '@material-ui/icons/LocalHospital';\nimport { useSnackbar } from 'notistack';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\nimport { PieChart as PieChartIcon } from 'react-feather';\nimport PerfectScrollbar from 'react-perfect-scrollbar';\nimport { useSelector } from 'react-redux';\nimport { matchPath, useLocation } from 'react-router';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { getPhysician } from 'src/api/physicians';\nimport Logo from 'src/components/Logo';\nimport { APP_VERSION } from 'src/config';\nimport { getRoleName } from 'src/utils/role';\nimport NavItem from './NavItem';\n\nconst dashboardItem = {\n title: 'Tablero de control',\n icon: PieChartIcon,\n href: '/dashboard'\n};\n\nconst adminNavConfig = [\n {\n subheader: 'Menú',\n items: [\n dashboardItem,\n {\n title: 'Consultas',\n href: '/appointments',\n icon: AssignmentIcon\n },\n {\n title: 'Disponibilidad',\n href: '/appointments/availability',\n icon: EventAvailableIcon\n }\n ]\n },\n {\n subheader: 'Administración',\n items: [\n {\n title: 'Médicos',\n href: '/physicians',\n icon: LocalHospitalIcon\n }\n ]\n }\n];\n\nconst physicianNavConfig = [\n {\n subheader: 'Menú',\n items: [\n dashboardItem,\n {\n title: 'Consultas',\n href: '/appointments',\n icon: AssignmentIcon\n },\n {\n title: 'Disponibilidad',\n href: '/appointments/availability',\n icon: EventAvailableIcon\n }\n ]\n },\n {\n subheader: 'Administración',\n items: [\n {\n title: 'Pacientes',\n href: '/patients',\n icon: FaceIcon\n }\n ]\n }\n];\n\nconst operatorNavConfig = [\n {\n subheader: 'Menú',\n items: [\n dashboardItem,\n {\n title: 'Consultas',\n href: '/appointments',\n icon: AssignmentIcon\n },\n {\n title: 'Disponibilidad',\n href: '/appointments/availability',\n icon: EventAvailableIcon\n }\n ]\n },\n {\n subheader: 'Administración',\n items: [\n {\n title: 'Pacientes',\n href: '/patients',\n icon: FaceIcon\n }\n ]\n }\n];\n\nconst patientNavConfig = [\n {\n subheader: 'Menú',\n items: [\n dashboardItem,\n {\n title: 'Consultas',\n href: '/appointments',\n icon: AssignmentIcon\n }\n ]\n }\n];\n\nconst analyticsNavConfig = [\n {\n subheader: 'Menú',\n items: [dashboardItem]\n }\n];\n\nconst monitorNavConfig = [\n {\n subheader: 'Menú',\n items: [dashboardItem]\n },\n {\n subheader: 'Administración',\n items: [\n {\n title: 'Médicos',\n href: '/physicians',\n icon: LocalHospitalIcon\n }\n ]\n }\n];\n\nfunction renderNavItems({ items, ...rest }) {\n return (\n \n {items.reduce(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n (acc, item) => reduceChildRoutes({ acc, item, ...rest }),\n []\n )}\n \n );\n}\n\nfunction reduceChildRoutes({ acc, pathname, item, depth = 0 }) {\n const key = item.title + depth;\n\n if (item.items) {\n const open = matchPath(pathname, {\n path: item.href,\n exact: false\n });\n\n acc.push(\n \n {renderNavItems({\n depth: depth + 1,\n pathname,\n items: item.items\n })}\n \n );\n } else {\n acc.push(\n \n );\n }\n\n return acc;\n}\n\nconst useStyles = makeStyles(() => ({\n mobileDrawer: {\n width: 256\n },\n desktopDrawer: {\n width: 256,\n top: 64,\n height: 'calc(100% - 64px)'\n },\n avatar: {\n cursor: 'pointer',\n width: 64,\n height: 64\n },\n helpText: {\n marginTop: '-1em'\n },\n helpButton: {\n marginTop: '1.5vmin',\n marginBottom: '1.5vmin',\n width: '90%'\n }\n}));\n\nfunction NavBar({ openMobile, onMobileClose, openDesktop }) {\n const classes = useStyles();\n const location = useLocation();\n const { user } = useSelector((state) => state.account);\n const [modalOpen, setModalOpen] = useState(false);\n const [navigationItems, setNavigationItems] = useState([]);\n const { enqueueSnackbar } = useSnackbar();\n const [physician, setPhysician] = useState(null);\n\n const handleModalOpen = () => {\n setModalOpen(true);\n };\n const handleModalClose = () => {\n setModalOpen(false);\n };\n\n useEffect(() => {\n const fetchPhysician = async (physicianId) => {\n try {\n const currentPhysician = await getPhysician(physicianId.toString());\n setPhysician(currentPhysician);\n } catch (e) {\n enqueueSnackbar(`Hubo un error cargando el médico.`, {\n variant: 'error'\n });\n }\n };\n\n if (user !== null && user.role === 'PHYSICIAN') {\n fetchPhysician(user.id);\n }\n }, [enqueueSnackbar, user]);\n\n useEffect(() => {\n if (user !== null) {\n switch (user.role) {\n case 'ADMIN':\n setNavigationItems(adminNavConfig);\n break;\n case 'PHYSICIAN':\n setNavigationItems(physicianNavConfig);\n break;\n case 'OPERATOR':\n setNavigationItems(operatorNavConfig);\n break;\n case 'PATIENT':\n setNavigationItems(patientNavConfig);\n break;\n case 'ANALYTICS':\n setNavigationItems(analyticsNavConfig);\n break;\n case 'MONITOR':\n setNavigationItems(monitorNavConfig);\n break;\n default:\n }\n }\n }, [user]);\n\n useEffect(() => {\n if (openMobile && onMobileClose) {\n onMobileClose();\n }\n // eslint-disable-next-line\n }, [location.pathname]);\n\n const content = (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {`${user.first_name} ${user.last_name}`}\n \n \n {getRoleName(user.role, physician)}\n \n \n \n \n \n {navigationItems.map((config) => (\n \n {config.subheader}\n \n }\n >\n {renderNavItems({\n items: config.items,\n pathname: location.pathname\n })}\n \n ))}\n \n \n \n \n ¿Tienes problemas técnicos?\n \n \n Asistencia técnica\n \n \n Asistencia técnica\n \n \n Puedes contactarnos en cualquier momento a través de los\n siguientes medios para recibir asistencia técnica:\n \n {/* \n • Línea Sur Occidente (Cali): (57) (2) 380 0848\n \n \n • Línea Nacional (Bogotá): (57) (1) 915 6583\n */}\n \n • Información comercial: info@teconsulto.co\n \n \n • PQRS: pqrs@teconsulto.co\n \n \n \n \n \n \n \n \n \n \n \n {`v${APP_VERSION}`}\n \n \n \n Términos y Condiciones\n \n \n \n \n Política de privacidad\n \n \n \n Powered by{' '}\n \n Inappsis\n \n \n \n \n \n \n );\n\n return (\n <>\n \n \n {content}\n \n \n \n \n {content}\n \n \n \n );\n}\n\nNavBar.propTypes = {\n onMobileClose: PropTypes.func,\n openMobile: PropTypes.bool,\n openDesktop: PropTypes.bool\n};\n\nexport default NavBar;\n","import React from 'react';\n\nfunction Logo(props) {\n return (\n \n );\n}\n\nexport default Logo;\n","import {\n Avatar,\n Box,\n ButtonBase,\n Hidden,\n makeStyles,\n Menu,\n MenuItem,\n Typography\n} from '@material-ui/core';\nimport { useSnackbar } from 'notistack';\nimport React, { useRef, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useHistory } from 'react-router';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { logout } from 'src/store/account/actions';\nimport { useCurrentUser } from 'src/store/account/selectors';\n\nconst useStyles = makeStyles((theme) => ({\n avatar: {\n height: 32,\n width: 32,\n marginRight: theme.spacing(1)\n },\n popover: {\n width: 200\n }\n}));\n\nfunction Account() {\n const classes = useStyles();\n const history = useHistory();\n const ref = useRef(null);\n const dispatch = useDispatch();\n const account = useSelector((state) => state.account);\n const currentUser = useCurrentUser();\n const { enqueueSnackbar } = useSnackbar();\n const [isOpen, setOpen] = useState(false);\n\n const handleOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n const handleLogout = async () => {\n try {\n handleClose();\n await dispatch(logout());\n history.push('/');\n } catch (error) {\n enqueueSnackbar('Unable to logout', {\n variant: 'error'\n });\n }\n };\n\n return (\n <>\n \n \n \n \n {`${account.user.first_name} ${account.user.last_name}`}\n \n \n \n \n {currentUser.role === 'PHYSICIAN' ? (\n \n Mi perfil\n \n ) : null}\n Salir\n \n \n );\n}\n\nexport default Account;\n","import {\n AppBar,\n Box,\n Hidden,\n IconButton,\n makeStyles,\n SvgIcon,\n Toolbar\n} from '@material-ui/core';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { Menu as MenuIcon } from 'react-feather';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { THEMES } from 'src/constants';\nimport LogoTop from '../../../components/LogoTop';\nimport Account from './Account';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n zIndex: theme.zIndex.drawer + 100,\n ...(theme.name === THEMES.LIGHT\n ? {\n boxShadow: 'none',\n backgroundColor: theme.palette.primary.main\n }\n : {}),\n ...(theme.name === THEMES.ONE_DARK\n ? {\n backgroundColor: theme.palette.background.default\n }\n : {})\n },\n toolbar: {\n minHeight: 64,\n paddingLeft: theme.spacing(1)\n },\n logo: {\n marginLeft: theme.spacing(1),\n display: 'flex'\n }\n}));\n\nfunction TopBar({ className, onMobileNavOpen, onDesktopNavTouch, ...rest }) {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nTopBar.propTypes = {\n className: PropTypes.string,\n onMobileNavOpen: PropTypes.func,\n onDesktopNavTouch: PropTypes.func\n};\n\nexport default TopBar;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\nimport useSettings from 'src/hooks/useSettings';\nimport NavBar from './NavBar';\nimport TopBar from './TopBar';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.palette.background.dark,\n display: 'flex',\n height: '100%',\n overflow: 'hidden',\n width: '100%'\n },\n wrapper: {\n display: 'flex',\n flex: '1 1 auto',\n overflow: 'hidden',\n paddingTop: 64\n },\n wrapperNavBarOpen: {\n [theme.breakpoints.up('lg')]: {\n paddingLeft: 256\n }\n },\n contentContainer: {\n display: 'flex',\n flex: '1 1 auto',\n overflow: 'hidden'\n },\n content: {\n flex: '1 1 auto',\n height: '100%',\n overflow: 'auto'\n }\n}));\n\nfunction DashboardLayout({ children }) {\n const classes = useStyles();\n const { settings, saveSettings } = useSettings();\n const [isMobileNavOpen, setMobileNavOpen] = useState(false);\n\n return (\n
\n setMobileNavOpen(true)}\n onDesktopNavTouch={() => saveSettings({ openNavBar: !settings.openNavBar })}\n />\n setMobileNavOpen(false)}\n openMobile={isMobileNavOpen}\n openDesktop={settings.openNavBar}\n />\n
\n
\n
\n {children}\n
\n
\n
\n
\n );\n}\n\nDashboardLayout.propTypes = {\n children: PropTypes.any\n};\n\nexport default DashboardLayout;\n","/* eslint-disable react/no-array-index-key */\nimport React, { Fragment, lazy, Suspense } from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport GuestGuard from './components/GuestGuard';\nimport LoadingScreen from './components/LoadingScreen';\nimport rolesGuard from './components/RolesGuard';\nimport DashboardLayout from './layouts/DashboardLayout';\n\ntype RoutesType = {\n exact?: boolean;\n path?: string;\n guard?: any;\n layout?: any;\n component?: any;\n routes?: RoutesType[];\n};\n\nconst routesConfig: RoutesType[] = [\n {\n exact: true,\n path: '/',\n component: () => \n },\n {\n exact: true,\n path: '/404',\n component: lazy(() => import('./views/pages/Error404View'))\n },\n {\n exact: true,\n guard: GuestGuard,\n path: '/login',\n component: lazy(() => import('./views/auth/LoginView'))\n },\n {\n exact: true,\n path: '/forgot-password',\n component: lazy(() => import('./views/auth/ForgotPasswordView'))\n },\n {\n exact: true,\n path: '/p/reset/:token',\n component: lazy(() => import('./views/auth/ResetPasswordView'))\n },\n {\n exact: true,\n path: '/privacy-policy',\n component: lazy(() => import('./views/terms/PrivacyPolicyView'))\n },\n {\n exact: true,\n path: '/TyC',\n component: lazy(() => import('./views/terms/ToSView'))\n },\n {\n path: '/dashboard',\n guard: rolesGuard([\n 'ADMIN',\n 'OPERATOR',\n 'PHYSICIAN',\n 'PATIENT',\n 'ANALYTICS',\n 'MONITOR'\n ]),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/dashboard',\n component: lazy(() => import('./views/pages/DashboardView'))\n }\n ]\n },\n {\n path: '/appointments',\n guard: rolesGuard(['ADMIN', 'OPERATOR', 'PHYSICIAN', 'PATIENT']),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/appointments/availability',\n component: lazy(() => import('./views/pages/AvailabilityView'))\n },\n {\n exact: true,\n path: '/appointments',\n component: lazy(\n () => import('./views/pages/AppointmentsView/AppointmentsList')\n )\n },\n {\n exact: true,\n path: '/appointments/:id/:tab',\n component: lazy(\n () => import('./views/pages/AppointmentsView/AppointmentsDetail')\n )\n }\n ]\n },\n {\n path: '/patients',\n guard: rolesGuard(['ADMIN', 'OPERATOR', 'PHYSICIAN']),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/patients',\n component: lazy(() => import('./views/pages/PatientsView/PatientsList'))\n },\n {\n exact: true,\n path: '/patients/:id/:tab',\n component: lazy(\n () => import('./views/pages/PatientsView/PatientsDetail')\n )\n }\n ]\n },\n {\n path: '/physicians',\n guard: rolesGuard(['ADMIN', 'MONITOR']),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/physicians',\n component: lazy(\n () => import('./views/pages/PhysiciansView/PhysiciansList')\n )\n },\n {\n exact: true,\n path: '/physicians/:id/:tab',\n component: lazy(\n () => import('./views/pages/PhysiciansView/PhysiciansDetail')\n )\n }\n ]\n },\n {\n path: '/operators',\n guard: rolesGuard(['ADMIN']),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/operators',\n component: lazy(\n () => import('./views/pages/OperatorsView/OperatorsList')\n )\n },\n {\n exact: true,\n path: '/operators/:id/:tab',\n component: lazy(\n () => import('./views/pages/OperatorsView/OperatorsDetail')\n )\n }\n ]\n },\n {\n path: '/account',\n guard: rolesGuard(['PHYSICIAN']),\n layout: DashboardLayout,\n routes: [\n {\n exact: true,\n path: '/account',\n component: lazy(() => import('./views/pages/AccountView'))\n }\n ]\n },\n {\n exact: true,\n path: '/v/:sessionId',\n component: lazy(() => import('./views/lobby'))\n },\n {\n exact: true,\n path: '/checkout/copago/:sessionId',\n component: lazy(() => import('./views/checkout/CopagoView'))\n },\n {\n exact: true,\n path: '/checkout/consulta/:sessionId',\n component: lazy(() => import('./views/checkout/AppointmentView'))\n },\n {\n exact: true,\n path: '/p/appointments/:sessionId/cancel',\n component: lazy(() => import('./views/appointments'))\n },\n {\n exact: true,\n path: '/agendar-consulta/:slug',\n component: lazy(() => import('./views/selfservice/SelfScheduleView'))\n },\n {\n exact: true,\n path: '/perfil/:slug',\n component: lazy(() => import('./views/physicianspage'))\n },\n {\n path: '*',\n guard: GuestGuard,\n routes: [\n {\n component: () => \n }\n ]\n }\n];\n\nconst renderRoutes = (routes: RoutesType[]) =>\n routes ? (\n }>\n \n {routes.map((route, i) => {\n const Guard = route.guard || Fragment;\n const Layout = route.layout || Fragment;\n const Component = route.component;\n\n return (\n (\n \n \n {route.routes ? (\n renderRoutes(route.routes)\n ) : (\n \n )}\n \n \n )}\n />\n );\n })}\n \n \n ) : null;\n\nfunction Routes() {\n return renderRoutes(routesConfig);\n}\n\nexport default Routes;\n","import React from 'react';\nimport { Router } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport { create } from 'jss';\nimport rtl from 'jss-rtl';\nimport MomentUtils from '@date-io/moment';\nimport { SnackbarProvider } from 'notistack';\nimport {\n createStyles,\n jssPreset,\n makeStyles,\n StylesProvider,\n ThemeProvider\n} from '@material-ui/core';\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\nimport Auth from './components/Auth';\nimport CookiesNotification from './components/CookiesNotification';\nimport GoogleAnalytics from './components/GoogleAnalytics';\nimport ScrollReset from './components/ScrollReset';\nimport useSettings from './hooks/useSettings';\nimport { createTheme } from './theme';\nimport Routes from './Routes';\n\nconst history = createBrowserHistory();\nconst jss = create({ plugins: [...jssPreset().plugins, rtl()] });\n\nconst useStyles = makeStyles(() =>\n createStyles({\n '@global': {\n '*': {\n boxSizing: 'border-box',\n margin: 0,\n padding: 0\n },\n html: {\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n height: '100%',\n width: '100%'\n },\n body: {\n height: '100%',\n width: '100%'\n },\n '#root': {\n height: '100%',\n width: '100%'\n }\n }\n })\n);\n\nfunction App() {\n useStyles();\n\n const { settings } = useSettings();\n\n return (\n \n \n \n \n \n \n \n \n \n {/* */}\n \n \n \n \n \n \n \n );\n}\n\nexport default App;\n","/** @jsxRuntime classic */\n// IE11 needs \"jsxRuntime classic\" for this initial file which means that \"React\" needs to be in scope\n// issue: https://github.com/facebook/create-react-app/issues/9906\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n\nimport 'core-js/stable';\nimport { enableES5 } from 'immer';\nimport moment from 'moment';\nimport 'moment/locale/es';\nimport 'nprogress/nprogress.css';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\nimport 'react-perfect-scrollbar/dist/css/styles.css';\nimport 'react-quill/dist/quill.snow.css';\nimport { Provider } from 'react-redux';\nimport { SettingsProvider } from 'src/context/SettingsContext';\nimport * as serviceWorker from 'src/serviceWorker';\nimport { configureStore } from 'src/store';\nimport { restoreSettings } from 'src/utils/settings';\nimport App from './App';\n\nmoment.locale('es');\nenableES5();\n\nconst store = configureStore();\nconst settings = restoreSettings();\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n\nserviceWorker.unregister();\n","import ky from 'ky';\nimport { API_PREFIX } from 'src/config';\nimport store from 'src/store';\nimport { logout } from 'src/store/account/actions';\nimport { getAuthToken } from 'src/utils/auth';\n\nconst api = ky.create({\n timeout: false,\n prefixUrl: API_PREFIX,\n hooks: {\n beforeRequest: [\n async (request) => {\n const token = getAuthToken();\n if (token) {\n request.headers.set('Authorization', `Bearer ${token}`);\n }\n }\n ],\n afterResponse: [\n async (request, options, response) => {\n if (\n !request.url.includes('login') &&\n // response.status === 400 ||\n (response.status === 401 || response.status === 403)\n ) {\n await store.dispatch(logout());\n window.location.href = '/';\n }\n }\n ]\n }\n});\n\nexport default api;\n","import jwtDecode from 'jwt-decode';\nimport {\n createLogo,\n createPhoto,\n loginUser,\n updatePasswordRequest,\n updateProfileRequest\n} from 'src/api/auth';\nimport {\n deleteAuthToken,\n getAuthToken,\n setAuthToken,\n setUser\n} from 'src/utils/auth';\nimport { ThunkResult } from '..';\nimport {\n AccountState,\n LOGIN_FAILURE,\n LOGIN_REQUEST,\n LOGIN_SUCCESS,\n LOGOUT,\n SILENT_LOGIN,\n UPDATE_LOGO,\n UPDATE_PASSWORD,\n UPDATE_PHOTO,\n UPDATE_PROFILE\n} from './types';\n\nexport function login(\n username: string,\n password: string\n): ThunkResult> {\n return async (dispatch) => {\n try {\n dispatch({ type: LOGIN_REQUEST });\n\n const userToken = await loginUser(username, password);\n setAuthToken(userToken.token);\n const user = jwtDecode(userToken.token);\n setUser(user);\n\n dispatch({\n type: LOGIN_SUCCESS,\n payload: {\n user\n }\n });\n } catch (error) {\n dispatch({ type: LOGIN_FAILURE });\n throw error;\n }\n };\n}\n\nexport function setUserData(user: AccountState['user']): ThunkResult {\n return (dispatch) =>\n dispatch({\n type: SILENT_LOGIN,\n payload: {\n user\n }\n });\n}\n\nexport function logout(): ThunkResult> {\n return async (dispatch) => {\n deleteAuthToken();\n dispatch({\n type: LOGOUT\n });\n };\n}\n\nexport function updateProfile(\n update: Partial\n): ThunkResult> {\n return async (dispatch) => {\n const user = await updateProfileRequest(update);\n dispatch({\n type: UPDATE_PROFILE,\n payload: {\n user\n }\n });\n };\n}\n\nexport function updatePassword(update: string): ThunkResult {\n return async (dispatch) => {\n await updatePasswordRequest(update);\n dispatch({\n type: UPDATE_PASSWORD\n });\n };\n}\n\nexport function updatePhoto(obj: User, photo: string): ThunkResult {\n return async (dispatch) => {\n const authToken = getAuthToken();\n let user = null;\n if (authToken) {\n user = jwtDecode(authToken);\n user.logo = obj.logo;\n user.photo = photo;\n }\n setUser(user);\n dispatch({\n type: UPDATE_PHOTO,\n payload: {\n user\n }\n });\n };\n}\n\nexport function updateLogo(obj: User, logo: string): ThunkResult {\n return async (dispatch) => {\n const authToken = getAuthToken();\n let user = null;\n if (authToken) {\n user = jwtDecode(authToken);\n user.photo = obj.photo;\n user.logo = logo;\n }\n setUser(user);\n dispatch({\n type: UPDATE_PHOTO,\n payload: {\n user\n }\n });\n };\n}\n","export const APP_VERSION = '1.1.55';\nexport const API_PREFIX = `${process.env.REACT_APP_API_SERVER_URL}`;\nexport const SOCKET_URL = `${process.env.REACT_APP_API_SOCKET_URL}`;\nexport const ENABLE_REDUX_LOGGER = false;\n","import { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { AppState } from '..';\nimport { AccountState } from './types';\n\nexport const useCurrentUser = () => {\n const accountState = useSelector(\n (state) => state.account\n );\n\n return useMemo(() => accountState.user || null, [accountState.user]);\n};\n","import { makeStyles } from '@material-ui/core';\nimport React from 'react';\n\nconst useStyles = makeStyles((theme) => ({\n logo: {\n maxHeight: 110,\n maxWidth: '90%',\n alignSelf: 'center',\n [theme.breakpoints.down('sm')]: {\n maxHeight: 90\n }\n }\n}));\n\nfunction Logo(props) {\n const classes = useStyles();\n\n return (\n \n );\n}\n\nexport default Logo;\n","import client from 'src/utils/client';\nimport { AccountState } from '../store/account/types';\n\ntype LoginType = (username: string, password: string) => Promise;\ntype UpdateUserType = (update: Partial) => Promise;\ntype UpdateStringType = (update: string) => Promise;\ntype UpdateFormDataType = (update: FormData) => Promise;\n\nexport const loginUser: LoginType = (username, password) =>\n client\n .post('login', {\n json: {\n email: username,\n password\n }\n })\n .json();\n\nexport const updateProfileRequest: UpdateUserType = (update) =>\n client\n .patch('/auth/me', {\n json: {\n update\n }\n })\n .json();\n\nexport const updatePasswordRequest: UpdateStringType = (update) =>\n client\n .post('/auth/me/set-password', {\n json: {\n update\n }\n })\n .json();\n\nexport const updatePhotoRequest: UpdateFormDataType = (update) =>\n client\n .post('/auth/set-photo', {\n body: update\n })\n .json();\n\ntype CreatePhotoType = (formData: FormData) => Promise;\nexport const createPhoto: CreatePhotoType = (formData) =>\n client.post('photo', { body: formData }).json();\n\ntype CreateLogoType = (formData: FormData) => Promise;\nexport const createLogo: CreateLogoType = (formData) =>\n client.post('physicians/logo', { body: formData }).json();\n","/* eslint-disable no-param-reassign */\nimport produce from 'immer';\nimport {\n LOGIN_FAILURE,\n LOGIN_REQUEST,\n LOGIN_SUCCESS,\n LOGOUT,\n SILENT_LOGIN,\n UPDATE_PHOTO,\n UPDATE_LOGO,\n UPDATE_PROFILE,\n AccountState,\n AccountActionTypes\n} from './types';\n\nconst initialState: AccountState = {\n user: null\n};\n\nconst accountReducer = (state = initialState, action: AccountActionTypes) => {\n switch (action.type) {\n case LOGIN_REQUEST: {\n return produce(state, (draft) => {\n // Ensure we clear current session\n draft.user = null;\n });\n }\n\n case LOGIN_SUCCESS: {\n const { user } = action.payload;\n\n return produce(state, (draft) => {\n draft.user = user;\n });\n }\n\n case LOGIN_FAILURE: {\n return produce(state, () => {\n // Maybe store error\n });\n }\n\n case LOGOUT: {\n return produce(state, (draft) => {\n draft.user = null;\n });\n }\n\n case SILENT_LOGIN: {\n const { user } = action.payload;\n\n return produce(state, (draft) => {\n draft.user = user;\n });\n }\n\n case UPDATE_PROFILE: {\n const { user } = action.payload;\n\n return produce(state, (draft) => {\n draft.user = user;\n });\n }\n\n case UPDATE_PHOTO: {\n const { user } = action.payload;\n\n return produce(state, (draft) => {\n draft.user = user;\n });\n }\n\n default: {\n return state;\n }\n }\n};\n\nexport default accountReducer;\n","/* eslint-disable import/prefer-default-export */\nimport { applyMiddleware, combineReducers, createStore } from 'redux';\nimport reduxThunk, { ThunkAction, ThunkMiddleware } from 'redux-thunk';\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport { createLogger } from 'redux-logger';\nimport { ENABLE_REDUX_LOGGER } from 'src/config';\nimport accountReducer from './account/reducers';\nimport { AccountActionTypes } from './account/types';\n\nconst loggerMiddleware = createLogger();\n\nconst rootReducer = combineReducers({\n account: accountReducer\n});\n\nexport type AppState = ReturnType;\nexport type AppActions = AccountActionTypes;\nexport type ThunkResult = ThunkAction;\n\nexport function configureStore(preloadedState = {}) {\n const thunkMiddleware = reduxThunk as ThunkMiddleware;\n let middleware = applyMiddleware(thunkMiddleware);\n if (ENABLE_REDUX_LOGGER) {\n middleware = applyMiddleware(thunkMiddleware, loggerMiddleware);\n }\n const middlewareEnhancer = composeWithDevTools(middleware);\n return createStore(rootReducer, preloadedState, middlewareEnhancer);\n}\n\nexport default configureStore();\n","import client from 'src/utils/client';\n\ntype GetPhysicianType = (physicianId: string) => Promise;\nexport const getPhysician: GetPhysicianType = (physicianId) =>\n client.get(`physicians/${physicianId}`).json();\nexport const getPhysicianSpecialties: GetPhysicianType = (physicianId) =>\n client.get(`physicians/${physicianId}/specialties`).json();\n\ntype GetPhysiciansType = (\n searchParams?: QueryParams\n) => Promise>;\nexport const getPhysicians: GetPhysiciansType = (searchParams) =>\n client.get(`physicians`, { searchParams }).json();\n\ntype CreatePhysicianType = (physician: BasePhysician) => Promise;\nexport const createPhysician: CreatePhysicianType = (physician) =>\n client.post(`physicians`, { json: physician }).json();\n\ntype GetPublicInfoType = (slug: string) => Promise;\nexport const getPublicInfo: GetPublicInfoType = (slug) =>\n client.get(`physicians/${slug}/public`).json();\n\ntype DeletePhysicianType = (physicianId: number) => Promise;\nexport const deletePhysician: DeletePhysicianType = (physicianId) =>\n client.delete(`physicians/${physicianId}`).json();\n\ntype UpdatePhysicianType = (\n physicianId: number,\n physician: Partial\n) => Promise;\nexport const updatePhysician: UpdatePhysicianType = (physicianId, physician) =>\n client.put(`physicians/${physicianId}`, { json: physician }).json();\n\ntype UpdatePhysicianPasswordType = (password: string) => Promise;\nexport const updatePhysicianPassword: UpdatePhysicianPasswordType = (\n password\n) => client.put('login/update', { json: password }).json();\n\ntype GetPhysicianAvailabilitiesType = (\n physicianId: number\n) => Promise;\nexport const getPhysicianAvailabilities: GetPhysicianAvailabilitiesType = (\n physicianId\n) => client.get(`physicians/${physicianId}/availabilities`).json();\n\ntype GetPhysicianTypeSlotType = (\n physicianId: number\n) => Promise;\nexport const getPhysicianTimeSlot: GetPhysicianTypeSlotType = (physicianId) =>\n client.get(`physicians/${physicianId}/time-slot`).json();\n\ntype GetPhysiciansAvailabilitiesType = () => Promise;\nexport const getPhysiciansAvailabilities: GetPhysiciansAvailabilitiesType = () =>\n client.get(`physicians/availabilities`).json();\n\ntype GetLicenseByPhysicianId = (id: number) => Promise;\nexport const getLicenseByPhysicianId: GetLicenseByPhysicianId = (id) =>\n client.get(`physicians/${id}/license`).json();\n\ntype GetPhysiciansExcel = (searchParams?: QueryParams) => Promise;\nexport const getPhysiciansExcel: GetPhysiciansExcel = (searchParams) =>\n client.get(`physician/excel`, { searchParams }).blob();\n\ntype AddPhysicianLicenseRenew = (physicianId: number) => Promise;\nexport const addPhysicianLicenseRenew: AddPhysicianLicenseRenew = (\n physicianId\n) => client.post(`physicians/${physicianId}/license/renew`).json();\n\ntype ResetPhysicianPassword = (physicianId: number) => Promise;\nexport const getPhysicianPasswordReset: ResetPhysicianPassword = (\n physicianId\n) => client.get(`physicians/${physicianId}/reset`).json();\n\ntype AddPhysicianAcademicType = (\n academic: PhysicianAcademics\n) => Promise;\nexport const createPhysicianAcademic: AddPhysicianAcademicType = (academic) =>\n client.post(`physician/academic`, { json: academic }).json();\n\ntype GetPhysicianAcademicType = () => Promise;\nexport const getPhysicianAcademic: GetPhysicianAcademicType = () =>\n client.get('physician/academic').json();\n\ntype GetPublicInfoAcademicType = (\n slug: string\n) => Promise;\nexport const getPublicInfoAcademics: GetPublicInfoAcademicType = (slug) =>\n client.get(`physicians/${slug}/public/academics`).json();\n\ntype GetPublicInfoLanguageType = (\n slug: string\n) => Promise;\nexport const getPublicInfoLanguages: GetPublicInfoLanguageType = (slug) =>\n client.get(`physicians/${slug}/public/languages`).json();\n\ntype GetPublicInfoLinkType = (slug: string) => Promise;\nexport const getPublicInfoLinks: GetPublicInfoLinkType = (slug) =>\n client.get(`physicians/${slug}/public/links`).json();\n\ntype GetPublicInfoMediaType = (slug: string) => Promise;\nexport const getPublicInfoMedias: GetPublicInfoMediaType = (slug) =>\n client.get(`physicians/${slug}/public/medias`).json();\n\ntype UpdatePhysicianAcademicType = (\n id: number,\n academic: PhysicianAcademics\n) => Promise;\nexport const updatePhysicianAcademic: UpdatePhysicianAcademicType = (\n id,\n academic\n) => client.put(`physician/academic/${id}`, { json: academic }).json();\n\ntype DeletePhysicianAcademicType = (id: number) => Promise;\nexport const deletePhysicianAcademic: DeletePhysicianAcademicType = (id) =>\n client.delete(`physician/academic/${id}`).json();\n\ntype AddPhysicianLanguageType = (\n language: PhysicianLanguages\n) => Promise;\nexport const createPhysicianLanguage: AddPhysicianLanguageType = (language) =>\n client.post(`physician/language`, { json: language }).json();\n\ntype GetPhysicianLanguageType = () => Promise;\nexport const getPhysicianLanguage: GetPhysicianLanguageType = () =>\n client.get('physician/language').json();\n\ntype UpdatePhysicianLanguageType = (\n id: number,\n language: PhysicianLanguages\n) => Promise;\nexport const updatePhysicianLanguage: UpdatePhysicianLanguageType = (\n id,\n language\n) => client.put(`physician/language/${id}`, { json: language }).json();\n\ntype DeletePhysicianLanguageType = (id: number) => Promise;\nexport const deletePhysicianLanguage: DeletePhysicianLanguageType = (id) =>\n client.delete(`physician/language/${id}`).json();\n\ntype AddPhysicianLinkType = (link: PhysicianLinks) => Promise;\nexport const createPhysicianLink: AddPhysicianLinkType = (link) =>\n client.post(`physician/link`, { json: link }).json();\n\ntype GetPhysicianLinkType = () => Promise;\nexport const getPhysicianLink: GetPhysicianLinkType = () =>\n client.get('physician/link').json();\n\ntype UpdatePhysicianLinkType = (\n id: number,\n link: PhysicianLinks\n) => Promise;\nexport const updatePhysicianLink: UpdatePhysicianLinkType = (id, link) =>\n client.put(`physician/link/${id}`, { json: link }).json();\n\ntype DeletePhysicianLinkType = (id: number) => Promise;\nexport const deletePhysicianLink: DeletePhysicianLinkType = (id) =>\n client.delete(`physician/link/${id}`).json();\n\ntype AddPhysicianMediaType = (\n link: PhysicianMedias\n) => Promise;\nexport const createPhysicianMedia: AddPhysicianMediaType = (media) =>\n client.post(`physician/media`, { json: media }).json();\n\ntype AddPhysicianMediaPhotoType = (\n formData: FormData\n) => Promise;\nexport const createPhysicianMediaPhoto: AddPhysicianMediaPhotoType = (\n formData\n) => client.post('physician/media/photo', { body: formData }).json();\n\ntype GetPhysicianMediaType = () => Promise;\nexport const getPhysicianMedia: GetPhysicianMediaType = () =>\n client.get('physician/media').json();\n\ntype UpdatePhysicianMediaType = (\n id: number,\n media: PhysicianMedias\n) => Promise;\nexport const updatePhysicianMedia: UpdatePhysicianMediaType = (id, media) =>\n client.put(`physician/media/${id}`, { json: media }).json();\n\ntype DeletePhysicianMediaType = (id: number) => Promise;\nexport const deletePhysicianMedia: DeletePhysicianMediaType = (id) =>\n client.delete(`physician/media/${id}`).json();\n","export interface AccountState {\n user: User | null;\n}\n\nexport const LOGIN_REQUEST = '@account/login-request';\nexport const LOGIN_SUCCESS = '@account/login-success';\nexport const LOGIN_FAILURE = '@account/login-failure';\nexport const SILENT_LOGIN = '@account/silent-login';\nexport const LOGOUT = '@account/logout';\nexport const UPDATE_PROFILE = '@account/update-profile';\nexport const UPDATE_PASSWORD = '@account/update-password';\nexport const UPDATE_PHOTO = '@account/update-photo';\nexport const UPDATE_LOGO = '@account/update-logo';\n\ninterface LoginRequestAction {\n type: typeof LOGIN_REQUEST;\n}\n\ninterface LoginFailureAction {\n type: typeof LOGIN_FAILURE;\n}\n\ninterface LoginSuccessAction {\n type: typeof LOGIN_SUCCESS;\n payload: AccountState;\n}\n\ninterface SilentLoginAction {\n type: typeof SILENT_LOGIN;\n payload: AccountState;\n}\n\ninterface LogoutAction {\n type: typeof LOGOUT;\n}\n\ninterface UpdateProfileAction {\n type: typeof UPDATE_PROFILE;\n payload: AccountState;\n}\n\ninterface UpdatePasswordAction {\n type: typeof UPDATE_PASSWORD;\n}\n\ninterface UpdatePhotoAction {\n type: typeof UPDATE_PHOTO;\n payload: AccountState;\n}\n\nexport type AccountActionTypes =\n | LoginRequestAction\n | LoginFailureAction\n | LoginSuccessAction\n | SilentLoginAction\n | LogoutAction\n | UpdateProfileAction\n | UpdatePasswordAction\n | UpdatePhotoAction;\n","import JwtDecode from 'jwt-decode';\n\nexport const setAuthToken = (token: string) =>\n localStorage.setItem('token', token);\n\nexport const setUser = (user: User | null) =>\n localStorage.setItem('user', JSON.stringify(user));\n\nexport const setLicenseVerify = (expiration: String | null) =>\n localStorage.setItem('license_verify', JSON.stringify(expiration));\n\nexport const getAuthToken = () => localStorage.getItem('token');\n\nexport const getLicenseVerify = () => localStorage.getItem('license_verify');\n\nexport const getUser = () => localStorage.getItem('user');\n\nexport const deleteAuthToken = () => localStorage.removeItem('token');\n\nexport const isVerifyLicense = () => {\n const license = getLicenseVerify();\n if (license === null) {\n return false;\n }\n const lastVerify: string = license;\n return new Date(lastVerify) !== new Date();\n};\n\nexport const isValidToken = () => {\n const token = getAuthToken();\n if (token === null) {\n return false;\n }\n const decoded = JwtDecode(token);\n const currentTime = Date.now() / 1000;\n\n return decoded.exp > currentTime;\n};\n"],"sourceRoot":""}