{"version":3,"file":"hslayers-ng-components-legend.mjs","sources":["../../../projects/hslayers/components/legend/legend-layer-static/legend-layer-static.service.ts","../../../projects/hslayers/components/legend/legend-layer-static/legend-layer-static.component.ts","../../../projects/hslayers/components/legend/legend-layer-static/legend-layer-static.component.html","../../../projects/hslayers/components/legend/legend-layer-vector/legend-layer-vector.component.ts","../../../projects/hslayers/components/legend/legend-layer-vector/legend-layer-vector.component.html","../../../projects/hslayers/components/legend/legend.service.ts","../../../projects/hslayers/components/legend/legend-layer/legend-layer.component.ts","../../../projects/hslayers/components/legend/legend-layer/legend-layer.component.html","../../../projects/hslayers/components/legend/legend.component.ts","../../../projects/hslayers/components/legend/legend.component.html","../../../projects/hslayers/components/legend/legend.module.ts","../../../projects/hslayers/components/legend/hslayers-ng-components-legend.ts"],"sourcesContent":["import {DomSanitizer} from '@angular/platform-browser';\nimport {Injectable, inject} from '@angular/core';\n\nimport {Layer} from 'ol/layer';\nimport {Source} from 'ol/source';\n\nimport {LayerLegend} from './types/layer-legend.type';\nimport {getLegends} from 'hslayers-ng/common/extensions';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class HsLegendLayerStaticService {\n  private sanitizer = inject(DomSanitizer);\n\n  fillContent(lyr: Layer<Source>): LayerLegend {\n    const layerLegend: LayerLegend = {};\n    let legendImage = getLegends(lyr);\n    if (Array.isArray(legendImage)) {\n      legendImage = legendImage[0];\n    }\n    if (legendImage) {\n      layerLegend.lastLegendImage = legendImage;\n      if (legendImage.indexOf('<svg') > -1) {\n        layerLegend.legendType = 'svg';\n        layerLegend.svgContent =\n          this.sanitizer.bypassSecurityTrustHtml(legendImage);\n      } else {\n        layerLegend.legendType = 'image';\n        layerLegend.legendImage =\n          this.sanitizer.bypassSecurityTrustResourceUrl(legendImage);\n      }\n    }\n    return layerLegend;\n  }\n}\n","import {Component, Input, OnInit, inject} from '@angular/core';\n\nimport {HsLegendDescriptor} from '../legend-descriptor.interface';\nimport {HsLegendLayerStaticService} from './legend-layer-static.service';\nimport {LayerLegend} from './types/layer-legend.type';\nimport {getLegends} from 'hslayers-ng/common/extensions';\n\n@Component({\n  selector: 'hs-legend-layer-static',\n  templateUrl: './legend-layer-static.component.html',\n  standalone: false,\n})\nexport class HsLegendLayerStaticComponent implements OnInit {\n  private hsLegendLayerStaticService = inject(HsLegendLayerStaticService);\n\n  @Input() layer: HsLegendDescriptor;\n  layerLegend: LayerLegend = {};\n\n  ngOnInit(): void {\n    if (getLegends(this.layer.lyr)) {\n      Object.assign(\n        this.layerLegend,\n        this.hsLegendLayerStaticService.fillContent(this.layer.lyr),\n      );\n    }\n    this.layer.lyr.on('change', (e) => {\n      //TODO: Maybe rewrite this to something more fancy like Observable\n      if (getLegends(this.layer.lyr) != this.layerLegend.lastLegendImage) {\n        this.hsLegendLayerStaticService.fillContent(this.layer.lyr);\n      }\n    });\n  }\n}\n","@if (layerLegend.legendType === 'image') {\n  <img [src]=\"layerLegend.legendImage\">\n}\n@if (layerLegend.legendType === 'svg') {\n  <div [innerHtml]=\"layerLegend.svgContent\">\n  </div>\n}","import {Component, Input} from '@angular/core';\n\n@Component({\n  selector: 'hs-legend-vector-layer',\n  templateUrl: './legend-layer-vector.component.html',\n  styles: `\n    :host ::ng-deep {\n      .geostyler-legend-renderer {\n        .legend-title {\n          display: none;\n        }\n      }\n    }\n  `,\n  standalone: false,\n})\nexport class HsLegendLayerVectorComponent {\n  @Input() svg: string;\n\n  constructor() {}\n}\n","<div class=\"hs-vector-layer-legend\" [innerHtml]=\"svg\"></div>","import {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {Injectable, inject} from '@angular/core';\n\nimport LegendRenderer from 'geostyler-legend/dist/LegendRenderer/LegendRenderer';\nimport {Feature} from 'ol';\nimport {Style as GeoStylerStyle} from 'geostyler-style';\nimport {Image as ImageLayer, Layer, Vector as VectorLayer} from 'ol/layer';\nimport {OlStyleParser} from 'geostyler-openlayers-parser';\nimport {SldStyleParser as SLDParser} from 'geostyler-sld-parser';\nimport {\n  Source,\n  ImageStatic as Static,\n  Vector as VectorSource,\n  XYZ,\n} from 'ol/source';\nimport {Style} from 'ol/style';\n\nimport {HsLayerSelectorService} from 'hslayers-ng/services/layer-manager';\nimport {\n  getLayerParams,\n  getParamsFromUrl,\n  getURL,\n  HsProxyService,\n  instOf,\n  isLayerVectorLayer,\n  isLayerWMS,\n} from 'hslayers-ng/services/utils';\nimport {HsLegendDescriptor} from './legend-descriptor.interface';\nimport {HsLogService} from 'hslayers-ng/services/log';\nimport {HsStylerService, defaultStyle} from 'hslayers-ng/services/styler';\nimport {InterpolatedSource} from 'hslayers-ng/common/layers';\nimport {filter} from 'rxjs';\nimport {\n  getAutoLegend,\n  getBase,\n  getEnableProxy,\n  getLegends,\n  getShowInLayerManager,\n  getSld,\n  getTitle,\n} from 'hslayers-ng/common/extensions';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class HsLegendService {\n  hsStylerService = inject(HsStylerService);\n  hsLayerSelectorService = inject(HsLayerSelectorService);\n  private hsLog = inject(HsLogService);\n  private sanitizer = inject(DomSanitizer);\n  private hsProxyService = inject(HsProxyService);\n\n  constructor() {\n    this.hsLayerSelectorService.layerSelected\n      .pipe(filter((layer) => !!layer))\n      .subscribe(async (layer) => {\n        await this.getLayerLegendDescriptor(layer.layer);\n      });\n  }\n\n  /**\n   * Test if layer is visible and has supported type (conditions for displaying legend)\n   * @param layer - Layer to test\n   * @returns Return if legend might exist for layer and layer is visible\n   */\n  legendValid(layer: HsLegendDescriptor): boolean {\n    if (layer === undefined || layer.type == undefined) {\n      return false;\n    }\n    if (\n      ['vector', 'wms', 'static'].indexOf(layer.type) > -1 &&\n      layer.lyr.getVisible()\n    ) {\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Get legend graphics for a vector layer based on sld attribute. If no SLD exists, try to generate it from OL style.\n   * @param currentLayer - Layer of interest\n   * @returns Image as SVG string\n   */\n  async getVectorLayerLegendSvg(\n    currentLayer: VectorLayer<VectorSource<Feature>>,\n  ): Promise<string> {\n    try {\n      if (currentLayer === undefined) {\n        return;\n      }\n      if (!currentLayer.getStyle()) {\n        return;\n      }\n      const parser = (SLDParser as any).default\n        ? new (SLDParser as any).default()\n        : new SLDParser();\n      let sld = getSld(currentLayer);\n      let sldObject: GeoStylerStyle;\n      if (!sld) {\n        let layerStyle = currentLayer.getStyle();\n        if (typeof layerStyle == 'function') {\n          layerStyle = <Style | Style[]>layerStyle(new Feature(), 1);\n        }\n        try {\n          layerStyle = layerStyle as Style | Style[];\n          const symbolizers = new OlStyleParser().getSymbolizersFromOlStyle(\n            Array.isArray(layerStyle) ? layerStyle : [layerStyle],\n          );\n          sldObject = {\n            name: currentLayer.get('title') || 'Layer',\n            rules: [\n              {\n                name: '',\n                symbolizers,\n              },\n            ],\n          };\n        } catch {\n          this.hsLog.warn(\n            'FlatStyle and FlatStyleLike styles are not yet supported by Geostyler',\n          );\n        }\n      } else {\n        sldObject = (await parser.readStyle(sld)).output;\n      }\n\n      //In case SLD was not valid for parser, create a new one from default style\n      if (!sldObject) {\n        sld = defaultStyle;\n        sldObject = (await parser.readStyle(sld)).output;\n      }\n      sldObject.name = '';\n\n      this.fixOpacity(sldObject);\n      const legendOpts: any = {\n        styles: [sldObject],\n        size: [300, 200],\n        hideRect: true,\n      };\n      const legendRenderer = (LegendRenderer as any).default\n        ? new (LegendRenderer as any).default(legendOpts)\n        : new LegendRenderer(legendOpts);\n      const el = document.createElement('div');\n      await legendRenderer.render(el);\n      return el.innerHTML;\n    } catch (ex) {\n      throw ex;\n    }\n  }\n\n  private fixOpacity(sldObject: GeoStylerStyle) {\n    for (const rule of sldObject.rules) {\n      for (const symbol of rule.symbolizers) {\n        if (symbol.kind == 'Fill' && symbol.fillOpacity && !symbol.opacity) {\n          symbol.opacity = symbol.fillOpacity;\n        }\n      }\n    }\n  }\n\n  /**\n   * Generate url for GetLegendGraphic request of WMS service for selected layer\n   * @param source - Source of wms layer\n   * @param layer_name - Name of layer for which legend is requested\n   * @param layer - Layer to get legend for\n   * @returns Url of the legend graphics\n   */\n  getLegendUrl(\n    source: Source,\n    layer_name: string,\n    layer: Layer<Source>,\n  ): string {\n    if (!isLayerWMS(layer)) {\n      return '';\n    }\n    const params = getLayerParams(layer);\n    const version = params.VERSION || '1.3.0';\n    let source_url = getURL(layer);\n    if (source_url.indexOf('proxy4ows') > -1) {\n      const params = getParamsFromUrl(source_url);\n      source_url = params.OWSURL;\n    }\n    const legendImage = getLegends(layer);\n    if (\n      legendImage === undefined ||\n      (Array.isArray(legendImage) && legendImage.length == 0)\n    ) {\n      source_url +=\n        (source_url.indexOf('?') > 0 ? '' : '?') +\n        '&version=' +\n        version +\n        '&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=' +\n        layer_name +\n        '&format=image%2Fpng';\n      if (\n        getEnableProxy(layer) === undefined ||\n        getEnableProxy(layer) == true\n      ) {\n        source_url = this.hsProxyService.proxify(source_url);\n      }\n      return source_url;\n    }\n    if (typeof legendImage == 'string') {\n      return legendImage;\n    }\n    if (Array.isArray(legendImage)) {\n      return legendImage[0];\n    }\n  }\n\n  async setSvg(layer: Layer<Source>): Promise<SafeHtml> {\n    return this.sanitizer.bypassSecurityTrustHtml(\n      await this.getVectorLayerLegendSvg(\n        layer as VectorLayer<VectorSource<Feature>>,\n      ),\n    );\n  }\n\n  /**\n   * Generate SVG linear gradient for layers colormap\n   */\n  generateInterpolatedLayerLegend(layer: Layer<any>) {\n    return {\n      autoLegend: true,\n      title: getTitle(layer),\n      lyr: layer,\n      type: 'vector',\n      visible: layer.getVisible(),\n      svg: this.hsStylerService.generateSVGGradientForColorMap(layer),\n    };\n  }\n\n  /**\n   * (PRIVATE) Generate url for GetLegendGraphic request of WMS service for selected layer\n   * @param layer - OpenLayers layer\n   * @returns Description of layer to be used for creating the legend. It contains type of layer, sublayer legends, title, visibility etc.\n   */\n  async getLayerLegendDescriptor(\n    layer: Layer<Source>,\n  ): Promise<HsLegendDescriptor | undefined> {\n    if (getBase(layer)) {\n      return;\n    }\n    if (isLayerWMS(layer)) {\n      const subLayerLegends = getLayerParams(layer).LAYERS?.split(',');\n      for (let i = 0; i < subLayerLegends.length; i++) {\n        subLayerLegends[i] = this.getLegendUrl(\n          layer.getSource(),\n          subLayerLegends[i],\n          layer,\n        );\n      }\n      return {\n        title: getTitle(layer),\n        lyr: layer,\n        type: 'wms',\n        subLayerLegends: subLayerLegends,\n        visible: layer.getVisible(),\n      };\n    }\n    if (\n      isLayerVectorLayer(layer, false) &&\n      (getShowInLayerManager(layer) === undefined ||\n        getShowInLayerManager(layer) == true)\n    ) {\n      return {\n        autoLegend: getAutoLegend(layer) ?? true,\n        title: getTitle(layer),\n        lyr: layer,\n        type: 'vector',\n        visible: layer.getVisible(),\n        svg: await this.setSvg(layer),\n      };\n    }\n    if (instOf(layer, ImageLayer) && instOf(layer.getSource(), Static)) {\n      return {\n        title: getTitle(layer),\n        lyr: layer,\n        type: 'static',\n        visible: layer.getVisible(),\n      };\n    }\n    if (instOf(layer.getSource(), XYZ)) {\n      return {\n        title: getTitle(layer),\n        lyr: layer,\n        type: 'static',\n        visible: layer.getVisible(),\n      };\n    }\n    if (instOf(layer.getSource(), InterpolatedSource)) {\n      return this.generateInterpolatedLayerLegend(layer);\n    }\n    return undefined;\n  }\n}\n","import {Component, Input, OnInit, signal, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\n\nimport {HsCustomLegendCategory} from '../legend-custom-category.type';\nimport {HsLegendDescriptor} from '../legend-descriptor.interface';\nimport {HsLegendService} from '../legend.service';\nimport {HsStylerService} from 'hslayers-ng/services/styler';\n\n@Component({\n  selector: 'hs-legend-layer',\n  templateUrl: './legend-layer.component.html',\n  standalone: false,\n})\nexport class HsLegendLayerComponent implements OnInit {\n  hsLegendService = inject(HsLegendService);\n  hsStylerService = inject(HsStylerService);\n\n  @Input() layer: HsLegendDescriptor;\n\n  legendCategories: HsCustomLegendCategory[];\n  hasLegendCategories = signal(false);\n  /**\n   * default icon height in pixels\n   * @default 32\n   */\n  defaultIconHeight = 32;\n\n  constructor() {\n    this.hsStylerService.onSet\n      .pipe(takeUntilDestroyed())\n      .subscribe(async (layer) => {\n        if (this.layer.lyr == layer) {\n          this.layer.svg = await this.hsLegendService.setSvg(layer);\n        }\n      });\n  }\n  ngOnInit(): void {\n    this.legendCategories = this.layer.lyr.getSource()?.get('legendCategories');\n    this.hasLegendCategories.set(this.legendCategories?.length > 0);\n  }\n}\n","<div>\n  @switch (layer.type) {\n    @case (\"static\") {\n      <hs-legend-layer-static [layer]=\"layer\"></hs-legend-layer-static>\n    }\n    @case (\"wms\") {\n      <div>\n        @for (sublayer of layer.subLayerLegends; track $index) {\n          <img\n            [src]=\"sublayer\"\n            onerror=\"this.parentNode.removeChild(this);\"\n            onload=\"if(this.height<6) {this.parentNode.removeChild(this);}\"\n          />\n        }\n      </div>\n    }\n    @case (\"vector\") {\n      @if (layer.autoLegend) {\n        <hs-legend-vector-layer [svg]=\"layer.svg\"> </hs-legend-vector-layer>\n      }\n      @if (hasLegendCategories()) {\n        <div>\n          @for (category of legendCategories; track category.name) {\n            <p>\n              @if (category.color) {\n                <span [ngStyle]=\"{ 'background-color': category.color }\"\n                  >&nbsp;&nbsp;&nbsp;</span>\n              } @else if (category.path) {\n                <img\n                  [src]=\"category.path\"\n                  [height]=\"category.height || defaultIconHeight\"\n                />\n              }\n              &emsp;{{ category.name }}\n            </p>\n          }\n        </div>\n      }\n    }\n  }\n</div>\n","import {Component, OnInit, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\n\nimport BaseLayer from 'ol/layer/Base';\nimport {Layer} from 'ol/layer';\nimport {Map} from 'ol';\nimport {Source} from 'ol/source';\n\nimport {HsLanguageService} from 'hslayers-ng/services/language';\nimport {\n  debounce,\n  instOf,\n  isLayerWMS,\n  isLayerIDW,\n} from 'hslayers-ng/services/utils';\nimport {HsLegendDescriptor} from './legend-descriptor.interface';\nimport {HsLegendService} from './legend.service';\nimport {HsMapService} from 'hslayers-ng/services/map';\nimport {HsPanelBaseComponent} from 'hslayers-ng/common/panels';\nimport {HsQueuesService} from 'hslayers-ng/services/queues';\nimport {InterpolatedSource} from 'hslayers-ng/common/layers';\n@Component({\n  selector: 'hs-legend',\n  templateUrl: './legend.component.html',\n  standalone: false,\n})\nexport class HsLegendComponent extends HsPanelBaseComponent implements OnInit {\n  hsLegendService = inject(HsLegendService);\n  hsMapService = inject(HsMapService);\n  hsQueuesService = inject(HsQueuesService);\n  hsLanguageService = inject(HsLanguageService);\n\n  layerDescriptors = [];\n  titleSearch = '';\n  name = 'legend';\n\n  ngOnInit(): void {\n    this.hsMapService.loaded().then((map) => {\n      map.getLayers().on('add', (e) => this.layerAdded(e));\n      map.getLayers().on('remove', (e) => {\n        this.removeLayerFromLegends(e.element);\n      });\n      this.buildLegendsForLayers(map);\n    });\n    super.ngOnInit();\n  }\n\n  /**\n   * Add selected layer to the list of layers in legend (with event listener\n   * to display/hide legend item when layer visibility change)\n   * @param layer - Layer to add legend for\n   */\n  async addLayerToLegends(layer: Layer<Source>): Promise<void> {\n    const descriptor =\n      await this.hsLegendService.getLayerLegendDescriptor(layer);\n    if (descriptor) {\n      const source: any = layer.getSource();\n      if (instOf(source, InterpolatedSource)) {\n        (source as InterpolatedSource).colorMapChanged\n          .pipe(takeUntilDestroyed(this.destroyRef))\n          .subscribe(() => {\n            this.layerSourcePropChanged({target: source});\n          });\n      }\n      this.layerDescriptors.push(descriptor);\n      this.refreshList();\n      layer.on('change:visible', (e) => this.layerVisibilityChanged(e));\n      if (isLayerWMS(layer)) {\n        layer.getSource()?.on('change', (e) => {\n          debounce(this.layerSourcePropChanged(e), 100, false, this);\n        });\n      }\n    }\n  }\n\n  rebuildLegends(): void {\n    this.layerDescriptors = [];\n    this.buildLegendsForLayers(this.hsMapService.getMap());\n  }\n\n  legendFilter = (item): boolean => {\n    const r = new RegExp(this.titleSearch, 'i');\n    return r.test(item.title);\n  };\n\n  /**\n   * Check if there is any visible layer\n   * @returns Returns true if no layers with legend exist\n   */\n  noLayerExists(): boolean {\n    const visibleLayers = this.layerDescriptors.filter(\n      (check) => check.visible,\n    );\n    return visibleLayers.length == 0;\n  }\n\n  /**\n   * Remove selected layer from legend items\n   * @param layer - Layer to remove from legend\n   */\n  removeLayerFromLegends(layer: BaseLayer): void {\n    for (let i = 0; i < this.layerDescriptors.length; i++) {\n      if (this.layerDescriptors[i].lyr == layer) {\n        this.layerDescriptors.splice(i, 1);\n        this.refreshList();\n        break;\n      }\n    }\n  }\n\n  buildLegendsForLayers(map: Map): void {\n    map.getLayers().forEach((lyr) => {\n      this.layerAdded({\n        element: lyr,\n      });\n    });\n  }\n\n  /**\n   * (PRIVATE) Callback function for adding layer to map, add layers legend\n   * @param e - Event object, should have element property\n   */\n  layerAdded(e): void {\n    const que = this.hsQueuesService.ensureQueue('addLayerToLegends', 3, 10000);\n    que.push(async (cb) => {\n      await this.addLayerToLegends(e.element);\n      cb(null);\n    });\n  }\n\n  /**\n   * @param e - event description\n   */\n  layerVisibilityChanged(e): void {\n    const descriptor = this.findLayerDescriptor(e.target);\n    if (descriptor) {\n      descriptor.visible = e.target.getVisible();\n    }\n  }\n\n  /**\n   * @param e - event description\n   */\n  layerSourcePropChanged(e): void {\n    const descriptor = this.findLayerDescriptorBySource(e.target);\n    if (descriptor) {\n      this.hsLegendService\n        .getLayerLegendDescriptor(descriptor.lyr)\n        .then((newDescriptor) => {\n          if (\n            newDescriptor.subLayerLegends != descriptor.subLayerLegends ||\n            newDescriptor.title != descriptor.title ||\n            isLayerIDW(descriptor.lyr)\n          ) {\n            this.layerDescriptors[this.layerDescriptors.indexOf(descriptor)] =\n              newDescriptor;\n            this.refreshList();\n          }\n        });\n    }\n  }\n  /**\n   * Finds layer descriptor for OpenLayers layer\n   * @param layer - OpenLayers layer\n   * @returns Object describing the legend\n   */\n  findLayerDescriptor(layer: Layer<Source>): HsLegendDescriptor {\n    return this.layerDescriptors.find((ld) => ld.lyr == layer);\n  }\n\n  findLayerDescriptorBySource(source: Source): any {\n    const found = this.layerDescriptors.filter(\n      (ld) => ld.lyr.getSource() == source,\n    );\n    if (found.length > 0) {\n      return found[0];\n    }\n  }\n\n  refreshList(): void {\n    this.layerDescriptors = Array.from(this.layerDescriptors);\n  }\n}\n","@if (isVisible$ | async) {\n<div class=\"card hs-main-panel\" [ngClass]=\"panelWidthClass\">\n  <hs-panel-header name=\"legend\" [panelTabs]=\"'LEGEND'\">\n  </hs-panel-header>\n  <div class=\"card-body\">\n    <p><input type=\"text\" class=\"form-control hs-filter\" [placeholder]=\"'COMMON.filter' | translate\"\n        [(ngModel)]=\"titleSearch\" (input)=\"refreshList()\"></p>\n    @if (noLayerExists()) {\n    <span>\n      <p style=\"text-align: center\">{{'LEGEND.noLegendExists' | translate }}</p>\n    </span>\n    }\n    <ul class=\"list-group\">\n      @for (layer of this.layerDescriptors | filter:legendFilter; track layer) {\n      <li class=\"list-group-item\" [hidden]=\"!hsLegendService.legendValid(layer)\">\n        <!-- TODO: Remove function call from template -->\n        <div>\n          {{'LAYERS.' + layer.title | translate : {fallbackValue: layer.title} }}\n          <hs-legend-layer [layer]=\"layer\"></hs-legend-layer>\n        </div>\n      </li>\n      }\n    </ul>\n    <div class=\"row justify-content-center\">\n      <div class=\"col col-md-2 d-flex justify-content-center\">\n        <button type=\"button\" class=\"btn btn-light btn-outline ng-scope\" [title]=\"'COMMON.reload' | translate\"\n          (click)=\"rebuildLegends()\">\n          <i class=\"fa-solid fa-rotate\"></i>\n        </button>\n      </div>\n    </div>\n  </div>\n</div>\n}\n","import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';\nimport {TranslatePipe} from '@ngx-translate/core';\n\nimport {FilterPipe} from 'hslayers-ng/common/pipes';\nimport {HsLegendComponent} from './legend.component';\nimport {HsLegendLayerComponent} from './legend-layer/legend-layer.component';\nimport {HsLegendLayerStaticComponent} from './legend-layer-static/legend-layer-static.component';\nimport {HsLegendLayerVectorComponent} from './legend-layer-vector/legend-layer-vector.component';\nimport {\n  HsPanelHeaderComponent,\n  HsPanelHelpersModule,\n} from 'hslayers-ng/common/panels';\n@NgModule({\n  schemas: [CUSTOM_ELEMENTS_SCHEMA],\n  declarations: [\n    HsLegendComponent,\n    HsLegendLayerComponent,\n    HsLegendLayerVectorComponent,\n    HsLegendLayerStaticComponent,\n  ],\n  imports: [\n    CommonModule,\n    FormsModule,\n    HsPanelHelpersModule,\n    FilterPipe,\n    TranslatePipe,\n    HsPanelHeaderComponent,\n  ],\n  exports: [HsLegendComponent, HsLegendLayerComponent],\n  providers: [provideHttpClient(withInterceptorsFromDi())],\n})\nexport class HsLegendModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["SLDParser","ImageLayer","Static","i2.HsLegendLayerVectorComponent","i3.HsLegendLayerStaticComponent","i4.HsLegendLayerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYa,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AAsBzC,IAAA;AApBC,IAAA,WAAW,CAAC,GAAkB,EAAA;QAC5B,MAAM,WAAW,GAAgB,EAAE;AACnC,QAAA,IAAI,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC;AACjC,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;AAC9B,YAAA,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC;QAC9B;QACA,IAAI,WAAW,EAAE;AACf,YAAA,WAAW,CAAC,eAAe,GAAG,WAAW;YACzC,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;AACpC,gBAAA,WAAW,CAAC,UAAU,GAAG,KAAK;AAC9B,gBAAA,WAAW,CAA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