{"version":3,"file":"stores-D1f72ti0.js","sources":["../../ClientApp/src/services/IConfigService.ts","../../ClientApp/src/features/common/stores/routerMiddlewares.ts","../../ClientApp/src/i18n/index.ts","../../ClientApp/src/plugins/axios.ts","../../ClientApp/src/services/AppConfigService.ts","../../ClientApp/src/services/ILogger.ts","../../ClientApp/src/services/Logger.ts","../../ClientApp/src/services/ICartApi.ts","../../ClientApp/src/types/webapi/ProductType.generated.ts","../../ClientApp/src/types/webapi/TravellerTypes.generated.ts","../../ClientApp/src/services/BaseApi.ts","../../ClientApp/src/services/CartApi.ts","../../ClientApp/src/services/IOrderApi.ts","../../ClientApp/src/services/OrderApi.ts","../../ClientApp/src/services/IPaymentApi.ts","../../ClientApp/src/services/PaymentApi.ts","../../ClientApp/src/services/ITicketApi.ts","../../ClientApp/src/services/TicketApi.ts","../../ClientApp/src/services/ITravelCardsApi.ts","../../ClientApp/src/services/TravelCardsApi.ts","../../ClientApp/src/services/ICityLookupApi.ts","../../ClientApp/src/services/CityLookupApi.ts","../../ClientApp/src/services/IProfileApi.ts","../../ClientApp/src/services/ProfileApi.ts","../../ClientApp/src/plugins/inversify.ts","../../ClientApp/src/features/common/stores/mainStore.ts"],"sourcesContent":["import type { AppConfigDto } from '@/types/webapi';\n\nexport const IConfigServiceId = Symbol.for('IConfigService');\n\nexport interface IConfigService {\n getConfig(): Promise;\n}\n","import { RouteLocationNormalized, NavigationGuardNext } from 'vue-router';\nimport useMainStore from './mainStore';\n\n/**\n * vue-router navigation guard that registers the debug mode flag\n */\nexport function commonQueryParamMiddleware(to: RouteLocationNormalized, _: RouteLocationNormalized, next: NavigationGuardNext) {\n const { debugMode } = to.query;\n\n if (debugMode) {\n const mainStore = useMainStore();\n mainStore.isDebugMode = debugMode === 'true';\n }\n\n next();\n}\n","import { createI18n, type I18n } from 'vue-i18n';\nimport { nextTick } from 'vue';\nimport type { RouteLocationNormalized, NavigationGuardNext, RouteLocationRaw } from 'vue-router';\nimport { useMainStore } from '@/features/common/stores';\nimport { isEmpty, merge } from 'lodash-es';\nimport { useContainer } from '@/plugins/inversify';\nimport { IAxiosId } from '@/plugins/axios';\nimport type { AxiosInstance } from 'axios';\nimport { en, no } from 'vuetify/locale';\nimport { en as _en, no as _no } from '@geta/kolumbus-frontend/locale';\n\nconst defaultMessages: any = {\n en: {\n $vuetify: { ...en, ..._en }\n },\n no: {\n $vuetify: { ...no, ..._no }\n }\n};\n\nfunction setupI18n(options = { locale: 'no' }) {\n const i18n = createI18n({\n fallbackLocale: 'en',\n legacy: false,\n globalInjection: true,\n ...options\n });\n setI18nLanguage(i18n, options.locale);\n return i18n;\n}\n\nconst i18n = setupI18n();\nexport default i18n;\n\nexport function setI18nLanguage(i18n: I18n<{}, {}, {}, string, false>, locale: string) {\n i18n.global.locale.value = locale;\n document.querySelector('html')?.setAttribute('lang', locale);\n}\n\nexport async function loadLocaleMessages(i18n: I18n<{}, {}, {}, string, false>, locale: string) {\n const container = useContainer();\n const axios = container.get(IAxiosId);\n const mainStore = useMainStore();\n\n try {\n // load locale messages with dynamic import\n const res = await axios.get(`/jsl10n/Kolumbus.Webshop.Web?camel=true&json=true&lang=${locale}`);\n const { common } = res.data.kolumbus.webshop.web.features;\n const { resources, webshopResources } = common;\n\n // set locale and locale message\n i18n.global.setLocaleMessage(locale, merge({}, defaultMessages[locale], { common: { resources } }, webshopResources));\n } catch (e) {\n mainStore.registerError(e);\n }\n\n return nextTick();\n}\n\nexport async function routeMiddleware(to: RouteLocationNormalized, _from: RouteLocationNormalized, next: NavigationGuardNext) {\n const paramLocale = Array.isArray(to.params.locale) ? to.params.locale[0] : to.params.locale;\n const mainStore = useMainStore();\n\n // use locale if paramsLocale is not in SUPPORT_LOCALES\n if (mainStore.config.supportedLanguages.indexOf(paramLocale) == -1) {\n return next({ params: { locale: mainStore.language } });\n }\n\n // set language in mainStore\n mainStore.language = paramLocale;\n\n // load locale messages\n if (!i18n.global.availableLocales.includes(paramLocale) || isEmpty(i18n.global.getLocaleMessage(paramLocale))) {\n await loadLocaleMessages(i18n, paramLocale);\n }\n\n // set i18n language\n setI18nLanguage(i18n, paramLocale);\n\n return next();\n}\n\nexport function i18nRoute(to: any): RouteLocationRaw {\n return merge(to, { params: { locale: i18n.global.locale.value } });\n}\n","import axios from 'axios';\nimport i18n from '@/i18n';\nimport { parseISO } from 'date-fns';\n\nconst ax = axios.create();\nax.interceptors.request.use(\n config => {\n config.headers['Accept-Language'] = i18n.global.locale.value;\n return config;\n },\n error => {\n return Promise.reject(error);\n }\n);\n\n// Axios response interceptor that converts ISO date strings to JS Date instances.\n// ref: https://medium.com/@vladkens/automatic-parsing-of-date-strings-in-rest-protocol-with-typescript-cf43554bd157\nconst ISODateFormat = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[-+]\\d{2}:?\\d{2}|Z)?$/;\n\nfunction isIsoDateString(value: unknown): value is string {\n return typeof value === 'string' && ISODateFormat.test(value);\n}\n\nfunction handleDates(data: unknown) {\n if (isIsoDateString(data)) return parseISO(data);\n\n if (data === null || data === undefined || typeof data !== 'object') return data;\n\n for (const [key, val] of Object.entries(data)) {\n // @ts-expect-error this is a hack to make the type checker happy\n if (isIsoDateString(val)) data[key] = parseISO(val);\n else if (typeof val === 'object') handleDates(val);\n }\n\n return data;\n}\n\nax.interceptors.response.use(rep => {\n handleDates(rep.data);\n return rep;\n});\n\nexport const IAxiosId = Symbol.for('Axios');\nexport { ax };\nexport type { AxiosInstance } from 'axios';\n","import type { AppConfigDto } from '@/types/webapi';\nimport { IConfigService } from './IConfigService';\nimport { inject, injectable } from 'inversify';\nimport { AxiosInstance, IAxiosId } from '@/plugins/axios';\nimport { useMainStore } from '@/features/common/stores';\n\n@injectable()\nexport default class AppConfigService implements IConfigService {\n @inject(IAxiosId)\n protected axios: AxiosInstance;\n\n _mainStore: ReturnType;\n get mainStore(): ReturnType {\n if (!this._mainStore) {\n this._mainStore = useMainStore();\n }\n\n return this._mainStore;\n }\n\n getConfig() {\n return new Promise((resolve, reject) => {\n this.axios\n .get('/api/v1.0/config')\n .then(response => resolve(response.data))\n .catch(e => {\n this.mainStore.registerError(e);\n reject(e);\n });\n });\n }\n}\n","export const ILoggerId = Symbol.for('ILogger');\n\nexport interface ILogger {\n log(...args: any[]): void;\n error(...args: any[]): void;\n info(...args: any[]): void;\n warn(...args: any[]): void;\n}\n\ndeclare global {\n interface Window {\n logging: boolean;\n }\n}\n","import { injectable } from 'inversify';\r\nimport { ILogger } from './ILogger';\r\n\r\n@injectable()\r\nexport default class Logger implements ILogger {\r\n // TODO: set this value based on devtools presence\r\n // TODO: add timestamp?\r\n // TODO: add logging level\r\n\r\n constructor() {\r\n window.logging = window.logging || !import.meta.env.PROD || false;\r\n }\r\n\r\n log(...args: any[]) {\r\n if (window.logging) console.log(...args); // eslint-disable-line no-console\r\n }\r\n\r\n error(...args: any[]) {\r\n if (window.logging) console.error(...args); // eslint-disable-line no-console\r\n }\r\n\r\n info(...args: any[]) {\r\n if (window.logging) console.info(...args); // eslint-disable-line no-console\r\n }\r\n\r\n warn(...args: any[]) {\r\n if (window.logging) console.warn(...args); // eslint-disable-line no-console\r\n }\r\n\r\n // TODO: add other console methods?\r\n}\r\n","import type { ShoppingCartDto, LineItemDto } from '@/types/webapi';\r\n\r\nexport const ICartApiId = Symbol.for('ICartApi');\r\n\r\nexport interface ICartApi {\r\n /**\r\n * Fetch shopping cart for current user.\r\n */\r\n getCart(): Promise;\r\n\r\n /**\r\n * Fetch shopping cart for current user, revalidate cart contents\r\n */\r\n validateCart(): Promise;\r\n\r\n /**\r\n * Sets the line item value in the shopping cart.\r\n * @param requestDto Request object\r\n */\r\n setLineItem(requestDto: Partial): Promise;\r\n\r\n /**\r\n * Clear the shopping cart.\r\n */\r\n clearCart(): Promise;\r\n}\r\n","/**\n * This is a TypeGen auto-generated file.\n * Any changes made to this file can be lost when this file is regenerated.\n */\n\nexport enum ProductType {\n Unknown = 0,\n Ticket = 10,\n TravelMoney = 20,\n TravelCard = 30,\n OtherWebshopProduct = 90,\n}\n","/**\n * This is a TypeGen auto-generated file.\n * Any changes made to this file can be lost when this file is regenerated.\n */\n\nexport enum TravellerTypes {\n Unknown = 0,\n Adult = 1,\n Children = 2,\n Student = 3,\n Youth = 64,\n Senior = 69,\n Conscript = 80,\n}\n","import { inject, injectable } from 'inversify';\r\nimport { ILoggerId, ILogger } from '@/services/ILogger';\r\nimport { AxiosInstance, isAxiosError } from 'axios';\r\nimport { IAxiosId } from '@/plugins/axios';\r\n\r\n@injectable()\r\nexport abstract class BaseApi {\r\n @inject(ILoggerId)\r\n logger: ILogger;\r\n\r\n @inject(IAxiosId)\r\n http: AxiosInstance;\r\n\r\n httpGet(url: string, data?: any, timeout?: number) {\r\n return new Promise((resolve, reject) => {\r\n this.logger.log('[BaseApi.get] Making GET request', url, data);\r\n this.http\r\n .get(url, { ...data, timeout })\r\n .then(response => {\r\n this.logger.log('[BaseApi.get] Received response', response);\r\n resolve(response.data);\r\n })\r\n .catch(e => {\r\n if (this.handleAuthError(e)) {\r\n resolve(null as T);\r\n }\r\n\r\n reject(this.errorHandler(e));\r\n });\r\n });\r\n }\r\n\r\n httpPost(url: string, data?: any) {\r\n return new Promise((resolve, reject) => {\r\n this.logger.log('[BaseApi.post] Making POST request', url, data);\r\n this.http\r\n .post(url, data)\r\n .then(response => {\r\n this.logger.log('[BaseApi.post] Received response', response);\r\n resolve(response.data);\r\n })\r\n .catch(e => {\r\n if (this.handleAuthError(e)) {\r\n resolve(null as T);\r\n }\r\n\r\n reject(this.errorHandler(e));\r\n });\r\n });\r\n }\r\n\r\n httpPut(url: string, data?: any) {\r\n return new Promise((resolve, reject) => {\r\n this.logger.log('[BaseApi.put] Making PUT request', url, data);\r\n this.http\r\n .put(url, data)\r\n .then(response => {\r\n this.logger.log('[BaseApi.put] Received response', response);\r\n resolve(response.data);\r\n })\r\n .catch(e => {\r\n if (this.handleAuthError(e)) {\r\n resolve(null as T);\r\n }\r\n\r\n reject(this.errorHandler(e));\r\n });\r\n });\r\n }\r\n\r\n handleAuthError(e: unknown): boolean {\r\n if (isAxiosError(e) && (e.response?.status === 401 || e.response?.status === 403)) {\r\n this.logger.log('[BaseApi.handleAuthError] Auth error. Redirecting to login page.');\r\n window.location.href = `/Authenticate/?returnUrl=${encodeURI(window.location.href)}`;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n errorHandler(e: unknown) {\r\n if (!isAxiosError(e)) return e;\r\n \r\n switch (e.response?.status) {\r\n case 404:\r\n return new Error('errorMessages.api.notFound');\r\n case 400:\r\n return new Error(e.response?.data || 'errorMessages.api.badRequest');\r\n default:\r\n return new Error(e.response?.data || 'An error occurred');\r\n }\r\n }\r\n}\r\n","import { injectable } from 'inversify';\r\nimport { ShoppingCartDto, AddLineItemRequestDto, LineItemDto, ProductType, TravelCard } from '@/types/webapi';\r\nimport { BaseApi } from './BaseApi';\r\nimport { AxiosError } from 'axios';\r\nimport { ICartApi } from './ICartApi';\r\n\r\n/**\r\n * API service that communicates with the Webshop Cart Web API endpoint.\r\n */\r\n@injectable()\r\nexport default class CartApi extends BaseApi implements ICartApi {\r\n async getCart() {\r\n this.logger.log('[CartApi.getCart] Fetching cart');\r\n return await this.httpGet('/api/v1.0/cart');\r\n }\r\n\r\n async validateCart() {\r\n this.logger.log('[CartApi.validateCart] Validating cart');\r\n return await this.httpGet('/api/v1.0/cart/validate');\r\n }\r\n\r\n async clearCart() {\r\n this.logger.log('[CartApi.clearCart] Clearing cart');\r\n return await this.httpPost('/api/v1.0/cart/clear');\r\n }\r\n\r\n async setLineItem(lineItem: LineItemDto) {\r\n this.logger.log('[CartApi.setLineItem] Setting lineItem', lineItem);\r\n\r\n // if lineItem is null, clear cart\r\n if (!lineItem) {\r\n this.logger.log('[CartApi.setLineItem] LineItem is null. Clearing cart.');\r\n return await this.clearCart();\r\n }\r\n\r\n const requestDto: AddLineItemRequestDto = {\r\n categoryId: lineItem.categoryId,\r\n configurationId: lineItem.configurationId,\r\n amount: lineItem.price,\r\n productId: lineItem.productId,\r\n zones: lineItem.zones ? lineItem.zones.map(x => x.id).join(',') : undefined,\r\n travelCard: lineItem.travelCard as TravelCard,\r\n isTravelMoney: lineItem.productType === ProductType.TravelMoney\r\n };\r\n\r\n return await this.httpPost('/api/v1.0/cart', requestDto);\r\n }\r\n\r\n errorHandler(e: AxiosError) {\r\n switch (e.response && e.response.status) {\r\n case 404:\r\n return new Error('errorMessages.cart.notFound');\r\n default:\r\n return super.errorHandler(e);\r\n }\r\n }\r\n}\r\n","import type { OrderDto, OrdersPageDto } from '@/types/webapi';\r\n\r\nexport const IOrderApiId = Symbol.for('IOrderApi');\r\n\r\nexport interface IOrderApi {\r\n /**\r\n * Fetch certain order for current user.\r\n */\r\n getOrder(orderId: string): Promise;\r\n\r\n /**\r\n * Fetch certain order by order id and transaction id (used only for anonymous TC orders).\r\n */\r\n getOrderByTransactionId(orderId: string, transactionId: string): Promise;\r\n\r\n /**\r\n * Fetch orders for current user\r\n * @param skip Amount of orders to skip\r\n * @param take Amount of orders to take\r\n * @param createdAfter Orders created after\r\n */\r\n getOrdersPage(skip: number, take: number, createdAfter?: Date): Promise;\r\n}\r\n","import { injectable } from 'inversify';\r\nimport { BaseApi } from './BaseApi';\r\nimport { IOrderApi } from './IOrderApi';\r\nimport type { CheckoutStatusDto, OrderDto, OrdersPageDto } from '@/types/webapi';\r\n\r\n@injectable()\r\nexport default class OrderApi extends BaseApi implements IOrderApi {\r\n async getOrder(orderId: string) {\r\n this.logger.log('[OrderApi.getOrder] Fetching order ' + orderId);\r\n return await this.httpGet('/api/v1.0/orders/' + orderId);\r\n }\r\n\r\n async getOrderByTransactionId(orderId: string, transactionId: string) {\r\n this.logger.log('[OrderApi.getOrderByTransactionId] Fetching order ' + orderId + ' by transaction id' + transactionId);\r\n return await this.httpGet(`/api/v1.0/orders/${orderId}/${transactionId}`);\r\n }\r\n\r\n async getOrdersPage(skip: number, take: number, createdAfter?: Date ): Promise {\r\n this.logger.log('[OrderApi.getOrdersPage] Fetching orders page skip: ' + skip + ', take: ' + take + ', createdAfter: ' + createdAfter);\r\n return await this.httpGet('/api/v1.0/orders', {params: {skip, take, createdAfter }});\r\n }\r\n}\r\n","import type { InitiatePaymentResponseDto, CheckoutStatusDto, ProcessPaymentResponseDto } from '@/types/webapi';\r\n\r\nexport const IPaymentApiId = Symbol.for('IPaymentApi');\r\n\r\nexport interface IPaymentApi {\r\n initPayment(redirectUrl: string): Promise;\r\n getOrderData(transactionId: string): Promise;\r\n processPayment(transactionId: string): Promise;\r\n getStatus(transactionId: string, orderId: string, timeout?: number): Promise;\r\n cancelOrder(transactionId: string): Promise;\r\n}\r\n","import { injectable } from 'inversify';\r\nimport { IPaymentApi } from './IPaymentApi';\r\nimport { BaseApi } from './BaseApi';\r\nimport { AxiosError } from 'axios';\r\nimport type { CheckoutStatusDto, InitiatePaymentResponseDto, ProcessPaymentResponseDto } from '@/types/webapi';\r\n\r\n@injectable()\r\nexport default class PaymentApi extends BaseApi implements IPaymentApi {\r\n async initPayment(redirectUrl: string) {\r\n this.logger.log('[PaymentApi.initPayment] Initializing payment', redirectUrl);\r\n return await this.httpPost('/api/v1.0/payment/transaction', { redirectUrl });\r\n }\r\n\r\n async getOrderData(transactionId: string) {\r\n this.logger.log('[PaymentApi.getOrderData] Getting order data', transactionId);\r\n return await this.httpGet('/api/v1.0/payment/transaction/' + transactionId);\r\n }\r\n\r\n async processPayment(transactionId: string) {\r\n this.logger.log('[PaymentApi.processPayment] Processing payment', transactionId);\r\n return await this.httpPost(`/api/v1.0/payment/transaction/${transactionId}/process`);\r\n }\r\n\r\n async getStatus(transactionId: string, orderId: string, timeout?: number) {\r\n this.logger.log('[PaymentApi.getStatus] Getting payment status', transactionId, orderId);\r\n return await this.httpGet(`/api/v1.0/payment/transaction/status/${orderId}/${transactionId}`, null, timeout);\r\n }\r\n\r\n async cancelOrder(transactionId: string) {\r\n this.logger.log('[PaymentApi.cancelOrder] Cancelling order', transactionId);\r\n return await this.httpPost(`/api/v1.0/payment/transaction/${transactionId}/cancel`);\r\n }\r\n\r\n errorHandler(e: AxiosError) {\r\n switch (e.response?.status) {\r\n case 404:\r\n return new Error('errorMessages.transaction.notFound');\r\n case 400:\r\n return new Error('Unauthorized error');\r\n default:\r\n return super.errorHandler(e);\r\n }\r\n }\r\n}\r\n","import type { BoatQuayItemDto, TicketDto, TicketGroupDto, ZoneCompactDto, ZoneDto } from '@/types/webapi';\r\n\r\nexport const ITicketApiId = Symbol.for('ITicketApi');\r\n\r\nexport interface ITicketApi {\r\n /**\r\n * Fetches all available tickets.\r\n */\r\n getTickets(): Promise;\r\n\r\n /**\r\n * Fetches a matching Ticket based on the given parameters.\r\n * @param zones List of zone IDs\r\n * @param configId Configuration ID\r\n * @param categoryId Category ID\r\n */\r\n getTicket(zones: string, configId: string, categoryId: number): Promise;\r\n\r\n /**\r\n * Fetches all ticket zone polygons.\r\n */\r\n getTicketZonePolygons(): Promise;\r\n\r\n /**\r\n * Fetches all ticket zones excluding polygons.\r\n */\r\n getTicketZones(): Promise;\r\n\r\n /**\r\n * Fetches all quay data.\r\n */\r\n getQuays(): Promise;\r\n}\r\n","import { injectable } from 'inversify';\r\nimport { BaseApi } from './BaseApi';\r\nimport type { ITicketApi } from './ITicketApi';\r\nimport type { TicketDto, BoatQuayItemDto, TicketGroupDto, ZoneDto, ZoneCompactDto } from '@/types/webapi';\r\nimport type { AxiosError } from 'axios';\r\n\r\n@injectable()\r\nexport default class TicketApi extends BaseApi implements ITicketApi {\r\n async getTickets() {\r\n this.logger.log('[TicketApi.getTickets] Fetching tickets');\r\n return await this.httpGet('/api/v1.0/tickets');\r\n }\r\n\r\n async getTicket(zones: string, configId: string, categoryId: number) {\r\n this.logger.log('[TicketApi.getTicket] Fetching ticket for', zones, configId, categoryId);\r\n return await this.httpGet('/api/v1.0/tickets/single', {\r\n params: {\r\n zones,\r\n configId,\r\n categoryId\r\n }\r\n });\r\n }\r\n\r\n async getTicketZonePolygons() {\r\n this.logger.log('[TicketApi.getTicketZonePolygons] Fetching ticket zone polygons');\r\n return await this.httpGet('/api/v1.0/tickets/zones');\r\n }\r\n\r\n async getTicketZones() {\r\n this.logger.log('[TicketApi.getTicketZones] Fetching ticket zones');\r\n return await this.httpGet('/api/v1.0/tickets/compactzones');\r\n }\r\n\r\n async getQuays() {\r\n this.logger.log('[TicketApi.getQuays] Fetching quay data');\r\n return await this.httpGet('/api/v1.0/tickets/quays');\r\n }\r\n\r\n errorHandler(e: AxiosError) {\r\n switch (e.response?.status) {\r\n case 404:\r\n return new Error('errorMessages.tickets.notFound');\r\n default:\r\n return super.errorHandler(e);\r\n }\r\n }\r\n}\r\n","import type { TravelCardDto, TravelCardDataDto, InitiatePaymentResponseDto, OrderTravelCardDto } from '@/types/webapi';\r\n\r\nexport const ITravelCardsApiId = Symbol.for('ITravelCardsApi');\r\n\r\nexport interface ITravelCardsApi {\r\n /**\r\n * Fetches travel card list for current user.\r\n */\r\n list(): Promise;\r\n\r\n /**\r\n * Fetches travel card details\r\n * @param id Travel card ID\r\n */\r\n get(id: string): Promise;\r\n\r\n /**\r\n * Registers a new travel card to the current user.\r\n * @param id Travel card number\r\n * @param name Travel card name\r\n */\r\n register(id: string, name: string): Promise;\r\n\r\n /**\r\n * Validates the travel card against the FARA system.\r\n * @param id Travel card number\r\n */\r\n validate(id: string): Promise;\r\n\r\n /**\r\n * Initiates a payment for a travel card order.\r\n */\r\n orderTravelCard(orderDto: OrderTravelCardDto): Promise;\r\n}\r\n","import { injectable } from 'inversify';\r\nimport { BaseApi } from './BaseApi';\r\nimport { ITravelCardsApi } from './ITravelCardsApi';\r\nimport type { TravelCardDto, TravelCardDataDto, InitiatePaymentResponseDto, OrderTravelCardDto } from '@/types/webapi';\r\nimport { AxiosError } from 'axios';\r\n\r\n@injectable()\r\nexport default class TravelCardsApi extends BaseApi implements ITravelCardsApi {\r\n async list() {\r\n this.logger.log('[TravelCardsApi.list] Fetching all travelCards');\r\n return await this.httpGet('/api/v1.0/travelcards');\r\n }\r\n\r\n async get(id: string) {\r\n this.logger.log('[TravelCardsApi.get] Fetching single travelCard', id);\r\n return await this.httpGet('/api/v1.0/travelcards/' + id);\r\n }\r\n\r\n async register(id: string, name: string) {\r\n this.logger.log('[TravelCardsApi.register] Registering travelCard', id, name);\r\n return await this.httpPut('/api/v1.0/travelcards', {\r\n id,\r\n name\r\n });\r\n }\r\n\r\n async validate(id: string) {\r\n this.logger.log('[TravelCardsApi.register] Validating travelCard', id);\r\n return await this.httpGet(`/api/v1.0/travelcards/${id}/validate`);\r\n }\r\n\r\n async orderTravelCard(orderDto: OrderTravelCardDto) : Promise {\r\n this.logger.log('[TravelCardsApi.orderTravelCard] Ordering travelCard', orderDto);\r\n return await this.httpPost('/api/v1.0/travelcards/ordertravelcard', orderDto);\r\n }\r\n\r\n errorHandler(e: AxiosError) {\r\n switch (e.response?.status) {\r\n case 404:\r\n return new Error('errorMessages.travelCards.notFound');\r\n case 400:\r\n return new Error('errorMessages.travelCards.invalidTravelCardDetails');\r\n case 500:\r\n return new Error('errorMessages.api.unhandledException');\r\n default:\r\n return super.errorHandler(e);\r\n }\r\n }\r\n}\r\n","export const ICityLookupApiId = Symbol.for('ICityLookupApi');\n\nexport interface ICityLookupApi {\n getCityNameByPostalCode(apiUrl: string, postalCode: string): Promise;\n}\n","import { injectable } from 'inversify';\nimport { BaseApi } from './BaseApi';\nimport { ICityLookupApi } from '@/services/ICityLookupApi';\n\n@injectable()\nexport default class CityLookupApi extends BaseApi implements ICityLookupApi {\n getCityNameByPostalCode(apiUrl: string, postalCode: string): Promise {\n this.logger.log('[CityLookupApi.getCityNameByPostalCode] Fetching City from ' + apiUrl + ' for post code ' + postalCode);\n\n return this.httpGet(apiUrl + postalCode);\n }\n}\n","import { CreateProfileDto, CreateProfileResponseDto } from '@/types/webapi';\n\nexport const IProfileApiId = Symbol.for('IProfileApi');\n\nexport interface IProfileApi {\n /**\n * Registers a new profile.\n */\n registerProfile(createProfile: CreateProfileDto): Promise;\n}\n","import { injectable } from 'inversify';\nimport { BaseApi } from '@/services/BaseApi';\nimport { IProfileApi } from '@/services/IProfileApi';\nimport { CreateProfileDto, CreateProfileResponseDto } from '@/types/webapi';\n\n@injectable()\nexport default class ProfileApi extends BaseApi implements IProfileApi {\n registerProfile(createProfile: CreateProfileDto): Promise {\n this.logger.log('[ProfileApi.registerProfile] Registering profile', createProfile);\n return this.httpPost('/api/v1.0/profile', createProfile);\n }\n}\n","import { Container } from 'inversify';\nimport { IConfigService, IConfigServiceId } from '@/services/IConfigService';\nimport AppConfigService from '@/services/AppConfigService';\nimport { ax, AxiosInstance, IAxiosId } from './axios';\nimport { InjectionKey, Plugin, inject } from 'vue';\nimport { ILogger, ILoggerId } from '@/services/ILogger';\nimport Logger from '@/services/Logger';\nimport { ICartApi, ICartApiId } from '@/services/ICartApi';\nimport CartApi from '@/services/CartApi';\nimport { IOrderApi, IOrderApiId } from '@/services/IOrderApi';\nimport OrderApi from '@/services/OrderApi';\nimport { IPaymentApi, IPaymentApiId } from '@/services/IPaymentApi';\nimport PaymentApi from '@/services/PaymentApi';\nimport { ITicketApi, ITicketApiId } from '@/services/ITicketApi';\nimport TicketApi from '@/services/TicketApi';\nimport { ITravelCardsApi, ITravelCardsApiId } from '@/services/ITravelCardsApi';\nimport TravelCardsApi from '@/services/TravelCardsApi';\nimport { ICityLookupApi, ICityLookupApiId } from '@/services/ICityLookupApi';\nimport CityLookupApi from '@/services/CityLookupApi';\nimport { IProfileApi, IProfileApiId } from '@/services/IProfileApi';\nimport ProfileApi from '@/services/ProfileApi';\n\nconst __INVERSIFY_SYMBOL__ = Symbol.for('app-inversify-container');\nconst injectionKey: InjectionKey = __INVERSIFY_SYMBOL__;\n\nexport function createContainer(): Plugin {\n const container = new Container({ defaultScope: 'Singleton' });\n\n container.bind(IAxiosId).toConstantValue(ax);\n container.bind(IConfigServiceId).to(AppConfigService);\n container.bind(ILoggerId).to(Logger);\n container.bind(ICartApiId).to(CartApi);\n container.bind(IOrderApiId).to(OrderApi);\n container.bind(IPaymentApiId).to(PaymentApi);\n container.bind(ITicketApiId).to(TicketApi);\n container.bind(ITravelCardsApiId).to(TravelCardsApi);\n container.bind(ICityLookupApiId).to(CityLookupApi);\n container.bind(IProfileApiId).to(ProfileApi);\n\n return {\n install(app) {\n app.provide(injectionKey, container);\n }\n };\n}\n\nexport function useContainer() {\n const _container = inject(injectionKey);\n if (!_container) throw new Error('You must call createContainer() first');\n\n return _container;\n}\n","import { useContainer } from '@/plugins/inversify';\nimport { IConfigService, IConfigServiceId } from '@/services/IConfigService';\nimport { AppConfigDto } from '@/types/webapi';\nimport { MenuStructure, useMenuProvider } from '@geta/kolumbus-frontend/composables';\nimport { isNull, isObject, isUndefined, merge } from 'lodash-es';\nimport { defineStore } from 'pinia';\nimport { computed, reactive, toRefs } from 'vue';\n\nexport interface MainStore {\n ready: boolean;\n isLoading: boolean;\n isDebugMode: boolean | undefined;\n language: string;\n config: AppConfigDto & { supportedLanguages: string[] };\n menuItems: MenuStructure;\n lastKnownError: Error | null;\n}\n\nconst defaultState = (): MainStore => ({\n ready: false,\n isLoading: false,\n language: document.documentElement.lang || 'no',\n isDebugMode: false,\n config: {\n kolumbusWebsiteBaseUrl: '',\n supportedLanguages: ['no', 'en'],\n googleMapsConfig: {\n apiKey: ''\n },\n silentLoginEnabled: true,\n defaultCulture: 'no',\n zoneMapPageUrl: '',\n postCodeServiceUrl: '',\n googleTagManagerConfig: {},\n googleRecaptcha: {\n siteKey: ''\n }\n },\n menuItems: {\n baseUrl: '/'\n },\n lastKnownError: null\n});\n\nconst useMainStore = defineStore('mainStore', () => {\n const container = useContainer();\n const configService = container.get(IConfigServiceId);\n\n const state = reactive(defaultState());\n const menu = computed(() => state.menuItems);\n\n async function loadConfig() {\n // fetch app config\n const config = await configService.getConfig();\n\n // set up app state\n const supportedLanguages = merge(['no', 'en'], state.menuItems?.supportedLanguages?.map(l => l.code) || []);\n state.config = merge(state.config, config, { supportedLanguages });\n }\n\n async function init() {\n try {\n state.isLoading = true;\n\n // set up menus\n const menuProvider = useMenuProvider(state.config.kolumbusWebsiteBaseUrl);\n state.menuItems = await menuProvider.getMenuItems();\n } catch (e) {\n registerError(e);\n } finally {\n state.isLoading = false;\n }\n }\n\n function reset(newState: MainStore) {\n Object.assign(state, newState);\n }\n\n function registerError(error: any) {\n state.lastKnownError = isErrorWithMessage(error) ? error : new Error(String(error));\n }\n\n return {\n ...toRefs(state),\n menu,\n loadConfig,\n init,\n reset,\n registerError\n };\n});\n\nfunction isErrorWithMessage(error: unknown): error is Error {\n return !isUndefined(error) && !isNull(error) && isObject(error) && 'message' in error && typeof error.message === 'string';\n}\n\nexport default useMainStore;\n"],"names":["IConfigServiceId","commonQueryParamMiddleware","to","_","next","debugMode","mainStore","useMainStore","defaultMessages","en","_en","no","_no","setupI18n","options","i18n","createI18n","setI18nLanguage","locale","_a","loadLocaleMessages","axios","useContainer","IAxiosId","res","common","resources","webshopResources","merge","e","nextTick","routeMiddleware","_from","paramLocale","isEmpty","i18nRoute","ax","config","error","ISODateFormat","isIsoDateString","value","handleDates","data","parseISO","key","val","rep","AppConfigService","__publicField","resolve","reject","response","__decorateClass","inject","injectable","ILoggerId","Logger","args","ICartApiId","ProductType","TravellerTypes","BaseApi","url","timeout","isAxiosError","_b","_c","CartApi","lineItem","requestDto","x","IOrderApiId","OrderApi","orderId","transactionId","skip","take","createdAfter","IPaymentApiId","PaymentApi","redirectUrl","ITicketApiId","TicketApi","zones","configId","categoryId","ITravelCardsApiId","TravelCardsApi","id","name","orderDto","ICityLookupApiId","CityLookupApi","apiUrl","postalCode","IProfileApiId","ProfileApi","createProfile","__INVERSIFY_SYMBOL__","injectionKey","createContainer","container","Container","app","_container","defaultState","defineStore","configService","state","reactive","menu","computed","loadConfig","supportedLanguages","l","init","menuProvider","useMenuProvider","registerError","reset","newState","isErrorWithMessage","toRefs","isUndefined","isNull","isObject"],"mappings":"mcAEa,MAAAA,EAAmB,OAAO,IAAI,gBAAgB,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