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O,CACLqP,MAAO,YAGXQ,YAAa,CACXR,MAAO,YAGXS,KAAM,CACJV,gBAAiB,UACjBC,MAAO","names":["Validation","PasswordMatch","password","confirmPassword","controls","control","get","checkControl","errors","value","matching","setErrors","Different","field1","field2","StrongPassword","UpperCase","match","LowerCase","Number","SpecialCharacter","Length","AbstractBasePaymentManagerComponent","_loadingService","inject","LoadingService","_marketService","MarketService","_postBookingFlowService","PostBookingFlowService","_bookingObjectService","BookingObjectService","_costaBackendApiService","CostaBackendApiService","_errorMessagesService","ErrorMessagesService","_bookingFlowServicesService","BookingFlowServicesService","_translateService","TranslateService","isLoading","params","hasWorldPayRedirect","this","ngOnInit","isLoading$","pipe","untilDestroyed","subscribe","parseSearch","paymentStatus","startLoading","displayBooking","onDisplayBookingSuccess","bind","onDisplayBookingFailure","bookingNumber","goToBookingEditPage","getBookingNumber","redirectTo","PagePaths","bookingEdit","BookingSearch","paramBooking","currentBookingObject","getCurrentBookingObject","amount","paymentType","PaymentInfo","PaymentDetails","DepositInvoiceAmount","DueAmount","modifyBooking","Amount","CreditCardToken","Id","orderKey","then","catch","err","stopLoading","showErrorAlert","message","selectors","standalone","features","i0","decls","vars","template","rf","ctx","dependencies","CommonModule","encapsulation","__decorate","UntilDestroy","AbstractBasePostBookingComponent","AbstractBaseBookingStepComponent","_bookingFlowService","BookingFlowService","_breadcrumbsService","BreadcrumbService","_countriesInfoService","CountryInfoService","_ngbModalService","NgbModal","isBookingConfirmed","isDisabledDeposit","hasAdditionalInfo","hasNetiEnabled","hasGiftCardEnabled","isTRAVELAG","ChangeBookingByElectronicChannel","AirRemarks","CruiseRemarks","constructor","super","hasDisableDepositDisabledMarkets","requestBooking","pageName","initialiseBookingStep","bookingInitialiser","confirmationLetter","open","BookingModalConfirmationLetterComponent","animation","size","friendsBookingNumber","onDisplayBookingError","goToSearchBooking","searchBookings","getAirAndCruiseRemarks","getCurrentCruiseFromBookingObject","Itinerary","bookingObjectUpdate$","next","hasAdditionalInfoEnabled","getCurrentBookingStatus","BookingStatus","BOOKED","NetInvoice","Agency","currentStep","PageName","PAGE6_EDIT","bo","Fare","Code","TypeConstants","TRAVELAGENT_FARE","retrieveAllCountriesInfo","_allowedOperationService","retrieveAllowedOperationForBooking","setFunnelReferral","FUNNEL_BOOKINGEDIT","getWebCheckInUrl","res","webCheckInUrl","console","error","e","warn","BookingBreadcrumbComponent","_bookingObjectFieldsSelectionService","BookingObjectFieldsSelectionService","_breadcrumbService","goToStepThree","isVisited","selectedCruiseIndex","getSelectedCruiseIndex","step3","Cruises","goToStepFour","goToStepFive","step5","stepNumber","getCurrentStepAsNumber","isCurrent","consts","TranslateModule","i1","_errorMessageService","_ngbActiveModal","NgbActiveModal","contactValueAgent","contactValueGuest","versionType","errorMessage","handleVersionTypeChange","newValue","sendConfirmationLetter","_this","_asyncToGenerator","showInfo","instant","dismiss","$event","_c0","i2","FormsModule","i3","BookingRollbedDocumentsAlertComponent","changeDetection","LoginBannerComponent","PrependBasePathPipe","SharedBackButtonComponent","ctx_r1","isCurrentPage","item_r1","LinkUrl","Label","Text","UserMenuAsideComponent","menu","getUserMenuData","resp","item","getPageTitle","location","pathname","url","split","slice","trackByIndex","idx","UserMenuAsideComponent_li_1_Template","CapitalizeAllPipe","transform","map","val","toLowerCase","charAt","toUpperCase","join","pure","_http","HttpClient","BookingFlowServicesPath","CCKBasePath","window","cckBasePath","BookingPaymentInitiation","PaymentInitiation","GroupPaymentInitiation","request","api","loader","obs$","post","BackEnd","WithCredentials","HandleKtApi","finalize","lastValueFrom","AddPayment","SetPaymentError","factory","ɵfac","providedIn","EventDictionary","dictionary","addEvent","day","type","hour","harbour","eventsList","push","getEvents","sort","a","b","parseInt","OtoItineraryService","ARRIVAL","DEPARTURE","eventDictionary","getSteps","listStep","departureDate","harbourPhotos","cruiseDuration","steps","fixArray","filter","IsNavigationDay","Day","i","length","step","DepartureTime","Port","duration","itin_rows","events","navRow","buildRow","numRows","Math","ceil","startingEvent","r","arrivalTime","departureTime","rowCompleted","images","event","fixHarbour","setHarbourImages","row","ArrivalHour","formatTime","DepartureHarbour","DepartureDay","DepartureDate","Date","setDate","getDate","setHours","DepartureHour","Images","hours","substr","ret","harbourCode","forEach","photo","indexOf","Name","Country","OtoShipServiceService","_otoBackendApiService","OtoBackendApiService","_otoItineraryService","cache","getShipService$","Subject","getCurrentShipPhotos$","setCurrentShipPhotos$","setCurrentShip$","setStrings$","setCurrentShipPhotos","shipPhotos","key","JSON","stringify","setCache","setTimeout","getCache","setCurrentShip","ship","setStrings","strings","getCurrentShipCode","ShipInfo","shipCodeLink","getShipService","cachedResult","shipService","getShipsByTop","getCurrentCulture","ships","response","formatShipService","commonError","getCurrentShipPhotos","shipName","getCurrentShipPhotosSuccess","baseUrl","returnArray","image","Object","entries","shipCode","basePonti","ponti","ponte","nome","pos","shipDecks","code","extData","linkDetail","shipInfoDetail","args","content","hashedKey","md5","showBlockingAlert","title","html","footer","Swal","fire","icon","iconHtml","showCancelButton","showConfirmButton","focusConfirm","focusCancel","reverseButtons","WorldPayCustomisation","buttons","backgroundColor","color","border","style","radius","inputs","width","validation","ok","placeholder","page"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/app/classes/Validation.class.ts","./src/app/components/booking/abstract/abstract-base-payment-manager.component.ts","./src/app/components/booking/abstract/abstract-base-post-booking.component.ts","./src/app/components/booking/booking-breadcrumb/booking-breadcrumb.component.ts","./src/app/components/booking/booking-breadcrumb/booking-breadcrumb.component.html","./src/app/components/booking/booking-modal-confirmation-letter/booking-modal-confirmation-letter.component.ts","./src/app/components/booking/booking-modal-confirmation-letter/booking-modal-confirmation-letter.component.html","./src/app/components/booking/booking-rollbed-documents-alert/booking-rollbed-documents-alert.component.ts","./src/app/components/booking/booking-rollbed-documents-alert/booking-rollbed-documents-alert.component.html","./src/app/components/login/login-banner/login-banner.component.ts","./src/app/components/login/login-banner/login-banner.component.html","./src/app/components/shared/shared-back-button/shared-back-button.component.ts","./src/app/components/shared/shared-back-button/shared-back-button.component.html","./src/app/components/user-menu/user-menu-aside/user-menu-aside.component.html","./src/app/components/user-menu/user-menu-aside/user-menu-aside.component.ts","./src/app/pipes/Strings/capitalize-all.pipe.ts","./src/app/services/api/booking-flow-services.service.ts","./src/app/classes/EventDictionary.class.ts","./src/app/services/oto-itinerary.service.ts","./src/app/services/oto-ship-service.service.ts","./src/app/utils/Alerts/showBlockingAlert.ts","./src/app/values/PaymentProviders/WorldPayCustomisation.value.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nexport class Validation {\n static PasswordMatch(password, confirmPassword): ValidatorFn {\n return (controls: AbstractControl): ValidationErrors | null => {\n const control = controls.get(password);\n const checkControl = controls.get(confirmPassword);\n const errors = checkControl.errors ?? {};\n\n // if (checkControl?.errors && !checkControl.errors['matching']) {\n // return null;\n // }\n\n if (control?.value !== checkControl?.value) {\n errors['matching'] = true;\n checkControl?.setErrors(errors);\n return { matching: true };\n } else {\n return null;\n }\n };\n }\n\n static Different(field1: string, field2: string): ValidatorFn {\n return (controls: AbstractControl): ValidationErrors | null => {\n const control = controls.get(field1);\n const checkControl = controls.get(field2);\n const errors = checkControl.errors ?? {};\n\n if (control?.value === checkControl?.value) {\n errors['Different'] = true;\n checkControl?.setErrors(errors);\n return { Different: true };\n } else {\n return null;\n }\n };\n }\n\n static StrongPassword(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n\n if (!value) return null;\n\n const errors: Record = control.errors ?? {};\n\n errors['UpperCase'] = !value.match(/^(?=.*[A-Z])/);\n errors['LowerCase'] = !value.match(/(?=.*[a-z])/);\n errors['Number'] = !value.match(/(.*[0-9].*)/);\n errors['SpecialCharacter'] = !value.match(/(?=.*[!@#$%^&*])/);\n errors['Length'] = !value.match(/.{13,}/);\n\n const isValid = !errors['UpperCase'] && !errors['LowerCase'] && !errors['Number'] && !errors['SpecialCharacter'] && !errors['Length'];\n\n if (isValid) return null;\n\n return errors;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, OnInit } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { BookingObjectService } from '@services/booking-object.service';\nimport { CostaBackendApiService } from '@services/costa-backend-api.service';\nimport { ErrorMessagesService } from '@services/error-messages.service';\nimport { LoadingService } from '@services/loading.service';\nimport { MarketService } from '@services/market.service';\nimport { PostBookingFlowService } from '@services/post-booking-flow.service';\nimport { parseSearch } from '@utils/Navigation/parseSearch.utils';\nimport { redirectTo } from '@utils/Navigation/redirectTo.utils';\nimport { BookingSearch } from '@values/Booking/BookingSearch.value';\nimport { PagePaths } from '@values/Navigation/PagePaths.value';\nimport { BookingFlowServicesService } from '@services/api/booking-flow-services.service';\nimport { TranslateService } from '@ngx-translate/core';\n\n@UntilDestroy()\n@Component({\n standalone: true,\n imports: [CommonModule],\n template: '',\n})\nexport class AbstractBasePaymentManagerComponent implements OnInit {\n protected readonly _loadingService = inject(LoadingService);\n protected readonly _marketService = inject(MarketService);\n protected readonly _postBookingFlowService = inject(PostBookingFlowService);\n protected readonly _bookingObjectService = inject(BookingObjectService);\n protected readonly _costaBackendApiService = inject(CostaBackendApiService);\n protected readonly _errorMessagesService = inject(ErrorMessagesService);\n protected readonly _bookingFlowServicesService = inject(BookingFlowServicesService);\n protected readonly _translateService = inject(TranslateService);\n\n public isLoading = true;\n\n protected params;\n\n public get hasWorldPayRedirect() {\n return this._marketService.hasWorldPayRedirect();\n }\n\n ngOnInit() {\n this._loadingService.isLoading$.pipe(untilDestroyed(this)).subscribe((isLoading) => {\n this.isLoading = isLoading;\n });\n\n this.params = parseSearch();\n\n if (!this.hasWorldPayRedirect && this.params['paymentStatus'] === 'AUTHORISED') {\n this._loadingService.startLoading('PaymentManagerCtrl_displayBooking');\n this._postBookingFlowService.displayBooking(\n this.onDisplayBookingSuccess.bind(this),\n this.onDisplayBookingFailure.bind(this),\n this.params.bookingNumber,\n '',\n );\n }\n }\n\n private goToBookingEditPage() {\n const bookingNumber = this._bookingObjectService.getBookingNumber();\n redirectTo(`${PagePaths.bookingEdit}?${BookingSearch.paramBooking}=${bookingNumber}`);\n }\n\n private onDisplayBookingSuccess() {\n const currentBookingObject = this._bookingObjectService.getCurrentBookingObject();\n\n let amount = undefined;\n\n if (this.params.paymentType == 'DEPOSIT') {\n if (currentBookingObject.PaymentInfo.PaymentDetails.DepositInvoiceAmount > 0) {\n amount = currentBookingObject.PaymentInfo.PaymentDetails.DepositInvoiceAmount;\n }\n } else {\n if (currentBookingObject.PaymentInfo.PaymentDetails.DueAmount > 0) {\n amount = currentBookingObject.PaymentInfo.PaymentDetails.DueAmount;\n }\n }\n\n if (amount) {\n const paymentObj = {\n Amount: amount,\n CreditCardToken: {\n Id: this.params.orderKey,\n },\n };\n\n this._costaBackendApiService\n .modifyBooking(currentBookingObject, paymentObj)\n .then(() => {\n this.goToBookingEditPage();\n })\n .catch((err) => {\n this._loadingService.stopLoading('PaymentManagerCtrl_displayBooking');\n this._errorMessagesService.showErrorAlert(err.message);\n });\n } else {\n this.goToBookingEditPage();\n }\n }\n\n private onDisplayBookingFailure() {\n this._loadingService.stopLoading('PaymentManagerCtrl_displayBooking');\n this._errorMessagesService.showErrorAlert('errore');\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, OnInit } from '@angular/core';\nimport { BookingStatus } from '@enums/BookingStatus.enum';\nimport { PageName } from '@enums/PageName.enum';\nimport { BookingFlowService } from '@services/abstract/booking-flow.service';\nimport { BookingObjectService } from '@services/booking-object.service';\nimport { BreadcrumbService } from '@services/breadcrumb.service';\nimport { CountryInfoService } from '@services/country-info.service';\nimport { ErrorMessagesService } from '@services/error-messages.service';\nimport { MarketService } from '@services/market.service';\nimport { PostBookingFlowService } from '@services/post-booking-flow.service';\nimport { parseSearch } from '@utils/Navigation/parseSearch.utils';\nimport { redirectTo } from '@utils/Navigation/redirectTo.utils';\nimport { PagePaths } from '@values/Navigation/PagePaths.value';\nimport { TypeConstants } from '@values/Booking/TypeConstants.value';\nimport { AbstractBaseBookingStepComponent } from './abstract-base-booking-step.component';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { BookingModalConfirmationLetterComponent } from '../booking-modal-confirmation-letter/booking-modal-confirmation-letter.component';\nimport { BookingSearch } from '@values/Booking/BookingSearch.value';\n\n@Component({\n standalone: true,\n imports: [CommonModule],\n template: '',\n})\nexport class AbstractBasePostBookingComponent extends AbstractBaseBookingStepComponent implements OnInit {\n protected readonly _marketService = inject(MarketService);\n protected readonly _postBookingFlowService = inject(PostBookingFlowService);\n protected readonly _bookingFlowService = inject(BookingFlowService);\n protected readonly _errorMessagesService = inject(ErrorMessagesService);\n protected readonly _bookingObjectService = inject(BookingObjectService);\n protected readonly _breadcrumbsService = inject(BreadcrumbService);\n protected readonly _countriesInfoService = inject(CountryInfoService);\n protected readonly _ngbModalService = inject(NgbModal);\n\n public isBookingConfirmed = null;\n public isDisabledDeposit = null;\n public hasAdditionalInfo: boolean = null;\n public hasNetiEnabled = null;\n public hasGiftCardEnabled = null;\n public isTRAVELAG = null;\n public ChangeBookingByElectronicChannel = null;\n public AirRemarks;\n public CruiseRemarks;\n\n constructor() {\n super();\n }\n\n override ngOnInit() {\n super.ngOnInit();\n\n this.isDisabledDeposit = this._marketService.hasDisableDepositDisabledMarkets();\n }\n\n public requestBooking(pageName) {\n this.initialiseBookingStep(pageName, this.bookingInitialiser.bind(this));\n }\n\n public confirmationLetter() {\n this._ngbModalService.open(BookingModalConfirmationLetterComponent, { animation: true, size: 'md' });\n }\n\n protected bookingInitialiser() {\n //TODO: spostare parseSearch in una factory\n const bookingNumber = parseSearch()?.['bookingNumber'] ?? '';\n const friendsBookingNumber = parseSearch()?.['friendsBookingNumber'] ?? '';\n this._postBookingFlowService.displayBooking(\n this.onDisplayBookingSuccess.bind(this),\n this.onDisplayBookingError.bind(this),\n bookingNumber,\n friendsBookingNumber,\n );\n }\n\n protected onDisplayBookingError(err) {\n this._errorMessagesService.showErrorAlert(err).then(() => {\n this.goToSearchBooking();\n });\n }\n\n private goToSearchBooking() {\n redirectTo(PagePaths.searchBookings);\n }\n\n private getAirAndCruiseRemarks() {\n this.AirRemarks = this._bookingObjectService.getCurrentCruiseFromBookingObject()?.Itinerary?.AirRemarks;\n this.CruiseRemarks = this._bookingObjectService.getCurrentCruiseFromBookingObject()?.Itinerary?.CruiseRemarks;\n }\n\n protected onDisplayBookingSuccess() {\n try {\n //TODO: rimuovere questo broadcast asap!\n this._bookingObjectService.bookingObjectUpdate$.next();\n\n this.hasAdditionalInfo = this._marketService.hasAdditionalInfoEnabled();\n\n this.getAirAndCruiseRemarks();\n\n this.isBookingConfirmed = this._bookingObjectService.getCurrentBookingStatus() == BookingStatus.BOOKED;\n this.hasNetiEnabled =\n this._marketService.hasNetiEnabled() &&\n !this.isBookingConfirmed &&\n this._bookingObjectService.getCurrentBookingObject().NetInvoice.Agency;\n\n this.hasGiftCardEnabled = this._marketService.hasGiftCardEnabled() && this.isBookingConfirmed;\n\n if (this._breadcrumbsService.currentStep == PageName.PAGE6_EDIT) {\n const bo = this._bookingObjectService.getCurrentBookingObject();\n this.hasGiftCardEnabled = this.hasGiftCardEnabled && bo.PaymentInfo.PaymentDetails.DueAmount > 0;\n }\n\n this.isTRAVELAG = this._bookingObjectService.getCurrentBookingObject()?.Fare?.Code == TypeConstants.TRAVELAGENT_FARE;\n this.ChangeBookingByElectronicChannel = this._bookingObjectService.getCurrentBookingObject().ChangeBookingByElectronicChannel;\n this._countriesInfoService.retrieveAllCountriesInfo();\n this._allowedOperationService.retrieveAllowedOperationForBooking();\n\n this.setFunnelReferral(TypeConstants.FUNNEL_BOOKINGEDIT);\n\n this._costaBackendApiService\n .getWebCheckInUrl()\n .then((res) => {\n this.webCheckInUrl = res;\n })\n .catch((err) => {\n console.error('webCheckIn', err);\n });\n } catch (e) {\n console.warn('catched error', e);\n }\n }\n}\n","import { Component, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { redirectTo } from '@utils/Navigation/redirectTo.utils';\nimport { PagePaths } from '@values/Navigation/PagePaths.value';\nimport { BookingObjectService } from '@services/booking-object.service';\nimport { BookingObjectFieldsSelectionService } from '@services/booking-object-fields-selection.service';\nimport { BreadcrumbService } from '@services/breadcrumb.service';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n selector: 'cck-booking-breadcrumb',\n standalone: true,\n imports: [CommonModule, TranslateModule],\n templateUrl: './booking-breadcrumb.component.html',\n styleUrls: ['./booking-breadcrumb.component.scss'],\n})\nexport class BookingBreadcrumbComponent {\n private readonly _bookingObjectService = inject(BookingObjectService);\n private readonly _bookingObjectFieldsSelectionService = inject(BookingObjectFieldsSelectionService);\n private readonly _breadcrumbService = inject(BreadcrumbService);\n\n goToStepThree() {\n if (!this.isVisited(3)) return;\n const selectedCruiseIndex = this._bookingObjectFieldsSelectionService.getSelectedCruiseIndex();\n redirectTo(`${PagePaths.step3}?cruisecode1=${this._bookingObjectService?.currentBookingObject?.Cruises?.[selectedCruiseIndex]?.Code}`);\n }\n\n goToStepFour() {\n if (!this.isVisited(4)) return;\n\n redirectTo(PagePaths.step3);\n }\n\n goToStepFive() {\n if (!this.isVisited(5)) return;\n\n redirectTo(PagePaths.step5);\n }\n\n isVisited(stepNumber) {\n return this._breadcrumbService.getCurrentStepAsNumber() > stepNumber;\n }\n\n isCurrent(stepNumber) {\n return this._breadcrumbService.getCurrentStepAsNumber() === stepNumber;\n }\n}\n","\n","import { CommonModule } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { CostaBackendApiService } from '@services/costa-backend-api.service';\nimport { ErrorMessagesService } from '@services/error-messages.service';\nimport { LoadingService } from '@services/loading.service';\n\n@Component({\n selector: 'cck-booking-modal-confirmation-letter',\n standalone: true,\n imports: [CommonModule, TranslateModule, FormsModule],\n templateUrl: './booking-modal-confirmation-letter.component.html',\n styleUrls: ['./booking-modal-confirmation-letter.component.scss'],\n})\nexport class BookingModalConfirmationLetterComponent {\n private readonly _loadingService = inject(LoadingService);\n private readonly _costaBackendApiService = inject(CostaBackendApiService);\n private readonly _errorMessageService = inject(ErrorMessagesService);\n private readonly _translateService = inject(TranslateService);\n public readonly _ngbActiveModal = inject(NgbActiveModal);\n\n contactValueAgent = '';\n contactValueGuest = '';\n versionType: 'GUEST' | 'AGENCY' = 'AGENCY';\n errorMessage: string | null = null;\n\n handleVersionTypeChange(newValue: 'GUEST' | 'AGENCY') {\n this.versionType = newValue;\n if (this.versionType === 'AGENCY') {\n this.contactValueGuest = '';\n }\n }\n\n async sendConfirmationLetter() {\n this.errorMessage = null;\n\n this._loadingService.startLoading('ConfirmationLetterService_sendConfirmationLetter');\n\n if (this.versionType === 'AGENCY') {\n try {\n await this._costaBackendApiService.sendConfirmationLetter(this.contactValueAgent, 'AGENCY');\n } catch (e) {\n await this._errorMessageService.showErrorAlert(e);\n return;\n }\n }\n else if (this.versionType === 'GUEST') {\n try {\n await this._costaBackendApiService.sendConfirmationLetter(this.contactValueGuest, 'GUEST');\n } catch (e) {\n await this._errorMessageService.showErrorAlert(e)\n return;\n }\n }\n\n this._loadingService.stopLoading('ConfirmationLetterService_sendConfirmationLetter');\n await this._errorMessageService.showInfo(this._translateService.instant(\"Booking.label_ConfirmationLetterOK\"));\n }\n\n}\n","
\n

{{ 'Booking.label_confirmationLetter' | translate }}

\n \n
\n
\n

\n {{ 'Booking.label_confirmation_letter_note_email' | translate }}\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 {{ 'Reservation.btn_send_email' | translate }}\n \n
\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n selector: 'cck-booking-rollbed-documents-alert',\n standalone: true,\n imports: [TranslateModule],\n templateUrl: './booking-rollbed-documents-alert.component.html',\n styleUrl: './booking-rollbed-documents-alert.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BookingRollbedDocumentsAlertComponent { }\n","
\n \n
\n
\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PrependBasePathPipe } from '@pipes/prepend-base-path.pipe';\nimport { BgImageDirective } from '@directives/bg-image.directive';\n\n@Component({\n selector: 'cck-login-banner',\n standalone: true,\n imports: [CommonModule, PrependBasePathPipe, BgImageDirective],\n templateUrl: './login-banner.component.html',\n styleUrls: ['./login-banner.component.scss'],\n})\nexport class LoginBannerComponent {}\n","\n\n","import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\n@Component({\n selector: 'cck-shared-back-button',\n standalone: true,\n imports: [CommonModule, TranslateModule],\n templateUrl: './shared-back-button.component.html',\n styleUrls: ['./shared-back-button.component.scss'],\n})\nexport class SharedBackButtonComponent {}\n","\n \n {{ 'Global.btn_Back' | translate }}\n\n","\n","import { Component, OnInit, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CostaBackendApiService } from '@services/costa-backend-api.service';\nimport { MenuItemDTO } from '@interfaces/KT/MenuItem.interface';\n\n@Component({\n selector: 'cck-user-menu-aside',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './user-menu-aside.component.html',\n styleUrls: ['./user-menu-aside.component.scss']\n})\nexport class UserMenuAsideComponent implements OnInit {\n private readonly _costaBackendApiService = inject(CostaBackendApiService);\n public menu: MenuItemDTO[] = [];\n\n ngOnInit() {\n this._costaBackendApiService.getUserMenuData().then(\n (resp) => {\n this.menu = resp;\n }\n );\n }\n\n public isCurrentPage(item) {\n return this.getPageTitle(location.pathname) === this.getPageTitle(item.LinkUrl);\n }\n\n private getPageTitle(url){\n return url.split('/').slice(-1)[0];\n }\n\n public trackByIndex(idx: number) {\n return idx;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'capitalizeAll',\n standalone: true\n})\nexport class CapitalizeAllPipe implements PipeTransform {\n\n transform(value: string): string {\n if (typeof value !== 'string') return \"\";\n\n return value\n .split(' ')\n .map(val => val.toLowerCase())\n .map(val => val.charAt(0).toUpperCase() + val.slice(1))\n .join(' ');\n }\n\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { BackEnd } from '@helpers/BackEnd.class';\nimport { KTResponse } from '@interfaces/Generic/KTResponse.interface';\nimport { AddPaymentParams } from '@interfaces/KT/WorldPay/AddPayment.interface';\nimport { BookingPaymentInitiationParams, GroupPaymentInitiationParams, PaymentInitiationResponse } from '@interfaces/KT/WorldPay/PaymentInitiation.interface';\nimport { SetPaymentErrorParams } from '@interfaces/KT/WorldPay/SetPaymentError.interface';\nimport { LoadingService } from '@services/loading.service';\nimport { finalize, lastValueFrom } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BookingFlowServicesService {\n private readonly _http = inject(HttpClient);\n private readonly _loadingService = inject(LoadingService);\n\n private readonly BookingFlowServicesPath = '_vti_bin/CostaClickNew/UIServices/BookingFlowServices.svc/';\n\n private get CCKBasePath() {\n return window?.cckBasePath;\n }\n\n /**\n * Inizializza un pagamento per i booking con WordPay e torna la URL per la pagina di inserimento dei dati della carta ci credito.\n * \n * Agli URL di Success, Error ed Abort, lato BE, viene poi accordato l'orderCode necessario per le successive chiamate di AddPayment e SetPaymentError.\n * \n * @param { BookingPaymentInitiationParams } params parametri da passare al BE\n * @returns { Promise }\n */\n BookingPaymentInitiation(params: BookingPaymentInitiationParams) {\n return this.PaymentInitiation(params);\n }\n\n /**\n * Inizializza un pagamento per i gruppi con WordPay e torna la URL per la pagina di inserimento dei dati della carta ci credito.\n * \n * Agli URL di Success, Error ed Abort, lato BE, viene poi accordato l'orderCode necessario per le successive chiamate di AddPayment e SetPaymentError.\n * \n * @param { GroupPaymentInitiationParams } params parametri da passare al BE\n * @returns { Promise }\n */\n GroupPaymentInitiation(params: GroupPaymentInitiationParams) {\n return this.PaymentInitiation(params);\n }\n\n private PaymentInitiation(request: GroupPaymentInitiationParams | BookingPaymentInitiationParams): Promise {\n const api = `${this.CCKBasePath}${this.BookingFlowServicesPath}PaymentInitiation`;\n const loader = 'PaymentInitiation';\n this._loadingService.startLoading(loader);\n const obs$ = this._http\n .post>(\n api,\n {\n request,\n },\n BackEnd.WithCredentials\n )\n .pipe(\n BackEnd.HandleKtApi,\n finalize(() => this._loadingService.stopLoading(loader))\n );\n\n return lastValueFrom(obs$);\n }\n\n /**\n * Registra l'avvenuto pagamento su TTG\n * \n * @param { AddPaymentParams } params parametri da passare al BE\n * @returns { Promise }\n */\n AddPayment(params: AddPaymentParams): Promise {\n const api = `${this.CCKBasePath}${this.BookingFlowServicesPath}AddPayment`;\n const loader = 'AddPayment';\n this._loadingService.startLoading(loader);\n const obs$ = this._http\n .post>(\n api,\n params,\n BackEnd.WithCredentials\n )\n .pipe(\n BackEnd.HandleKtApi,\n finalize(() => this._loadingService.stopLoading(loader))\n );\n\n return lastValueFrom(obs$);\n }\n\n /**\n * Registra l'errore del pagamento su TTG\n * \n * @param { SetPaymentErrorParams } params parametri da passare al BE\n * @returns { Promise }\n */\n SetPaymentError(params: SetPaymentErrorParams): Promise {\n const api = `${this.CCKBasePath}${this.BookingFlowServicesPath}SetPaymentError`;\n const loader = 'SetPaymentError';\n this._loadingService.startLoading(loader);\n const obs$ = this._http\n .post>(\n api,\n params,\n BackEnd.WithCredentials\n )\n .pipe(\n BackEnd.HandleKtApi,\n finalize(() => this._loadingService.stopLoading(loader))\n );\n\n return lastValueFrom(obs$);\n }\n}\n","import { PortDTO } from '@interfaces/KT/Port.interface';\n\nexport class EventDictionary {\n dictionary: Record<\n number,\n {\n type: 0 | 1;\n hour: string;\n harbour: PortDTO;\n }[]\n > = {};\n\n public addEvent(day: number, type: 0 | 1, hour: string, harbour: PortDTO) {\n let eventsList = this.dictionary[day];\n if (eventsList == null) {\n eventsList = [];\n this.dictionary[day] = eventsList;\n }\n\n eventsList.push({ type, hour, harbour });\n }\n\n public getEvents(day) {\n const events = this.dictionary[day] || [];\n\n return events.sort((a, b) => {\n return parseInt(a.hour) - parseInt(b.hour);\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { EventDictionary } from '@classes/EventDictionary.class';\nimport { CruiseItinerarySegmentDTO } from '@interfaces/KT/CruiseItinerarySegment.interface';\nimport { OTOItinerary } from '@interfaces/OTO/OTOItinerary.interface';\nimport { fixArray } from '@utils/Array/fixArray.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OtoItineraryService {\n public readonly ARRIVAL = 0;\n public readonly DEPARTURE = 1;\n\n /**\n * Contains events indexed by cruise day (ordinal)\n */\n private eventDictionary = new EventDictionary();\n\n public getSteps(listStep: CruiseItinerarySegmentDTO[], departureDate, harbourPhotos, cruiseDuration) {\n const stepArray = fixArray(listStep);\n\n //remove useless steps\n const filteredSteps = stepArray.filter((e) => !e.IsNavigationDay);\n\n //sort steps\n const steps = filteredSteps.sort((a, b) => {\n return Number(a.Day) - Number(b.Day);\n });\n\n //build events dictionary\n this.eventDictionary.dictionary = {};\n for (let i = 0; i < steps.length; i++) {\n const step = steps[i];\n this.eventDictionary.addEvent(step.Day, this.DEPARTURE, step.DepartureTime, step.Port);\n }\n\n const duration = cruiseDuration;\n\n const itin_rows = [];\n for (let day = 0; day <= duration; day++) {\n const events = this.eventDictionary.getEvents(day + 1);\n\n if (events.length == 0) {\n //navigation\n const navRow = this.buildRow(null, null, null, departureDate, day, null);\n itin_rows.push(navRow);\n } else {\n //number of rows we have to insert for the current day\n const numRows = Math.ceil(events.length / 2);\n\n let startingEvent = 0;\n for (let r = 0; r < numRows; r++) {\n let harbour = null;\n let arrivalTime = null;\n let departureTime = null;\n let rowCompleted = false;\n let images = null;\n\n for (let e = startingEvent; e < events.length && !rowCompleted; e++, startingEvent++) {\n const event = events[e];\n if (event.type == this.ARRIVAL) {\n arrivalTime = event.hour;\n harbour = event.harbour;\n }\n\n if (event.type == this.DEPARTURE) {\n departureTime = event.hour;\n harbour = harbour || event.harbour;\n\n //we have to add another row after a departure\n rowCompleted = true;\n }\n }\n\n harbour = this.fixHarbour(harbour);\n\n images = this.setHarbourImages(harbour, harbourPhotos);\n\n const row = this.buildRow(harbour, arrivalTime, departureTime, departureDate, day, images);\n itin_rows.push(row);\n }\n }\n }\n return itin_rows;\n }\n\n private buildRow(harbour, arrivalTime, departureTime, departureDate, day, images) {\n const row: Partial = {};\n row.ArrivalHour = this.formatTime(arrivalTime) || null;\n row.DepartureHarbour = harbour || null;\n row.DepartureDay = day + 1;\n row.DepartureDate = new Date(departureDate);\n row.DepartureDate.setDate(departureDate.getDate() + day);\n row.DepartureDate.setHours(0, 0, 0, 0);\n row.DepartureHour = this.formatTime(departureTime) || null;\n row.Id = row.DepartureHarbour ? row.DepartureHarbour.Code + row.DepartureDay : null;\n row.Images = images;\n return row;\n }\n\n private formatTime(hours) {\n if (hours && hours != '-') {\n return hours.substr(0, 2) + ':' + hours.substr(-3);\n } else {\n return null;\n }\n }\n\n private setHarbourImages(harbour, harbourPhotos) {\n const ret = [];\n const baseAddress = '//www.offertetouroperator.com/images/cruises/oto_official/porti/';\n const placeholder = '//www.offertetouroperator.com/images/cruises/oto_official/porti/placeholder-harbour.jpg';\n const harbourCode = harbour.Code;\n harbourPhotos.forEach((photo) => {\n if (photo.indexOf(harbourCode) >= 0) {\n ret.push(baseAddress + photo);\n }\n });\n if (ret.length === 0) {\n ret.push(placeholder);\n }\n return ret;\n }\n\n private fixHarbour(harbour) {\n if (harbour.Name.indexOf('/') >= 0) {\n harbour.Name = harbour.Name.split('/').join(' / ');\n }\n harbour.Country = '';\n if (harbour.Name.indexOf('(') >= 0 && harbour.Name.indexOf(')') >= 0) {\n harbour.Country = harbour.Name.split('(')[1].split(')')[0];\n harbour.Name = harbour.Name.split('(')[0];\n }\n return harbour;\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { md5 } from '@utils/Crypto/md5.utils';\nimport { getCurrentCulture } from '@utils/Navigation/getCurrentCulture.utils';\nimport { _groupBy } from '@utils/Lodash/_groupBy.utils';\nimport { _mapValues } from '@utils/Lodash/_mapValues.utils';\nimport { parseSearch } from '@utils/Navigation/parseSearch.utils';\nimport { PagePaths } from '@values/Navigation/PagePaths.value';\nimport { ShipInfo } from '@values/Ship/ShipInfo.value';\nimport dayjs from 'dayjs';\nimport { Subject } from 'rxjs';\nimport { CostaBackendApiService } from './costa-backend-api.service';\nimport { LoadingService } from './loading.service';\nimport { OtoBackendApiService } from './oto-backend-api.service';\nimport { OtoItineraryService } from './oto-itinerary.service';\nimport { ShipServiceResponse, ShipServiceShip } from '@interfaces/OTO/ShipService.interface';\nimport { TopShips } from '@interfaces/OTO/TopShips.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OtoShipServiceService {\n private readonly _costaBackendApiService = inject(CostaBackendApiService);\n private readonly _loadingService = inject(LoadingService);\n private readonly _otoBackendApiService = inject(OtoBackendApiService);\n private readonly _otoItineraryService = inject(OtoItineraryService);\n\n private cache = {};\n public getShipService$ = new Subject();\n public getCurrentShipPhotos$ = new Subject();\n public setCurrentShipPhotos$ = new Subject();\n public setCurrentShip$ = new Subject();\n public setStrings$ = new Subject();\n\n\n public setCurrentShipPhotos(shipPhotos) {\n const key = JSON.stringify(shipPhotos);\n this.setCache(key, shipPhotos);\n setTimeout(() => {\n this.setCurrentShipPhotos$.next(this.getCache(key));\n });\n }\n\n public setCurrentShip(ship) {\n const key = JSON.stringify(ship);\n this.setCache(key, ship);\n setTimeout(() => {\n this.setCurrentShip$.next(this.getCache(key));\n });\n }\n\n public setStrings(strings) {\n const key = JSON.stringify(strings);\n this.setCache(key, strings);\n setTimeout(() => {\n this.setStrings$.next(this.getCache(key));\n });\n }\n\n public getCurrentShipCode() {\n return parseSearch()[ShipInfo.shipCodeLink];\n }\n\n public getShipService() {\n this._loadingService.startLoading('OTOShipService_getShipService');\n const key = '_getShipService';\n const cachedResult = this.getCache(key);\n if (!cachedResult) {\n this._otoBackendApiService.getShipService().then((shipService) => {\n this._otoBackendApiService.getShipsByTop(getCurrentCulture()).then((ships) => {\n const response = this.formatShipService(shipService, ships);\n this.setCache(key, response);\n this.getShipService$.next(response);\n this._loadingService.stopLoading();\n }, this.commonError);\n }, this.commonError);\n } else {\n this.getShipService$.next(cachedResult);\n this._loadingService.stopLoading('OTOShipService_getShipService');\n }\n }\n\n public getCurrentShipPhotos(shipName) {\n this._loadingService.startLoading('OTOShipService_getCurrentShipPhotos');\n const key = '_getCurrentShipPhotos-' + shipName;\n const cachedResult = this.getCache(key);\n if (!cachedResult) {\n this._otoBackendApiService.getCurrentShipPhotos(shipName).then(this.getCurrentShipPhotosSuccess(shipName, key), this.commonError);\n } else {\n this.getCurrentShipPhotos$.next(cachedResult);\n this._loadingService.stopLoading('OTOShipService_getCurrentShipPhotos');\n }\n }\n\n private getCurrentShipPhotosSuccess(shipName, key) {\n const baseUrl = 'https://www.offertetouroperator.com/images/cruises/costacrociere/' + shipName + '/';\n const returnArray = [];\n return (resp) => {\n resp.images.forEach((image) => {\n returnArray.push(baseUrl + image);\n });\n this.setCache(key, returnArray);\n this.getCurrentShipPhotos$.next(returnArray);\n this._loadingService.stopLoading();\n };\n }\n\n private formatShipService(shipService: ShipServiceResponse, ships: TopShips) {\n (Object.entries(shipService.ships) as [string, ShipServiceShip][]).forEach(([shipCode, ship]) => {\n const basePonti = 'https://www.offertetouroperator.com/images/cruises/costa_official/navi/';\n ship.ponti.forEach((ponte) => {\n ponte.image = basePonti + ship.nome + '/ponti/' + ponte.pos + '.jpg';\n });\n ship.shipDecks = basePonti + ship.nome + '/ponti/shipDecks.jpg';\n ship.code = shipCode;\n ship.extData = ships[shipCode];\n ship.linkDetail = `${PagePaths.shipInfoDetail}?${ShipInfo.shipCodeLink}=${shipCode}`;\n });\n return shipService;\n }\n\n private commonError(...args) {\n this._loadingService.stopLoading();\n // this._errorMessagesService.showErrorAlert(error);\n console.warn(...args);\n }\n\n private setCache(key, content) {\n const hashedKey = md5(key);\n this.cache[hashedKey] = content;\n }\n\n private getCache(key) {\n const hashedKey = md5(key);\n return this.cache[hashedKey];\n }\n}\n","import Swal from '@global/config/defaultSwal';\n\nexport function showBlockingAlert(\n title: string | HTMLElement,\n html: string | HTMLElement,\n footer: string | HTMLElement = null,\n) {\n return Swal.fire({\n title,\n icon: 'info',\n iconHtml: null,\n html: `\n
${html}
\n `,\n footer,\n showCancelButton: false,\n showConfirmButton: false,\n focusConfirm: false,\n focusCancel: false,\n reverseButtons: false,\n });\n}\n","import { WorldPayCustomisation as IWorldPayCustomisation } from \"@interfaces/PaymentProviders/WorldPayConfig.interface\";\n\nexport const WorldPayCustomisation: IWorldPayCustomisation = {\n buttons: {\n backgroundColor: '#f9b000',\n color: '#292929',\n border: {\n style: 'none',\n radius: '0px'\n },\n },\n inputs: {\n backgroundColor: '#ffffff',\n border: {\n style: 'solid',\n width: '1px',\n radius: '0px',\n color: '#a9a9a9',\n },\n validation: {\n ok: {\n color: '#8fe85f',\n },\n error: {\n color: '#ff5349',\n },\n },\n placeholder: {\n color: '#adb5bd',\n },\n },\n page: {\n backgroundColor: '#ffffff',\n color: '#292929',\n },\n};"],"x_google_ignoreList":[]}