diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..44aeb40 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules\\typescript\\lib" +} diff --git a/app/[locale]/layer-list.tsx b/app/[locale]/layer-list.tsx index 3a25a43..993b607 100644 --- a/app/[locale]/layer-list.tsx +++ b/app/[locale]/layer-list.tsx @@ -10,8 +10,8 @@ import MapImageLayer from '@arcgis/core/layers/MapImageLayer'; import Sublayer from '@arcgis/core/layers/support/Sublayer'; import ButtonMenuItem from '@arcgis/core/widgets/FeatureTable/Grid/support/ButtonMenuItem'; -export default function Layers({ view, tableRoot }: { view: MapView; tableRoot: HTMLDivElement }) { - const htmlDiv = useRef(null); +export default function Layers({ view, tableDiv }: { view: MapView; tableDiv: HTMLDivElement }) { + const layerListDiv = useRef(null); const featureTable = useRef(null); const rendered = useRef(false); @@ -25,9 +25,9 @@ export default function Layers({ view, tableRoot }: { view: MapView; tableRoot: const tableContainer = document.createElement('div'); tableContainer.className = 'h-full w-full'; - if (tableRoot) { - tableRoot.classList.remove('hidden'); - tableRoot.append(tableContainer); + if (tableDiv) { + tableDiv.classList.remove('hidden'); + tableDiv.append(tableContainer); } const featureLayer = await layer.createFeatureLayer(); @@ -43,8 +43,8 @@ export default function Layers({ view, tableRoot }: { view: MapView; tableRoot: iconClass: 'esri-icon-close', clickFunction: function () { featureTable.current?.destroy(); - if (tableRoot) { - tableRoot.classList.add('hidden'); + if (tableDiv) { + tableDiv.classList.add('hidden'); } }, } as unknown as ButtonMenuItem, @@ -53,13 +53,13 @@ export default function Layers({ view, tableRoot }: { view: MapView; tableRoot: }); }; - if (htmlDiv.current) { + if (layerListDiv.current) { const arcGISAPIWidgetContainer = document.createElement('div'); - htmlDiv.current.append(arcGISAPIWidgetContainer); + layerListDiv.current.append(arcGISAPIWidgetContainer); const layerList = new LayerList({ view, - container: htmlDiv.current, + container: layerListDiv.current, selectionEnabled: true, listItemCreatedFunction: async function (event) { const item = event.item; @@ -139,9 +139,7 @@ export default function Layers({ view, tableRoot }: { view: MapView; tableRoot: } }); } + }, [t, tableDiv, view]); - return () => {}; - }); - - return
; + return
; } diff --git a/app/[locale]/map.tsx b/app/[locale]/map.tsx index 5b80a29..eacde2b 100644 --- a/app/[locale]/map.tsx +++ b/app/[locale]/map.tsx @@ -1,5 +1,7 @@ +'use client'; + import { useRef, useState, useEffect } from 'react'; -import { createRoot } from 'react-dom/client'; +import { Root, createRoot } from 'react-dom/client'; import dynamic from 'next/dynamic'; @@ -10,22 +12,24 @@ import WebMap from '@arcgis/core/WebMap'; import esriConfig from '@arcgis/core/config'; import ScaleBar from '@arcgis/core/widgets/ScaleBar'; import Legend from '@arcgis/core/widgets/Legend'; -import VectorTileLayer from '@arcgis/core/layers/VectorTileLayer'; -import TileLayer from '@arcgis/core/layers/TileLayer'; -import Map from '@arcgis/core/Map.js'; -import Basemap from '@arcgis/core/Basemap'; import * as intl from '@arcgis/core/intl'; +import TextContent from '@arcgis/core/popup/content/TextContent'; +import ExpressionContent from '@arcgis/core/popup/content/ExpressionContent'; +import ElementExpressionInfo from '@arcgis/core/popup/ElementExpressionInfo'; +import { watch } from '@arcgis/core/core/reactiveUtils'; +// @ts-ignore +import { getColorsForRendererValues } from '@arcgis/core/renderers/support/utils'; // set asset path for ArcGIS Maps SDK widgets -esriConfig.assetsPath = './assets'; +esriConfig.assetsPath = '/assets'; // ids of web map items in portal const webMapDEID = '7d0768f73d3e4be2b32c22274c600cb3'; const webMapENID = 'dbf5532d06954c6a989d4f022de83f70'; // lazy load components -const Print = dynamic(() => import('./print')); const Layers = dynamic(() => import('./layer-list')); +const Print = dynamic(() => import('./print')); const Basemaps = dynamic(() => import('./basemap-list')); const Search = dynamic(() => import('./search')); @@ -48,20 +52,30 @@ import { CalciteAction, CalcitePanel, } from '@esri/calcite-components-react'; +import MapImageLayer from '@arcgis/core/layers/MapImageLayer'; export default function MapComponent({ locale }: { locale: string }) { - const legendRoot = useRef(null); - const maskRoot = useRef(null); - const tableRoot = useRef(null); + const maskRef = useRef(null); + const tableRef = useRef(null); const mapView = useRef(null); const previousId = useRef(null); + const mapRef = useRef(null); + const layersRef = useRef(null); + const layersRoot = useRef(null); + const legendRef = useRef(null); + const basemapsRef = useRef(null); + const basemapsRoot = useRef(null); + const printRef = useRef(null); + const printRoot = useRef(null); + const searchRef = useRef(document.createElement('div')); + const searchRoot = useRef(null); const [actionBarExpanded, setActionBarExpanded] = useState(false); const { t } = useTranslation(); useEffect(() => { - if (!mapView.current) { + if (mapRef.current) { // set locale for ArcGIS Maps SDK widgets intl.setLocale(locale); @@ -74,40 +88,16 @@ export default function MapComponent({ locale }: { locale: string }) { }, }); - const lightgrayBase = new VectorTileLayer({ - url: 'https://gis.geosphere.at/portal/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json', - opacity: 0.5, - }); - const lightGrayReference = new VectorTileLayer({ - url: 'https://gis.geosphere.at/portal/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json', - opacity: 1, - }); - const worldHillshade = new TileLayer({ - url: 'https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer', - }); - const basemapEsri = new Basemap({ - baseLayers: [worldHillshade, lightgrayBase, lightGrayReference], - title: 'Esri', - thumbnailUrl: - 'https://gis.geosphere.at/portal/sharing/rest/content/items/3eb1510943be4f29ae01c01ce229d8ba/data', - }); - - const map = new Map({ - basemap: basemapEsri, - }); - const view = new MapView({ - container: 'map-container', - map: map, + container: mapRef.current, + map: webMap, padding: { left: 49, }, popup: { dockOptions: { - position: 'auto', - breakpoint: { - width: 5000, - }, + position: 'top-right', + breakpoint: false, }, dockEnabled: true, }, @@ -120,17 +110,15 @@ export default function MapComponent({ locale }: { locale: string }) { wkid: 3857, }, }, + ui: { + components: ['attribution'], + }, + popupEnabled: true, }); mapView.current = view; - view.ui.empty('top-left'); - webMap.load().then(() => { - map.layers = webMap.layers; - createRoot(document.createElement('div')).render(); - }); - - // add further map related UI components + // add ScaleBar const scaleBar = new ScaleBar({ view: view, unit: 'metric', @@ -138,16 +126,124 @@ export default function MapComponent({ locale }: { locale: string }) { view.ui.add([scaleBar], 'bottom-left'); - if (legendRoot.current) { + // render Legend component + if (legendRef.current) { new Legend({ view: view, - container: legendRoot.current, + container: legendRef.current, }); } - } - return () => {}; - }, [locale]); + // render Search component + if (searchRef.current) { + if (!searchRoot.current) { + searchRoot.current = createRoot(searchRef.current); + } + + searchRoot.current.render(); + } + + // render Layers component + if (layersRef.current) { + if (!layersRoot.current) { + layersRoot.current = createRoot(layersRef.current); + } + + if (tableRef.current) { + layersRoot.current.render(); + } + } + + // render Basemaps component + if (basemapsRef.current) { + if (!basemapsRoot.current) { + basemapsRoot.current = createRoot(basemapsRef.current); + } + + basemapsRoot.current.render(); + } + + // // render Print component + if (printRef.current) { + if (!printRoot.current) { + printRoot.current = createRoot(printRef.current); + } + + if (maskRef.current) { + printRoot.current.render(); + } + } + + watch( + () => view.popup?.viewModel?.active, + () => console.log(view.popup?.selectedFeature) + ); + + // view.on('immediate-click', (event) => { + // const mapImageLayer = view.map.layers.find((layer) => layer.title === 'Profilschnitte') as MapImageLayer; + // if (mapImageLayer) { + // mapImageLayer.allSublayers.forEach((sublayer) => { + // if (sublayer.title === 'Bohrprofile') { + // } + // }); + // } + // }); + + // This function fires each time a LayerView is created + // view.on('layerview-create', function (event) { + // // The LayerView for the desired layer + // if (event.layer.type === 'map-image') { + // (event.layer as MapImageLayer).allSublayers.forEach((sublayer) => { + // if (sublayer.title === 'Bohrprofile') { + // let textElement = new TextContent(); + // textElement.text = 'Das ist nur ein Test.'; + // if (Array.isArray(sublayer.popupTemplate.content)) sublayer.popupTemplate.content.push(textElement); + + // sublayer.load().then(async () => { + // const renderer = sublayer.renderer; + // const fieldToValueColorMap = await getColorsForRendererValues(renderer); + + // let classBreaks: number[] = []; + // let colors: object[] = []; + // for (const [key, classBreaksToColorMap] of fieldToValueColorMap) { + // for (const [classBreack, color] of classBreaksToColorMap) { + // colors.push(color); + // classBreaks.push(classBreack); + // } + + // // while (!stopIteration) { + // // if ($feature['${key}'] > ${classBreaks}[index]) { + // // stopIteration = true; + // // color = ${colors}[index] + // // } + // // } + + // const expressionContent = new ExpressionContent({ + // expressionInfo: { + // title: 'Legende', + // expression: ` + // var stopIteration = true; + // var index = 0; + + // return { + // type: "text", + // text: "First class break for key ${key}: ${classBreaks[0]} and value: " + $feature['${key}'] + // } + // `, + // }, + // }); + + // if (Array.isArray(sublayer.popupTemplate.content)) { + // sublayer.popupTemplate.content.push(expressionContent); + // } + // } + // }); + // } + // }); + // } + // }); + } + }, [locale, t]); const handleCalciteActionBarToggle = () => { setActionBarExpanded(!actionBarExpanded); @@ -155,13 +251,13 @@ export default function MapComponent({ locale }: { locale: string }) { mapView.current.padding = !actionBarExpanded ? { left: 150 } : { left: 49 }; } - if (tableRoot.current) { + if (tableRef.current) { if (!actionBarExpanded) { - tableRoot.current.classList.add('left-40'); - tableRoot.current.classList.remove('left-14'); + tableRef.current.classList.add('left-40'); + tableRef.current.classList.remove('left-14'); } else { - tableRoot.current.classList.add('left-14'); - tableRoot.current.classList.remove('left-40'); + tableRef.current.classList.add('left-14'); + tableRef.current.classList.remove('left-40'); } } }; @@ -180,7 +276,7 @@ export default function MapComponent({ locale }: { locale: string }) { } if (previousId.current === 'print') { - maskRoot.current?.classList.add('hidden'); + maskRef.current?.classList.add('hidden'); } } @@ -190,7 +286,7 @@ export default function MapComponent({ locale }: { locale: string }) { previousId.current = nextId; if (nextId === 'print') { - maskRoot.current?.classList.remove('hidden'); + maskRef.current?.classList.remove('hidden'); } } else { previousId.current = null; @@ -234,32 +330,30 @@ export default function MapComponent({ locale }: { locale: string }) { -
-
+
+
diff --git a/app/[locale]/print.tsx b/app/[locale]/print.tsx index e18c976..e001955 100644 --- a/app/[locale]/print.tsx +++ b/app/[locale]/print.tsx @@ -63,7 +63,7 @@ const formats: Format = { 'A3 Querformat mit Legende': [400, 215], }; -export default function Print({ view, maskRoot }: { view: MapView; maskRoot: HTMLDivElement }) { +export default function Print({ view, maskDiv }: { view: MapView; maskDiv: HTMLDivElement }) { const { t } = useTranslation(); const [title, setTitle] = useState('GeoSphere Austria'); @@ -183,11 +183,11 @@ export default function Print({ view, maskRoot }: { view: MapView; maskRoot: HTM const maskWidth = clamp(Math.round(lowerRight.x - upperLeft.x), 0, view.width); const maskHeight = clamp(Math.round(lowerRight.y - upperLeft.y), 0, view.height); - if (maskRoot) { - maskRoot.style.left = left + 'px'; - maskRoot.style.top = top + 'px'; - maskRoot.style.width = maskWidth + 'px'; - maskRoot.style.height = maskHeight + 'px'; + if (maskDiv) { + maskDiv.style.left = left + 'px'; + maskDiv.style.top = top + 'px'; + maskDiv.style.width = maskWidth + 'px'; + maskDiv.style.height = maskHeight + 'px'; } } }; diff --git a/app/[locale]/search.tsx b/app/[locale]/search.tsx index 81f2856..25ecd52 100644 --- a/app/[locale]/search.tsx +++ b/app/[locale]/search.tsx @@ -1,4 +1,4 @@ -import { useRef, useState, useEffect } from 'react'; +import { useRef, useState, useEffect, MouseEventHandler } from 'react'; import { Root, createRoot } from 'react-dom/client'; import { useTranslation } from 'react-i18next'; @@ -40,14 +40,17 @@ import SimpleLineSymbol from '@arcgis/core/symbols/SimpleLineSymbol'; import SimpleMarkerSymbol from '@arcgis/core/symbols/SimpleMarkerSymbol'; import Sublayer from '@arcgis/core/layers/support/Sublayer'; import PopupTemplate from '@arcgis/core/PopupTemplate'; +import { watch } from '@arcgis/core/core/reactiveUtils'; // create feaure layer from URL of data index layer -const datenIndexURL = 'https://gis.geosphere.at/maps/rest/services/datenindex/raster_5000/MapServer/0'; +const datenIndexURL = 'https://gis.geosphere.at/maps/rest/services/datenindex/raster_1000/MapServer/0'; const indexLayer = new FeatureLayer({ url: datenIndexURL, - title: 'Datenindex 1:5.000', - opacity: 0, + title: 'Datenindex 1:1.000', + opacity: 1, legendEnabled: false, + visible: false, + listMode: 'hide', }); // custom type definitions @@ -70,6 +73,61 @@ interface LayerToFeaturesMap { [key: string]: string[]; } +// create query from cellcode for 3x3 neighbourhood +const createQueryFromCellcode = (cellcode: string) => { + const { north, east }: any = cellcode.match(/N(?\d+)E(?\d+)/)?.groups; + const northNumber = parseInt(north); + const eastNumber = parseInt(east); + const operations = [ + [1, -1], + [1, 0], + [1, 1], + [0, -1], + [0, 1], + [-1, -1], + [-1, 0], + [-1, 1], + ]; + + const cellcodeQueries = operations.map( + (operation) => `cellcode = '1kmN${northNumber + operation[0]}E${eastNumber + operation[1]}'` + ); + return `cellcode = '${cellcode}' OR ` + cellcodeQueries.join(' OR '); +}; + +// remove layers from layer tree by given filter +const removeLayers = (layers: (CustomGroupLayer | CustomLayer)[], keepLayer: any): any => { + return layers + .filter((layer) => keepLayer(layer)) + .map((layer) => { + if (layer.type === 'group' && (layer as CustomGroupLayer).layers) { + return { ...layer, layers: removeLayers((layer as CustomGroupLayer).layers, keepLayer) }; + } else { + return layer; + } + }); +}; + +// get custom layer objects from layer tree +const getLayerObjects = (layers: any) => { + return layers.map((layer: any) => { + if (layer.layers) { + return { + id: layer.id, + type: layer.type, + title: layer.title, + visible: layer.visible, + layers: getLayerObjects(layer.layers.toArray()), + }; + } else { + return { id: layer.id, type: layer.type, title: layer.title, visible: layer.visible }; + } + }); +}; + +// build query string for custom search source (BEV geocoding service) +const buildQueryString = (searchTerm: string) => `?term=${encodeURI(searchTerm)}`; + // custom React component export default function SearchComponent({ view }: { view: MapView }) { const [currentTarget, setCurrentTarget] = useState(null); @@ -80,173 +138,6 @@ export default function SearchComponent({ view }: { view: MapView }) { const { t } = useTranslation(); - // get map image layer from sublayer - const getMapImageLayer = (layerURL: string): MapImageLayer | undefined => { - if (view) { - const filteredLayerViews = view.allLayerViews.filter((layerView) => { - const regex = /^https:\/\/.+\/MapServer/g; - const matches = layerURL.match(regex); - let mapImageLayerURL; - if (matches && matches.length > 0) mapImageLayerURL = matches[0]; - - if (layerView.layer.type === 'map-image') { - return (layerView.layer as MapImageLayer).url === mapImageLayerURL; - } else { - return false; - } - }); - - let mapImageLayer; - if (filteredLayerViews.length > 0) { - mapImageLayer = filteredLayerViews.at(0).layer as MapImageLayer; - } - - return mapImageLayer; - } - }; - - // handle toggle layer visibility - const handleToggleVisibility = (event: any) => { - const layerItem = event.target; - - const layerId = layerItem.getAttribute('text'); - const icon = layerItem.getAttribute('icon'); - - if (layerId) { - const layer = view.map?.findLayerById(layerId); - if (icon === 'view-hide') { - layerItem.setAttribute('icon', 'view-visible'); - if (layer) { - layer.visible = true; - } - } else { - layerItem.setAttribute('icon', 'view-hide'); - if (layer) { - layer.visible = false; - } - } - } - }; - - // handle zoom to feature - const handleZoomTo = async (event: any) => { - const layerURL = event.target.getAttribute('text'); - const res = await fetch(layerURL + '?f=json'); - const json = await res.json(); - - const mapImageLayer = getMapImageLayer(layerURL); - const sr = mapImageLayer?.spatialReference; - const geometry = json.feature?.geometry; - - view.graphics.removeAll(); - const higlightOptions = view.highlightOptions; - if (geometry.x && geometry.y && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { - const point = new Point({ - x: geometry.x, - y: geometry.y, - spatialReference: sr, - }); - const graphic = new Graphic({ - geometry: point, - symbol: { - type: 'simple-marker', - style: 'circle', - size: '8px', - color: [ - higlightOptions.color.r, - higlightOptions.color.g, - higlightOptions.color.b, - higlightOptions.fillOpacity, - ], - outline: { - color: [higlightOptions.color.r, higlightOptions.color.g, higlightOptions.color.b, higlightOptions.color.a], - width: 1, - }, - } as unknown as SimpleMarkerSymbol, - }); - view.graphics.add(graphic); - view.goTo(geodesicBuffer(point, 1000, 'meters')); - return; - } - - if (geometry.paths && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { - const polyline = new Polyline({ - paths: geometry.paths, - spatialReference: sr, - }); - const graphic = new Graphic({ - geometry: polyline, - symbol: { - type: 'simple-line', - color: [higlightOptions.color.r, higlightOptions.color.g, higlightOptions.color.b], - width: '2px', - } as unknown as SimpleLineSymbol, - }); - view.graphics.add(graphic); - view.goTo(geodesicBuffer(polyline.extent.center, 5000, 'meters')); - return; - } - - if (geometry.rings && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { - const polygon = new Polygon({ - rings: geometry.rings, - spatialReference: sr, - }); - const graphic = new Graphic({ - geometry: polygon, - symbol: { - type: 'simple-fill', - color: [ - higlightOptions.color.r, - higlightOptions.color.g, - higlightOptions.color.b, - higlightOptions.fillOpacity, - ], - outline: { - color: [higlightOptions.color.r, higlightOptions.color.g, higlightOptions.color.b, higlightOptions.color.a], - width: 1, - }, - } as unknown as SimpleFillSymbol, - }); - view.graphics.add(graphic); - view.goTo(polygon); - return; - } - }; - - // remove layers from layer tree by given filter - const removeLayers = (layers: (CustomGroupLayer | CustomLayer)[], keepLayer: any): any => { - return layers - .filter((layer) => keepLayer(layer)) - .map((layer) => { - if (layer.type === 'group' && (layer as CustomGroupLayer).layers) { - return { ...layer, layers: removeLayers((layer as CustomGroupLayer).layers, keepLayer) }; - } else { - return layer; - } - }); - }; - - // get custom layer objects from layer tree - const getLayerObjects = (layers: any) => { - return layers.map((layer: any) => { - if (layer.layers) { - return { - id: layer.id, - type: layer.type, - title: layer.title, - visible: layer.visible, - layers: getLayerObjects(layer.layers.toArray()), - }; - } else { - return { id: layer.id, type: layer.type, title: layer.title, visible: layer.visible }; - } - }); - }; - - // build query string for custom search source (BEV geocoding service) - const buildQueryString = (searchTerm: string) => `?term=${encodeURI(searchTerm)}`; - const url = 'https://kataster.bev.gv.at/api/all4map'; const customSearchSource = new SearchSource({ placeholder: t('search.placeholder'), @@ -340,32 +231,171 @@ export default function SearchComponent({ view }: { view: MapView }) { }, }); - // create query from cellcode for 3x3 neighbourhood - const createQueryFromCellcode = (cellcode: string) => { - const { north, east }: any = cellcode.match(/N(?\d+)E(?\d+)/)?.groups; - const northNumber = parseInt(north); - const eastNumber = parseInt(east); - const operations = [ - [1, -1], - [1, 0], - [1, 1], - [0, -1], - [0, 1], - [-1, -1], - [-1, 0], - [-1, 1], - ]; + // get map image layer from sublayer + const getMapImageLayer = (layerURL: string): MapImageLayer | undefined => { + if (view) { + const filteredLayerViews = view.allLayerViews.filter((layerView) => { + const regex = /^https:\/\/.+\/MapServer/g; + const matches = layerURL.match(regex); + let mapImageLayerURL; + if (matches && matches.length > 0) mapImageLayerURL = matches[0]; - const cellcodeQueries = operations.map( - (operation) => `cellcode = '10kmN${northNumber + operation[0]}E${eastNumber + operation[1]}'` - ); - return `cellcode = '${cellcode}' OR ` + cellcodeQueries.join(' OR '); + if (layerView.layer.type === 'map-image') { + return (layerView.layer as MapImageLayer).url === mapImageLayerURL; + } else { + return false; + } + }); + + let mapImageLayer; + if (filteredLayerViews.length > 0) { + mapImageLayer = filteredLayerViews.at(0).layer as MapImageLayer; + } + + return mapImageLayer; + } + }; + + // handle toggle layer visibility + const handleToggleVisibility = (event: any) => { + const layerItem = event.target; + + const layerId = layerItem.getAttribute('text'); + const icon = layerItem.getAttribute('icon'); + + if (layerId) { + const layer = view.map?.findLayerById(layerId); + if (icon === 'view-hide') { + layerItem.setAttribute('icon', 'view-visible'); + if (layer) { + layer.visible = true; + } + } else { + layerItem.setAttribute('icon', 'view-hide'); + if (layer) { + layer.visible = false; + } + } + } }; useEffect(() => { - if (rendered.current) return; - rendered.current = true; + // handle zoom to feature + const handleZoomTo = async (event: any) => { + const layerURL = event.target.getAttribute('text'); + const res = await fetch(layerURL + '?f=json'); + const json = await res.json(); + const mapImageLayer = getMapImageLayer(layerURL); + const sr = mapImageLayer?.spatialReference; + const geometry = json.feature?.geometry; + + view.graphics.removeAll(); + const higlightOptions = view.highlightOptions; + if (geometry.x && geometry.y && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { + const point = new Point({ + x: geometry.x, + y: geometry.y, + spatialReference: sr, + }); + const graphic = new Graphic({ + geometry: point, + symbol: { + type: 'simple-marker', + style: 'circle', + size: '8px', + color: [ + higlightOptions.color.r, + higlightOptions.color.g, + higlightOptions.color.b, + higlightOptions.fillOpacity, + ], + outline: { + color: [ + higlightOptions.color.r, + higlightOptions.color.g, + higlightOptions.color.b, + higlightOptions.color.a, + ], + width: 1, + }, + } as unknown as SimpleMarkerSymbol, + }); + view.graphics.add(graphic); + view.goTo(geodesicBuffer(point, 1000, 'meters')); + return; + } + + if (geometry.paths && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { + const polyline = new Polyline({ + paths: geometry.paths, + spatialReference: sr, + }); + const graphic = new Graphic({ + geometry: polyline, + symbol: { + type: 'simple-line', + color: [higlightOptions.color.r, higlightOptions.color.g, higlightOptions.color.b], + width: '2px', + } as unknown as SimpleLineSymbol, + }); + view.graphics.add(graphic); + view.goTo(geodesicBuffer(polyline.extent.center, 5000, 'meters')); + return; + } + + if (geometry.rings && higlightOptions && higlightOptions.color && higlightOptions.fillOpacity) { + const polygon = new Polygon({ + rings: geometry.rings, + spatialReference: sr, + }); + const graphic = new Graphic({ + geometry: polygon, + symbol: { + type: 'simple-fill', + color: [ + higlightOptions.color.r, + higlightOptions.color.g, + higlightOptions.color.b, + higlightOptions.fillOpacity, + ], + outline: { + color: [ + higlightOptions.color.r, + higlightOptions.color.g, + higlightOptions.color.b, + higlightOptions.color.a, + ], + width: 1, + }, + } as unknown as SimpleFillSymbol, + }); + view.graphics.add(graphic); + view.goTo(polygon); + return; + } + }; + + // watch for visibility changes + const handle = watch( + () => view.map.allLayers.map((layer) => [layer.id, layer.visible]), + (newValues, oldValues) => { + newValues.forEach((value, key) => { + // visibility changed + if (oldValues.at(key) && value[1] !== oldValues.at(key)[1]) { + const layerId = value[0] as string; + const calciteAction = document.querySelector(`calcite-action[text='${layerId}']`); + if (calciteAction) { + if (value[1]) { + calciteAction.setAttribute('icon', 'view-visible'); + } else { + calciteAction.setAttribute('icon', 'view-hide'); + } + } + } + }); + } + ); // add data index layer view.map.layers.push(indexLayer); @@ -377,11 +407,13 @@ export default function SearchComponent({ view }: { view: MapView }) { includeDefaultSources: false, }); + // empty top-left corner of MapView for Search component view.ui.add(search, 'top-left'); // add event handler for select-result events search.on('select-result', (event) => { view.closePopup(); + view.graphics.removeAll(); // get selected feature and display it on map const graphic = event.result.feature; @@ -396,9 +428,6 @@ export default function SearchComponent({ view }: { view: MapView }) { setCurrentTarget(graphic); } - view.graphics.removeAll(); - view.graphics.add(graphic); - // query for intersecting features indexLayer .queryFeatures({ @@ -496,19 +525,69 @@ export default function SearchComponent({ view }: { view: MapView }) { } const text = sublayer?.id ? sublayer?.id.toString() : ''; + + let sublayerWasVisible: boolean = false; + let mapImageLayerWasVisible: boolean = false; + const handleMouseEnter: MouseEventHandler = (event) => { + (event.target as HTMLElement).classList.add('bg-gray-100'); + if (mapImageLayer && !mapImageLayer.visible) { + mapImageLayerWasVisible = false; + mapImageLayer.visible = true; + } else { + mapImageLayerWasVisible = true; + } + + if (sublayer && !sublayer.visible) { + sublayerWasVisible = false; + sublayer.visible = true; + } + }; + + const handleMouseLeave: MouseEventHandler = (event) => { + (event.target as HTMLElement).classList.remove('bg-gray-100'); + if (mapImageLayer && !mapImageLayerWasVisible) { + mapImageLayer.visible = false; + } + + if (sublayer && !sublayerWasVisible) { + sublayer.visible = false; + } + }; + + const handleSublayerVisibilityToggle: MouseEventHandler = (event: any) => { + if (mapImageLayer && sublayer) { + if (event.target?.getAttribute('icon') === 'view-hide') { + mapImageLayerWasVisible = true; + mapImageLayer.visible = true; + } + + if (event.target?.getAttribute('icon') === 'view-visible') { + event.target?.setAttribute('icon', 'view-hide'); + sublayer.visible = false; + sublayerWasVisible = false; + } else { + event.target?.setAttribute('icon', 'view-visible'); + sublayer.visible = true; + sublayerWasVisible = true; + } + } + }; + // create UI item for sublayer const accordionItem = ( - + { - if (sublayer) { - sublayer.visible = !sublayer.visible; - } - }} + scale="s" + onClick={handleSublayerVisibilityToggle} > @@ -565,7 +644,7 @@ export default function SearchComponent({ view }: { view: MapView }) { (layer.type === 'group' && ((layer as CustomGroupLayer).layers.length === 0 || (layer as CustomGroupLayer).layers.every( - (child) => child.type === 'imagery' || child.type === 'imagery-tile' + (child) => child.type === 'imagery' || child.type === 'imagery-tile' || child.type === 'tile' ))) || layer.type === 'feature' || layer.type === 'imagery' || @@ -666,7 +745,7 @@ export default function SearchComponent({ view }: { view: MapView }) { }; indexLayer.popupTemplate = popupTemplate as unknown as PopupTemplate; - }); + }, []); return null; } diff --git a/next.config.js b/next.config.js index b408897..7527b69 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'standalone', + // output: 'standalone', }; module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 83b21a1..238cae9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,17 +17,18 @@ "eslint": "8.45.0", "eslint-config-next": "13.4.12", "i18next": "^23.4.4", - "ncp": "^2.0.0", "negotiator": "^0.6.3", "next": "^13.5.2", "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "^13.2.2", + "sharp": "^0.32.6", "typescript": "5.1.6" }, "devDependencies": { "autoprefixer": "^10.4.14", "cross-env": "^7.0.3", + "ncp": "^2.0.0", "postcss": "^8.4.27", "tailwindcss": "^3.3.3" } @@ -961,11 +962,35 @@ "dequal": "^2.0.3" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -983,6 +1008,16 @@ "node": ">=8" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -1046,6 +1081,29 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -1173,6 +1231,11 @@ "node": ">= 6" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", @@ -1313,6 +1376,28 @@ } } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -1384,6 +1469,14 @@ "node": ">=6" } }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1429,6 +1522,14 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", @@ -2011,11 +2112,24 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -2148,6 +2262,11 @@ "url": "https://www.patreon.com/infusion" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2248,6 +2367,11 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", @@ -2463,6 +2587,25 @@ "@babel/runtime": "^7.22.5" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2508,6 +2651,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/internal-slot": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", @@ -3019,6 +3167,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3038,6 +3197,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3071,6 +3235,11 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -3080,6 +3249,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "dev": true, "bin": { "ncp": "bin/ncp" } @@ -3161,6 +3331,22 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/node-abi": { + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", @@ -3624,6 +3810,57 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prebuild-install/node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/prebuild-install/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -3642,6 +3879,15 @@ "react-is": "^16.13.1" } }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -3669,6 +3915,33 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -3727,6 +4000,19 @@ "pify": "^2.3.0" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3950,6 +4236,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -3985,6 +4290,28 @@ "node": ">=10" } }, + "node_modules/sharp": { + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4022,6 +4349,49 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -4059,6 +4429,23 @@ "node": ">=10.0.0" } }, + "node_modules/streamx": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", + "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -4311,6 +4698,26 @@ "node": ">=6" } }, + "node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4400,6 +4807,17 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -4558,8 +4976,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/void-elements": { "version": "3.1.0", @@ -5325,11 +5742,21 @@ "dequal": "^2.0.3" } }, + "b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, "big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -5341,6 +5768,16 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -5378,6 +5815,15 @@ "update-browserslist-db": "^1.0.11" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -5455,6 +5901,11 @@ } } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", @@ -5560,6 +6011,19 @@ "ms": "2.1.2" } }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "requires": { + "mimic-response": "^3.1.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -5604,6 +6068,11 @@ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" }, + "detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==" + }, "didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -5643,6 +6112,14 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, "enhanced-resolve": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", @@ -6076,11 +6553,21 @@ "strip-final-newline": "^3.0.0" } }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -6187,6 +6674,11 @@ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", "dev": true }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -6253,6 +6745,11 @@ "resolve-pkg-maps": "^1.0.0" } }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", @@ -6391,6 +6888,11 @@ "@babel/runtime": "^7.22.5" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -6424,6 +6926,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "internal-slot": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", @@ -6769,6 +7276,11 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==" }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6782,6 +7294,11 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6803,6 +7320,11 @@ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -6811,7 +7333,8 @@ "ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==" + "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "dev": true }, "negotiator": { "version": "0.6.3", @@ -6854,6 +7377,19 @@ } } }, + "node-abi": { + "version": "3.51.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz", + "integrity": "sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==", + "requires": { + "semver": "^7.3.5" + } + }, + "node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, "node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", @@ -7146,6 +7682,50 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "requires": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "dependencies": { + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + } + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -7161,6 +7741,15 @@ "react-is": "^16.13.1" } }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -7171,6 +7760,29 @@ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, + "queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==" + } + } + }, "react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -7211,6 +7823,16 @@ "pify": "^2.3.0" } }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7349,6 +7971,11 @@ "isarray": "^2.0.5" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, "safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -7375,6 +8002,21 @@ "lru-cache": "^6.0.0" } }, + "sharp": { + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", + "requires": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7403,6 +8045,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "requires": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -7431,6 +8088,23 @@ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" }, + "streamx": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", + "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "requires": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -7600,6 +8274,26 @@ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" }, + "tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "requires": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -7673,6 +8367,14 @@ } } }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -7771,8 +8473,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "void-elements": { "version": "3.1.0", diff --git a/package.json b/package.json index f10f2fa..e378cba 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,12 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "cross-env NODE_OPTIONS='--inspect' next dev -p 5000", - "build": "npm run copy && next build", - "start": "npm run copy && next start -p 5000", + "dev": "next dev", + "build": "npm run copy-arcgis-maps-assets && npm run copy-calcite-components-assets && next build", + "start": "next start", "lint": "next lint", - "copy": "ncp ./node_modules/@arcgis/core/assets ./public/assets" + "copy-arcgis-maps-assets": "ncp ./node_modules/@arcgis/core/assets ./public/assets", + "copy-calcite-components-assets": "ncp ./node_modules/@esri/calcite-components/dist/calcite/assets ./public/assets/" }, "dependencies": { "@arcgis/core": "^4.27.6", @@ -19,17 +20,18 @@ "eslint": "8.45.0", "eslint-config-next": "13.4.12", "i18next": "^23.4.4", - "ncp": "^2.0.0", "negotiator": "^0.6.3", "next": "^13.5.2", "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "^13.2.2", + "sharp": "^0.32.6", "typescript": "5.1.6" }, "devDependencies": { "autoprefixer": "^10.4.14", "cross-env": "^7.0.3", + "ncp": "^2.0.0", "postcss": "^8.4.27", "tailwindcss": "^3.3.3" } diff --git a/public/assets/map.png b/public/assets/map.png deleted file mode 100644 index bb769dc..0000000 Binary files a/public/assets/map.png and /dev/null differ