{"version":3,"file":"pyt-apis.mjs","sources":["../../../projects/pyt-apis/src/lib/pyt-apis.module.ts","../../../projects/pyt-apis/src/lib/params-factory.ts","../../../projects/pyt-apis/src/lib/accommodations.service.ts","../../../projects/pyt-apis/src/lib/activities.service.ts","../../../projects/pyt-apis/src/lib/connections.service.ts","../../../projects/pyt-apis/src/lib/currency.service.ts","../../../projects/pyt-apis/src/lib/guidebook.service.ts","../../../projects/pyt-apis/src/lib/pictures.service.ts","../../../projects/pyt-apis/src/lib/regions.service.ts","../../../projects/pyt-apis/src/lib/seo.service.ts","../../../projects/pyt-apis/src/lib/users.service.ts","../../../projects/pyt-apis/src/lib/mailer.service.ts","../../../projects/pyt-apis/src/lib/friends.service.ts","../../../projects/pyt-apis/src/lib/geo-json.service.ts","../../../projects/pyt-apis/src/lib/date-calculator.service.ts","../../../projects/pyt-apis/src/lib/collection.service.ts","../../../projects/pyt-apis/src/lib/tag.service.ts","../../../projects/pyt-apis/src/lib/trip.ts","../../../projects/pyt-apis/src/lib/citytrip.service.ts","../../../projects/pyt-apis/src/lib/commercial.service.ts","../../../projects/pyt-apis/src/lib/roundtrip.service.ts","../../../projects/pyt-apis/src/lib/proposal.service.ts","../../../projects/pyt-apis/src/lib/suggestion.service.ts","../../../projects/pyt-apis/src/lib/common-trip.service.ts","../../../projects/pyt-apis/src/lib/usermap.service.ts","../../../projects/pyt-apis/src/lib/travelers-century-club.service.ts","../../../projects/pyt-apis/src/lib/report.service.ts","../../../projects/pyt-apis/src/lib/easy-trip.service.ts","../../../projects/pyt-apis/src/lib/cache-response.service.ts","../../../projects/pyt-apis/src/lib/cache.service.ts","../../../projects/pyt-apis/src/lib/cached-accommodations.service.ts","../../../projects/pyt-apis/src/lib/cached-connections.service.ts","../../../projects/pyt-apis/src/lib/cost.service.ts","../../../projects/pyt-apis/src/lib/costs.service.ts","../../../projects/pyt-apis/src/lib/waypoint-changed-listener.service.ts","../../../projects/pyt-apis/src/lib/serverstate.interceptor.ts","../../../projects/pyt-apis/src/lib/browserstate.interceptor.ts","../../../projects/pyt-apis/src/lib/smart-i18n-translate-loader.service.ts","../../../projects/pyt-apis/src/public-api.ts","../../../projects/pyt-apis/src/pyt-apis.ts"],"sourcesContent":["import {ModuleWithProviders, NgModule} from '@angular/core';\n\nexport interface PytApisConfig {\n  accommodationUrl: string;\n  activitiesUrl: string;\n  connectionUrl: string;\n  financesUrl: string;\n  gatewayUrl: string;\n  guidebookUrl: string;\n  picturesUrl: string;\n  regionsUrl: string;\n  tripsUrl: string;\n  costsUrl: string;\n}\n\n@NgModule({\n  imports: [\n  ],\n  declarations: [],\n  exports: []\n})\nexport class PytApisModule {\n\n  public static forRoot(config: PytApisConfig): ModuleWithProviders<PytApisModule> {\n    return {\n      ngModule: PytApisModule,\n      providers: [\n        { provide: 'config', useValue: config }\n      ]\n    };\n  }\n}\n","import {HttpParams} from \"@angular/common/http\";\n\nexport default class ParamsFactory {\n\n  static city(cityName: string, countryName: string, lang: string = 'de'): HttpParams {\n    return new HttpParams().set('cityName', cityName).set('countryName', countryName).set('lang', lang);\n  }\n\n  static region(regionName: string, lang: string = 'de'): HttpParams {\n    return new HttpParams().set('regionName', regionName).set('lang', lang);\n  }\n\n  //\n  // static filterRoundTripsInProcess(): HttpParams {\n  //   return this.filterParameters(\n  //     0,\n  //     100,\n  //     [TripStatus.IN_PROCESS],\n  //     [TripType.ROUNDTRIP]\n  //   );\n  // }\n  //\n  // static filterParameters(pageSize: number, pageNumber: number, tripStates: TripStatus[], tripTypes: TripType[]): HttpParams {\n  //   return new HttpParams()\n  //     .set('pageSize', pageSize.toString())\n  //     .set('pageNumber', pageNumber.toString())\n  //     .set('tripStates', '[' + tripStates.join(',') + ']')\n  //     .set('tripTypes', '[' + tripTypes.join(',') + ']');\n  // }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport ParamsFactory from \"./params-factory\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface BookingCity {\n  cityId: number;\n  cityName: string;\n  countryName: string;\n}\n\nexport interface Accommodation {\n  name: string;\n  link: string;\n}\n\nexport interface BookingAccommodation extends Accommodation {\n  rating: number;\n  price: number;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class AccommodationsService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findByCity(cityName: string, countryName: string, lang: string): Observable<Accommodation[]> {\n    return this.http.get<Accommodation[]>(\n      this.config.accommodationUrl + '/recommended-accommodation/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findByRegion(regionName: string, lang: string): Observable<Accommodation[]> {\n    return this.http.get<Accommodation[]>(\n      this.config.accommodationUrl + '/recommended-accommodation/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findById(id: string): Observable<Accommodation> {\n    return this.http.get<Accommodation>(\n      this.config.accommodationUrl + '/recommended-accommodation/findById',\n      {params: {id: id}}\n    );\n  }\n\n  getBookingCity(countryName: string, cityName: string): Observable<BookingCity> {\n    return this.http.get<BookingCity>(this.config.accommodationUrl + '/api/1.0/findBookingCityId',\n      {params: ParamsFactory.city(cityName, countryName, 'not important')}\n    );\n  }\n\n  findBest(countryName: string, cityName: string, dateOfArrival?: string, countOfNights?: number, numberOfPeople?: number, userId?: string): Observable<BookingAccommodation> {\n    let params = new HttpParams().set('cityName', cityName).set('countryName', countryName);\n\n    if (dateOfArrival) {\n      params = params.set(\"dateOfArrival\", dateOfArrival);\n    }\n\n    if (countOfNights) {\n      params = params.set(\"countOfNights\", String(countOfNights));\n    }\n\n    if (numberOfPeople) {\n      params = params.set(\"numberOfPeople\", String(numberOfPeople));\n    }\n\n    if (userId) {\n      params = params.set(\"userId\", userId);\n    }\n\n    return this.http.get<BookingAccommodation>(this.config.accommodationUrl + '/booking/best-accommodation', {params: params});\n  }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport ParamsFactory from \"./params-factory\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {Waypoint} from \"./trip\";\n\nexport interface TopActivity {\n  name: string;\n  description: string;\n  latitude: number;\n  longitude: number;\n}\n\nexport interface Highlight {\n  id: string;\n\n  translations: HighlightTranslation[];\n  defaultName: string;\n  defaultDescription: string;\n}\n\nexport interface HighlightTranslation {\n  name: string;\n  description: string;\n}\n\nexport interface FouresquareActivityLocation {\n  latitude: number;\n  longitude: number;\n}\n\nexport interface FoursquareActivity {\n  id: string;\n  name: string;\n  location: FouresquareActivityLocation;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ActivitiesService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findFoursquareActivitiesByCity(latitude: number, longitude: number, lang: string): Observable<FoursquareActivity[]> {\n    return this.http.get<FoursquareActivity[]>(\n      this.config.activitiesUrl + '/fouresquare/findByLocation',\n      {params: new HttpParams().set('latitude', latitude.toString()).set('longitude', longitude.toString()).set('distanceInKilometers', '30').set('locale', lang)}\n    );\n  }\n\n  getActivities(waypoint: Waypoint): Observable<FoursquareActivity[]> {\n    return this.findFoursquareActivitiesByCity(waypoint.latitude, waypoint.longitude, 'de');\n  }\n\n  findTopActivitiesByCity(cityName: string, countryName: string, lang: string): Observable<TopActivity[]> {\n    return this.http.get<TopActivity[]>(\n      this.config.activitiesUrl + '/top/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    )\n      ;\n  }\n\n  findTopActivitiesByRegion(regionName: string, lang: string): Observable<TopActivity[]> {\n    return this.http.get<TopActivity[]>(this.config.activitiesUrl + '/top/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findHighlightActivitiesByCity(cityName: string, countryName: string, lang: string): Observable<Highlight[]> {\n    return this.http.get<Highlight[]>(\n      this.config.activitiesUrl + '/highlight/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findHighlightActivitiesByRegion(regionName: string, lang: string): Observable<Highlight[]> {\n    return this.http.get<Highlight[]>(\n      this.config.activitiesUrl + '/highlight/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {LinkType, Waypoint} from \"./trip\";\n\nexport interface Connection {\n  name: string;\n  distance: number;\n  totalDuration: number;\n  price: number;\n  currency: string;\n  linkType: LinkType;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ConnectionsService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  getConnections(from: Waypoint, to: Waypoint, currency = \"USD\"): Observable<Connection[]> {\n    const params = new HttpParams()\n      .set('fromLatitude', from.latitude.toString())\n      .set('fromLongitude', from.longitude.toString())\n      .set('toLatitude', to.latitude.toString())\n      .set('toLongitude', to.longitude.toString())\n      .set('currency', currency);\n\n    return this.http.get<Connection[]>(this.config.connectionUrl + '/api/1.0/connection/byPosition', {params: params});\n  }\n\n  getBestConnection(from: Waypoint, to: Waypoint, currency = \"USD\"): Observable<Connection> {\n    const params = new HttpParams()\n      .set('fromLatitude', from.latitude.toString())\n      .set('fromLongitude', from.longitude.toString())\n      .set('toLatitude', to.latitude.toString())\n      .set('toLongitude', to.longitude.toString())\n      .set('currency', currency);\n\n    return this.http.get<Connection>(this.config.connectionUrl + '/api/1.0/connection/byPositionBest', {params: params});\n  }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface Currency {\n  id: Number;\n  isoCode: String;\n  name: String;\n}\n\nexport interface CurrencyRate {\n  id: Number;\n  source: String;\n  target: String;\n  rate: Number;\n  date: Date;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CurrencyService {\n\n  private currencies = new Map<String, Map<String, CurrencyRate>>();\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n\n    this.init('EUR');\n  }\n\n  init(currencyIsoCode: String) {\n    this.http.get<CurrencyRate[]>(this.config.financesUrl + '/api/2.0/currencies/' + currencyIsoCode)\n      .subscribe(rates => {\n        const ratesMap = new Map();\n\n        rates.forEach(rate => {\n          ratesMap.set(rate.target, rate);\n        });\n\n        this.currencies.set(currencyIsoCode, ratesMap);\n      });\n  }\n\n  getAllCurrencies(): Observable<Currency[]> {\n    return this.http.get<Currency[]>(\n      this.config.financesUrl + '/api/1.0/currency/all'\n    );\n  }\n\n  getCurrencyRate(source: string, target: string): CurrencyRate | undefined {\n    if (!this.currencies.has(source) || !this.currencies.get(source)?.has(target)) {\n      return {\n        id: -1,\n        source: source,\n        target: target,\n        rate: 2,\n        date: new Date()\n      };\n    }\n\n    return this.currencies.get(source)?.get(target);\n  }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport ParamsFactory from \"./params-factory\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport enum MarkerType {\n  REGION = 'REGION',\n  CITY = 'CITY',\n  COORDINATE = 'COORDINATE',\n  HIGHLIGHT = 'HIGHLIGHT'\n}\nexport interface Marker {\n  type: MarkerType;\n  regionName: string;\n  cityName: string;\n  countryName: string;\n  latitude: number;\n  longitude: number;\n  highlightId: string;\n}\n\nexport interface Preamble {\n  id: string;\n\n  text: string;\n\n  ownerId: string;\n}\n\nexport interface Promotion {\n  id: string;\n\n  lang: string;\n  title: string;\n  teaser: string;\n  marker: Marker;\n\n  ownerId: string;\n}\n\nexport interface Link {\n  id: string;\n\n  title: string;\n  teaser: string;\n  link: string;\n\n  ownerId: string;\n}\n\nexport interface Video {\n  id: string;\n\n  title: string;\n  teaser: string;\n  source: string;\n  videoId: string;\n\n  ownerId: string;\n}\n\nexport interface Fact {\n  id: string;\n\n  key: string;\n  value: string;\n\n  ownerId: string;\n}\n\nexport interface Insider {\n  id: string;\n\n  title: string;\n  text: string;\n\n  ownerId: string;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class GuidebookService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findPreambleByCity(cityName: string, countryName: string, lang: string): Observable<Preamble> {\n    return this.http.get<Preamble>(\n      this.config.guidebookUrl + '/preambles/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findPreambleByRegion(regionName: string, lang: string): Observable<Preamble> {\n    return this.http.get<Preamble>(\n      this.config.guidebookUrl + '/preambles/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findPromotionsByLang(lang: string): Observable<Promotion[]> {\n    return this.http.get<Promotion[]>(\n      this.config.guidebookUrl + '/promotions/findByLang',\n      {\n        params: new HttpParams().set('lang', lang)\n      }\n    );\n  }\n\n  findLinksByCity(cityName: string, countryName: string, lang: string): Observable<Link[]> {\n    return this.http.get<Link[]>(\n      this.config.guidebookUrl + '/links/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findLinksByRegion(regionName: string, lang: string): Observable<Link[]> {\n    return this.http.get<Link[]>(\n      this.config.guidebookUrl + '/links/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findInsidersByCity(cityName: string, countryName: string, lang: string): Observable<Insider[]> {\n    return this.http.get<Insider[]>(\n      this.config.guidebookUrl + '/insiders/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findInsidersByRegion(regionName: string, lang: string): Observable<Insider[]> {\n    return this.http.get<Insider[]>(\n      this.config.guidebookUrl + '/insiders/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findVideosByCity(cityName: string, countryName: string, lang: string): Observable<Video[]> {\n    return this.http.get<Video[]>(\n      this.config.guidebookUrl + '/videos/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findVideosByRegion(regionName: string, lang: string): Observable<Video[]> {\n    return this.http.get<Video[]>(\n      this.config.guidebookUrl + '/videos/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n\n  findFactsByCity(cityName: string, countryName: string, lang: string): Observable<Fact[]> {\n    return this.http.get<Fact[]>(\n      this.config.guidebookUrl + '/facts/findByCity',\n      {params: ParamsFactory.city(cityName, countryName, lang)}\n    );\n  }\n\n  findFactsByRegion(regionName: string, lang: string): Observable<Fact[]> {\n    return this.http.get<Fact[]>(\n      this.config.guidebookUrl + '/facts/findByRegion',\n      {params: ParamsFactory.region(regionName, lang)}\n    );\n  }\n}\n","import {HttpClient} from \"@angular/common/http\";\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from \"rxjs\";\nimport ParamsFactory from \"./params-factory\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface Photo {\n  id: string;\n  ownerId: string;\n\n  filename: string;\n  metadata: PhotoMetadata;\n}\n\nexport interface PhotoMetadata {\n  license: string;\n  photographer: string;\n  source: string;\n  altText: string;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class PicturesService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findByCity(cityName: string, countryName: string): Observable<Photo[]> {\n    return this.http.get<Photo[]>(\n      this.config.picturesUrl + '/findByCity',\n      {params: ParamsFactory.city(cityName, countryName)}\n    );\n  }\n\n  findByRegion(regionName: string): Observable<Photo[]> {\n    return this.http.get<Photo[]>(\n      this.config.picturesUrl + '/findByRegion',\n      {params: ParamsFactory.region(regionName)}\n    );\n  }\n\n  findByHighlight(highlightId: string): Observable<Photo[]> {\n    return this.http.get<Photo[]>(\n      this.config.picturesUrl + '/findByHighlight',\n      {params: {highlightId: highlightId}}\n    );\n  }\n\n  findByTrip(tripNumber: number): Observable<Photo[]> {\n    return this.http.get<Photo[]>(\n      this.config.picturesUrl + '/findByTrip',\n      {params: {tripNumber: tripNumber + ''}}\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface Region {\n  regionName: string;\n  relevance: number;\n}\n\nexport interface Country {\n  countryName: string;\n  relevance: number;\n}\n\nexport interface City {\n  cityName: string;\n  countryName: string;\n  latitude: number;\n  longitude: number;\n  countOfNights: number;\n  countOfVisits: number;\n  relevance: number;\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RegionsService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  getCity(cityName: string, countryName: string): Observable<City> {\n    return this.http.get<City>(\n      this.config.regionsUrl + '/getCity',\n      {params: new HttpParams().set('cityName', cityName).set('countryName', countryName)}\n    );\n  }\n\n  getMostTraveledCountries(): Observable<Country[]> {\n    return this.http.get<Country[]>(\n      this.config.regionsUrl + '/getMostTraveledCountries'\n    );\n  }\n\n  getMostTraveledCities(): Observable<City[]> {\n    return this.http.get<City[]>(\n      this.config.regionsUrl + '/getMostTraveledCities'\n    );\n  }\n\n  getMostTraveledRegions(): Observable<Region[]> {\n    return this.http.get<Region[]>(\n      this.config.regionsUrl + '/getMostTraveledRegions'\n    );\n  }\n\n  getMostTraveledCitiesByCountry(countryName: string): Observable<City[]> {\n    return this.http.get<City[]>(\n      this.config.regionsUrl + '/getMostTraveledCitiesByCountry',\n      {params: new HttpParams().set('countryName', countryName)}\n    );\n  }\n\n  getMostTraveledCitiesByRegion(regionName: string): Observable<City[]> {\n    return this.http.get<City[]>(\n      this.config.regionsUrl + '/getMostTraveledCitiesByRegion',\n      {params: new HttpParams().set('regionName', regionName)}\n    );\n  }\n\n  getNextTraveledCities(cityName: string): Observable<City[]> {\n    return this.http.get<City[]>(\n      this.config.regionsUrl + '/getNextTraveledCities',\n      {params: new HttpParams().set('cityName', cityName)}\n    );\n  }\n}\n\n","import {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {Meta, Title} from '@angular/platform-browser';\n\n@Injectable({\n  providedIn: 'root',\n\n})\nexport class SEOService {\n\n  private _domain: string = '';\n\n  constructor(\n    private titleService: Title,\n    private metaService: Meta,\n    @Inject(DOCUMENT) private doc: any) {\n\n    this.metaService.addTag(\n      {httpEquiv: 'Content-Type', content: 'text/html', charset: 'utf-8'}\n    );\n  }\n\n  setTitle(title: string): SEOService {\n    this.titleService.setTitle(title);\n\n    return this;\n  }\n\n  setDescription(description: string): SEOService {\n    this.metaService.addTag({name: 'description', content: description});\n\n    return this;\n  }\n\n  set domain(value: string) {\n    this._domain = value;\n  }\n\n  setUrl(url: string, lang?: String, withAlternateUrls: boolean = true): SEOService {\n    if (lang) {\n      const canonicalLink: HTMLLinkElement = this.createOrGetLink('link[rel=\\'canonical\\']');\n      canonicalLink.setAttribute('rel', 'canonical');\n      canonicalLink.setAttribute('href', this._domain + '/' + lang + url);\n    }\n\n    if (withAlternateUrls) {\n      const alternateDELink: HTMLLinkElement = this.createOrGetLink('link[hreflang=\\'de\\']');\n      alternateDELink.setAttribute('rel', 'alternate');\n      alternateDELink.setAttribute('href', this._domain + '/de' + url);\n      alternateDELink.setAttribute('hreflang', 'de');\n\n      const alternateENLink: HTMLLinkElement = this.createOrGetLink('link[hreflang=\\'en\\']');\n      alternateENLink.setAttribute('rel', 'alternate');\n      alternateENLink.setAttribute('href', this._domain + '/en' + url);\n      alternateENLink.setAttribute('hreflang', 'en');\n\n      const alternatePTLink: HTMLLinkElement = this.createOrGetLink('link[hreflang=\\'pt\\']');\n      alternatePTLink.setAttribute('rel', 'alternate');\n      alternatePTLink.setAttribute('href', this._domain + '/pt' + url);\n      alternatePTLink.setAttribute('hreflang', 'pt');\n\n      const alternateITLink: HTMLLinkElement = this.createOrGetLink('link[hreflang=\\'it\\']');\n      alternateITLink.setAttribute('rel', 'alternate');\n      alternateITLink.setAttribute('href', this._domain + '/it' + url);\n      alternateITLink.setAttribute('hreflang', 'it');\n    }\n\n    return this;\n  }\n\n  setMobileUrl(url: string) {\n\n    const media = 'only screen and (max-width: 640px)';\n\n    const alternateITLink: HTMLLinkElement = this.createOrGetLink('link[media=\\'' + media + '\\']');\n    alternateITLink.setAttribute('rel', 'alternate');\n    alternateITLink.setAttribute('media', media);\n    alternateITLink.setAttribute('href', url);\n\n    return this;\n  }\n\n  setDesktopUrl(url: string) {\n\n    const canonicalLink: HTMLLinkElement = this.createOrGetLink('link[rel=\\'canonical\\']');\n    canonicalLink.setAttribute('rel', 'canonical');\n    canonicalLink.setAttribute('href', url);\n\n    return this;\n  }\n\n  setLang(lang: string) {\n    this.doc.documentElement.lang = lang;\n  }\n\n  private createOrGetLink(selector: string) {\n    return this.doc.head.querySelector(selector)\n      || this.doc.head.appendChild(this.doc.createElement('link'));\n  }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface Freund {\n\n  freundId: number;\n  anwenderId: string;\n  benutzername: string;\n  mail: string;\n  vorname: string;\n  nachname: string;\n  freundschaftsstatus: string;\n\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class UsersService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  getFreunde(): Observable<Freund[]> {\n    return this.http.get<Freund[]>(\n      this.config.gatewayUrl + '/findFriends'\n    );\n  }\n\n  inviteFriend(tripNumber: number, freund: Freund): Observable<string[]> {\n    return this.http.get<string[]>(\n      this.config.gatewayUrl + '/inviteFriend',\n      {params: new HttpParams().set('tripNumber', tripNumber.toString()).set('freundAnwenderId', freund.anwenderId)}\n    );\n  }\n\n  disinviteMember(tripNumber: number, freund: Freund): Observable<string[]> {\n    return this.http.get<string[]>(\n      this.config.gatewayUrl + '/disinviteMember',\n      {params: new HttpParams().set('tripNumber', tripNumber.toString()).set('freundAnwenderId', freund.anwenderId)}\n    );\n  }\n}\n","import {HttpClient} from \"@angular/common/http\";\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from \"rxjs\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class MailerService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  shouldAskForMailConfirmation(): Observable<Boolean> {\n    return this.http.get<Boolean>(\n      this.config.gatewayUrl + '/shouldAskForMailConfirmation'\n    );\n  }\n\n  signupMailConfirmation(): Observable<Boolean> {\n    return this.http.get<Boolean>(\n      this.config.gatewayUrl + '/signupMailConfirmation'\n    );\n  }\n\n  hasDoubleOptInAccepted() {\n    return this.http.get<boolean>(\n      this.config.gatewayUrl + '/doubleoption'\n    );\n  }\n\n  startDoubleOptIn() {\n    return this.http.post(\n      this.config.gatewayUrl + '/doubleoptin', null\n    );\n  }\n\n  dropDoubleOptIn() {\n    return this.http.delete(\n      this.config.gatewayUrl + '/doubleoptin'\n    );\n  }\n\n  confirmDoubleOptIn(token: string) {\n    return this.http.put(\n      this.config.gatewayUrl + '/doubleoptin/' + token, undefined\n    );\n  }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {HttpClient} from '@angular/common/http';\nimport {environment} from '../environments/environment';\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class FriendsService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  isPublicProfile() {\n    return this.http.get<UserPublic>(this.config.gatewayUrl + '/user/public');\n  }\n\n  changeToPublicProfile() {\n    return this.http.put<boolean>(this.config.gatewayUrl + '/user/public', undefined);\n  }\n\n  changeToPrivateProfile() {\n    return this.http.delete<boolean>(this.config.gatewayUrl + '/user/public');\n  }\n\n  getFriends(): Observable<Friend[]> {\n    return this.http.get<Friend[]>(this.config.gatewayUrl + '/friends');\n  }\n\n  connectWithPublicKey(publicKey: string): Observable<Freundschaftsstatus> {\n    return this.http.put<Freundschaftsstatus>(this.config.gatewayUrl + '/friends/' + publicKey, undefined);\n  }\n}\n\nexport enum Freundschaftsstatus {\n  ANFRAGE = 'ANFRAGE',\n  BEFREUNDET = 'BEFREUNDET'\n}\n\nexport interface Friend {\n  freundId: number;\n  anwenderId: string;\n  benutzername: string;\n  freundschaftsstatus: Freundschaftsstatus;\n}\n\nexport interface UserPublic {\n  publicProfile: boolean;\n  publicKey: string;\n}\n","import {Injectable} from '@angular/core';\nimport {Feature, FeatureCollection, LineString, Point} from 'geojson';\nimport {Waypoint} from './trip';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class GeoJSONService {\n\n  constructor() {\n  }\n\n  toBounds(waypoints: Waypoint[]) {\n    const coordinates: number[][] = [];\n    waypoints.forEach(waypoint => {\n      const longitude = waypoint.longitude;\n      const latitude = waypoint.latitude;\n\n      if (longitude && latitude) {\n        coordinates.push([longitude, latitude]);\n      }\n    });\n\n    let nLng: number | null = null;\n    let wLat: number | null = null;\n    let sLng: number | null = null;\n    let eLat: number | null = null;\n\n    coordinates.forEach(coordinate => {\n      const longitude = coordinate[0];\n      const latitude = coordinate[1];\n\n      if (longitude && latitude) {\n        if (nLng == null || sLng == null) {\n          nLng = longitude;\n          sLng = longitude;\n        }\n        if (wLat == null || eLat == null) {\n          wLat = latitude;\n          eLat = latitude;\n        }\n\n        if (nLng < longitude) {\n          nLng = longitude;\n        }\n        if (sLng > longitude) {\n          sLng = longitude;\n        }\n        if (wLat < latitude) {\n          wLat = latitude;\n        }\n        if (eLat > latitude) {\n          eLat = latitude;\n        }\n      }\n    });\n\n    return [\n      [\n        (sLng == null ? 0 : sLng),\n        (eLat == null ? 0 : eLat)\n      ], [\n        (nLng == null ? 0 : nLng),\n        (wLat == null ? 0 : wLat)\n      ]];\n  }\n\n  toFeatureCollection(waypoints: Waypoint[]): FeatureCollection<Point> {\n    return this.toPointsFeatureCollection(waypoints);\n  }\n\n  toPointsFeatureCollection(waypoints: Waypoint[]): FeatureCollection<Point> {\n    const features: any = [];\n    waypoints.forEach(waypoint => {\n      const longitude = waypoint.longitude;\n      const latitude = waypoint.latitude;\n\n      if (longitude && latitude) {\n        features.push({\n          'type': 'Feature',\n          'geometry': {\n            'type': 'Point',\n            'coordinates': [longitude, latitude]\n          },\n          'properties': {\n            'cityName': waypoint.cityName,\n            'countryName': waypoint.countryName\n          }\n        });\n      }\n    });\n    return {\n      'type': 'FeatureCollection',\n      'features': features\n    };\n  }\n\n  toLineFeatureCollection(waypoints: Waypoint[]): FeatureCollection<LineString> {\n    const coordinates: any = [];\n    waypoints.forEach(waypoint => {\n      const longitude = waypoint.longitude;\n      const latitude = waypoint.latitude;\n\n      if (longitude && latitude) {\n        coordinates.push([longitude, latitude]);\n      }\n    });\n\n    const features: any = [];\n    features.push({\n      'type': 'Feature',\n      'geometry': {\n        'type': 'LineString',\n        'properties': '',\n        'coordinates': coordinates\n      }\n    });\n\n    return {\n      'type': 'FeatureCollection',\n      features\n    };\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {RoundTrip, Waypoint} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DateCalculatorService {\n\n  constructor() {\n  }\n\n  update(trip: RoundTrip) {\n    const date: Date = new Date(trip.startDate);\n    let countOfNights = 0;\n    trip.startDate = new Date(date);\n\n    trip.waypoints.forEach(waypoint => {\n      waypoint.arrival = new Date(date);\n      if (waypoint.countOfNights) {\n        const countOfWaypointNights = Number(waypoint.countOfNights.valueOf());\n        date.setDate(date.getDate() + countOfWaypointNights);\n        countOfNights += countOfWaypointNights;\n      }\n      waypoint.departure = new Date(date);\n    });\n\n    trip.endDate = new Date(date);\n    trip.countOfNights = countOfNights;\n  }\n\n  addNight(waypoint: Waypoint, trip: RoundTrip) {\n    waypoint.countOfNights = waypoint.countOfNights.valueOf() + 1;\n\n    this.update(trip);\n  }\n\n  subNight(waypoint: Waypoint, trip: RoundTrip) {\n    if (waypoint.countOfNights > 0) {\n      waypoint.countOfNights = waypoint.countOfNights.valueOf() - 1;\n    }\n    this.update(trip);\n  }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from \"rxjs/internal/Observable\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {SimpleTrip} from \"./trip\";\n\nexport interface Collection {\n\n  id: number;\n  language: string;\n  name: string;\n  description: string;\n  imagePath: string;\n  order: number;\n  tripNumbers: string;\n\n  urlSuffix: string;\n\n  trips: SimpleTrip[];\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CollectionService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(): Observable<Collection[]> {\n    return this.http.get<Collection[]>(\n      this.config.tripsUrl + '/api/v2/collections'\n    );\n  }\n\n  findByLang(lang: string): Observable<Collection[]> {\n    return this.http.get<Collection[]>(\n      this.config.tripsUrl + '/api/v2/lang/' + lang + '/collections'\n    );\n  }\n\n  findById(collectionId: string): Observable<Collection> {\n    return this.http.get<Collection>(\n      this.config.tripsUrl + '/api/v2/collections/' + collectionId\n    );\n  }\n\n  getTrips(collectionId: string): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/collections/' + collectionId + '/trips'\n    );\n  }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs/internal/Observable';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {SimpleTrip} from \"./trip\";\n\nexport interface Tag {\n  id: string;\n  name: string[];\n  description: string[];\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TagService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(): Observable<Tag[]> {\n    return this.http.get<Tag[]>(\n      this.config.tripsUrl + '/api/v2/tags'\n    );\n  }\n\n  findByLang(lang: string): Observable<Tag[]> {\n    return this.http.get<Tag[]>(\n      this.config.tripsUrl + '/api/v2/lang/' + lang + '/tags'\n    );\n  }\n\n  findById(tagId: string): Observable<Tag> {\n    return this.http.get<Tag>(\n      this.config.tripsUrl + '/api/v2/tags/' + tagId\n    );\n  }\n\n  getTrips(tagId: string): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/tags/' + tagId + '/trips'\n    );\n  }\n\n}\n","export enum CostType {\n  TRANSPORT = 'TRANSPORT',\n  ACCOMMODATION = 'ACCOMMODATION',\n  FOOD = 'FOOD',\n  ACTIVITY = 'ACTIVITY',\n  OTHER = 'OTHER'\n}\n\nexport enum TripStatus {\n  IDEA = 'IDEA',\n  IN_PROCESS = 'IN_PROCESS',\n  COMPLETED = 'COMPLETED'\n}\n\nexport enum LinkType {\n  AIRCRAFT = 'AIRCRAFT',\n  BIKE = 'BIKE',\n  BUS = 'BUS',\n  CAR = 'CAR',\n  FOOT = 'FOOT',\n  MOTORBIKE = 'MOTORBIKE',\n  TRAIN = 'TRAIN',\n  SHIP = 'SHIP'\n}\n\nexport enum WaypointType {\n  PLACE = 'PLACE',\n  LINK = 'LINK',\n  EXCURSION = 'EXCURSION'\n}\n\nexport enum TripType {\n  ROUNDTRIP = 'ROUNDTRIP',\n  CITYTRIP = 'CITYTRIP',\n  COMMERCIAL = 'COMMERCIAL',\n  PROPOSAL = 'PROPOSAL',\n  SUGGESTION = 'SUGGESTION',\n  USERMAP = 'USERMAP',\n  TRAVELERS_CENTURY_CLUB = 'TRAVELERS_CENTURY_CLUB',\n  REPORT = 'REPORT'\n}\n\nexport interface PlannedCost {\n  costType: CostType;\n  value: number;\n  currency: string;\n  description: string;\n  perCapita: boolean;\n  perNight: boolean;\n  source: string;\n}\n\nexport interface Waypoint {\n  waypointType: WaypointType;\n  linkType: LinkType;\n  cityName: string;\n  countryName: string;\n  displayName: string;\n  latitude: number;\n  longitude: number;\n  description: string;\n  commentConnection: string;\n  commentAccommodation: string;\n  countOfNights: number;\n  position: number;\n\n  publicActivities: Activity[];\n  privateActivities: Activity[];\n  timedActivities: TimedActivity[];\n  plannedCosts: PlannedCost[];\n\n  regionPath?: string;\n  arrival?: Date;\n  departure?: Date;\n}\n\nexport interface Activity {\n  value: string;\n  selected: boolean;\n}\n\nexport interface TimedActivity {\n  day: number;\n  time: string;\n  text: string;\n}\n\nexport interface TagId {\n  tagId: string;\n}\n\nexport interface Trip {\n\n  tripType: TripType;\n  tripNumber: number;\n  title: string;\n  description: string;\n  popularity: number;\n\n  urlSuffix?: string;\n\n}\n\nexport interface CityTrip extends Trip {\n\n  linkType: LinkType;\n  cityName: string;\n  countryName: string;\n  latitude: number;\n  longitude: number;\n\n  startDate: Date;\n  endDate?: Date;\n  countOfNights?: number;\n\n  status: TripStatus;\n  numberOfPeople: number;\n  currency: string;\n  publicly: boolean;\n  feedback: boolean;\n  popularity: number;\n\n  owners: string[];\n  tags: TagId[];\n  plannedCosts: PlannedCost[];\n  publicActivities: Activity[];\n  privateActivities: Activity[];\n  timedActivities: TimedActivity[];\n\n}\n\nexport interface CommercialTrip extends Trip {\n\n  popularity: number;\n\n  waypoints: Waypoint[];\n  tags: TagId[];\n\n  ownerId: string;\n  locale: string;\n\n}\n\nexport interface ProposalTrip extends Trip {\n\n  startDate: Date;\n  endDate?: Date;\n  countOfNights?: number;\n\n  status: TripStatus;\n  numberOfPeople: number;\n  currency: string;\n  popularity: number;\n\n  owners: string[];\n  tags: TagId[];\n  waypoints: Waypoint[];\n  plannedCosts: PlannedCost[];\n\n}\n\nexport interface RoundTrip extends Trip {\n\n  startDate: Date;\n  endDate?: Date;\n  countOfNights?: number;\n\n  status: TripStatus;\n  numberOfPeople: number;\n  currency: string;\n  publicly: boolean;\n  popularity: number;\n  feedback: boolean;\n\n  owners: string[];\n  tags: TagId[];\n  waypoints: Waypoint[];\n  plannedCosts: PlannedCost[];\n\n  creationSource: string;\n}\n\nexport interface SimpleTrip extends Trip {\n\n  countOfNights?: number;\n}\n\nexport interface SuggestionTrip extends Trip {\n\n  descriptionShort: string;\n\n  popularity: number;\n\n  waypoints: Waypoint[];\n  tags: TagId[];\n\n  ownerId: string;\n  locale: string;\n\n}\n\nexport interface UsermapWaypoint {\n\n  cityName: string;\n  countryName: string;\n  latitude: number;\n  longitude: number;\n\n}\n\nexport interface UsermapTrip {\n  waypoints: UsermapWaypoint[];\n}\n\nexport interface TravelersCenturyClubWaypoint {\n\n  countryName: string;\n  latitude: number;\n  longitude: number;\n\n}\n\nexport interface TravelersCenturyClubTrip {\n  waypoints: TravelersCenturyClubWaypoint[];\n}\n\n\nexport interface Report extends Trip {\n\n  startDate: Date;\n  endDate?: Date;\n  countOfNights?: number;\n\n\n  posts: ReportPost[];\n}\n\nexport interface ReportPost {\n  postNumber: number;\n\n  linkType: LinkType;\n\n  cityName: string;\n  countryName: string;\n  displayName: string;\n  latitude: number;\n  longitude: number;\n\n  description: string;\n  commentConnection: string;\n  commentAccommodation: string;\n  countOfNights: number;\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {CityTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CitytripService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<CityTrip[]> {\n    return this.http.get<CityTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips/citytrips',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<CityTrip> {\n    return this.http.get<CityTrip>(\n      this.config.tripsUrl + '/api/v2/trips/citytrips/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<CityTrip[]> {\n    return this.http.get<CityTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/citytrips',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<CityTrip[]> {\n    return this.http.get<CityTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/citytrips',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<CityTrip[]> {\n    return this.http.get<CityTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/citytrips',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<CityTrip[]> {\n    return this.http.get<CityTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/citytrips'\n    );\n  }\n\n  createTrip(trip: CityTrip): Observable<CityTrip> {\n    return this.http.post<CityTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/citytrips',\n      trip\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<CityTrip> {\n    return this.http.get<CityTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/citytrips/' + tripNumber\n    );\n  }\n\n  updateTrip(trip: CityTrip): Observable<CityTrip> {\n    return this.http.put<CityTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/citytrips/' + trip.tripNumber,\n      trip\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {CommercialTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CommercialService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<CommercialTrip[]> {\n    return this.http.get<CommercialTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips/commercials',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<CommercialTrip> {\n    return this.http.get<CommercialTrip>(\n      this.config.tripsUrl + '/api/v2/trips/commercials/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<CommercialTrip[]> {\n    return this.http.get<CommercialTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/commercials',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<CommercialTrip[]> {\n    return this.http.get<CommercialTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/commercials',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<CommercialTrip[]> {\n    return this.http.get<CommercialTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/commercials',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<CommercialTrip[]> {\n    return this.http.get<CommercialTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/commercials'\n    );\n  }\n\n  createTrip(trip: CommercialTrip): Observable<CommercialTrip> {\n    return this.http.post<CommercialTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/commercials',\n      trip\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<CommercialTrip> {\n    return this.http.get<CommercialTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/commercials/' + tripNumber\n    );\n  }\n\n  updateTrip(trip: CommercialTrip): Observable<CommercialTrip> {\n    return this.http.put<CommercialTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/commercials/' + trip.tripNumber,\n      trip\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {RoundTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RoundtripService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips/roundtrips',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<RoundTrip> {\n    return this.http.get<RoundTrip>(\n      this.config.tripsUrl + '/api/v2/trips/roundtrips/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/roundtrips',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/roundtrips',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/roundtrips',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips'\n    );\n  }\n\n  getCompletedTrips(): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips/completed'\n    );\n  }\n\n  getInProcessTrips(): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips/in-process'\n    );\n  }\n\n  getIdeaTrips(): Observable<RoundTrip[]> {\n    return this.http.get<RoundTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips/ideas'\n    );\n  }\n\n  createTrip(trip: RoundTrip): Observable<RoundTrip> {\n    return this.http.post<RoundTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips',\n      trip\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<RoundTrip> {\n    return this.http.get<RoundTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips/' + tripNumber\n    );\n  }\n\n  updateTrip(trip: RoundTrip): Observable<RoundTrip> {\n    return this.http.put<RoundTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/roundtrips/' + trip.tripNumber,\n      trip\n    );\n  }\n\n  requestFeedbackForRoundtrip(userId: string, tripNumber: number): Observable<any> {\n    return this.http.put(\n      this.config.gatewayUrl + '/api/v1/proposal-worker/roundtrips/' + tripNumber, null\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {ProposalTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ProposalService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<ProposalTrip[]> {\n    return this.http.get<ProposalTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips/proposals',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<ProposalTrip> {\n    return this.http.get<ProposalTrip>(\n      this.config.tripsUrl + '/api/v2/trips/proposals/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<ProposalTrip[]> {\n    return this.http.get<ProposalTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/proposals',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<ProposalTrip[]> {\n    return this.http.get<ProposalTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/proposals',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<ProposalTrip[]> {\n    return this.http.get<ProposalTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/proposals',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<ProposalTrip[]> {\n    return this.http.get<ProposalTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/proposals'\n    );\n  }\n\n  createTrip(trip: ProposalTrip): Observable<ProposalTrip> {\n    return this.http.post<ProposalTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/proposals',\n      trip\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<ProposalTrip> {\n    return this.http.get<ProposalTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/proposals/' + tripNumber\n    );\n  }\n\n  updateTrip(trip: ProposalTrip): Observable<ProposalTrip> {\n    return this.http.put<ProposalTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/proposals/' + trip.tripNumber,\n      trip\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {SuggestionTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class SuggestionService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<SuggestionTrip[]> {\n    return this.http.get<SuggestionTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips/suggestions',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<SuggestionTrip> {\n    return this.http.get<SuggestionTrip>(\n      this.config.tripsUrl + '/api/v2/trips/suggestions/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<SuggestionTrip[]> {\n    return this.http.get<SuggestionTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/suggestions',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<SuggestionTrip[]> {\n    return this.http.get<SuggestionTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/suggestions',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<SuggestionTrip[]> {\n    return this.http.get<SuggestionTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/suggestions',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<SuggestionTrip[]> {\n    return this.http.get<SuggestionTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips/suggestions'\n    );\n  }\n\n  createTrip(trip: SuggestionTrip): Observable<SuggestionTrip> {\n    return this.http.post<SuggestionTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/suggestions',\n      trip\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<SuggestionTrip> {\n    return this.http.get<SuggestionTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/suggestions/' + tripNumber\n    );\n  }\n\n  updateTrip(trip: SuggestionTrip): Observable<SuggestionTrip> {\n    return this.http.put<SuggestionTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/suggestions/' + trip.tripNumber,\n      trip\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {CityTrip, SimpleTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CommonTripService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/trips',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<SimpleTrip> {\n    return this.http.get<SimpleTrip>(\n      this.config.tripsUrl + '/api/v2/trips/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips',\n      {params: filterParams}\n    );\n  }\n\n  getTrips(): Observable<SimpleTrip[]> {\n    return this.http.get<SimpleTrip[]>(\n      this.config.gatewayUrl + '/api/v2/trips'\n    );\n  }\n\n  getTrip(tripNumber: number): Observable<SimpleTrip> {\n    return this.http.get<SimpleTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber\n    );\n  }\n\n  getPopularity(tripNumber: number): Observable<number> {\n    return this.http.get<number>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber + '/popularity'\n    );\n  }\n\n  togglePopularity(tripNumber: number): Observable<number> {\n    return this.http.put<number>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber + '/popularity',\n      null\n    );\n  }\n\n  addOwner(tripNumber: number, ownerId: string): Observable<string[]> {\n    return this.http.put<string[]>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber + '/owners/' + ownerId,\n      null\n    );\n  }\n\n  deleteOwner(tripNumber: number, ownerId: string): Observable<string[]> {\n    return this.http.delete<string[]>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber + '/owners/' + ownerId\n    );\n  }\n\n  isOpen(tripNumber: number): Observable<Boolean> {\n    return this.http.get<Boolean>(\n      this.config.gatewayUrl + '/api/v2/trips/' + tripNumber + '/is-open'\n    );\n  }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {UsermapTrip, UsermapWaypoint} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class UsermapService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findByUser(userId: string): Observable<UsermapTrip> {\n    return this.http.get<UsermapTrip>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/usermap'\n    );\n  }\n\n  get(): Observable<UsermapTrip> {\n    return this.http.get<UsermapTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/usermaps'\n    );\n  }\n\n  addWaypoint(waypoint: UsermapWaypoint): Observable<UsermapTrip> {\n    return this.http.put<UsermapTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/usermaps/waypoints',\n      waypoint\n    );\n  }\n\n  dropWaypoint(waypoint: UsermapWaypoint): Observable<UsermapTrip> {\n    return this.http.request<UsermapTrip>(\n      'delete',\n      this.config.gatewayUrl + '/api/v2/trips/usermaps/waypoints',\n      {body: waypoint}\n    );\n  }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {TravelersCenturyClubTrip, TravelersCenturyClubWaypoint} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TravelersCenturyClubService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findByUser(userId: string): Observable<TravelersCenturyClubTrip> {\n    return this.http.get<TravelersCenturyClubTrip>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/tcc'\n    );\n  }\n\n  get(): Observable<TravelersCenturyClubTrip> {\n    return this.http.get<TravelersCenturyClubTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/tcc'\n    );\n  }\n\n  addWaypoint(waypoint: TravelersCenturyClubWaypoint): Observable<TravelersCenturyClubTrip> {\n    return this.http.put<TravelersCenturyClubTrip>(\n      this.config.gatewayUrl + '/api/v2/trips/tcc/waypoints',\n      waypoint\n    );\n  }\n\n  dropWaypoint(waypoint: TravelersCenturyClubWaypoint): Observable<TravelersCenturyClubTrip> {\n    return this.http.request<TravelersCenturyClubTrip>(\n      'delete',\n      this.config.gatewayUrl + '/api/v2/trips/tcc/waypoints',\n      {body: waypoint}\n    );\n  }\n\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {Report, ReportPost} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class ReportService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findAll(filterParams?: HttpParams): Observable<Report[]> {\n    return this.http.get<Report[]>(\n      this.config.tripsUrl + '/api/v2/trips/reports',\n      {params: filterParams}\n    );\n  }\n\n  findByNumber(tripNumber: number): Observable<Report> {\n    return this.http.get<Report>(\n      this.config.tripsUrl + '/api/v2/trips/reports/' + tripNumber\n    );\n  }\n\n  findByRegion(regionName: string, filterParams?: HttpParams): Observable<Report[]> {\n    return this.http.get<Report[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(regionName) + '/trips/reports',\n      {params: filterParams}\n    );\n  }\n\n  findByCity(countryName: string, cityName: string, filterParams?: HttpParams): Observable<Report[]> {\n    return this.http.get<Report[]>(\n      this.config.tripsUrl + '/api/v2/regions/' + encodeURI(countryName) + '/' + encodeURI(cityName) + '/trips/reports',\n      {params: filterParams}\n    );\n  }\n\n  findByUser(userId: string, filterParams?: HttpParams): Observable<Report[]> {\n    return this.http.get<Report[]>(\n      this.config.tripsUrl + '/api/v2/users/' + userId + '/trips/reports',\n      {params: filterParams}\n    );\n  }\n\n  getReports(): Observable<Report[]> {\n    return this.http.get<Report[]>(\n      this.config.gatewayUrl + '/api/v2/trips/reports'\n    );\n  }\n\n  createReport(report: Report): Observable<Report> {\n    return this.http.post<Report>(\n      this.config.gatewayUrl + '/api/v2/trips/reports',\n      report\n    );\n  }\n\n  getReport(tripNumber: number): Observable<Report> {\n    return this.http.get<Report>(\n      this.config.gatewayUrl + '/api/v2/trips/reports/' + tripNumber\n    );\n  }\n\n  updateReport(report: Report): Observable<Report> {\n    return this.http.put<Report>(\n      this.config.gatewayUrl + '/api/v2/trips/reports/' + report.tripNumber,\n      report\n    );\n  }\n\n  createPost(tripNumber: number, post: ReportPost): Observable<ReportPost> {\n    return this.http.post<ReportPost>(\n      this.config.gatewayUrl + '/api/v2/trips/reports/' + tripNumber + '/posts',\n      post\n    );\n  }\n\n  updatePost(report: Report, post: ReportPost): Observable<ReportPost> {\n    return this.http.put<ReportPost>(\n      this.config.gatewayUrl + '/api/v2/trips/reports/' + report.tripNumber + '/posts/' + post.postNumber,\n      post\n    );\n  }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {PytApisConfig} from \"./pyt-apis.module\";\nimport {CityTrip, CommercialTrip, ProposalTrip, Report, RoundTrip, SimpleTrip, SuggestionTrip, Trip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class EasyTripService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n  findByNumber(tripNumber: number): Observable<Trip | CityTrip | CommercialTrip | ProposalTrip | RoundTrip | SimpleTrip | Report | SuggestionTrip> {\n    return this.http.get<Trip | CityTrip | CommercialTrip | ProposalTrip | RoundTrip | SimpleTrip | Report | SuggestionTrip>(\n      this.config.tripsUrl + '/api/v2/trips/easy/' + tripNumber\n    );\n  }\n\n}\n","import {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {makeStateKey, TransferState} from '@angular/platform-browser';\nimport {Observable, of} from \"rxjs\";\nimport {tap} from \"rxjs/operators\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CacheResponseService {\n\n  constructor(\n    @Inject(PLATFORM_ID) private platformId: string,\n    private transferState: TransferState) {\n  }\n\n  resolve<T>(key: string, callback: () => Observable<T>): Observable<T> {\n    const stateKey = makeStateKey<T>(key);\n\n    let value = this.transferState.get(stateKey, null);\n    if (!!value) {\n      return of(value);\n    } else {\n      return callback()\n        .pipe(tap(result => {\n          this.transferState.set(stateKey, result);\n        }));\n    }\n  }\n}\n","import {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {isPlatformServer} from '@angular/common';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CacheService {\n\n  constructor(\n    @Inject(PLATFORM_ID) private platformId: string) {\n  }\n\n  get<T>(cacheKey: string, caller: () => Observable<T>): Observable<T> {\n\n    if (isPlatformServer(this.platformId)) {\n      return caller();\n    }\n\n    let item = sessionStorage.getItem(cacheKey);\n    if (!!item) {\n      const cachedValue: T = JSON.parse(item);\n\n      return new Observable<T>(observer => {\n        observer.next(cachedValue);\n      });\n    }\n\n    const result = caller();\n\n    result.subscribe(value => {\n      sessionStorage.setItem(cacheKey, JSON.stringify(value));\n    });\n\n    return result;\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {Accommodation, AccommodationsService, BookingAccommodation, BookingCity} from \"./accommodations.service\";\nimport {CacheService} from \"./cache.service\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CachedAccommodationsService {\n\n  constructor(\n    private cache: CacheService,\n    private accommodationsService: AccommodationsService) {\n  }\n\n  getBookingCity(countryName: string, cityName: string): Observable<BookingCity> {\n    const cacheKey = 'booking_city_' + countryName + '_' + cityName;\n\n    return this.cache.get<BookingCity>(cacheKey, () => {\n      return this.accommodationsService.getBookingCity(countryName, cityName);\n    });\n\n  }\n\n  findByCity(cityName: string, countryName: string, lang: string): Observable<Accommodation[]> {\n    const cacheKey = 'accommodations_' + countryName + '_' + cityName;\n\n    return this.cache.get<Accommodation[]>(cacheKey, () => {\n      return this.accommodationsService.findByCity(cityName, countryName, lang);\n    });\n  }\n\n  findBestByCity(cityName: string, countryName: string, dateOfArrival?: string, countOfNights?: number, numberOfPeople?: number): Observable<BookingAccommodation> {\n    let cacheKey = 'best_accommodation_' + countryName + '_' + cityName;\n    \n    if (dateOfArrival) {\n      cacheKey = cacheKey + '_' + dateOfArrival;\n    } else {\n      cacheKey = cacheKey + '_X';\n    }\n    \n    if (countOfNights) {\n      cacheKey = cacheKey + '_' + String(countOfNights);\n    } else {\n      cacheKey = cacheKey + '_X';\n    }\n    \n    if (numberOfPeople) {\n      cacheKey = cacheKey + '_' + String(numberOfPeople);\n    } else {\n      cacheKey = cacheKey + '_X';\n    }\n    \n    return this.cache.get<BookingAccommodation>(cacheKey, () => {\n      return this.accommodationsService.findBest(countryName, cityName, dateOfArrival, countOfNights, numberOfPeople);\n    });\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {CacheService} from './cache.service';\nimport {Connection, ConnectionsService} from \"./connections.service\";\nimport {Waypoint} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CachedConnectionsService {\n\n  constructor(\n    private cache: CacheService,\n    private connectionService: ConnectionsService) {\n  }\n\n  getConnections(from: Waypoint, to: Waypoint, currency = \"USD\"): Observable<Connection[]> {\n    const cacheKey = 'connections_' + from.latitude + '_' + from.longitude + '_' + to.latitude + '_' + to.longitude + '_' + currency;\n\n    return this.cache.get<Connection[]>(cacheKey, () => {\n      return this.connectionService.getConnections(from, to, currency);\n    });\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {CurrencyService} from \"./currency.service\";\nimport {CityTrip, PlannedCost, RoundTrip} from \"./trip\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CostService {\n\n  constructor(\n    private currencyService: CurrencyService) {\n  }\n\n  calcRoundTripCosts(trip: RoundTrip): number {\n    let costs = 0;\n    if (trip.plannedCosts) {\n      const countOfNights = trip.waypoints\n        .map(waypoint => waypoint.countOfNights)\n        .reduce((previousValue, currentValue) => previousValue + currentValue, 0);\n\n      for (const plannedCost of trip.plannedCosts) {\n        costs += this.calcCostWithTripCurrency(plannedCost, countOfNights, trip.numberOfPeople, trip.currency);\n      }\n    }\n\n    for (const waypoint of trip.waypoints) {\n      if (waypoint.plannedCosts) {\n        for (const plannedCost of waypoint.plannedCosts) {\n          costs += this.calcCostWithTripCurrency(plannedCost, waypoint.countOfNights, trip.numberOfPeople, trip.currency);\n        }\n      }\n    }\n\n    return costs;\n  }\n\n  calcCityTripCosts(trip: CityTrip): number {\n    let costs = 0;\n    if (trip.plannedCosts) {\n      for (const plannedCost of trip.plannedCosts) {\n        costs += this.calcCostWithTripCurrency(plannedCost, trip.countOfNights, trip.numberOfPeople, trip.currency);\n      }\n    }\n    return costs;\n  }\n\n  calcCostWithTripCurrency(plannedCost: PlannedCost, countOfNights: number | undefined, numberOfPeople: number, tripCurrency: string): number {\n    const currencyRate = this.currencyService.getCurrencyRate(tripCurrency, plannedCost.currency);\n    const totalCost = this.calcCostTotal(plannedCost, countOfNights, numberOfPeople);\n\n    if (!currencyRate) {\n      return totalCost;\n    }\n\n    return totalCost / currencyRate.rate.valueOf();\n  }\n\n  calcCostTotal(plannedCost: PlannedCost, countOfNights: number | undefined, numberOfPeople: number): number {\n    if (!plannedCost.value) {\n      return 0;\n    }\n    if (countOfNights === undefined || countOfNights === null) {\n      return 0;\n    }\n\n    let total = plannedCost.value.valueOf();\n\n    if (plannedCost.perNight) {\n      total *= countOfNights.valueOf();\n    }\n\n    if (plannedCost.perCapita) {\n      total *= numberOfPeople.valueOf();\n    }\n\n    return total;\n  }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Inject, Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {CostType, ProposalTrip, RoundTrip, SuggestionTrip, Waypoint} from \"./trip\";\nimport {Marker} from \"./guidebook.service\";\nimport {PytApisConfig} from \"./pyt-apis.module\";\n\nexport interface RegionCosts {\n  id: string;\n  ownerId: string;\n  values: RegionCostsValue[];\n  marker: Marker[];\n}\n\nexport interface RegionCostsValue {\n  costType: CostType;\n  costClass: CostClass;\n  price: number;\n  currency: string;\n}\n\nexport enum CostClass {\n  FIRST_CLASS = 'FIRST_CLASS',\n  NORMAL = 'NORMAL',\n  BACKPACKER = 'BACKPACKER'\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CostsService {\n\n  constructor(\n    private http: HttpClient,\n    @Inject('config') private config: PytApisConfig) {\n  }\n\n\n  findByCity(cityName: string, countryName: string): Observable<RegionCosts[]> {\n    return this.http.get<RegionCosts[]>(\n      this.config.costsUrl + '/region/findByCity',\n      {params: {cityName, countryName}}\n    );\n  }\n\n  findByRegion(regionName: string): Observable<RegionCosts[]> {\n    return this.http.get<RegionCosts[]>(\n      this.config.costsUrl + '/region/findByRegion',\n      {params: {regionName}}\n    );\n  }\n\n  calcRoundTrip(source: RoundTrip): Observable<RoundTrip> {\n    return this.http.post<RoundTrip>(\n      this.config.costsUrl + '/api/v2/roundtrip',\n      source\n    );\n  }\n\n  calcSuggestionTrip(source: SuggestionTrip): Observable<SuggestionTrip> {\n    return this.http.post<SuggestionTrip>(\n      this.config.costsUrl + '/api/v2/suggestion',\n      source\n    );\n  }\n\n  calcSuggestionTripById(tripNumber: Number): Observable<SuggestionTrip> {\n    return this.http.get <SuggestionTrip>(\n      this.config.costsUrl + '/api/v2/suggestion/' + tripNumber\n    );\n  }\n\n  calcProposalTrip(source: ProposalTrip): Observable<ProposalTrip> {\n    return this.http.post<ProposalTrip>(\n      this.config.costsUrl + '/api/v2/proposal',\n      source\n    );\n  }\n\n  calcWaypoint(source: Waypoint): Observable<Waypoint> {\n    return this.http.post<Waypoint>(\n      this.config.costsUrl + '/api/v2/waypoints',\n      source\n    );\n  }\n\n}\n","import { EventEmitter, Injectable, Output, Directive } from '@angular/core';\n\n@Directive()\n@Injectable({\n  providedIn: 'root'\n})\nexport class WaypointChangedListenerService {\n\n  @Output() change: EventEmitter<any> = new EventEmitter();\n\n  trigger() {\n    this.change.emit();\n  }\n}\n","import {makeStateKey, TransferState} from '@angular/platform-browser';\nimport {Injectable, NgZone} from \"@angular/core\";\nimport {HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from \"@angular/common/http\";\nimport {tap} from \"rxjs/operators\";\n\nimport * as memoryCache from 'memory-cache';\nimport {of} from \"rxjs\";\n\n// https://itnext.io/angular-universal-caching-transferstate-96eaaa386198\n@Injectable()\nexport class ServerStateInterceptor implements HttpInterceptor {\n\n  constructor(private transferState: TransferState, private ngZone: NgZone) {\n  }\n\n  intercept(req: HttpRequest<any>, next: HttpHandler) {\n    const cachedData = memoryCache.get(req.urlWithParams);\n    if (cachedData) {\n      this.transferState.set(makeStateKey(req.urlWithParams), cachedData);\n      return of(new HttpResponse({body: cachedData, status: 200}));\n    }\n\n    return next.handle(req).pipe(\n      tap(event => {\n        if (event instanceof HttpResponse) {\n          this.transferState.set(makeStateKey(req.urlWithParams), event.body);\n          this.ngZone.runOutsideAngular(() => {\n            memoryCache.put(req.url, event.body, 1000 * 60 * 30);\n          })\n        }\n      })\n    );\n\n  }\n\n}\n","import {makeStateKey, TransferState} from '@angular/platform-browser';\nimport {Injectable} from \"@angular/core\";\nimport {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from \"@angular/common/http\";\nimport {Observable, of} from \"rxjs\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class BrowserStateInterceptor implements HttpInterceptor {\n\n  constructor(\n    private transferState: TransferState,\n  ) {\n  }\n\n  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n    if (req.method !== 'GET') {\n      return next.handle(req);\n    }\n\n    const storedResponse: string | null = this.transferState.get(makeStateKey(req.urlWithParams), null);\n\n    if (storedResponse) {\n      const response = new HttpResponse({body: storedResponse, status: 200});\n      return of(response);\n    }\n\n    return next.handle(req);\n  }\n}\n","import {TranslateLoader} from '@ngx-translate/core';\nimport {Observable} from 'rxjs';\nimport {HttpClient} from '@angular/common/http';\n\nexport class SmartI18nTranslateLoaderService implements TranslateLoader {\n\n  constructor(\n    private projectId: String,\n    private http: HttpClient) {\n  }\n\n  getTranslation(lang: string): Observable<any> {\n    return this.http.get('https://messages.smarti18n.com/api/1/messages/findForAngularMessageSource?projectId=' + this.projectId + '&locale=' + lang)\n  }\n}\n","/*\n * Public API Surface of pyt-apis\n */\n\nexport * from './lib/pyt-apis.module';\nexport * from './lib/accommodations.service';\nexport * from './lib/activities.service';\nexport * from './lib/connections.service';\nexport * from './lib/currency.service';\nexport * from './lib/guidebook.service';\nexport * from './lib/pictures.service';\nexport * from './lib/regions.service';\nexport * from './lib/seo.service';\nexport * from './lib/users.service';\nexport * from './lib/mailer.service';\nexport * from './lib/friends.service';\n\nexport * from './lib/geo-json.service';\nexport * from './lib/date-calculator.service';\n\nexport * from './lib/collection.service';\nexport * from './lib/tag.service';\nexport * from './lib/trip';\n\nexport * from './lib/citytrip.service';\nexport * from './lib/commercial.service';\nexport * from './lib/roundtrip.service';\nexport * from './lib/proposal.service';\nexport * from './lib/suggestion.service';\nexport * from './lib/common-trip.service';\nexport * from './lib/usermap.service';\nexport * from './lib/travelers-century-club.service';\nexport * from './lib/report.service';\nexport * from './lib/easy-trip.service';\n\nexport * from './lib/cache-response.service';\nexport * from './lib/cache.service';\nexport * from './lib/cached-accommodations.service';\nexport * from './lib/cached-connections.service';\nexport * from './lib/cost.service';\nexport * from './lib/costs.service';\n// export * from './lib/trip-factory.service';\nexport * from './lib/waypoint-changed-listener.service';\n\nexport * from './lib/serverstate.interceptor';\nexport * from './lib/browserstate.interceptor';\nexport * from './lib/smart-i18n-translate-loader.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAqBa,aAAa;IAEjB,OAAO,OAAO,CAAC,MAAqB;QACzC,OAAO;YACL,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;aACxC;SACF,CAAC;KACH;;0GATU,aAAa;2GAAb,aAAa;2GAAb,aAAa,YALf,EACR;2FAIU,aAAa;kBANzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,EACR;oBACD,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,EAAE;iBACZ;;;MClBoB,aAAa;IAEhC,OAAO,IAAI,CAAC,QAAgB,EAAE,WAAmB,EAAE,OAAe,IAAI;QACpE,OAAO,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACrG;IAED,OAAO,MAAM,CAAC,UAAkB,EAAE,OAAe,IAAI;QACnD,OAAO,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACzE;;;MCeU,qBAAqB;IAEhC,YACU,IAAgB,EACE,MAAqB;QADvC,SAAI,GAAJ,IAAI,CAAY;QACE,WAAM,GAAN,MAAM,CAAe;KAChD;IAED,UAAU,CAAC,QAAgB,EAAE,WAAmB,EAAE,IAAY;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,IAAI,CAAC,MAAM,CAAC,gBAAgB,GAAG,uCAAuC,EACtE,EAAC,MAAM,EAAE,aAAa,CAAC,IAAI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