{"version":3,"file":"CompareMaps-CUuZTPOd.cjs","names":[],"sources":["../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/Graph.tsx","../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/index.tsx"],"sourcesContent":["import * as maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport {\r\n  DndContext,\r\n  type DragMoveEvent,\r\n  PointerSensor,\r\n  useDraggable,\r\n  useSensor,\r\n  useSensors,\r\n} from '@dnd-kit/core';\r\nimport { restrictToHorizontalAxis } from '@dnd-kit/modifiers';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\nimport {\r\n  LegendCollapseButton,\r\n  LegendExpandButton,\r\n} from '@/Components/Elements/LegendExpandControls';\r\nimport { ChevronLeftRight } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n  width: number;\r\n  height: number;\r\n  mapStyles: [string, string];\r\n  center: [number, number];\r\n  mapLegend?: string | React.ReactNode;\r\n  zoomLevel: number;\r\n}\r\n\r\nfunction synchronizeMap(map1: maplibreGl.Map, map2: maplibreGl.Map) {\r\n  let isSyncing = false;\r\n  function syncMap(sourceMap: maplibreGl.Map, targetMap: maplibreGl.Map) {\r\n    if (!isSyncing) {\r\n      isSyncing = true;\r\n      const center = sourceMap.getCenter();\r\n      const zoom = sourceMap.getZoom();\r\n      const bearing = sourceMap.getBearing();\r\n      const pitch = sourceMap.getPitch();\r\n      targetMap.jumpTo({\r\n        center,\r\n        zoom,\r\n        bearing,\r\n        pitch,\r\n      });\r\n      isSyncing = false;\r\n    }\r\n  }\r\n\r\n  // Event listeners for map1\r\n  map1.on('move', () => {\r\n    syncMap(map1, map2);\r\n  });\r\n\r\n  // Event listeners for map2\r\n  map2.on('move', () => {\r\n    syncMap(map2, map1);\r\n  });\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n  const { height, width, mapStyles, center, zoomLevel, mapLegend } = props;\r\n  const [position, setPosition] = useState(50);\r\n  const [isDragging, setIsDragging] = useState(false);\r\n  const containerRef = useRef<HTMLDivElement>(null);\r\n  const [showLegend, setShowLegend] = useState(true);\r\n  const dragStartPositionRef = useRef(50);\r\n  const sliderWidthRef = useRef(0);\r\n\r\n  const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 0 } }));\r\n\r\n  const handleDragStart = () => {\r\n    setIsDragging(true);\r\n    dragStartPositionRef.current = position;\r\n\r\n    if (containerRef.current) {\r\n      sliderWidthRef.current = containerRef.current.getBoundingClientRect().width;\r\n    }\r\n  };\r\n\r\n  const handleDragMove = (event: DragMoveEvent) => {\r\n    if (!containerRef.current || sliderWidthRef.current === 0) return;\r\n\r\n    // Calculate position change as percentage of width\r\n    const deltaPercentage = (event.delta.x / sliderWidthRef.current) * 100;\r\n    const newPosition = Math.max(0, Math.min(100, dragStartPositionRef.current + deltaPercentage));\r\n\r\n    setPosition(newPosition);\r\n  };\r\n\r\n  const handleDragEnd = () => {\r\n    setIsDragging(false);\r\n  };\r\n\r\n  const handleClick = (e: React.MouseEvent) => {\r\n    if (isDragging || !containerRef.current) return;\r\n\r\n    const rect = containerRef.current.getBoundingClientRect();\r\n    const clickX = e.clientX - rect.left;\r\n    const newPosition = (clickX / rect.width) * 100;\r\n\r\n    setPosition(Math.max(0, Math.min(100, newPosition)));\r\n  };\r\n  const graphDiv = useRef<HTMLDivElement>(null);\r\n  const leftMapRef = useRef<HTMLDivElement>(null);\r\n  const rightMapRef = useRef<HTMLDivElement>(null);\r\n  const mapContainer = useRef<HTMLDivElement>(null);\r\n  useEffect(() => {\r\n    if (mapContainer.current && leftMapRef.current && rightMapRef.current && width) {\r\n      const mapDiv = select(mapContainer.current);\r\n      mapDiv.selectAll('.maplibregl-compare').remove();\r\n      const leftMapDiv = select(leftMapRef.current);\r\n      leftMapDiv.selectAll('div').remove();\r\n      const rightMapDiv = select(rightMapRef.current);\r\n      rightMapDiv.selectAll('div').remove();\r\n      const protocol = new pmtiles.Protocol();\r\n      maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n      const leftMap = new maplibreGl.Map({\r\n        container: leftMapRef.current,\r\n        style: mapStyles[0],\r\n        center: center || [0, 0],\r\n        zoom: zoomLevel || 4,\r\n      });\r\n\r\n      const rightMap = new maplibreGl.Map({\r\n        container: rightMapRef.current,\r\n        style: mapStyles[1],\r\n        center: center || [0, 0],\r\n        zoom: zoomLevel || 4,\r\n      });\r\n      rightMap.addControl(\r\n        new maplibreGl.NavigationControl({\r\n          visualizePitch: true,\r\n          showZoom: true,\r\n          showCompass: true,\r\n        }),\r\n        'bottom-right',\r\n      );\r\n      leftMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n      leftMap.addControl(\r\n        new maplibreGl.NavigationControl({\r\n          visualizePitch: true,\r\n          showZoom: true,\r\n          showCompass: true,\r\n        }),\r\n        'bottom-right',\r\n      );\r\n      rightMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n      synchronizeMap(leftMap, rightMap);\r\n    }\r\n  }, [width, mapStyles, center, zoomLevel]);\r\n  return (\r\n    <div className='flex flex-col grow justify-center leading-0' ref={graphDiv}>\r\n      <div\r\n        style={{\r\n          width,\r\n          height,\r\n        }}\r\n      >\r\n        <div\r\n          ref={mapContainer}\r\n          className='map maplibre-show-control relative w-full h-full'\r\n          style={{ inset: 0 }}\r\n        >\r\n          <DndContext\r\n            sensors={sensors}\r\n            modifiers={[restrictToHorizontalAxis]}\r\n            onDragStart={handleDragStart}\r\n            onDragMove={handleDragMove}\r\n            onDragEnd={handleDragEnd}\r\n          >\r\n            {/* biome-ignore lint/a11y/noStaticElementInteractions: interaction for dragging handle */}\r\n            {/** biome-ignore lint/a11y/useKeyWithClickEvents: only applicable for dragging */}\r\n            <div\r\n              ref={containerRef}\r\n              style={{\r\n                position: 'relative',\r\n                width,\r\n                height,\r\n                overflow: 'hidden',\r\n                cursor: isDragging ? 'grabbing' : 'col-resize',\r\n                userSelect: 'none', // Prevent text selection during drag\r\n              }}\r\n              onClick={handleClick}\r\n            >\r\n              <div\r\n                ref={rightMapRef}\r\n                className='absolute h-full rightMap w-full'\r\n                style={{\r\n                  position: 'absolute',\r\n                  top: 0,\r\n                  left: 0,\r\n                  clipPath: `polygon(${position}% 0%, ${position}% 100%, 100% 100%, 100% 0%)`,\r\n                }}\r\n              />\r\n              <div\r\n                ref={leftMapRef}\r\n                className='absolute h-full leftMap w-full'\r\n                style={{\r\n                  position: 'absolute',\r\n                  top: 0,\r\n                  left: 0,\r\n                  inset: 0,\r\n                  clipPath: `polygon(0% 0%, ${position}% 0%, ${position}% 100%, 0% 100%)`,\r\n                }}\r\n              />\r\n\r\n              <SliderHandle position={position} />\r\n            </div>\r\n          </DndContext>\r\n        </div>\r\n      </div>\r\n      {mapLegend ? (\r\n        <div className='absolute left-5.5 bottom-13'>\r\n          {showLegend ? (\r\n            <>\r\n              <LegendCollapseButton setExpanded={setShowLegend} />\r\n              <div\r\n                className='color-legend-box p-2 bg-surface-sm/70'\r\n                // biome-ignore lint/security/noDangerouslySetInnerHtmlWithChildren: Allow setInnerHTML here\r\n                // biome-ignore lint/security/noDangerouslySetInnerHtml: Allow setInnerHTML here\r\n                dangerouslySetInnerHTML={\r\n                  typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n                }\r\n              >\r\n                {React.isValidElement(mapLegend) ? mapLegend : null}\r\n              </div>\r\n            </>\r\n          ) : (\r\n            <LegendExpandButton setExpanded={setShowLegend} />\r\n          )}\r\n        </div>\r\n      ) : null}\r\n    </div>\r\n  );\r\n}\r\n\r\ninterface HandleProps {\r\n  position: number;\r\n}\r\n\r\nfunction SliderHandle(props: HandleProps) {\r\n  const { position } = props;\r\n  const { attributes, listeners, setNodeRef } = useDraggable({ id: 'slider-handle' });\r\n\r\n  return (\r\n    <div\r\n      ref={setNodeRef}\r\n      style={{\r\n        position: 'absolute',\r\n        left: `${position}%`,\r\n        top: 0,\r\n        bottom: 0,\r\n        width: '40px',\r\n        transform: 'translateX(-50%)',\r\n        cursor: 'col-resize',\r\n        display: 'flex',\r\n        justifyContent: 'center',\r\n        alignItems: 'center',\r\n        zIndex: 10,\r\n        touchAction: 'none',\r\n      }}\r\n      {...listeners}\r\n      {...attributes}\r\n    >\r\n      <div className='h-full bg-primary' style={{ width: '2px' }} />\r\n      <div\r\n        className='flex bg-primary rounded-full absolute items-center justify-center text-content-reverse'\r\n        style={{\r\n          boxShadow: 'inset 0 0 0 1px #fff',\r\n          width: '42px',\r\n          height: '42px',\r\n          top: 'calc(50% - 21px)',\r\n          left: '0',\r\n          cursor: 'col-resize',\r\n        }}\r\n      >\r\n        <ChevronLeftRight />\r\n      </div>\r\n    </div>\r\n  );\r\n}\r\n","import { useEffect, useRef, useState } from 'react';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport type { ClassNameObject, Languages, SourcesDataType, StyleObject } from '@/Types';\r\nimport { Graph } from './Graph';\r\n\r\ninterface Props {\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Background color of the graph */\r\n  backgroundColor?: string | boolean;\r\n  /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n  styles?: StyleObject;\r\n  /** Custom class names */\r\n  classNames?: ClassNameObject;\r\n\r\n  // Size and Spacing\r\n  /** Width of the graph */\r\n  width?: number;\r\n  /** Height of the graph */\r\n  height?: number;\r\n  /** Minimum height of the graph */\r\n  minHeight?: number;\r\n  /** Relative height scaling factor. This overwrites the height props */\r\n  relativeHeight?: number;\r\n  /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n  padding?: string;\r\n\r\n  // Graph Parameters\r\n  /** URLs for mapStyles JSON user wants to compare  */\r\n  mapStyles: [string, string];\r\n  /** Defines the legend for the map. mapLegend with type string is show as innerHTML. */\r\n  mapLegend?: string | React.ReactNode;\r\n  /** Starting center point of the map */\r\n  center?: [number, number];\r\n  /** Starting zoom level of the map */\r\n  zoomLevel?: number;\r\n\r\n  // Configuration and Options\r\n  /** Language setting  */\r\n  language?: Languages;\r\n  /** Color theme */\r\n  theme?: 'light' | 'dark';\r\n  /** Unique ID for the graph */\r\n  graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm), [pmtiles](https://www.npmjs.com/package/pmtiles), [dnd-kit/core](https://www.npmjs.com/package/@dnd-kit/core), and [dnd-kit/modifier](https://www.npmjs.com/package/@dnd-kit/modifiers) package to your project */\r\nexport function GeoHubCompareMaps(props: Props) {\r\n  const {\r\n    graphTitle,\r\n    height,\r\n    width,\r\n    relativeHeight,\r\n    sources,\r\n    graphDescription,\r\n    footNote,\r\n    padding,\r\n    backgroundColor = false,\r\n    graphID,\r\n    mapStyles,\r\n    center = [0, 0],\r\n    zoomLevel = 3,\r\n    language = 'en',\r\n    minHeight = 0,\r\n    theme = 'light',\r\n    ariaLabel,\r\n    styles,\r\n    classNames,\r\n    mapLegend,\r\n  } = props;\r\n  const [svgWidth, setSvgWidth] = useState(0);\r\n  const [svgHeight, setSvgHeight] = useState(0);\r\n  const graphDiv = useRef<HTMLDivElement>(null);\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n  useEffect(() => {\r\n    const resizeObserver = new ResizeObserver((entries) => {\r\n      setSvgWidth(entries[0].target.clientWidth || 620);\r\n      setSvgHeight(entries[0].target.clientHeight || 480);\r\n    });\r\n    if (graphDiv.current) {\r\n      resizeObserver.observe(graphDiv.current);\r\n    }\r\n    return () => resizeObserver.disconnect();\r\n  }, []);\r\n  return (\r\n    <GraphContainer\r\n      className={classNames?.graphContainer}\r\n      style={styles?.graphContainer}\r\n      id={graphID}\r\n      ref={graphParentDiv}\r\n      aria-label={ariaLabel}\r\n      backgroundColor={backgroundColor}\r\n      theme={theme}\r\n      language={language}\r\n      minHeight={minHeight}\r\n      width={width}\r\n      height={height}\r\n      relativeHeight={relativeHeight}\r\n      padding={padding}\r\n    >\r\n      {graphTitle || graphDescription ? (\r\n        <GraphHeader\r\n          styles={{\r\n            title: styles?.title,\r\n            description: styles?.description,\r\n          }}\r\n          classNames={{\r\n            title: classNames?.title,\r\n            description: classNames?.description,\r\n          }}\r\n          graphTitle={graphTitle}\r\n          graphDescription={graphDescription}\r\n          width={width}\r\n        />\r\n      ) : null}\r\n      <GraphArea ref={graphDiv}>\r\n        {svgWidth && svgHeight ? (\r\n          <Graph\r\n            width={svgWidth}\r\n            height={svgHeight}\r\n            mapStyles={mapStyles}\r\n            center={center}\r\n            zoomLevel={zoomLevel}\r\n            mapLegend={mapLegend}\r\n          />\r\n        ) : null}\r\n      </GraphArea>\r\n      {sources || footNote ? (\r\n        <GraphFooter\r\n          styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n          classNames={{\r\n            footnote: classNames?.footnote,\r\n            source: classNames?.source,\r\n          }}\r\n          sources={sources}\r\n          footNote={footNote}\r\n          width={width}\r\n        />\r\n      ) : null}\r\n    </GraphContainer>\r\n  );\r\n}\r\n"],"mappings":"iiBA+BA,SAAS,EAAe,EAAsB,EAAsB,CAClE,IAAI,EAAY,GAChB,SAAS,EAAQ,EAA2B,EAA2B,CACrE,GAAI,CAAC,EAAW,CACd,EAAY,GACZ,IAAM,EAAS,EAAU,UAAU,EAC7B,EAAO,EAAU,QAAQ,EACzB,EAAU,EAAU,WAAW,EAC/B,EAAQ,EAAU,SAAS,EACjC,EAAU,OAAO,CACf,SACA,OACA,UACA,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