{"version":3,"sources":["webpack:///./app/images/pawlyLogo.png","webpack:///./app/containers/LoginContainer/selectors.js","webpack:///./app/containers/LoginContainer/saga.js","webpack:///./app/containers/LoginContainer/styled.js","webpack:///./app/containers/LoginContainer/index.js","webpack:///./app/components/Container/styled.js","webpack:///./app/components/Container/index.js","webpack:///./node_modules/pawlyclinic-sdk/lib/es/services.js","webpack:///./app/images/img_cat@3x.jpg"],"names":["module","exports","selectLoginContainerDomain","state","loginContainer","initialState","toJS","makeSelectLoginContainer","createSelector","substate","requestLogin","loginContainerSaga","login","cognito","getUserAttributes","email","password","vetId","call","loginResponse","cognitoSub","setClient","payload","accessToken","jwt","includes","COGNITO_GROUPS","admin","fetchVetCognitoSub","id","parseInt","cognitoSubResponse","data","vet","put","appCreators","setVetSubForAdmin","vetSub","fetchVetProfile","sub","vetData","isRegistrationComplete","userAttributes","isBusiness","userAttrs","forEach","attr","Name","Value","Error","translate","getCountryCodeAndStrippedNumber","countryCode","strippedNumber","phone","fullName","businessName","confirmPassword","path","routeConstants","signUp","route","businessSignUp","push","userDetails","otpSent","userId","otp","signUpTime","moment","unix","user","tokenInfo","showNotification","NOTIFICATION_TYPE","SUCCESS","setToken","loginContainerCreators","loginSuccessful","dashboard","code","COGNITO_ERROR_TYPES","USER_NOT_CONFIRMED_EXCEPTION","loginFailed","message","NOT_AUTHORIZED","ERROR","USER_NOT_FOUND_EXCEPTION","takeLatest","loginContainerTypes","LOGIN_REQUESTED","Hero","styled","div","FormContainer","props","width","colors","white","media","tablet","min","Title","T","darkFuchsia","fonts","weights","fw500","size","big","SubTitle","vetBlue","xRegular","LoginPasswordTitle","pawlyBlue","dynamicFontSize","SmallText","small","CustomForm","Stethoscope","img","SignUpLink","Span","span","OTPMsg","secondary","confirmSignUp","resendConfirmationCode","Helmet","name","content","maxHeight","catImg","src","logo","type","LoginContainer","intl","dispatchClearLoading","dispatchLoginRequested","loading","verifyOTP","useInjectSaga","key","saga","screenType","useScreenType","history","useHistory","query","URLSearchParams","useLocation","search","form","useForm","get","useEffect","getFieldValue","handleSignInClick","validateFields","getFieldsValue","userEmail","toLowerCase","Container","overflowHidden","condition","isNotDesktop","rules","isEmailValid","disabled","autoComplete","data-testid","placeholder","formatMessage","isRequired","onKeyPress","e","Item","className","isOTPValid","onClick","forgotPassword","block","htmlType","text","values","signUpType","clean","mapStateToProps","createStructuredSelector","withConnect","connect","dispatch","loginRequested","clearLoading","LoginContainerTest","compose","injectIntl","FullWidthContainer","overHidden","styles","flexConfig","row","memo","c","a","f","u","n","t","r","o","i","s","value","done","Promise","resolve","then","this","arguments","apply","NODE_ENV","process","env","Object","assign","globalThis","Option","slice","freeze","defineProperties","raw","p","m","l","g","regeneratorRuntime","mark","wrap","prev","next","A","getCurrentUser","abrupt","getSession","stop","d","length","toString","P","Username","Pool","confirmRegistration","_","h","Password","authenticateUser","onSuccess","getAccessToken","getJwtToken","getRefreshToken","token","idToken","jwtToken","refreshToken","onFailure","v","O","isValid","getName","getValue","w","getUsername","signOut","concat","N","E","U","C","I","updateAttributes","getAttributeVerificationCode","inputVerificationCode","b","verifyAttribute","UserPoolId","ClientId","R","S","INVALID_PARAMETER_EXCEPTION","CODE_MISMATCH_EXCEPTION","y","getUserPoolAppClient","getUserPoolID","getUserPool","forgotPass","fetchAttributes","verifyPhoneNumberRequest","updatePhoneNumberRequest","x","__proto__","getCognitoUser","default"],"mappings":"+FAAAA,EAAOC,QAAU,s4G,guBCQXC,EAA6B,SAAAC,GAAK,OAAKA,EAAMC,gBAAkBC,KAAcC,QAiBpEC,EAfkB,kBAC/BC,YACEN,GACA,SAAAO,GAAQ,OAAIA,M,oUCQCC,G,0BAgFQC,G,urBAnFzB,IAAMC,EAAQC,IAAQD,MAChBE,EAAoBD,IAAQC,kBAE3B,SAAUJ,EAAV,uHAEmB,OAFMK,EAAzB,EAAyBA,MAAOC,EAAhC,EAAgCA,SAAUC,EAA1C,EAA0CA,MAA1C,kBAEyBC,eAAKN,EAAOG,EAAOC,GAF5C,UAEG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9d/QCQpfxU0c/IKckeQsIi6MPECZHDyBsDvwQRgd6CKsDO4TZgRzC7sAN4XCghvA4MEO4HIghfA68kNPxPSC8DrQQXgdWCLcDKYTfgRNSw4ESckreA1LLgQ9yOB3fA0LrOfBBajrQQU7Je0BOxzeB1HYgg9R34IKckreAHE7H94A0KSxUkCaFhQnSqLAwQZo52oP4Hvz5eVlhJUnyk/28yMsgxAP4W5GSxgn5AfC0NiCGXJUSEQnJfILkdRDfA4B/r+n0JPmX/3DN6yBkagLAz0sKK/kBAMh8m/mFEBICAPz9OQkvrJ+/ANcPXrQBIYzf764XWcdrIaTgE0CCQp7kftVrIeTyPSnRYYYPn/14MYQQokmG4BhpBb/m9ZCWYoAMkAEyQAYIayi2VTHnTfsD0fSq2Xv80RvI5QtnZV9unPQGIllVEM6PA3fa7JXL/MDv0ahlV6wM3a6anVhwnriko1AkAEsV87P0ut9/FRFuCGAJmsUMucMZ0QaAQNDP8i2AsdaNw9cBxpKonzaRAcZqVw5hCUlPSUHuoLpsC8S1+u1wEczQaDXSzwePbaEp9qD9OAMAWLbgLBtyBxSQQ/HjvjsKWrbI+rSz6WuIIYYYYoghhhhiiCGGGIIr/gdO1+w6y854aAAAAABJRU5ErkJggg==\"","import { createSelector } from 'reselect';\nimport { initialState } from './reducer';\nimport get from 'lodash/get';\n\n/**\n * Direct selector to the loginContainer state domain\n */\n\nconst selectLoginContainerDomain = state => (state.loginContainer || initialState).toJS();\n\nconst makeSelectLoginContainer = () =>\n createSelector(\n selectLoginContainerDomain,\n substate => substate\n );\nexport const selectLoading = () =>\n createSelector(\n selectLoginContainerDomain,\n substate => get(substate, 'loading')\n );\nexport const selectShouldVerifyOTP = () =>\n createSelector(\n selectLoginContainerDomain,\n substate => get(substate, 'verifyOTP')\n );\nexport default makeSelectLoginContainer;\nexport { selectLoginContainerDomain };\n","import { call, takeLatest, put } from 'redux-saga/effects';\nimport moment from 'moment';\nimport { push } from 'connected-react-router';\nimport { appCreators } from '@containers/App/reducer';\nimport { cognito } from 'pawlyclinic-sdk/lib/es/services';\nimport { translate } from 'pawlyclinic-sdk/lib/es/components';\nimport { loginContainerCreators, loginContainerTypes } from './reducer';\nimport routeConstants from '@utils/routeConstants';\nimport { fetchVetCognitoSub, fetchVetProfile } from '@services/vetServices';\nimport jwt from 'jwt-decode';\nimport { setClient } from '@utils/apiUtils';\nimport { COGNITO_GROUPS } from '@app/utils/constants';\nimport {\n COGNITO_ERROR_TYPES,\n getCountryCodeAndStrippedNumber,\n NOTIFICATION_TYPE,\n showNotification\n} from 'pawlyclinic-sdk/lib/es/utils';\nconst login = cognito.login;\nconst getUserAttributes = cognito.getUserAttributes;\n\nexport function* requestLogin({ email, password, vetId }) {\n try {\n const loginResponse = yield call(login, email, password);\n let cognitoSub = null;\n setClient(loginResponse.payload.accessToken);\n const cognitoGroups = jwt(loginResponse.payload.accessToken)['cognito:groups'];\n if (cognitoGroups.includes(COGNITO_GROUPS.admin)) {\n const cognitoSubResponse = yield call(fetchVetCognitoSub, { id: parseInt(vetId) });\n cognitoSub = cognitoSubResponse.data.vet.cognitoSub;\n yield put(appCreators.setVetSubForAdmin({ vetSub: cognitoSub }));\n }\n const vetData = yield call(fetchVetProfile, {\n cognitoSub: cognitoSub || jwt(loginResponse.payload.accessToken).sub\n });\n if (!vetData?.data?.vet?.isRegistrationComplete) {\n const userAttributes = yield call(getUserAttributes);\n let isBusiness = false;\n const userAttrs = {};\n userAttributes.forEach(attr => {\n if (attr.Name === 'custom:business') {\n isBusiness = attr.Value === 'true';\n } else if (attr.Name === 'custom:group' && attr.Value !== 'group-vet') {\n throw Error(translate('invalid_vet_credentials'));\n } else if (attr.Name === 'email') {\n userAttrs[attr.Name] = attr.Value;\n } else if (attr.Name === 'phone_number') {\n const { countryCode, strippedNumber } = getCountryCodeAndStrippedNumber(attr.Value);\n userAttrs.phone = strippedNumber;\n userAttrs.countryCode = countryCode;\n } else if (attr.Name === 'given_name') {\n userAttrs.fullName = attr.Value;\n userAttrs.businessName = attr.Value;\n }\n });\n userAttrs.password = password;\n userAttrs.confirmPassword = userAttrs.password;\n let path = routeConstants.signUp.route;\n if (isBusiness) {\n path = routeConstants.businessSignUp.route;\n }\n yield put(\n push(path, {\n userDetails: {\n otpSent: true,\n ...userAttrs,\n userId: vetData?.data?.vet?.id,\n accessToken: loginResponse.payload.accessToken,\n otp: true,\n signUpTime: moment().unix()\n },\n userAttributes,\n user: jwt(loginResponse.payload.accessToken),\n vetData: vetData?.data?.vet,\n tokenInfo: loginResponse.payload\n })\n );\n } else {\n showNotification(translate('login_successful'), NOTIFICATION_TYPE.SUCCESS);\n yield put(appCreators.setToken(loginResponse.payload));\n yield put(loginContainerCreators.loginSuccessful());\n yield put(push(routeConstants.dashboard.route));\n }\n } catch (e) {\n if (e?.code === COGNITO_ERROR_TYPES.USER_NOT_CONFIRMED_EXCEPTION) {\n showNotification(translate('otp_sent'), NOTIFICATION_TYPE.SUCCESS);\n // second parameter represents verifyOTP\n yield put(loginContainerCreators.loginFailed(e.message, true));\n } else if (e.code === COGNITO_ERROR_TYPES.NOT_AUTHORIZED) {\n showNotification(translate('invalid_creds'), NOTIFICATION_TYPE.ERROR);\n yield put(loginContainerCreators.loginFailed(e.message));\n } else if (e.code === COGNITO_ERROR_TYPES.USER_NOT_FOUND_EXCEPTION) {\n showNotification(translate('invalid_email_notification'), NOTIFICATION_TYPE.ERROR);\n yield put(loginContainerCreators.loginFailed(e.message));\n } else {\n showNotification(translate('something_went_wrong'), NOTIFICATION_TYPE.ERROR);\n yield put(loginContainerCreators.loginFailed(e.message));\n }\n }\n}\n\nexport default function* loginContainerSaga() {\n yield takeLatest(loginContainerTypes.LOGIN_REQUESTED, requestLogin);\n}\n","import styled from 'styled-components';\nimport { Form } from 'antd';\nimport { T } from 'pawlyclinic-sdk/lib/es/components';\nimport { media, colors, fonts } from 'pawlyclinic-sdk/lib/es/themes';\n\nexport const Hero = styled.div`\n width: 100%;\n display: flex;\n height: auto;\n align-content: center;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n`;\nexport const FormContainer = styled.div`\n width: ${props => props.width};\n background: ${colors.white};\n overflow: auto;\n display: flex;\n align-content: center;\n align-items: center;\n flex-direction: column;\n padding: 2rem 1rem;\n @supports (-webkit-touch-callout: none) {\n /* CSS specific to iOS devices */\n height: -webkit-fill-available;\n }\n ${media.tablet.min(`\n padding: 2rem;\n `)}\n`;\nexport const Title = styled(T)`\n && {\n color: ${colors.darkFuchsia};\n ${fonts.weights.fw500()};\n ${fonts.size.big()};\n line-height: 1.5;\n margin-bottom: 0;\n }\n`;\nexport const SubTitle = styled(T)`\n && {\n color: ${colors.vetBlue};\n ${fonts.size.xRegular()};\n line-height: 1.5;\n }\n`;\nexport const LoginPasswordTitle = styled(T)`\n && {\n color: ${colors.pawlyBlue};\n ${fonts.weights.fw500()};\n line-height: 1.5;\n ${fonts.dynamicFontSize(fonts.size.big, 0.875, 0.25, 0.525)};\n }\n`;\nexport const SmallText = styled(T)`\n && {\n color: ${colors.pawlyBlue};\n ${fonts.size.small()};\n ${fonts.weights.fw500()};\n text-align: left;\n line-height: 1.5;\n cursor: pointer;\n max-width: 8rem;\n }\n`;\nexport const CustomForm = styled(Form)`\n text-align: center;\n width: 100%;\n & .ant-form-item.otp {\n margin-bottom: 0;\n }\n .ant-legacy-form-explain {\n margin-top: 0.5rem;\n color: red;\n ${fonts.size.small()};\n }\n & .ant-form-item-explain,\n & .ant-form-item-extra {\n text-align: left;\n }\n`;\nexport const Stethoscope = styled.img`\n width: 100%;\n max-width: 6em;\n padding-bottom: 2rem;\n padding-top: 3rem;\n`;\nexport const SignUpLink = styled(T)`\n display: inline-block;\n color: ${colors.vetBlue};\n`;\nexport const Span = styled.span`\n color: ${colors.darkFuchsia};\n cursor: pointer;\n ${fonts.weights.fw500()};\n`;\nexport const OTPMsg = styled(T)`\n text-align: left;\n margin-top: 2px;\n margin-bottom: 0.875rem;\n opacity: 0.5;\n color: ${colors.secondary};\n font-weight: 300;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.6;\n`;\n","/**\n *\n * LoginContainer\n *\n */\n\nimport React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Form } from 'antd';\nimport {\n CustomPassword,\n injectIntl,\n If,\n CustomInput,\n FormItem,\n OtpInput,\n BackgroundImg,\n CustomDisableFormButton\n} from 'pawlyclinic-sdk/lib/es/components';\nimport {\n NOTIFICATION_TYPE,\n showNotification,\n isEmailValid,\n isOTPValid,\n isRequired\n} from 'pawlyclinic-sdk/lib/es/utils';\nimport { cognito } from 'pawlyclinic-sdk/lib/es/services';\nimport { Helmet } from 'react-helmet';\nimport { useHistory, useLocation } from 'react-router-dom';\nimport { createStructuredSelector } from 'reselect';\nimport { compose } from 'redux';\nimport useScreenType from 'react-screentype-hook';\nimport routeConstants from '@utils/routeConstants';\nimport catImg from '@images/img_cat@3x.jpg';\nimport logo from '@images/pawlyLogo.png';\nimport { loginContainerCreators } from './reducer';\nimport makeSelectLoginContainer, { selectLoading, selectShouldVerifyOTP } from './selectors';\nimport Container from '@components/Container';\nimport { useInjectSaga } from '@utils/injectSaga';\nimport saga from './saga';\nimport { isNotDesktop } from '@app/utils';\n\nimport {\n Hero,\n FormContainer,\n Title,\n SubTitle,\n LoginPasswordTitle,\n SmallText,\n CustomForm,\n Stethoscope,\n SignUpLink,\n Span,\n OTPMsg\n} from './styled';\n\nconst { confirmSignUp, resendConfirmationCode } = cognito;\n\nexport function LoginContainer({ intl, dispatchClearLoading, dispatchLoginRequested, loading, verifyOTP }) {\n useInjectSaga({ key: 'loginSaga', saga });\n const screenType = useScreenType();\n const history = useHistory();\n const query = new URLSearchParams(useLocation().search);\n const [form] = Form.useForm();\n const vetId = query.get('vet_id');\n\n useEffect(() => {\n dispatchClearLoading();\n }, []);\n\n useEffect(() => {\n if (verifyOTP && form.getFieldValue('email')) {\n resendConfirmationCode(form.getFieldValue('email'));\n }\n }, [verifyOTP]);\n const handleSignInClick = async () => {\n try {\n await form.validateFields();\n if (verifyOTP) {\n const { email, otp } = form.getFieldsValue(['email', 'otp']);\n const userEmail = email.toLowerCase();\n await confirmSignUp(userEmail, otp);\n dispatchLoginRequested({ ...form.getFieldsValue(), vetId });\n } else {\n dispatchLoginRequested({ ...form.getFieldsValue(), vetId });\n }\n } catch (err) {\n showNotification(err.message, NOTIFICATION_TYPE.ERROR);\n }\n };\n return (\n \n \n Login\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n e.key === 'Enter' && handleSignInClick()}\n placeholder={intl.formatMessage({ id: 'paswd_placeholder' })}\n />\n \n \n \n \n \n \n \n history.push(routeConstants.forgotPassword.route)} />\n\n handleSignInClick()}\n htmlType=\"submit\"\n text={intl.formatMessage({ id: verifyOTP ? 'verify' : 'login_btn' })}\n form={form}\n />\n\n history.push(routeConstants.signUpType.route, { clean: true })}>\n {intl.formatMessage({ id: 'sign_up' })}\n \n )\n }}\n />\n \n \n \n \n );\n}\n\nLoginContainer.propTypes = {\n intl: PropTypes.object,\n dispatchLoginRequested: PropTypes.func,\n dispatchClearLoading: PropTypes.func,\n loading: PropTypes.bool,\n verifyOTP: PropTypes.bool\n};\n\nconst mapStateToProps = createStructuredSelector({\n loginContainer: makeSelectLoginContainer(),\n loading: selectLoading(),\n verifyOTP: selectShouldVerifyOTP()\n});\n\nfunction mapDispatchToProps(dispatch) {\n return {\n dispatchLoginRequested: data => {\n const userEmail = data.email.toLowerCase();\n dispatch(loginContainerCreators.loginRequested(userEmail, data.password, data.vetId));\n },\n dispatchClearLoading: data => {\n dispatch(loginContainerCreators.clearLoading());\n }\n };\n}\n\nconst withConnect = connect(\n mapStateToProps,\n mapDispatchToProps\n);\n\nexport default compose(\n withConnect,\n injectIntl\n)(LoginContainer);\n\nexport const LoginContainerTest = compose(injectIntl)(LoginContainer);\n","import styled from 'styled-components';\nimport styles from '@app/themes/styles';\n\nexport const FullWidthContainer = styled.div`\n height: 100vh;\n width: 100vw;\n ${props => props.overHidden && `overflow: hidden;`};\n ${styles.flexConfig.row()};\n`;\n","/**\n *\n * Container\n *\n */\n\nimport React, { memo } from 'react';\n\nimport { FullWidthContainer } from './styled';\n\nfunction Container(props) {\n return ;\n}\n\nContainer.propTypes = {};\n\nexport default memo(Container);\n","import{CognitoUserAttribute as e,CognitoUser as n,AuthenticationDetails as t,CognitoUserPool as r}from\"amazon-cognito-identity-js\";import\"antd/lib/message/style\";import\"antd/lib/message\";import\"antd/lib/select/style\";import o from\"antd/lib/select\";import\"react\";import i from\"styled-components\";import\"moment\";function u(e,n,t,r,o,i,u){try{var s=e[i](u),c=s.value}catch(e){return void t(e)}s.done?n(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function s(e){u(i,r,o,s,c,\"next\",e)}function c(e){u(i,r,o,s,c,\"throw\",e)}s(void 0)}))}}var c,a,f;!function(){const e={\"process.env.AWS_COGNITO_USER_POOL_ID\":'\"ap-southeast-1_0Sbsr6mfY\"',\"process.env.AWS_COGNITO_USER_POOL_APP_CLIENT\":'\"8o0usrlv9hriq59miu3adn7d6\"',\"process.env.SONAR_ORG\":'\"wednesday-solutions\"',\"process.env.SONAR_PROJECT_KEY\":'\"wednesday-solutions_pawlyclinic-sdk\"',NODE_ENV:\"production\"};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),o.Option,i.img(c||(a=[\"\\n margin-right: 10px;\\n\"],f||(f=a.slice(0)),c=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(f)}}))));var p,m=function(e){return new Promise((function(n,t){return e(n,t)}))};function l(){return g.apply(this,arguments)}function g(){return(g=s(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A().getCurrentUser(),e.abrupt(\"return\",new Promise((function(e,t){n.getSession((function(r,o){if(r)return t(r);n.getUserAttributes((function(n,r){if(n)return t(n);e(r)}))}))})));case 2:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function d(n,t,r,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,a=arguments.length>8?arguments[8]:void 0;return new Promise((function(f,p){var m=new e({Name:\"email\",Value:n}),l=new e({Name:\"custom:group\",Value:u?\"group-owner\":\"group-vet\"}),g=[];g.push(m),g.push(l),g.push(new e({Name:\"custom:business\",Value:i.toString()})),g.push(new e({Name:\"given_name\",Value:r})),g.push(new e({Name:\"phone_number\",Value:o})),g.push(new e({Name:\"custom:system_id\",Value:s})),c&&g.push(new e({Name:\"custom:language\",Value:c})),a&&g.push(new e({Name:\"custom:region\",Value:a})),A().signUp(n,t,g,null,(function(e,n){e&&p(e),f(n)}))}))}function P(e,t){return new Promise((function(r,o){var i=A(),u=new n({Username:e,Pool:i});if(null===u){var s=new Error({code:\"NotAuthorizedException\",message:\"No user data is present\",name:\"NotAuthorizedException\"});o(s)}u.confirmRegistration(t,!0,(function(e,n){e&&o(e),r(n)}))}))}function _(e){return new Promise((function(t,r){var o=A(),i=new n({Username:e,Pool:o});if(null===i){var u=new Error({code:\"NotAuthorizedException\",message:\"No user data is present\",name:\"NotAuthorizedException\"});r(u)}i.resendConfirmationCode((function(e,n){e&&r(e),t(n)}))}))}function h(e,r){return new Promise((function(o,i){var u=new t({Username:e,Password:r}),s={Username:e,Pool:A()};new n(s).authenticateUser(u,{onSuccess:function(e){var n=e.getAccessToken().getJwtToken(),t=e.getRefreshToken().token,r=e.idToken.jwtToken;o({payload:{accessToken:n,refreshToken:t,idToken:r}})},onFailure:function(e){i(e)}})}))}function v(){return O.apply(this,arguments)}function O(){return(O=s(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(n=A().getCurrentUser())){e.next=3;break}throw new Error({code:\"NotAuthorizedException\",message:\"No user is logged in\",name:\"NotAuthorizedException\"});case 3:return e.next=5,m((function(e,t){n.getSession((function(n,r){if(n)return t(n);if(!r.isValid()){var o=new Error(\"Session not Valid\");return t(o)}e()}))}));case 5:return e.abrupt(\"return\",m((function(e,t){n.getUserAttributes((function(n,r){n&&t(n);for(var o={},i=0;i