{"version":3,"sources":["utils.js","components/PageTitle.jsx","style.js","components/RoutedAlert.jsx","Login.jsx","components/RTL.jsx","components/Copyright.jsx","components/Theme.jsx","components/CenterContent.jsx","ForgotPassword.jsx","Register.jsx","ResetPassword.jsx","components/RedirectIfLoggedIn.jsx","Logout.jsx","App.js","Apollo.js","index.js"],"names":["redirect","appendHome","URLSearchParams","window","location","search","get","redirectTo","urlObject","URL","document","referrer","pathname","toString","href","decodeURI","process","PageTitle","title","useEffect","length","Typography","component","variant","align","style","marginBottom","dangerouslySetInnerHTML","__html","replace","useAuthStyles","makeStyles","theme","paper","padding","spacing","display","flexDirection","alignItems","avatar","margin","width","height","form","marginTop","submit","submitLabel","fontSize","justifyContent","gap","RoutedAlert","message","split","type","key","includes","Alert","severity","lineHeight","textAlign","l1","LOGIN","gql","validationSchema","Yup","shape","identifier","required","emailRequired","email","validEmail","password","passwordRequired","cookies","Cookies","Login","useState","rememberMe","setRememberMe","useMutation","onError","err","console","error","onCompleted","data","cookieParams","domain","path","maxAge","set","login","jwt","loading","classes","Container","maxWidth","CssBaseline","className","Avatar","src","Box","to","notRegistered","logIn","initialValues","onSubmit","values","variables","handleBlur","touched","handleChange","errors","handleSubmit","e","preventDefault","TextField","fullWidth","InputProps","direction","label","name","autoComplete","autoFocus","onBlur","onKeyUp","onChange","value","Boolean","helperText","forgotPassword","color","graphQLErrors","extensions","exception","messages","id","accountNotActivated","invalidCredentials","errorLogginIn","FormControlLabel","control","Checkbox","checked","inputProps","target","rememberme","Button","disabled","Object","keys","CircularProgress","size","jss","create","plugins","jssPreset","rtl","RTL","props","StylesProvider","children","Copyright","pt","pb","gridRowGap","Date","getFullYear","Link","copyright","responsiveFontSizes","createTheme","palette","primary","main","secondary","typography","fontFamily","join","Theme","ThemeProvider","CenterContent","minHeight","FORGOT_PASSWORD","ForgotPassword","history","useHistory","emailChanged","setEmailChanged","push","log","backToLogin","passwordSupport","comoponent","enterEmailToReceiveLink","noUserWithEmail","forgotPasswordError","requestPasswordReset","CHECK_USERNAME_AVAILABILTY","CHECK_EMAIL_AVAILABILTY","REGISTER","fullname","fieldRequired","test","fullNamePlease","trim","username","min","usernameTooShort","max","usernameTooLong","validUsername","match","min6","tooLong","passwordConfirmation","oneOf","passwordsDoNotMatch","acceptedTermsOfService","isTrue","Register","usernameChanged","setUsernameChanged","useLazyQuery","checkUsernameAvailability","usernameCheck","checkEmailAvailability","emailCheck","REACT_APP_NO_EMAIL_CONFIRMATION","registerError","register","registering","alreadyRegistered","registerNewAccount","validateOnChange","fullName","endAdornment","InputAdornment","position","Close","Check","isUsernameAvailable","errorWhileChecking","usernameIsTaken","isEmailAvailable","emailIsTaken","mt","errorRegistering","UsernameAvailable","EmailAvailable","RESET_PASSWORD","ResetPassword","resetPassword","user","code","enterNewPasswordTwice","newPassword","confirmNewPassword","resetPasswordError","RedirectIfLoggedIn","isLoggedIn","Fragment","setLoggedOut","fetch","then","res","status","catch","finally","Logout","loggedOut","remove","logoutFromAcademy","loggedOutFrom","redirectInShortMoment","ifYouCantWait","backToHomePage","App","exact","Apollo","errorLink","networkError","forEach","locations","httpLink","createHttpLink","uri","client","ApolloClient","link","ApolloLink","from","cache","InMemoryCache","addTypename","defaultOptions","watchQuery","fetchPolicy","errorPolicy","query","ApolloProvider","ReactDOM","render","getElementById"],"mappings":"sWAMO,SAASA,IAEd,IAAMC,EAAa,IAAIC,gBAAgBC,OAAOC,SAASC,QAAQC,IAAI,UAC/DC,EAAa,IAAIL,gBAAgBC,OAAOC,SAASC,QAAQC,IAAI,eACjE,GAAIL,EAAY,CACd,IAAIO,EAAY,IAAIC,IAAIC,SAASC,UACjCH,EAAUI,SAAWX,GAAqC,MAAvBO,EAAUI,SAAmB,QAAUJ,EAAUI,SACpFL,EAAaC,EAAUK,WAEzBV,OAAOC,SAASU,KAAOC,UAAUR,GAAcS,0B,WCblC,SAASC,EAAT,GAA6B,IAATC,EAAQ,EAARA,MAOjC,OANAC,qBACE,WACET,SAASQ,MAAT,UAAyB,OAAL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FnM,OAGnFiM,GAAcvM,QAAQ4G,IAAR,2BAAgC2F,OAG9CG,EAAWC,aAAe,CAC9BC,IAAK9Q,2CAID+Q,EAAS,IAAIC,KAAa,CAC9BC,KAAMC,KAAWC,KAAK,CAACX,EAAWI,IAClCQ,MAAO,IAAIC,KAAc,CACvBC,aAAa,IAEfC,eAAe,CACbC,WAAY,CACVC,YAAa,WACbC,YAAa,UAEfC,MAAO,CACLF,YAAa,WACbC,YAAa,UAInB,OAAO,cAACE,GAAA,EAAD,CAAgBb,OAAQA,EAAxB,SAAiC9H,KC9B1C4I,IAASC,OACP,cAAC,GAAD,UACE,cAAC,GAAD,MAEFpS,SAASqS,eAAe,U","file":"static/js/main.694d919c.chunk.js","sourcesContent":["import Cookies from \"universal-cookie\";\n\nexport function isLoggedIn(){\n return new Cookies().get('token')?.split('.').length === 3\n}\n\nexport function redirect(){\n // get and format redirect url\n const appendHome = new URLSearchParams(window.location.search).get('center');\n let redirectTo = new URLSearchParams(window.location.search).get('redirect_to');\n if (appendHome) {\n let urlObject = new URL(document.referrer);\n urlObject.pathname = appendHome && urlObject.pathname === '/' ? '/home' : urlObject.pathname;\n redirectTo = urlObject.toString()\n }\n window.location.href = decodeURI(redirectTo || process.env.REACT_APP_WEBSITE_URL);\n}","import { Typography } from '@material-ui/core'\nimport { useEffect } from 'react'\nexport default function PageTitle({title}) {\n useEffect (\n () => {\n document.title = `${title?.length ? title +' | ' : ''}${process.env.REACT_APP_PLATFORM_NAME}`\n },\n [title]\n )\n return (\n ')}}\n />\n )\n}","import { makeStyles } from \"@material-ui/core\"\n\nexport const useAuthStyles = makeStyles((theme) => ({\n paper: {\n padding: theme.spacing(2),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n avatar: {\n margin: theme.spacing(1),\n width: 72,\n height: 72,\n },\n form: {\n width: '100%', // Fix IE 11 issue.\n marginTop: theme.spacing(1),\n },\n submit: {\n margin: theme.spacing(3, 0, 2),\n },\n submitLabel:{\n fontSize: theme.spacing(2.5),\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"12px !important\",\n }\n}));","import { l1 } from '../local.json'\nimport Alert from '@material-ui/lab/Alert';\n\nexport default function RoutedAlert(){\n const message = new URLSearchParams(window.location.search).get('message')?.split('.')\n if(message?.length !== 2) {\n return null;\n }\n \n let [type, key] = message;\n type = ['info', 'success', 'error'].includes(type) ? type : 'info';\n return (\n \n {l1[key]}\n \n )\n}","/* eslint-disable no-restricted-globals */\nimport React, { useState } from 'react';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\nimport { Box, CircularProgress } from '@material-ui/core';\nimport { Link } from 'react-router-dom';\nimport { gql, useMutation } from '@apollo/client';\nimport * as Yup from 'yup';\nimport { Formik } from 'formik';\nimport { l1 } from './local.json';\nimport Cookies from 'universal-cookie';\nimport { redirect } from './utils';\nimport PageTitle from './components/PageTitle';\nimport { useAuthStyles } from './style';\nimport RoutedAlert from './components/RoutedAlert';\n\nconst LOGIN = gql`\n mutation Login($identifier: String!, $password: String!) {\n login(input: { identifier: $identifier, password: $password }) {\n jwt\n user {\n username\n id\n confirmed\n }\n }\n }\n`;\n\nconst validationSchema = Yup.object().shape({\n identifier: Yup.string()\n .required(l1.emailRequired)\n .email(l1.validEmail),\n password: Yup.string()\n .required(l1.passwordRequired),\n});\n\nconst cookies = new Cookies();\n\nexport default function Login() {\n const [rememberMe, setRememberMe] = useState(true)\n\n const [login, {loading, error}] = useMutation(LOGIN, {\n onError: (err) => {\n console.error(err)\n },\n onCompleted: (data) => {\n let cookieParams = {\n domain: process.env.REACT_APP_SESSION_COOKIE_DOMAIN || 'localhost',\n path: '/',\n }\n if(rememberMe){\n cookieParams.maxAge = 3600*24*28// Cookie alive for 28 days\n }\n cookies.set('token', data.login.jwt, cookieParams);\n redirect()\n },\n });\n\n const classes = useAuthStyles();\n \n return (\n \n \n \n
\n
\n \n {l1.notRegistered}\n \n \n
\n\n
\n\n
{\n login({\n variables: {\n identifier: values.identifier,\n password: values.password,\n },\n });\n }}\n >\n {({ handleBlur, values, touched, handleChange, errors, handleSubmit }) => (\n \n )}\n \n
\n \n );\n}\n","import { create } from 'jss';\nimport rtl from 'jss-rtl';\nimport { StylesProvider, jssPreset } from '@material-ui/core/styles';\n\n// Configure JSS\nconst jss = create({ plugins: [...jssPreset().plugins, rtl()] });\n\nexport default function RTL(props) {\n return (\n \n {props.children}\n \n );\n}","import { Box, Link, Typography } from \"@material-ui/core\";\nimport { BiCopyright } from \"react-icons/bi\";\nimport {l1} from \"../local.json\"\nexport default function Copyright(){\n return (\n \n \n \n {new Date().getFullYear()}{' '}\n {process.env.REACT_APP_PLATFORM_NAME}\n {' - '}\n {l1.copyright}\n \n \n )\n }","import { createTheme, responsiveFontSizes, ThemeProvider } from '@material-ui/core';\n\nconst theme = responsiveFontSizes(\n createTheme({\n direction: 'rtl',\n palette: {\n primary: {\n main: \"#002366\"\n },\n secondary: {\n main: \"#b23434\"\n }\n },\n typography: {\n fontFamily: ['\"Open Sans\"', \"Cairo\", \"Roboto\"].join(\",\"),\n }\n })\n);\n\n\nexport default function Theme(props) {\n return (\n \n {props.children}\n \n );\n}","import { Box } from \"@material-ui/core\";\nexport default function CenterContent({children}){\n return (\n \n {children}\n \n )\n }","/* eslint-disable no-restricted-globals */\nimport React, { useState } from 'react';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\nimport { Box, CircularProgress} from '@material-ui/core';\nimport { Link, useHistory } from 'react-router-dom';\nimport { gql, useMutation } from '@apollo/client';\nimport * as Yup from 'yup';\nimport { Formik } from 'formik';\nimport { l1 } from './local.json';\nimport PageTitle from './components/PageTitle';\nimport { useAuthStyles } from './style';\n\nconst FORGOT_PASSWORD = gql`\n mutation ForgotPassword($email: String!) {\n forgotPassword(email: $email) {\n ok\n }\n}\n\n`;\n\nconst validationSchema = Yup.object().shape({\n email: Yup.string()\n .required(l1.emailRequired)\n .email(l1.validEmail),\n});\n\nexport default function ForgotPassword() {\n const history = useHistory();\n const [emailChanged, setEmailChanged] = useState(false);\n const [forgotPassword, {loading, error, }] = useMutation(FORGOT_PASSWORD, {\n onCompleted: (data) => { \n setEmailChanged(false);\n history.push('/?message=success.passwordResetEmailSent');\n },\n onError: (err) => { console.log(err); setEmailChanged(false)},\n });\n window.err = error\n const classes = useAuthStyles();\n \n return (\n \n \n \n
\n
\n \n {l1.backToLogin}\n \n \n
\n
\n {l1.enterEmailToReceiveLink}\n \n\n
{\n forgotPassword({\n variables: {\n email: values.email,\n },\n });\n }}\n >\n {({ handleBlur, values, touched, handleChange, errors, handleSubmit }) => (\n \n )}\n \n
\n \n );\n}\n","import React, { useState } from 'react';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\nimport {Link, useHistory} from 'react-router-dom';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\nimport { l1 } from './local.json';\nimport { gql, useLazyQuery, useMutation } from '@apollo/client';\nimport * as Yup from 'yup';\nimport { Formik } from 'formik';\nimport { Box, Checkbox, CircularProgress, FormControlLabel, InputAdornment } from '@material-ui/core';\nimport PageTitle from './components/PageTitle';\nimport { useAuthStyles } from './style';\nimport {Check, Close} from '@material-ui/icons';\n\nconst CHECK_USERNAME_AVAILABILTY = gql`\n query checkUsernameAvailability($username: String!){\n isUsernameAvailable(username:$username)\n }\n`;\nconst CHECK_EMAIL_AVAILABILTY = gql`\n query checkEmailAvailability($email: String!){\n isEmailAvailable(email:$email)\n }\n`;\nconst REGISTER = gql`\n mutation Register($fullname: String!, $username: String!, $email: String!, $password: String!) {\n register(input: { fullname: $fullname, username: $username, email: $email, password: $password }) {\n jwt\n user {\n email\n username\n fullname\n }\n }\n }\n`;\n\nconst validationSchema = Yup.object().shape({\n fullname: Yup.string()\n .required(l1.fieldRequired)\n .test({\n message: l1.fullNamePlease,\n test: (value) => (value?.length >= 5 && value.trim().split(' ').length > 1),\n }),\n username: Yup.string()\n .required(l1.fieldRequired)\n .min(3, l1.usernameTooShort)\n .max(64, l1.usernameTooLong)\n .test({\n message: l1.validUsername,\n test: (value) => value?.match(/^[A-Za-z_][A-Za-z0-9_-]+$/),\n }),\n email: Yup.string()\n .required(l1.fieldRequired)\n .email(l1.validEmail),\n password: Yup.string()\n .required(l1.fieldRequired)\n .min(6, l1.min6)\n .max(64, l1.tooLong),\n passwordConfirmation: Yup.string()\n .required(l1.fieldRequired)\n .oneOf([Yup.ref('password'), null], l1.passwordsDoNotMatch),\n acceptedTermsOfService: Yup.bool().isTrue(),\n});\n\nexport default function Register() {\n const history = useHistory();\n const [usernameChanged, setUsernameChanged] = useState(false);\n const [emailChanged, setEmailChanged] = useState(true);\n const [checkUsernameAvailability, usernameCheck] = useLazyQuery(\n CHECK_USERNAME_AVAILABILTY, \n { \n onCompleted: () => { setUsernameChanged(false) },\n onError: () => { setUsernameChanged(false) }\n }\n )\n const [checkEmailAvailability, emailCheck] = useLazyQuery(\n CHECK_EMAIL_AVAILABILTY,\n { onCompleted: () => { setEmailChanged(false) }}\n )\n const [register, {loading: registering, error: registerError }] = useMutation(REGISTER, {\n onCompleted: () => {\n history.push(`/?message=success.registered${process.env?.REACT_APP_NO_EMAIL_CONFIRMATION ? 'NoEmailConfirmation': ''}`)\n },\n onError: (registerError) => { console.error({registerError}) }\n });\n\n const classes = useAuthStyles();\n return (\n \n \n \n
\n
\n \n {l1.alreadyRegistered}\n \n \n
\n\n
{\n await register({\n variables: {\n fullname: values.fullname.trim(),\n username: values.username,\n email: values.email,\n password: values.password,\n },\n });\n }}\n >\n {({ handleBlur, values, handleChange, touched, errors, handleSubmit }) => (\n \n )}\n \n
\n \n );\n}\n","/* eslint-disable no-restricted-globals */\nimport React from 'react';\nimport Avatar from '@material-ui/core/Avatar';\nimport Button from '@material-ui/core/Button';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport Container from '@material-ui/core/Container';\nimport { Box, CircularProgress, InputAdornment} from '@material-ui/core';\nimport { Link } from 'react-router-dom';\nimport { gql, useMutation } from '@apollo/client';\nimport * as Yup from 'yup';\nimport { Formik } from 'formik';\nimport { l1 } from './local.json';\nimport { useHistory } from 'react-router-dom';\nimport PageTitle from './components/PageTitle';\nimport { useAuthStyles } from './style';\nimport {Check, Close} from '@material-ui/icons';\n\nconst RESET_PASSWORD = gql`\n mutation ResetPassword(\n $code: String!\n $password: String!\n $passwordConfirmation: String!\n ) {\n resetPassword(\n code: $code\n password: $password\n passwordConfirmation: $passwordConfirmation\n ) {\n jwt\n user {\n id\n username\n fullname\n email\n }\n }\n }\n`;\n\nconst validationSchema = Yup.object().shape({\n password: Yup.string()\n .required(l1.fieldRequired)\n .min(6, l1.min6)\n .max(64, l1.tooLong),\n passwordConfirmation: Yup.string()\n .required(l1.fieldRequired)\n .oneOf([Yup.ref('password'), null], l1.passwordsDoNotMatch),\n});\n\nexport default function ResetPassword() {\n const [resetPassword, {loading, error, }] = useMutation(RESET_PASSWORD, {\n onCompleted: (data) => { \n console.log('ok', Boolean(data?.resetPassword?.user));\n history.push('/?message=success.passwordUpdated')\n },\n onError: (err) => { console.error(err);},\n });\n const history = useHistory();\n const code = new URLSearchParams(window.location.search).get('code')\n if(!code?.length){\n history.replace('/?message=error.noResetPasswordCodeProvided')\n }\n if(error?.graphQLErrors?.[0]?.extensions?.exception?.data?.data?.[0]?.messages?.[0]?.id === 'Auth.form.error.code.provide'){\n history.replace('/?message=error.invalidResetPasswordCode')\n }\n const classes = useAuthStyles();\n \n return (\n \n \n \n \n
\n
\n \n {l1.backToLogin}\n \n \n
\n
\n {l1.enterNewPasswordTwice}\n \n\n
{\n resetPassword({\n variables: {\n code,\n password: values.password,\n passwordConfirmation: values.passwordConfirmation,\n }\n });\n }}\n >\n {({ handleBlur, values, touched, handleChange, errors, handleSubmit }) => (\n \n )}\n \n
\n \n );\n}\n","import { CircularProgress } from \"@material-ui/core\";\nimport React from \"react\";\nimport { isLoggedIn, redirect } from \"../utils\";\n\nexport default function RedirectIfLoggedIn({children}){\n if(isLoggedIn()){\n redirect()\n return \n }\n return {children} \n}","import { Avatar, Box, Container, Typography } from '@material-ui/core'\nimport React, { useEffect, useState } from 'react'\nimport Cookies from 'universal-cookie'\nimport PageTitle from './components/PageTitle'\nimport {l1} from './local.json'\nimport { useAuthStyles } from './style'\nasync function logoutFromAcademy(setLoggedOut){\n console.log( process.env.REACT_APP_ACADEMY_LOGOUT_URL)\n await fetch(process.env.REACT_APP_ACADEMY_LOGOUT_URL)\n .then(res => {\n if (res.status < 400){\n console.log(\"Logout status code:\", res.status)\n } \n })\n .catch(err => console.log('Logout from Academy error:', err))\n .finally(()=>{\n setLoggedOut(true);\n })\n}\n\nfunction Logout() {\n const classes = useAuthStyles();\n const [loggedOut, setLoggedOut] = useState(false)\n useEffect(\n () => {\n // 1. Remove the token cookie\n const cookies = new Cookies();\n cookies.remove(\n 'token',\n {\n domain: process.env.REACT_APP_SESSION_COOKIE_DOMAIN || 'localhost',\n path: '/',\n }\n )\n // 2. Request logout from Academy\n logoutFromAcademy(setLoggedOut)\n }, [])\n if (loggedOut){\n window.location.href = process.env.REACT_APP_WEBSITE_URL;\n }\n return (\n \n \n
\n
\n\n
\n {l1.redirectInShortMoment}.\n
\n {l1.ifYouCantWait}{' '}
\n {l1.backToHomePage}\n \n
\n \n )\n}\n\nexport default Logout","import React from 'react';\n\nimport Login from './Login';\nimport { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';\nimport RTL from './components/RTL'; \nimport Copyright from './components/Copyright';\nimport { Box } from '@material-ui/core';\nimport Theme from './components/Theme';\nimport CenterContent from './components/CenterContent';\nimport ForgotPassword from './ForgotPassword';\nimport Register from './Register';\nimport ResetPassword from './ResetPassword';\nimport RedirectIfLoggedIn from './components/RedirectIfLoggedIn';\nimport Logout from './Logout';\n\n\nfunction App() {\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 \n \n \n \n \n \n }\n \n \n \n );\n}\n\nexport default App;\n","import React from 'react';\n\nimport { ApolloClient, ApolloLink, createHttpLink, InMemoryCache, ApolloProvider } from '@apollo/client';\nimport { onError } from 'apollo-link-error';\n\nfunction Apollo({ children }) {\n const errorLink = onError(({ graphQLErrors, networkError }) => {\n if (graphQLErrors)\n graphQLErrors.forEach(({ message, locations, path }) =>\n console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)\n );\n\n if (networkError) console.log(`[Network error]: ${networkError}`);\n });\n\n const httpLink = createHttpLink({\n uri: process.env.REACT_APP_BACKEND_URL,\n // uri: 'https://strapi.rwadleadership.tk/graphql',\n });\n\n const client = new ApolloClient({\n link: ApolloLink.from([errorLink, httpLink]),\n cache: new InMemoryCache({\n addTypename: false,\n }),\n defaultOptions:{\n watchQuery: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'ignore',\n },\n query: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'all',\n },\n }\n });\n return {children};\n}\n\nexport default Apollo;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport Apollo from './Apollo';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\n"],"sourceRoot":""}