{"version":3,"file":"hslayers-ng-core.mjs","sources":["../../../projects/hslayers/core/map-host.directive.ts","../../../projects/hslayers/core/safeTakeUntilDestroyed.ts","../../../projects/hslayers/core/map/map.directive.ts","../../../projects/hslayers/core/hslayers.service.ts","../../../projects/hslayers/core/map/map.component.ts","../../../projects/hslayers/core/map/map.component.html","../../../projects/hslayers/core/hslayers.component.ts","../../../projects/hslayers/core/hslayers.html","../../../projects/hslayers/core/layout.directive.ts","../../../projects/hslayers/core/auth.interceptor.ts","../../../projects/hslayers/core/hslayers.module.ts","../../../projects/hslayers/core/public-api.ts","../../../projects/hslayers/core/hslayers-ng-core.ts"],"sourcesContent":["import {Directive, ViewContainerRef, inject} from '@angular/core';\n@Directive({\n  selector: '[hsMapHost]',\n  standalone: false,\n})\nexport class HsMapHostDirective {\n  viewContainerRef = inject(ViewContainerRef);\n}\n","import {DestroyRef} from '@angular/core';\nimport {EMPTY, NEVER, pipe, takeUntil, MonoTypeOperatorFunction} from 'rxjs';\nimport {catchError, defaultIfEmpty} from 'rxjs/operators';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\n\n/**\n * A safer version of takeUntilDestroyed that handles edge cases around component destruction.\n * Based on: https://github.com/angular/angular/issues/54527#issuecomment-2098254508\n */\nexport function safeTakeUntilDestroyed<T>(\n  destroyRef?: DestroyRef,\n): MonoTypeOperatorFunction<T> {\n  return pipe(\n    takeUntil(\n      // NEVER is an observable that never emits any value\n      NEVER.pipe(\n        // When component is destroyed, takeUntilDestroyed will complete the NEVER observable\n        takeUntilDestroyed(destroyRef),\n        // If takeUntilDestroyed throws (e.g., \"View destroyed\" error),\n        // we catch it and return EMPTY to safely complete\n        catchError(() => EMPTY),\n        // Since NEVER never emits, we provide a default value when it completes\n        // This ensures the takeUntil always gets a value to complete with\n        defaultIfEmpty(null),\n      ),\n    ),\n  );\n}\n","import { Directive, ViewContainerRef, inject } from '@angular/core';\n\n@Directive({\n  selector: '[map]',\n  standalone: true,\n})\nexport class HsMapDirective {\n  viewContainerRef = inject(ViewContainerRef);\n}\n","import {Injectable, inject} from '@angular/core';\n\nimport {HsConfig} from 'hslayers-ng/config';\nimport {HsEventBusService} from 'hslayers-ng/services/event-bus';\nimport {HsLayoutService} from 'hslayers-ng/services/layout';\nimport {HsLogService} from 'hslayers-ng/services/log';\nimport {HsMapService} from 'hslayers-ng/services/map';\n\nimport {HsLanguageService} from 'hslayers-ng/services/language';\nimport {debounce} from 'hslayers-ng/services/utils';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class HslayersService {\n  private hsLanguageService = inject(HsLanguageService);\n  hsMapService = inject(HsMapService);\n  hsConfig = inject(HsConfig);\n  hsLayoutService = inject(HsLayoutService);\n  private log = inject(HsLogService);\n  hsEventBusService = inject(HsEventBusService);\n\n  embeddedEnabled = true;\n  //TODO: remove\n  //config: any;\n  initCalled: boolean;\n  //TODO: remove\n  //missingLRFunctionsWarned: any;\n\n  constructor() {\n    this.hsLayoutService.layoutLoads.subscribe(({element, innerElement}) => {\n      // Initialization function for HSLayers elements and their sizes.\n      // Stores element and container references and sets event listeners for map resizing.\n      if (\n        window.innerWidth < this.hsConfig.mobileBreakpoint ||\n        this.hsConfig.sidebarClosed\n      ) {\n        this.hsLayoutService.sidebarExpanded = false;\n        this.hsLayoutService.sidebarLabels = false;\n      } else {\n        this.hsLayoutService.sidebarExpanded = true;\n      }\n      const translateService = this.hsLanguageService.getTranslator();\n      if (!translateService.getFallbackLang()) {\n        this.hsLanguageService.initLanguages();\n      }\n      if (this.initCalled) {\n        return;\n      }\n      this.hsMapService.loaded().then(() => {\n        this.initSizeListeners();\n        setTimeout(() => {\n          this.mapSizeUpdates();\n        }, 750);\n        this.initCalled = true;\n      });\n    });\n\n    this.hsEventBusService.mapSizeUpdates.subscribe(() => {\n      this.mapSizeUpdates();\n    });\n  }\n\n  /**\n   * Add event listeners for updating HS element and map size after browser resizing or complete load of application.\n   */\n  initSizeListeners(): void {\n    window.addEventListener('resize', () => {\n      debounce(\n        function () {\n          this.mapSizeUpdates();\n          this.hsEventBusService.layoutResizes.next();\n        },\n        300,\n        false,\n        this,\n      )();\n    });\n  }\n\n  /**\n   * Update map size.\n   */\n  mapSizeUpdates(): void {\n    const map = this.hsMapService.mapElement;\n    if (map === null) {\n      return;\n    }\n    if (this.hsMapService.map) {\n      this.hsMapService.map.updateSize();\n      if (\n        window.innerWidth < this.hsConfig.mobileBreakpoint ||\n        this.hsLayoutService.mainpanel\n      ) {\n        this.hsLayoutService.sidebarLabels = false;\n      } else {\n        this.hsLayoutService.sidebarLabels = true;\n      }\n    } else {\n      this.log.log('Map not yet initialized!');\n      return;\n    }\n    const neededSize = {\n      width: map.offsetWidth,\n      height: map.offsetHeight,\n    };\n    this.hsEventBusService.sizeChanges.next(neededSize);\n  }\n\n  /**\n   * Do complete reset of map (view, layers) according to app config\n   */\n  resetMap(): void {\n    this.hsMapService.reset();\n    this.hsEventBusService.mapResets.next();\n  }\n}\n","import {\n  AfterViewInit,\n  Component,\n  ElementRef,\n  NgZone,\n  OnDestroy,\n  ViewChild,\n  inject,\n} from '@angular/core';\n\nimport {Subscription} from 'rxjs';\nimport {transform} from 'ol/proj';\n\nimport {HS_PRMS, HsShareUrlService} from 'hslayers-ng/services/share';\nimport {HsConfig} from 'hslayers-ng/config';\nimport {HsEventBusService} from 'hslayers-ng/services/event-bus';\nimport {HsLayoutService} from 'hslayers-ng/services/layout';\nimport {HsMapDirective} from './map.directive';\nimport {HsMapService} from 'hslayers-ng/services/map';\nimport {HslayersService} from '../hslayers.service';\n\n@Component({\n  selector: 'hs-map',\n  templateUrl: './map.component.html',\n  imports: [HsMapDirective],\n})\nexport class HsMapComponent implements AfterViewInit, OnDestroy {\n  hsMapService = inject(HsMapService);\n  hslayersService = inject(HslayersService);\n  hsConfig = inject(HsConfig);\n  hsEventBusService = inject(HsEventBusService);\n  private hsLayoutService = inject(HsLayoutService);\n  private hsShareUrlService = inject(HsShareUrlService);\n  private zone = inject(NgZone);\n\n  @ViewChild('map') map: ElementRef;\n\n  unregisterMapSyncCenterHandlerSubscription: Subscription;\n\n  constructor() {\n    this.unregisterMapSyncCenterHandlerSubscription =\n      this.hsEventBusService.mapCenterSynchronizations.subscribe((data) => {\n        this.onCenterSync(data);\n      });\n  }\n\n  ngAfterViewInit(): void {\n    const visibleLayersParam = this.hsShareUrlService.getParamValue(\n      HS_PRMS.visibleLayers,\n    );\n    this.hsMapService.permalink = this.hsShareUrlService.getParamValue(\n      HS_PRMS.permalink,\n    );\n    this.hsMapService.externalCompositionId =\n      this.hsShareUrlService.getParamValue(HS_PRMS.composition) ||\n      this.hsConfig.defaultComposition;\n\n    if (visibleLayersParam) {\n      this.hsMapService.visibleLayersInUrl = visibleLayersParam.split(';');\n    }\n\n    this.zone.runOutsideAngular(() =>\n      this.hsMapService.init(this.map.nativeElement),\n    );\n\n    if (\n      this.hsShareUrlService.getParamValue(HS_PRMS.pureMap) ||\n      this.hsConfig.pureMap == true\n    ) {\n      this.hsLayoutService.puremapApp = true;\n    }\n\n    this.hsMapService.getMap().updateSize();\n  }\n\n  ngOnDestroy(): void {\n    this.unregisterMapSyncCenterHandlerSubscription.unsubscribe();\n    this.hsMapService.getMap().getInteractions().clear();\n  }\n\n  /**\n   * This gets called from Cesium map, to\n   * synchronize center and resolution between Ol and Cesium maps\n   * @param data - Coordinates in lon/lat and resolution\n   */\n  onCenterSync(data?) {\n    const center = data.center;\n    if (!center) {\n      return;\n    }\n    const toProj = this.hsMapService.getCurrentProj();\n    const transformed = transform([center[0], center[1]], 'EPSG:4326', toProj);\n    this.hsMapService.moveToAndZoom(\n      transformed[0],\n      transformed[1],\n      this.zoomForResolution(center[2]),\n    );\n  }\n\n  /**\n   * Calculates zoom level for a given resolution\n   * @param resolution - Resolution\n   * @returns Zoom level for resolution. If resolution\n   * was greater than 156543.03390625 return 0\n   */\n  zoomForResolution(resolution) {\n    let zoom = 0;\n    //Sometimes resolution is under 0.\n    resolution = Math.abs(resolution);\n    let r = 156543.03390625; // resolution for zoom 0\n    while (resolution < r) {\n      r /= 2.0;\n      zoom++;\n      if (resolution > r) {\n        return zoom;\n      }\n    }\n    return zoom; // resolution was greater than 156543.03390625 so return 0\n  }\n}\n","<div #map class=\"hs-ol-map hs-flex-fill d-flex\"></div>\n","import {\n  AfterViewInit,\n  Component,\n  DestroyRef,\n  ElementRef,\n  Input,\n  NgZone,\n  OnInit,\n  PLATFORM_ID,\n  Signal,\n  ViewChild,\n  inject,\n} from '@angular/core';\nimport {\n  combineLatestWith,\n  delay,\n  filter,\n  fromEvent,\n  map,\n  startWith,\n  timer,\n} from 'rxjs';\nimport {isPlatformBrowser} from '@angular/common';\nimport {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';\n\nimport {HsConfig, HsConfigObject, ToastPosition} from 'hslayers-ng/config';\nimport {HsEventBusService} from 'hslayers-ng/services/event-bus';\nimport {HsExternalService} from 'hslayers-ng/services/external';\nimport {HsLayoutService} from 'hslayers-ng/services/layout';\nimport {HsLogService} from 'hslayers-ng/services/log';\nimport {HsMapHostDirective} from './map-host.directive';\nimport {\n  HsOverlayContainerService,\n  HsPanelContainerService,\n} from 'hslayers-ng/services/panels';\nimport {safeTakeUntilDestroyed} from './safeTakeUntilDestroyed';\nimport {debounce} from 'hslayers-ng/services/utils';\n\ninterface PanState {\n  readonly MIN_HEIGHT: number;\n  readonly MAX_HEIGHT: number;\n  isProcessing: boolean;\n  TOGGLE_THRESHOLD: number;\n}\n\n@Component({\n  // eslint-disable-next-line @angular-eslint/component-selector\n  selector: 'hslayers',\n  templateUrl: './hslayers.html',\n  styles: [],\n  standalone: false,\n})\nexport class HslayersComponent implements AfterViewInit, OnInit {\n  hsConfig = inject(HsConfig);\n  private elementRef = inject(ElementRef);\n  hsLayoutService = inject(HsLayoutService);\n  private hsLog = inject(HsLogService);\n  hsEventBusService = inject(HsEventBusService);\n  hsPanelContainerService = inject(HsPanelContainerService);\n  hsOverlayContainerService = inject(HsOverlayContainerService);\n  private hsExternalService = inject(HsExternalService);\n  private ngZone = inject(NgZone);\n  private platformId = inject(PLATFORM_ID);\n  private destroyRef = inject(DestroyRef);\n\n  @Input() config: HsConfigObject;\n  @Input() id: string;\n  @ViewChild('hslayout') hslayout: ElementRef;\n  @ViewChild(HsMapHostDirective, {static: true})\n  mapHost: HsMapHostDirective;\n\n  sidebarPosition: Signal<string>;\n  sidebarVisible: Signal<boolean>;\n\n  private panState: PanState = {\n    /**\n     * Maximum and minimum values in 'vh' units of how much the panel can be 'moved' by panning\n     * Final values are controlled by css variables\n     */\n    MIN_HEIGHT: 20, // vh\n    MAX_HEIGHT: 70, // vh\n    isProcessing: false,\n    /**\n     * Threshold in px\n     */\n    TOGGLE_THRESHOLD: 200,\n  };\n\n  private panelSpace: HTMLElement;\n  private mapSpace: HTMLElement;\n\n  toastPosition: Signal<ToastPosition>;\n\n  constructor() {\n    this.sidebarPosition = toSignal(this.hsLayoutService.sidebarPosition);\n    this.sidebarVisible = toSignal(this.hsLayoutService.sidebarVisible);\n\n    this.toastPosition = toSignal(\n      this.hsLayoutService.sidebarPosition$.pipe(\n        combineLatestWith(\n          this.hsConfig.configChanges.pipe(startWith(this.hsConfig)),\n        ),\n        map(([sidebarPosition, _]) => {\n          return (\n            this.hsConfig.toastPosition ??\n            (sidebarPosition === 'left' ? 'bottom-right' : 'bottom-left')\n          );\n        }),\n      ),\n    );\n  }\n\n  async ngOnInit(): Promise<void> {\n    if (this.config) {\n      this.hsConfig.update(this.config);\n    }\n    if (this.id) {\n      this.hsConfig.setAppId(this.id);\n    }\n\n    this.hsLayoutService.layoutElement =\n      this.elementRef.nativeElement.querySelector('.hs-layout');\n\n    this.hsLayoutService.contentWrapper =\n      this.elementRef.nativeElement.querySelector('.hs-content-wrapper');\n\n    if (window.innerWidth < 600 && isPlatformBrowser(this.platformId)) {\n      const viewport = document.querySelector('meta[name=\"viewport\"]');\n      viewport.setAttribute(\n        'content',\n        'width=device-width, initial-scale=0.6, maximum-scale=2, user-scalable=no',\n      );\n    }\n    // const appInUrl = this.hsShareUrlService.getParamValue('app');\n    // if (appInUrl != undefined) {\n    //   this.HsLayoutService.scrollTo(this.elementRef);\n    // }\n\n    this.hsLayoutService.layoutLoads.next({\n      element: this.elementRef.nativeElement,\n      innerElement: '.hs-map-space',\n    });\n    this.hsLayoutService.mapSpaceRef.next(this.mapHost.viewContainerRef);\n\n    this.hsLayoutService.sidebarPosition\n      .pipe(delay(0), takeUntilDestroyed(this.destroyRef))\n      .subscribe((position) => {\n        if (position === 'left') {\n          this.hsLayoutService.contentWrapper.classList.add('flex-reverse');\n          this.hsLayoutService.sidebarRight = false;\n        }\n      });\n\n    window.addEventListener(\n      'resize',\n      debounce(\n        () => {\n          this.hsLayoutService.updPanelSpaceWidth();\n          this.hsLayoutService.updSidebarPosition();\n        },\n        50,\n        false,\n        this,\n      ),\n    );\n  }\n\n  async ngAfterViewInit() {\n    this.hsLayoutService.layoutElement = this.hslayout.nativeElement;\n    const hsapp = this.elementRef.nativeElement;\n    hsapp.style.overflow = 'hidden';\n\n    if (window.innerWidth < this.hsConfig.mobileBreakpoint) {\n      document.body.style.margin = '0px';\n    }\n\n    if (getComputedStyle(hsapp).display == 'inline') {\n      hsapp.style.display = 'block';\n      this.hsLog.warn(\n        'Main element (<hslayers>) needs display property to be defined...fallback value added',\n      );\n    }\n    //Minimal value expected for clientHeight of hsapp element at the initiation in case of WINDOWED mode\n    //In comparison with clientHeight used to distinguish between full and windowed mode.\n    const minHeight =\n      window.devicePixelRatio <= 1 ? 350 : 300 * window.devicePixelRatio;\n    //In case the app height is not set on hslayers element, height is determined by\n    //the main panel height which vary from 0 if no mainpanel is set to 90 or even 208 in some cases .\n    //Value of 300 or less /would mean that height is not set we need do something\n    if (hsapp.clientHeight < minHeight) {\n      const heightBefore = hsapp.clientHeight;\n      hsapp.style.height = '100%';\n      //If its still the same, height is not set on parents nor on hslayers element - we want fullscreen app\n      if (hsapp.clientHeight == heightBefore) {\n        hsapp.style.height = '100svh';\n        this.hsLog.warn(\n          `Main element (<hslayers>) needs height property to be defined...fallback value added`,\n        );\n      } else if (hsapp.clientHeight < heightBefore) {\n        /*\n         * If the value was set, but is lower than recommended - use the value but write a warning.\n         */\n        hsapp.style.height = heightBefore;\n        this.hsLog.warn(\n          `Height of the element <hslayers> is lower than recommended value of ${minHeight}px.`,\n        );\n      }\n    }\n\n    this.mapSpace = this.hsLayoutService.contentWrapper.querySelector(\n      '.hs-map-space',\n    ) as HTMLElement;\n\n    this.panelSpace = this.hsLayoutService.contentWrapper.querySelector(\n      '.hs-panelspace',\n    ) as HTMLElement;\n\n    const canHover = window.matchMedia('(hover: hover)').matches;\n    if (!canHover) {\n      const {default: Hammer} = await import('hammerjs');\n\n      this.ngZone.runOutsideAngular(() => {\n        const panRecognizer = new Hammer(\n          this.hsLayoutService.layoutElement.querySelector(\n            '.hs-panelspace-expander',\n          ),\n          {\n            'recognizers': [\n              [Hammer.Pan, {direction: Hammer.DIRECTION_VERTICAL}],\n            ],\n            cssProps: {\n              touchCallout: 'none',\n              contentZooming: 'none',\n              tapHighlightColor: 'rgba(0,0,0,0)',\n              touchSelect: 'none',\n              userDrag: 'none',\n              userSelect: 'none',\n            },\n          },\n        );\n\n        // Handle pan start\n        fromEvent(panRecognizer, 'panstart')\n          .pipe(\n            filter(() => !this.panState.isProcessing),\n            safeTakeUntilDestroyed(this.destroyRef),\n          )\n          .subscribe((e: any) => {\n            // Dynamically set the map space height to freeze it in its current height\n            // because of performance reasons\n            const currentMapHeight =\n              this.mapSpace.getBoundingClientRect().height;\n            this.mapSpace.style.flex = `0 0 ${currentMapHeight}px`;\n            this.panelSpace.classList.add('dragging');\n          });\n\n        // Handle pan move\n        fromEvent(panRecognizer, 'panmove')\n          .pipe(\n            filter(() => !this.panState.isProcessing),\n            safeTakeUntilDestroyed(this.destroyRef),\n          )\n          .subscribe((e: any) => this.updatePanelHeight(e));\n\n        // Handle pan end\n        fromEvent(panRecognizer, 'panend')\n          .pipe(safeTakeUntilDestroyed(this.destroyRef))\n          .subscribe((e: any) => this.snapToNearestHeight(e));\n      });\n    }\n  }\n\n  /**\n   * Updates the height of the panel space based on the pan event.\n   *\n   * @param e The pan event object.\n   */\n  private updatePanelHeight(e: any): void {\n    const viewportHeight = window.innerHeight;\n    // Calculate the new height of the panel space in viewport height units (vh).\n    // Clamp the new height to be within the minimum and maximum allowed heights.\n    const newHeightVh = Math.max(\n      this.panState.MIN_HEIGHT,\n      Math.min(\n        this.panState.MAX_HEIGHT,\n        ((window.innerHeight - e.center.y) / viewportHeight) * 100,\n      ),\n    );\n\n    // Set the style height of the panel space to the clamped height.\n    this.panelSpace.style.height = `${newHeightVh}vh`;\n  }\n\n  /**\n   * Snaps the panel space to the nearest height.\n   */\n  /**\n   * Snaps the panel space to the nearest height based on the pan event.\n   *\n   * @param e The pan event object.\n   */\n  private snapToNearestHeight(e: any): void {\n    const panelspace = this.panelSpace;\n\n    /**\n     * Remove the dragging class and inline style height from the panel space\n     * to visually indicate the end of dragging and allow it to snap to its nearest height.\n     */\n    panelspace.classList.remove('dragging');\n    panelspace.style.removeProperty('height');\n    this.mapSpace.style.removeProperty('flex');\n\n    // Check if the absolute delta Y of the pan event exceeds the toggle threshold.\n    if (Math.abs(e.deltaY) >= this.panState.TOGGLE_THRESHOLD) {\n      panelspace.classList.toggle('panel-collapsed');\n    }\n\n    // Set a timeout to allow for visual adjustments before notifying about map size updates.\n    timer(300)\n      .pipe(safeTakeUntilDestroyed(this.destroyRef))\n      .subscribe(() => {\n        this.ngZone.run(() => {\n          this.hsEventBusService.mapSizeUpdates.next();\n          this.panState.isProcessing = false;\n        });\n      });\n  }\n}\n","<div #hslayout class=\"hs-layout hsl hs-page-wrapper\"\n  style=\"display:block; position: relative; width: 100%; height: 100%; min-height: inherit !important;  max-height:100vh;\">\n  <div class=\"hs-content-wrapper d-flex w-100 h-100\" [ngClass]=\"{\n            'hs-open': hsLayoutService.sidebarExpanded && sidebarVisible, \n            'hs-sb-right': sidebarPosition() === 'right' && sidebarVisible, \n            'hs-sb-left': sidebarPosition() === 'left' && sidebarVisible, \n            'hs-sb-bottom': sidebarPosition() === 'bottom'\n        }\">\n    <!-- ng-if=\"HsLayoutService.componentEnabled('guiOverlay')\" -->\n    <div class=\"hs-map-space d-flex\">\n      <hs-map class=\"hs-flex-fill d-flex\"/>\n      <ng-template hsMapHost></ng-template>\n      <hs-panel-container [service]=\"hsOverlayContainerService\"></hs-panel-container>\n    </div>\n    <div class=\"hs-panelspace buttons\" [hidden]=\"!sidebarVisible()\"\n      [ngClass]=\"{'labels': hsLayoutService.sidebarLabels}\">\n      <div class=\"hs-panelspace-expander-container bg-white d-none d-mw-md-block w-100\">\n        <span class=\"hs-panelspace-expander bg-transparent text-primary py-0 w-100\"\n          [ngClass]=\"{'disabled': !(hsLayoutService.sidebarExpanded && sidebarVisible)}\">\n          <div class=\"drag-handle pt-1\"></div>\n        </span>\n      </div>\n      <div class=\"hs-panelspace-wrapper me-1 d-block\">\n        <hs-sidebar class=\"border-0\" />\n        <div class=\"hs-panelplace\">\n          @if (hsLayoutService.mainpanel === 'sidebar') {\n          <hs-mini-sidebar />\n          }\n          <hs-panel-container [service]=\"hsPanelContainerService\" class=\"hs-panelplace\">\n          </hs-panel-container>\n        </div>\n      </div>\n    </div>\n    <hs-toast aria-live=\"polite\" aria-atomic=\"true\" [position]=\"toastPosition()\"></hs-toast>\n    <div class=\"hs-dialog-area\"></div>\n  </div>\n  <hs-dialog-container></hs-dialog-container>\n</div>\n","import {Directive, ViewContainerRef, inject} from '@angular/core';\n\n@Directive({\n  selector: '[hslayout]',\n  standalone: false,\n})\nexport class HsLayoutHostDirective {\n  viewContainerRef = inject(ViewContainerRef);\n}\n","import {\n  HttpErrorResponse,\n  HttpInterceptorFn,\n  HttpResponse,\n} from '@angular/common/http';\nimport {catchError, map} from 'rxjs/operators';\nimport {inject} from '@angular/core';\n\nimport {HsCommonLaymanService} from 'hslayers-ng/common/layman';\nimport {throwError} from 'rxjs';\n\nexport const HsAuthInterceptor: HttpInterceptorFn = (req, next) => {\n  const authService = inject(HsCommonLaymanService);\n\n  if (\n    authService.layman()?.url &&\n    req.url.includes(authService.layman()?.url)\n  ) {\n    return next(req).pipe(\n      map((event) => {\n        // Check for HttpResponse (success case)\n        if (event instanceof HttpResponse) {\n          if (\n            event.body?.['authenticated'] === false &&\n            authService.isAuthenticated()\n          ) {\n            // Unauthorized request sent to backend -> logout\n            authService.logout$.next();\n          }\n        }\n        return event;\n      }),\n      catchError((error: HttpErrorResponse) => {\n        if (error.status === 403) {\n          //Unauthorized access, Unsuccessful OAuth2 authentication/HTTP Header authentication\n          //https://github.com/LayerManager/layman/blob/master/src/layman/error_list.py\n          // --> logout\n          authService.logout$.next();\n        }\n        // Re-throw the error\n        return throwError(() => error);\n      }),\n    );\n  }\n\n  return next(req);\n};\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n  HttpClient,\n  provideHttpClient,\n  withInterceptors,\n} from '@angular/common/http';\nimport {\n  provideMissingTranslationHandler,\n  provideTranslateService,\n  TranslateLoader,\n} from '@ngx-translate/core';\n\nimport {HsDialogContainerComponent} from 'hslayers-ng/common/dialogs';\nimport {HsLayoutHostDirective} from './layout.directive';\nimport {HsMapComponent} from './map/map.component';\nimport {HsMapHostDirective} from './map-host.directive';\nimport {HsPanelHelpersModule} from 'hslayers-ng/common/panels';\nimport {HsSidebarModule} from 'hslayers-ng/components/sidebar';\nimport {HslayersComponent} from './hslayers.component';\nimport {HsToastComponent} from 'hslayers-ng/common/toast';\nimport {HsAuthInterceptor} from './auth.interceptor';\nimport {\n  HsMissingTranslationHandler,\n  HsTranslateLoader,\n} from 'hslayers-ng/services/language';\nimport {HsConfig} from 'hslayers-ng/config';\n\n@NgModule({\n  declarations: [HsMapHostDirective, HslayersComponent, HsLayoutHostDirective],\n  imports: [\n    CommonModule,\n    HsMapComponent,\n    HsSidebarModule,\n    HsPanelHelpersModule,\n    HsToastComponent,\n    HsDialogContainerComponent,\n  ],\n  exports: [HslayersComponent],\n  providers: [\n    provideHttpClient(withInterceptors([HsAuthInterceptor])),\n    provideTranslateService({\n      loader: {\n        provide: TranslateLoader,\n        useClass: HsTranslateLoader,\n        deps: [HsConfig, HttpClient],\n      },\n      missingTranslationHandler: provideMissingTranslationHandler(\n        HsMissingTranslationHandler,\n      ),\n    }),\n  ],\n})\nexport class HslayersModule {}\n","/*\n * Main hslayers-ng entrypoint\n */\nexport * from './hslayers.component';\nexport * from './hslayers.module';\nexport * from './layout.directive';\nexport * from './hslayers.service';\nexport * from './map-host.directive';\nexport * from './map/map.component';\nexport * from './map/map.directive';\nexport * from './safeTakeUntilDestroyed';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.HsMapComponent","i7.HsMapHostDirective","map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKa,kBAAkB,CAAA;AAJ/B,IAAA,WAAA,GAAA;AAKE,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,IAAA;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,KAAK;AAClB,iBAAA;;;ACCD;;;AAGG;AACG,SAAU,sBAAsB,CACpC,UAAuB,EAAA;IAEvB,OAAO,IAAI,CACT,SAAS;;AAEP,IAAA,KAAK,CAAC,IAAI;;IAER,kBAAkB,CAAC,UAAU,CAAC;;;AAG9B,IAAA,UAAU,CAAC,MAAM,KAAK,CAAC;;;AAGvB,IAAA,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