{"version":3,"sources":["webpack:///./src/core/plugins/vue.msal.plugin.ts","webpack:///./src/core/services/common/axios.factory.ts","webpack:///./src/core/services/common/api.service.ts","webpack:///./src/core/services/common/logging.service.ts","webpack:///./src/core/services/storage.service.ts","webpack:///./src/core/services/redirect.service.ts","webpack:///./src/core/services/help.service.ts","webpack:///./src/core/services/profile-completion.service.ts","webpack:///./src/core/webapi/common.ts","webpack:///./src/core/services/common/notification.provider.ts","webpack:///./src/core/services/auth.service.ts","webpack:///./src/core/store/index.ts","webpack:///./src/core/plugins/vuetify.ts","webpack:///./src/core/webapi/base.ts","webpack:///./src/core/webapi/configuration.ts"],"names":["MsalPlugin","options","Vue","authService","exposed","isAuthenticated","register","login","logout","redirectToRoute","getAccessToken","getLoggedInAccount","getLoggedInAccountOrThrow","getStatus","this","passwordReset","prototype","$msal","AxiosFactory","methods","create","config","baseURL","headers","Pragma","Expires","axiosInstance","a","interceptors","request","use","token","Authorization","error","response","onError","status","Promise","reject","message","router","push","data","buildArgs","basePath","undefined","ApiService","account","users","newsArticles","valueProposition","companies","partners","serviceProviders","serviceUsers","importer","contacts","searchEvents","handleValidationErrors","model","then","resolve","errors","validationSummary","getDataAndDefaultValidationProps","LoggingService","log","info","debug","warn","RETURN_URL_KEY","StorageService","getStorage","sessionStorage","setReturnUrl","returnUrl","setItem","getAndRemoveReturnUrl","value","getItem","removeItem","RedirectService","getProfileRedirect","userProfile","currentRouteName","role","isPortalAdmin","isPending","isApproved","partnerProfile","console","isIncomplete","serviceProviderProfileCompletionStageId","Incomplete","serviceUserProfileCompletionStageId","HelpService","serviceProvider","serviceUser","ProfileCompletionService","getNextIncompleteProfileRoute","currentPath","companyId","areAllStepsComplete","nextPath","isC1Complete","name","path","isC2Complete","isServiceProvider","isSp1Complete","isSp2Complete","isSp3Complete","isSp4Complete","isSp5Complete","isServiceUser","isSu1Complete","isSu2Complete","isSu3Complete","isSu4Complete","isSu5Complete","DUMMY_BASE_URL","assertParamExists","functionName","paramName","paramValue","setSearchParams","url","searchParams","URLSearchParams","search","objects","object","key","subKey","subValue","Array","isArray","i","append","set","toString","serializeDataIfNeeded","requestOptions","configuration","nonString","needsSerialization","isJsonMime","JSON","stringify","toPathString","pathname","hash","createRequestFunction","axiosArgs","globalAxios","BASE_PATH","axios","axiosRequestArgs","NotificationProvider","success","text","timeout","notifyColor","warning","notify","color","$eventHub","$emit","SIGN_UP_SIGN_IN_AUTHORITY","SIGN_UP_AUTHORITY","RESET_PASSWORD_AUTHORITY","DEFAULT_UNAUTHENTICATED_REDIRECT_URI","DEFAULT_AUTHENTICATED_REDIRECT_URI","CANCEL_ERROR_CODE","PASSWORD_RESET_ERROR_CODE","MSAL_CONFIG","auth","clientId","authority","knownAuthorities","redirectUri","navigateToLoginRequestUrl","cache","cacheLocation","storeAuthStateInCookie","system","loggerOptions","loggerCallback","level","containsPii","Error","Info","Verbose","Warning","AuthService","window","addEventListener","loadAuthModule","myMSALObj","loginRedirectRequest","scopes","redirectStartPage","handleRedirectPromise","handleResponse","catch","authError","isOfErrorCode","goToDefaultRoute","errorCode","errorMessage","startsWith","signUpRequest","loginRedirect","passwordResetRequest","logOutRequest","postLogoutRedirectUri","logoutRedirect","cachedAccounts","getAllAccounts","length","orderedByExpiry","sort","p","idTokenClaims","exp","activeAccount","Date","now","removeStaleAccounts","activeAccountKey","generateAccountCacheKey","accountsToRemove","keysToRemove","browserStorage","removeAccount","silentRequest","interactiveRequest","acquireTokenSilent","accessToken","acquireTokenRedirect","forceRefresh","getTokenRedirect","dispatch","currentRoute","USER_PROFILE_KEY","MsalService","redirectToRouteName","getUserProfileFromStorage","parse","store","Store","state","isFetchingUserProfile","getters","mutations","setUserProfile","payload","String","actions","commit","getUserProfile","e","finally","clearUserData","theme","themes","light","primary","dark","replace","BaseAPI","RequiredError","field","msg","param","apiKey","username","password","baseOptions","formDataCtor","mime","jsonMime","RegExp","test","toLowerCase"],"mappings":"0LAGqBA,E,WAMnB,WAAYC,EAAcC,GAAS,uBACjC,IAAM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app~6ec62321.6b643feb.js","sourcesContent":["import { AuthService } from '@/core/services/auth.service';\r\nimport { IMsalPlugin } from './IMsalPlugin';\r\n\r\nexport default class MsalPlugin {\r\n static install(Vue: any, options: any) {\r\n Vue.prototype.$msal = new MsalPlugin(options, Vue);\r\n }\r\n\r\n // eslint-disable-next-line\r\n constructor(options: any, Vue?: any) {\r\n const authService = new AuthService();\r\n\r\n const exposed: IMsalPlugin = {\r\n isAuthenticated() {\r\n return authService.isAuthenticated();\r\n },\r\n register() {\r\n authService.register();\r\n },\r\n login() {\r\n authService.login();\r\n },\r\n logout(redirectToRoute?: string) {\r\n authService.logout(redirectToRoute);\r\n },\r\n getAccessToken() {\r\n return authService.getAccessToken();\r\n },\r\n getLoggedInAccount() {\r\n return authService.getLoggedInAccount();\r\n },\r\n getLoggedInAccountOrThrow() {\r\n return authService.getLoggedInAccountOrThrow();\r\n },\r\n getStatus() {\r\n return `S ${this.isAuthenticated()}`;\r\n },\r\n passwordReset() {\r\n authService.passwordReset();\r\n },\r\n };\r\n\r\n return exposed;\r\n }\r\n}\r\n","import Vue from 'vue';\r\nimport axios, { AxiosRequestConfig } from 'axios';\r\n\r\nimport { NotificationProvider } from './notification.provider';\r\nimport router from '@/router';\r\n\r\nexport const AxiosFactory = new Vue({\r\n methods: {\r\n create() {\r\n const config: AxiosRequestConfig = {\r\n baseURL: process.env.VUE_APP_WEBAPI_URL,\r\n headers: {\r\n 'Cache-Control': 'no-cache',\r\n Pragma: 'no-cache',\r\n Expires: '0',\r\n },\r\n };\r\n\r\n const axiosInstance = axios.create(config);\r\n\r\n axiosInstance.interceptors.request.use(\r\n async config => {\r\n if (this.$msal.isAuthenticated()) {\r\n const token = await this.$msal.getAccessToken();\r\n config.headers.Authorization = `Bearer ${token}`;\r\n }\r\n return config;\r\n },\r\n error => error,\r\n );\r\n\r\n axiosInstance.interceptors.response.use(\r\n response => response,\r\n error => this.onError(error),\r\n );\r\n\r\n return axiosInstance;\r\n },\r\n async onError(error: any) {\r\n if (error?.response?.status === 422) {\r\n // 422 is model validation error and we don't want any extra handling in that case\r\n return Promise.reject(error);\r\n }\r\n\r\n let message = 'An error occurred.';\r\n if (error?.response?.status) {\r\n switch (error.response.status) {\r\n case 401: {\r\n if (!this.$msal.isAuthenticated()) {\r\n message = 'Invalid session, please log in.';\r\n router.push('/');\r\n } else {\r\n message = 'Unauthorized action.';\r\n }\r\n break;\r\n }\r\n case 403: {\r\n message = 'Permission denied.';\r\n break;\r\n }\r\n case 500: {\r\n if (error?.response?.data?.message) {\r\n message = error.response.data.message;\r\n }\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n NotificationProvider.error(message);\r\n return Promise.reject(error);\r\n },\r\n },\r\n});\r\n","import { AxiosFactory } from '@/core/services/common';\r\nimport {\r\n Configuration,\r\n AccountApiFactory,\r\n UsersApiFactory,\r\n NewsArticlesApiFactory,\r\n ValuePropositionApiFactory,\r\n CompaniesApiFactory,\r\n PartnersApiFactory,\r\n ServiceProvidersApiFactory,\r\n ServiceUsersApiFactory,\r\n ImportApiFactory,\r\n ContactsApiFactory,\r\n SearchEventsApiFactory,\r\n} from '@/core/webapi';\r\n\r\nfunction buildArgs() {\r\n return [new Configuration({ basePath: process.env.VUE_APP_WEBAPI_URL }), undefined, AxiosFactory.create()] as any[];\r\n}\r\n\r\nexport const ApiService = {\r\n account: () => AccountApiFactory(...buildArgs()),\r\n users: () => UsersApiFactory(...buildArgs()),\r\n newsArticles: () => NewsArticlesApiFactory(...buildArgs()),\r\n valueProposition: () => ValuePropositionApiFactory(...buildArgs()),\r\n companies: () => CompaniesApiFactory(...buildArgs()),\r\n partners: () => PartnersApiFactory(...buildArgs()),\r\n serviceProviders: () => ServiceProvidersApiFactory(...buildArgs()),\r\n serviceUsers: () => ServiceUsersApiFactory(...buildArgs()),\r\n importer: () => ImportApiFactory(...buildArgs()),\r\n contacts: () => ContactsApiFactory(...buildArgs()),\r\n searchEvents: () => SearchEventsApiFactory(...buildArgs()),\r\n};\r\n\r\ndeclare global {\r\n interface Promise<T> {\r\n /**\r\n * Attach validation errors and validation summary properties to a model.\r\n * @param model - Model to attach these properties to.\r\n */\r\n handleValidationErrors<TResult1 = T, TResult2 = never>(model: any): Promise<TResult1 | TResult2>;\r\n\r\n /**\r\n * Extracts data from a response and automatically sets validation\r\n * properties to defaults (empty object and empty array).\r\n */\r\n getDataAndDefaultValidationProps<TResult1 = T, TResult2 = never>(): Promise<TResult1 | TResult2>;\r\n }\r\n}\r\n\r\nPromise.prototype.handleValidationErrors = function(model: any) {\r\n return this.then(\r\n response => Promise.resolve(response),\r\n error => {\r\n if (error?.response?.status === 422) {\r\n model.errors = error.response.data?.errors;\r\n model.validationSummary = error.response.data?.validationSummary;\r\n }\r\n return Promise.reject(error);\r\n },\r\n );\r\n};\r\n\r\nPromise.prototype.getDataAndDefaultValidationProps = function() {\r\n return this.then(\r\n response => {\r\n const data = response.data;\r\n if (!data) {\r\n return Promise.resolve(null);\r\n }\r\n\r\n data.errors = {};\r\n data.validationSummary = [];\r\n return Promise.resolve({ ...data });\r\n },\r\n error => Promise.reject(error),\r\n );\r\n};\r\n","/* eslint-disable */\r\nexport const LoggingService = {\r\n log(...data: any[]) {\r\n this.info(data);\r\n },\r\n debug(...data: any[]) {\r\n // console.debug(data);\r\n },\r\n info(...data: any[]) {\r\n // console.info(data);\r\n },\r\n warn(...data: any[]) {\r\n // console.warn(data);\r\n },\r\n error(...data: any[]) {\r\n // console.error(data);\r\n },\r\n};\r\n/* eslint-enable */\r\n","const RETURN_URL_KEY = 'return-url-to';\r\n\r\nexport const StorageService = {\r\n getStorage(): Storage {\r\n return sessionStorage;\r\n },\r\n\r\n setReturnUrl(returnUrl: string) {\r\n this.getStorage().setItem(RETURN_URL_KEY, returnUrl);\r\n },\r\n\r\n // This is for better login experience\r\n getAndRemoveReturnUrl(): string {\r\n const value = this.getStorage().getItem(RETURN_URL_KEY);\r\n this.getStorage().removeItem(RETURN_URL_KEY);\r\n\r\n return value ? value : '';\r\n },\r\n};\r\n","import { GetUserProfileModel } from '@/core/webapi';\r\nimport { PartnerProfileCompletionStage } from '@/core/models';\r\n\r\nexport const RedirectService = {\r\n /**\r\n * This method checks whether the user profile has some incomplete \"profile data\"\r\n * (on either the user profile or partner profile), and returns a route to redirect\r\n * to if a route for profile completion should be enforced.\r\n * @param userProfile User profile.\r\n * @returns Route to enforce.\r\n */\r\n getProfileRedirect(\r\n userProfile: GetUserProfileModel | null | undefined,\r\n currentRouteName: string | null | undefined,\r\n ): string | null {\r\n if (!userProfile || userProfile.role.isPortalAdmin) {\r\n return null;\r\n }\r\n\r\n if (userProfile.isPending) {\r\n return 'account-pending-approval';\r\n }\r\n\r\n if (!userProfile.isApproved) {\r\n return 'set-account-type';\r\n }\r\n\r\n const partnerProfile = userProfile.partnerProfile;\r\n if (!partnerProfile) {\r\n // eslint-disable-next-line\r\n console.log('Something probably wrong with partner profile');\r\n return null;\r\n }\r\n\r\n const isIncomplete =\r\n partnerProfile.serviceProviderProfileCompletionStageId === PartnerProfileCompletionStage.Incomplete ||\r\n partnerProfile.serviceUserProfileCompletionStageId === PartnerProfileCompletionStage.Incomplete;\r\n\r\n if (\r\n isIncomplete &&\r\n currentRouteName !== 'service-provider-essentials' &&\r\n currentRouteName !== 'service-user-essentials'\r\n ) {\r\n return 'complete-partner-profile';\r\n }\r\n\r\n return null;\r\n },\r\n};\r\n","/* eslint-disable max-len */\r\n\r\nexport const HelpService = {\r\n serviceProvider: 'Users promoting their expertise and services in disruptive and sustainable technologies.',\r\n serviceUser: 'Users procuring or sourcing disruptive and sustainable technology solutions or signalling partnership opportunities (manufacturers of goods should classify themselves as a service user unless they are a CMO and providing manufacturing as a service).',\r\n};\r\n","import { PartnerProfileModel } from '@/core/webapi';\r\n\r\nexport interface NextIncompleteProfileRoute {\r\n name: string;\r\n path: string;\r\n}\r\n\r\nexport const ProfileCompletionService = {\r\n /**\r\n * This method checks whether the user profile has some incomplete \"profile data\"\r\n * (on either the user profile or partner profile), and returns a route to redirect\r\n * to if a route for profile completion should be enforced.\r\n * @param userProfile User profile.\r\n * @returns Route to enforce.\r\n */\r\n getNextIncompleteProfileRoute(\r\n partnerProfile: PartnerProfileModel | null | undefined,\r\n currentPath: string,\r\n ): NextIncompleteProfileRoute | null {\r\n if (!partnerProfile || !partnerProfile.companyId || partnerProfile.areAllStepsComplete) {\r\n return null;\r\n }\r\n\r\n const companyId = partnerProfile.companyId;\r\n\r\n let nextPath = `/dashboard/companies/${companyId}/details`;\r\n if (!partnerProfile.isC1Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Site Details',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/companies/${companyId}/links-and-media`;\r\n if (!partnerProfile.isC2Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Site Links and Media',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n if (partnerProfile.isServiceProvider) {\r\n nextPath = `/dashboard/service-provider/${companyId}/overview`;\r\n if (!partnerProfile.isSp1Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service Provider Profile - Site Overview',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-provider/${companyId}/sites-activities`;\r\n if (!partnerProfile.isSp2Complete && currentPath !== nextPath) {\r\n return {\r\n // eslint-disable-next-line quotes\r\n name: \"Service Provider Profile - Site's Activities\",\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-provider/${companyId}/operation-details`;\r\n if (!partnerProfile.isSp3Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service Provider Profile - Operation Details',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-provider/${companyId}/existing-stakeholders`;\r\n if (!partnerProfile.isSp4Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service Provider Profile - Existing Stakeholders',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-provider/${companyId}/media-and-press`;\r\n if (!partnerProfile.isSp5Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service Provider Profile - Media and Press',\r\n path: nextPath,\r\n };\r\n }\r\n }\r\n\r\n if (partnerProfile.isServiceUser) {\r\n nextPath = `/dashboard/service-user/${companyId}/overview`;\r\n if (!partnerProfile.isSu1Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service User Profile - Site Overview',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-user/${companyId}/sites-activities`;\r\n if (!partnerProfile.isSu2Complete && currentPath !== nextPath) {\r\n return {\r\n // eslint-disable-next-line quotes\r\n name: \"Service User Profile - Site's Activities\",\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-user/${companyId}/operation-details`;\r\n if (!partnerProfile.isSu3Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service User Profile - Operation Details',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-user/${companyId}/existing-partnerships`;\r\n if (!partnerProfile.isSu4Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service User Profile - Existing Partnerships',\r\n path: nextPath,\r\n };\r\n }\r\n\r\n nextPath = `/dashboard/service-user/${companyId}/media-and-press`;\r\n if (!partnerProfile.isSu5Complete && currentPath !== nextPath) {\r\n return {\r\n name: 'Service User Profile - Media and Press',\r\n path: nextPath,\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n};\r\n","/* tslint:disable */\r\n/* eslint-disable */\r\n/**\r\n * IDA_Kestrel API\r\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\r\n *\r\n * The version of the OpenAPI document: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\r\n * https://openapi-generator.tech\r\n * Do not edit the class manually.\r\n */\r\n\r\nimport { Configuration } from './configuration';\r\nimport { RequiredError, RequestArgs } from './base';\r\nimport { AxiosInstance } from 'axios';\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const DUMMY_BASE_URL = 'https://example.com';\r\n\r\n/**\r\n *\r\n * @throws {RequiredError}\r\n * @export\r\n */\r\nexport const assertParamExists = function(functionName: string, paramName: string, paramValue: unknown) {\r\n if (paramValue === null || paramValue === undefined) {\r\n throw new RequiredError(\r\n paramName,\r\n `Required parameter ${paramName} was null or undefined when calling ${functionName}.`,\r\n );\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const setApiKeyToObject = async function(object: any, keyParamName: string, configuration?: Configuration) {\r\n if (configuration && configuration.apiKey) {\r\n const localVarApiKeyValue =\r\n typeof configuration.apiKey === 'function'\r\n ? await configuration.apiKey(keyParamName)\r\n : await configuration.apiKey;\r\n object[keyParamName] = localVarApiKeyValue;\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const setBasicAuthToObject = function(object: any, configuration?: Configuration) {\r\n if (configuration && (configuration.username || configuration.password)) {\r\n object['auth'] = { username: configuration.username, password: configuration.password };\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const setBearerAuthToObject = async function(object: any, configuration?: Configuration) {\r\n if (configuration && configuration.accessToken) {\r\n const accessToken =\r\n typeof configuration.accessToken === 'function'\r\n ? await configuration.accessToken()\r\n : await configuration.accessToken;\r\n object['Authorization'] = 'Bearer ' + accessToken;\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const setOAuthToObject = async function(\r\n object: any,\r\n name: string,\r\n scopes: string[],\r\n configuration?: Configuration,\r\n) {\r\n if (configuration && configuration.accessToken) {\r\n const localVarAccessTokenValue =\r\n typeof configuration.accessToken === 'function'\r\n ? await configuration.accessToken(name, scopes)\r\n : await configuration.accessToken;\r\n object['Authorization'] = 'Bearer ' + localVarAccessTokenValue;\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const setSearchParams = function(url: URL, ...objects: any[]) {\r\n const searchParams = new URLSearchParams(url.search);\r\n for (const object of objects) {\r\n for (const key in object) {\r\n if (typeof object[key] === 'object') {\r\n for (const subKey in object[key]) {\r\n const subValue = object[key][subKey];\r\n if (subValue !== null && subValue !== undefined) {\r\n if (Array.isArray(subValue)) {\r\n for (const i in subValue) {\r\n searchParams.append(subKey, subValue[i]);\r\n }\r\n } else {\r\n searchParams.set(subKey, subValue);\r\n }\r\n }\r\n }\r\n } else {\r\n searchParams.set(key, object[key]);\r\n }\r\n }\r\n }\r\n url.search = searchParams.toString();\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const serializeDataIfNeeded = function(value: any, requestOptions: any, configuration?: Configuration) {\r\n const nonString = typeof value !== 'string';\r\n const needsSerialization =\r\n nonString && configuration && configuration.isJsonMime\r\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\r\n : nonString;\r\n return needsSerialization ? JSON.stringify(value !== undefined ? value : {}) : value || '';\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const toPathString = function(url: URL) {\r\n return url.pathname + url.search + url.hash;\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const createRequestFunction = function(\r\n axiosArgs: RequestArgs,\r\n globalAxios: AxiosInstance,\r\n BASE_PATH: string,\r\n configuration?: Configuration,\r\n) {\r\n return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\r\n const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };\r\n return axios.request(axiosRequestArgs);\r\n };\r\n};\r\n","import Vue from 'vue';\r\n\r\nexport const NotificationProvider = new Vue({\r\n methods: {\r\n async success(text: string, timeout?: number) {\r\n this.notifyColor(text, 'success', timeout);\r\n },\r\n async error(text: string, timeout?: number) {\r\n this.notifyColor(text, 'error', timeout);\r\n },\r\n async info(text: string, timeout?: number) {\r\n this.notifyColor(text, 'info', timeout);\r\n },\r\n async warning(text: string, timeout?: number) {\r\n this.notifyColor(text, 'warning', timeout);\r\n },\r\n async notify(text: string, timeout?: number) {\r\n this.notifyColor(text, '', timeout);\r\n },\r\n // eslint-disable-next-line\r\n async notifyColor(text: string, color: string, timeout?: number) {\r\n this.$eventHub.$emit('SHOW-SNACK-BAR', { text, color, timeout });\r\n },\r\n },\r\n});\r\n","import {\r\n AccountInfo,\r\n AuthenticationResult,\r\n Configuration,\r\n EndSessionRequest,\r\n InteractionRequiredAuthError,\r\n PublicClientApplication,\r\n RedirectRequest,\r\n SilentRequest,\r\n LogLevel,\r\n AuthError,\r\n AccountEntity,\r\n} from '@azure/msal-browser';\r\n\r\nimport { LoggingService } from '@/core/services';\r\nimport { store } from '@/core/store';\r\nimport router from '@/router';\r\n\r\nconst SIGN_UP_SIGN_IN_AUTHORITY = process.env.VUE_APP_B2C_SIGN_UP_SIGN_IN_AUTHORITY;\r\nconst SIGN_UP_AUTHORITY = process.env.VUE_APP_B2C_SIGN_UP_AUTHORITY;\r\nconst RESET_PASSWORD_AUTHORITY = process.env.VUE_APP_B2C_PASSWORD_RESET_AUTHORITY;\r\n\r\nconst DEFAULT_UNAUTHENTICATED_REDIRECT_URI = '/';\r\nconst DEFAULT_AUTHENTICATED_REDIRECT_URI = '/';\r\nconst CANCEL_ERROR_CODE = 'AADB2C90091';\r\nconst PASSWORD_RESET_ERROR_CODE = 'AADB2C90118';\r\n\r\nconst MSAL_CONFIG: Configuration = {\r\n auth: {\r\n clientId: process.env.VUE_APP_B2C_CLIENT_ID,\r\n authority: SIGN_UP_SIGN_IN_AUTHORITY,\r\n knownAuthorities: [SIGN_UP_SIGN_IN_AUTHORITY, SIGN_UP_AUTHORITY, RESET_PASSWORD_AUTHORITY],\r\n redirectUri: process.env.VUE_APP_B2C_REDIRECT_URI,\r\n // We have custom code to handle return URL's. We are using custom code as we want\r\n // to retrieve the logged in user roles before redirecting to the return URL\r\n navigateToLoginRequestUrl: false,\r\n },\r\n cache: {\r\n cacheLocation: 'localStorage',\r\n storeAuthStateInCookie: false, // Set this to \"true\" if you are having issues on IE11 or Edge\r\n },\r\n system: {\r\n loggerOptions: {\r\n loggerCallback: (level, message, containsPii) => {\r\n if (containsPii) {\r\n return;\r\n }\r\n\r\n switch (level) {\r\n case LogLevel.Error:\r\n LoggingService.error(message);\r\n return;\r\n case LogLevel.Info:\r\n LoggingService.info(message);\r\n return;\r\n case LogLevel.Verbose:\r\n LoggingService.debug(message);\r\n return;\r\n case LogLevel.Warning:\r\n LoggingService.warn(message);\r\n return;\r\n }\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport class AuthService {\r\n private myMSALObj: PublicClientApplication;\r\n private account: AccountInfo | null;\r\n private loginRedirectRequest: RedirectRequest;\r\n\r\n constructor() {\r\n window.addEventListener('load', async () => {\r\n this.loadAuthModule();\r\n });\r\n\r\n this.myMSALObj = new PublicClientApplication(MSAL_CONFIG);\r\n this.account = this.getLoggedInAccount();\r\n\r\n this.loginRedirectRequest = {\r\n scopes: [process.env.VUE_APP_KESTREL_API_SCOPE],\r\n redirectStartPage: process.env.VUE_APP_B2C_REDIRECT_URI,\r\n };\r\n }\r\n\r\n /**\r\n * Checks whether we are in the middle of a redirect and handles state accordingly. Only required for redirect flows.\r\n *\r\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs\r\n * /initialization.md#redirect-apis\r\n */\r\n loadAuthModule() {\r\n this.myMSALObj\r\n .handleRedirectPromise()\r\n .then((response: AuthenticationResult | null) => {\r\n this.handleResponse(response);\r\n })\r\n .catch(error => {\r\n if (error && error instanceof AuthError) {\r\n const authError = error as AuthError;\r\n\r\n if (this.isOfErrorCode(authError, CANCEL_ERROR_CODE)) {\r\n // The user has clicked \"Cancel\" on B2C policy form\r\n this.goToDefaultRoute();\r\n return;\r\n } else if (this.isOfErrorCode(authError, PASSWORD_RESET_ERROR_CODE)) {\r\n // User has requested a password reset - redirect them to tha correct policy\r\n this.passwordReset();\r\n return;\r\n }\r\n }\r\n\r\n LoggingService.error(error);\r\n });\r\n }\r\n\r\n isOfErrorCode(error: AuthError, errorCode: string) {\r\n return error.errorCode === 'access_denied' && error.errorMessage.startsWith(`${errorCode}:`);\r\n }\r\n\r\n /**\r\n * Redirects user to the default route. The default route depends on whether the user is logged in or not.\r\n */\r\n goToDefaultRoute() {\r\n if (this.isAuthenticated()) {\r\n router.push(DEFAULT_AUTHENTICATED_REDIRECT_URI);\r\n } else {\r\n router.push(DEFAULT_UNAUTHENTICATED_REDIRECT_URI);\r\n }\r\n }\r\n\r\n register() {\r\n const signUpRequest: RedirectRequest = {\r\n scopes: [process.env.VUE_APP_KESTREL_API_SCOPE],\r\n authority: SIGN_UP_AUTHORITY,\r\n redirectStartPage: DEFAULT_UNAUTHENTICATED_REDIRECT_URI,\r\n };\r\n\r\n this.myMSALObj.loginRedirect(signUpRequest);\r\n }\r\n\r\n login() {\r\n this.myMSALObj.loginRedirect(this.loginRedirectRequest);\r\n }\r\n\r\n passwordReset() {\r\n const passwordResetRequest: RedirectRequest = {\r\n scopes: [process.env.VUE_APP_KESTREL_API_SCOPE],\r\n authority: RESET_PASSWORD_AUTHORITY,\r\n redirectStartPage: DEFAULT_UNAUTHENTICATED_REDIRECT_URI,\r\n };\r\n\r\n this.myMSALObj.loginRedirect(passwordResetRequest);\r\n }\r\n\r\n logout(redirectToRoute: string = DEFAULT_UNAUTHENTICATED_REDIRECT_URI): void {\r\n if (!this.isAuthenticated()) {\r\n return;\r\n }\r\n\r\n const logOutRequest: EndSessionRequest = {\r\n account: this.getLoggedInAccountOrThrow(),\r\n postLogoutRedirectUri: redirectToRoute,\r\n };\r\n\r\n this.account = null;\r\n this.myMSALObj.logoutRedirect(logOutRequest);\r\n }\r\n\r\n isAuthenticated() {\r\n return this.account !== null || this.getLoggedInAccount() !== null;\r\n }\r\n\r\n /**\r\n * Maybe add account chooser code in the future. For now, just select the LAST one found.\r\n * Initial setup done by Tomas would pick up the first one found, but I think that might be causing issues.\r\n * Will try test this change out and see how it goes.\r\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Accounts.md\r\n *\r\n * By Kit:\r\n * The difference between getLoggedInAccount and getLoggedInAccountOrThrow is that the second one throws, so it's\r\n * unsafe. I wanted to merge these 2 methods, but I suspect that the safe version was actually kind of needed\r\n * somewhere, instead of interrupting the flow by throwing errors.\r\n */\r\n getLoggedInAccount() {\r\n const cachedAccounts = this.myMSALObj.getAllAccounts();\r\n\r\n // NOTE: Keeping the commented code for potential future debugging\r\n // for (const i in cachedAccounts) {\r\n // const acc = cachedAccounts[i];\r\n // const key = AccountEntity.generateAccountCacheKey(acc);\r\n // console.log('---- ' + key);\r\n // console.log(acc);\r\n // console.log(new Date((acc.idTokenClaims as any).exp * 1000));\r\n // }\r\n\r\n if (!cachedAccounts || cachedAccounts.length === 0) {\r\n this.account = null;\r\n return null;\r\n }\r\n\r\n const orderedByExpiry = cachedAccounts.sort(p => (p.idTokenClaims as any).exp);\r\n const activeAccount = orderedByExpiry[orderedByExpiry.length - 1];\r\n\r\n // Check if latest token has expired\r\n const exp = (activeAccount.idTokenClaims as any)?.exp;\r\n if (!exp || exp <= Date.now() / 1000) {\r\n this.removeStaleAccounts(cachedAccounts, '');\r\n this.account = null;\r\n return null;\r\n }\r\n\r\n this.account = activeAccount;\r\n\r\n if (cachedAccounts.length > 1) {\r\n const activeAccountKey = AccountEntity.generateAccountCacheKey(activeAccount);\r\n this.removeStaleAccounts(cachedAccounts, activeAccountKey);\r\n }\r\n\r\n return activeAccount;\r\n }\r\n\r\n removeStaleAccounts(accountsToRemove: AccountInfo[], activeAccountKey: string) {\r\n const keysToRemove: string[] = [];\r\n\r\n for (const i in accountsToRemove) {\r\n const key = AccountEntity.generateAccountCacheKey(accountsToRemove[i]);\r\n if (key !== activeAccountKey) {\r\n keysToRemove.push(key);\r\n }\r\n }\r\n\r\n for (const i in keysToRemove) {\r\n (this.myMSALObj as any).browserStorage.removeAccount(keysToRemove[i]);\r\n console.log(`Removed stale account: ${keysToRemove[i]}`);\r\n }\r\n }\r\n\r\n getLoggedInAccountOrThrow() {\r\n const account = this.getLoggedInAccount();\r\n if (account === null) {\r\n throw new Error('User is not currently logged in');\r\n }\r\n\r\n return account;\r\n }\r\n\r\n /**\r\n * Gets the token silently, or falls back to interactive redirect.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n async getTokenRedirect(silentRequest: SilentRequest, interactiveRequest?: RedirectRequest) {\r\n try {\r\n const response = await this.myMSALObj.acquireTokenSilent(silentRequest);\r\n return response.accessToken;\r\n } catch (e) {\r\n if (e instanceof InteractionRequiredAuthError) {\r\n this.myMSALObj.acquireTokenRedirect(this.loginRedirectRequest).catch(LoggingService.error);\r\n } else {\r\n LoggingService.error(e);\r\n }\r\n }\r\n\r\n return '';\r\n }\r\n\r\n async getAccessToken() {\r\n if (!this.isAuthenticated) {\r\n return '';\r\n }\r\n\r\n const silentRequest: SilentRequest = {\r\n scopes: [process.env.VUE_APP_KESTREL_API_SCOPE],\r\n forceRefresh: false,\r\n account: this.getLoggedInAccountOrThrow(),\r\n };\r\n\r\n return await this.getTokenRedirect(silentRequest);\r\n }\r\n\r\n /**\r\n * Handles the response from a popup or redirect. If response is null, will check if we have any\r\n * accounts and attempt to sign in.\r\n */\r\n private async handleResponse(response: AuthenticationResult | null) {\r\n this.account = response !== null ? response.account : this.getLoggedInAccount();\r\n\r\n if (this.account) {\r\n // We are logged in! Now get user profile data for this user\r\n store.dispatch('setUserProfile');\r\n\r\n // Once the user profile is updated, the /authenticate component will spot this and\r\n // redirect the user the correct URL\r\n } else if (response === null) {\r\n // This is probably caused by the \"interaction_in_progress: Interaction is currently in progress\" error.\r\n if (router.currentRoute.path === '/authenticate') {\r\n router.push(DEFAULT_UNAUTHENTICATED_REDIRECT_URI);\r\n }\r\n }\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport Vue from 'vue';\r\nimport Vuex from 'vuex';\r\n\r\nimport { ApiService } from '@/core/services';\r\nimport { GetUserProfileModel } from '@/core/webapi';\r\nimport { RegistrationType } from '../models';\r\n\r\nVue.use(Vuex);\r\n\r\n// Storage keys\r\nconst USER_PROFILE_KEY = 'ida-user-profile';\r\n\r\nconst MsalService = new Vue({\r\n methods: {\r\n logout(redirectToRouteName?: string) {\r\n this.$msal.logout(redirectToRouteName);\r\n },\r\n },\r\n});\r\n\r\nfunction getUserProfileFromStorage() {\r\n const userProfile = sessionStorage.getItem(USER_PROFILE_KEY);\r\n\r\n if (userProfile) {\r\n return (JSON.parse(userProfile) as any) as GetUserProfileModel;\r\n }\r\n}\r\n\r\n/**\r\n * Vuex Store\r\n *\r\n * TODO: This store is NOT strongly typed. It should be.\r\n * I did not have the time to look into and implementing strongly typing\r\n * the store. Maybe we could do it in another project!\r\n * Examples:\r\n * - https://next.vuex.vuejs.org/guide/typescript-support.html\r\n * - https://medium.com/swlh/properly-typed-vuex-stores-427bf4c6a3d1\r\n */\r\nexport const store = new Vuex.Store({\r\n state: {\r\n userProfile: getUserProfileFromStorage(),\r\n isFetchingUserProfile: false,\r\n },\r\n getters: {\r\n userProfile(state) {\r\n return getUserProfileFromStorage();\r\n },\r\n },\r\n mutations: {\r\n setUserProfile(state, payload) {\r\n state.userProfile = payload;\r\n\r\n if (String(payload)) {\r\n sessionStorage.setItem(USER_PROFILE_KEY, JSON.stringify(payload));\r\n } else {\r\n // There is nothing to store so remove values from localstorage\r\n sessionStorage.removeItem(USER_PROFILE_KEY);\r\n }\r\n },\r\n },\r\n actions: {\r\n setUserProfile({ state, commit }) {\r\n if (state.isFetchingUserProfile) {\r\n return;\r\n }\r\n\r\n state.isFetchingUserProfile = true;\r\n\r\n ApiService.users()\r\n .getUserProfile()\r\n .then(({ data }) => {\r\n commit('setUserProfile', data);\r\n })\r\n .catch(e => {\r\n if (e && e.response && e.response.status === 401) {\r\n // This user does not have the permissions to access the backend\r\n // TODO: Show message and redirect to home instead?\r\n // TODO: The store shouldn't be calling logout anyway, this needs to be handled outside the store.\r\n MsalService.logout('/no-access.html');\r\n }\r\n })\r\n .finally(() => {\r\n state.isFetchingUserProfile = false;\r\n });\r\n },\r\n\r\n clearUserData({ commit, state }) {\r\n commit('setUserProfile', '');\r\n },\r\n },\r\n});\r\n","import Vue from 'vue';\r\nimport Vuetify from 'vuetify/lib/framework';\r\n\r\nVue.use(Vuetify);\r\n\r\n// 00953a - initial colour\r\n// 167e48 - best one so far\r\n// 06923d - from https://idaireland.getproven.com/?view=grid\r\nconst color = '#479f6f'; // 57ad70 // '#16997f'; // #479f6f\r\n\r\nexport default new Vuetify({\r\n theme: {\r\n themes: {\r\n light: {\r\n primary: color,\r\n },\r\n dark: {\r\n primary: color,\r\n },\r\n },\r\n },\r\n});\r\n","/* tslint:disable */\r\n/* eslint-disable */\r\n/**\r\n * IDA_Kestrel API\r\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\r\n *\r\n * The version of the OpenAPI document: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\r\n * https://openapi-generator.tech\r\n * Do not edit the class manually.\r\n */\r\n\r\nimport { Configuration } from './configuration';\r\n// Some imports not used depending on template conditions\r\n// @ts-ignore\r\nimport globalAxios, { AxiosPromise, AxiosInstance } from 'axios';\r\n\r\nexport const BASE_PATH = 'http://host.docker.internal:20790'.replace(/\\/+$/, '');\r\n\r\n/**\r\n *\r\n * @export\r\n */\r\nexport const COLLECTION_FORMATS = {\r\n csv: ',',\r\n ssv: ' ',\r\n tsv: '\\t',\r\n pipes: '|',\r\n};\r\n\r\n/**\r\n *\r\n * @export\r\n * @interface RequestArgs\r\n */\r\nexport interface RequestArgs {\r\n url: string;\r\n options: any;\r\n}\r\n\r\n/**\r\n *\r\n * @export\r\n * @class BaseAPI\r\n */\r\nexport class BaseAPI {\r\n protected configuration: Configuration | undefined;\r\n\r\n constructor(\r\n configuration?: Configuration,\r\n protected basePath: string = BASE_PATH,\r\n protected axios: AxiosInstance = globalAxios,\r\n ) {\r\n if (configuration) {\r\n this.configuration = configuration;\r\n this.basePath = configuration.basePath || this.basePath;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n *\r\n * @export\r\n * @class RequiredError\r\n * @extends {Error}\r\n */\r\nexport class RequiredError extends Error {\r\n name: 'RequiredError' = 'RequiredError';\r\n constructor(public field: string, msg?: string) {\r\n super(msg);\r\n }\r\n}\r\n","/* tslint:disable */\r\n/* eslint-disable */\r\n/**\r\n * IDA_Kestrel API\r\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\r\n *\r\n * The version of the OpenAPI document: v1\r\n *\r\n *\r\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\r\n * https://openapi-generator.tech\r\n * Do not edit the class manually.\r\n */\r\n\r\nexport interface ConfigurationParameters {\r\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\r\n username?: string;\r\n password?: string;\r\n accessToken?:\r\n | string\r\n | Promise<string>\r\n | ((name?: string, scopes?: string[]) => string)\r\n | ((name?: string, scopes?: string[]) => Promise<string>);\r\n basePath?: string;\r\n baseOptions?: any;\r\n formDataCtor?: new () => any;\r\n}\r\n\r\nexport class Configuration {\r\n /**\r\n * parameter for apiKey security\r\n * @param name security name\r\n * @memberof Configuration\r\n */\r\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\r\n /**\r\n * parameter for basic security\r\n *\r\n * @type {string}\r\n * @memberof Configuration\r\n */\r\n username?: string;\r\n /**\r\n * parameter for basic security\r\n *\r\n * @type {string}\r\n * @memberof Configuration\r\n */\r\n password?: string;\r\n /**\r\n * parameter for oauth2 security\r\n * @param name security name\r\n * @param scopes oauth2 scope\r\n * @memberof Configuration\r\n */\r\n accessToken?:\r\n | string\r\n | Promise<string>\r\n | ((name?: string, scopes?: string[]) => string)\r\n | ((name?: string, scopes?: string[]) => Promise<string>);\r\n /**\r\n * override base path\r\n *\r\n * @type {string}\r\n * @memberof Configuration\r\n */\r\n basePath?: string;\r\n /**\r\n * base options for axios calls\r\n *\r\n * @type {any}\r\n * @memberof Configuration\r\n */\r\n baseOptions?: any;\r\n /**\r\n * The FormData constructor that will be used to create multipart form data\r\n * requests. You can inject this here so that execution environments that\r\n * do not support the FormData class can still run the generated client.\r\n *\r\n * @type {new () => FormData}\r\n */\r\n formDataCtor?: new () => any;\r\n\r\n constructor(param: ConfigurationParameters = {}) {\r\n this.apiKey = param.apiKey;\r\n this.username = param.username;\r\n this.password = param.password;\r\n this.accessToken = param.accessToken;\r\n this.basePath = param.basePath;\r\n this.baseOptions = param.baseOptions;\r\n this.formDataCtor = param.formDataCtor;\r\n }\r\n\r\n /**\r\n * Check if the given MIME is a JSON MIME.\r\n * JSON MIME examples:\r\n * application/json\r\n * application/json; charset=UTF8\r\n * APPLICATION/JSON\r\n * application/vnd.company+json\r\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\r\n * @return True if the given MIME is JSON, false otherwise.\r\n */\r\n public isJsonMime(mime: string): boolean {\r\n const jsonMime: RegExp = new RegExp('^(application/json|[^;/ \\t]+/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\r\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\r\n }\r\n}\r\n"],"sourceRoot":""}