From 6e77d62727cc89a453a14e95891073cb8b81145a Mon Sep 17 00:00:00 2001 From: Shaddi Hasan Date: Tue, 7 Jul 2026 09:59:41 -0400 Subject: [PATCH 1/4] Remove the dead signal-server propagation feature The tower/coverage-prediction stack (Signal-Server command builder, raster processing, raster-to-vector conversion) was reachable only from the retired SPA and has been dead code for some time. Removed end to end: the wireless blueprint and its 9 /api routes, the three celery tasks (run_signalserver, preview_fabric_locaiton_coverage, raster2vector), the signalserver_controller package, the tower/towerinfo/rasterdata ops modules and models, and migration c7f3a84e91d2 drops their tables (downgrade recreates them as the initial migration defined them). test_migrations._drop_everything now recreates the schema instead of metadata.drop_all: drop_all only knows the current models, so a table removed from the models (like these) would survive and break the next blank-slate on its foreign keys. --- .../c7f3a84e91d2_drop_signal_server_tables.py | 67 +++++ .../celery_controller/celery_tasks.py | 204 -------------- .../database_controller/rasterdata_ops.py | 46 ---- .../database_controller/tower_ops.py | 63 ----- .../database_controller/towerinfo_ops.py | 25 -- .../signalserver_controller/__init__.py | 0 .../signalserver_controller/raster2vector.py | 63 ----- .../rasterprocessing.py | 79 ------ .../signalserver_controller/read_towerinfo.py | 33 --- .../signalserver_command_builder.py | 19 -- back-end/database/models.py | 53 ---- back-end/routes/__init__.py | 2 - back-end/routes/wireless.py | 251 ------------------ back-end/tests/test_migrations.py | 13 +- back-end/utils/namingschemes.py | 1 - back-end/utils/wireless_form2args.py | 13 - 16 files changed, 74 insertions(+), 858 deletions(-) create mode 100644 back-end/alembic/versions/c7f3a84e91d2_drop_signal_server_tables.py delete mode 100644 back-end/controllers/database_controller/rasterdata_ops.py delete mode 100644 back-end/controllers/database_controller/tower_ops.py delete mode 100644 back-end/controllers/database_controller/towerinfo_ops.py delete mode 100644 back-end/controllers/signalserver_controller/__init__.py delete mode 100644 back-end/controllers/signalserver_controller/raster2vector.py delete mode 100644 back-end/controllers/signalserver_controller/rasterprocessing.py delete mode 100644 back-end/controllers/signalserver_controller/read_towerinfo.py delete mode 100644 back-end/controllers/signalserver_controller/signalserver_command_builder.py delete mode 100644 back-end/routes/wireless.py delete mode 100644 back-end/utils/wireless_form2args.py diff --git a/back-end/alembic/versions/c7f3a84e91d2_drop_signal_server_tables.py b/back-end/alembic/versions/c7f3a84e91d2_drop_signal_server_tables.py new file mode 100644 index 0000000..7e0da1f --- /dev/null +++ b/back-end/alembic/versions/c7f3a84e91d2_drop_signal_server_tables.py @@ -0,0 +1,67 @@ +"""drop the signal-server tables + +Revision ID: c7f3a84e91d2 +Revises: a9e5d21c7b48 +Create Date: 2026-07-07 + +The signal-server propagation feature (towers, their parameters, and the +rendered coverage rasters) was dead code reachable only from the retired SPA; +the code is removed in the same change. Downgrade recreates the tables as the +initial migration defined them (data is not restored). +""" + +import sqlalchemy as sa + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "c7f3a84e91d2" +down_revision = "a9e5d21c7b48" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.drop_table("towerinfo") + op.drop_table("rasterdata") + op.drop_table("tower") + + +def downgrade() -> None: + op.create_table( + "tower", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("tower_name", sa.String(), nullable=False), + sa.Column("organization_id", sa.Integer(), nullable=False), + sa.ForeignKeyConstraint(["organization_id"], ["organization.id"]), + sa.PrimaryKeyConstraint("id"), + ) + op.create_table( + "rasterdata", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("image_data", sa.LargeBinary(), nullable=True), + sa.Column("transparent_image_data", sa.LargeBinary(), nullable=True), + sa.Column("loss_color_mapping", sa.JSON(), nullable=True), + sa.Column("north_bound", sa.String(), nullable=True), + sa.Column("south_bound", sa.String(), nullable=True), + sa.Column("east_bound", sa.String(), nullable=True), + sa.Column("west_bound", sa.String(), nullable=True), + sa.Column("tower_id", sa.Integer(), nullable=True), + sa.ForeignKeyConstraint(["tower_id"], ["tower.id"], ondelete="CASCADE"), + sa.PrimaryKeyConstraint("id"), + ) + op.create_table( + "towerinfo", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("latitude", sa.String(), nullable=True), + sa.Column("longitude", sa.String(), nullable=True), + sa.Column("frequency", sa.String(), nullable=True), + sa.Column("radius", sa.String(), nullable=True), + sa.Column("antennaHeight", sa.String(), nullable=True), + sa.Column("antennaTilt", sa.String(), nullable=True), + sa.Column("horizontalFacing", sa.String(), nullable=True), + sa.Column("floorLossRate", sa.String(), nullable=True), + sa.Column("tower_id", sa.Integer(), nullable=True), + sa.ForeignKeyConstraint(["tower_id"], ["tower.id"], ondelete="CASCADE"), + sa.PrimaryKeyConstraint("id"), + ) diff --git a/back-end/controllers/celery_controller/celery_tasks.py b/back-end/controllers/celery_controller/celery_tasks.py index 64d578f..710b9b4 100755 --- a/back-end/controllers/celery_controller/celery_tasks.py +++ b/back-end/controllers/celery_controller/celery_tasks.py @@ -20,21 +20,11 @@ user_ops, vt_ops, ) -from controllers.database_controller.rasterdata_ops import create_rasterdata -from controllers.database_controller.tower_ops import get_tower_with_towername -from controllers.signalserver_controller.raster2vector import smooth_edges -from controllers.signalserver_controller.rasterprocessing import ( - filter_image_by_loss, - generate_transparent_image, - load_loss_to_color_mapping, - read_rasterkmz, -) from database.models import file, kml_data, service_plan from database.sessions import Session from utils.config import Config from utils.logger_config import logger from utils.namingschemes import DATETIME_FORMAT -from utils.wireless_form2args import wireless_raster_file_format, wireless_vector_file_format @celery.task(bind=True, autoretry_for=(Exception,), retry_backoff=True) @@ -609,200 +599,6 @@ def async_folder_delete(self, folderid): session.close() -@celery.task(bind=True, autoretry_for=(Exception,), retry_backoff=True) -def run_signalserver(self, command, outfile_name, tower_id, data): - session = Session() - try: - result = subprocess.run(command, shell=True, check=True, stderr=subprocess.PIPE) - - if result.stderr: - print("SignalServer stderr:", result.stderr.decode()) - - bbox = read_rasterkmz(outfile_name + ".kmz") - filter_image_by_loss( - outfile_name + ".png", - int(data["floorLossRate"]), - outfile_name + ".lcf", - outfile_name + ".png", - ) - with open(outfile_name + ".png", "rb") as img_file: - img_data = img_file.read() - - transparent_image_name = outfile_name + "-transparent.png" - logger.debug("Generating trans image") - generate_transparent_image(outfile_name + ".png", transparent_image_name) - with open(transparent_image_name, "rb") as transparent_img_file: - transparent_img_data = transparent_img_file.read() - logger.debug("Generated trans image") - loss_color_mapping = load_loss_to_color_mapping(outfile_name + ".lcf") - # Assume we have some way to get raster data after running the command - raster_data_val = create_rasterdata( - tower_id=tower_id, - image_data=img_data, - transparent_image_data=transparent_img_data, - loss_color_mapping=loss_color_mapping, - nbound=bbox["nbound"], - sbound=bbox["sbound"], - ebound=bbox["ebound"], - wbound=bbox["wbound"], - session=session, - ) - - for f_extension in wireless_raster_file_format: - os.remove(outfile_name + f_extension) - os.remove(transparent_image_name) - except Exception as e: - session.rollback() - raise e - finally: - session.commit() - session.close() - - -@celery.task(bind=True, autoretry_for=(Exception,), retry_backoff=True) -def preview_fabric_locaiton_coverage(self, data, userid, outfile_name): - session = Session() - try: - towerVal = get_tower_with_towername( - tower_name=data["towername"], user_id=userid, session=session - ) - if isinstance(towerVal, str): # In case create_tower returned an error - logger.debug(towerVal) - return {"error": towerVal} - if not towerVal: - logger.debug("tower not found under towername") - return {"error": "File not found"} - - rasterData = towerVal.raster_data - - # Specify the path for the .png file - image_file_path = f"{outfile_name}.png" - - # Write the binary image data to a .png file - with open(image_file_path, "wb") as image_file: - image_file.write(rasterData.image_data) - - smooth_edges(image_file_path, image_file_path, 2) - gdal_translate_cmd = f"gdal_translate -a_ullr {rasterData.west_bound} {rasterData.north_bound} {rasterData.east_bound} {rasterData.south_bound} -a_srs EPSG:4326 {image_file_path} {outfile_name}.tif" - logger.debug("Executing:", gdal_translate_cmd) - subprocess.run(gdal_translate_cmd, shell=True) - - # Execute gdal_polygonize.py - gdal_polygonize_cmd = f'gdal_polygonize.py {outfile_name}.tif -f "KML" {outfile_name}.kml' - logger.debug("Executing:", gdal_polygonize_cmd) - subprocess.run(gdal_polygonize_cmd, shell=True) - - userVal = user_ops.get_user_with_id(userid=userid) - folderVal = folder_ops.get_upload_folder(userVal.organization_id, session=session) - if folderVal is None: - return {"error": "Folder not found"} - - logger.debug("Computing covered points") - covered_points = kml_ops.preview_wireless_locations(folderVal.id, outfile_name + ".kml") - for f_extension in wireless_vector_file_format: - os.remove(outfile_name + f_extension) - # Convert the GeoDataFrame to a JSON-friendly format, such as GeoJSON - covered_points_geojson = covered_points.to_json() - geojson_filename = outfile_name + ".geojson" - with open(geojson_filename, "w") as f: - json.dump(covered_points_geojson, f) - # Return a native Python dictionary - return {"Status": "Ok", "geojson_filename": geojson_filename} - except Exception as e: - return {"error": str(e)} - finally: - session.close() - - -@celery.task(bind=True, autoretry_for=(Exception,), retry_backoff=True) -def raster2vector(self, data, userid, outfile_name): - session = Session() - try: - towerVal = get_tower_with_towername( - tower_name=data["towername"], user_id=userid, session=session - ) - if isinstance(towerVal, str): # In case create_tower returned an error - logger.debug(towerVal) - return {"error": towerVal} - if not towerVal: - logger.debug("tower not found under towername") - return {"error": "File not found"} - - rasterData = towerVal.raster_data - - # Specify the path for the .png file - image_file_path = f"{outfile_name}.png" - - # Write the binary image data to a .png file - with open(image_file_path, "wb") as image_file: - image_file.write(rasterData.image_data) - - smooth_edges(image_file_path, image_file_path, 2) - gdal_translate_cmd = f"gdal_translate -a_ullr {rasterData.west_bound} {rasterData.north_bound} {rasterData.east_bound} {rasterData.south_bound} -a_srs EPSG:4326 {image_file_path} {outfile_name}.tif" - logger.debug("Executing:", gdal_translate_cmd) - subprocess.run(gdal_translate_cmd, shell=True) - - # Execute gdal_polygonize.py - gdal_polygonize_cmd = f'gdal_polygonize.py {outfile_name}.tif -f "KML" {outfile_name}.kml' - logger.debug("Executing:", gdal_polygonize_cmd) - subprocess.run(gdal_polygonize_cmd, shell=True) - - userVal = user_ops.get_user_with_id(userid, session=session) - folderVal = folder_ops.get_upload_folder(userVal.organization_id, session=session) - if folderVal is None: - num_folders = folder_ops.get_number_of_folders_for_user(userVal.id, session=session) - folder_name = f"{userVal.username}-{num_folders + 1}" - deadline = "September 2024" - folderVal = folder_ops.create_folder( - folder_name, userVal.organization_id, deadline, "upload", session=session - ) - session.commit() - - vector_file_name = outfile_name + ".kml" - with open(vector_file_name, "rb") as vector_file: - kml_binarydata = vector_file.read() - fileVal = file_ops.create_file( - vector_file_name, kml_binarydata, folderVal.id, "wireless", session=session - ) - session.commit() - downloadSpeed = data["downloadSpeed"] - uploadSpeed = data["uploadSpeed"] - techType = data["techType"] - latency = data["latency"] - category = data["categoryCode"] - - kml_ops.compute_wireless_locations( - fileVal.folder_id, - fileVal.id, - downloadSpeed, - uploadSpeed, - techType, - latency, - category, - session, - ) - geojson_array = [] - all_kmls = file_ops.get_files_with_postfix(fileVal.folder_id, ".kml", session) - for kml_f in all_kmls: - geojson_array.extend(vt_ops.read_kml(kml_f.id, session)) - all_geojsons = file_ops.get_files_with_postfix(fileVal.folder_id, ".geojson", session) - for geojson_f in all_geojsons: - geojson_array.extend(vt_ops.read_geojson(geojson_f.id, session)) - - logger.info("Creating Vector Tiles") - mbtiles_ops.delete_mbtiles(fileVal.folder_id, session) - session.commit() - vt_ops.create_tiles(geojson_array, fileVal.folder_id, session) - - for f_extension in wireless_vector_file_format: - os.remove(outfile_name + f_extension) - return {"Status": "Ok"} - except Exception as e: - return {"error": str(e)} - finally: - session.close() - - @celery.task(bind=True, autoretry_for=(Exception,), retry_backoff=True) def async_org_delete(self, orgid): try: diff --git a/back-end/controllers/database_controller/rasterdata_ops.py b/back-end/controllers/database_controller/rasterdata_ops.py deleted file mode 100644 index 4a1f281..0000000 --- a/back-end/controllers/database_controller/rasterdata_ops.py +++ /dev/null @@ -1,46 +0,0 @@ -from sqlalchemy.exc import SQLAlchemyError - -from database.models import rasterdata -from database.sessions import Session - - -def create_rasterdata( - tower_id, - image_data, - transparent_image_data, - loss_color_mapping, - nbound, - sbound, - ebound, - wbound, - session=None, -): - owns_session = False - if session is None: - session = Session() - owns_session = True - try: - # Create RasterData instance and add to the Tower instance - new_raster_data = rasterdata( - tower_id=tower_id, - image_data=image_data, - transparent_image_data=transparent_image_data, - loss_color_mapping=loss_color_mapping, - north_bound=nbound, - south_bound=sbound, - east_bound=ebound, - west_bound=wbound, - ) - - session.add(new_raster_data) - - if owns_session: - session.commit() - return new_raster_data - except SQLAlchemyError as e: - if owns_session: - session.rollback() - return f"An error occurred while adding raster data to the tower: {e}" - finally: - if owns_session: - session.close() diff --git a/back-end/controllers/database_controller/tower_ops.py b/back-end/controllers/database_controller/tower_ops.py deleted file mode 100644 index 7344279..0000000 --- a/back-end/controllers/database_controller/tower_ops.py +++ /dev/null @@ -1,63 +0,0 @@ -from sqlalchemy.exc import SQLAlchemyError -from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound - -from database.models import tower -from database.sessions import Session - - -def create_tower(towername, userid, session=None): - owns_session = False - if session is None: - session = Session() - owns_session = True - - try: - towerVal = get_tower_with_towername(tower_name=towername, user_id=userid, session=session) - if towerVal and not isinstance(towerVal, str): - if towerVal.tower_info: - session.delete(towerVal.tower_info) - if towerVal.raster_data: - session.delete(towerVal.raster_data) - # No need to return here if you just want to update the tower - else: - towerVal = tower( - tower_name=towername, user_id=userid - ) # Make sure the class name is correct - session.add(towerVal) - - if owns_session: - session.commit() - session.refresh(towerVal) # Refresh the object to ensure the ID is fetched - # tower_id = towerVal.id # Now you have the ID - session.close() - return towerVal # Returning the ID after closing the session - - except SQLAlchemyError as e: - if owns_session: - session.rollback() - session.close() - return "An error occurred while creating the tower: " + str(e) - - -def get_tower_with_towername(tower_name, user_id, session=None): - owns_session = False - if session is None: - session = Session() - owns_session = True - - try: - towerVal = ( - session.query(tower) - .filter(tower.tower_name == tower_name, tower.user_id == user_id) - .one() - ) - return towerVal - except NoResultFound: - return None - except MultipleResultsFound: - return "Multiple results found for the given tower name and user" - except Exception as e: - return str(e) - finally: - if owns_session: - session.close() diff --git a/back-end/controllers/database_controller/towerinfo_ops.py b/back-end/controllers/database_controller/towerinfo_ops.py deleted file mode 100644 index 6d9dcd6..0000000 --- a/back-end/controllers/database_controller/towerinfo_ops.py +++ /dev/null @@ -1,25 +0,0 @@ -from sqlalchemy.exc import SQLAlchemyError - -from database.models import towerinfo -from database.sessions import Session - - -def create_towerinfo(tower_info_data, session=None): - owns_session = False - if session is None: - session = Session() - owns_session = True - - try: - new_towerinfo = towerinfo(**tower_info_data) - session.add(new_towerinfo) - if owns_session: - session.commit() - return new_towerinfo - except SQLAlchemyError as e: - if owns_session: - session.rollback() - return "An error occurred while creating the towerinfo: " + str(e) - finally: - if owns_session: - session.close() diff --git a/back-end/controllers/signalserver_controller/__init__.py b/back-end/controllers/signalserver_controller/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/back-end/controllers/signalserver_controller/raster2vector.py b/back-end/controllers/signalserver_controller/raster2vector.py deleted file mode 100644 index eef8d1e..0000000 --- a/back-end/controllers/signalserver_controller/raster2vector.py +++ /dev/null @@ -1,63 +0,0 @@ -import math - -import numpy as np -from PIL import Image - - -def smooth_edges(input_image_path, output_image_path, smoothing_iterations=1): - with Image.open(input_image_path) as img: - img = img.convert("RGBA") - # Convert to numpy array for morphological operations - img_array = np.array(img) - alpha_channel = img_array[:, :, 3] - - # Perform morphological operations - for _ in range(smoothing_iterations): - # Erode - eroded = np.copy(alpha_channel) - eroded[1:-1, 1:-1] = np.minimum.reduce( - [ - alpha_channel[:-2, 1:-1], - alpha_channel[2:, 1:-1], - alpha_channel[1:-1, :-2], - alpha_channel[1:-1, 2:], - alpha_channel[:-2, :-2], - alpha_channel[:-2, 2:], - alpha_channel[2:, :-2], - alpha_channel[2:, 2:], - alpha_channel[1:-1, 1:-1], - ] - ) - - # Dilate - dilated = np.copy(eroded) - dilated[1:-1, 1:-1] = np.maximum.reduce( - [ - eroded[:-2, 1:-1], - eroded[2:, 1:-1], - eroded[1:-1, :-2], - eroded[1:-1, 2:], - eroded[:-2, :-2], - eroded[:-2, 2:], - eroded[2:, :-2], - eroded[2:, 2:], - eroded[1:-1, 1:-1], - ] - ) - - alpha_channel = dilated - - # Apply the smoothed alpha channel back to the image - img_array[:, :, 3] = alpha_channel - smoothed_img = Image.fromarray(img_array) - smoothed_img.save(output_image_path, "PNG") - - -def compute_bounds(latitude, longitude, range_km): - # Calculate Upper Left and Lower Right coords - ul_lat = latitude + (range_km / 111) - ul_lon = longitude - (range_km / (111 * math.cos(math.radians(latitude)))) - lr_lat = latitude - (range_km / 111) - lr_lon = longitude + (range_km / (111 * math.cos(math.radians(latitude)))) - - return ul_lon, ul_lat, lr_lon, lr_lat diff --git a/back-end/controllers/signalserver_controller/rasterprocessing.py b/back-end/controllers/signalserver_controller/rasterprocessing.py deleted file mode 100644 index 7b43983..0000000 --- a/back-end/controllers/signalserver_controller/rasterprocessing.py +++ /dev/null @@ -1,79 +0,0 @@ -import xml.etree.ElementTree as ET -import zipfile - -from PIL import Image - - -def load_loss_to_color_mapping(lcf_file_path, floor_loss_rate=None): - mapping = {} - filtered_lines = [] - - # Read and filter the data - with open(lcf_file_path) as file: - for line in file: - parts = line.strip().split(":") - if len(parts) == 2: - loss, color = parts - loss = int(loss) - - if floor_loss_rate is None or loss <= floor_loss_rate: - r, g, b = map(int, color.split(",")) - mapping[loss] = (r, g, b) - filtered_lines.append(line) - - # Truncate the file by writing the filtered data - if floor_loss_rate is not None: - with open(lcf_file_path, "w") as file: - file.writelines(filtered_lines) - - return mapping - - -def filter_image_by_loss(input_image_path, floor_loss_rate, lcf_file_path, output_image_path): - loss_to_color_mapping = load_loss_to_color_mapping(lcf_file_path, floor_loss_rate) - with Image.open(input_image_path) as img: - img = img.convert("RGBA") - pixels = img.load() - - for i in range(img.width): - for j in range(img.height): - r, g, b, a = pixels[i, j] - # Determine the loss rate based on the color in the loss to color mapping - loss_rate = next( - (loss for loss, color in loss_to_color_mapping.items() if color == (r, g, b)), - None, - ) - # If the loss rate is higher than the floor loss rate or not defined, set to transparent - if loss_rate is None or loss_rate > floor_loss_rate: - pixels[i, j] = (255, 255, 255, 0) - - img.save(output_image_path, "PNG") - - -def generate_transparent_image(input_image_path, output_image_path): - with Image.open(input_image_path) as img: - img = img.convert("RGBA") - pixels = img.load() - - for i in range(img.width): - for j in range(img.height): - if pixels[i, j] != (255, 255, 255, 0): - pixels[i, j] = (0, 194, 255, 76) - - img.save(output_image_path, "PNG") - - -def read_rasterkmz(kmz_filename): - try: - with zipfile.ZipFile(kmz_filename, "r") as kmz: - with kmz.open("doc.kml", "r") as kml_file: - kml = ET.parse(kml_file) - root = kml.getroot() - namespace = {"kml": "http://www.opengis.net/kml/2.2"} - north = root.find(".//kml:north", namespace).text - east = root.find(".//kml:east", namespace).text - south = root.find(".//kml:south", namespace).text - west = root.find(".//kml:west", namespace).text - return {"nbound": north, "sbound": south, "ebound": east, "wbound": west} - except Exception as e: - return {"error": str(e)} diff --git a/back-end/controllers/signalserver_controller/read_towerinfo.py b/back-end/controllers/signalserver_controller/read_towerinfo.py deleted file mode 100644 index 82004df..0000000 --- a/back-end/controllers/signalserver_controller/read_towerinfo.py +++ /dev/null @@ -1,33 +0,0 @@ -import csv -from io import StringIO - - -def read_tower_csv(csv_file): - content = StringIO(csv_file.stream.read().decode("UTF8"), newline=None) - csv_reader = csv.DictReader(content) - - # Initialize an empty list to store all tower data - towers_data = [] - - # Iterate over each row in the CSV and append the tower data to the list - for row in csv_reader: - try: - tower_info = { - "towerName": row["Tower Name"], - "latitude": float(row["Latitude(degrees)"]), - "longitude": float(row["Longitude(degrees)"]), - "frequency": float(row["Frequency(MHz)"]), - "coverageRadius": float(row["Coverage Radius(Km)"]), - "antennaHeight": float(row["Antenna Height(meters)"]), - "antennaTilt": float(row["Antenna Tilt(degrees)"]), - "horizontalFacing": float(row["Horizontal Facing(degrees)"]), - "floorLossRate": int(row["Floor Loss Rate(dB)"]), - } - towers_data.append(tower_info) - except ValueError: - # Log the exception e - # Return or handle the error for the particular row - continue # or you can use 'break' to stop the loop if the error is critical - - # After the loop, return the list of towers data - return towers_data diff --git a/back-end/controllers/signalserver_controller/signalserver_command_builder.py b/back-end/controllers/signalserver_controller/signalserver_command_builder.py deleted file mode 100644 index 3c4c277..0000000 --- a/back-end/controllers/signalserver_controller/signalserver_command_builder.py +++ /dev/null @@ -1,19 +0,0 @@ -from utils.wireless_form2args import wireless_formfield2args - - -def runsig_command_builder(form_data, outfile_name): - # Base command for running signal server - command_base = "runsig.sh -sdf /app/DEM/one_arc_second" - - # Loop over the form data, adding the command line arguments - for key, value in form_data.items(): - if key in wireless_formfield2args: - command_base += f" {wireless_formfield2args[key]} {value}" - - # Static arguments can be appended at the end or configured to be included conditionally - static_args = f"-pm 1 -res 3600 -o {outfile_name} | genkmz.sh" - - # Combine the base command, the dynamic arguments from form data, and static arguments - full_command = f"{command_base} {static_args}" - - return full_command diff --git a/back-end/database/models.py b/back-end/database/models.py index adee372..f0ff1b8 100755 --- a/back-end/database/models.py +++ b/back-end/database/models.py @@ -27,7 +27,6 @@ class organization(Base): brand_name = Column(String(50)) users = relationship("user", back_populates="organization") folders = relationship("folder", back_populates="organization", cascade="all, delete") - towers = relationship("tower", back_populates="organization", cascade="all, delete") celerytasksinfo = relationship( "celerytaskinfo", back_populates="organization", cascade="all, delete" ) @@ -72,58 +71,6 @@ class celerytaskinfo(Base): organization = relationship("organization", back_populates="celerytasksinfo") -class tower(Base): - __tablename__ = "tower" - - id = Column(Integer, primary_key=True) - tower_name = Column(String, nullable=False) - organization_id = Column(Integer, ForeignKey("organization.id"), nullable=False) - - # Relationship to TowerInfo and RasterData models (assuming they exist) - organization = relationship("organization", back_populates="towers") - tower_info = relationship( - "towerinfo", back_populates="tower", uselist=False, cascade="all, delete" - ) - raster_data = relationship( - "rasterdata", back_populates="tower", uselist=False, cascade="all, delete" - ) - - -class towerinfo(Base): - __tablename__ = "towerinfo" - - id = Column(Integer, primary_key=True) - latitude = Column(String) - longitude = Column(String) - frequency = Column(String) - radius = Column(String) - antennaHeight = Column(String) - antennaTilt = Column(String) - horizontalFacing = Column(String) - floorLossRate = Column(String) - - # One-to-one relationship with Tower - tower_id = Column(Integer, ForeignKey("tower.id", ondelete="CASCADE")) - tower = relationship("tower", back_populates="tower_info", uselist=False) - - -class rasterdata(Base): - __tablename__ = "rasterdata" - - id = Column(Integer, primary_key=True) - image_data = Column(LargeBinary) # for storing binary image data - transparent_image_data = Column(LargeBinary) - loss_color_mapping = Column(JSON) - north_bound = Column(String) - south_bound = Column(String) - east_bound = Column(String) - west_bound = Column(String) - - # One-to-one relationship with Tower - tower_id = Column(Integer, ForeignKey("tower.id", ondelete="CASCADE")) - tower = relationship("tower", back_populates="raster_data", uselist=False) - - class folder(Base): # filing, will change the name later for less confusion when reading __tablename__ = "folder" diff --git a/back-end/routes/__init__.py b/back-end/routes/__init__.py index 598c915..aadbdfa 100644 --- a/back-end/routes/__init__.py +++ b/back-end/routes/__init__.py @@ -24,7 +24,6 @@ from routes.tasks import bp as tasks_bp from routes.tiles import bp as tiles_bp from routes.users import bp as users_bp -from routes.wireless import bp as wireless_bp from utils.flask_app import app _blueprints = ( @@ -48,7 +47,6 @@ tasks_bp, tiles_bp, users_bp, - wireless_bp, ) for _bp in _blueprints: diff --git a/back-end/routes/wireless.py b/back-end/routes/wireless.py deleted file mode 100644 index eebcb07..0000000 --- a/back-end/routes/wireless.py +++ /dev/null @@ -1,251 +0,0 @@ -"""Wireless signal-propagation: coverage compute, rasters, towers, prediction.""" - -import io -import json -import os - -from flask import Blueprint, jsonify, request, send_file -from flask_jwt_extended import get_jwt_identity, jwt_required -from flask_jwt_extended.exceptions import NoAuthorizationError - -from controllers.celery_controller.celery_tasks import ( - preview_fabric_locaiton_coverage, - raster2vector, - run_signalserver, -) -from controllers.database_controller.tower_ops import create_tower, get_tower_with_towername -from controllers.database_controller.towerinfo_ops import create_towerinfo -from controllers.signalserver_controller.read_towerinfo import read_tower_csv -from controllers.signalserver_controller.signalserver_command_builder import runsig_command_builder -from database.sessions import get_session -from utils.logger_config import logger -from utils.namingschemes import ( - SIGNALSERVER_RASTER_DATA_NAME_TEMPLATE, -) - -bp = Blueprint("wireless", __name__) - - -@bp.route("/api/compute-wireless-coverage", methods=["POST"]) -@jwt_required() -def compute_wireless_coverage(): - try: - identity = get_jwt_identity() - data = request.json - towerVal = create_tower(towername=data["towername"], userid=identity["id"]) - if isinstance(towerVal, str): # In case create_tower returned an error message - logger.debug(towerVal) - return jsonify({"status": "error", "message": towerVal}), 400 - outfile_name = SIGNALSERVER_RASTER_DATA_NAME_TEMPLATE.format( - username=identity["username"], towername=data["towername"] - ) - del data["towername"] - command = runsig_command_builder(data, outfile_name) - data["tower_id"] = towerVal.id - - tower_info_val = create_towerinfo(tower_info_data=data) - if isinstance(tower_info_val, str): # In case create_towerinfo returned an error message - logger.debug(tower_info_val) - return jsonify({"status": "error", "message": tower_info_val}), 400 - - task = run_signalserver.apply_async( - args=[command, outfile_name, towerVal.id, data] - ) # store the AsyncResult instance - return jsonify( - {"status": "success", "task_id": task.id} - ), 200 # return task id to the client - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-raster-image/", methods=["GET"]) -@jwt_required() -def get_raster_image(towername): - session = get_session() - try: - identity = get_jwt_identity() - towerVal = get_tower_with_towername( - tower_name=towername, user_id=identity["id"], session=session - ) - if isinstance(towerVal, str): # In case create_tower returned an error - logger.debug(towerVal) - return jsonify({"status": "error", "message": towerVal}), 400 - - if not towerVal: - logger.debug("tower not found under towername") - return jsonify({"status": "error", "message": "File not found"}), 404 - - rasterData = towerVal.raster_data - if rasterData: - image_io = io.BytesIO(rasterData.image_data) - image_io.seek(0) - response = send_file(image_io, mimetype="image/png") - return response - else: - return jsonify({"status": "error", "message": "Raster data not found"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-transparent-raster-image/", methods=["GET"]) -@jwt_required() -def get_transparent_raster_image(towername): - session = get_session() - try: - identity = get_jwt_identity() - towerVal = get_tower_with_towername( - tower_name=towername, user_id=identity["id"], session=session - ) - if isinstance(towerVal, str): # In case create_tower returned an error - logger.debug(towerVal) - return jsonify({"status": "error", "message": towerVal}), 400 - - if not towerVal: - logger.debug("tower not found under towername") - return jsonify({"status": "error", "message": "File not found"}), 404 - - rasterData = towerVal.raster_data - if rasterData: - image_io = io.BytesIO(rasterData.transparent_image_data) - image_io.seek(0) - response = send_file(image_io, mimetype="image/png") - return response - else: - return jsonify({"status": "error", "message": "Raster data not found"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-raster-bounds/", methods=["GET"]) -@jwt_required() -def get_raster_bounds(towername): - session = get_session() - try: - identity = get_jwt_identity() - towerVal = get_tower_with_towername( - tower_name=towername, user_id=identity["id"], session=session - ) - if isinstance(towerVal, str): # In case create_tower returned an error message - logger.debug(towerVal) - return jsonify({"status": "error", "message": towerVal}), 400 - - if not towerVal: - return jsonify({"status": "error", "message": "File not found"}), 404 - - rasterData = towerVal.raster_data - if rasterData: - bounds = { - "north": rasterData.north_bound, - "south": rasterData.south_bound, - "east": rasterData.east_bound, - "west": rasterData.west_bound, - } - return jsonify({"status": "success", "bounds": bounds}), 200 - else: - return jsonify({"status": "error", "message": "Raster data not found"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-loss-color-mapping/", methods=["GET"]) -@jwt_required() -def get_loss_color_mapping(towername): - session = get_session() - try: - identity = get_jwt_identity() - towerVal = get_tower_with_towername( - tower_name=towername, user_id=identity["id"], session=session - ) - if not towerVal: - logger.debug("Tower not found under towername") - return jsonify({"status": "error", "messsage": "Mapping not found"}), 404 - - rasterData = towerVal.raster_data - if rasterData and rasterData.loss_color_mapping: - # Now we can just return the JSON directly - return jsonify(rasterData.loss_color_mapping), 200 - else: - return jsonify({"status": "error", "message": "Loss to color mapping not found"}), 404 - - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/upload-tower-csv", methods=["POST"]) -@jwt_required() -def upload_csv(): - try: - identity = get_jwt_identity() - if "file" not in request.files: - return jsonify({"status": "error", "message": "No file part"}), 400 - - file = request.files["file"] - if file.filename == "": - return jsonify({"status": "error", "message": "No selected file"}), 400 - - if file and file.filename.endswith(".csv"): - # Read the file content - tower_data = read_tower_csv(file) - if not isinstance(tower_data, str): - return jsonify(tower_data), 200 - else: - return jsonify({"status": "error", "message": tower_data}), 400 - else: - return jsonify({"status": "error", "message": "Invalid CSV file"}), 400 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/compute-wireless-prediction-fabric-coverage", methods=["POST"]) -@jwt_required() -def compute_wireless_prediction_fabric_coverage(): - try: - identity = get_jwt_identity() - data = request.json - outfile_name = SIGNALSERVER_RASTER_DATA_NAME_TEMPLATE.format( - username=identity["username"], towername=data["towername"] - ) - task = raster2vector.apply_async( - args=[data, identity["id"], outfile_name] - ) # store the AsyncResult instance - kml_filename = outfile_name + ".kml" - return jsonify( - {"status": "success", "task_id": task.id, "kml_filename": kml_filename} - ), 200 # return task id to the client - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/preview-wireless-prediction-fabric-coverage", methods=["POST"]) -@jwt_required() -def preview_wireless_prediction_fabric_coverage(): - try: - identity = get_jwt_identity() - data = request.json - outfile_name = SIGNALSERVER_RASTER_DATA_NAME_TEMPLATE.format( - username=identity["username"], towername=data["towername"] - ) - task = preview_fabric_locaiton_coverage.apply_async( - args=[data, identity["id"], outfile_name] - ) # store the AsyncResult instance - kml_filename = outfile_name + ".kml" - return jsonify( - {"status": "success", "task_id": task.id, "kml_filename": kml_filename} - ), 200 # return task id to the client - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-preview-geojson/", methods=["GET"]) -@jwt_required() -def get_preview_geojson(filename): - try: - identity = get_jwt_identity() - with open(filename) as file: - geojson_data = json.load(file) # Read and parse the JSON file - os.remove(filename) - return jsonify(geojson_data) # Return the JSON data - except FileNotFoundError: - return jsonify({"status": "error", "message": "File not found"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 diff --git a/back-end/tests/test_migrations.py b/back-end/tests/test_migrations.py index b802f5c..97655c0 100644 --- a/back-end/tests/test_migrations.py +++ b/back-end/tests/test_migrations.py @@ -38,13 +38,14 @@ def _alembic_config(): def _drop_everything(engine): - """Return the database to a blank slate (no ORM tables, no alembic_version).""" - import database.models # noqa: F401 registers every table on Base.metadata - from database.base import Base - - Base.metadata.drop_all(engine) + """Return the database to a blank slate (no tables at all, no + alembic_version). Recreate the schema rather than metadata.drop_all: + drop_all only knows the CURRENT models, so a table that a migration (or a + stale test run) created and a later change removed from the models would + survive and break the next drop on its foreign keys.""" with engine.begin() as conn: - conn.execute(text("DROP TABLE IF EXISTS alembic_version")) + conn.execute(text("DROP SCHEMA public CASCADE")) + conn.execute(text("CREATE SCHEMA public")) @pytest.mark.usefixtures("_require_db") diff --git a/back-end/utils/namingschemes.py b/back-end/utils/namingschemes.py index b817cf1..a6a6178 100644 --- a/back-end/utils/namingschemes.py +++ b/back-end/utils/namingschemes.py @@ -2,4 +2,3 @@ DATE_FORMAT = "%Y-%m-%d" EXPORT_CSV_NAME_TEMPLATE = "{brand_name}-BDC_Report-{deadline}.csv" -SIGNALSERVER_RASTER_DATA_NAME_TEMPLATE = "{email}-{towername}" diff --git a/back-end/utils/wireless_form2args.py b/back-end/utils/wireless_form2args.py deleted file mode 100644 index 209b505..0000000 --- a/back-end/utils/wireless_form2args.py +++ /dev/null @@ -1,13 +0,0 @@ -wireless_formfield2args = { - "latitude": "-lat", - "longitude": "-lon", - "frequency": "-f", - "radius": "-R", - "antennaHeight": "-txh", - "antennaTilt": "-dt", - "horizontalFacing": "-rot", - # ... additional mappings -} - -wireless_raster_file_format = [".kmz", ".lcf", ".png", ".ppm"] -wireless_vector_file_format = [".kml", ".png", ".tif"] From 1f3154ddbb459fcf240f18744a0c26625e37ef61 Mon Sep 17 00:00:00 2001 From: Shaddi Hasan Date: Tue, 7 Jul 2026 10:23:34 -0400 Subject: [PATCH 2/4] Remove the legacy SPA and its API surface The Next.js front-end is fully replaced by the server-rendered app (production has served only the backend since the deploy tooling landed). Removed: - front-end/ (app, components, jest suite) and its CI job, compose service, env vars, and the local nginx SPA proxying (nginx.conf.local now routes everything to the backend, same shape as prod); the orphaned Dockerfile.nginx + start-nginx.sh expect wrapper - every /api route that only the SPA called: the whole auth/users/ organizations/filings/challenge/tasks blueprints, and the SPA-only routes in files/fabric/edit/export. The server-rendered app keeps what it actually uses: tiles, jobs/events, regenerate_map, delfiles, address-search, downloadexport, get-edit-geojson-centroid - the challenge_locations table (migration e4b8c62f17a9; the BDC challenge export was SPA-only) and the join-organization email flow (its tokens were consumable only by the removed /api/verify_token) Behavioral test coverage moved to the server-rendered surface instead of being dropped: registration/login/logout auditing, disabled-account gates, login rate limiting, email-token purpose-binding and single-use, CSRF double-submit, cookie flags, and legacy-password migration now run against /auth/* and the kept /api routes. Test files dedicated to removed endpoints are deleted; conftest's login_page_session registers through /auth/register. --- .env.example | 14 - .github/workflows/ci.yml | 19 - .gitignore | 3 + Dockerfile.nginx | 10 - README.md | 2 +- ...c62f17a9_drop_challenge_locations_table.py | 49 + .../celery_controller/celery_tasks.py | 3 - .../database_controller/challenge_ops.py | 204 - back-end/database/models.py | 24 - back-end/routes/__init__.py | 12 - back-end/routes/_email.py | 14 +- back-end/routes/auth.py | 235 - back-end/routes/challenge.py | 34 - back-end/routes/edit.py | 67 +- back-end/routes/export.py | 125 +- back-end/routes/fabric.py | 37 - back-end/routes/files.py | 238 +- back-end/routes/filings.py | 194 - back-end/routes/organizations.py | 198 - back-end/routes/tasks.py | 118 - back-end/routes/users.py | 87 - back-end/tests/conftest_helpers.py | 4 +- back-end/tests/test_admin_api.py | 29 +- back-end/tests/test_admin_ui.py | 2 +- back-end/tests/test_api_fabric.py | 141 - back-end/tests/test_api_smoke.py | 228 - back-end/tests/test_audit.py | 58 +- back-end/tests/test_authz.py | 80 +- back-end/tests/test_email_tokens.py | 117 +- back-end/tests/test_export_api.py | 146 - back-end/tests/test_files_api.py | 189 +- back-end/tests/test_jobs.py | 30 +- back-end/tests/test_map_api.py | 122 +- back-end/tests/test_org_endpoints.py | 180 - back-end/tests/test_password_hashes.py | 17 +- back-end/tests/test_rate_limit.py | 6 +- back-end/tests/test_security_hardening.py | 155 +- back-end/tests/test_submissions_page.py | 25 + back-end/utils/namingschemes.py | 1 - docker-compose.yml | 21 +- front-end/Dockerfile | 15 - front-end/__tests__/csrf-fetch.test.js | 51 - front-end/__tests__/fileEditTable.test.js | 44 - .../__tests__/impersonationBanner.test.js | 44 - front-end/__tests__/login.test.js | 65 - front-end/__tests__/mapIsland.test.js | 362 - .../settings-basemap-fallback.test.js | 45 - front-end/components/Editmap.js | 814 -- front-end/components/FileEditTable.js | 196 - front-end/components/ImpersonationBanner.js | 75 - front-end/components/LoadingEffect.js | 65 - front-end/components/Map.js | 725 -- front-end/components/Minimap.js | 305 - front-end/components/MyEdit.js | 257 - front-end/components/MyFile.js | 693 -- front-end/components/Navbar.js | 600 -- front-end/components/Questionnaire.js | 234 - front-end/components/Searchbar.js | 233 - front-end/components/SmallLoadingEffect.js | 32 - front-end/components/SubmitButton.js | 18 - front-end/components/TaskInfo.js | 243 - front-end/components/Upload.js | 495 - front-end/components/UploadChallenge.js | 25 - front-end/components/WirelessCoveragemap.js | 405 - .../contexts/EditLayerVisibilityContext.js | 9 - .../contexts/EditLayerVisibilityProvider.js | 17 - front-end/contexts/EditMapContext.js | 9 - front-end/contexts/EditMapProvider.js | 17 - front-end/contexts/FetchTaskInfoContext.js | 9 - front-end/contexts/FetchTaskInfoProvider.js | 17 - front-end/contexts/FolderContext.js | 17 - front-end/contexts/LayerVisibilityContext.js | 9 - front-end/contexts/LayerVisibilityProvider.js | 17 - front-end/contexts/ReloadMapContext.js | 9 - front-end/contexts/ReloadMapProvider.js | 17 - front-end/contexts/SelectedLocationContext.js | 8 - .../contexts/SelectedLocationProvider.js | 17 - .../contexts/SelectedPolygonAreaContext.js | 9 - .../contexts/SelectedPolygonAreaProvider.js | 18 - front-end/contexts/SelectedPolygonContext.js | 9 - front-end/contexts/SelectedPolygonProvider.js | 18 - front-end/jest.config.js | 15 - front-end/jest.setup.js | 3 - front-end/package-lock.json | 9363 ----------------- front-end/package.json | 42 - front-end/pages/_app.js | 29 - front-end/pages/api/hello.js | 7 - front-end/pages/challenge.js | 99 - front-end/pages/editnetworkfileinfo.js | 30 - front-end/pages/index.js | 143 - front-end/pages/login.js | 167 - front-end/pages/previousexport.js | 315 - front-end/pages/profile.js | 566 - front-end/pages/register.js | 141 - front-end/pages/resetPassword.js | 203 - front-end/pages/submitChallenge.js | 27 - front-end/pages/wirelessextension.js | 787 -- front-end/public/map_marker.svg | 11 - front-end/styles/Home.module.css | 0 front-end/styles/Login.module.css | 46 - front-end/styles/Map.module.css | 51 - front-end/styles/Tool.module.css | 53 - front-end/styles/globals.css | 16 - front-end/utils/FactSheets.js | 54 - front-end/utils/csrf.js | 31 - front-end/utils/settings.js | 21 - nginx.conf.local | 57 +- start-nginx.sh | 18 - 108 files changed, 260 insertions(+), 21540 deletions(-) delete mode 100644 Dockerfile.nginx create mode 100644 back-end/alembic/versions/e4b8c62f17a9_drop_challenge_locations_table.py delete mode 100644 back-end/controllers/database_controller/challenge_ops.py delete mode 100644 back-end/routes/auth.py delete mode 100644 back-end/routes/challenge.py delete mode 100644 back-end/routes/filings.py delete mode 100644 back-end/routes/organizations.py delete mode 100644 back-end/routes/tasks.py delete mode 100644 back-end/routes/users.py delete mode 100644 back-end/tests/test_api_fabric.py delete mode 100644 back-end/tests/test_api_smoke.py delete mode 100644 back-end/tests/test_export_api.py delete mode 100644 back-end/tests/test_org_endpoints.py delete mode 100755 front-end/Dockerfile delete mode 100644 front-end/__tests__/csrf-fetch.test.js delete mode 100644 front-end/__tests__/fileEditTable.test.js delete mode 100644 front-end/__tests__/impersonationBanner.test.js delete mode 100644 front-end/__tests__/login.test.js delete mode 100644 front-end/__tests__/mapIsland.test.js delete mode 100644 front-end/__tests__/settings-basemap-fallback.test.js delete mode 100755 front-end/components/Editmap.js delete mode 100644 front-end/components/FileEditTable.js delete mode 100644 front-end/components/ImpersonationBanner.js delete mode 100755 front-end/components/LoadingEffect.js delete mode 100755 front-end/components/Map.js delete mode 100755 front-end/components/Minimap.js delete mode 100644 front-end/components/MyEdit.js delete mode 100755 front-end/components/MyFile.js delete mode 100755 front-end/components/Navbar.js delete mode 100644 front-end/components/Questionnaire.js delete mode 100755 front-end/components/Searchbar.js delete mode 100755 front-end/components/SmallLoadingEffect.js delete mode 100755 front-end/components/SubmitButton.js delete mode 100644 front-end/components/TaskInfo.js delete mode 100644 front-end/components/Upload.js delete mode 100644 front-end/components/UploadChallenge.js delete mode 100644 front-end/components/WirelessCoveragemap.js delete mode 100644 front-end/contexts/EditLayerVisibilityContext.js delete mode 100644 front-end/contexts/EditLayerVisibilityProvider.js delete mode 100755 front-end/contexts/EditMapContext.js delete mode 100755 front-end/contexts/EditMapProvider.js delete mode 100644 front-end/contexts/FetchTaskInfoContext.js delete mode 100644 front-end/contexts/FetchTaskInfoProvider.js delete mode 100644 front-end/contexts/FolderContext.js delete mode 100755 front-end/contexts/LayerVisibilityContext.js delete mode 100755 front-end/contexts/LayerVisibilityProvider.js delete mode 100644 front-end/contexts/ReloadMapContext.js delete mode 100644 front-end/contexts/ReloadMapProvider.js delete mode 100755 front-end/contexts/SelectedLocationContext.js delete mode 100755 front-end/contexts/SelectedLocationProvider.js delete mode 100644 front-end/contexts/SelectedPolygonAreaContext.js delete mode 100644 front-end/contexts/SelectedPolygonAreaProvider.js delete mode 100644 front-end/contexts/SelectedPolygonContext.js delete mode 100644 front-end/contexts/SelectedPolygonProvider.js delete mode 100644 front-end/jest.config.js delete mode 100644 front-end/jest.setup.js delete mode 100755 front-end/package-lock.json delete mode 100755 front-end/package.json delete mode 100755 front-end/pages/_app.js delete mode 100755 front-end/pages/api/hello.js delete mode 100644 front-end/pages/challenge.js delete mode 100644 front-end/pages/editnetworkfileinfo.js delete mode 100755 front-end/pages/index.js delete mode 100644 front-end/pages/login.js delete mode 100644 front-end/pages/previousexport.js delete mode 100755 front-end/pages/profile.js delete mode 100755 front-end/pages/register.js delete mode 100644 front-end/pages/resetPassword.js delete mode 100644 front-end/pages/submitChallenge.js delete mode 100644 front-end/pages/wirelessextension.js delete mode 100755 front-end/public/map_marker.svg delete mode 100755 front-end/styles/Home.module.css delete mode 100644 front-end/styles/Login.module.css delete mode 100755 front-end/styles/Map.module.css delete mode 100755 front-end/styles/Tool.module.css delete mode 100755 front-end/styles/globals.css delete mode 100755 front-end/utils/FactSheets.js delete mode 100644 front-end/utils/csrf.js delete mode 100644 front-end/utils/settings.js delete mode 100644 start-nginx.sh diff --git a/.env.example b/.env.example index 3ee9464..6989d04 100644 --- a/.env.example +++ b/.env.example @@ -28,20 +28,8 @@ MAIL_DEFAULT_SENDER=no-reply@example.com CELERY_BROKER_URL=redis://redis:6379/0 CELERY_RESULT_BACKEND=redis://redis:6379/0 -# --- Frontend (NEXT_PUBLIC_* vars are baked into browser-side code) --- -# API base URL the frontend calls. In local dev, requests go through nginx on -# localhost, so the default below is what you want. -NEXT_PUBLIC_DEVELOP_BACKEND_URL=http://localhost -# MapTiler style URLs for the basemap layers (need a free MapTiler API key, -# e.g. https://api.maptiler.com/maps/streets-v2/style.json?key=YOUR_KEY). -# Optional: the app boots without them; the basemap is just blank. -NEXT_PUBLIC_DEVELOP_MAPTILE_STREET= -NEXT_PUBLIC_DEVELOP_MAPTILE_SATELITE= -NEXT_PUBLIC_DEVELOP_MAPTILE_DARK= - # --- Ports --- DEVELOP_BACKEND_PORT=8000 -DEVELOP_FRONTEND_PORT=3000 NGINX_HTTP_PORT=80 # --- pgAdmin --- @@ -50,6 +38,4 @@ POSTGRES_ADMIN_PASSWORD=admin # --- Docker image names (used by the compose files; fine to leave as-is for local builds) --- DOCKER_IMAGE_BACKEND=bdk-backend -DOCKER_IMAGE_FRONTEND=bdk-frontend DOCKER_IMAGE_WORKER=bdk-worker -DOCKER_IMAGE_NGINX=bdk-nginx diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e47b994..e720e36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,25 +24,6 @@ jobs: - name: pytest run: docker compose -f docker-compose.test.yml run --rm test - frontend: - name: frontend tests - runs-on: ubuntu-latest - defaults: - run: - working-directory: front-end - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "18" - cache: npm - cache-dependency-path: front-end/package-lock.json - - name: install - run: npm ci - # Jest + React Testing Library component/contract tests (jsdom, no browser). - - name: jest - run: npm test -- --ci - boot-smoke: name: backend boot smoke runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 4fba123..5ade45e 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ front-end/public/asgeojson # Python tool caches .ruff_cache/ .pytest_cache/ + +# Claude Code session data (worktrees, local settings) +.claude/ diff --git a/Dockerfile.nginx b/Dockerfile.nginx deleted file mode 100644 index e0f5a2a..0000000 --- a/Dockerfile.nginx +++ /dev/null @@ -1,10 +0,0 @@ -FROM nginx:latest - -# Install expect -RUN apt-get update && apt-get install -y expect - -# Copy over the startup script -COPY start-nginx.sh /start-nginx.sh -RUN chmod +x /start-nginx.sh - -CMD ["/start-nginx.sh"] diff --git a/README.md b/README.md index 849be93..64caefb 100755 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ A video demonstration of how to use this tool will be provided at a later date | Category | Technology/Libraries | |----------------------------|------------------------------------------------------| -| Client | 🌐 [Next.js](https://nextjs.org/) | +| Client | 🌐 Server-rendered Flask (Jinja2 + htmx) | | Server | 🚀 [Flask](https://flask.palletsprojects.com/) | | Database | 📦 [PostgreSQL](https://www.postgresql.org/) | | Asynchronous Processing| 🔄 Redis & [Celery](https://docs.celeryproject.org/en/stable/) | diff --git a/back-end/alembic/versions/e4b8c62f17a9_drop_challenge_locations_table.py b/back-end/alembic/versions/e4b8c62f17a9_drop_challenge_locations_table.py new file mode 100644 index 0000000..9186387 --- /dev/null +++ b/back-end/alembic/versions/e4b8c62f17a9_drop_challenge_locations_table.py @@ -0,0 +1,49 @@ +"""drop the challenge_locations table + +Revision ID: e4b8c62f17a9 +Revises: c7f3a84e91d2 +Create Date: 2026-07-07 + +The BDC challenge export was reachable only from the retired SPA; its routes +and ops are removed in the same change. Downgrade recreates the table as the +initial migration defined it (data is not restored). +""" + +import sqlalchemy as sa + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "e4b8c62f17a9" +down_revision = "c7f3a84e91d2" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.drop_table("challenge_locations") + + +def downgrade() -> None: + op.create_table( + "challenge_locations", + sa.Column("id", sa.Integer(), autoincrement=True, nullable=False), + sa.Column("address", sa.String(), nullable=True), + sa.Column("primary_city", sa.String(), nullable=True), + sa.Column("state", sa.String(), nullable=True), + sa.Column("zip_code", sa.String(), nullable=True), + sa.Column("zip_code_suffix", sa.String(), nullable=True), + sa.Column("unit_count", sa.String(), nullable=True), + sa.Column("building_type_code", sa.String(), nullable=True), + sa.Column("non_bsl_code", sa.String(), nullable=True), + sa.Column("bsl_lacks_address_flag", sa.String(), nullable=True), + sa.Column("latitude", sa.String(), nullable=True), + sa.Column("longitude", sa.String(), nullable=True), + sa.Column("address_id", sa.String(), nullable=True), + sa.Column("contact_name", sa.String(), nullable=True), + sa.Column("contact_email", sa.String(), nullable=True), + sa.Column("contact_phone", sa.String(), nullable=True), + sa.Column("category_code", sa.String(), nullable=True), + sa.Column("location_id", sa.String(), nullable=True), + sa.PrimaryKeyConstraint("id"), + ) diff --git a/back-end/controllers/celery_controller/celery_tasks.py b/back-end/controllers/celery_controller/celery_tasks.py index 710b9b4..4d37b55 100755 --- a/back-end/controllers/celery_controller/celery_tasks.py +++ b/back-end/controllers/celery_controller/celery_tasks.py @@ -1,7 +1,5 @@ import base64 import json -import os -import subprocess import time from datetime import datetime @@ -17,7 +15,6 @@ kml_ops, mbtiles_ops, organization_ops, - user_ops, vt_ops, ) from database.models import file, kml_data, service_plan diff --git a/back-end/controllers/database_controller/challenge_ops.py b/back-end/controllers/database_controller/challenge_ops.py deleted file mode 100644 index d7c0225..0000000 --- a/back-end/controllers/database_controller/challenge_ops.py +++ /dev/null @@ -1,204 +0,0 @@ -import io -import os -from threading import Lock - -import pandas -import psycopg2 -from psycopg2.errors import UniqueViolation - -from database.models import ChallengeLocations -from database.sessions import Session -from utils.settings import DATABASE_URL - -db_lock = Lock() - - -def writeToDB(data) -> None: - with db_lock: - session = Session() - try: - # Create an instance of the ChallengeLocations model - challenge_location = ChallengeLocations( - contact_name=data.get("contact_name", None), - contact_email=data.get("contact_email", None), - contact_phone=data.get("contact_phone", None), - category_code=data.get("category_code", None), - location_id=data.get("location_id", None), - address=data.get("address_primary", None), - primary_city=data.get("city", None), - state=data.get("state", None), - zip_code=data.get("zip_code", None), - zip_code_suffix=data.get("zip_code_suffix", None), - unit_count=data.get("unit_count", None), - building_type_code=data.get("building_type", None), - non_bsl_code=data.get("non_bsl_code", None), - bsl_lacks_address_flag=data.get("bsl_lacks_address_flag", None), - latitude=data.get("latitude", None), - longitude=data.get("longitude", None), - address_id=data.get("address_id", None), - ) - - # Add this entry to the session - session.add(challenge_location) - - # Commit the transaction - session.commit() - except UniqueViolation: # Handle unique constraint violations, if any - session.rollback() # Rollback the session in case of any error - raise - except Exception as e: # Handle any other SQLAlchemy/database exceptions - session.rollback() - raise e - finally: - session.close() - - -def export(): - availability_csv = pandas.DataFrame() - - # we would want to fetch only the entries for this user - conn = psycopg2.connect(DATABASE_URL) - cursor = conn.cursor() - - cursor.execute("SELECT * FROM challenge_locations") - result = cursor.fetchall() - - cursor.close() - conn.close() - - availability_csv["address"] = [row[0] for row in result] - availability_csv["primary_city"] = [row[1] for row in result] - availability_csv["state"] = [row[2] for row in result] - availability_csv["zip_code"] = [row[3] for row in result] - availability_csv["zip_code_suffix"] = [row[4] for row in result] - availability_csv["unit_count"] = [row[5] for row in result] - availability_csv["building_type_code"] = [row[6] for row in result] - availability_csv["non_bsl_code"] = [row[7] for row in result] - availability_csv["bsl_lacks_address_flag"] = [row[8] for row in result] - availability_csv["latitude"] = [row[9] for row in result] - availability_csv["longitude"] = [row[10] for row in result] - availability_csv["address_id"] = [row[11] for row in result] - availability_csv["contact_name"] = [row[12] for row in result] - availability_csv["contact_email"] = [row[13] for row in result] - availability_csv["contact_phone"] = [row[14] for row in result] - availability_csv["category_code"] = [row[15] for row in result] - availability_csv["location_id"] = [row[16] for row in result] - - availability_csv = availability_csv[ - [ - "address", - "primary_city", - "state", - "zip_code", - "zip_code_suffix", - "unit_count", - "building_type_code", - "non_bsl_code", - "bsl_lacks_address_flag", - "latitude", - "longitude", - "address_id", - "contact_name", - "contact_email", - "contact_phone", - "category_code", - "location_id", - ] - ] - - output = io.BytesIO() - availability_csv.to_csv(output, index=False, encoding="utf-8") - return output - - -def import_to_postgis( - geojson_path, kml_path, csv1_path, csv2_path, db_name, db_user, db_password, db_host -): - # Check if the paths exist - for path in [geojson_path, kml_path, csv1_path, csv2_path]: - if not os.path.exists(path): - raise FileNotFoundError(f"The file {path} does not exist.") - - # 1. Create and set up PostGIS database - conn = psycopg2.connect(DATABASE_URL) - cur = conn.cursor() - cur.execute("CREATE EXTENSION IF NOT EXISTS postgis;") - - # Function to run ogr2ogr and check its status - def run_ogr2ogr(filepath, table_name): - cmd = f'ogr2ogr -f "PostgreSQL" PG:"dbname={db_name} user={db_user} password={db_password} host={db_host}" "{filepath}" -nln {table_name}' - ret = os.system(cmd) - if ret != 0: - raise RuntimeError(f"Failed to execute command {cmd} with return code {ret}") - - # 2. Import GeoJSON and other files - run_ogr2ogr(geojson_path, "buildings") - run_ogr2ogr(kml_path, "network") - run_ogr2ogr(csv1_path, "fcc_data1") - run_ogr2ogr(csv2_path, "fcc_data2") - - # 3. Add geometry columns and spatial indexes - sql_commands = [ - "ALTER TABLE fcc_data1 ADD COLUMN geom geometry(Point, 4326);", - "UPDATE fcc_data1 SET geom = ST_SetSRID(ST_MakePoint(CAST(longitude AS float), CAST(latitude AS float)), 4326);", - "CREATE INDEX idx_fcc_data1_geom ON fcc_data1 USING GIST (geom);", - "ALTER TABLE fcc_data2 ADD COLUMN geom geometry(Point, 4326);", - "UPDATE fcc_data2 SET geom = ST_SetSRID(ST_MakePoint(CAST(longitude AS float), CAST(latitude AS float)), 4326);", - "CREATE INDEX idx_fcc_data2_geom ON fcc_data2 USING GIST (geom);", - "CREATE INDEX idx_buildings_geom ON buildings USING GIST (wkb_geometry);", - "CREATE INDEX idx_network_geom ON network USING GIST (wkb_geometry);", - ] - - for command in sql_commands: - cur.execute(command) - - conn.commit() - cur.close() - conn.close() - - print("Data imported successfully!") - compute_remaining_buildings_near_network(50) - print("Challenge locations computed!") - - -def compute_remaining_buildings_near_network(proximity_distance_meters): - # Connect to PostGIS database - conn = psycopg2.connect(DATABASE_URL) - cur = conn.cursor() - - # Vacuum and analyze the tables for optimization - cur.execute("VACUUM ANALYZE buildings;") - cur.execute("VACUUM ANALYZE network;") - cur.execute("VACUUM ANALYZE fcc_data1;") - cur.execute("VACUUM ANALYZE fcc_data2;") - conn.commit() - - # Step 1: Identify buildings not in fcc_data1 or fcc_data2 - sql_not_in_fcc = """ - CREATE TEMP TABLE temp_buildings AS - SELECT b.* - FROM buildings b - LEFT JOIN fcc_data1 f1 ON ST_DWithin(b.wkb_geometry, f1.geom, 0.0001) - LEFT JOIN fcc_data2 f2 ON ST_DWithin(b.wkb_geometry, f2.geom, 0.0001) - WHERE f1.ogc_fid IS NULL AND f2.ogc_fid IS NULL; - """ - - # Step 2: Identify the buildings from the above set that are within a specified proximity of the network - sql_near_network = f""" - CREATE TABLE buildings_near_network AS - SELECT tb.* - FROM temp_buildings tb, network n - WHERE ST_DWithin(tb.wkb_geometry, n.wkb_geometry, {proximity_distance_meters}) - GROUP BY tb.id; - """ - - # Execute commands - cur.execute(sql_not_in_fcc) - cur.execute(sql_near_network) - - # Commit and close - conn.commit() - cur.close() - conn.close() - - print("Computation completed successfully!") diff --git a/back-end/database/models.py b/back-end/database/models.py index f0ff1b8..1139cb5 100755 --- a/back-end/database/models.py +++ b/back-end/database/models.py @@ -483,30 +483,6 @@ class vector_tiles(Base): mbtiles = relationship("mbtiles", back_populates="vector_tiles") -class ChallengeLocations(Base): - __tablename__ = "challenge_locations" - - id = Column(Integer, primary_key=True, autoincrement=True) - # these should be modified to store the correct data type in the future - address = Column(String) - primary_city = Column(String) - state = Column(String) - zip_code = Column(String) - zip_code_suffix = Column(String) - unit_count = Column(String) - building_type_code = Column(String) - non_bsl_code = Column(String) - bsl_lacks_address_flag = Column(String) - latitude = Column(String) - longitude = Column(String) - address_id = Column(String) - contact_name = Column(String) - contact_email = Column(String) - contact_phone = Column(String) - category_code = Column(String) - location_id = Column(String) - - class audit_log(Base): """Append-only record of security-relevant actions. diff --git a/back-end/routes/__init__.py b/back-end/routes/__init__.py index aadbdfa..e656097 100644 --- a/back-end/routes/__init__.py +++ b/back-end/routes/__init__.py @@ -7,46 +7,34 @@ from routes.admin_api import bp as admin_api_bp from routes.admin_ui import bp as admin_ui_bp from routes.app_pages import bp as app_pages_bp # server-rendered app pages (/org, /map, ...) -from routes.auth import bp as auth_bp from routes.auth_pages import bp as auth_pages_bp # server-rendered /auth/* (new shell) -from routes.challenge import bp as challenge_bp from routes.edit import bp as edit_bp from routes.export import bp as export_bp from routes.fabric import bp as fabric_bp from routes.files import bp as files_bp from routes.files_page import bp as files_page_bp # server-rendered /files page -from routes.filings import bp as filings_bp from routes.jobs import bp as jobs_bp from routes.map_page import bp as map_page_bp # server-rendered /map (studio map) -from routes.organizations import bp as organizations_bp from routes.setup_page import bp as setup_page_bp # server-rendered /setup (the funnel) from routes.submissions_page import bp as submissions_page_bp # server-rendered /submissions -from routes.tasks import bp as tasks_bp from routes.tiles import bp as tiles_bp -from routes.users import bp as users_bp from utils.flask_app import app _blueprints = ( admin_api_bp, admin_ui_bp, app_pages_bp, - auth_bp, auth_pages_bp, - challenge_bp, edit_bp, export_bp, fabric_bp, files_bp, files_page_bp, - filings_bp, jobs_bp, map_page_bp, - organizations_bp, setup_page_bp, submissions_page_bp, - tasks_bp, tiles_bp, - users_bp, ) for _bp in _blueprints: diff --git a/back-end/routes/_email.py b/back-end/routes/_email.py index 75315e0..4f4deaf 100644 --- a/back-end/routes/_email.py +++ b/back-end/routes/_email.py @@ -73,23 +73,15 @@ def consume_email_token(decoded): session.close() -def send_verification_email_with_token( - email, token, title, content, join_org=False, joining_email="", link_path=None -): +def send_verification_email_with_token(email, token, title, content, link_path=None): """link_path (e.g. "/auth/reset/") adds a clickable link for the - new app's pages; the raw token stays in the body for the SPA's - paste-the-token flows until cutover.""" + app's pages; the raw token stays in the body as a fallback.""" import os msg = Message(title, recipients=[email]) msg.content_subtype = "html" # This sets the message content type to HTML - if join_org: - message_start = f"Dear BDK User,

A user has requested to join your organization. Please forward the following token to {joining_email} and request them to enter it on the BDK website to " - else: - message_start = ( - "Dear BDK User,

Please enter the following token on the BDK website to " - ) + message_start = "Dear BDK User,

Please enter the following token on the BDK website to " link_html = "" if link_path: diff --git a/back-end/routes/auth.py b/back-end/routes/auth.py deleted file mode 100644 index c0b7427..0000000 --- a/back-end/routes/auth.py +++ /dev/null @@ -1,235 +0,0 @@ -"""Authentication: register, login, logout, password reset, email verification.""" - -import jwt -from flask import Blueprint, jsonify, make_response, request -from flask_jwt_extended import ( - create_access_token, - get_jwt_identity, - set_access_cookies, - unset_jwt_cookies, - verify_jwt_in_request, -) -from jwt import ExpiredSignatureError - -from controllers.database_controller import ( - user_ops, -) -from database.sessions import get_session -from routes._email import ( - EMAIL_TOKEN_AUDIENCE, - consume_email_token, - create_email_token, - send_verification_email_with_token, -) -from services.audit import log_action -from utils.flask_app import app, limiter -from utils.logger_config import logger -from utils.passwords import needs_rehash, verify_password -from utils.validation import is_valid_email - -bp = Blueprint("auth", __name__) - - -@bp.route("/api/request_password_reset", methods=["POST"]) -@limiter.limit("5 per minute") -def request_password_reset(): - session = get_session() - data = request.get_json() - email = data.get("email") - user = user_ops.get_user_with_email(email, session) - - if not user: - return jsonify({"status": "error", "message": "Email address not found."}), 400 - - email_token = create_email_token(userid=user.id, email=user.email, operation="reset_password") - send_verification_email_with_token( - email=email, - token=email_token, - title="Reset Your Password for BDK", - content="reset your password", - ) - return jsonify({"status": "success", "message": "Verification email resent."}), 200 - - -@bp.route("/api/reset_password", methods=["POST"]) -@limiter.limit("10 per minute") -def reset_password(): - data = request.get_json() - token = data.get("token") - new_password = data.get("newPassword") - - try: - session = get_session() - decoded_token = jwt.decode( - token, - app.config["JWT_SECRET_KEY"], - algorithms=["HS256"], - audience=EMAIL_TOKEN_AUDIENCE, - options={"verify_sub": False}, - ) - user_id = decoded_token["sub"]["id"] - email = decoded_token["sub"]["email"] - if user_ops.verify_user_email(user_id, email, session, False): - if not consume_email_token(decoded_token): - return jsonify({"status": "error", "message": "Invalid token."}), 400 - user_ops.reset_user_password(user_id, new_password) - return jsonify({"status": "success", "message": "Password reset successfully."}), 200 - else: - return jsonify({"status": "error", "message": "Invalid token."}), 400 - except jwt.ExpiredSignatureError: - return jsonify({"status": "error", "message": "The token has expired."}), 400 - except Exception: - return jsonify({"status": "error", "message": "Invalid token."}), 400 - - -@bp.route("/api/verify_token", methods=["POST"]) -def verify_token(): - try: - session = get_session() - data = request.get_json() - token = data.get("token") - - # Decode the token using pyjwt directly. verify_sub=False because these - # email tokens carry a dict `sub` ({"id", "email", "operation", ...}), - # which PyJWT >= 2.10 rejects by default (RFC 7519 "sub must be a - # string") — same reason the app sets JWT_VERIFY_SUB=False. The - # audience requirement rejects any non-email token (e.g. a session JWT - # signed with the same key). - decoded_token = jwt.decode( - token, - app.config["JWT_SECRET_KEY"], - algorithms=["HS256"], - audience=EMAIL_TOKEN_AUDIENCE, - options={"verify_sub": False}, - ) - - user_id = decoded_token["sub"]["id"] - email = decoded_token["sub"]["email"] - operation = decoded_token["sub"]["operation"] - - logger.debug(operation) - - if not consume_email_token(decoded_token): - return jsonify({"status": "error", "message": "Invalid token."}), 400 - - setVerified = True if operation == "email_address_verification" else False - if user_ops.verify_user_email(user_id, email, session, setVerified): - if operation == "join_organization": - org_id = int(decoded_token["sub"]["org_id"]) - logger.debug(org_id) - if org_id < 0: - return jsonify({"status": "error", "message": "Invalid organization id."}), 400 - user_ops.add_user_to_organization(user_id, org_id, session) - - response = make_response(jsonify({"status": "success"})) - - return response, 200 - else: - return jsonify({"status": "error", "message": "Invalid token."}), 400 - except ExpiredSignatureError: - return jsonify({"status": "error", "message": "The token has expired."}), 400 - except Exception as e: - logger.error(f"Error verifying token: {e}") - return jsonify({"status": "error", "message": "Invalid token."}), 400 - - -@bp.route("/api/send_email_verification", methods=["POST"]) -@limiter.limit("5 per minute") -def send_email_verification(): - session = get_session() - data = request.get_json() - email = data.get("email") - user = user_ops.get_user_with_email(email, session) - - if not user: - return jsonify({"status": "error", "message": "Email address not found."}), 400 - - email_token = create_email_token( - userid=user.id, email=user.email, operation="email_address_verification" - ) - send_verification_email_with_token( - email=email, - token=email_token, - title="Verify Your Email Address for BDK", - content="verify your email address", - ) - return jsonify({"status": "success", "message": "Verification email sent."}), 200 - - -@bp.route("/api/register", methods=["POST"]) -@limiter.limit("10 per minute") -def register(): - session = get_session() - data = request.get_json() - email = data.get("email") - password = data.get("password") - - if not is_valid_email(email): - return jsonify({"status": "error", "message": "Please provide a valid email address."}), 400 - if not password: - return jsonify({"status": "error", "message": "Please provide a password."}), 400 - - response = user_ops.create_user_in_db(email, password, session) - - if "error" in response: - return jsonify({"status": "error", "message": response["error"]}), 400 - - userVal = response["success"] - access_token = create_access_token(identity={"id": userVal.id}) - - response = make_response(jsonify({"status": "success"})) - # Sets the HttpOnly `token` cookie plus the JS-readable csrf_access_token - # (flags from JWT_COOKIE_* config: Secure in prod, SameSite=Lax). - set_access_cookies(response, access_token) - - return response, 200 - - -@bp.route("/api/login", methods=["POST"]) -@limiter.limit("10 per minute") -def login(): - data = request.get_json() - email = data.get("email") - pword = data.get("password") - - # Needs a try catch to return the correct message - user = user_ops.get_user_with_email(email) - - if user is not None and verify_password(user.password, pword): - if needs_rehash(user.password): - # Legacy (pre-pbkdf2) hash: the user just proved the password, so - # upgrade the stored hash in place — no forced reset. - user_ops.reset_user_password(user.id, pword) - # A soft-disabled account cannot obtain a fresh session. Checked - # only after the password verifies, so we never reveal disabled status - # to someone who doesn't already hold the credentials. - if getattr(user, "disabled", False): - log_action("login_disabled", user_id=user.id, resource_type="user", resource_id=user.id) - return jsonify({"status": "error", "message": "This account has been disabled."}), 403 - user_id = user.id - access_token = create_access_token(identity={"id": user_id}) - response = make_response(jsonify({"status": "success"})) - set_access_cookies(response, access_token) - log_action("login", user_id=user_id, resource_type="user", resource_id=user_id) - return response - else: - # Don't leak whether the email exists; record the attempted email. - log_action("login_failed", details={"email": email}) - return jsonify({"status": "error", "message": "Invalid credentials"}) - - -@bp.route("/api/logout", methods=["POST"]) -def logout(): - # Logout isn't @jwt_required; best-effort identify the actor for the audit - # trail without failing if the cookie is missing/expired. - user_id = None - try: - verify_jwt_in_request(optional=True) - identity = get_jwt_identity() - user_id = identity.get("id") if identity else None - except Exception: - user_id = None - log_action("logout", user_id=user_id) - response = make_response(jsonify({"status": "success", "message": "Logged out"})) - unset_jwt_cookies(response) # clears the token AND csrf cookies - return response diff --git a/back-end/routes/challenge.py b/back-end/routes/challenge.py deleted file mode 100644 index c2f0ee3..0000000 --- a/back-end/routes/challenge.py +++ /dev/null @@ -1,34 +0,0 @@ -"""FCC challenge export/submit.""" - -from datetime import datetime - -import shortuuid -from flask import Blueprint, jsonify, request, send_file - -from controllers.database_controller import ( - challenge_ops, -) - -bp = Blueprint("challenge", __name__) - - -@bp.route("/api/exportChallenge", methods=["GET"]) -def exportChallenge(): - csv_output = challenge_ops.export() - if csv_output: - csv_output.seek(0) # rewind the stream back to the start - current_time = datetime.now() - formatted_time = current_time.strftime("%Y_%B") - download_name = "BDC_BulkChallenge_" + formatted_time + "_" + shortuuid.uuid()[:4] + ".csv" - return send_file( - csv_output, as_attachment=True, download_name=download_name, mimetype="text/csv" - ) - else: - return jsonify({"status": "error"}) - - -@bp.route("/api/submit-challenge", methods=["POST"]) -def submit_challenge(): - data = request.json # This will give you the entire JSON payload - challenge_ops.writeToDB(data) - return jsonify({"message": "Data processed!"}), 200 diff --git a/back-end/routes/edit.py b/back-end/routes/edit.py index 06eba9b..08980df 100644 --- a/back-end/routes/edit.py +++ b/back-end/routes/edit.py @@ -2,7 +2,7 @@ import json -from flask import Blueprint, jsonify, request +from flask import Blueprint, jsonify from flask_jwt_extended import get_jwt_identity, jwt_required from flask_jwt_extended.exceptions import NoAuthorizationError from shapely.geometry import shape @@ -11,75 +11,10 @@ editfile_ops, ) from database.sessions import get_session -from services import edit_service -from services.audit import log_action -from services.exceptions import ServiceError bp = Blueprint("edit", __name__) -@bp.route("/api/toggle-markers", methods=["POST"]) -@jwt_required() -def toggle_markers(): - try: - identity = get_jwt_identity() - session = get_session() - request_data = request.json - markers = request_data["marker"] - folderid = request_data["folderid"] - polygonfeatures = request_data["polygonfeatures"] - edit_service.apply_edit( - user_id=identity["id"], - folderid=folderid, - markers=markers, - polygonfeatures=polygonfeatures, - session=session, - ) - log_action( - "edit", - user_id=identity["id"], - resource_type="folder", - resource_id=folderid, - details={"marker_count": len(markers) if hasattr(markers, "__len__") else None}, - ) - return jsonify({"status": "success"}), 200 - except ServiceError as e: - return jsonify({"status": "error", "message": e.message}), e.status - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/get-edit-geojson/", methods=["GET"]) -@jwt_required() -def get_edit_geojson(fileid): - session = get_session() - try: - identity = get_jwt_identity() - fileid = int(fileid) - if not editfile_ops.editfile_belongs_to_organization( - file_id=fileid, user_id=identity["id"], session=session - ): - return jsonify( - { - "status": "error", - "message": "You are accessing a file not belong to your organization", - } - ), 400 - - editfile = editfile_ops.get_editfile_with_id(fileid=fileid, session=session) - - if editfile is None: - return jsonify({"status": "error", "message": "File not found"}), 404 - - # Decode the binary data to string assuming it's stored in UTF-8 encoded JSON format - geojson_data = json.loads(editfile.data.decode("utf-8")) - return jsonify(geojson_data), 200 - except FileNotFoundError: - return jsonify({"status": "error", "message": "File not found"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - @bp.route("/api/get-edit-geojson-centroid/", methods=["GET"]) @jwt_required() def get_edit_geojson_centroid(fileid): diff --git a/back-end/routes/export.py b/back-end/routes/export.py index e99a453..f4c7984 100644 --- a/back-end/routes/export.py +++ b/back-end/routes/export.py @@ -2,141 +2,18 @@ import io -from flask import Blueprint, jsonify, make_response, send_file +from flask import Blueprint, jsonify, send_file from flask_jwt_extended import get_jwt_identity, jwt_required from flask_jwt_extended.exceptions import NoAuthorizationError -from controllers.celery_controller.celery_tasks import ( - async_folder_delete, -) from controllers.database_controller import ( - celerytaskinfo_ops, file_ops, - folder_ops, - user_ops, ) from database.sessions import get_session -from services import export_service -from services.audit import log_action -from services.exceptions import ServiceError bp = Blueprint("export", __name__) -@bp.route("/api/exportFiling/", methods=["GET"]) -@jwt_required() -def exportFiling(folderid): - try: - identity = get_jwt_identity() - folderid = int(folderid) - session = get_session() - try: - csv_output, download_name = export_service.export_filing( - user_id=identity["id"], folderid=folderid, session=session - ) - if csv_output is None: - return jsonify({"status": "error", "message": "internal server error"}), 500 - - response = make_response( - send_file( - csv_output, - as_attachment=True, - download_name=download_name, - mimetype="text/csv", - ) - ) - response.headers["Access-Control-Expose-Headers"] = "Content-Disposition" - log_action( - "export", - user_id=identity["id"], - resource_type="folder", - resource_id=folderid, - details={"download_name": download_name}, - ) - return response - except ServiceError as e: - return jsonify({"status": "error", "message": e.message}), e.status - except Exception as e: - session.rollback() - return jsonify({"status": "error", "message": str(e)}), 500 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/export", methods=["GET"]) -@jwt_required() -def get_exported_folders(): - try: - identity = get_jwt_identity() - session = get_session() - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - folders = folder_ops.get_folders_by_type_for_org( - orgid=userVal.organization_id, foldertype="export", session=session - ) - - response_data = [] - for fldr in folders: - exportcsv_in_folder = file_ops.get_files_by_type( - folderid=fldr.id, filetype="export", session=session - ) - # exportcsv_in_folder = file_ops.get_files_in_folder(folderid=fldr.id, session=session) - - # print(exportcsv_in_folder) - for f in exportcsv_in_folder: - file_data = { - "id": f.id, - "name": f.name, - "timestamp": f.timestamp, - "type": f.type, - "folder_id": f.folder_id, - } - response_data.append(file_data) - - return jsonify(response_data), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 400 - - -@bp.route("/api/delexport/", methods=["DELETE"]) -@jwt_required() -def delete_export(fileid): - fileid = int(fileid) - session = get_session() - try: - identity = get_jwt_identity() - if not file_ops.file_belongs_to_organization( - file_id=fileid, user_id=identity["id"], session=session - ): - return jsonify( - { - "status": "error", - "message": "You are accessing a file not belong to your organization", - } - ), 400 - - fileVal = file_ops.get_file_with_id(fileid=fileid, session=session) - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - - folderVal = folder_ops.get_folder_with_id(fileVal.folder_id, session=session) - deadline = folderVal.deadline - result = async_folder_delete.apply_async(args=[fileVal.folder_id]) - celerytaskinfo_ops.create_celery_taskinfo( - task_id=result.task_id, - status="PENDING", - operation_type="Delete", - operation_detail="Delete a filing export snapshot", - user_email=userVal.email, - organization_id=userVal.organization_id, - folder_deadline=deadline, - session=session, - ) - return jsonify({"status": "success"}), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - @bp.route("/api/downloadexport/", methods=["GET"]) @jwt_required() def download_export(fileid): diff --git a/back-end/routes/fabric.py b/back-end/routes/fabric.py index 5a5ae2e..724d285 100644 --- a/back-end/routes/fabric.py +++ b/back-end/routes/fabric.py @@ -11,43 +11,6 @@ bp = Blueprint("fabric", __name__) -@bp.route("/api/fabric/", methods=["POST"]) -@jwt_required() -def intake_fabric(folderid): - identity = get_jwt_identity() - session = get_session() - upload = request.files.get("file") - if upload is None or not upload.filename: - return jsonify( - {"status": "error", "message": "Attach the fabric delivery (a zip or CSV)"} - ), 400 - override = request.form.get("override", "").lower() in ("1", "true", "yes") - try: - result = fabric_service.intake_fabric( - identity["id"], - folderid, - upload.filename, - upload.read(), - session, - override_vintage=override, - ) - return jsonify({"status": "success", **result}), 200 - except ServiceError as e: - session.rollback() - return jsonify({"status": "error", "message": e.message}), e.status - - -@bp.route("/api/fabric/", methods=["GET"]) -@jwt_required() -def fabric_status(folderid): - identity = get_jwt_identity() - session = get_session() - try: - return jsonify(fabric_service.fabric_status(identity["id"], folderid, session)), 200 - except ServiceError as e: - return jsonify({"status": "error", "message": e.message}), e.status - - @bp.route("/api/address-search/", methods=["GET"]) @jwt_required() def address_search(folderid): diff --git a/back-end/routes/files.py b/back-end/routes/files.py index 72ae0ff..cb0c28b 100644 --- a/back-end/routes/files.py +++ b/back-end/routes/files.py @@ -1,10 +1,7 @@ """Coverage/edit/network files: list, update, delete, download.""" -import io -import os - from celery import chain -from flask import Blueprint, jsonify, request, send_file +from flask import Blueprint, jsonify, request from flask_jwt_extended import get_jwt_identity, jwt_required from flask_jwt_extended.exceptions import NoAuthorizationError @@ -17,7 +14,6 @@ editfile_ops, file_ops, folder_ops, - kml_ops, user_ops, ) from database.sessions import get_session @@ -26,204 +22,6 @@ bp = Blueprint("files", __name__) -@bp.route("/api/files", methods=["GET"]) -@jwt_required() -def get_files(): - try: - identity = get_jwt_identity() - # Verify user own this folder - session = get_session() - try: - folder_ID = int(request.args.get("folder_ID")) - except ValueError: - return jsonify({"status": "error", "message": "folderID must be integer"}), 400 - - if not folder_ops.folder_belongs_to_organization(folder_ID, identity["id"], session): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - if folder_ID: - filesinfo = file_ops.get_filesinfo_in_folder(folder_ID, session=session) - return jsonify(filesinfo), 200 - else: - return jsonify({"status": "error", "message": "Invalid request"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/editfiles", methods=["GET"]) -@jwt_required() -def get_editfiles(): - try: - identity = get_jwt_identity() - # Verify user own this folder - try: - folder_ID = int(request.args.get("folder_ID")) - except (TypeError, ValueError): - return jsonify({"status": "error", "message": "folderID must be integer"}), 400 - session = get_session() - - if not folder_ops.folder_belongs_to_organization(folder_ID, identity["id"], session): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - if folder_ID: - filesinfo = editfile_ops.get_editfilesinfo_in_folder(folder_ID, session=session) - - return jsonify(filesinfo), 200 - else: - return jsonify({"status": "error", "message": "Invalid request"}), 404 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/networkfiles/", methods=["GET"]) -@jwt_required() -def get_network_files(folder_id): - try: - identity = get_jwt_identity() - session = get_session() - - folder_id = int(folder_id) - - if not folder_ops.folder_belongs_to_organization(folder_id, identity["id"], session): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - files = file_ops.get_all_network_files_for_fileinfoedit_table(folder_id, session) - files_data = [] - for file in files: - filename_without_extension = os.path.splitext(file.name)[0] - file_info = { - "id": file.id, - "name": filename_without_extension, - "type": file.type, - "maxDownloadSpeed": file.maxDownloadSpeed, - "maxUploadSpeed": file.maxUploadSpeed, - "techType": file.techType, - "latency": file.latency, - "category": file.category, - } - - files_data.append(file_info) - return jsonify({"status": "success", "files_data": files_data}) - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 400 - - -@bp.route("/api/updateNetworkFile/", methods=["POST"]) -@jwt_required() -def update_network_file(file_id): - try: - data = request.json - identity = get_jwt_identity() - session = get_session() - file_id = int(file_id) - - if not file_ops.file_belongs_to_organization( - file_id=file_id, user_id=identity["id"], session=session - ): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - file = file_ops.get_file_with_id(file_id, session) - if not file: - return jsonify({"status": "error", "message": "File not found"}), 400 - - try: - int(data["maxDownloadSpeed"]) if "maxDownloadSpeed" in data else file.maxDownloadSpeed - int(data["maxUploadSpeed"]) if "maxUploadSpeed" in data else file.maxUploadSpeed - except ValueError: - return jsonify( - { - "status": "error", - "message": "maxDownloadSpeed and maxUploadSpeed must be integers", - } - ), 400 - - try: - int(data["latency"]) if "latency" in data else file.latency - int(data["techType"]) if "techType" in data else file.techType - except ValueError: - return jsonify( - {"status": "error", "message": "Please select valid tech types and latency"} - ), 400 - - logger.debug(data) - lowercase_type = data["type"].lower() - if lowercase_type not in ["wired", "wireless"]: - return jsonify({"status": "error", "message": "Please select a valid type"}), 400 - name_or_type_changed = False - - # Separate the filename and extension - file_root, file_ext = os.path.splitext(file.name) - - if file_root != data["name"] or file.type != lowercase_type: - name_or_type_changed = True - - # Update the filename while keeping the original extension - new_filename = data["name"] + file_ext - - file.name = new_filename - file.type = lowercase_type - file.maxDownloadSpeed = data["maxDownloadSpeed"] - file.maxUploadSpeed = data["maxUploadSpeed"] - file.techType = data["techType"] - file.latency = data["latency"] - file.category = data["category"] - kml_entries = kml_ops.get_kml_data_by_file(file_id, session) - for kml_entry in kml_entries: - kml_entry.maxDownloadSpeed = data["maxDownloadSpeed"] - kml_entry.maxUploadSpeed = data["maxUploadSpeed"] - kml_entry.techType = data["techType"] - kml_entry.latency = data["latency"] - kml_entry.category = data["category"] - - session.commit() - - if name_or_type_changed: - userVal = user_ops.get_user_with_id(identity["id"], session=session) - result = process_data.apply_async(args=[file.folder_id, 4]) - folderVal = folder_ops.get_folder_with_id(folderid=file.folder_id, session=session) - celerytaskinfo_ops.create_celery_taskinfo( - task_id=result.task_id, - status="PENDING", - operation_type="Update", - operation_detail="Update filename or filetype in a filing", - user_email=userVal.email, - organization_id=userVal.organization_id, - folder_deadline=folderVal.deadline, - session=session, - files_changed=file.name, - ) - return jsonify( - {"status": "success", "message": "File and its KML data updated successfully"} - ), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - session.rollback() - return jsonify({"status": "error", "message": str(e)}), 400 - - @bp.route("/api/delfiles", methods=["DELETE"]) @jwt_required() def delete_files(): @@ -325,37 +123,3 @@ def delete_files(): ), 200 # return task id to the client except NoAuthorizationError: return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/download-kmlfile/", methods=["GET"]) -@jwt_required() -def download_kmlfile(kml_filename): - session = get_session() - try: - identity = get_jwt_identity() - # get_upload_folder takes the ORG id (this used to pass a nonexistent - # userid= kwarg, so every call to this endpoint was a TypeError 500). - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - folderVal = folder_ops.get_upload_folder( - orgid=userVal.organization_id if userVal else None, folderid=None, session=session - ) - if not folderVal: - return jsonify({"status": "error", "message": "File not found"}), 404 - fileVal = file_ops.get_file_with_name( - filename=kml_filename, folderid=folderVal.id, session=session - ) - if isinstance(fileVal, str): # In case create_tower returned an error message - logger.debug(fileVal) - return jsonify({"status": "error", "message": fileVal}), 400 - - if not fileVal: - return jsonify({"status": "error", "message": "File not found"}), 404 - - downfile = io.BytesIO(fileVal.data) - downfile.seek(0) - return send_file( - downfile, download_name=fileVal.name, as_attachment=True, mimetype="text/kml" - ) - - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 diff --git a/back-end/routes/filings.py b/back-end/routes/filings.py deleted file mode 100644 index 4bf49af..0000000 --- a/back-end/routes/filings.py +++ /dev/null @@ -1,194 +0,0 @@ -"""Filings: upload/submit, served data, folders, search, delete filing.""" - -from flask import Blueprint, jsonify, request -from flask_jwt_extended import get_jwt_identity, jwt_required -from flask_jwt_extended.exceptions import NoAuthorizationError - -from controllers.database_controller import ( - fabric_ops, - folder_ops, - kml_ops, - user_ops, -) -from database.sessions import get_session -from services import filing_service, upload_service -from services.audit import log_action -from services.exceptions import ServiceError -from utils.logger_config import logger - -bp = Blueprint("filings", __name__) - - -@bp.route("/api/served-data/", methods=["GET"]) -@jwt_required() -def get_number_records(folderid): - folderid = int(folderid) - session = get_session() - try: - identity = get_jwt_identity() - if folderid < 0: - return jsonify({"status": "error", "message": "Filling ID is invalid"}), 400 - else: - if not folder_ops.folder_belongs_to_organization(folderid, identity["id"], session): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - return jsonify(kml_ops.get_kml_data(folderid=folderid, session=session)), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/submit-data/", methods=["POST", "GET"]) -@jwt_required() -def submit_data(folderid): - session = get_session() - try: - identity = get_jwt_identity() - folderid = int(folderid) - - if "file" not in request.files: - return jsonify({"status": "error", "message": "no file uploaded"}), 400 - - files = request.files.getlist("file") - if len(files) <= 0: - return jsonify({"status": "error", "message": "no file uploaded"}), 400 - - raw_files = [(f.filename, f.read()) for f in files] - file_data_list = request.form.getlist("fileData") - result_id = upload_service.dispatch_upload( - user_id=identity["id"], - folderid=folderid, - raw_files=raw_files, - file_data_list=file_data_list, - import_folder_raw=request.form.get("importFolder"), - deadline_raw=request.form.get("deadline"), - session=session, - ) - log_action( - "upload", - user_id=identity["id"], - resource_type="folder", - resource_id=folderid, - details={"task_id": result_id, "file_count": len(raw_files)}, - ) - return jsonify({"status": "success", "task_id": result_id}), 200 # return task id - - except ServiceError as e: - return jsonify({"status": "error", "message": e.message}), e.status - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except ValueError as ve: - # Handle specific errors, e.g., value errors - logger.debug(ve) - return jsonify({"status": "error", "message": str(ve)}), 400 - except Exception as e: - # General catch-all for other exceptions - logger.debug(e) - session.rollback() # Rollback the session in case of error - return jsonify({"status": "error", "message": str(e)}), 500 - - -@bp.route("/api") -def home(): - response_body = {"name": "Success!", "message": "Backend successfully connected to frontend"} - - return response_body - - -@bp.route("/api/search/", methods=["GET"]) -@jwt_required() -def search_location(folderid): - query = request.args.get("query").upper() - folderid = int(folderid) - try: - identity = get_jwt_identity() - session = get_session() - try: - userVal = user_ops.get_user_with_id(identity["id"], session) - if not folder_ops.folder_belongs_to_organization(folderid, identity["id"], session): - return jsonify( - { - "status": "error", - "message": "You are accessing a filing not belong to your organization", - } - ), 400 - - results_dict = fabric_ops.address_query(folderid, query, session) - return jsonify(results_dict) - except Exception as e: - session.rollback() - return jsonify({"status": "error", "message": str(e)}), 500 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/folders-with-deadlines", methods=["GET"]) -@jwt_required() -def get_folders_with_deadlines(): - try: - identity = get_jwt_identity() - user_id = identity["id"] - session = get_session() - userVal = user_ops.get_user_with_id(userid=user_id, session=session) - folders = folder_ops.get_folders_by_type_for_org(userVal.organization_id, "upload", session) - - folder_info = [ - { - "folder_id": folder.id, - "name": folder.name, - "deadline": folder.deadline.strftime("%Y-%m-%d") if folder.deadline else None, - } - for folder in folders - ] - - return jsonify(folder_info), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 400 - - -@bp.route("/api/get-last-upload-folder", methods=["GET"]) -@jwt_required() -def get_last_folder(): - try: - identity = get_jwt_identity() - session = get_session() - user_id = identity["id"] - userVal = user_ops.get_user_with_id(userid=user_id, session=session) - # Hackey way to use this method to get the lastest filing of user - folderVal = folder_ops.get_upload_folder(orgid=userVal.organization_id, session=session) - if not folderVal: - folderid = -1 - else: - folderid = folderVal.id - return jsonify(folderid), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 500 - - -@bp.route("/api/delfiling", methods=["DELETE"]) -@jwt_required() -def delete_filing(): - session = get_session() - try: - identity = get_jwt_identity() - folderid = request.json["folderID"] - filing_service.delete_filing(user_id=identity["id"], folderid=folderid, session=session) - log_action( - "filing_delete", - user_id=identity["id"], - resource_type="folder", - resource_id=folderid, - ) - return jsonify({"status": "success"}), 200 - except ServiceError as e: - return jsonify({"status": "error", "message": e.message}), e.status - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 diff --git a/back-end/routes/organizations.py b/back-end/routes/organizations.py deleted file mode 100644 index 12aa472..0000000 --- a/back-end/routes/organizations.py +++ /dev/null @@ -1,198 +0,0 @@ -"""Organization create/join/delete/exit.""" - -from flask import Blueprint, jsonify, request -from flask_jwt_extended import get_jwt_identity, jwt_required -from flask_jwt_extended.exceptions import NoAuthorizationError - -from controllers.celery_controller.celery_tasks import ( - async_org_delete, -) -from controllers.database_controller import ( - organization_ops, - user_ops, -) -from database.sessions import get_session -from routes._email import create_email_token, send_verification_email_with_token -from services.audit import log_action -from utils.admin_auth import require_admin -from utils.logger_config import logger - -bp = Blueprint("organizations", __name__) - - -@bp.route("/api/create_organization", methods=["POST"]) -@jwt_required() -def create_organization(): - try: - current_user = get_jwt_identity() - session = get_session() - data = request.get_json() - org_name = data.get("orgName") - user = user_ops.get_user_with_id(current_user["id"], session) - - if not user.verified: - return jsonify( - { - "status": "error", - "message": "Please verify your email address before creating an organization.", - } - ), 400 - - if not org_name: - return jsonify( - {"status": "error", "message": "Please enter an organization name."} - ), 400 - - existing_org = organization_ops.get_organization_with_orgname( - org_name=org_name, session=session - ) - if existing_org: - return jsonify({"status": "error", "message": "Organization name already exists."}), 400 - - new_org = organization_ops.create_organization(org_name=org_name, session=session) - - user.organization_id = new_org.id - user.is_admin = True - session.commit() - - log_action( - "org_create", - user_id=user.id, - resource_type="organization", - resource_id=new_org.id, - details={"name": org_name}, - ) - return jsonify({"status": "success", "message": "Organization created successfully!"}), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - logger.error(f"Error creating organization: {e}") - session.rollback() - return jsonify( - {"status": "error", "message": "An error occurred while creating the organization."} - ), 500 - - -@bp.route("/api/join_organization", methods=["POST"]) -@jwt_required() -def join_organization(): - try: - current_user = get_jwt_identity() - - session = get_session() - data = request.get_json() - org_name = data.get("name") - user = user_ops.get_user_with_id(current_user["id"], session) - - if not user.verified: - return jsonify( - { - "status": "error", - "message": "Please verify your email address before joining an organization.", - } - ), 400 - - if not org_name: - return jsonify( - {"status": "error", "message": "Please enter an organization name."} - ), 400 - - org = organization_ops.get_organization_with_orgname(org_name=org_name, session=session) - if not org: - return jsonify({"status": "error", "message": "Organization not found."}), 400 - - admin = organization_ops.get_admin_user_for_organization(org_id=org.id, session=session) - if not admin: - return jsonify({"status": "error", "message": "Organization admin not found."}), 400 - - email_token = create_email_token( - userid=user.id, email=user.email, operation="join_organization", org_id=org.id - ) - send_verification_email_with_token( - email=admin.email, - token=email_token, - title="Organization Join Request for BDK", - content="finish their organization join request", - join_org=True, - joining_email=user.email, - ) - - return jsonify( - {"status": "success", "message": "Join request sent to organization admin."} - ), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception as e: - logger.error(f"Error joining organization: {e}") - session.rollback() - return jsonify( - { - "status": "error", - "message": "An error occurred while trying to join the organization.", - } - ), 500 - - -@bp.route("/api/delete_organization", methods=["DELETE"]) -@jwt_required() -@require_admin -def delete_organization(): - try: - identity = get_jwt_identity() - session = get_session() - data = request.get_json() - orgName = data.get("organizationName") - - userVal = user_ops.get_user_with_id(identity["id"], session=session) - organization = userVal.organization - - if not organization: - return jsonify({"status": "error", "message": "Organization not found"}), 400 - - if not organization.name == orgName: - return jsonify({"status": "error", "message": "Organization not found"}), 400 - - org_id = userVal.organization_id - result = async_org_delete.apply_async(args=[org_id]) - - log_action( - "org_delete", - user_id=userVal.id, - resource_type="organization", - resource_id=org_id, - details={"name": orgName, "actor_email": userVal.email}, - ) - return jsonify({"status": "success", "message": "Organization deleted successfully"}), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/exit_organization", methods=["POST"]) -@jwt_required() -def exit_organization(): - try: - identity = get_jwt_identity() - session = get_session() - - user = user_ops.get_user_with_id(userid=identity["id"], session=session) - data = request.get_json() - orgName = data.get("organizationName") - - logger.debug(orgName) - - userVal = user_ops.get_user_with_id(identity["id"], session=session) - organization = userVal.organization - - if not organization: - return jsonify({"status": "error", "message": "Organization not found"}), 400 - - if not organization.name == orgName: - return jsonify({"status": "error", "message": "Organization not found"}), 400 - - user.organization_id = None - session.commit() - - return jsonify({"status": "success", "message": "Exited organization successfully"}), 200 - - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 diff --git a/back-end/routes/tasks.py b/back-end/routes/tasks.py deleted file mode 100644 index 83e2468..0000000 --- a/back-end/routes/tasks.py +++ /dev/null @@ -1,118 +0,0 @@ -"""Celery task status endpoints.""" - -from flask import Blueprint, jsonify, request -from flask_jwt_extended import get_jwt_identity, jwt_required - -from controllers.database_controller import ( - celerytaskinfo_ops, - user_ops, -) -from database.sessions import get_session - -bp = Blueprint("tasks", __name__) - - -@bp.route("/api/user-tasks", methods=["GET"]) -@jwt_required() -def get_user_tasks(): - session = get_session() - try: - identity = get_jwt_identity() - - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - if not userVal: - return jsonify({"status": "error", "message": "User not found"}), 400 - if not userVal.organization: - return jsonify( - {"status": "error", "message": "User not associated with organization"} - ), 400 - - in_progress_tasks, finished_tasks = celerytaskinfo_ops.get_celerytasksinfo_for_org( - orgid=userVal.organization_id, session=session - ) - - return jsonify( - { - "status": "success", - "in_progress_tasks": in_progress_tasks, - "finished_tasks": finished_tasks, - } - ), 200 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 500 - - -@bp.route("/api/estimated-task-runtime/", methods=["GET"]) -@jwt_required() -def get_estimated_task_runtime(taskid): - session = get_session() - try: - identity = get_jwt_identity() - taskid = str(taskid) - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - if not userVal: - return jsonify({"status": "error", "message": "User not found"}), 400 - if not userVal.organization: - return jsonify( - {"status": "error", "message": "User not associated with organization"} - ), 400 - if not celerytaskinfo_ops.task_belongs_to_organization( - task_id=taskid, user_id=userVal.id, session=session - ): - return jsonify( - { - "status": "error", - "message": "You are accessing a task not belong to your organization", - } - ), 400 - - estimated_runtime_seconds = celerytaskinfo_ops.get_estimated_runtime_for_task( - task_id=taskid, session=session - ) - - return jsonify({"status": "success", "estimated_runtime": estimated_runtime_seconds}), 200 - except Exception as e: - return jsonify({"status": "error", "message": str(e)}), 500 - - -@bp.route("/api/update-task-status/", methods=["POST"]) -@jwt_required() -def update_task_status(taskid): - session = get_session() - try: - identity = get_jwt_identity() - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - taskid = str(taskid) - if not userVal: - return jsonify({"status": "error", "message": "User not found"}), 400 - - if not userVal.organization: - return jsonify( - {"status": "error", "message": "User not associated with organization"} - ), 400 - - if not celerytaskinfo_ops.task_belongs_to_organization( - task_id=taskid, user_id=userVal.id, session=session - ): - return jsonify( - { - "status": "error", - "message": "You are accessing a task not belonging to your organization", - } - ), 400 - - # Get the new status from the request body - data = request.get_json() - new_status = data.get("status") - - if not new_status: - return jsonify({"status": "error", "message": "Status is required"}), 400 - - # Update the task status - celerytaskinfo_ops.update_task_status(task_id=taskid, status=new_status, session=session) - - return jsonify({"status": "success", "message": "Task status updated successfully"}), 200 - - except Exception as e: - session.rollback() - return jsonify({"status": "error", "message": str(e)}), 500 diff --git a/back-end/routes/users.py b/back-end/routes/users.py deleted file mode 100644 index 6517b84..0000000 --- a/back-end/routes/users.py +++ /dev/null @@ -1,87 +0,0 @@ -"""User profile endpoints.""" - -from flask import Blueprint, jsonify, request -from flask_jwt_extended import get_jwt_identity, jwt_required -from flask_jwt_extended.exceptions import NoAuthorizationError - -from controllers.database_controller import ( - user_ops, -) -from database.sessions import get_session -from utils.logger_config import logger -from utils.validation import is_valid_email - -bp = Blueprint("users", __name__) - - -@bp.route("/api/user", methods=["GET"]) -@jwt_required() -def get_user_info(): - session = get_session() - try: - identity = get_jwt_identity() - - userVal = user_ops.get_user_with_id(identity["id"], session=session) - if not userVal: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - userinfo = user_ops.get_userinfo_with_id(identity["id"], session=session) - # Impersonation banner: when a platform admin is "logged in as" this user, - # the app token carries an `impersonator` claim. Surface the operator's - # email so the SPA can show the banner + "Return to admin" link. - impersonator_id = identity.get("impersonator") if isinstance(identity, dict) else None - if impersonator_id and isinstance(userinfo, dict): - operator = user_ops.get_user_with_id(impersonator_id, session=session) - userinfo["impersonator"] = ( - operator.email if operator and not isinstance(operator, str) else True - ) - return jsonify({"status": "success", "userinfo": userinfo}), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - - -@bp.route("/api/update_profile", methods=["POST"]) -@jwt_required() -def update_profile(): - session = get_session() - try: - identity = get_jwt_identity() - # Only fields actually present in the body are applied — a missing - # field must never coerce to the string "None" (str(None)) and - # overwrite real data, which the old code did. - data = request.get_json(silent=True) or {} - provider_id = data.get("providerId") - brand_name = data.get("brandName") - email = data.get("email") - org_name = data.get("organizationName") - - userVal = user_ops.get_user_with_id(userid=identity["id"], session=session) - - if email and email != userVal.email: - if not is_valid_email(email): - return jsonify( - {"status": "error", "message": "Please provide a valid email address."} - ), 400 - if user_ops.get_user_with_email(email, session): - return jsonify( - {"status": "error", "message": "That email address is already in use."} - ), 400 - userVal.email = email - userVal.verified = False - - organization = userVal.organization - if organization: - if provider_id: - organization.provider_id = provider_id - if brand_name: - organization.brand_name = str(brand_name) - if org_name: - organization.name = str(org_name) - session.commit() - return jsonify({"status": "success", "message": "User profile updated successfully."}), 200 - except NoAuthorizationError: - return jsonify({"status": "error", "message": "Please login to your account"}), 401 - except Exception: - # Log the detail server-side; never echo internals to the client. - logger.exception("update_profile failed") - session.rollback() - return jsonify({"status": "error", "message": "Failed to update profile."}), 500 diff --git a/back-end/tests/conftest_helpers.py b/back-end/tests/conftest_helpers.py index 9544f43..81d1a4f 100644 --- a/back-end/tests/conftest_helpers.py +++ b/back-end/tests/conftest_helpers.py @@ -207,6 +207,6 @@ def login_page_session(client, email, password="Password123!"): gets one: register through the real endpoint (which sets the cookie). Used by the server-rendered app-page tests; any page test should authenticate through this rather than minting tokens by hand.""" - resp = client.post("/api/register", json={"email": email, "password": password}) - assert resp.status_code == 200, resp.get_json() + resp = client.post("/auth/register", data={"email": email, "password": password}) + assert resp.status_code == 302, resp.get_data(as_text=True) return resp diff --git a/back-end/tests/test_admin_api.py b/back-end/tests/test_admin_api.py index d622b92..3ec26b8 100644 --- a/back-end/tests/test_admin_api.py +++ b/back-end/tests/test_admin_api.py @@ -105,10 +105,22 @@ def test_impersonate_sets_app_token_keeps_admin_session(client): # admin_session must NOT be cleared/overwritten by impersonation. assert "admin_session=" not in set_cookie - # The SPA now reports the impersonator (the operator's email) via /api/user. - me = client.get("/api/user") - assert me.status_code == 200, me.get_json() - assert me.get_json()["userinfo"]["impersonator"] == "operator@example.com" + # The minted app token is tagged with the operator, and it works as a + # real app session (the org page renders for the impersonated user). + import jwt as pyjwt + + from utils.flask_app import app as flask_app + + token = _token_from_set_cookie(resp) + claims = pyjwt.decode( + token, + flask_app.config["JWT_SECRET_KEY"], + algorithms=["HS256"], + options={"verify_sub": False, "verify_aud": False}, + ) + assert claims["sub"]["id"] == target + assert claims["sub"]["impersonator"] == op_id + assert client.get("/org").status_code == 200 assert len(_audit("impersonate_start")) == 1 @@ -183,8 +195,8 @@ def test_reset_password_temp_returns_working_password(client): assert temp # The temp password actually logs the user in. - login = client.post("/api/login", json={"email": "needsreset@example.com", "password": temp}) - assert login.get_json()["status"] == "success" + login = client.post("/auth/login", data={"email": "needsreset@example.com", "password": temp}) + assert login.status_code == 302 # The plaintext must never be written to the audit trail. rows = _audit("password_reset_temp") @@ -231,9 +243,10 @@ def test_toggle_verified_and_disabled(client): # Disabled now blocks login. login = client.post( - "/api/login", json={"email": "flags@example.com", "password": "Password123!"} + "/auth/login", data={"email": "flags@example.com", "password": "Password123!"} ) - assert login.status_code == 403 + assert login.status_code == 200 + assert "disabled" in login.get_data(as_text=True).lower() def test_cannot_revoke_own_platform_admin(client): diff --git a/back-end/tests/test_admin_ui.py b/back-end/tests/test_admin_ui.py index aaa998b..0b5b3d3 100644 --- a/back-end/tests/test_admin_ui.py +++ b/back-end/tests/test_admin_ui.py @@ -179,7 +179,7 @@ def test_settings_theme_roundtrip_applies_to_app_pages(client): assert b"Saved." in resp.data # Every provider-facing page now renders with the chosen theme class. - client.post("/api/register", json={"email": "themed@example.com", "password": "Password123!"}) + client.post("/auth/register", data={"email": "themed@example.com", "password": "Password123!"}) page = client.get("/org") assert page.status_code == 200 assert b"theme-civic-vt" in page.data diff --git a/back-end/tests/test_api_fabric.py b/back-end/tests/test_api_fabric.py deleted file mode 100644 index ee4963f..0000000 --- a/back-end/tests/test_api_fabric.py +++ /dev/null @@ -1,141 +0,0 @@ -"""Contract tests for the fabric v2 endpoints (routes/fabric.py). - -POST /api/fabric/ — upload a CostQuest delivery (zip or CSV) -GET /api/fabric/ — the fabric card: files + vintage + stats -GET /api/address-search/ — fabric-powered autocomplete - -Response shapes follow the app convention: {"status": "error", "message": ...} -on expected failures, with the vintage hard-warning as a 409 the client can -override (form field override=true). -""" - -import io -import zipfile -from datetime import date - -import pytest - -from tests import conftest_helpers as H -from tests.conftest_helpers import make_active_fabric_csv, make_supplemental_csv - -ACTIVE_ROWS = [ - (1001, "1 MAIN ST", "TRUE", 37.28, -79.95, "51161", "VA"), - (1002, "2 ELM AVE", "TRUE", 37.50, -79.95, "51161", "VA"), -] -SUPP_ROWS = [(1001, "S", "ONE MAIN STREET REAR UNIT")] - - -@pytest.fixture() -def client(db_session): - import routes # noqa: F401 (decorators attach routes to utils.flask_app.app) - from utils.flask_app import app - - app.config["TESTING"] = True - with H.CsrfFlaskClient(app) as c: - yield c - - -@pytest.fixture() -def filing(client, db_session, monkeypatch): - """A registered+verified user in an org with an open December-2025 filing - (expects fabric v8), logged in on the client. Tile rebuilds stubbed.""" - from controllers.celery_controller import celery_tasks as ct - from database.models import user as user_model - - monkeypatch.setattr(ct, "_coalesced_tile_rebuild", lambda *a, **k: "stubbed") - - s = db_session - resp = client.post( - "/api/register", json={"email": "fab@example.com", "password": "Password123!"} - ) - assert resp.status_code == 200 - org = H.make_org(s) - u = s.query(user_model).filter_by(email="fab@example.com").one() - u.verified = True - u.organization_id = org.id - folder = H.make_folder(s, org.id, deadline=date(2026, 3, 2)) - s.commit() - return folder - - -def _zip_v8(): - buf = io.BytesIO() - with zipfile.ZipFile(buf, "w") as zf: - zf.writestr("FCC_Active_BSL_12312025_rel_8.csv", make_active_fabric_csv(ACTIVE_ROWS)) - zf.writestr("FCC_Supplemental_12312025_rel_8.csv", make_supplemental_csv(SUPP_ROWS)) - return buf.getvalue() - - -def test_fabric_endpoints_require_auth(client, db_session): - assert client.get("/api/fabric/1").status_code == 401 - assert client.post("/api/fabric/1").status_code == 401 - assert client.get("/api/address-search/1?query=main").status_code == 401 - - -def test_intake_then_status_and_search(client, filing): - resp = client.post( - f"/api/fabric/{filing.id}", - data={"file": (io.BytesIO(_zip_v8()), "H5PKFG71-OPAQUE.zip")}, - content_type="multipart/form-data", - ) - body = resp.get_json() - assert resp.status_code == 200, body - assert body["status"] == "success" - assert body["task_id"] - assert sorted(body["roles"]) == ["active", "supplemental"] - assert body["vintage"]["matches"] is True - - resp = client.get(f"/api/fabric/{filing.id}") - body = resp.get_json() - assert resp.status_code == 200 - assert {f["role"] for f in body["files"]} == {"active", "supplemental"} - assert body["stats"]["locations"] == 2 - assert body["stats"]["supplemental_addresses"] == 1 - - resp = client.get(f"/api/address-search/{filing.id}?query=main") - body = resp.get_json() - assert resp.status_code == 200 - addresses = {r["address"] for r in body["results"]} - assert "1 MAIN ST" in addresses - assert all("served" in r and "bsl" in r for r in body["results"]) - - -def test_intake_vintage_mismatch_409_then_override(client, filing): - v6 = make_active_fabric_csv(ACTIVE_ROWS) - resp = client.post( - f"/api/fabric/{filing.id}", - data={"file": (io.BytesIO(v6), "FCC_Active_BSL_12312024_rel_6.csv")}, - content_type="multipart/form-data", - ) - assert resp.status_code == 409 - assert "version 8" in resp.get_json()["message"] - - resp = client.post( - f"/api/fabric/{filing.id}", - data={"file": (io.BytesIO(v6), "FCC_Active_BSL_12312024_rel_6.csv"), "override": "true"}, - content_type="multipart/form-data", - ) - assert resp.status_code == 200 - assert resp.get_json()["vintage"]["matches"] is False - - -def test_intake_requires_a_file_and_org_membership(client, filing, db_session): - resp = client.post(f"/api/fabric/{filing.id}", data={}, content_type="multipart/form-data") - assert resp.status_code == 400 - - s = db_session - other_org = H.make_org(s, name="OtherOrg", provider_id=999) - other_folder = H.make_folder(s, other_org.id, deadline=date(2026, 3, 2)) - resp = client.post( - f"/api/fabric/{other_folder.id}", - data={"file": (io.BytesIO(b"x"), "FCC_Active_BSL_12312025_rel_8.csv")}, - content_type="multipart/form-data", - ) - assert resp.status_code == 400 - assert resp.get_json()["status"] == "error" - - -def test_address_search_empty_without_fabric(client, filing): - resp = client.get(f"/api/address-search/{filing.id}?query=main") - assert resp.status_code == 200 - assert resp.get_json()["results"] == [] diff --git a/back-end/tests/test_api_smoke.py b/back-end/tests/test_api_smoke.py deleted file mode 100644 index b866775..0000000 --- a/back-end/tests/test_api_smoke.py +++ /dev/null @@ -1,228 +0,0 @@ -"""Layer 3 — API / auth smoke tests through the real HTTP routes. - -Importing utils.flask_app calls create_app()/init_db(), which needs the DB up, -so the whole module skips if Postgres is unreachable. We exercise register / -login / logout / org creation / filing creation / listing through the actual -Flask routes, plus an authz check (cannot touch another org's filing). -""" - -import io -import json - -import pytest - -from tests import conftest_helpers as H -from tests.conftest import _db_reachable - -pytestmark = pytest.mark.skipif( - not _db_reachable(), reason="integration Postgres not reachable on localhost:5433" -) - - -@pytest.fixture() -def client(db_session): - """Flask test client against the truncated test DB. db_session is requested - so tables exist and are cleaned between tests. Importing routes registers - all endpoints onto the app.""" - import routes # noqa: F401 (decorators attach routes to utils.flask_app.app) - from utils.flask_app import app - - app.config["TESTING"] = True - # JWT_VERIFY_SUB=False is now set in the app Config (the dict-identity fix for - # flask-jwt-extended 4.7), so these tests exercise the real production config. - with H.CsrfFlaskClient(app) as c: - yield c - - -def _register(client, email, password="Password123!"): - return client.post("/api/register", json={"email": email, "password": password}) - - -def _verify_user(email): - """Flip the verified flag directly (email verification is out of band).""" - from database.models import user - from database.sessions import Session - - s = Session() - try: - u = s.query(user).filter(user.email == email).one() - u.verified = True - s.commit() - return u.id - finally: - s.close() - - -def test_register_sets_cookie_and_returns_200(client): - resp = _register(client, "alice@example.com") - assert resp.status_code == 200 - assert resp.get_json()["status"] == "success" - # Register issues an access cookie immediately. - assert "token" in resp.headers.get("Set-Cookie", "") - - -def test_protected_endpoint_requires_auth(client): - """No cookie -> 401 from a @jwt_required endpoint.""" - resp = client.get("/api/user") - assert resp.status_code == 401 - - -def test_login_then_protected_endpoint_ok(client): - _register(client, "bob@example.com") - # New client cookie jar already holds the register token, but test login too. - login = client.post("/api/login", json={"email": "bob@example.com", "password": "Password123!"}) - assert login.status_code == 200 - assert login.get_json()["status"] == "success" - - resp = client.get("/api/user") - assert resp.status_code == 200 - body = resp.get_json() - assert body["status"] == "success" - assert body["userinfo"]["email"] == "bob@example.com" - - -def test_login_bad_credentials(client): - _register(client, "carol@example.com") - login = client.post("/api/login", json={"email": "carol@example.com", "password": "wrong"}) - # Route returns 200 with an error status payload for bad creds. - assert login.get_json()["status"] == "error" - - -def test_logout_clears_cookie(client): - _register(client, "dave@example.com") - resp = client.post("/api/logout") - assert resp.status_code == 200 - assert resp.get_json()["status"] == "success" - - -def test_create_organization(client): - _register(client, "erin@example.com") - _verify_user("erin@example.com") - resp = client.post("/api/create_organization", json={"orgName": "Erin ISP"}) - assert resp.status_code == 200, resp.get_json() - assert resp.get_json()["status"] == "success" - - -def test_create_organization_requires_verified(client): - _register(client, "frank@example.com") # not verified - resp = client.post("/api/create_organization", json={"orgName": "Frank ISP"}) - assert resp.status_code == 400 - assert "verify" in resp.get_json()["message"].lower() - - -@pytest.fixture() -def no_tiles(monkeypatch): - """Tile generation (tippecanoe) is an external binary covered by Layer 5; - stub it out so the eager submit-data celery chain completes for the API - smoke tests.""" - import controllers.celery_controller.celery_tasks as ct - import controllers.database_controller.vt_ops as vt - - monkeypatch.setattr(vt, "create_tiles", lambda *a, **k: None) - monkeypatch.setattr(ct.vt_ops, "create_tiles", lambda *a, **k: None) - - -def _create_filing(client, deadline="2024-05-14"): - """Drive the real multipart submit-data route (operation 2: new filing from - scratch) with a tiny fabric CSV. Celery runs eagerly (autouse fixture).""" - # Note: in fabric_data_temp, unit_count and land_use_code are INTEGER, so - # they must not be empty strings (Postgres COPY rejects "" for int). - csv = ( - '"location_id","address_primary","city","state","zip","zip_suffix",' - '"unit_count","bsl_flag","building_type_code","land_use_code",' - '"address_confidence_code","county_geoid","block_geoid","h3_9",' - '"latitude","longitude","fcc_rel"\n' - '1,"1 Main St","Roanoke","VA","24011","1234","1",True,"R","1100",' - '"HIGH","51770","510770001001000","8928308280fffff",37.27,-79.94,"rel"\n' - ) - file_data = { - "name": "fabric.csv", - } - data = { - "fileData": json.dumps(file_data), - "importFolder": "-1", - "deadline": deadline, - "file": (io.BytesIO(csv.encode("utf-8")), "fabric.csv"), - } - return client.post("/api/submit-data/-1", data=data, content_type="multipart/form-data") - - -def test_create_and_list_filing(client, no_tiles): - _register(client, "grace@example.com") - _verify_user("grace@example.com") - org = client.post("/api/create_organization", json={"orgName": "Grace ISP"}) - assert org.status_code == 200 - - created = _create_filing(client) - assert created.status_code == 200, created.get_json() - assert created.get_json()["status"] == "success" - - listing = client.get("/api/folders-with-deadlines") - assert listing.status_code == 200 - folders = listing.get_json() - assert isinstance(folders, list) - assert len(folders) == 1 - assert folders[0]["deadline"] == "2024-05-14" - - -def test_cannot_access_other_orgs_filing(client, no_tiles): - """Authz: a user in org B cannot read served-data for org A's folder.""" - from database.models import folder, user - from database.sessions import Session - - # User A creates an org + a filing. - _register(client, "heidi@example.com") - _verify_user("heidi@example.com") - client.post("/api/create_organization", json={"orgName": "Heidi ISP"}) - assert _create_filing(client).status_code == 200 - - s = Session() - try: - a_user = s.query(user).filter(user.email == "heidi@example.com").one() - a_folder = s.query(folder).filter(folder.organization_id == a_user.organization_id).one() - a_folder_id = a_folder.id - finally: - s.close() - - # Fresh client = User B, different org. - from utils.flask_app import app - - with app.test_client() as c2: - c2.post("/api/register", json={"email": "ivan@example.com", "password": "Password123!"}) - _verify_user("ivan@example.com") - c2.post("/api/create_organization", json={"orgName": "Ivan ISP"}) - - resp = c2.get(f"/api/served-data/{a_folder_id}") - # Route returns 400 with an "not belong to your organization" message, - # in the unified {status:error, message} shape. - assert resp.status_code in (400, 403), resp.get_json() - body = resp.get_json() - assert body["status"] == "error" - assert "organization" in body["message"].lower() - - -def test_unhandled_exception_returns_json_500(client, monkeypatch): - """An unexpected error returns a clean JSON 500 in the unified shape, not an - HTML stack trace (the global error handler).""" - from utils.flask_app import app - - # TESTING=True makes Flask re-raise instead of invoking error handlers; turn - # that off so we exercise the real handler the way production does. - monkeypatch.setitem(app.config, "PROPAGATE_EXCEPTIONS", False) - - _register(client, "judy@example.com") - _verify_user("judy@example.com") - - import controllers.database_controller.folder_ops as fo - - def boom(*a, **k): - raise RuntimeError("kaboom") - - monkeypatch.setattr(fo, "folder_belongs_to_organization", boom) - - resp = client.get("/api/served-data/5") - assert resp.status_code == 500 - body = resp.get_json() # None if the body wasn't JSON (e.g. an HTML page) - assert body is not None, "500 body was not JSON" - assert body["status"] == "error" - assert "message" in body diff --git a/back-end/tests/test_audit.py b/back-end/tests/test_audit.py index ca96348..a07ff0e 100644 --- a/back-end/tests/test_audit.py +++ b/back-end/tests/test_audit.py @@ -2,13 +2,11 @@ Unit-tests log_action (writes a row in its own session; never raises) and checks that the key lifecycle actions append the right audit rows through the -real routes: login (success/failed), logout, org create/delete, upload. -Impersonation / password-reset / role-change audits are exercised with the admin API tests. +real routes: login (success/failed), logout, org create. Admin-side actions +(impersonation, password resets, role changes, org delete) are exercised with +the admin API tests. """ -import io -import json - import pytest from tests import conftest_helpers as H @@ -89,7 +87,9 @@ def client(db_session): def _register(client, email, password="Password123!"): - return client.post("/api/register", json={"email": email, "password": password}) + resp = client.post("/auth/register", data={"email": email, "password": password}) + assert resp.status_code == 302, resp.get_data(as_text=True) + return resp def _verify(email): @@ -108,9 +108,9 @@ def _verify(email): def test_login_logout_audited(client): _register(client, "log@example.com") - client.post("/api/login", json={"email": "log@example.com", "password": "Password123!"}) - client.post("/api/login", json={"email": "log@example.com", "password": "WRONG"}) - client.post("/api/logout") + client.post("/auth/login", data={"email": "log@example.com", "password": "Password123!"}) + client.post("/auth/login", data={"email": "log@example.com", "password": "WRONG"}) + client.post("/auth/logout") assert len(_rows("login")) == 1 assert len(_rows("login_failed")) == 1 @@ -119,45 +119,9 @@ def test_login_logout_audited(client): assert _rows("login_failed")[0].details.get("email") == "log@example.com" -def test_org_create_and_delete_audited(client): +def test_org_create_audited(client): _register(client, "orgadmin@example.com") _verify("orgadmin@example.com") - client.post("/api/create_organization", json={"orgName": "Audit ISP"}) + client.post("/org/create", data={"name": "Audit ISP"}) assert len(_rows("org_create")) == 1 assert _rows("org_create")[0].details.get("name") == "Audit ISP" - - client.delete("/api/delete_organization", json={"organizationName": "Audit ISP"}) - assert len(_rows("org_delete")) == 1 - - -@pytest.fixture() -def no_tiles(monkeypatch): - import controllers.celery_controller.celery_tasks as ct - import controllers.database_controller.vt_ops as vt - - monkeypatch.setattr(vt, "create_tiles", lambda *a, **k: None) - monkeypatch.setattr(ct.vt_ops, "create_tiles", lambda *a, **k: None) - - -def test_upload_audited(client, no_tiles): - _register(client, "uploader@example.com") - _verify("uploader@example.com") - client.post("/api/create_organization", json={"orgName": "Upload ISP"}) - - csv = ( - '"location_id","address_primary","city","state","zip","zip_suffix",' - '"unit_count","bsl_flag","building_type_code","land_use_code",' - '"address_confidence_code","county_geoid","block_geoid","h3_9",' - '"latitude","longitude","fcc_rel"\n' - '1,"1 Main St","Roanoke","VA","24011","1234","1",True,"R","1100",' - '"HIGH","51770","510770001001000","8928308280fffff",37.27,-79.94,"rel"\n' - ) - data = { - "fileData": json.dumps({"name": "fabric.csv"}), - "importFolder": "-1", - "deadline": "2024-05-14", - "file": (io.BytesIO(csv.encode("utf-8")), "fabric.csv"), - } - resp = client.post("/api/submit-data/-1", data=data, content_type="multipart/form-data") - assert resp.status_code == 200, resp.get_json() - assert len(_rows("upload")) == 1 diff --git a/back-end/tests/test_authz.py b/back-end/tests/test_authz.py index 8b5fceb..08d6c36 100644 --- a/back-end/tests/test_authz.py +++ b/back-end/tests/test_authz.py @@ -1,13 +1,8 @@ -"""Authorization enforcement on existing app routes. +"""Authorization enforcement on the auth routes. -Two concrete gaps closed: - * a `disabled` user must not be able to log in; - * `delete_organization` must require an org admin (today any *member* of an - org can delete the whole org — it only checks the org name matches). - -Org-scoped read/write routes (filings/files/edit/export) are intentionally left -open to any org member — that's the current product behavior and gating them -would break non-admin members. +A `disabled` user must not be able to log in — even with the correct +password, no fresh session is issued. (Org deletion is admin-panel-only now; +its guard is exercised by the admin API tests.) """ import pytest @@ -31,7 +26,9 @@ def client(db_session): def _register(client, email, password="Password123!"): - return client.post("/api/register", json={"email": email, "password": password}) + resp = client.post("/auth/register", data={"email": email, "password": password}) + assert resp.status_code == 302, resp.get_data(as_text=True) + return resp def _set_flags(email, **flags): @@ -49,67 +46,26 @@ def _set_flags(email, **flags): s.close() -# --- disabled blocks login -------------------------------------------------- - - def test_disabled_user_cannot_login(client): _register(client, "disabled@example.com") _set_flags("disabled@example.com", disabled=True) + client.post("/auth/logout") resp = client.post( - "/api/login", json={"email": "disabled@example.com", "password": "Password123!"} + "/auth/login", data={"email": "disabled@example.com", "password": "Password123!"} ) - body = resp.get_json() - assert body["status"] == "error" - # Correct password but disabled -> not authenticated, no fresh token issued. - assert ( - "token=" not in resp.headers.get("Set-Cookie", "") or "disabled" in body["message"].lower() + # Correct password but disabled -> the page re-renders, no fresh token. + assert resp.status_code == 200 + assert "disabled" in resp.get_data(as_text=True).lower() + assert not any( + c.startswith("token=") and "token=;" not in c for c in resp.headers.getlist("Set-Cookie") ) def test_enabled_user_can_still_login(client): _register(client, "enabled@example.com") + client.post("/auth/logout") resp = client.post( - "/api/login", json={"email": "enabled@example.com", "password": "Password123!"} + "/auth/login", data={"email": "enabled@example.com", "password": "Password123!"} ) - assert resp.get_json()["status"] == "success" - - -# --- delete_organization requires org admin --------------------------------- - - -def test_non_admin_member_cannot_delete_org(client): - # Admin creates the org. - _register(client, "owner@example.com") - _set_flags("owner@example.com", verified=True) - assert client.post("/api/create_organization", json={"orgName": "Acme ISP"}).status_code == 200 - - # A second user is a *member* of the same org but not an admin. - from database.models import user - from database.sessions import Session - - s = Session() - try: - org_id = s.query(user).filter(user.email == "owner@example.com").one().organization_id - finally: - s.close() - - from utils.flask_app import app - - with H.CsrfFlaskClient(app) as member: - member.post( - "/api/register", json={"email": "member@example.com", "password": "Password123!"} - ) - _set_flags("member@example.com", verified=True, organization_id=org_id, is_admin=False) - resp = member.delete("/api/delete_organization", json={"organizationName": "Acme ISP"}) - assert resp.status_code == 403, resp.get_json() - assert resp.get_json()["status"] == "error" - - -def test_org_admin_can_delete_own_org(client): - _register(client, "boss@example.com") - _set_flags("boss@example.com", verified=True) - assert client.post("/api/create_organization", json={"orgName": "Boss ISP"}).status_code == 200 - # The creator is an org admin -> passes the guard (async delete runs eagerly). - resp = client.delete("/api/delete_organization", json={"organizationName": "Boss ISP"}) - assert resp.status_code == 200, resp.get_json() - assert resp.get_json()["status"] == "success" + assert resp.status_code == 302 + assert any(c.startswith("token=") for c in resp.headers.getlist("Set-Cookie")) diff --git a/back-end/tests/test_email_tokens.py b/back-end/tests/test_email_tokens.py index 181db63..a1b3987 100644 --- a/back-end/tests/test_email_tokens.py +++ b/back-end/tests/test_email_tokens.py @@ -1,7 +1,10 @@ -"""Regression: email/reset tokens use a dict `sub`, which PyJWT >= 2.10 rejects -by default ("sub must be a string"). The reset_password / verify_token routes -must decode with verify_sub=False, otherwise every password reset and email -verification silently fails with "Invalid token". +"""Email token behavior through the server-rendered auth flows. + +Regression: email/reset tokens use a dict `sub`, which PyJWT >= 2.10 rejects +by default ("sub must be a string") — the consuming routes must decode with +verify_sub=False or every password reset and email verification silently +fails. Also pins the 60-minute token lifetime and one-time use (a consumed +or pre-jti token can never reset a password again). """ import pytest @@ -24,53 +27,55 @@ def client(db_session): def _register(client, email, password="Password123!"): - return client.post("/api/register", json={"email": email, "password": password}) + resp = client.post("/auth/register", data={"email": email, "password": password}) + assert resp.status_code == 302, resp.get_data(as_text=True) + return resp -def test_reset_password_round_trip(client): - _register(client, "reset@example.com") +def _user_id(email): from database.models import user from database.sessions import Session - from routes._email import create_email_token s = Session() try: - uid = s.query(user).filter(user.email == "reset@example.com").one().id + return s.query(user).filter(user.email == email).one().id finally: s.close() + +def _login_status(client, email, password): + """302 = credentials accepted; 200 = the login page re-rendered an error.""" + return client.post("/auth/login", data={"email": email, "password": password}).status_code + + +def test_reset_password_round_trip(client): + from routes._email import create_email_token + + _register(client, "reset@example.com") + uid = _user_id("reset@example.com") + token = create_email_token(userid=uid, email="reset@example.com", operation="reset_password") - resp = client.post( - "/api/reset_password", json={"token": token, "newPassword": "BrandNewPass1!"} - ) - assert resp.status_code == 200, resp.get_json() - assert resp.get_json()["status"] == "success" + resp = client.post(f"/auth/reset/{token}", data={"password": "BrandNewPass1!"}) + assert resp.status_code == 302 + assert resp.headers["Location"] == "/auth/login" # The new password actually works. - login = client.post( - "/api/login", json={"email": "reset@example.com", "password": "BrandNewPass1!"} - ) - assert login.get_json()["status"] == "success" + assert _login_status(client, "reset@example.com", "BrandNewPass1!") == 302 def test_verify_email_token(client): - _register(client, "verifyme@example.com") from database.models import user from database.sessions import Session from routes._email import create_email_token - s = Session() - try: - uid = s.query(user).filter(user.email == "verifyme@example.com").one().id - finally: - s.close() + _register(client, "verifyme@example.com") + uid = _user_id("verifyme@example.com") token = create_email_token( userid=uid, email="verifyme@example.com", operation="email_address_verification" ) - resp = client.post("/api/verify_token", json={"token": token}) - assert resp.status_code == 200, resp.get_json() - assert resp.get_json()["status"] == "success" + html = client.get(f"/auth/verify/{token}").get_data(as_text=True) + assert "not valid" not in html s = Session() try: @@ -101,50 +106,6 @@ def test_email_token_lifetime_is_an_hour(client): assert 59 * 60 < lifetime <= 60 * 60 -def _user_id(email): - from database.models import user - from database.sessions import Session - - s = Session() - try: - return s.query(user).filter(user.email == email).one().id - finally: - s.close() - - -def test_reset_token_is_single_use(client): - from routes._email import create_email_token - - _register(client, "once@example.com") - uid = _user_id("once@example.com") - token = create_email_token(userid=uid, email="once@example.com", operation="reset_password") - - first = client.post("/api/reset_password", json={"token": token, "newPassword": "FirstNew1!"}) - assert first.status_code == 200 - - replay = client.post( - "/api/reset_password", json={"token": token, "newPassword": "AttackerPick1!"} - ) - assert replay.status_code == 400 - - # The replay changed nothing: the first new password still logs in. - login = client.post("/api/login", json={"email": "once@example.com", "password": "FirstNew1!"}) - assert login.get_json()["status"] == "success" - - -def test_verify_token_is_single_use(client): - from routes._email import create_email_token - - _register(client, "onceverify@example.com") - uid = _user_id("onceverify@example.com") - token = create_email_token( - userid=uid, email="onceverify@example.com", operation="email_address_verification" - ) - - assert client.post("/api/verify_token", json={"token": token}).status_code == 200 - assert client.post("/api/verify_token", json={"token": token}).status_code == 400 - - def test_reset_page_token_is_single_use(client): from routes._email import create_email_token @@ -159,10 +120,9 @@ def test_reset_page_token_is_single_use(client): assert replay.status_code == 200 assert "already been used" in replay.get_data(as_text=True) - login = client.post( - "/api/login", json={"email": "oncepage@example.com", "password": "FirstNew1!"} - ) - assert login.get_json()["status"] == "success" + # The replay changed nothing: the first new password still logs in. + assert _login_status(client, "oncepage@example.com", "FirstNew1!") == 302 + assert _login_status(client, "oncepage@example.com", "AttackerPick1!") == 200 def test_verify_link_replay_reads_as_verified(client): @@ -184,7 +144,7 @@ def test_verify_link_replay_reads_as_verified(client): def test_token_without_jti_rejected(client): """Tokens minted before one-time-use stamping carry no jti; they can't be - tracked, so they are refused rather than replayable forever.""" + tracked, so the reset form refuses them rather than allow forever-replay.""" from datetime import UTC, datetime, timedelta import jwt as pyjwt @@ -208,5 +168,6 @@ def test_token_without_jti_rejected(client): app.config["JWT_SECRET_KEY"], algorithm="HS256", ) - resp = client.post("/api/reset_password", json={"token": token, "newPassword": "Sneaky1!"}) - assert resp.status_code == 400 + resp = client.post(f"/auth/reset/{token}", data={"password": "Sneaky1!"}) + assert resp.status_code == 200 # the error page, not the login redirect + assert _login_status(client, "nojti@example.com", "Sneaky1!") == 200 # unchanged diff --git a/back-end/tests/test_export_api.py b/back-end/tests/test_export_api.py deleted file mode 100644 index de7f09d..0000000 --- a/back-end/tests/test_export_api.py +++ /dev/null @@ -1,146 +0,0 @@ -"""Contract tests for the export routes the submissions page builds on. - -The export_service is well covered, but the routes were not — -the CSV response itself, the snapshot list, the snapshot download (which must -be byte-stable: it serves stored bytes, never a rebuild), and snapshot delete. -""" - -import pytest - -from tests import conftest_helpers as H -from tests.conftest import _db_reachable -from tests.conftest_helpers import login_page_session, make_active_fabric_csv - -pytestmark = pytest.mark.skipif( - not _db_reachable(), reason="integration Postgres not reachable on localhost:5433" -) - -FABRIC_ROWS = [ - (1001, "1 MAIN ST", "TRUE", 37.28, -79.95, "51161", "VA"), - (1002, "2 ELM AVE", "TRUE", 37.50, -79.95, "51161", "VA"), -] - -POLYGON_GEOJSON = b"""{"type":"FeatureCollection","features":[{"type":"Feature","properties":{}, -"geometry":{"type":"Polygon","coordinates":[[[-80.01,37.27],[-79.90,37.27],[-79.90,37.31], -[-80.01,37.31],[-80.01,37.27]]]}}]}""" - - -@pytest.fixture() -def client(db_session): - import routes # noqa: F401 - from utils.flask_app import app - - app.config["TESTING"] = True - with H.CsrfFlaskClient(app) as c: - yield c - - -def _get_user(session, email): - from database.models import user as user_model - - return session.query(user_model).filter(user_model.email == email).one() - - -def _login_with_computed_filing(client, db_session, email): - login_page_session(client, email=email) - org = H.make_org(db_session, name=f"org-{email}") - u = _get_user(db_session, email) - u.organization_id = org.id - u.verified = True - db_session.commit() - folder = H.make_folder(db_session, org.id) - H.seed_fabric(db_session, folder.id, make_active_fabric_csv(FABRIC_ROWS)) - cov = H.seed_coverage( - db_session, - folder.id, - POLYGON_GEOJSON, - filename="sector.geojson", - filetype="wireless", - techType=70, - ) - H.compute_coverage(db_session, folder.id, cov) - return org, folder - - -def test_export_filing_returns_attached_csv(client, db_session): - org, folder = _login_with_computed_filing(client, db_session, "exp1@example.com") - resp = client.get(f"/api/exportFiling/{folder.id}") - assert resp.status_code == 200, resp.get_data(as_text=True) - assert "attachment" in resp.headers.get("Content-Disposition", "") - body = resp.get_data(as_text=True) - assert "location_id" in body and "1001" in body - - -def test_export_filing_requires_provider_and_brand(client, db_session): - org, folder = _login_with_computed_filing(client, db_session, "exp2@example.com") - org.provider_id = None - db_session.commit() - resp = client.get(f"/api/exportFiling/{folder.id}") - assert resp.status_code == 400 - assert "provider" in resp.get_json()["message"].lower() - - -def test_export_list_is_org_scoped(client, db_session): - org, folder = _login_with_computed_filing(client, db_session, "exp3@example.com") - client.get(f"/api/exportFiling/{folder.id}") # creates a snapshot (eager) - - rows = client.get("/api/export").get_json() - assert len(rows) == 1 - assert rows[0]["type"] == "export" - - # A second user in another org sees none of it. - import routes # noqa: F401 - from utils.flask_app import app - - with H.CsrfFlaskClient(app) as other: - login_page_session(other, email="exp3-other@example.com") - other_org = H.make_org(db_session, name="exp3-other-org") - u = _get_user(db_session, "exp3-other@example.com") - u.organization_id = other_org.id - db_session.commit() - assert other.get("/api/export").get_json() == [] - - -def test_download_export_is_byte_stable(client, db_session): - org, folder = _login_with_computed_filing(client, db_session, "exp4@example.com") - csv_now = client.get(f"/api/exportFiling/{folder.id}").data - rows = client.get("/api/export").get_json() - fid = rows[0]["id"] - - first = client.get(f"/api/downloadexport/{fid}") - assert first.status_code == 200 - assert first.data == csv_now - assert client.get(f"/api/downloadexport/{fid}").data == first.data - - -def test_download_export_ownership_and_404(client, db_session): - org, folder = _login_with_computed_filing(client, db_session, "exp5@example.com") - client.get(f"/api/exportFiling/{folder.id}") - fid = client.get("/api/export").get_json()[0]["id"] - - import routes # noqa: F401 - from utils.flask_app import app - - with H.CsrfFlaskClient(app) as other: - login_page_session(other, email="exp5-other@example.com") - other_org = H.make_org(db_session, name="exp5-other-org") - u = _get_user(db_session, "exp5-other@example.com") - u.organization_id = other_org.id - db_session.commit() - assert other.get(f"/api/downloadexport/{fid}").status_code == 400 - - -def test_delete_export_removes_the_snapshot(client, db_session): - from database.models import folder as folder_model - - org, folder = _login_with_computed_filing(client, db_session, "exp6@example.com") - client.get(f"/api/exportFiling/{folder.id}") - row = client.get("/api/export").get_json()[0] - - resp = client.delete(f"/api/delexport/{row['id']}") - assert resp.status_code == 200 - db_session.expire_all() - assert ( - db_session.query(folder_model).filter(folder_model.id == row["folder_id"]).first() is None - ) - assert client.get("/api/export").get_json() == [] diff --git a/back-end/tests/test_files_api.py b/back-end/tests/test_files_api.py index f9c27f0..b8d189e 100644 --- a/back-end/tests/test_files_api.py +++ b/back-end/tests/test_files_api.py @@ -1,19 +1,9 @@ -"""Contract tests for routes/files.py — the files & plans page's backend. - -The whole blueprint previously had zero tests. These pin, before the page is -built on top of them: - - GET /api/files & /api/editfiles (listing, non-int 400, org-ownership 400); - - GET /api/networkfiles/ (the coverage-tab table shape: - extension-stripped name + the per-file speed/tech/latency/category); - - POST /api/updateNetworkFile/ (validation, attribute-only changes - update file+kml_data without a recompute, name/type changes dispatch the - op-4 recompute and record an Update task-info row); - - DELETE /api/delfiles (verified/org gates, per-id ownership, the - delete→recompute chain + Delete task-info row); - - GET /api/download-kmlfile/ (byte round-trip, 404). - -The tippecanoe tile rebuild is stubbed (no_tiles); eager celery runs the real -delete/recompute chains inline against seeded fabric + coverage. +"""Contract tests for routes/files.py — DELETE /api/delfiles, the one +files endpoint the server-rendered app still uses (the map page's delete +flow): verified/org gates, per-id ownership, and the delete-then-recompute +chain with its Delete task-info row. The tippecanoe tile rebuild is stubbed +(no_tiles); eager celery runs the real delete/recompute chains inline against +seeded fabric + coverage. """ import pytest @@ -122,152 +112,6 @@ def _other_orgs_folder_and_file(db_session): return folder, cov -# ------------------------------------------------------------ list endpoints - - -def test_files_requires_auth(client): - assert client.get("/api/files?folder_ID=1").status_code == 401 - - -def test_files_non_int_folder_400(client, db_session): - _login(client, db_session, "files1@example.com") - resp = client.get("/api/files?folder_ID=abc") - assert resp.status_code == 400 - assert "integer" in resp.get_json()["message"] - - -def test_files_other_org_400(client, db_session): - _login(client, db_session, "files2@example.com") - folder, _ = _other_orgs_folder_and_file(db_session) - resp = client.get(f"/api/files?folder_ID={folder.id}") - assert resp.status_code == 400 - - -def test_files_lists_folder_files(client, db_session): - org = _login(client, db_session, "files3@example.com") - folder, cov = _seed_filing(db_session, org) - resp = client.get(f"/api/files?folder_ID={folder.id}") - assert resp.status_code == 200 - names = {f["name"] for f in resp.get_json()} - assert "coverage.geojson" in names and "test_fabric.csv" in names - - -def test_editfiles_non_int_folder_400(client, db_session): - _login(client, db_session, "edits1@example.com") - resp = client.get("/api/editfiles?folder_ID=abc") - assert resp.status_code == 400 - - -def test_editfiles_other_org_400_and_own_empty(client, db_session): - org = _login(client, db_session, "edits2@example.com") - their_folder, _ = _other_orgs_folder_and_file(db_session) - assert client.get(f"/api/editfiles?folder_ID={their_folder.id}").status_code == 400 - - mine = H.make_folder(db_session, org.id, name="mine") - resp = client.get(f"/api/editfiles?folder_ID={mine.id}") - assert resp.status_code == 200 - assert resp.get_json() == [] - - -def test_networkfiles_other_org_400(client, db_session): - _login(client, db_session, "net1@example.com") - folder, _ = _other_orgs_folder_and_file(db_session) - assert client.get(f"/api/networkfiles/{folder.id}").status_code == 400 - - -def test_networkfiles_table_shape(client, db_session): - org = _login(client, db_session, "net2@example.com") - folder, cov = _seed_filing(db_session, org) - resp = client.get(f"/api/networkfiles/{folder.id}") - assert resp.status_code == 200 - rows = resp.get_json()["files_data"] - row = next(r for r in rows if r["id"] == cov.id) - assert row["name"] == "coverage" # extension stripped - assert row["type"] == "wireless" - assert row["techType"] == 70 - assert row["maxDownloadSpeed"] == 100 - assert {"maxUploadSpeed", "latency", "category"} <= set(row) - - -# ------------------------------------------------------ updateNetworkFile - - -def _update_payload(name="coverage", ftype="wireless", **over): - payload = { - "name": name, - "type": ftype, - "maxDownloadSpeed": 200, - "maxUploadSpeed": 50, - "techType": 70, - "latency": 1, - "category": "R", - } - payload.update(over) - return payload - - -def test_update_network_file_other_org_400(client, db_session): - _login(client, db_session, "upd1@example.com") - _, their_cov = _other_orgs_folder_and_file(db_session) - resp = client.post(f"/api/updateNetworkFile/{their_cov.id}", json=_update_payload()) - assert resp.status_code == 400 - - -def test_update_network_file_invalid_type_400(client, db_session): - org = _login(client, db_session, "upd2@example.com") - _, cov = _seed_filing(db_session, org) - resp = client.post(f"/api/updateNetworkFile/{cov.id}", json=_update_payload(ftype="satellite")) - assert resp.status_code == 400 - assert "valid type" in resp.get_json()["message"].lower() - - -def test_update_network_file_non_int_speed_400(client, db_session): - org = _login(client, db_session, "upd3@example.com") - _, cov = _seed_filing(db_session, org) - resp = client.post( - f"/api/updateNetworkFile/{cov.id}", json=_update_payload(maxDownloadSpeed="fast") - ) - assert resp.status_code == 400 - - -def test_update_attributes_only_writes_through_without_recompute(client, db_session): - """Speed/latency/category edits stamp the file AND its kml_data rows but - must not dispatch a recompute (no new task-info row).""" - from database.models import celerytaskinfo, kml_data - - org = _login(client, db_session, "upd4@example.com") - folder, cov = _seed_filing(db_session, org) - before = db_session.query(celerytaskinfo).count() - - resp = client.post(f"/api/updateNetworkFile/{cov.id}", json=_update_payload()) - assert resp.status_code == 200, resp.get_json() - - db_session.expire_all() - assert cov.maxDownloadSpeed == 200 - kml_rows = db_session.query(kml_data).filter(kml_data.file_id == cov.id).all() - assert kml_rows and all(r.maxDownloadSpeed == 200 for r in kml_rows) - assert db_session.query(celerytaskinfo).count() == before - - -def test_update_rename_dispatches_recompute(client, db_session, no_tiles): - """A name (or type) change reruns the op-4 recompute and records an - Update task-info row; the kml data survives the round-trip.""" - from database.models import celerytaskinfo, kml_data - - org = _login(client, db_session, "upd5@example.com") - folder, cov = _seed_filing(db_session, org) - - resp = client.post(f"/api/updateNetworkFile/{cov.id}", json=_update_payload(name="renamed")) - assert resp.status_code == 200, resp.get_json() - - db_session.expire_all() - assert cov.name == "renamed.geojson" # original extension kept - info = db_session.query(celerytaskinfo).filter(celerytaskinfo.operation_type == "Update").one() - assert info.organization_id == org.id - # Eager celery already ran the recompute: served rows exist for the file. - assert db_session.query(kml_data).filter(kml_data.file_id == cov.id).count() > 0 - - # ------------------------------------------------------------- delfiles @@ -320,24 +164,3 @@ def test_delfiles_deletes_and_recomputes(client, db_session, no_tiles): assert db_session.query(file_model).filter(file_model.id == cov_id).first() is None info = db_session.query(celerytaskinfo).filter(celerytaskinfo.operation_type == "Delete").one() assert "coverage.geojson" in info.files_changed - - -# ------------------------------------------------------- download-kmlfile - - -def test_download_kmlfile_404_for_unknown_name(client, db_session): - org = _login(client, db_session, "down1@example.com") - H.make_folder(db_session, org.id, name="up") # an upload folder must exist - resp = client.get("/api/download-kmlfile/nope.kml") - assert resp.status_code == 404 - - -def test_download_kmlfile_roundtrips_bytes(client, db_session): - import json - - org = _login(client, db_session, "down2@example.com") - folder, cov = _seed_filing(db_session, org) - resp = client.get(f"/api/download-kmlfile/{cov.name}") - assert resp.status_code == 200 - assert "attachment" in resp.headers.get("Content-Disposition", "") - assert json.loads(resp.data) == COVERAGE_POLYGON diff --git a/back-end/tests/test_jobs.py b/back-end/tests/test_jobs.py index 3fdf7cc..3498076 100644 --- a/back-end/tests/test_jobs.py +++ b/back-end/tests/test_jobs.py @@ -10,9 +10,7 @@ (a mid-chain crash leaves the chain's final task PENDING forever — this is the only thing that ever resolves those); - the SSE stream at /api/jobs/events (shared `token` session, org-scoped, - text/event-stream, pill+tray fragments, nginx buffering disabled); - - the /api/user-tasks contract the frozen SPA still relies on (previously - untested). + text/event-stream, pill+tray fragments, nginx buffering disabled). """ from datetime import datetime, timedelta @@ -361,32 +359,6 @@ def test_app_pages_carry_live_job_pill(client, db_session): assert "Reading 1 network file" in html -# ------------------------------------------------- /api/user-tasks (SPA gate) - - -def test_user_tasks_requires_auth(client): - assert client.get("/api/user-tasks").status_code == 401 - - -def test_user_tasks_splits_and_scopes_by_org(client, db_session): - s = db_session - login_page_session(client, email="spa@example.com") - org = _attach_org(s, "spa@example.com") - other = H.make_org(s, name="other-spa") - make_taskinfo(s, org.id, task_id="t-run", status="PENDING") - make_taskinfo(s, org.id, task_id="t-ok", status="SUCCESS") - make_taskinfo(s, other.id, task_id="t-leak", status="PENDING") - - resp = client.get("/api/user-tasks") - assert resp.status_code == 200 - data = resp.get_json() - assert data["status"] == "success" - in_progress = {t["task_id"] for t in data["in_progress_tasks"]} - finished = {t["task_id"] for t in data["finished_tasks"]} - assert in_progress == {"t-run"} - assert finished == {"t-ok"} - - def test_sweep_uses_tighter_threshold_for_generate_jobs(job_service, db_session): """A generate (Export) job normally finishes in minutes — a stranded one must be swept long before the general 2-hour threshold.""" diff --git a/back-end/tests/test_map_api.py b/back-end/tests/test_map_api.py index 093b070..b01aa0a 100644 --- a/back-end/tests/test_map_api.py +++ b/back-end/tests/test_map_api.py @@ -1,9 +1,7 @@ """Contract tests for the endpoints the studio map (/map) builds on. -Pre-build coverage: the tile-serving route (validation, ownership, gzip/protobuf -headers, the TMS y-flip), regenerate_map, the toggle-markers route (its -service is well covered; the route itself wasn't), the edit-geojson pair, -served-data's success shape, the legacy fabric search, and last-upload-folder. +The tile-serving route (validation, ownership, gzip/protobuf headers, the +TMS y-flip), regenerate_map, and the edit-geojson centroid lookup. """ import gzip @@ -161,45 +159,6 @@ def test_regenerate_map_dispatches_and_records(client, db_session, no_tiles): assert info.organization_id == org.id -# ------------------------------------------------------------- toggle-markers - - -def test_toggle_markers_route_applies_an_edit(client, db_session, no_tiles): - """The route over the well-covered apply_edit service: an exclusion edit - unserves the location and persists an editfile.""" - from database.models import editfile as editfile_model - from database.models import kml_data - - org, folder, cov = _login_with_computed_filing(client, db_session, "togg1@example.com") - marker = [ - [{"id": 1001, "served": True, "editedFile": [cov.name], "coordinate": [37.28, -79.95]}] - ] - resp = client.post( - "/api/toggle-markers", - json={"marker": marker, "folderid": folder.id, "polygonfeatures": [EDIT_POLYGON]}, - ) - assert resp.status_code == 200, resp.get_json() - db_session.expire_all() - assert db_session.query(editfile_model).filter_by(folder_id=folder.id).count() == 1 - served = ( - db_session.query(kml_data) - .filter(kml_data.file_id == cov.id, kml_data.location_id == 1001) - .count() - ) - assert served == 0 # excluded by the edit - - -def test_toggle_markers_other_org_400(client, db_session): - _login_with_computed_filing(client, db_session, "togg2@example.com") - other = H.make_org(db_session, name="togg2-other") - their_folder = H.make_folder(db_session, other.id) - resp = client.post( - "/api/toggle-markers", - json={"marker": [], "folderid": their_folder.id, "polygonfeatures": []}, - ) - assert resp.status_code == 400 - - # ------------------------------------------------------------- edit geojson @@ -216,27 +175,7 @@ def _make_editfile(db_session, folder_id): return ef -def test_get_edit_geojson_roundtrip_and_ownership(client, db_session): - org, folder, _ = _login_with_computed_filing(client, db_session, "ej1@example.com") - ef = _make_editfile(db_session, folder.id) - - resp = client.get(f"/api/get-edit-geojson/{ef.id}") - assert resp.status_code == 200 - assert resp.get_json() == EDIT_POLYGON - - import routes # noqa: F401 - from utils.flask_app import app - - with H.CsrfFlaskClient(app) as other: - login_page_session(other, email="ej1-other@example.com") - other_org = H.make_org(db_session, name="ej1-other-org") - u = _get_user(db_session, "ej1-other@example.com") - u.organization_id = other_org.id - db_session.commit() - assert other.get(f"/api/get-edit-geojson/{ef.id}").status_code == 400 - - -def test_get_edit_geojson_centroid(client, db_session): +def test_get_edit_geojson_centroid_and_ownership(client, db_session): org, folder, _ = _login_with_computed_filing(client, db_session, "ej2@example.com") ef = _make_editfile(db_session, folder.id) resp = client.get(f"/api/get-edit-geojson-centroid/{ef.id}") @@ -245,49 +184,14 @@ def test_get_edit_geojson_centroid(client, db_session): assert abs(data["latitude"] - 37.28) < 0.01 assert abs(data["longitude"] - (-79.95)) < 0.01 + import routes # noqa: F401 + from utils.flask_app import app -# ------------------------------------------------------------- served-data - - -def test_served_data_success_shape(client, db_session): - org, folder, _ = _login_with_computed_filing(client, db_session, "sd1@example.com") - resp = client.get(f"/api/served-data/{folder.id}") - assert resp.status_code == 200 - rows = resp.get_json() - by_loc = {r["location_id"]: r for r in rows} - assert set(by_loc) == {1001, 1002} - assert by_loc[1001]["served"] is True and by_loc[1002]["served"] is False - # The map needs coords + bsl + the merged coverage fields per location. - expected_keys = { - "location_id", - "latitude", - "longitude", - "address", - "bsl", - "served", - "wireless", - "coveredLocations", - "maxDownloadSpeed", - } - assert expected_keys <= set(by_loc[1001]) - - -# ------------------------------------------------------------- search + folder - - -def test_legacy_search_finds_fabric_addresses(client, db_session): - org, folder, _ = _login_with_computed_filing(client, db_session, "ls1@example.com") - resp = client.get(f"/api/search/{folder.id}?query=MAIN") - assert resp.status_code == 200 - results = resp.get_json() - assert any( - "MAIN" in str(v).upper() - for v in (results.values() if isinstance(results, dict) else results) - ) - - -def test_get_last_upload_folder(client, db_session): - org, folder, _ = _login_with_computed_filing(client, db_session, "lf1@example.com") - resp = client.get("/api/get-last-upload-folder") - assert resp.status_code == 200 - assert resp.get_json() == folder.id + with H.CsrfFlaskClient(app) as other: + login_page_session(other, email="ej2-other@example.com") + other_org = H.make_org(db_session, name="ej2-other-org") + u = _get_user(db_session, "ej2-other@example.com") + u.organization_id = other_org.id + u.verified = True + db_session.commit() + assert other.get(f"/api/get-edit-geojson-centroid/{ef.id}").status_code == 400 diff --git a/back-end/tests/test_org_endpoints.py b/back-end/tests/test_org_endpoints.py deleted file mode 100644 index f2f891e..0000000 --- a/back-end/tests/test_org_endpoints.py +++ /dev/null @@ -1,180 +0,0 @@ -"""Contract tests for the organization endpoints the org page relies on. - -Fills the membership-flow gaps: join_organization (the email-token -request-to-join flow), the verify_token join branch that actually adds the -member, exit_organization, and delete_organization's wrong-name guard. -""" - -import pytest - -from tests import conftest_helpers as H -from tests.conftest import _db_reachable - -pytestmark = pytest.mark.skipif( - not _db_reachable(), reason="integration Postgres not reachable on localhost:5433" -) - - -@pytest.fixture() -def client(db_session): - import routes # noqa: F401 - from utils.flask_app import app - - app.config["TESTING"] = True - # Flask-Mail captured MAIL_SUPPRESS_SEND at import time (before TESTING was - # set), so flip the live state: record_messages() still sees the sends. - mail_state = app.extensions["mail"] - prev_suppress, prev_sender = mail_state.suppress, mail_state.default_sender - mail_state.suppress = True - mail_state.default_sender = mail_state.default_sender or "bdk-test@example.com" - with H.CsrfFlaskClient(app) as c: - yield c - mail_state.suppress, mail_state.default_sender = prev_suppress, prev_sender - - -def _register(client, email, password="Password123!"): - resp = client.post("/api/register", json={"email": email, "password": password}) - assert resp.status_code == 200, resp.get_json() - - -def _get_user(session, email): - from database.models import user as user_model - - return session.query(user_model).filter(user_model.email == email).one() - - -def _verify(session, email): - _get_user(session, email).verified = True - session.commit() - - -def _org_with_admin(session, name="JoinableOrg", admin_email="admin@example.com"): - org = H.make_org(session, name=name) - admin = H.make_user(session, org_id=org.id, email=admin_email) - admin.is_admin = True - admin.verified = True - session.commit() - return org, admin - - -# ------------------------------------------------------------ join request - - -def test_join_organization_emails_the_org_admin(client, db_session): - org, admin = _org_with_admin(db_session) - _register(client, "joiner@example.com") - _verify(db_session, "joiner@example.com") - - from utils.flask_app import mail - - with mail.record_messages() as outbox: - resp = client.post("/api/join_organization", json={"name": org.name}) - assert resp.status_code == 200, resp.get_json() - assert resp.get_json()["status"] == "success" - assert len(outbox) == 1 - assert outbox[0].recipients == [admin.email] - # The requester does NOT join yet — the admin's token click does that. - assert _get_user(db_session, "joiner@example.com").organization_id is None - - -def test_join_organization_unknown_org_400(client, db_session): - _register(client, "joiner2@example.com") - _verify(db_session, "joiner2@example.com") - resp = client.post("/api/join_organization", json={"name": "NoSuchOrg"}) - assert resp.status_code == 400 - assert "not found" in resp.get_json()["message"].lower() - - -def test_join_organization_requires_verified_email(client, db_session): - org, _ = _org_with_admin(db_session) - _register(client, "unverified@example.com") - resp = client.post("/api/join_organization", json={"name": org.name}) - assert resp.status_code == 400 - assert "verify" in resp.get_json()["message"].lower() - - -def test_join_organization_org_without_admin_400(client, db_session): - H.make_org(db_session, name="Headless") - _register(client, "joiner3@example.com") - _verify(db_session, "joiner3@example.com") - resp = client.post("/api/join_organization", json={"name": "Headless"}) - assert resp.status_code == 400 - assert "admin" in resp.get_json()["message"].lower() - - -# ------------------------------------------------- verify_token join branch - - -def test_verify_token_join_branch_adds_the_member(client, db_session): - org, _ = _org_with_admin(db_session, name="TokenOrg") - _register(client, "tokenjoin@example.com") - uid = _get_user(db_session, "tokenjoin@example.com").id - - from routes._email import create_email_token - - token = create_email_token( - userid=uid, email="tokenjoin@example.com", operation="join_organization", org_id=org.id - ) - resp = client.post("/api/verify_token", json={"token": token}) - assert resp.status_code == 200, resp.get_json() - db_session.expire_all() - assert _get_user(db_session, "tokenjoin@example.com").organization_id == org.id - - -def test_verify_token_join_branch_rejects_invalid_org_id(client, db_session): - _register(client, "badorg@example.com") - uid = _get_user(db_session, "badorg@example.com").id - - from routes._email import create_email_token - - token = create_email_token( - userid=uid, email="badorg@example.com", operation="join_organization", org_id=-1 - ) - resp = client.post("/api/verify_token", json={"token": token}) - assert resp.status_code == 400 - db_session.expire_all() - assert _get_user(db_session, "badorg@example.com").organization_id is None - - -# ------------------------------------------------------------ exit / delete - - -def test_exit_organization_roundtrip(client, db_session): - _register(client, "leaver@example.com") - org = H.make_org(db_session, name="LeaveMe") - u = _get_user(db_session, "leaver@example.com") - u.organization_id = org.id - db_session.commit() - - resp = client.post("/api/exit_organization", json={"organizationName": "LeaveMe"}) - assert resp.status_code == 200, resp.get_json() - db_session.expire_all() - assert _get_user(db_session, "leaver@example.com").organization_id is None - - -def test_exit_organization_wrong_name_400(client, db_session): - _register(client, "stayer@example.com") - org = H.make_org(db_session, name="StayHere") - u = _get_user(db_session, "stayer@example.com") - u.organization_id = org.id - db_session.commit() - - resp = client.post("/api/exit_organization", json={"organizationName": "WrongName"}) - assert resp.status_code == 400 - db_session.expire_all() - assert _get_user(db_session, "stayer@example.com").organization_id == org.id - - -def test_delete_organization_wrong_name_400(client, db_session): - from database.models import organization as org_model - - _register(client, "owner@example.com") - org = H.make_org(db_session, name="KeepMe") - u = _get_user(db_session, "owner@example.com") - u.organization_id = org.id - u.is_admin = True - db_session.commit() - - resp = client.delete("/api/delete_organization", json={"organizationName": "NotKeepMe"}) - assert resp.status_code == 400 - assert db_session.query(org_model).filter(org_model.id == org.id).first() is not None diff --git a/back-end/tests/test_password_hashes.py b/back-end/tests/test_password_hashes.py index 76d055a..9d06133 100644 --- a/back-end/tests/test_password_hashes.py +++ b/back-end/tests/test_password_hashes.py @@ -6,7 +6,7 @@ logging the user in. The fix (utils/passwords.py) verifies legacy hashes with the stdlib, never raises on malformed/None hashes, and transparently re-hashes the account to pbkdf2:sha256 on the next successful login. Covers all three -login handlers: /auth/login, /api/login, /admin/login. +login handlers: /auth/login and /admin/login. """ import hashlib @@ -128,17 +128,6 @@ def test_auth_login_migrates_legacy_hash(client): assert resp.status_code == 302 -def test_api_login_migrates_legacy_hash(client): - uid = _make_user("legacy2@example.com", _legacy_sha256_hash("Password123!")) - - resp = client.post( - "/api/login", json={"email": "legacy2@example.com", "password": "Password123!"} - ) - assert resp.status_code == 200 - assert resp.get_json()["status"] == "success" - assert _stored_hash(uid).startswith("pbkdf2:") - - def test_admin_login_migrates_legacy_hash(client): uid = _make_user( "legacyadmin@example.com", @@ -174,9 +163,5 @@ def test_malformed_hash_is_invalid_credentials_not_500(client): assert resp.status_code == 200, email assert "Invalid credentials" in resp.get_data(as_text=True) - resp = client.post("/api/login", json={"email": email, "password": "whatever"}) - assert resp.status_code == 200, email - assert resp.get_json()["status"] == "error" - resp = client.post("/admin/login", data={"email": email, "password": "whatever"}) assert resp.status_code == 401, email diff --git a/back-end/tests/test_rate_limit.py b/back-end/tests/test_rate_limit.py index c0b9c4d..8ff1fcf 100644 --- a/back-end/tests/test_rate_limit.py +++ b/back-end/tests/test_rate_limit.py @@ -38,14 +38,12 @@ def rate_limiting_on(): def test_login_is_rate_limited(client, rate_limiting_on): codes = [ - client.post("/api/login", json={"email": "x@example.com", "password": "nope"}).status_code + client.post("/auth/login", data={"email": "x@example.com", "password": "nope"}).status_code for _ in range(15) ] assert 429 in codes, codes - # The 429 body is the unified JSON error shape. - over = client.post("/api/login", json={"email": "x@example.com", "password": "nope"}) + over = client.post("/auth/login", data={"email": "x@example.com", "password": "nope"}) assert over.status_code == 429 - assert over.get_json()["status"] == "error" def test_admin_login_post_is_rate_limited(client, rate_limiting_on): diff --git a/back-end/tests/test_security_hardening.py b/back-end/tests/test_security_hardening.py index 496b55c..2af8172 100644 --- a/back-end/tests/test_security_hardening.py +++ b/back-end/tests/test_security_hardening.py @@ -1,10 +1,10 @@ -"""Security hardening of the existing app's auth surface. +"""Security hardening of the app's auth surface. Pins: email tokens are purpose-bound (aud) and UTC-expiring; tokens of one -type can't be replayed as another; profile/registration input is validated -(notably: a missing JSON field must never coerce to the string "None"); -the session cookie is HttpOnly even in dev; a disabled user's outstanding -token stops working immediately; prod refuses a weak JWT secret. +type can't be replayed as another; registration input is validated; the +session cookie is HttpOnly even in dev; cookie-auth'd mutating API calls +require the CSRF double-submit header; a disabled user's outstanding token +stops working immediately; prod refuses a weak JWT secret. """ from datetime import UTC @@ -29,8 +29,8 @@ def client(db_session): def _register(client, email="sec@example.com", password="Password123!"): - resp = client.post("/api/register", json={"email": email, "password": password}) - assert resp.status_code == 200, resp.get_json() + resp = client.post("/auth/register", data={"email": email, "password": password}) + assert resp.status_code == 302, resp.get_data(as_text=True) return resp @@ -70,8 +70,8 @@ def test_email_token_round_trip_and_claims(client, db_session): ) assert decoded["exp"] > datetime.now(UTC).timestamp() - resp = client.post("/api/verify_token", json={"token": token}) - assert resp.status_code == 200, resp.get_json() + html = client.get(f"/auth/verify/{token}").get_data(as_text=True) + assert "not valid" not in html db_session.expire_all() assert _user(db_session).verified is True @@ -88,12 +88,15 @@ def test_app_token_rejected_as_email_token(client, db_session): with app.app_context(): app_token = create_access_token(identity={"id": uid}) - resp = client.post("/api/verify_token", json={"token": app_token}) - assert resp.status_code == 400 - resp = client.post( - "/api/reset_password", json={"token": app_token, "newPassword": "NewPass123!"} - ) - assert resp.status_code == 400 + html = client.get(f"/auth/verify/{app_token}").get_data(as_text=True) + assert "not valid" in html + + resp = client.post(f"/auth/reset/{app_token}", data={"password": "NewPass123!"}) + assert resp.status_code == 200 # the error page, not the success redirect + # The password did not change: the original still logs in. + client.post("/auth/logout") + ok = client.post("/auth/login", data={"email": "sec@example.com", "password": "Password123!"}) + assert ok.status_code == 302 def test_email_token_rejected_as_session_cookie(client, db_session): @@ -107,9 +110,10 @@ def test_email_token_rejected_as_session_cookie(client, db_session): userid=uid, email="sec@example.com", operation="email_address_verification" ) client.set_cookie("token", token) - resp = client.get("/api/user") # 422 = flask-jwt-extended's "wrong audience" rejection; 401 = no/invalid - # token. Either way: not authenticated. + # token. Either way: not authenticated (an authenticated call would 404 + # on the bad tile coordinates instead). + resp = client.get("/api/tiles/abc/9/143/199.pbf") assert resp.status_code in (401, 422) @@ -122,105 +126,49 @@ def _csrf_headers(client): def test_mutating_request_requires_csrf_header(client, db_session): - """Login sets a JS-readable csrf_access_token cookie; mutating API calls - must echo it in X-CSRF-TOKEN (double-submit), so a cross-site form can't - ride the session cookie.""" + """Registration sets a JS-readable csrf_access_token cookie; mutating API + calls must echo it in X-CSRF-TOKEN (double-submit), so a cross-site form + can't ride the session cookie.""" _register(client) assert client.get_cookie("csrf_access_token") is not None - resp = client.post("/api/update_profile", json={}) # no header + body = {"file_ids": [], "editfile_ids": []} + resp = client.delete("/api/delfiles", json=body) # no header assert resp.status_code == 401 - resp = client.post("/api/update_profile", json={}, headers=_csrf_headers(client)) - assert resp.status_code == 200, resp.get_json() + # With the header the CSRF gate passes and the handler's own validation + # answers instead (empty selection -> 400). + resp = client.delete("/api/delfiles", json=body, headers=_csrf_headers(client)) + assert resp.status_code == 400 def test_get_requests_do_not_need_csrf(client, db_session): _register(client) - resp = client.get("/api/user") - assert resp.status_code == 200 - - -# --- profile update input validation ----------------------------------------- - - -def _setup_profile_user(client, db_session): - from database.models import organization - - _register(client) - s = db_session - u = _user(s) - org = organization(name="SecOrg", provider_id=330054, brand_name="SecBrand") - s.add(org) - s.commit() - u.organization_id = org.id - u.verified = True - s.commit() - return u, org - - -def test_update_profile_empty_body_changes_nothing(client, db_session): - """A missing field must never coerce to the literal string 'None'.""" - u, org = _setup_profile_user(client, db_session) - resp = client.post("/api/update_profile", json={}, headers=_csrf_headers(client)) - assert resp.status_code == 200, resp.get_json() - db_session.expire_all() - assert u.email == "sec@example.com" - assert u.verified is True - assert org.brand_name == "SecBrand" - assert org.name == "SecOrg" - - -def test_update_profile_rejects_invalid_email(client, db_session): - u, _ = _setup_profile_user(client, db_session) - resp = client.post( - "/api/update_profile", json={"email": "not-an-email"}, headers=_csrf_headers(client) - ) - assert resp.status_code == 400 - db_session.expire_all() - assert u.email == "sec@example.com" + # No X-CSRF-TOKEN header: an authenticated GET must not 401; the bad tile + # coordinates 404 instead. + resp = client.get("/api/tiles/abc/9/143/199.pbf") + assert resp.status_code == 404 -def test_update_profile_rejects_taken_email(client, db_session): - u, _ = _setup_profile_user(client, db_session) - from controllers.database_controller import user_ops - - user_ops.create_user_in_db("other@example.com", "Password123!", db_session) - db_session.commit() - resp = client.post( - "/api/update_profile", json={"email": "other@example.com"}, headers=_csrf_headers(client) - ) - assert resp.status_code == 400 - db_session.expire_all() - assert u.email == "sec@example.com" - - -def test_update_profile_valid_changes_apply(client, db_session): - u, org = _setup_profile_user(client, db_session) - resp = client.post( - "/api/update_profile", - json={"email": "new@example.com", "brandName": "NewBrand", "organizationName": "NewOrg"}, - headers=_csrf_headers(client), - ) - assert resp.status_code == 200, resp.get_json() - db_session.expire_all() - assert u.email == "new@example.com" - assert u.verified is False # changed email needs re-verification - assert org.brand_name == "NewBrand" - assert org.name == "NewOrg" +# --- registration input validation -------------------------------------------- -# --- registration input validation -------------------------------------------- +def test_register_rejects_invalid_email(client, db_session): + from database.models import user + resp = client.post("/auth/register", data={"email": "nope", "password": "Password123!"}) + assert resp.status_code == 200 + assert "valid email" in resp.get_data(as_text=True) + assert db_session.query(user).filter(user.email == "nope").first() is None -def test_register_rejects_invalid_email(client): - resp = client.post("/api/register", json={"email": "nope", "password": "Password123!"}) - assert resp.status_code == 400 +def test_register_rejects_empty_password(client, db_session): + from database.models import user -def test_register_rejects_empty_password(client): - resp = client.post("/api/register", json={"email": "ok@example.com", "password": ""}) - assert resp.status_code == 400 + resp = client.post("/auth/register", data={"email": "ok@example.com", "password": ""}) + assert resp.status_code == 200 + assert "password" in resp.get_data(as_text=True).lower() + assert db_session.query(user).filter(user.email == "ok@example.com").first() is None # --- cookie flags --------------------------------------------------------------- @@ -228,7 +176,8 @@ def test_register_rejects_empty_password(client): def test_login_cookie_is_httponly_even_in_dev(client, db_session): _register(client) - resp = client.post("/api/login", json={"email": "sec@example.com", "password": "Password123!"}) + client.post("/auth/logout") + resp = client.post("/auth/login", data={"email": "sec@example.com", "password": "Password123!"}) cookie_headers = [h for h in resp.headers.getlist("Set-Cookie") if h.startswith("token=")] assert cookie_headers, "login should set the token cookie" assert "HttpOnly" in cookie_headers[0] @@ -239,14 +188,14 @@ def test_login_cookie_is_httponly_even_in_dev(client, db_session): def test_disabled_user_token_rejected_immediately(client, db_session): _register(client) - resp = client.get("/api/user") - assert resp.status_code == 200 # the registration cookie works + resp = client.get("/api/tiles/abc/9/143/199.pbf") + assert resp.status_code == 404 # authenticated: validation answers u = _user(db_session) u.disabled = True db_session.commit() - resp = client.get("/api/user") + resp = client.get("/api/tiles/abc/9/143/199.pbf") assert resp.status_code == 401 # same token, now rejected per-request diff --git a/back-end/tests/test_submissions_page.py b/back-end/tests/test_submissions_page.py index fdc34c8..cdaafa3 100644 --- a/back-end/tests/test_submissions_page.py +++ b/back-end/tests/test_submissions_page.py @@ -605,3 +605,28 @@ def test_fabric_import_debt_when_no_task_record(db_session): debts = filing_service.submission_debts(user.id, folder.id, db_session) assert any(d["id"] == "fabric_import" for d in debts) + + +def test_download_export_is_org_scoped(client, db_session): + """/api/downloadexport must refuse another org's snapshot (it serves raw + stored bytes, so a leak here is a full CSV disclosure).""" + org, folder = _login_with_filing(client, db_session, "dlown@example.com") + _make_ready(db_session, folder) + client.post("/submissions/generate") + + from database.models import file as file_model + + db_session.expire_all() + csv_file = db_session.query(file_model).filter_by(type="export").one() + + import routes # noqa: F401 + from utils.flask_app import app + + with H.CsrfFlaskClient(app) as other: + login_page_session(other, email="dlown-other@example.com") + other_org = H.make_org(db_session, name="dlown-other-org") + u = _get_user(db_session, "dlown-other@example.com") + u.organization_id = other_org.id + u.verified = True + db_session.commit() + assert other.get(f"/api/downloadexport/{csv_file.id}").status_code == 400 diff --git a/back-end/utils/namingschemes.py b/back-end/utils/namingschemes.py index a6a6178..852eefd 100644 --- a/back-end/utils/namingschemes.py +++ b/back-end/utils/namingschemes.py @@ -1,4 +1,3 @@ DATETIME_FORMAT = "%Y-%m-%d_%H:%M:%S" DATE_FORMAT = "%Y-%m-%d" EXPORT_CSV_NAME_TEMPLATE = "{brand_name}-BDC_Report-{deadline}.csv" - diff --git a/docker-compose.yml b/docker-compose.yml index 009faf5..6d4e3d2 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -97,24 +97,6 @@ services: ports: - ${DEVELOP_BACKEND_PORT}:${DEVELOP_BACKEND_PORT} - frontend: - image: ${DOCKER_IMAGE_FRONTEND} - build: ./front-end - environment: - # API base URL the browser-side code calls; defaults to nginx on localhost. - - NEXT_PUBLIC_DEVELOP_BACKEND_URL=${NEXT_PUBLIC_DEVELOP_BACKEND_URL:-http://localhost} - # MapTiler basemap style URLs (optional — the app boots without them, - # the basemap is just blank until a key is configured). - - NEXT_PUBLIC_DEVELOP_MAPTILE_STREET=${NEXT_PUBLIC_DEVELOP_MAPTILE_STREET:-} - - NEXT_PUBLIC_DEVELOP_MAPTILE_SATELITE=${NEXT_PUBLIC_DEVELOP_MAPTILE_SATELITE:-} - - NEXT_PUBLIC_DEVELOP_MAPTILE_DARK=${NEXT_PUBLIC_DEVELOP_MAPTILE_DARK:-} - volumes: - - ./front-end:/app - depends_on: - - backend - ports: - - ${DEVELOP_FRONTEND_PORT}:${DEVELOP_FRONTEND_PORT} - nginx: image: nginx:latest container_name: nginx-proxy @@ -123,5 +105,4 @@ services: volumes: - ./nginx.conf.local:/etc/nginx/conf.d/default.conf depends_on: - - backend - - frontend \ No newline at end of file + - backend \ No newline at end of file diff --git a/front-end/Dockerfile b/front-end/Dockerfile deleted file mode 100755 index 38f4c25..0000000 --- a/front-end/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Use an official Node.js runtime as a parent image (version 18) -FROM node:20 - -# Set the working directory in the container -WORKDIR /app - -# Copy the frontend application directory contents into the container at /usr/src/app -COPY . . - -# Install any needed packages specified in package.json -# Note: The base image already includes Node.js and npm, so we don't need to install them separately. -RUN npm install - -# Run npm run dev when the container launches -CMD ["npm", "run", "dev"] \ No newline at end of file diff --git a/front-end/__tests__/csrf-fetch.test.js b/front-end/__tests__/csrf-fetch.test.js deleted file mode 100644 index 77e8f43..0000000 --- a/front-end/__tests__/csrf-fetch.test.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * The global fetch wrapper must echo the csrf_access_token cookie (set by the - * backend at login) as X-CSRF-TOKEN on mutating requests — the backend rejects - * cookie-authenticated POST/PUT/PATCH/DELETE without it. - */ - -import { installCsrfFetch, readCsrfToken } from "../utils/csrf"; - -describe("csrf fetch wrapper", () => { - let spy; - - beforeEach(() => { - document.cookie = "csrf_access_token=tok123"; - window.__bdkCsrfFetchInstalled = false; - spy = jest.fn().mockResolvedValue({ ok: true }); - window.fetch = spy; - installCsrfFetch(); - }); - - it("reads the csrf cookie", () => { - expect(readCsrfToken()).toBe("tok123"); - }); - - it("adds the header to mutating requests", async () => { - await window.fetch("/api/update_profile", { method: "POST", body: "{}" }); - const init = spy.mock.calls[0][1]; - expect(new Headers(init.headers).get("X-CSRF-TOKEN")).toBe("tok123"); - }); - - it("preserves existing headers", async () => { - await window.fetch("/api/x", { - method: "DELETE", - headers: { "Content-Type": "application/json" }, - }); - const headers = new Headers(spy.mock.calls[0][1].headers); - expect(headers.get("Content-Type")).toBe("application/json"); - expect(headers.get("X-CSRF-TOKEN")).toBe("tok123"); - }); - - it("leaves GET requests alone", async () => { - await window.fetch("/api/user"); - const init = spy.mock.calls[0][1]; - expect(init === undefined || !new Headers(init.headers).get("X-CSRF-TOKEN")).toBe(true); - }); - - it("installs only once", () => { - const wrapped = window.fetch; - installCsrfFetch(); - expect(window.fetch).toBe(wrapped); - }); -}); diff --git a/front-end/__tests__/fileEditTable.test.js b/front-end/__tests__/fileEditTable.test.js deleted file mode 100644 index 8148d78..0000000 --- a/front-end/__tests__/fileEditTable.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Contract test for components/FileEditTable.js — how it reads the - * /api/networkfiles response shape. The backend returns - * {status:'success', files_data:[...]} or {status:'error', message:'...'} (the - * standard shape). This pins that the error path surfaces `message` (line 54 - * historically read `.error`, which is always undefined — a latent bug this - * test catches; it's exactly the inconsistency the error-shape unification removes). - */ -import { render, screen, waitFor } from "@testing-library/react"; -import { toast } from "react-toastify"; - -import FileEditTable from "../components/FileEditTable"; - -jest.mock("react-toastify", () => ({ - toast: { error: jest.fn(), success: jest.fn() }, - ToastContainer: () => null, -})); - -function mockFetchJson(body, ok = true) { - global.fetch = jest.fn().mockResolvedValue({ ok, json: async () => body }); -} - -beforeEach(() => { - jest.clearAllMocks(); -}); - -test("on a networkfiles error, surfaces the server message", async () => { - mockFetchJson({ status: "error", message: "Folder not found" }); - render(); - await waitFor(() => expect(toast.error).toHaveBeenCalledWith("Folder not found")); -}); - -test("on success, renders the returned file names", async () => { - mockFetchJson({ - status: "success", - files_data: [ - { id: 1, name: "fiber.kml", maxDownloadSpeed: 100, maxUploadSpeed: 20, techType: 50 }, - ], - }); - render(); - // The name renders inside an editable MUI TextField, so it's a value. - expect(await screen.findByDisplayValue("fiber.kml")).toBeInTheDocument(); - expect(toast.error).not.toHaveBeenCalled(); -}); diff --git a/front-end/__tests__/impersonationBanner.test.js b/front-end/__tests__/impersonationBanner.test.js deleted file mode 100644 index abf301d..0000000 --- a/front-end/__tests__/impersonationBanner.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Contract test for components/ImpersonationBanner.js — how it reads the - * /api/user response. When userinfo.impersonator is set (the operator's email, - * added by the backend when an admin is "logged in as" this user), the banner - * shows it plus a "Return to admin" link; otherwise it renders nothing. - */ -import { render, screen, waitFor } from "@testing-library/react"; - -import ImpersonationBanner from "../components/ImpersonationBanner"; - -function mockFetchJson(body, ok = true) { - global.fetch = jest.fn().mockResolvedValue({ ok, json: async () => body }); -} - -beforeEach(() => { - jest.clearAllMocks(); -}); - -test("shows the banner with the operator email when impersonating", async () => { - mockFetchJson({ - status: "success", - userinfo: { email: "victim@example.com", impersonator: "operator@example.com" }, - }); - render(); - - await waitFor(() => expect(screen.getByText("operator@example.com")).toBeInTheDocument()); - const link = screen.getByText("Return to admin"); - expect(link.getAttribute("href")).toContain("/admin/api/impersonate/stop"); -}); - -test("renders nothing when not impersonating", async () => { - mockFetchJson({ status: "success", userinfo: { email: "normal@example.com" } }); - const { container } = render(); - // Give the effect a chance to run; nothing should appear. - await waitFor(() => expect(global.fetch).toHaveBeenCalled()); - expect(container).toBeEmptyDOMElement(); -}); - -test("renders nothing when /api/user is unauthorized", async () => { - mockFetchJson({}, false); - const { container } = render(); - await waitFor(() => expect(global.fetch).toHaveBeenCalled()); - expect(container).toBeEmptyDOMElement(); -}); diff --git a/front-end/__tests__/login.test.js b/front-end/__tests__/login.test.js deleted file mode 100644 index c3b055f..0000000 --- a/front-end/__tests__/login.test.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Contract test for pages/login.js — pins how the login page reads the - * /api/login response shape. This is exactly the surface an error-shape - * unification changes: if the backend response keys change, these tests - * fail until the frontend is updated to match. - * - * Runs in jsdom (Node) — no browser. Heavy/irrelevant deps (Navbar, the router, - * toast, sweetalert) are mocked so we isolate the response-handling logic. - */ -import { fireEvent, render, screen, waitFor } from "@testing-library/react"; -import { toast } from "react-toastify"; - -import Login from "../pages/login"; - -const mockPush = jest.fn(); - -jest.mock("next/router", () => ({ - useRouter: () => ({ push: mockPush }), -})); -jest.mock("react-toastify", () => ({ - toast: { error: jest.fn(), success: jest.fn() }, - ToastContainer: () => null, -})); -jest.mock("sweetalert2", () => ({ __esModule: true, default: { fire: jest.fn() } })); -jest.mock("../components/Navbar", () => () => null); - -function mockFetchJson(body, ok = true) { - global.fetch = jest.fn().mockResolvedValue({ - ok, - json: async () => body, - }); -} - -function fillAndSubmit() { - // fireEvent.change sets each field in a single state update (vs a keystroke - // each), which keeps MUI's internal re-renders out of the act() noise. - fireEvent.change(screen.getByLabelText(/email/i), { - target: { value: "user@example.com" }, - }); - fireEvent.change(screen.getByLabelText(/password/i), { - target: { value: "secret123" }, - }); - fireEvent.click(screen.getByRole("button", { name: /sign in/i })); -} - -beforeEach(() => { - jest.clearAllMocks(); -}); - -test("on a success response, navigates to the home page", async () => { - mockFetchJson({ status: "success" }); - render(); - await fillAndSubmit(); - await waitFor(() => expect(mockPush).toHaveBeenCalledWith("/")); -}); - -test("on invalid credentials, shows an error toast and does not navigate", async () => { - mockFetchJson({ status: "error", message: "Invalid credentials" }); - render(); - await fillAndSubmit(); - await waitFor(() => - expect(toast.error).toHaveBeenCalledWith("Incorrect email or password.", "error") - ); - expect(mockPush).not.toHaveBeenCalled(); -}); diff --git a/front-end/__tests__/mapIsland.test.js b/front-end/__tests__/mapIsland.test.js deleted file mode 100644 index 1568336..0000000 --- a/front-end/__tests__/mapIsland.test.js +++ /dev/null @@ -1,362 +0,0 @@ -/** - * The studio map island (back-end/static/app/map.js) — browser-side behavior - * pinned in jsdom with a fake maplibre. What matters here: - * - * - the point popup is single-source-of-truth: the header (address, BSL - * number, served) renders instantly from tile properties, and the plan - * lines come ONLY from /map/location/?folder= — never a file-level - * guess that could flash to a different value; - * - modifying a saved edit reshapes THAT polygon: the edit's persisted shape - * leaves the edit-boxes layer while it's open in the inspector (no - * second polygon), and saving swaps the new shape in, in place; - * - the editing polygon exposes midpoint handles that insert a new vertex. - */ - -const SQUARE_RING = [ - [-80, 37], - [-79.9, 37], - [-79.9, 37.1], - [-80, 37.1], - [-80, 37], -]; -const SQUARE_FEATURE = { - type: "Feature", - properties: {}, - geometry: { type: "Polygon", coordinates: [SQUARE_RING] }, -}; - -const CONFIG = { - folderId: 5, - tileUrl: "/api/tiles/5/{z}/{x}/{y}.pbf", - basemapStyle: null, - layers: [{ name: "sector.geojson", type: "wireless", tech: 70 }], - bounds: null, - exclusionBoxes: [ - { - type: "Feature", - properties: { editfileId: 7, name: "edit-7" }, - geometry: { type: "Polygon", coordinates: [SQUARE_RING] }, - }, - ], - techs: [70], - techNames: { 70: "Unlicensed FW" }, - techColors: { 70: "#0E7C86" }, - plansByTech: { 70: [{ id: 1, name: "AirLink 100" }, { id: 2, name: "AirLink Lite" }] }, - readOnly: false, - hasFabric: false, -}; - -// ------------------------------------------------------------- fake maplibre - -function FakeMap() { - this.handlers = {}; // "event:layer" (layer empty for bare) -> [fn] - this.sources = {}; - this.layers = {}; - this.canvas = { style: {} }; - this.dragPan = { enable() {}, disable() {} }; - this.doubleClickZoom = { enable() {}, disable() {} }; - this.queryHook = () => []; -} -FakeMap.prototype.on = function (event, a, b) { - const key = typeof a === "function" ? `${event}:` : `${event}:${a}`; - const fn = typeof a === "function" ? a : b; - (this.handlers[key] = this.handlers[key] || []).push(fn); -}; -FakeMap.prototype.once = FakeMap.prototype.on; -FakeMap.prototype.fire = function (event, layer, e) { - const key = `${event}:${layer || ""}`; - (this.handlers[key] || []).splice(0).forEach((fn) => fn(e)); -}; -FakeMap.prototype.firePersistent = function (event, layer, e) { - (this.handlers[`${event}:${layer || ""}`] || []).forEach((fn) => fn(e)); -}; -FakeMap.prototype.addControl = function () {}; -FakeMap.prototype.addSource = function (id, def) { - const src = { - def, - data: def.data, - setDataCalls: [], - setData(d) { - this.data = d; - this.setDataCalls.push(d); - }, - setTiles() {}, - }; - this.sources[id] = src; -}; -FakeMap.prototype.getSource = function (id) { - return this.sources[id]; -}; -FakeMap.prototype.addLayer = function (def) { - this.layers[def.id] = def; -}; -FakeMap.prototype.getLayer = function (id) { - return this.layers[id]; -}; -FakeMap.prototype.setLayoutProperty = function () {}; -FakeMap.prototype.setFeatureState = function () {}; -FakeMap.prototype.removeFeatureState = function () {}; -FakeMap.prototype.queryRenderedFeatures = function (q, opts) { - return this.queryHook(q, opts) || []; -}; -FakeMap.prototype.project = function (c) { - return { x: c[0] * 1000, y: -c[1] * 1000 }; -}; -FakeMap.prototype.getZoom = function () { - return 14; -}; -FakeMap.prototype.fitBounds = function () {}; -FakeMap.prototype.flyTo = function () {}; -FakeMap.prototype.getCanvas = function () { - return this.canvas; -}; - -function loadIsland(config) { - document.body.innerHTML = - `` + - '
'; - - const fakeMap = new FakeMap(); - const popups = []; - function FakePopup() { - this.htmls = []; - this.open = true; - popups.push(this); - } - FakePopup.prototype.setLngLat = function () { - return this; - }; - FakePopup.prototype.setHTML = function (h) { - this.htmls.push(h); - return this; - }; - FakePopup.prototype.addTo = function () { - return this; - }; - FakePopup.prototype.isOpen = function () { - return this.open; - }; - FakePopup.prototype.remove = function () { - this.open = false; - }; - - const eventSources = []; - function FakeEventSource(url) { - this.url = url; - this.listeners = {}; - eventSources.push(this); - } - FakeEventSource.prototype.addEventListener = function (ev, fn) { - (this.listeners[ev] = this.listeners[ev] || []).push(fn); - }; - FakeEventSource.prototype.close = function () {}; - - global.maplibregl = { - Map: function () { - return fakeMap; - }, - NavigationControl: function () {}, - ScaleControl: function () {}, - Popup: FakePopup, - }; - global.EventSource = FakeEventSource; - - jest.isolateModules(() => { - require("../../back-end/static/app/map.js"); - }); - fakeMap.fire("load", ""); - return { map: fakeMap, popups, eventSources }; -} - -const flush = () => new Promise((r) => setTimeout(r, 0)); - -const jsonResponse = (data) => - Promise.resolve({ ok: true, json: () => Promise.resolve(data) }); - -afterEach(() => { - delete global.fetch; - delete window.BDKMap; -}); - -// -------------------------------------------------------------------- popup - -describe("point popup", () => { - it("renders the header (with the BSL number) instantly and plan lines only from the DB", async () => { - global.fetch = jest.fn(() => - jsonResponse({ - status: "success", - services: [ - { file: "fiber.kml", tech: 50, plan: "Fiber Gig", down: 1000, up: 1000 }, - ], - }) - ); - const { map, popups } = loadIsland(CONFIG); - - map.firePersistent("click", "locations", { - features: [ - { - id: 999000111, - properties: { - address: "27892 OVER THE HILL DR", - served: "True", - bsl: "True", - network_coverages: "sector.geojson", - feature_type: "Point", - }, - }, - ], - lngLat: { lng: -79.95, lat: 37.05 }, - }); - - expect(popups).toHaveLength(1); - const first = popups[0].htmls[0]; - expect(first).toContain("27892 OVER THE HILL DR"); - expect(first).toContain("BSL # "); - expect(first).toContain("999000111"); - // No file-level guess: no plan name or speeds until the DB answers. - expect(first).not.toContain("Mbps"); - expect(first).not.toContain("AirLink"); - - expect(global.fetch).toHaveBeenCalledWith( - "/map/location/999000111?folder=5", - expect.objectContaining({ credentials: "include" }) - ); - await flush(); - const second = popups[0].htmls[1]; - expect(second).toContain("Fiber Gig"); - expect(second).toContain("1000/1000 Mbps"); - }); - - it("labels a non-BSL location as Location ID, not BSL #", () => { - global.fetch = jest.fn(() => jsonResponse({ status: "success", services: [] })); - const { map, popups } = loadIsland(CONFIG); - map.firePersistent("click", "locations", { - features: [ - { id: 42, properties: { address: "1 BARN RD", served: "False", bsl: "False" } }, - ], - lngLat: { lng: -79.95, lat: 37.05 }, - }); - expect(popups[0].htmls[0]).toContain("Location ID "); - expect(popups[0].htmls[0]).not.toContain("BSL # "); - expect(global.fetch).not.toHaveBeenCalled(); // not served: nothing to ask - }); -}); - -// ----------------------------------------------------------- edit-an-edit - -const LOCATION_IN_SQUARE = { - id: 1001, - properties: { - location_id: 1001, - served: "True", - bsl: "True", - network_coverages: "sector.geojson", - }, - geometry: { type: "Point", coordinates: [-79.95, 37.05] }, -}; - -async function openSavedEdit(handles) { - global.fetch = jest.fn((url) => { - if (url === "/map/edit/7") - return jsonResponse({ - status: "success", - id: 7, - name: "edit-7", - // Cloned: the island reshapes the ring in place, and a shared object - // would leak one test's edits into the next. - feature: JSON.parse(JSON.stringify(SQUARE_FEATURE)), - markers: [{ id: 1001, editedFile: ["sector.geojson"] }], - }); - if (url === "/map/edit/7/replace") - return jsonResponse({ status: "success", task_id: "task-1" }); - return jsonResponse({ status: "success", features: [] }); - }); - const island = loadIsland(CONFIG); - island.map.queryHook = (q, opts) => { - if ((opts.layers || []).includes("locations")) return [LOCATION_IN_SQUARE]; - if ((opts.layers || []).includes("draw-temp-pts")) return handles.current; - return []; - }; - window.BDKMap.editSavedEdit(7); - await flush(); - island.map.fire("idle", ""); // the post-zoom selection - return island; -} - -describe("modifying a saved edit", () => { - it("shows ONE polygon while reshaping: the persisted shape leaves the layer", async () => { - const handles = { current: [] }; - const { map } = await openSavedEdit(handles); - - const boxes = map.getSource("edit-boxes"); - const features = boxes.setDataCalls[boxes.setDataCalls.length - 1].features; - // The pending (editable) copy is there; the saved shape is NOT also drawn. - expect(features.some((f) => (f.properties || {}).editfileId === 7)).toBe(false); - expect(features).toHaveLength(1); - }); - - it("offers midpoint handles and inserts a vertex when one is grabbed", async () => { - const handles = { current: [] }; - const { map } = await openSavedEdit(handles); - - // The handle layer carries 4 vertex handles + 4 midpoints for a square. - const temp = map.getSource("draw-temp"); - const handleFeats = temp.setDataCalls[temp.setDataCalls.length - 1].features; - const mids = handleFeats.filter((f) => f.properties.mid); - expect(handleFeats.filter((f) => f.properties.vertex != null)).toHaveLength(4); - expect(mids).toHaveLength(4); - - // Grab the midpoint of the first edge: the ring gains a vertex there. - handles.current = [{ properties: mids[0].properties }]; - map.firePersistent("mousedown", "", { - point: { x: -79950, y: -37000 }, - lngLat: { lng: -79.95, lat: 37 }, - }); - const boxes = map.getSource("edit-boxes"); - const pendingFeat = - boxes.setDataCalls[boxes.setDataCalls.length - 1].features[0]; - const ring = pendingFeat.geometry.coordinates[0]; - expect(ring).toHaveLength(6); // 5 (closed square) + the inserted vertex - expect(ring[1]).toEqual([-79.95, 37]); - - // ...and it drags live. - map.firePersistent("mousemove", "", { lngLat: { lng: -79.94, lat: 36.99 } }); - expect(ring[1]).toEqual([-79.94, 36.99]); - }); - - it("saving a reshaped polygon swaps the new shape into the saved-edit layer in place", async () => { - const handles = { current: [] }; - const { map } = await openSavedEdit(handles); - - // Reshape: pull a new vertex out of the first edge's midpoint. - const temp = map.getSource("draw-temp"); - const mids = temp.setDataCalls[temp.setDataCalls.length - 1].features.filter( - (f) => f.properties.mid - ); - handles.current = [{ properties: mids[0].properties }]; - map.firePersistent("mousedown", "", { - point: { x: -79950, y: -37000 }, - lngLat: { lng: -79.95, lat: 37 }, - }); - map.firePersistent("mousemove", "", { lngLat: { lng: -79.94, lat: 36.95 } }); - map.firePersistent("mouseup", "", {}); - map.fire("idle", ""); // mouseup re-derives the selection - await flush(); - - document.querySelector("[data-inspector-save]").click(); - await flush(); - - expect(global.fetch).toHaveBeenCalledWith( - "/map/edit/7/replace", - expect.objectContaining({ method: "POST" }) - ); - const boxes = map.getSource("edit-boxes"); - const features = boxes.setDataCalls[boxes.setDataCalls.length - 1].features; - const mine = features.filter((f) => (f.properties || {}).editfileId === 7); - expect(features).toHaveLength(1); // in place: never a second polygon - expect(mine).toHaveLength(1); - const ring = mine[0].geometry.coordinates[0]; - expect(ring).toHaveLength(6); // the inserted vertex survived the save - expect(ring[1]).toEqual([-79.94, 36.95]); - }); -}); diff --git a/front-end/__tests__/settings-basemap-fallback.test.js b/front-end/__tests__/settings-basemap-fallback.test.js deleted file mode 100644 index dc14506..0000000 --- a/front-end/__tests__/settings-basemap-fallback.test.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * The basemap settings must fall back to a keyless OSM raster style when the - * MapTiler env vars are unset, so the map renders in dev without a key. - * With a key configured, the style URL passes through unchanged. - */ - -const loadSettings = (env) => { - let mod; - jest.isolateModules(() => { - const prev = {}; - for (const [k, v] of Object.entries(env)) { - prev[k] = process.env[k]; - if (v === undefined) delete process.env[k]; - else process.env[k] = v; - } - mod = require("../utils/settings"); - for (const [k, v] of Object.entries(prev)) { - if (v === undefined) delete process.env[k]; - else process.env[k] = v; - } - }); - return mod; -}; - -describe("basemap fallback", () => { - it("falls back to an OSM raster style object when no key is set", () => { - const s = loadSettings({ - NEXT_PUBLIC_DEVELOP_MAPTILE_STREET: "", - NEXT_PUBLIC_DEVELOP_MAPTILE_SATELITE: undefined, - NEXT_PUBLIC_DEVELOP_MAPTILE_DARK: undefined, - }); - for (const style of [s.maptile_street, s.maptile_satelite, s.maptile_dark]) { - expect(typeof style).toBe("object"); - expect(style.version).toBe(8); - expect(style.sources.osm.type).toBe("raster"); - expect(style.sources.osm.tiles[0]).toContain("openstreetmap.org"); - } - }); - - it("passes the configured style URL through unchanged", () => { - const url = "https://api.maptiler.com/maps/streets/style.json?key=abc"; - const s = loadSettings({ NEXT_PUBLIC_DEVELOP_MAPTILE_STREET: url }); - expect(s.maptile_street).toBe(url); - }); -}); diff --git a/front-end/components/Editmap.js b/front-end/components/Editmap.js deleted file mode 100755 index 537b30e..0000000 --- a/front-end/components/Editmap.js +++ /dev/null @@ -1,814 +0,0 @@ -import React, { useEffect, useRef, useState, useContext } from "react"; -import maplibregl from "maplibre-gl"; -import "maplibre-gl/dist/maplibre-gl.css"; -import SelectedLocationContext from "../contexts/SelectedLocationContext"; -import MapboxDraw from "@mapbox/mapbox-gl-draw"; -import "@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css"; -import * as turf from "@turf/turf"; -import { styled } from "@mui/material/styles"; -import "@maptiler/sdk/dist/maptiler-sdk.css"; -import * as maptilersdk from "@maptiler/sdk"; -import "maplibre-gl/dist/maplibre-gl.css"; -import LayersIcon from "@mui/icons-material/Layers"; -import { IconButton, Menu, MenuItem } from '@mui/material'; -import SmallLoadingEffect from "./SmallLoadingEffect"; -import { useRouter } from "next/router"; -import Swal from 'sweetalert2'; -import { backend_url, maptile_street, maptile_satelite, maptile_dark } from "../utils/settings"; -import SelectedPolygonContext from "../contexts/SelectedPolygonContext"; -import SelectedPolygonAreaContext from "../contexts/SelectedPolygonAreaContext.js"; -import { useFolder } from "../contexts/FolderContext.js"; -import { Typography, Checkbox, Box, Paper, Button } from '@mui/material'; -import ReloadMapContext from "../contexts/ReloadMapContext.js"; -import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material'; - - -const StyledBaseMapIconButton = styled(IconButton)({ - width: "33px", - height: "33px", - top: "30%", - position: "absolute", - left: "10px", - marginTop: '40px', - zIndex: 1000, - backgroundColor: "rgba(255, 255, 255, 1)", - color: "#333", - '&:hover': { - backgroundColor: "rgba(255, 255, 255, 0.9)", - }, - borderRadius: "4px", - padding: "10px", - boxShadow: "0px 1px 4px rgba(0, 0, 0, 0.3)", -}); - - -function Editmap() { - const mapContainer = useRef(null); - const map = useRef(null); - - const [isLoadingForUntimedEffect, setIsLoadingForUntimedEffect] = useState(false); - - const allMarkersRef = useRef([]); // create a ref for allMarkers - - const selectedPolygonsRef = useRef([]); - - const { selectedPolygons, setSelectedPolygons } = useContext(SelectedPolygonContext); - const { selectedPolygonsArea, setSelectedPolygonsArea } = useContext(SelectedPolygonAreaContext); - - const { folderID, setFolderID } = useFolder(); - - const colorRed = "#FF0000"; - const colorGreen = "#46DF39"; - - const { shouldReloadMap, setShouldReloadMap } = useContext(ReloadMapContext); - - const [selectedPolygonFeature, setSelectedPolygonFeature] = useState(null); - - const [selectedPointsFileNames, setSelectedPointsFilenames] = useState(new Set()); - const [selectedPoints, setSelectedPoints] = useState([]); - - const [isOverlapDialogOpen, setIsOverlapDialogOpen] = useState(false); - - const selectedPolygonsAreaRef = useRef([]); - - const handleCloseOverlapDialog = () => { - setIsOverlapDialogOpen(false); - }; - - const router = useRouter(); - - const currentPopup = useRef(null); - - const baseMaps = { - STREETS: maptile_street, - SATELLITE: maptile_satelite, - DARK: maptile_dark, - }; - - const [selectedBaseMap, setSelectedBaseMap] = useState("STREETS"); - - const [basemapAnchorEl, setBasemapAnchorEl] = useState(null); - - const handleBasemapMenuOpen = (event) => { - setBasemapAnchorEl(event.currentTarget); - }; - - const handleBasemapMenuClose = () => { - setBasemapAnchorEl(null); - }; - - const handleBaseMapToggle = (baseMapName) => { - setSelectedBaseMap(baseMapName); - setShouldReloadMap(true); - setBasemapAnchorEl(null); - }; - - const addSource = () => { - const existingSource = map.current.getSource("custom"); - if (existingSource) { - map.current.removeSource("custom"); - } - - - const tilesURL = `${backend_url}/api/tiles/${folderID}/{z}/{x}/{y}.pbf` - map.current.addSource("custom", { - type: "vector", - tiles: [tilesURL], - maxzoom: 16, - }); - }; - - const addLayers = () => { - let lineColor; - let fillColor; - - switch (selectedBaseMap) { - case "STREETS": - lineColor = "#888"; - fillColor = "#42004F"; - break; - case "SATELLITE": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - case "DARK": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - default: - lineColor = "#888"; - fillColor = "#42004F"; - } - - map.current.addLayer({ - id: "custom-line", - type: "line", - source: "custom", - layout: { - "line-cap": "round", - "line-join": "round", - }, - paint: { - "line-color": lineColor, - "line-width": 2, - }, - filter: ["==", ["get", "feature_type"], "LineString"], // Only apply this layer to linestrings - "source-layer": "data", - }); - - map.current.addLayer({ - id: "custom-polygon", - type: "fill", - source: "custom", - paint: { - "fill-color": fillColor, - "fill-opacity": 0.5, - }, - filter: [ - "all", - ["any", // Use the "any" logical operator - ["==", ["get", "feature_type"], "Polygon"], - ["==", ["get", "feature_type"], "MultiPolygon"] - ], - ], - "source-layer": "data", - }); - map.current.addLayer({ - id: "custom-point", - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, // When zoom is less than or equal to 12, circle radius will be 1 - 12, - 2, - 15, - 3, // When zoom is more than 12, circle radius will be 3 - ], - "circle-color": [ - "case", - // Check if a color is set in the feature-state, if so use it - ["to-boolean", ["feature-state", "color"]], // Ensure color is treated as a boolean (true if exists) - ["feature-state", "color"], // Use the color from feature state - // If no color is set in the feature-state, default to red - colorRed - ] - }, - filter: ["==", ["get", "feature_type"], "Point"], // Only apply this layer to points - "source-layer": "data", - }); - }; - - const removeVectorTiles = () => { - if (map.current.getLayer("custom-point")) { - map.current.removeLayer("custom-point"); - } - - if (map.current.getLayer("custom-line")) { - map.current.removeLayer("custom-line"); - } - - if (map.current.getLayer("custom-polygon")) { - map.current.removeLayer("custom-polygon"); - } - - if (map.current.getSource("custom")) { - map.current.removeSource("custom"); - } - }; - - - - const addVectorTiles = () => { - removeVectorTiles(); - - - addSource(); - function handleSourcedata(e) { - if (e.sourceId === "custom" && map.current.isSourceLoaded("custom")) { - map.current.off("sourcedata", handleSourcedata); - fetchMarkers().then(() => { - addLayers(); - }); - } - } - map.current.on("sourcedata", handleSourcedata); - - map.current.on("draw.create", (event) => { - const polygon = event.features[0]; - // Convert drawn polygon to turf polygon - const turfPolygon = turf.polygon(polygon.geometry.coordinates); - - // Check if the drawn polygon overlaps with any polygon in selectedPolygonsArea - const isOverlapping = selectedPolygonsAreaRef.current.some(existingPolygon => { - const turfExistingPolygon = turf.polygon(existingPolygon.geometry.coordinates); - return turf.booleanOverlap(turfPolygon, turfExistingPolygon); - }); - - // Return if the drawn polygon overlaps with any existing polygon - if (isOverlapping) { - setIsOverlapDialogOpen(true); - return; - } - - // Iterate over markers and select if they are inside the polygon and served is true - let selected = allMarkersRef.current.filter((marker) => { - const point = turf.point([marker.longitude, marker.latitude]); - const isInsidePolygon = turf.booleanPointInPolygon(point, turfPolygon); - - return isInsidePolygon && marker.served; - }); - - if (selected.length === 0) { - return; - } - - // Collect unique filenames from the selected markers - const filenames = new Set(); - selected.forEach((marker) => { - marker.coveredBy.forEach((filename) => { - filenames.add(filename); - }); - }); - - setSelectedPolygonFeature(polygon); - - if (filenames.size === 1) { - selected.forEach(marker => { - marker.served = false; - marker.color = colorRed; - marker.editedFile = new Set(filenames); - // Update feature state with the new color - if (map.current.getSource("custom")) { - map.current.setFeatureState({ - source: "custom", - sourceLayer: "data", - id: marker.id, - }, { - color: colorRed, - }); - } - }); - - const polygonId = `Polygon ${Date.now()}`; // Using current timestamp as an ID - - // Prepend the ID to the selected array - selected.unshift({ id: polygonId }); - - selectedPolygonsRef.current.push(selected); - setSelectedPolygons(selectedPolygonsRef.current); - selectedPolygonsAreaRef.current.push(polygon); - setSelectedPolygonsArea(selectedPolygonsAreaRef.current); - - } - else { - setSelectedPointsFilenames(filenames); - setSelectedPoints(selected); - } - - }); - - map.current.on("click", "custom-point", function (e) { - let featureProperties = e.features[0].properties; - let featureId = e.features[0].id; - - - if (currentPopup.current) { - currentPopup.current.remove(); - currentPopup.current = null; - } - - const popup = new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .addTo(map.current); - - function updatePopup() { - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - popup.setHTML(content); - - } - - // Initial popup content setup - updatePopup(); - - currentPopup.current = popup; - }); - - - - }; - - - useEffect(() => { - // Loop through each polygon in selectedPolygonsRef - if (selectedPolygons === undefined || selectedPolygons === null || selectedPolygons.length === 0) { - for (let i = 0; i < selectedPolygonsRef.current.length; i++) { - const refPolygon = selectedPolygonsRef.current[i]; - refPolygon.forEach(marker => { - marker.served = true; - marker.editedFile = new Set(); - marker.color = colorGreen; - map.current.setFeatureState( - { - source: "custom", - sourceLayer: "data", - id: marker.id, - }, - { - color: colorGreen - } - ); - }); - } - selectedPolygonsRef.current = []; - } - else { - for (let i = 0; i < selectedPolygonsRef.current.length; i++) { - const refPolygon = selectedPolygonsRef.current[i]; - - // If the entire polygon is missing in selectedPolygons, process all its markers - if (selectedPolygons[i] === undefined || refPolygon[0] !== selectedPolygons[i][0]) { - refPolygon.forEach(marker => { - marker.served = true; - marker.editedFile = new Set(); - marker.color = colorGreen; - map.current.setFeatureState( - { - source: "custom", - sourceLayer: "data", - id: marker.id, - }, - { - color: colorGreen - } - ); - }); - - // Skip further processing for this polygon - break; - } - - - } - // Sync ref with the current state - selectedPolygonsRef.current = [...selectedPolygons]; - } - - - }, [selectedPolygons]); // Dependency on selectedPolygons - - useEffect(() => { - selectedPolygonsAreaRef.current = [...selectedPolygonsArea]; - }, [selectedPolygonsArea]); - - - const setFeatureStateForMarkers = (markers) => { - markers.forEach((marker) => { - if (marker.served) { - // This assumes that marker.id matches the feature id in your vector tile source - map.current.setFeatureState( - { - source: "custom", - sourceLayer: "data", - id: marker.id, - }, - { - color: colorGreen - } - ); - } - }); - }; - - const fetchMarkers = () => { - - setIsLoadingForUntimedEffect(true); - const url = `${backend_url}/api/served-data/${folderID}` - - - return fetch(url, { - method: "GET", - credentials: "include", - }) - .then((response) => { - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - setIsLoading(false); - return; - } - else if (response.status === 200) { - return response.json(); - } - }) - .then((data) => { - const newMarkers = data.map((item) => ({ - address: item.address, - id: item.location_id, - latitude: item.latitude, - longitude: item.longitude, - served: item.served, - coveredBy: item.coveredLocations ? item.coveredLocations.split(", ").map(filename => filename.trim()) : [], // Convert string to array and trim whitespace - color: item.served ? colorGreen : colorRed, - editedFile: new Set() - })); - - setFeatureStateForMarkers(newMarkers); - - selectedPolygonsRef.current = []; - selectedPolygonsAreaRef.current = []; - allMarkersRef.current = newMarkers; // Here's the state update - setIsLoadingForUntimedEffect(false); - }) - .catch((error) => { - console.log(error); - setIsLoadingForUntimedEffect(false); - }); - - }; - - useEffect(() => { - if (!shouldReloadMap) { - return; - } - const initialStyle = baseMaps[selectedBaseMap]; - // Get current zoom level and center - let currentZoom = 4; - let currentCenter = [-98.35, 39.5]; - - - if (map.current) { - currentZoom = map.current.getZoom(); - currentCenter = map.current.getCenter().toArray(); - } - - map.current = new maplibregl.Map({ - container: mapContainer.current, - style: initialStyle, - center: currentCenter, - zoom: currentZoom, - transformRequest: (url) => { - if (url.startsWith(`${backend_url}/api/tiles/`)) { - return { - url: url, - credentials: 'include' // Include cookies for cross-origin requests - }; - } - } - }); - - map.current.getCanvas().className = "mapboxgl-canvas maplibregl-canvas"; - map.current.getContainer().classList.add("mapboxgl-map"); - const canvasContainer = map.current.getCanvasContainer(); - canvasContainer.classList.add("mapboxgl-canvas-container"); - if (canvasContainer.classList.contains("maplibregl-interactive")) { - canvasContainer.classList.add("mapboxgl-interactive"); - } - - const modes = MapboxDraw.modes; - modes.simple_select.onDrag = function (state, e) { - // Prevent moving the polygon - return false; - }; - - const draw = new MapboxDraw({ - modes: modes, - displayControlsDefault: false, - controls: { - polygon: true, - trash: true, - }, - }); - - const originalOnAdd = draw.onAdd.bind(draw); - draw.onAdd = (map) => { - const controlContainer = originalOnAdd(map); - controlContainer.classList.add( - "maplibregl-ctrl", - "maplibregl-ctrl-group", - ); - return controlContainer; - }; - - //Remove the existing vector tile layer and source if they exist - map.current.addControl(new maplibregl.NavigationControl(), "top-left"); - // map.current.addControl(new maplibregl.GeolocateControl(), "top-left"); - map.current.addControl(new maplibregl.ScaleControl(), "bottom-left"); - map.current.addControl(draw, "top-left"); - // When the base map changes, remove the existing vector tiles and add the new ones - const handleBaseMapChange = () => { - removeVectorTiles(); - addVectorTiles(); - setShouldReloadMap(false); - }; - map.current.on("load", handleBaseMapChange); - - }, [selectedBaseMap, folderID, shouldReloadMap]); - - const { location } = useContext(SelectedLocationContext); - const distinctMarkerRef = useRef(null); - - - useEffect(() => { - if (location && map.current) { - const { latitude, longitude, zoomlevel } = location; - - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - } - - distinctMarkerRef.current = new maplibregl.Marker({ - color: "#FFFFFF", - draggable: false, - }) - .setLngLat([longitude, latitude]) - .addTo(map.current); - - map.current.flyTo({ - center: [longitude, latitude], - zoom: zoomlevel, - }); - } else { - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - distinctMarkerRef.current = null; - } - } - }, [location]); - - - const onConfirm = (selectedPoints, checkedState, polygonFeature) => { - - const polygonId = `Polygon ${Date.now()}`; // Using current timestamp as an ID - - // Update each point's coveredBy attribute based on the current state of checkboxes - selectedPoints.forEach(point => { - const editedFile = Array.from(point.coveredBy).filter(file => checkedState[file]); - point.editedFile = new Set(editedFile); - - if (editedFile.length === point.coveredBy.length) { - point.served = false; - } - }); - - const filteredPoints = selectedPoints.filter(point => point.editedFile.size > 0); - - if (filteredPoints.length > 0) { - // Push updated points to your state management system - const updatedPoints = [...filteredPoints]; - updatedPoints.unshift({ id: polygonId }); // Include polygon ID in the state update - - selectedPolygonsRef.current.push(updatedPoints); - setSelectedPolygons(selectedPolygonsRef.current); - - selectedPolygonsAreaRef.current.push(polygonFeature); - setSelectedPolygonsArea(selectedPolygonsAreaRef.current); - } - - // Additional logic to update UI or state as needed - setSelectedPointsFilenames(new Set()); - setSelectedPoints([]); - }; - - const onUndo = (selectedPoints) => { - - selectedPoints.forEach(point => { - point.served = true; - point.color = colorGreen; - // Reset the 'served' status and color for each point - map.current.setFeatureState({ - source: "custom", - sourceLayer: "data", - id: point.id, - }, { - color: colorGreen - }); - }); - - - setSelectedPointsFilenames(new Set()); - setSelectedPoints([]); - - }; - - const CoverageLegend = ({ selectedPointsFileNames, selectedPoints, selectedPolygonFeature, onConfirm, onUndo }) => { - if (!selectedPointsFileNames || selectedPointsFileNames.size < 2) { - return null; - } - - const colorRed = "#FF0000"; - const colorGreen = "#46DF39"; - const colorPartiallyServed = "#f5cb42"; - - // Initialize checked state for each filename in selectedPointsFileNames - const initialCheckedState = {}; - selectedPointsFileNames.forEach(file => { - initialCheckedState[file] = false; // Initially all checkboxes are unchecked - }); - - const [checkedState, setCheckedState] = useState(initialCheckedState); - - - const handleCheckboxChange = (file) => { - setCheckedState(prevState => { - const newState = { - ...prevState, - [file]: !prevState[file] - }; - - // Update colors of the points based on the new checked state - selectedPoints.forEach(point => { - const coveredBySet = new Set(point.coveredBy); - const checkedFiles = new Set(Object.keys(newState).filter(f => newState[f])); - const intersectionLength = [...checkedFiles].filter(x => coveredBySet.has(x)).length; - - let color; - if (intersectionLength === coveredBySet.size) { - color = colorRed; - } else if (intersectionLength === 0) { - color = colorGreen; - } else { - color = colorPartiallyServed; - } - - point.color = color; - // Update feature state with the new color - if (map.current.getSource("custom")) { - map.current.setFeatureState({ - source: "custom", - sourceLayer: "data", - id: point.id, - }, { - color: color, - }); - } - }); - - return newState; - }); - }; - - const handleConfirmClick = () => { - onConfirm(selectedPoints, checkedState, selectedPolygonFeature); - }; - - const handleUndoClick = () => { - onUndo(selectedPoints); - }; - - return ( - - - - You are editing points covered by the multiple coverage files. Please check the coverage files that you want to edit. Redraw the polygon if the desired edit cannot be made. - - {Array.from(selectedPointsFileNames).map(file => ( - - - - ))} - {/* Legend Section */} - - - - Unserved - - - - Partially Served - - - - Fully Served - - - - - - - - - ); - }; - - - - return ( -
-
- - - - - - {Object.keys(baseMaps).map((key) => ( - handleBaseMapToggle(key)}> - {key} - - ))} - -
-
- {(isLoadingForUntimedEffect) && } -
- -
- - - {"Polygon Overlap Detected"} - - - The polygon you have drawn overlaps with an existing polygon. Please draw a non-overlapping polygon. - - - - - - -
- ); -} - -export default Editmap; diff --git a/front-end/components/FileEditTable.js b/front-end/components/FileEditTable.js deleted file mode 100644 index 1c3bc09..0000000 --- a/front-end/components/FileEditTable.js +++ /dev/null @@ -1,196 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { Button, Container, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, Paper, Select, MenuItem, InputLabel, FormControl } from '@mui/material'; -import { backend_url } from '../utils/settings'; -import { ToastContainer, toast } from 'react-toastify'; -import 'react-toastify/dist/ReactToastify.css'; - -// Predefined options for dropdowns -const techTypesOptions = { - "Not Entered": '', - "(10) Copper Wire": 10, - "(40) Coaxial Cable / HFC": 40, - "(50) Optical Carrier / Fiber to the Premises": 50, - "(60) Geostationary Satellite": 60, - "(61) Non-geostationary Satellite": 61, - "(70) Unlicensed Terrestrial Fixed Wireless": 70, - "(71) Licensed Terrestrial Fixed Wireless": 71, - "(72) Licensed-by-Rule Terrestrial Fixed Wireless": 72, - "Other": 0, -}; -const latencyOptions = { - "Not Entered": '', - "<= 100 ms": 1, - "> 100 ms": 0, -}; -const categoryOptions = { - "Not Entered": '', - Business: "B", - Residential: "R", - Both: "X", -}; - -const typeOptions = { - "wired": 'wired', - "wireless": 'wireless', -}; - - -function FileEditTable({ folderId }) { - const [files, setFiles] = useState([]); - - const fetchnetworkFileInfo = () => { - const requestOptions = { - method: 'GET', - credentials: 'include', // Include cookies in the request - }; - fetch(`${backend_url}/api/networkfiles/${folderId}`, requestOptions) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - console.log(data); - setFiles(data.files_data); - } - else { - toast.error(data.message); - } - - }) - .catch(error => console.error("There was an error!", error)); - - }; - - - useEffect(() => { - fetchnetworkFileInfo(); - }, [folderId]); - - const handleSubmit = (file) => { - console.log(file); - const requestOptions = { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - credentials: 'include', - body: JSON.stringify(file) - }; - fetch(`${backend_url}/api/updateNetworkFile/${file.id}`, requestOptions) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - console.log('Update successful'); - toast.success("Update successful!"); // Display a success toast - } else { - toast.error(data.message); - } - }) - .catch(error => { - console.error("There was an error updating the file!", error); - toast.error(`Server error`); // Display an error toast - }); - }; - - - // Update the files state to reflect the changes locally - const handleChange = (event, index, field) => { - const updatedFiles = [...files]; - updatedFiles[index][field] = event.target.value; - console.log(updatedFiles); - setFiles(updatedFiles); - }; - - const handleIntegerChange = (event, index, field) => { - const value = event.target.value; - // Regular expression to allow only integers - if (/^\d*$/.test(value)) { - const updatedFiles = [...files]; - updatedFiles[index][field] = value; - setFiles(updatedFiles); - } - }; - - - return ( - - - - - - Name - Type - Max Download Speed - Max Upload Speed - Tech Type - Latency - Category - Actions - - - - {files.map((file, index) => ( - - - handleChange(event, index, 'name')} /> - handleChange(event, index, 'type')} /> - handleIntegerChange(event, index, 'maxDownloadSpeed')} /> - handleIntegerChange(event, index, 'maxUploadSpeed')} /> - handleChange(event, index, 'techType')} /> - handleChange(event, index, 'latency')} /> - handleChange(event, index, 'category')} /> - - - - - ))} - -
-
- -
- ); -} - -// EditableCell component to render a TextField if network_info is present -function EditableCell({ file, field, onChange }) { - const renderDropdown = (options) => ( - - - - ); - - const width = field === "name" ? '300px' : '100px'; - // Conditionally render Select or TextField based on the field - switch (field) { - case 'type': - return {renderDropdown(typeOptions)}; - case 'techType': - return {renderDropdown(techTypesOptions)}; - case 'latency': - return {renderDropdown(latencyOptions)}; - case 'category': - return {renderDropdown(categoryOptions)}; - default: - return ( - - - - ); - } -} - -export default FileEditTable; diff --git a/front-end/components/ImpersonationBanner.js b/front-end/components/ImpersonationBanner.js deleted file mode 100644 index 6fb8f18..0000000 --- a/front-end/components/ImpersonationBanner.js +++ /dev/null @@ -1,75 +0,0 @@ -import React, { useEffect, useState } from "react"; - -import { backend_url } from "../utils/settings"; - -/** - * Global banner shown when a platform admin is impersonating a user ("logged in - * as"). The backend tags the app token with an `impersonator` claim, which - * /api/user surfaces as userinfo.impersonator (the operator's email). The - * "Return to admin" link hits the admin endpoint that clears the app token and - * sends the operator back to the admin panel. - */ -export default function ImpersonationBanner() { - const [impersonator, setImpersonator] = useState(null); - - useEffect(() => { - let cancelled = false; - async function check() { - try { - const res = await fetch(`${backend_url}/api/user`, { - method: "GET", - credentials: "include", - headers: { Accept: "application/json" }, - }); - if (!res.ok) return; - const data = await res.json(); - if (!cancelled && data && data.userinfo && data.userinfo.impersonator) { - setImpersonator(data.userinfo.impersonator); - } - } catch (e) { - /* not logged in / network error — show nothing */ - } - } - check(); - return () => { - cancelled = true; - }; - }, []); - - if (!impersonator) return null; - - return ( -
- - Impersonating {impersonator === true ? "a user" : impersonator} - - - Return to admin - -
- ); -} diff --git a/front-end/components/LoadingEffect.js b/front-end/components/LoadingEffect.js deleted file mode 100755 index 7facd5d..0000000 --- a/front-end/components/LoadingEffect.js +++ /dev/null @@ -1,65 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { Backdrop, CircularProgress, Typography } from '@mui/material'; -import { styled } from '@mui/material/styles'; - -const StyledBackdrop = styled(Backdrop)(({ theme }) => ({ - zIndex: 1200, - position: 'fixed', - color: '#fff', - minWidth: '100%', - minHeight: '100%', -})); - -const ReminderTextArea = styled('div')({ - marginLeft: '10px', -}); - -export default function LoadingEffect({ isLoading, loadingTimeInMs }) { - const [progress, setProgress] = useState(0); - const [isLoaded, setIsLoaded] = useState(false); - - useEffect(() => { - let startTime = Date.now(); - let timer = null; - console.log(isLoading); - if (isLoading) { - setProgress(0); - setIsLoaded(false); - timer = setInterval(() => { - const timePassed = Date.now() - startTime; - const newProgress = (timePassed / loadingTimeInMs) * 100; - - if (newProgress >= 99) { - clearInterval(timer); - setProgress(99); - } else { - setProgress(newProgress); - } - }, 1000); - } else { - setProgress(100); - setIsLoaded(true); - } - - return () => { - if (timer) { - clearInterval(timer); - } - }; - }, [isLoading]); - - return ( -
- - - - {isLoaded ? ( - Your data is ready! - ) : ( - Crunching your data, please wait {Math.floor(progress)}% - )} - - -
- ); -} \ No newline at end of file diff --git a/front-end/components/Map.js b/front-end/components/Map.js deleted file mode 100755 index 2577ee9..0000000 --- a/front-end/components/Map.js +++ /dev/null @@ -1,725 +0,0 @@ -import React, { useEffect, useRef, useState, useContext } from "react"; -import maplibregl from "maplibre-gl"; -import "maplibre-gl/dist/maplibre-gl.css"; -import SelectedLocationContext from "../contexts/SelectedLocationContext"; -import { MenuItem, IconButton, Menu } from "@mui/material"; -import { styled } from '@mui/material/styles'; -import "@maptiler/sdk/dist/maptiler-sdk.css"; -import * as maptilersdk from "@maptiler/sdk"; -import LayersIcon from "@mui/icons-material/Layers"; -import { useRouter } from "next/router"; -import LayerVisibilityContext from "../contexts/LayerVisibilityContext"; - -import {useFolder} from "../contexts/FolderContext.js"; -import Swal from "sweetalert2"; -import { backend_url, maptile_street, maptile_satelite, maptile_dark } from "../utils/settings"; -import EditLayerVisibilityContext from "../contexts/EditLayerVisibilityContext.js"; -import ReloadMapContext from '../contexts/ReloadMapContext'; - -const StyledBaseMapIconButton = styled(IconButton)({ - width: "33px", - height: "33px", - top: "30%", - position: "absolute", - left: "10px", - zIndex: 1000, - backgroundColor: "rgba(255, 255, 255, 1)", - color: "#333", - '&:hover': { - backgroundColor: "rgba(255, 255, 255, 0.9)", - }, - borderRadius: "4px", - padding: "10px", - boxShadow: "0px 1px 4px rgba(0, 0, 0, 0.3)", -}); - -function Map() { - const mapContainer = useRef(null); - const map = useRef(null); - const currentPopup = useRef(null); // Ref to store the current popup - - const [isDataReady, setIsDataReady] = useState(false); - const loadingTimeInMs = 3.5 * 60 * 1000; - - - const {folderID, setFolderID} = useFolder(); - - const { layers } = useContext(LayerVisibilityContext); - const allKmlLayerRef = useRef({}); - - const { editLayers } = useContext(EditLayerVisibilityContext); - const allEditLayerRef = useRef([]); - - // Use mbtiles to determine which tiles to fetch - - const router = useRouter(); - - const baseMaps = { - STREETS: maptile_street, - SATELLITE: maptile_satelite, - DARK: maptile_dark, - }; - - const [selectedBaseMap, setSelectedBaseMap] = useState("STREETS"); - - const [basemapAnchorEl, setBasemapAnchorEl] = useState(null); - - const { shouldReloadMap, setShouldReloadMap } = useContext(ReloadMapContext); - - const handleBasemapMenuOpen = (event) => { - setBasemapAnchorEl(event.currentTarget); - }; - - const handleBasemapMenuClose = () => { - setBasemapAnchorEl(null); - }; - - const handleBaseMapToggle = (baseMapName) => { - setSelectedBaseMap(baseMapName); - setShouldReloadMap(true); - setBasemapAnchorEl(null); - }; - - - const fetchLastFolder = async () => { - try { - const response = await fetch(`${backend_url}/api/get-last-upload-folder`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - return; - } - - const data = await response.json(); - - setFolderID(data); // Set the maximum folder_id as the default - setShouldReloadMap(true); - } catch (error) { - console.error("Error fetching folders:", error); - } - }; - - const addSource = () => { - const existingSource = map.current.getSource("custom"); - if (existingSource) { - map.current.removeSource("custom"); - } - - const tilesURL = `${backend_url}/api/tiles/${folderID}/{z}/{x}/{y}.pbf`; - map.current.addSource("custom", { - type: "vector", - tiles: [tilesURL], - maxzoom: 16, - }); - }; - const addLayers = () => { - let lineColor; - let fillColor; - - switch (selectedBaseMap) { - case "STREETS": - lineColor = "#888"; - fillColor = "#42004F"; - break; - case "SATELLITE": - lineColor = "#FF00F7"; - fillColor = "#565EC1"; - break; - case "DARK": - lineColor = "#FF00F7"; - fillColor = "#565EC1"; - break; - default: - lineColor = "#888"; - fillColor = "#42004F"; - } - - Object.keys(allKmlLayerRef.current).forEach((layer) => { - if (allKmlLayerRef.current[layer][0] === "wired") { - map.current.addLayer({ - id: `wired-${layer}`, - type: "line", - source: "custom", - layout: { - "line-cap": "round", - "line-join": "round", - }, - paint: { - "line-color": lineColor, - "line-width": 2, - }, - filter: [ - "all", - ["==", ["get", "feature_type"], "LineString"], - ["==", ["get", "network_coverages"], layer], - ], - "source-layer": "data", - }); - } - }); - - // Now add all wireless layers - Object.keys(allKmlLayerRef.current).forEach((layer) => { - if (allKmlLayerRef.current[layer][0] !== "wired") { - map.current.addLayer({ - id: `wireless-${layer}`, - type: "fill", - source: "custom", - paint: { - "fill-color": fillColor, - "fill-opacity": 0.5, - }, - filter: [ - "all", - ["any", // Use the "any" logical operator - ["==", ["get", "feature_type"], "Polygon"], - ["==", ["get", "feature_type"], "MultiPolygon"] - ], - ["==", ["get", "network_coverages"], layer], - ], - "source-layer": "data", - }); - } - }); - - map.current.addLayer({ - id: "unserved-points", - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, - 12, - 2, - 15, - 3, - ], - "circle-color": [ - "case", - ["==", ["get", "bsl"], "True"], - "#FF4040", - "#FFA840", - ], - }, - filter: ["all", ["==", ["get", "feature_type"], "Point"]], - "source-layer": "data", - }); - - map.current.on("click", "unserved-points", function (e) { - if (currentPopup.current) { - currentPopup.current.remove(); - currentPopup.current = null; - } - - let featureProperties = e.features[0].properties; - let featureId = e.features[0].id; - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - let popup = new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .setHTML(content) - .addTo(map.current); - - currentPopup.current = popup; - }); - - Object.keys(allKmlLayerRef.current).forEach((layer) => { - map.current.addLayer({ - id: `served-points-${layer}`, - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, - 12, - 2, - 15, - 3, - ], - "circle-color": "#46DF39", - }, - filter: [ - "all", - ["==", ["get", "feature_type"], "Point"], - ["in", layer, ["get", "network_coverages"]], - ], - "source-layer": "data", - }); - - map.current.on("click", `served-points-${layer}`, function (e) { - if (currentPopup.current) { - currentPopup.current.remove(); - currentPopup.current = null; - } - - let featureProperties = e.features[0].properties; - let featureId = e.features[0].id; - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - let popup = new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .setHTML(content) - .addTo(map.current); - - currentPopup.current = popup; - }); - }); - }; - - const removeVectorTiles = () => { - if (map.current.getLayer("unserved-points")) { - map.current.removeLayer("unserved-points"); - } - Object.keys(allKmlLayerRef.current).forEach((layer) => { - if (map.current.getLayer(`served-points-${layer}`)) { - map.current.removeLayer(`served-points-${layer}`); - } - if (allKmlLayerRef.current[layer][0] === "wired") { - if (map.current.getLayer(`wired-${layer}`)) { - map.current.removeLayer(`wired-${layer}`); - } - } else { - if (map.current.getLayer(`wireless-${layer}`)) { - map.current.removeLayer(`wireless-${layer}`); - } - } - }); - - if (map.current.getSource("custom")) { - map.current.removeSource("custom"); - } - }; - const fetchFiles = () => { - // if ( - // allKmlLayerRef.current === undefined || - // allKmlLayerRef.current === null || - // Object.keys(allKmlLayerRef.current).length === 0 - // ) { - return fetch(`${backend_url}/api/files?folder_ID=${folderID}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", // Include cookies in the request - }) - .then((response) => { - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else if (response.status === 200) { - return response.json(); - } - }) - .then((data) => { - const newLayers = data.reduce((layers, file) => { - if (file.name.endsWith(".kml") || file.name.endsWith(".geojson")) { - return { - ...layers, - [file.name]: [file.type, true], // Set the visibility of the layer to true - }; - } - return layers; - }, {}); - - allKmlLayerRef.current = newLayers; - }) - .catch((error) => { - console.log(error); - }); - // } else { - // return Promise.resolve(); - // } - }; - - const addVectorTiles = () => { - removeVectorTiles(); - if(folderID == -1){ - return; - } - - fetch(`${backend_url}/api/user`, { - method: "GET", - credentials: "include", // Include cookies in the request - headers: { - Accept: "application/json", - }, - }) - .then((response) => { - if (!response.ok) { - - throw new Error("Network response was not ok"); - } - return response.json(); - }) - .then((data) => { - addSource(); - function handleSourcedata(e) { - if (e.sourceId === "custom" && map.current.isSourceLoaded("custom")) { - map.current.off("sourcedata", handleSourcedata); - fetchFiles().then(() => { - addLayers(); - }); - } - } - map.current.on("sourcedata", handleSourcedata); - }) - .catch((error) => { - console.log( - "There has been a problem with your fetch operation: ", - error - ); - }); - }; - - const addSingleLayer = (layername, featuretype) => { - let lineColor; - let fillColor; - - switch (selectedBaseMap) { - case "STREETS": - lineColor = "#888"; - fillColor = "#42004F"; - break; - case "SATELLITE": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - case "DARK": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - default: - lineColor = "#888"; - fillColor = "#42004F"; - } - if (featuretype === "wired") { - map.current.addLayer({ - id: `wired-${layername}`, - type: "line", - source: "custom", - layout: { - "line-cap": "round", - "line-join": "round", - }, - paint: { - "line-color": lineColor, - "line-width": 2, - }, - filter: [ - "all", - ["==", ["get", "feature_type"], "LineString"], - ["==", ["get", "network_coverages"], layername], - ], // Only apply this layer to linestrings - "source-layer": "data", - }); - } else { - map.current.addLayer({ - id: `wireless-${layername}`, - type: "fill", - source: "custom", - paint: { - "fill-color": fillColor, - "fill-opacity": 0.5, - }, - filter: [ - "all", - ["any", // Use the "any" logical operator - ["==", ["get", "feature_type"], "Polygon"], - ["==", ["get", "feature_type"], "MultiPolygon"] - ], - ["==", ["get", "network_coverages"], layername], - ], // Only apply this layer to polygons - "source-layer": "data", - }); - } - - map.current.addLayer({ - id: `served-points-${layername}`, - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, // When zoom is less than or equal to 12, circle radius will be 1 - 12, - 2, - 15, - 3, // When zoom is more than 12, circle radius will be 3 - ], - "circle-color": "#46DF39", - }, - filter: [ - "all", - ["==", ["get", "feature_type"], "Point"], // Only apply this layer to points - ["in", layername, ["get", "network_coverages"]], - ], - "source-layer": "data", - }); - map.current.on("click", `served-points-${layername}`, function (e) { - let featureProperties = e.features[0].properties; - let featureId = e.features[0].id; - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .setHTML(content) - .addTo(map.current); - }); - }; - - const removeSingleLayer = (layername, featuretype) => { - if (map.current.getLayer(`served-points-${layername}`)) { - map.current.removeLayer(`served-points-${layername}`); - } - if (featuretype === "wired") { - if (map.current.getLayer(`wired-${layername}`)) { - map.current.removeLayer(`wired-${layername}`); - } - } else { - if (map.current.getLayer(`wireless-${layername}`)) { - map.current.removeLayer(`wireless-${layername}`); - } - } - }; - - - const fetchAndRenderEditGeoJSON = (editfile_id) => { - fetch(`${backend_url}/api/get-edit-geojson/${editfile_id}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then(response => { - if (!response.ok) { - throw new Error('Failed to fetch coverage data'); - } - return response.json(); // Get the blob directly from the response - }) - .then(geoJSONData => { - addGeoJSONLayer(geoJSONData, editfile_id); // Pass the GeoJSON data directly - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const addGeoJSONLayer = (geojsonData, editfile_id) => { - if (map.current.getSource(`editfile${editfile_id}-layer`)) { - map.current.removeLayer(`editfile${editfile_id}-layer`); - map.current.removeSource(`editfile${editfile_id}-layer`); - } - - map.current.addSource(`editfile${editfile_id}-layer`, { - type: 'geojson', - data: geojsonData - }); - - map.current.addLayer({ - id: `editfile${editfile_id}-layer`, - type: 'fill', // or any other type suitable for your data - source: `editfile${editfile_id}-layer`, - paint: { - "fill-color": '#FF6747', - "fill-opacity": 0.5, - }, - }); - }; - - const removeGeoJSONLayer = (editfile_id) => { - if (map.current.getSource(`editfile${editfile_id}-layer`)) { - map.current.removeLayer(`editfile${editfile_id}-layer`); - map.current.removeSource(`editfile${editfile_id}-layer`); - } - }; - - useEffect(() => { - // Track which layers are currently rendered on the map - const currentLayers = new Set(allEditLayerRef.current); - - // Determine new layers to add - editLayers.forEach(editfile_id => { - if (!currentLayers.has(editfile_id)) { - fetchAndRenderEditGeoJSON(editfile_id); - allEditLayerRef.current.push(editfile_id); // Keep track of added layers - } - }); - - // Remove layers that are no longer in editLayers - allEditLayerRef.current.forEach((editfile_id, index) => { - if (!editLayers.includes(editfile_id)) { - removeGeoJSONLayer(editfile_id); // Remove the layer from the map - allEditLayerRef.current.splice(index, 1); // Remove the layer from tracking - } - }); - }, [editLayers]); - - useEffect(() => { - Object.keys(allKmlLayerRef.current).forEach((key) => { - if (layers[key] && !allKmlLayerRef.current[key][1]) { - // Layer should be visible but isn't, so add it - addSingleLayer(key, allKmlLayerRef.current[key][0]); - allKmlLayerRef.current[key][1] = true; - } else if (!layers[key] && allKmlLayerRef.current[key][1]) { - // Layer shouldn't be visible but is, so remove it - removeSingleLayer(key, allKmlLayerRef.current[key][0]); - allKmlLayerRef.current[key][1] = false; - } - }); - }, [layers]); - - useEffect(()=>{ - fetchLastFolder(); - }, []); - - useEffect(() => { - if (!shouldReloadMap) { - return; - } - const initialStyle = baseMaps[selectedBaseMap]; - // Get current zoom level and center - let currentZoom = 4; - let currentCenter = [-98.35, 39.5]; - - if (map.current) { - currentZoom = map.current.getZoom(); - currentCenter = map.current.getCenter().toArray(); - } - - map.current = new maplibregl.Map({ - container: mapContainer.current, - style: initialStyle, - center: currentCenter, - zoom: currentZoom, - transformRequest: (url) => { - if (url.startsWith(`${backend_url}/api/tiles/`)) { - return { - url: url, - credentials: 'include' // Include cookies for cross-origin requests - }; - } - } - }); - - //Remove the existing vector tile layer and source if they exist - - map.current.addControl(new maplibregl.NavigationControl(), "top-left"); - map.current.addControl(new maplibregl.GeolocateControl(), "top-left"); - map.current.addControl(new maplibregl.ScaleControl(), "bottom-left"); - // When the base map changes, remove the existing vector tiles and add the new ones - const handleBaseMapChange = () => { - removeVectorTiles(); - addVectorTiles(); - setShouldReloadMap(false); - }; - map.current.on("load", handleBaseMapChange); - - }, [selectedBaseMap, folderID, shouldReloadMap]); - - const { location } = useContext(SelectedLocationContext); - const distinctMarkerRef = useRef(null); - - useEffect(() => { - if (location && map.current) { - const { latitude, longitude, zoomlevel } = location; - - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - } - - distinctMarkerRef.current = new maplibregl.Marker({ - color: "#FFFFFF", - draggable: false, - }) - .setLngLat([longitude, latitude]) - .addTo(map.current); - - map.current.flyTo({ - center: [longitude, latitude], - zoom: zoomlevel, - }); - } else { - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - distinctMarkerRef.current = null; - } - } - }, [location]); - - return ( -
-
- - - - - {Object.keys(baseMaps).map((key) => ( - handleBaseMapToggle(key)}> - {key} - - ))} - -
- -
-
- ); -} - -export default Map; diff --git a/front-end/components/Minimap.js b/front-end/components/Minimap.js deleted file mode 100755 index 84b8e18..0000000 --- a/front-end/components/Minimap.js +++ /dev/null @@ -1,305 +0,0 @@ -import React, { useEffect, useRef, useState, useContext } from "react"; -import maplibregl from "maplibre-gl"; -import "maplibre-gl/dist/maplibre-gl.css"; -import { Menu, IconButton, MenuItem } from '@mui/material'; -import LayersIcon from "@mui/icons-material/Layers"; -import SelectedLocationContext from '../contexts/SelectedLocationContext' -import { backend_url, maptile_street, maptile_satelite, maptile_dark } from "../utils/settings"; -import { styled } from "@mui/material/styles"; - -const StyledBaseMapIconButton = styled(IconButton)({ - width: "33px", - height: "33px", - top: "25vh", - position: "relative", - left: "10px", - zIndex: 1000, - backgroundColor: "rgba(255, 255, 255, 1)", - color: "#333", - '&:hover': { - backgroundColor: "rgba(255, 255, 255, 0.9)", - }, - borderRadius: "4px", - padding: "10px", - boxShadow: "0px 1px 4px rgba(0, 0, 0, 0.3)", -}); - - -function Minimap({ id }) { - const mapContainer = useRef(null); - const map = useRef(null); - const baseMaps = { - STREETS: maptile_street, - SATELLITE: maptile_satelite, - DARK: maptile_dark, - }; - - const [selectedBaseMap, setSelectedBaseMap] = useState("STREETS"); - - const [basemapAnchorEl, setBasemapAnchorEl] = useState(null); - - const { location } = useContext(SelectedLocationContext); - const distinctMarkerRef = useRef(null); - - const handleBasemapMenuOpen = (event) => { - setBasemapAnchorEl(event.currentTarget); - }; - - const handleBasemapMenuClose = () => { - setBasemapAnchorEl(null); - }; - - const handleBaseMapToggle = (baseMapName) => { - console.log(baseMapName); - setSelectedBaseMap(baseMapName); - setBasemapAnchorEl(null); - }; - const addSource = () => { - const existingSource = map.current.getSource("custom"); - if (existingSource) { - map.current.removeSource("custom"); - } - - const tilesURL = `${backend_url}/api/tiles/${id}/{z}/{x}/{y}.pbf`; - map.current.addSource("custom", { - type: "vector", - tiles: [tilesURL], - maxzoom: 16, - }); - }; - - const addLayers = () => { - let lineColor; - let fillColor; - - switch (selectedBaseMap) { - case "STREETS": - lineColor = "#888"; - fillColor = "#42004F"; - break; - case "SATELLITE": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - case "DARK": - lineColor = "#FF00F7"; // Replace with appropriate color - fillColor = "#565EC1"; // Replace with appropriate color - break; - default: - lineColor = "#888"; - fillColor = "#42004F"; - } - - map.current.addLayer({ - id: "custom-line", - type: "line", - source: "custom", - layout: { - "line-cap": "round", - "line-join": "round", - }, - paint: { - "line-color": lineColor, - "line-width": 2, - }, - filter: ["==", ["get", "feature_type"], "LineString"], // Only apply this layer to linestrings - "source-layer": "data", - }); - - map.current.addLayer({ - id: "custom-polygon", - type: "fill", - source: "custom", - paint: { - "fill-color": fillColor, - "fill-opacity": 0.5, - }, - filter: [ - "all", - ["any", // Use the "any" logical operator - ["==", ["get", "feature_type"], "Polygon"], - ["==", ["get", "feature_type"], "MultiPolygon"] - ], - ], // Only apply this layer to polygons - "source-layer": "data", - }); - map.current.addLayer({ - id: "custom-point", - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, // When zoom is less than or equal to 12, circle radius will be 1 - 12, - 2, - 15, - 3, // When zoom is more than 12, circle radius will be 3 - ], - "circle-color": [ - "case", - ["==", ["get", "served"], true], // change 'get' to 'feature-state' - "#46DF39", - "#FF0000", - ], - }, - filter: ["==", ["get", "feature_type"], "Point"], // Only apply this layer to points - "source-layer": "data", - }); - }; - - const removeVectorTiles = () => { - if (map.current.getLayer("custom-point")) { - map.current.removeLayer("custom-point"); - } - - if (map.current.getLayer("custom-line")) { - map.current.removeLayer("custom-line"); - } - - if (map.current.getLayer("custom-polygon")) { - map.current.removeLayer("custom-polygon"); - } - - if (map.current.getSource("custom")) { - map.current.removeSource("custom"); - } - }; - - const addVectorTiles = () => { - removeVectorTiles(); - addSource(); - addLayers(); - map.current.on("click", "custom-point", function (e) { - let featureProperties = e.features[0].properties; - - let featureId = e.features[0].id; - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .setHTML(content) - .addTo(map.current); - }); - // }); - }; - - useEffect(() => { - const initialStyle = baseMaps[selectedBaseMap]; - // Get current zoom level and center - let currentZoom = 4; - let currentCenter = [-98.35, 39.5]; - - - if (map.current) { - currentZoom = map.current.getZoom(); - currentCenter = map.current.getCenter().toArray(); - } - - map.current = new maplibregl.Map({ - container: mapContainer.current, - style: initialStyle, - center: currentCenter, - zoom: currentZoom, - transformRequest: (url) => { - if (url.startsWith(`${backend_url}/api/tiles/`)) { - return { - url: url, - credentials: 'include' // Include cookies for cross-origin requests - }; - } - } - }); - - //Remove the existing vector tile layer and source if they exist - - map.current.addControl(new maplibregl.NavigationControl(), "top-left"); - map.current.addControl(new maplibregl.GeolocateControl(), "top-left"); - map.current.addControl(new maplibregl.ScaleControl(), "bottom-left"); - // When the base map changes, remove the existing vector tiles and add the new ones - const handleBaseMapChange = () => { - removeVectorTiles(); - addVectorTiles(); - }; - map.current.on("load", handleBaseMapChange); - // Add a clean-up function that runs when the component is unmounted - return () => { - map.current.off("load", handleBaseMapChange); - map.current.remove(); // This removes the map instance and any attached event listeners - }; - }, [selectedBaseMap, id]); - - useEffect(() => { - if (!map.current) return; // Wait for map to initialize - // setTimeout(() => { - map.current.resize(); // Resize map when container size changes - // }, 200); - }, [id]); // Depend on 'id', so this runs whenever 'id' changes - - useEffect(() => { - if (location && map.current) { - const { latitude, longitude, zoomlevel } = location; - - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - } - - distinctMarkerRef.current = new maplibregl.Marker({ - color: "#FFFFFF", - draggable: false, - }) - .setLngLat([longitude, latitude]) - .addTo(map.current); - - map.current.flyTo({ - center: [longitude, latitude], - zoom: zoomlevel, - }); - } else { - if (distinctMarkerRef.current) { - distinctMarkerRef.current.remove(); - distinctMarkerRef.current = null; - } - } - }, [location]); - - return ( -
-
- - - - - {Object.keys(baseMaps).map((key) => ( - handleBaseMapToggle(key)}> - {key} - - ))} - -
-
-
- ); -} -export default Minimap; \ No newline at end of file diff --git a/front-end/components/MyEdit.js b/front-end/components/MyEdit.js deleted file mode 100644 index 4623cee..0000000 --- a/front-end/components/MyEdit.js +++ /dev/null @@ -1,257 +0,0 @@ -import React, { useEffect, useState, useContext, useRef } from "react"; -import { useRouter } from "next/router"; -import { - TextField, - Typography, - Container, - Table, - TableBody, - TableCell, - TableContainer, - TableHead, - TableRow, - Paper, - IconButton, - Button, -} from "@mui/material"; -import { styled } from "@mui/material/styles"; -import DeleteIcon from "@mui/icons-material/Delete"; -import { Box } from "@mui/system"; -import Swal from "sweetalert2"; -import SelectedLocationContext from "../contexts/SelectedLocationContext"; -import LocationOnIcon from '@mui/icons-material/LocationOn'; -import { backend_url } from "../utils/settings"; -import UndoIcon from '@mui/icons-material/Undo'; -import SelectedPolygonContext from "../contexts/SelectedPolygonContext"; -import SelectedPolygonAreaContext from "../contexts/SelectedPolygonAreaContext.js"; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; -import ExpandLessIcon from '@mui/icons-material/ExpandLess'; -import { useFolder } from "../contexts/FolderContext.js"; -import { toast, ToastContainer } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import FetchTaskInfoContext from "../contexts/FetchTaskInfoContext.js"; -import { polygon } from "@turf/turf"; - - -const StyledContainer = styled(Container)({ - zIndex: 1000, - position: "relative", - minWidth: "80%", - height: "90vh", - marginTop: "20px" -}); - -const StyledIconButton = styled(IconButton)({ - color: "#f44336", - "&:hover": { - color: "#d32f2f", - }, -}); - - -const MyEdit = () => { - - const router = useRouter(); - - const { setLocation } = useContext(SelectedLocationContext); - const { selectedPolygons, setSelectedPolygons } = useContext(SelectedPolygonContext); - const { selectedPolygonsArea, setSelectedPolygonsArea } = useContext(SelectedPolygonAreaContext); - - const { folderID, setFolderID } = useFolder(); - - const { setShouldFetchTaskInfo } = useContext(FetchTaskInfoContext); - - const handleLocateOnMap = (option) => { - if (option !== undefined && option !== null) { - console.log(option); - setLocation({ - latitude: option.latitude, - longitude: option.longitude, - zoomlevel: 16, - }); - } - else { - setLocation(null); - } - } - - - const handleUndoPolygonEdit = (index) => { - // Clone the arrays before modifications to avoid side-effects - const updatedPolygons = [...selectedPolygons]; - const updatedPolygonsArea = [...selectedPolygonsArea]; - - // Check if the index is valid before trying to remove the item - if (index >= 0 && index < updatedPolygons.length) { - updatedPolygons.splice(index, 1); - updatedPolygonsArea.splice(index, 1); - - // Update state with new arrays - setSelectedPolygons(updatedPolygons); - setSelectedPolygonsArea(updatedPolygonsArea); - } else { - console.error("Invalid index for undo operation"); - } - }; - - - const toggleMarkers = async () => { - try { - const polygonPoints = selectedPolygons.map(polygon => - polygon.slice(1).map(point => ({ - id: point.id, - served: point.served, - editedFile: Array.isArray(point.editedFile) ? point.editedFile : Array.from(point.editedFile) // Ensure editedFile is serialized correctly - })) - ); - - console.log(selectedPolygonsArea); - - - - const requestBody = { - marker: polygonPoints, - polygonfeatures: selectedPolygonsArea, - folderid: folderID - }; - - const response = await fetch(`${backend_url}/api/toggle-markers`, { - method: "POST", - credentials: "include", // Include cookies in the request - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(requestBody), - }); - - if (response.status === 401) { - // Redirect the user to the login page or other unauthorized handling page - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - } - if (!response.ok) { - // If the response status is not ok (not 200) - throw new Error(`HTTP error! status: ${response.status}, ${response.statusText}`); - } - const data = await response.json(); - if (data) { - toast.success("Your edit request has been successfully submitted"); - setSelectedPolygons([]); - setSelectedPolygonsArea([]); - setShouldFetchTaskInfo(true); - - } - } catch (error) { - console.error("Error:", error); - } - }; - - - - return ( -
- - - - -
- - ); -}; - - -const PolygonEditTable = ({ polygons, handleUndoPolygonEdit, handleLocateOnMap }) => { - const [expandedPolygon, setExpandedPolygon] = useState(null); - - const toggleExpand = (polygonId) => { - if (expandedPolygon === polygonId) { - setExpandedPolygon(null); - } else { - setExpandedPolygon(polygonId); - } - }; - - return ( -
- - - Bulk Edits - - - - - - Polygon ID - - Action - - - - {polygons.map((polygonGroup, groupIndex) => ( - - - - {polygonGroup[0].id} - - - toggleExpand(polygonGroup[0].id)}> - {expandedPolygon === polygonGroup[0].id ? : } - - - - handleUndoPolygonEdit(groupIndex)}> - - - - - {expandedPolygon === polygonGroup[0].id && ( - - - Location ID - Address - - - {polygonGroup.slice(1).map((point, pointIndex) => ( - - - {point.id} - - - {point.address} - - - handleLocateOnMap(point)}> - - - - - ))} - - )} - - ))} - -
-
-
- ); -}; - - - -export default MyEdit; \ No newline at end of file diff --git a/front-end/components/MyFile.js b/front-end/components/MyFile.js deleted file mode 100755 index 2116bf6..0000000 --- a/front-end/components/MyFile.js +++ /dev/null @@ -1,693 +0,0 @@ -import React, { useEffect, useState, useContext } from "react"; -import { useRouter } from "next/router"; -import { - Typography, - Container, - Table, - TableBody, - TableCell, - TableContainer, - TableHead, - TableRow, - Paper, - IconButton, - Switch, - FormControl, - InputLabel, - Select, - MenuItem, - Button, - Checkbox, - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from "@mui/material"; -import Swal from "sweetalert2"; -import DeleteIcon from "@mui/icons-material/Delete"; -import LayerVisibilityContext from "../contexts/LayerVisibilityContext"; -import SelectedLocationContext from "../contexts/SelectedLocationContext"; -import LocationOnIcon from '@mui/icons-material/LocationOn'; -import { backend_url } from "../utils/settings"; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; -import { styled } from '@mui/material/styles'; -import { useFolder } from '../contexts/FolderContext'; -import { format } from "date-fns"; -import EditLayerVisibilityContext from "../contexts/EditLayerVisibilityContext.js"; -import { toast, ToastContainer } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import FetchTaskInfoContext from "../contexts/FetchTaskInfoContext.js"; -import ReloadMapContext from "../contexts/ReloadMapContext.js"; - - -const StyledContainer = styled(Container)(({ }) => ({ - zIndex: 1000, - position: "relative", - minWidth: "80%", - maxHeight: "100vh", - marginTop: "40px", - overflow: "auto", - padding: "20px" // Added padding to ensure content inside has enough space -})); - -const StyledTypography = styled(Typography)(({ }) => ({ - marginBottom: "20px", - marginTop: "20px", -})); - -const StyledTable = styled(Table)(({ }) => ({ - minWidth: 650, -})); - -const StyledIconButton = styled(IconButton)(({ }) => ({ - color: "#f44336", // Red color - "&:hover": { - color: "#d32f2f", // Darker red on hover - }, -})); - -const IOSSwitch = styled((props) => ( - -))(({ theme }) => ({ - width: 42, - height: 26, - padding: 0, - "& .MuiSwitch-switchBase": { - padding: 0, - margin: 2, - transitionDuration: "300ms", - "&.Mui-checked": { - transform: "translateX(16px)", - color: "#fff", - "& + .MuiSwitch-track": { - backgroundColor: theme.palette.mode === "dark" ? "#2ECA45" : "#65C466", - opacity: 1, - border: 0, - }, - "&.Mui-disabled + .MuiSwitch-track": { - opacity: 0.5, - }, - }, - "&.Mui-focusVisible .MuiSwitch-thumb": { - color: "#33cf4d", - border: "6px solid #fff", - }, - "&.Mui-disabled .MuiSwitch-thumb": { - color: - theme.palette.mode === "light" - ? theme.palette.grey[100] - : theme.palette.grey[600], - }, - "&.Mui-disabled + .MuiSwitch-track": { - opacity: theme.palette.mode === "light" ? 0.7 : 0.3, - }, - }, - "& .MuiSwitch-thumb": { - boxSizing: "border-box", - width: 22, - height: 22, - }, - "& .MuiSwitch-track": { - borderRadius: 26 / 2, - backgroundColor: theme.palette.mode === "light" ? "#E9E9EA" : "#39393D", - opacity: 1, - transition: theme.transitions.create(["background-color"], { - duration: 500, - }), - }, -})); - -const DeleteConfirmationDialog = ({ open, onClose, onConfirm }) => ( - - {"Confirm Delete"} - - - Are you sure you want to delete the entire filing? This action cannot be undone. - - - - - - - -); - -const MyFile = () => { - const [fabricFiles, setFabricFiles] = useState([]); - const [networkDataFiles, setNetworkDataFiles] = useState([]); - const [manualEditFiles, setManualEditFiles] = useState([]); - const [folders, setFolders] = useState([]); - const { folderID, setFolderID } = useFolder(); - const { setLayers } = useContext(LayerVisibilityContext); - - - const { setLocation } = useContext(SelectedLocationContext); - - const { setShouldFetchTaskInfo } = useContext(FetchTaskInfoContext); - - const { setShouldReloadMap } = useContext(ReloadMapContext); - - const router = useRouter(); - - const [dialogOpen, setDialogOpen] = useState(false); - - const handleDeleteFiling = () => { - setDialogOpen(true); - }; - - const handleCloseDialog = () => { - setDialogOpen(false); - }; - - const handleConfirmDelete = async () => { - setDialogOpen(false); - try { - const response = await fetch(`${backend_url}/api/delfiling`, { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ folderID }), // Adjust the payload as needed - credentials: "include", - }); - - - // Assuming the API returns the updated list of files - const data = await response.json(); - if (data.status === "success") { - toast.success("Filing deleted successfully"); - setFolderID(-1); - setShouldReloadMap(true); - setFolders((prevFolders) => prevFolders.filter(folder => folder.folder_id !== folderID)); - } - else { - toast.error(data.message); - } - - } catch (error) { - toast.error("Error on our end. Please try again later"); - } - }; - - const handleRegenerateMap = async () => { - try { - const response = await fetch(`${backend_url}/api/regenerate_map`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ folderID }), // Adjust the payload as needed - credentials: "include", - }); - - - // Assuming the API returns the updated list of files - const data = await response.json(); - if (data.status === "success") { - toast.success("Map regeneration request submitted"); - setShouldReloadMap(true); - } - else { - toast.error(data.message); - } - - } catch (error) { - toast.error("Error on our end. Please try again later"); - } - }; - - const handleLocateOnMap = (option) => { - if (option !== undefined && option !== null) { - setLocation({ - latitude: option.latitude, - longitude: option.longitude, - zoomlevel: 12, - }); - } - else { - setLocation(null); - } - } - - - - const fetchFolders = async () => { - try { - const response = await fetch(`${backend_url}/api/folders-with-deadlines`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - return; - } - - const data = await response.json(); - setFolders(data); - - } catch (error) { - console.error("Error fetching folders:", error); - } - }; - - - const fetchFiles = async (folderIdentity) => { - setFabricFiles([]); - setNetworkDataFiles([]); - if (folderIdentity === -1) { - return; - } - const response = await fetch(`${backend_url}/api/files?folder_ID=${folderIdentity}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", // Include cookies in the request - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } - - const data = await response.json(); - if (!Array.isArray(data)) { - console.error("Error: Expected data to be an array, but received:", data); - return; - } - - if (!data || data.length === 0) { - console.log("Error: Empty response received from server"); - } else { - data.forEach((file) => { - const formattedFile = { - id: file.id, - name: file.name, - uploadDate: new Date(file.timestamp).toLocaleString(), - type: file.type, - kmlData: file.kml_data, - }; - if (file.name.endsWith(".csv")) { - setFabricFiles((prevFiles) => [...prevFiles, formattedFile]); - } else if (file.name.endsWith(".kml") || file.name.endsWith(".geojson")) { - setNetworkDataFiles((prevFiles) => [...prevFiles, formattedFile]); - setLayers((prevLayers) => ({ - ...prevLayers, - [file.name]: true, // Set the visibility of the layer to true - })); - } - }); - } - }; - - - const fetchEditFiles = async (folderIdentity) => { - setManualEditFiles([]); - if (folderIdentity === -1) { - return; - } - const response = await fetch(`${backend_url}/api/editfiles?folder_ID=${folderIdentity}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", // Include cookies in the request - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } - - const data = await response.json(); - if (!Array.isArray(data)) { - console.error("Error: Expected data to be an array, but received:", data); - return; - } - - if (!data || data.length === 0) { - console.log("Error: Empty response received from server"); - } else { - data.forEach((file) => { - const formattedFile = { - id: file.id, - name: file.name, - uploadDate: new Date(file.timestamp).toLocaleString(), - associated_files: file.associated_files, - }; - - setManualEditFiles((prevFiles) => [...prevFiles, formattedFile]); - - }); - } - }; - - useEffect(() => { - fetchFolders(); - }, []); - - useEffect(() => { - - fetchFiles(folderID); - fetchEditFiles(folderID); - }, [folderID]); - - - - const handleDeadlineSelect = (newFolderID) => { - setFolderID(newFolderID); - setShouldReloadMap(true); - } - - - const handleDeleteCheckedFiles = async () => { - try { - const fileIdsToDelete = [ - ...fabricFiles, - ...networkDataFiles - ] - .filter((file) => file.checked) - .map((file) => file.id); - - const editFileIdsToDelete = manualEditFiles - .filter((file) => file.checked) - .map((file) => file.id); - - - if (fileIdsToDelete.length === 0 && editFileIdsToDelete.length === 0) { - toast.error("Please check the file you want to delete"); - return; - } - - const response = await fetch(`${backend_url}/api/delfiles`, { - method: "DELETE", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", - body: JSON.stringify({ file_ids: fileIdsToDelete, editfile_ids: editFileIdsToDelete }), - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - return; - } - - const data = await response.json(); - - if (data.status === "success") { - toast.success("Your deletion request has been successfully submitted"); - setFabricFiles(prevFiles => prevFiles.filter(file => !fileIdsToDelete.includes(file.id))); - setNetworkDataFiles(prevFiles => prevFiles.filter(file => !fileIdsToDelete.includes(file.id))); - setManualEditFiles(prevFiles => prevFiles.filter(file => !editFileIdsToDelete.includes(file.id))); - setShouldFetchTaskInfo(true); - } else { - toast.error(data.message); - } - } catch (error) { - console.error("Error:", error); - toast.error(error); - } - }; - - - return ( -
- - - - You are working on filing for deadline: - - - {/* Fabric Files Table */} - - Fabric Files - - - - {/* Network Data Files Table */} - - Network Data Files - - - - {/* Manual Edit Files Table */} - - Manual Edits - - - - - - - - -
- ); -}; - -const FileTable = ({ - files, - setFiles, - showSwitch, -}) => { - const { setLayers } = useContext(LayerVisibilityContext); - const [checked, setChecked] = useState([]); - - useEffect(() => { - setChecked(new Array(files.length).fill(true)); - }, [files]); - - const handleToggle = (i) => () => { - const newChecked = [...checked]; - newChecked[i] = !newChecked[i]; - setChecked(newChecked); - - setLayers((prevLayers) => ({ - ...prevLayers, - [files[i].name]: newChecked[i], - })); - }; - - const handleCheck = (i) => () => { - const updatedFiles = [...files]; - updatedFiles[i].checked = !updatedFiles[i].checked; - setFiles(updatedFiles); - }; - - if (checked.length !== files.length) { - return null; - } - - return ( - - - - Filename - Created Time - Type - {showSwitch && Show on Map} - Check - - - - {files.map((file, index) => ( - - - {file.name} - - {file.uploadDate} - {file.type} - {showSwitch && ( - - - - )} - - - - - ))} - - - ); -}; - -const ManualEditFilesTable = ({ - files, - handleLocateOnMap, - setFiles -}) => { - const [checked, setChecked] = useState([]); - const { setEditLayers } = useContext(EditLayerVisibilityContext); - - useEffect(() => { - setChecked(new Array(files.length).fill(false)); - }, [files]); - - const fetchGeoJSONCentroid = (editfile_id) => { - fetch(`${backend_url}/api/get-edit-geojson-centroid/${editfile_id}`, { - method: "GET", - credentials: "include", - }) - .then(response => { - if (!response.ok) { - throw new Error('Failed to fetch coverage data'); - } - return response.json(); - }) - .then(data => { - handleLocateOnMap({ - latitude: data.latitude, - longitude: data.longitude - }) - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const handleToggle = (i) => () => { - const newChecked = [...checked]; - newChecked[i] = !newChecked[i]; - setChecked(newChecked); - - setEditLayers((prevLayers) => { - const fileId = files[i].id; - if (newChecked[i]) { - fetchGeoJSONCentroid(fileId); - return [...prevLayers, fileId]; - } else { - return prevLayers.filter(layer => layer !== fileId); - } - }); - }; - - const handleCheck = (i) => () => { - const updatedFiles = [...files]; - updatedFiles[i].checked = !updatedFiles[i].checked; - setFiles(updatedFiles); - }; - - return ( - - - - Filename - Created Time - Edit On - Locate On Map - Check - - - - {files.map((file, index) => ( - - - {file.name} - {file.uploadDate} - {file.associated_files.join(', ')} - - - - - - - - - ))} - - - ); -}; - -export default MyFile; \ No newline at end of file diff --git a/front-end/components/Navbar.js b/front-end/components/Navbar.js deleted file mode 100755 index 7a0962a..0000000 --- a/front-end/components/Navbar.js +++ /dev/null @@ -1,600 +0,0 @@ -import React, { useContext, useEffect, useState, useRef } from "react"; -import AppBar from "@mui/material/AppBar"; -import Box from "@mui/material/Box"; -import Toolbar from "@mui/material/Toolbar"; -import Typography from "@mui/material/Typography"; -import Button from "@mui/material/Button"; -import IconButton from "@mui/material/IconButton"; -import MenuIcon from "@mui/icons-material/Menu"; -import Drawer from "@mui/material/Drawer"; -import List from "@mui/material/List"; -import ListItem from "@mui/material/ListItem"; -import ListItemText from "@mui/material/ListItemText"; -import Alert from "@mui/material/Alert" -import Link from "next/link"; -import { Menu, MenuItem, Modal } from "@mui/material"; -import { useRouter } from "next/router"; -import { styled } from "@mui/material/styles"; -import ExpandLessIcon from "@mui/icons-material/ExpandLess"; -import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; -import HomeIcon from "@mui/icons-material/Home"; -import InfoIcon from "@mui/icons-material/Info"; -import AccountCircleIcon from "@mui/icons-material/AccountCircle"; -import LoginIcon from "@mui/icons-material/Login"; -import UploadIcon from "@mui/icons-material/Upload"; -import DownloadIcon from "@mui/icons-material/Download"; -import Searchbar from "./Searchbar"; -import FolderIcon from "@mui/icons-material/Folder"; -import EditIcon from "@mui/icons-material/Edit"; -import CellTowerIcon from '@mui/icons-material/CellTower'; -import EditMapContext from "../contexts/EditMapContext"; -import { backend_url } from "../utils/settings"; -import ViewListIcon from '@mui/icons-material/ViewList'; -import HistoryIcon from '@mui/icons-material/History'; -import Swal from "sweetalert2"; -import { useFolder } from "../contexts/FolderContext.js"; -import { useGridLogger } from "@mui/x-data-grid"; -import TaskInfo from "./TaskInfo.js"; -import ReloadMapContext from "../contexts/ReloadMapContext.js"; -import SelectedPolygonContext from "../contexts/SelectedPolygonContext"; -import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material'; - - - -const modalStyle = { - position: 'absolute', - top: '50%', - left: '50%', - transform: 'translate(-50%, -50%)', - width: 400, - bgcolor: 'background.paper', - boxShadow: 24, - p: 4, - display: 'flex', - flexDirection: 'column', - gap: 2, -}; - -const StyledAppBar = styled(AppBar)({ - backgroundImage: "linear-gradient(to right, #3A7BD5, #3A6073)", - position: "sticky", - boxShadow: - "0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)", -}); - -const StyledDrawer = styled(Drawer)({ - display: "flex", - flexDirection: "column", - justifyContent: "center", - width: "240px", - flexShrink: 0, - ".MuiDrawer-paper": { - width: "240px", - backgroundColor: "#EBF5FA", - }, -}); - -const StyledListItem = styled(ListItem)({ - display: "flex", - justifyContent: "center", - alignItems: "center", - padding: "4px", - borderRadius: "4px", - transition: "background-color 0.3s", - "&:hover": { - backgroundColor: "#E0F7FA", - }, -}); - -const TitleTypography = styled(Typography)({ - fontWeight: 700, - color: "#FFFFFF", - flexGrow: 1, -}); - -export default function Navbar({ - handleMyFilingOpen, - handleUploadOpen, - showOnHome, - uploadChallenge -}) { - const router = useRouter(); - const [anchorEl, setAnchorEl] = useState(null); - const [profileAnchorEl, setProfileAnchorEl] = useState(null); - const isMenuOpen = Boolean(anchorEl); - - const { isEditingMap, setEditingMap } = React.useContext(EditMapContext); - const { folderID, setFolderID } = useFolder(); - - const { setShouldReloadMap } = useContext(ReloadMapContext); - - const { selectedPolygons, setSelectedPolygons } = useContext(SelectedPolygonContext); - const [isDialogOpen, setDialogOpen] = useState(false); - - const hasUnsavedChanges = useRef(false); - - useEffect(() => { - if (isEditingMap) { - hasUnsavedChanges.current = !(selectedPolygons === null || selectedPolygons.length === 0); - } - }, [selectedPolygons, isEditingMap]); - - const handleEditToolClick = () => { - if (isEditingMap && hasUnsavedChanges.current) { - setDialogOpen(true); - return; - } - - toggleEditMode(); - }; - - const toggleEditMode = () => { - setEditingMap(!isEditingMap); - setShouldReloadMap(true); - - // Optional: Clear selectedPolygons if exiting the edit mode - if (isEditingMap) { - setSelectedPolygons(null); - } - }; - - const handleDialogClose = (shouldExit) => { - setDialogOpen(false); - if (shouldExit) { - toggleEditMode(); - } - }; - - function useLocalStorage(key, initialValue) { - const [storedValue, setStoredValue] = React.useState(() => { - try { - if (typeof window !== undefined) { - const item = window.localStorage.getItem(key); - return item ? item : initialValue; - } else { - return null; - } - } catch (error) { - console.error(error); - Swal.fire('Error', 'Oops, looks like we hit an error on our end, please try again later', 'error'); - - - return initialValue; - } - }); - - const setValue = (value) => { - try { - if (value === null) { - if (typeof window !== undefined) { - window.localStorage.removeItem(key); - } - setStoredValue(null); - } else { - if (typeof window !== undefined) { - window.localStorage.setItem(key, value); - } - setStoredValue(value); - } - } catch (error) { - console.error(error); - Swal.fire('Error', 'Oops, looks like we hit an error on our end, please try again later', 'error'); - - } - }; - - return [storedValue, setValue]; - } - - - const [modalOpen, setModalOpen] = useState(false); - const handleModalOpen = () => setModalOpen(true); - const handleModalClose = () => setModalOpen(false); - - const searchInputRef = React.useRef(null); - const buttonRef = React.useRef(null); - const [username, setUsername] = useLocalStorage("username", null); - const [isDrawerOpen, setIsDrawerOpen] = React.useState(false); - - const [menuOpen, setMenuOpen] = React.useState(false); - const [menuWidth, setMenuWidth] = React.useState(null); - - const handleDownloadClick = (event) => { - setAnchorEl(event.currentTarget); - }; - - const handleOptionClick = (option) => { - if (option === 1) { - router.push('/editnetworkfileinfo'); // Navigate to review page - } else if (option === 2) { - downloadFiling(); // Directly download the report - } - handleModalClose(); // Close the modal - }; - - const downloadFiling = () => { - fetch(`${backend_url}/api/exportFiling/${folderID}`, { - method: 'GET', - headers: { - 'Access-Control-Expose-Headers': 'Content-Disposition' - }, - credentials: 'include', - }) - .then(response => { - if (!response.ok) { - // When the response status code is not in the 2xx range - // it will read and parse JSON to display error - return response.json().then(data => { - Swal.fire({ - icon: 'error', - title: 'Oops...', - text: data.message, - }); - if (data.message === "Please provide your provider ID and brand name") { - router.push("/profile"); - } - throw new Error(data.message); // Add this to prevent further execution - }); - - } - // Extract filename from Content-Disposition header - const filename = response.headers.get('Content-Disposition').split('filename=')[1].split(';')[0].replace(/"/g, ''); - return response.blob().then(blob => ({ - blob, - filename - })); - }) - .then(({ blob, filename }) => { - // Create a new URL pointing to the blob object in memory - const url = window.URL.createObjectURL(blob); - // Create a temporary link element - const a = document.createElement('a'); - a.href = url; - a.download = filename; // Use the filename from the Content-Disposition header - document.body.appendChild(a); - a.click(); - a.remove(); // Remove the element after download - window.URL.revokeObjectURL(url); // Clean up the URL object - }) - .catch(error => { - console.error('Error:', error); - }); - }; - - - const downloadChallenge = () => { - window.location.href = `${backend_url}/api/exportChallenge`; - }; - - const handleMenuOpen = (event) => { - setMenuOpen(true); - setAnchorEl(event.currentTarget); - if (buttonRef.current) { - setMenuWidth(buttonRef.current.offsetWidth); - } - }; - - const handleMenuClose = () => { - setMenuOpen(false); - setAnchorEl(null); - }; - - const handleDrawerOpen = () => { - setIsDrawerOpen(true); - }; - - const handleDrawerClose = () => { - setIsDrawerOpen(false); - }; - - const handleLoginClick = (event) => { - event.preventDefault(); // Prevent the default behavior - // Navigate to the login page - }; - - const handleMenuNavigation = (link) => { - handleMenuClose(); - router.push(link); - }; - - const handleLogout = async (e) => { - e.preventDefault(); - - try { - const response = await fetch(`${backend_url}/api/logout`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", // Include cookies in the request - }); - - if (response.ok) { - const data = await response.json(); - if (data.status === "success") { - localStorage.removeItem("username"); // Remove username from local storage - setUsername(null); // Update username state - router.push("/"); - } - } else { - console.error("Logout failed"); - } - } catch (error) { - console.error("Logout error:", error); - Swal.fire('Error', 'Error logging out', 'error'); - - } - }; - - const fetchUserInfo = async () => { - const usernameFromStorage = localStorage.getItem("username"); - try { - const response = await fetch(`${backend_url}/api/user`, { - method: "GET", - credentials: "include", // Include cookies in the request - headers: { - Accept: "application/json", - }, - }); - if (response.ok) { - const data = await response.json(); - if (data.userinfo.email === undefined || data.userinfo.email === "") { - setUsername(null); - localStorage.removeItem("username"); - } else { - setUsername(data.userinfo.email); - } - } else { - console.error("Fetching user info failed"); - setUsername(null); // Clear the username state variable - localStorage.removeItem("username"); - } - } catch (error) { - console.error("Fetching user info error:", error); - setUsername(null); // Clear the username state variable - localStorage.removeItem("username"); - - } - }; - - const [hasMounted, setHasMounted] = React.useState(false); - - React.useEffect(() => { - setHasMounted(true); - const fetchData = async () => { - await fetchUserInfo(); - }; - - fetchData(); - }, [username]); - - if (!hasMounted) { - return null; - } - - let menuTopItem; - - if (username) { - menuTopItem = { - text: " Hello, " + username, - href: "/profile", - icon: , - }; - } else { - menuTopItem = { - text: "Hello, sign in", - href: "/login", - icon: , - }; - } - - const menuItems = [ - { - text: "Filing Tool", - href: "/", - icon: , - }, - { - text: "Edit Network Files Information", - href: "/editnetworkfileinfo", - icon: , - }, - { - text: "Wireless Coverage Calculation", - href: "/wirelessextension", - icon: , - }, - { - text: "Export History", - href: "/previousexport", - icon: , - }, - { - text: "Challenge Tool", - href: "/challenge", - icon: , - }, - ]; - - return ( - - - - - - - - - - BDK - - - - - - - - <> - {showOnHome && ( - - - - {isEditingMap ? "Exit Editing Tool" : "Editing Tool"} - - - )} - handleDialogClose(false)} - > - Unsaved Changes - - - You have unsaved edits. Are you sure you want to exit the editing tool without saving? - - - To submit your edits, click Your Edits and click the submit button. - - - - - - - - - - - {showOnHome && isEditingMap && ( - - - Your Edits - - - )} - {/* Potentially show this on edit map view */} - {showOnHome && !isEditingMap && ( - - - Your Filings - - )} - - {showOnHome && !isEditingMap && ( - - - Upload - - )} - -
- {!isEditingMap && ( - - - Export Filing - - )} - - - - - Filing Download Options - - - - - -
- - - {username ? ( - - setProfileAnchorEl(e.currentTarget)} // Use the setProfileAnchorEl here. - > - - {username} - {menuOpen ? : } - - setProfileAnchorEl(null)} // Reset profileAnchorEl to null on close. - > - handleMenuNavigation("/profile")}> - Profile - - Logout - - - ) : ( - router.push("/login")}> - - Login - - )} - -
-
- - - - - {menuTopItem.icon} - - - - {menuItems.map((item, index) => ( - - - {item.icon} - - - - ))} - - -
- - ); -} diff --git a/front-end/components/Questionnaire.js b/front-end/components/Questionnaire.js deleted file mode 100644 index 8305741..0000000 --- a/front-end/components/Questionnaire.js +++ /dev/null @@ -1,234 +0,0 @@ -import React, { useState } from "react"; -import Button from "@mui/material/Button"; -import { data } from "@maptiler/sdk"; -import { backend_url } from "../utils/settings"; - -const Questionnaire = () => { - const questions = [ - "Contact Name", - "Contact Email", - "Contact Phone", - "Category Code", - "Location ID", - "Address Primary", - "City", - "State", - "Zip Code", - "Zip Code Suffix", - "Unit Count", - "Building Type", - "Non-bsl Code", - "BSL lacks address flag", - "Latitude", - "Longitude", - "Address ID", - ]; - - const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0); - const [answers, setAnswers] = useState(Array(questions.length).fill(null)); - - const handleAnswer = (event) => { - const updatedAnswers = [...answers]; - updatedAnswers[currentQuestionIndex] = event.target.value; - setAnswers(updatedAnswers); - }; - - const handleBack = () => { - if (currentQuestionIndex > 0) { - setCurrentQuestionIndex(currentQuestionIndex - 1); - } - }; - - const handleNext = () => { - if (currentQuestionIndex < questions.length - 1) { - setCurrentQuestionIndex(currentQuestionIndex + 1); - } - }; - - const answeredCount = answers.filter((answer) => answer !== null).length; - const allQuestionsAnswered = answeredCount === questions.length; - - const handleClear = () => { - setCurrentQuestionIndex(0); - setAnswers(Array(questions.length).fill(null)); - }; - - function addToDatabase(event) { - event.preventDefault(); - console.log("Adding to database..."); - const dataToSend = { - contact_name: answers[0], - contact_email: answers[1], - contact_phone: answers[2], - category_code: answers[3], - location_id: answers[4], - address_primary: answers[5], - city: answers[6], - state: answers[7], - zip_code: answers[8], - zip_code_suffix: answers[9], - unit_count: answers[10], - building_type: answers[11], - non_bsl_code: answers[12], - bsl_lacks_address_flag: answers[13], - latitude: answers[14], - longitude: answers[15], - address_id: answers[16], - }; - console.log(dataToSend) - - fetch(`${backend_url}/api/submit-challenge`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(dataToSend), - }) - .then((response) => response.json()) - .then((data) => { - console.log(data); - }) - .catch((error) => { - console.error("Error:", error); - }); - } - - return ( -
-
-
-
- Answered: {answeredCount}/{questions.length} - Remaining:{" "} - {questions.length - answeredCount} -
- -
-
- {questions[currentQuestionIndex]} -
-
- -
-
- - {currentQuestionIndex > 0 && ( - - )} - {currentQuestionIndex < questions.length - 1 && ( - - )} - - -
-
- - {allQuestionsAnswered && ( - - )} - - -
- ); -}; - -export default Questionnaire; diff --git a/front-end/components/Searchbar.js b/front-end/components/Searchbar.js deleted file mode 100755 index cb92f61..0000000 --- a/front-end/components/Searchbar.js +++ /dev/null @@ -1,233 +0,0 @@ -import React, { useState, useContext } from "react"; -import TextField from "@mui/material/TextField"; -import Autocomplete from "@mui/material/Autocomplete"; -import CircularProgress from "@mui/material/CircularProgress"; -import SelectedLocationContext from "../contexts/SelectedLocationContext"; -import debounce from "lodash.debounce"; -import Switch from '@mui/material/Switch'; -import FormControlLabel from '@mui/material/FormControlLabel'; -import { stateList } from "../utils/FactSheets"; -import { styled } from '@mui/material/styles'; -import Box from "@mui/material/Box"; -import { backend_url } from "../utils/settings"; -import {useFolder} from "../contexts/FolderContext.js"; - - -const IOSSwitch = styled((props) => ( - -))(({ theme }) => ({ - width: 42, - height: 26, - padding: 0, - '& .MuiSwitch-switchBase': { - padding: 0, - margin: 2, - transitionDuration: '300ms', - '&.Mui-checked': { - transform: 'translateX(16px)', - color: '#fff', - '& + .MuiSwitch-track': { - backgroundColor: theme.palette.mode === 'dark' ? '#2ECA45' : '#65C466', - opacity: 1, - border: 0, - }, - '&.Mui-disabled + .MuiSwitch-track': { - opacity: 0.5, - }, - }, - '&.Mui-focusVisible .MuiSwitch-thumb': { - color: '#33cf4d', - border: '6px solid #fff', - }, - '&.Mui-disabled .MuiSwitch-thumb': { - color: - theme.palette.mode === 'light' - ? theme.palette.grey[100] - : theme.palette.grey[600], - }, - '&.Mui-disabled + .MuiSwitch-track': { - opacity: theme.palette.mode === 'light' ? 0.7 : 0.3, - }, - }, - '& .MuiSwitch-thumb': { - boxSizing: 'border-box', - width: 22, - height: 22, - }, - '& .MuiSwitch-track': { - borderRadius: 26 / 2, - backgroundColor: theme.palette.mode === 'light' ? '#E9E9EA' : '#39393D', - opacity: 1, - transition: theme.transitions.create(['background-color'], { - duration: 500, - }), - }, -})); - -function Searchbar() { - const [open, setOpen] = React.useState(false); - const [options, setOptions] = React.useState([]); - const [searchInput, setSearchInput] = useState(""); - const [isLoading, setIsLoading] = useState(false); - - const { setLocation } = useContext(SelectedLocationContext); - - const [searchByState, setSearchByState] = useState(false); - - const {folderID, setFolderID} = useFolder(); - - - - // handle switch change - const handleSwitchChange = (event) => { - setSearchByState(event.target.checked); - setSearchInput(""); // reset search input - setOptions([]); // reset options - handleSelectOption(null); - }; - - const handleSelectOption = (option) => { - if (option !== undefined && option !== null) { - setLocation({ - latitude: option.latitude, - longitude: option.longitude, - zoomlevel: searchByState ? 7 : 16 - }); - } - else { - setLocation(null); - } - }; - - const debouncedSave = React.useCallback( - debounce((nextValue) => handleSearchChange(nextValue), 600), // debounce time of 600ms - [searchByState] // will be created only once initially - ); - - const handleSearchChange = async (nextValue) => { - if (folderID === -1) { - return; - } - setSearchInput(nextValue); - - if (nextValue !== "") { - setIsLoading(true); - console.log(searchByState); - - if (searchByState) { - const filteredStates = stateList.filter(state => - state.name.toLowerCase().includes(nextValue.toLowerCase()) || - state.abbreviation.toLowerCase().includes(nextValue.toLowerCase()) - ); - console.log(filteredStates); - setTimeout(() => { - setOptions(filteredStates); - setIsLoading(false); - }, 0); - } else { - // Modified URL to include folderID in the request - const response = await fetch(`${backend_url}/api/search/${folderID}?query=${nextValue}`, { - credentials: 'include' - }); - const data = await response.json(); - setTimeout(() => { - setOptions(data); - setIsLoading(false); - }, 0); - } - } else { - setOptions([]); // Clear the search results list - setIsLoading(false); - } -}; - - React.useEffect(() => { - if (!open) { - setOptions([]); - } - }, [open]); - - const isOptionEqualToValue = searchByState - ? (option, value) => option.name === value.name - : (option, value) => option.address === value.address && - option.city === value.city && - option.state === value.state && - option.zipcode === value.zipcode; - - const getOptionLabel = (option) => { - if (!option) { - return ''; - } - - if (searchByState) { - return option.name ? `${option.name} (${option.abbreviation || ''})` : ''; - } else { - let labelParts = [option.address, option.city, option.state, option.zipcode]; - // filter out empty parts and join the rest with commas - return labelParts.filter(Boolean).join(', '); - } - }; - - return ( - - } - label="Search By State" - /> - { - setOpen(true); - }} - onClose={() => { - setOpen(false); - }} - filterOptions={(options, params) => options} - isOptionEqualToValue={isOptionEqualToValue} - getOptionLabel={getOptionLabel} - onChange={(_, value) => handleSelectOption(value)} - noOptionsText="No result found" - options={options} - loading={isLoading} - renderInput={(params) => ( - debouncedSave(event.target.value)} // Use debounced function - value={searchInput} - sx={{ - color: "black", - backgroundColor: "white", - "& .MuiOutlinedInput-notchedOutline": { - borderColor: "white", - }, - "&:hover .MuiOutlinedInput-notchedOutline": { - borderColor: "white", - }, - "&.Mui-focused .MuiOutlinedInput-notchedOutline": { - borderColor: "white", - }, - }} - InputProps={{ - ...params.InputProps, - endAdornment: ( - - {isLoading ? ( - - ) : null} - {params.InputProps.endAdornment} - - ), - }} - /> - )} - /> - - ); -} - -export default Searchbar; diff --git a/front-end/components/SmallLoadingEffect.js b/front-end/components/SmallLoadingEffect.js deleted file mode 100755 index 4a0bf85..0000000 --- a/front-end/components/SmallLoadingEffect.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Backdrop, Typography, Box, CircularProgress } from '@mui/material'; -import React from 'react'; -import { styled } from '@mui/material/styles'; - -const StyledBackdrop = styled(Backdrop)(({ theme }) => ({ - zIndex: 1200, - position: 'fixed', - color: '#fff', - minWidth: '100%', - minHeight: '100%', -})); - -const ReminderTextArea = styled('div')({ - marginLeft: '10px', -}); - -export default function SmallLoadingEffect({ isLoading, message = 'Getting the editing tool ready...' }) { - // `message` is a new prop with a default value. - return ( -
- - - - - {message} - {/* Using the `message` prop inside Typography */} - - - -
- ); -} \ No newline at end of file diff --git a/front-end/components/SubmitButton.js b/front-end/components/SubmitButton.js deleted file mode 100755 index 64f3e5a..0000000 --- a/front-end/components/SubmitButton.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Box } from "@mui/material"; -import Button from "@mui/material/Button"; - -export default function ExportButton({ onClick, challenge }) { - return ( - -
- -
-
- ); -} \ No newline at end of file diff --git a/front-end/components/TaskInfo.js b/front-end/components/TaskInfo.js deleted file mode 100644 index 8dfcf49..0000000 --- a/front-end/components/TaskInfo.js +++ /dev/null @@ -1,243 +0,0 @@ -import React, { useState, useEffect, useContext } from 'react'; -import { Box, Typography, Collapse, List, ListItem, ListItemText, Button, Drawer, IconButton, CircularProgress } from '@mui/material'; -import Alert from '@mui/material/Alert'; -import { ToastContainer } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import MenuIcon from '@mui/icons-material/Menu'; -import { backend_url } from "../utils/settings"; -import FetchTaskInfoContext from '../contexts/FetchTaskInfoContext'; -import DoneIcon from '@mui/icons-material/Done'; -import ErrorIcon from '@mui/icons-material/Error'; -import { grey, green, red, blue, purple, orange } from '@mui/material/colors'; -import ReloadMapContext from '../contexts/ReloadMapContext'; - -const useFetchTaskInfo = (shouldFetchTaskInfo, setShouldFetchTaskInfo, setShouldReloadMap) => { - const [inProgressTasks, setInProgressTasks] = useState([]); - const [finishedTasks, setFinishedTasks] = useState([]); - - useEffect(() => { - if (!shouldFetchTaskInfo) return; - - const before_inprogress_tasks_length = inProgressTasks.length; - const fetchTasks = async () => { - try { - const response = await fetch(`${backend_url}/api/user-tasks`, { - method: "GET", - credentials: "include", - }); - const data = await response.json(); - if (data.status === 'success') { - setInProgressTasks(data.in_progress_tasks); - setFinishedTasks(data.finished_tasks); - const after_inprogress_tasks_length = data.in_progress_tasks.length; - if (before_inprogress_tasks_length > 0 && after_inprogress_tasks_length === 0) { - setShouldReloadMap(true); - } - } - } catch (error) { - console.log(error); - } finally { - setShouldFetchTaskInfo(false); - } - }; - - fetchTasks(); - }, [shouldFetchTaskInfo, setShouldFetchTaskInfo]); - - return { inProgressTasks, finishedTasks }; -}; - -const fetchEstimatedRuntime = async (task_id, setShouldFetchTaskInfo) => { - try { - const response = await fetch(`${backend_url}/api/estimated-task-runtime/${task_id}`, { - method: "GET", - credentials: "include", - }); - const data = await response.json(); - if (data.estimated_runtime === 0) { - setShouldFetchTaskInfo(true); - return null; - } - return data.estimated_runtime; - } catch (error) { - console.log(error); - return null; - } -}; - - -const updateTaskStatus = async (task_id, status, setShouldFetchTaskInfo) => { - try { - await fetch(`${backend_url}/api/update-task-status/${task_id}`, { - method: "POST", - credentials: "include", - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ status }), - }); - setShouldFetchTaskInfo(true); - } catch (error) { - console.log(error); - } -}; - - -const TaskInfo = () => { - const [open, setOpen] = useState(false); - const [drawerOpen, setDrawerOpen] = useState(false); - const { shouldFetchTaskInfo, setShouldFetchTaskInfo } = useContext(FetchTaskInfoContext); - const { setShouldReloadMap } = useContext(ReloadMapContext); - const { inProgressTasks, finishedTasks } = useFetchTaskInfo(shouldFetchTaskInfo, setShouldFetchTaskInfo, setShouldReloadMap); - - - useEffect(() => { - const intervalId = setInterval(() => { - setShouldFetchTaskInfo(true); - }, 30000); // Set to true every 30 seconds - - return () => clearInterval(intervalId); - }, [setShouldFetchTaskInfo]); - - const handleDrawerOpen = () => { - setDrawerOpen(true); - setShouldFetchTaskInfo(true); - }; - - const TaskListItem = ({ task }) => { - const [estimatedRuntime, setEstimatedRuntime] = useState(null); - const [elapsedTime, setElapsedTime] = useState(0); - - useEffect(() => { - - fetchEstimatedRuntime(task.task_id).then(runtime => setEstimatedRuntime(runtime)); - - }, [task]); - - useEffect(() => { - - const startTime = new Date(task.start_time).getTime(); - const interval = setInterval(() => { - setElapsedTime(Math.floor((Date.now() - startTime) / 1000)); - }, 1000); - return () => clearInterval(interval); - - }, [task.start_time, task.status]); - - useEffect(() => { - if (estimatedRuntime && elapsedTime >= 2 * estimatedRuntime) { - updateTaskStatus(task.task_id, 'FAILURE', setShouldFetchTaskInfo); - } - }, [elapsedTime, estimatedRuntime, task.task_id]); - - return ( - - - {task.user_email} {task.operation_detail} - {estimatedRuntime && (task.status === 'PENDING' || task.status === 'STARTED' || task.status === 'RETRY') ? ( - - - - {Math.round((elapsedTime / estimatedRuntime) * 100)}% - - - ) : null} - - } - secondary={ - - Deadline of Filing Modified: {task.folder_deadline}
- Files Changed: {task.files_changed ? task.files_changed : 'N/A'}
- Timestamp: {task.start_time} -
- } - - /> -
- ); - }; - - return ( - - - - handleDrawerOpen()} - > - - {inProgressTasks.length > 0 ? ( - handleDrawerOpen()} - style={{ cursor: 'pointer' }} - > - {`Your organization has ${inProgressTasks.length} ongoing operations. The current map might not be accurate.`} - - ) : ( - handleDrawerOpen()} - style={{ cursor: 'pointer' }} - > - {`Your organization has 0 ongoing operation.`} - - )} - - setDrawerOpen(false)} - PaperProps={{ sx: { width: 600, p: 3 } }} - > - In Progress Operations - - {inProgressTasks.map(task => ( - - ))} - - - Finished Operations - - - - - {finishedTasks.map(task => ( - - - {task.user_email} {task.operation_detail} - {task.status === 'SUCCESS' && } - {task.status === 'FAILURE' && } - - } - secondary={ - - Deadline of Filing Modified: {task.folder_deadline}
- Files Changed: {task.files_changed ? task.files_changed : 'N/A'}
- Timestamp: {task.start_time} -
- } - /> - - ))} - - - - - ); -}; - -export default TaskInfo; diff --git a/front-end/components/Upload.js b/front-end/components/Upload.js deleted file mode 100644 index c782b6c..0000000 --- a/front-end/components/Upload.js +++ /dev/null @@ -1,495 +0,0 @@ -import * as React from "react"; -import { DataGrid } from "@mui/x-data-grid"; -import { Button, FormControl, InputLabel, MenuItem, Select, Box, Grid, styled } from '@mui/material'; -import Swal from "sweetalert2"; -import { ToastContainer, toast } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import { useFolder } from '../contexts/FolderContext'; -import { useRouter } from "next/router"; -import { format } from "date-fns"; -import { backend_url } from "../utils/settings"; -import FetchTaskInfoContext from "../contexts/FetchTaskInfoContext"; -import ReloadMapContext from "../contexts/ReloadMapContext"; - - - -const tech_types = { - "(10) Copper Wire": 10, - "(40) Coaxial Cable / HFC": 40, - "(50) Optical Carrier / Fiber to the Premises": 50, - "(60) Geostationary Satellite": 60, - "(61) Non-geostationary Satellite": 61, - "(70) Unlicensed Terrestrial Fixed Wireless": 70, - "(71) Licensed Terrestrial Fixed Wireless": 71, - "(72) Licensed-by-Rule Terrestrial Fixed Wireless": 72, - "Other": 0, -}; - -const latency_type = { - "<= 100 ms": 1, - "> 100 ms": 0, -}; - -const bus_codes = { - Business: "B", - Residential: "R", - Both: "X", -}; - -const StyledInput = styled('input')({ - display: 'none', -}); - - - -export default function Upload() { - const router = useRouter(); - const [files, setFiles] = React.useState([]); - const [folders, setFolders] = React.useState([]); - - - const { folderID, setFolderID } = useFolder(); - - const [importFolderID, setImportFolderID] = React.useState(-1); - - const months = Array.from({ length: 12 }, (_, i) => i + 1); // Months 1-12 - const currentYear = new Date().getFullYear(); - const years = Array.from({ length: 10 }, (_, i) => currentYear - 5 + i); - - const [newDeadline, setNewDeadline] = React.useState({ month: '', year: '' }); - - const [errorRows, setErrorRows] = React.useState(new Set()); - - const [fileIdCounter, setFileIdCounter] = React.useState(0); - - const [previousFiles, setPreviousFiles] = React.useState([]); - - const allowedExtensions = ["kml", "geojson", "csv"]; - const { setShouldFetchTaskInfo } = React.useContext(FetchTaskInfoContext); - - const { setShouldReloadMap } = React.useContext(ReloadMapContext); - - const fetchFiles = async (folderId, importFolderId) => { - let folderToFetch = folderId; - if (folderToFetch === -1) { - if (importFolderId != -1) { - folderToFetch = importFolderId; - } - else { - return; - } - } - - const response = await fetch(`${backend_url}/api/files?folder_ID=${folderToFetch}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - return; - } - - const data = await response.json(); - if (data.status === 'error') { - toast.error(data.message); - return; - } - - - setPreviousFiles(data.map(file => ({ name: file.name }))); - }; - - React.useEffect(() => { - - fetchFiles(folderID, importFolderID); - }, [folderID, importFolderID]); - - const fetchFolders = async () => { - try { - const response = await fetch(`${backend_url}/api/folders-with-deadlines`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - credentials: "include", - }); - - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - router.push("/login"); - return; - } - - const data = await response.json(); - setFolders(data); - - } catch (error) { - console.error("Error fetching folders:", error); - } - }; - - - - const handleDeadlineSelect = (newFolderID) => { - if (newFolderID === folderID) { - return; - } - if (newFolderID === -1) { - // Reset deadline selection - setNewDeadline({ month: '', year: '' }); - } - else { - const selectedFolder = folders.find(folder => folder.folder_id === newFolderID); - if (selectedFolder) { - // Parse the deadline date of the selected folder - const date = new Date(selectedFolder.deadline); - const month = date.getMonth() + 1; // getMonth() is zero-indexed, so add 1 - const year = date.getFullYear(); - // Set newDeadline to reflect the selected folder's deadline - setNewDeadline({ month: month.toString(), year: year.toString() }); - } - } - setFolderID(newFolderID); - setShouldReloadMap(true); - }; - - const handleImportChange = (event) => { - const selectedFolderID = event.target.value; - setImportFolderID(selectedFolderID); - - }; - - const handleNewDeadlineChange = ({ month, year }) => { - - setNewDeadline({ month, year }); - - }; - - - const handleDelete = (id) => { - setFiles(files.filter(file => file.id !== id)); - }; - - const handleFileChange = async (event) => { - const fileArray = Array.from(event.target.files); - let currentId = fileIdCounter; - const newFiles = []; - - for (const file of fileArray) { - // Check if the file is already in the selected files - const existingFile = files.find(f => f.name === file.name); - if (existingFile) { - toast.error(`File '${file.name}' is already selected.`); - continue; // Skip to the next file - } - - // Check if the file exists on the server - const fileExistsOnServer = previousFiles.some(f => f.name === file.name); - if (fileExistsOnServer) { - toast.error(`The file "${file.name}" already exists on the server. If this is a different document, please rename it and upload again.`); - continue; // Skip to the next file - } - - newFiles.push({ - id: currentId++, - name: file.name, - downloadSpeed: '', - uploadSpeed: '', - techType: '', - networkType: '', - latency: '', - categoryCode: '', - file, - }); - } - - setFileIdCounter(currentId); // Update fileIdCounter to the new value after all files are processed - setFiles(prevFiles => [...prevFiles, ...newFiles]); // Properly append new files to the existing list - }; - - const handleRowUpdate = (newRow) => { - setFiles(prevFiles => prevFiles.map(file => { - if (file.id === newRow.id) { - return newRow; // return the modified newRow directly - } - return file; - })); - return newRow; // Important: Return the modified newRow to the DataGrid - }; - - - React.useEffect(() => { - fetchFolders(); - }, []); - - - const columns = [ - { field: "name", headerName: "File Name", width: 250, editable: true }, - { field: "downloadSpeed", headerName: "Download Speed (Mbps)", type: 'number', editable: true }, - { field: "uploadSpeed", headerName: "Upload Speed (Mbps)", type: 'number', editable: true }, - { field: "techType", headerName: "Technology Type", width: 250, type: 'singleSelect', valueOptions: Object.keys(tech_types), editable: true }, - { field: "networkType", headerName: "Network Type", type: 'singleSelect', valueOptions: ["wired", "wireless"], editable: true }, - { field: "latency", headerName: "Latency", type: 'singleSelect', valueOptions: Object.keys(latency_type), editable: true }, - { field: "categoryCode", headerName: "Category", type: 'singleSelect', valueOptions: Object.keys(bus_codes), editable: true }, - { - field: "delete", - headerName: "Delete", - sortable: false, - width: 100, - renderCell: (params) => ( - - ) - } - ]; - - const getRowClassName = (params) => { - return errorRows.has(params.id) ? 'error-row' : 'normal-row'; - }; - - const processFiles = () => { - - if (files.length === 0) { - toast.error("Please upload your file"); - return; - } - - if (folderID === -1 && !files.some(file => file.file.name.endsWith('.csv'))) { - toast.error("Please upload your fabric"); - return; // Stop the function if the condition is met - } - - let hasErrors = false; - let newErrorRows = new Set(); - - for (let i = 0; i < files.length; i++) { - const file = files[i]; - if (file.file.name.endsWith('.csv')) { - continue; // Skip the rest of the current iteration and continue with the next file - } - console.log(file); - if (!file.downloadSpeed || !file.uploadSpeed || !file.techType || !file.networkType || !file.latency || !file.categoryCode) { - hasErrors = true; - newErrorRows.add(file.id); - } - } - - - setErrorRows(newErrorRows); - - - if (hasErrors) { - toast.error("Please fill all required fields before submitting."); - return; - } - - - const formData = new FormData(); - formData.append("deadline", `${newDeadline.year}-${newDeadline.month}-03`); - formData.append("importFolder", importFolderID); - - - files.forEach((fileDetails) => { - const fileExtension = fileDetails.file.name - .split(".") - .pop() - .toLowerCase(); - - if (!allowedExtensions.includes(fileExtension)) { - toast.error("Invalid File Format. Please upload a KML, GeoJSON, or CSV file."); - return; - } - - const processedFileDetails = { - ...fileDetails, - techType: tech_types[fileDetails.techType], - latency: latency_type[fileDetails.latency], - categoryCode: bus_codes[fileDetails.categoryCode], - }; - - console.log(processedFileDetails); - - formData.append("fileData", JSON.stringify(processedFileDetails)); - formData.append("file", fileDetails.file); - }); - - - - fetch(`${backend_url}/api/submit-data/${folderID}`, { - method: "POST", - body: formData, - credentials: "include", - }) - .then((response) => { - if (response.status === 401) { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else { - return response.json(); - } - }) - .then((data) => { - if (data.status === 'success') { - toast.success("Your file is uploaded to the server for processing"); - setFiles([]); - setShouldFetchTaskInfo(true); - } - else { - if (data.message === "Create or join an organization to start working on a filing"){ - Swal.fire({ - icon: "error", - title: "Oops...", - text: data.message, - }); - router.push("/profile"); - } - else { - toast.error(data.message); - } - } - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: "There is an error on our end, please try again later", - }); - console.error("Error:", error); - - }); - }; - - return ( - - - -
- - You are working on filing for deadline: - - - {folderID === -1 && ( - <> - - Month - - - - Year - - - - Import Data from Previous Filing - - - - )} -
- - - getRowClassName({ id })} - processRowUpdate={handleRowUpdate} - sx={{ - '.MuiDataGrid-row': (theme) => ({ - '&.error-row': { - backgroundColor: '#ffcccc', // Light red background for error rows - color: '#cc0000', // Darker red text for error rows - }, - '&.normal-row': { - backgroundColor: '', // Light red background for error rows - color: '', // Darker red text for error rows - } - }) - }} - /> - - - - -
- ); -} diff --git a/front-end/components/UploadChallenge.js b/front-end/components/UploadChallenge.js deleted file mode 100644 index ca3de85..0000000 --- a/front-end/components/UploadChallenge.js +++ /dev/null @@ -1,25 +0,0 @@ -import React, { useState } from "react"; -import Upload from "../components/Upload"; -import { styled } from '@mui/material/styles'; -import { Typography } from "@mui/material"; - -const StyledTypography = styled(Typography)({ - marginTop: "20px", - marginBottom: "20px", -}); - -function UploadChallenge() { - const [uploadChallenge, setUploadChallenge] = useState(true); - - return ( -
- - Upload Challenge Data - - - {/* You can further add more components or information related to the challenge upload here */} -
- ); -} - -export default UploadChallenge; diff --git a/front-end/components/WirelessCoveragemap.js b/front-end/components/WirelessCoveragemap.js deleted file mode 100644 index 7ba51b4..0000000 --- a/front-end/components/WirelessCoveragemap.js +++ /dev/null @@ -1,405 +0,0 @@ -import React, { useEffect, useRef, useState, useContext } from "react"; -import maplibregl from "maplibre-gl"; -import "maplibre-gl/dist/maplibre-gl.css"; -import { styled } from "@mui/material/styles"; -import { backend_url, maptile_street, maptile_satelite, maptile_dark } from "../utils/settings"; -import { - Box, - Button, - Typography -} from '@mui/material'; -import SmallLoadingEffect from '../components/SmallLoadingEffect'; -import Swal from 'sweetalert2'; - -const ColorPalette = ({ mapping }) => { - const paletteElements = Object.entries(mapping).map(([loss, rgb]) => ( - theme.palette.getContrastText(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`), - }} - > - - {loss} dB - - - )); - - return ( - - - Loss Rate (dB) to Color Mapping - - {paletteElements} - - ); -}; - - -const WirelessCoveragemap = ({ imageUrl, transparentImageUrl, bounds, formData, colorMapping }) => { - const mapContainerRef = useRef(null); - const mapRef = useRef(null); - - const [showCoverage, setShowCoverage] = useState(false); - const [isLoadingForUntimedEffect, setIsLoadingForUntimedEffect] = useState(false); - - - // Initialize the map - useEffect(() => { - mapRef.current = new maplibregl.Map({ - container: mapContainerRef.current, - style: maptile_satelite, - center: [(bounds.east + bounds.west) / 2, (bounds.north + bounds.south) / 2], - zoom: 4, // Adjust the zoom level appropriately - transformRequest: (url) => { - if (url.startsWith(`${backend_url}/api/tiles/`)) { - return { - url: url, - credentials: 'include' // Include cookies for cross-origin requests - }; - } - } - }); - - return () => { - mapRef.current.remove(); - }; - }, []); // Empty dependency array ensures this only runs once on mount - - // Update the image overlay when imageUrl or bounds change - useEffect(() => { - mapRef.current.once('load', () => { - addImageOverlay(); - if (showCoverage) { - removeVectorTiles(); - addVectorTiles(); - fetchCoveredPoints(); - } - else { - removeVectorTiles(); - } - }); - - // If the map was already loaded, we need to manually trigger the update - if (mapRef.current.isStyleLoaded()) { - mapRef.current.fire('load'); - } - }, [imageUrl, transparentImageUrl, bounds, showCoverage]); // This will run every time imageUrl or bounds change - - const fetchLossToColorMapping = (towerId) => { - fetch(`${backend_url}/api/get-loss-color-mapping/${towerId}`, { - method: "GET", - credentials: "include", - }) - .then((response) => { - if (response.ok) { - return response.json(); - } else { - throw new Error('Failed to fetch loss to color mapping'); - } - }) - .then((mapping) => { - setColorMapping(mapping); // Update the state with the fetched mapping - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const fetchAndRenderGeoJSON = (task_id) => { - fetch(`${backend_url}/api/get-preview-geojson/${task_id}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then(response => { - if (!response.ok) { - throw new Error('Failed to fetch coverage data'); - } - return response.json(); // Get the blob directly from the response - }) - .then(geoJSONData => { - console.log(geoJSONData); - addGeoJSONLayer(geoJSONData); // Pass the GeoJSON data directly - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const addGeoJSONLayer = (geojsonData) => { - if (mapRef.current.getSource('geojson-layer')) { - mapRef.current.removeLayer('geojson-layer'); - mapRef.current.removeSource('geojson-layer'); - } - const geojsonObject = JSON.parse(geojsonData); - console.log(geojsonObject); - mapRef.current.addSource('geojson-layer', { - type: 'geojson', - data: geojsonObject - }); - - mapRef.current.addLayer({ - id: 'geojson-layer', - type: 'circle', // or any other type suitable for your data - source: 'geojson-layer', - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, // When zoom is less than or equal to 12, circle radius will be 1 - 12, - 2, - 15, - 3, // When zoom is more than 12, circle radius will be 3 - ], - "circle-color": "#00FF00", - - }, - }); - }; - - const addSource = () => { - const existingSource = mapRef.current.getSource("custom"); - if (existingSource) { - mapRef.current.removeSource("custom"); - } - - const tilesURL = `${backend_url}/api/tiles/{z}/{x}/{y}.pbf`; - mapRef.current.addSource("custom", { - type: "vector", - tiles: [tilesURL], - maxzoom: 16, - }); - }; - - const addLayers = () => { - - mapRef.current.addLayer({ - id: "custom-point", - type: "circle", - source: "custom", - paint: { - "circle-radius": [ - "interpolate", - ["linear"], - ["zoom"], - 5, - 0.5, // When zoom is less than or equal to 12, circle radius will be 1 - 12, - 2, - 15, - 3, // When zoom is more than 12, circle radius will be 3 - ], - "circle-color": "#FF0000", - - }, - filter: ["==", ["get", "feature_type"], "Point"], // Only apply this layer to points - "source-layer": "data", - }); - }; - - const removeVectorTiles = () => { - if (mapRef.current.getLayer("custom-point")) { - mapRef.current.removeLayer("custom-point"); - } - - if (mapRef.current.getSource("custom")) { - mapRef.current.removeSource("custom"); - } - }; - - const addVectorTiles = () => { - removeVectorTiles(); - addSource(); - addLayers(); - mapRef.current.on("click", "custom-point", function (e) { - let featureProperties = e.features[0].properties; - - let featureId = e.features[0].id; - let content = "

Marker Information

"; - content += `

Location ID: ${featureId}

`; - for (let property in featureProperties) { - content += `

${property}: ${featureProperties[property]}

`; - } - - new maplibregl.Popup({ closeOnClick: false }) - .setLngLat(e.lngLat) - .setHTML(content) - .addTo(mapRef.current); - }); - }; - - - const addImageOverlay = () => { - const map = mapRef.current; - if (map && imageUrl && transparentImageUrl && bounds) { - // Ensure the bounds are numbers - const westBound = parseFloat(bounds.west); - const eastBound = parseFloat(bounds.east); - const northBound = parseFloat(bounds.north); - const southBound = parseFloat(bounds.south); - - - if (map.getSource('image-overlay')) { - map.removeLayer('overlay'); - map.removeSource('image-overlay'); - } - - const imgUrl = showCoverage ? transparentImageUrl : imageUrl; - // Add new image source - map.addSource('image-overlay', { - type: 'image', - url: imgUrl, - coordinates: [ - [westBound, northBound], // top left - [eastBound, northBound], // top right - [eastBound, southBound], // bottom right - [westBound, southBound], // bottom left - ], - }); - - // Add new image layer - - map.addLayer({ - id: 'overlay', - source: 'image-overlay', - type: 'raster', - paint: { - 'raster-opacity': 0.85, - 'raster-fade-duration': 0, - }, - }); - - - const longitude = (westBound + eastBound) / 2; - const latitude = (northBound + southBound) / 2; - mapRef.current.flyTo({ - center: [longitude, latitude], - zoom: 8, - }); - - } - } - - const fetchCoveredPoints = () => { - if (showCoverage) { - setIsLoadingForUntimedEffect(true); - fetch(`${backend_url}/api/preview-wireless-prediction-fabric-coverage`, { - method: "POST", - headers: { - 'Content-Type': 'application/json', // Set the content type to application/json - }, - body: JSON.stringify(formData), // Serialize formData to JSON - credentials: "include", - }) - .then((response) => { - if (response.status === 401) { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else if (response.status === 200) { - return response.json(); - } else if (response.status === 500 || response.status === 400) { - setIsLoadingForUntimedEffect(false); - toast.error( - "There is an error on our end", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 10000, - } - ); - } - }) - .then((data) => { - if (data) { - const intervalId = setInterval(() => { - fetch(`${backend_url}/api/status/${data.task_id}`) - .then((statusResponse) => statusResponse.json()) - .then((status) => { - if (status.state === "SUCCESS") { - // Task is complete, handle the points data - setIsLoadingForUntimedEffect(false); - clearInterval(intervalId); - - console.log(status); - const statusObject = JSON.parse(status.status.replace(/'/g, "\"")); - console.log(statusObject); - fetchAndRenderGeoJSON(statusObject.geojson_filename); // Now 'pointsData' is a JavaScript object - - - } else if (status.state === "FAILURE") { - // Handle failure - setIsLoadingForUntimedEffect(false); - clearInterval(intervalId); - console.error("Task failed with error:", status.status); - } - }); - }, 5000); - } - }) - .catch((error) => { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "There is an error on our end, please try again later", - }); - console.error("Error:", error); - - }); - } - } - - const toggleCoverageView = () => { - setShowCoverage(!showCoverage); - }; - - - return ( -
-
- {(isLoadingForUntimedEffect) && } -
-
- {(imageUrl) && - } -
-
- - {(!showCoverage && imageUrl) && - } -
- ); -}; - -export default WirelessCoveragemap; \ No newline at end of file diff --git a/front-end/contexts/EditLayerVisibilityContext.js b/front-end/contexts/EditLayerVisibilityContext.js deleted file mode 100644 index 55a6a5e..0000000 --- a/front-end/contexts/EditLayerVisibilityContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const EditLayerVisibilityContext = React.createContext({ - editLayers: [], // This will store the mapping of filename to visibility - setEditLayers: () => {}, -}); - -export default EditLayerVisibilityContext; \ No newline at end of file diff --git a/front-end/contexts/EditLayerVisibilityProvider.js b/front-end/contexts/EditLayerVisibilityProvider.js deleted file mode 100644 index e1777a1..0000000 --- a/front-end/contexts/EditLayerVisibilityProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from 'react'; -import EditLayerVisibilityContext from './EditLayerVisibilityContext'; - -const EditLayerVisibilityProvider = ({ children }) => { - const [editLayers, setEditLayers] = useState([]); - - // The value object contains the current state and the updater function - const value = { editLayers, setEditLayers }; - - return ( - - {children} - - ); -} - -export default EditLayerVisibilityProvider; \ No newline at end of file diff --git a/front-end/contexts/EditMapContext.js b/front-end/contexts/EditMapContext.js deleted file mode 100755 index afe9f58..0000000 --- a/front-end/contexts/EditMapContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const EditMapContext = React.createContext({ - isEditingMap: false, // This will store the boolean state indicating if the map is being edited - setEditingMap: () => {}, -}); - -export default EditMapContext; \ No newline at end of file diff --git a/front-end/contexts/EditMapProvider.js b/front-end/contexts/EditMapProvider.js deleted file mode 100755 index a969fac..0000000 --- a/front-end/contexts/EditMapProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from 'react'; -import EditMapContext from './EditMapContext'; - -const EditMapProvider = ({ children }) => { - const [isEditingMap, setEditingMap] = useState(false); - - // The value object contains the current state and the updater function - const value = { isEditingMap, setEditingMap }; - - return ( - - {children} - - ); -} - -export default EditMapProvider; \ No newline at end of file diff --git a/front-end/contexts/FetchTaskInfoContext.js b/front-end/contexts/FetchTaskInfoContext.js deleted file mode 100644 index 0ca4405..0000000 --- a/front-end/contexts/FetchTaskInfoContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const FetchTaskInfoContext = React.createContext({ - shouldFetchTaskInfo: false, // This will store the mapping of filename to visibility - setShouldFetchTaskInfo: () => {}, -}); - -export default FetchTaskInfoContext; \ No newline at end of file diff --git a/front-end/contexts/FetchTaskInfoProvider.js b/front-end/contexts/FetchTaskInfoProvider.js deleted file mode 100644 index 669da75..0000000 --- a/front-end/contexts/FetchTaskInfoProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from 'react'; -import FetchTaskInfoContext from './FetchTaskInfoContext'; - -const FetchTaskInfoProvider = ({ children }) => { - const [shouldFetchTaskInfo, setShouldFetchTaskInfo] = useState(false); - - // The value object contains the current state and the updater function - const value = { shouldFetchTaskInfo, setShouldFetchTaskInfo }; - - return ( - - {children} - - ); -} - -export default FetchTaskInfoProvider; \ No newline at end of file diff --git a/front-end/contexts/FolderContext.js b/front-end/contexts/FolderContext.js deleted file mode 100644 index 9741efb..0000000 --- a/front-end/contexts/FolderContext.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, {createContext, useContext, useState} from 'react'; - -const FolderContext = createContext(); - -export const FolderProvider = ({children}) =>{ - const [folderID,setFolderID] = useState(-1); - - - return( - - {children} - - ); - -}; - -export const useFolder = () => useContext(FolderContext) \ No newline at end of file diff --git a/front-end/contexts/LayerVisibilityContext.js b/front-end/contexts/LayerVisibilityContext.js deleted file mode 100755 index 9c316c0..0000000 --- a/front-end/contexts/LayerVisibilityContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const LayerVisibilityContext = React.createContext({ - layers: {}, // This will store the mapping of filename to visibility - setLayers: () => {}, -}); - -export default LayerVisibilityContext; \ No newline at end of file diff --git a/front-end/contexts/LayerVisibilityProvider.js b/front-end/contexts/LayerVisibilityProvider.js deleted file mode 100755 index 20e603b..0000000 --- a/front-end/contexts/LayerVisibilityProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from 'react'; -import LayerVisibilityContext from './LayerVisibilityContext'; - -const LayerVisibilityProvider = ({ children }) => { - const [layers, setLayers] = useState({}); - - // The value object contains the current state and the updater function - const value = { layers, setLayers }; - - return ( - - {children} - - ); -} - -export default LayerVisibilityProvider; \ No newline at end of file diff --git a/front-end/contexts/ReloadMapContext.js b/front-end/contexts/ReloadMapContext.js deleted file mode 100644 index cf24d20..0000000 --- a/front-end/contexts/ReloadMapContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const ReloadMapContext = React.createContext({ - shouldReloadMap: false, // This will store the mapping of filename to visibility - setShouldReloadMap: () => {}, -}); - -export default ReloadMapContext; \ No newline at end of file diff --git a/front-end/contexts/ReloadMapProvider.js b/front-end/contexts/ReloadMapProvider.js deleted file mode 100644 index febfecb..0000000 --- a/front-end/contexts/ReloadMapProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from 'react'; -import ReloadMapContext from './ReloadMapContext'; - -const ReloadMapProvider = ({ children }) => { - const [shouldReloadMap, setShouldReloadMap] = useState(false); - - // The value object contains the current state and the updater function - const value = { shouldReloadMap, setShouldReloadMap }; - - return ( - - {children} - - ); -} - -export default ReloadMapProvider; \ No newline at end of file diff --git a/front-end/contexts/SelectedLocationContext.js b/front-end/contexts/SelectedLocationContext.js deleted file mode 100755 index 0249673..0000000 --- a/front-end/contexts/SelectedLocationContext.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; - -const SelectedLocationContext = React.createContext({ - location: null, - setLocation: () => {}, -}); - -export default SelectedLocationContext; \ No newline at end of file diff --git a/front-end/contexts/SelectedLocationProvider.js b/front-end/contexts/SelectedLocationProvider.js deleted file mode 100755 index eb42014..0000000 --- a/front-end/contexts/SelectedLocationProvider.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useState } from "react"; -import SelectedLocationContext from "./SelectedLocationContext"; - -function SelectedLocationProvider({ children }) { - const [location, setLocation] = useState(null); - - // The value object contains the current state and the updater function - const value = { location, setLocation }; - - return ( - - {children} - - ); -} - -export default SelectedLocationProvider; \ No newline at end of file diff --git a/front-end/contexts/SelectedPolygonAreaContext.js b/front-end/contexts/SelectedPolygonAreaContext.js deleted file mode 100644 index 724173b..0000000 --- a/front-end/contexts/SelectedPolygonAreaContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const SelectedPolygonAreaContext = React.createContext({ - selectedPolygonsArea: [], // Initialize as an empty 2D array - setSelectedPolygonsArea: () => {}, -}); - -export default SelectedPolygonAreaContext; diff --git a/front-end/contexts/SelectedPolygonAreaProvider.js b/front-end/contexts/SelectedPolygonAreaProvider.js deleted file mode 100644 index 099b4e5..0000000 --- a/front-end/contexts/SelectedPolygonAreaProvider.js +++ /dev/null @@ -1,18 +0,0 @@ -import React, { useState } from "react"; -import SelectedPolygonAreaContext from "./SelectedPolygonAreaContext"; - -function SelectedPolygonAreaProvider({ children }) { - // Initialize state as an empty 2D array - const [selectedPolygonsArea, setSelectedPolygonsArea] = useState([]); - - // The value object contains the current state and the updater function - const value = { selectedPolygonsArea, setSelectedPolygonsArea }; - - return ( - - {children} - - ); -} - -export default SelectedPolygonAreaProvider; \ No newline at end of file diff --git a/front-end/contexts/SelectedPolygonContext.js b/front-end/contexts/SelectedPolygonContext.js deleted file mode 100644 index 1433cea..0000000 --- a/front-end/contexts/SelectedPolygonContext.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -// Create a context with default values -const SelectedPolygonContext = React.createContext({ - selectedPolygons: [], // Initialize as an empty 2D array - setSelectedPolygons: () => {}, -}); - -export default SelectedPolygonContext; diff --git a/front-end/contexts/SelectedPolygonProvider.js b/front-end/contexts/SelectedPolygonProvider.js deleted file mode 100644 index eca26a9..0000000 --- a/front-end/contexts/SelectedPolygonProvider.js +++ /dev/null @@ -1,18 +0,0 @@ -import React, { useState } from "react"; -import SelectedPolygonContext from "./SelectedPolygonContext"; - -function SelectedPolygonProvider({ children }) { - // Initialize state as an empty 2D array - const [selectedPolygons, setSelectedPolygons] = useState([]); - - // The value object contains the current state and the updater function - const value = { selectedPolygons, setSelectedPolygons }; - - return ( - - {children} - - ); -} - -export default SelectedPolygonProvider; diff --git a/front-end/jest.config.js b/front-end/jest.config.js deleted file mode 100644 index 8f5ee6b..0000000 --- a/front-end/jest.config.js +++ /dev/null @@ -1,15 +0,0 @@ -// Jest config via next/jest — wires up the Next SWC transform, CSS-module -// mocking, and module aliases so components compile exactly as the app builds -// them. Tests run in jsdom (a simulated DOM in Node) — no real browser needed. -const nextJest = require("next/jest"); - -const createJestConfig = nextJest({ dir: "./" }); - -/** @type {import('jest').Config} */ -const customJestConfig = { - testEnvironment: "jest-environment-jsdom", - setupFilesAfterEnv: ["/jest.setup.js"], - testMatch: ["/__tests__/**/*.test.js"], -}; - -module.exports = createJestConfig(customJestConfig); diff --git a/front-end/jest.setup.js b/front-end/jest.setup.js deleted file mode 100644 index 074872d..0000000 --- a/front-end/jest.setup.js +++ /dev/null @@ -1,3 +0,0 @@ -// Adds the @testing-library/jest-dom matchers (toBeInTheDocument, -// toHaveTextContent, ...) to every test. -import "@testing-library/jest-dom"; diff --git a/front-end/package-lock.json b/front-end/package-lock.json deleted file mode 100755 index 184b015..0000000 --- a/front-end/package-lock.json +++ /dev/null @@ -1,9363 +0,0 @@ -{ - "name": "next-app", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "next-app", - "version": "0.1.0", - "dependencies": { - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@mapbox/mapbox-gl-draw": "^1.4.2", - "@maptiler/sdk": "^1.1.1", - "@mui/icons-material": "^5.11.16", - "@mui/material": "^5.14.4", - "@mui/x-data-grid": "^6.4.0", - "@turf/turf": "^6.5.0", - "d3": "^7.8.5", - "date-fns": "^3.6.0", - "lodash.debounce": "^4.0.8", - "maplibre-gl": "^3.1.0", - "next": "^13.4.19", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3", - "react-loading": "^2.0.3", - "react-router-dom": "^6.14.1", - "react-toastify": "^9.1.3", - "sweetalert2": "^11.7.12" - }, - "devDependencies": { - "@testing-library/jest-dom": "^6.9.1", - "@testing-library/react": "^14.3.1", - "@testing-library/user-event": "^14.6.1", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0" - } - }, - "node_modules/@adobe/css-tools": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.5.0.tgz", - "integrity": "sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==", - "dev": true - }, - "node_modules/@babel/code-frame": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", - "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.29.7", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", - "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/@babel/generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", - "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", - "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", - "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", - "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", - "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", - "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", - "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", - "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", - "dependencies": { - "@babel/types": "^7.29.7" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", - "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", - "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", - "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", - "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", - "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", - "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", - "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", - "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@emotion/babel-plugin": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", - "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", - "dependencies": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/runtime": "^7.18.3", - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/serialize": "^1.1.2", - "babel-plugin-macros": "^3.1.0", - "convert-source-map": "^1.5.0", - "escape-string-regexp": "^4.0.0", - "find-root": "^1.1.0", - "source-map": "^0.5.7", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", - "dependencies": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/hash": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", - "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" - }, - "node_modules/@emotion/is-prop-valid": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", - "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", - "dependencies": { - "@emotion/memoize": "^0.8.1" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" - }, - "node_modules/@emotion/react": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.0.tgz", - "integrity": "sha512-ZSK3ZJsNkwfjT3JpDAWJZlrGD81Z3ytNDsxw1LKq1o+xkmO5pnWfr6gmCC8gHEFf3nSSX/09YrG67jybNPxSUw==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/cache": "^11.11.0", - "@emotion/serialize": "^1.1.2", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", - "hoist-non-react-statics": "^3.3.1" - }, - "peerDependencies": { - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/serialize": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", - "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", - "dependencies": { - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/unitless": "^0.8.1", - "@emotion/utils": "^1.2.1", - "csstype": "^3.0.2" - } - }, - "node_modules/@emotion/sheet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" - }, - "node_modules/@emotion/styled": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", - "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/is-prop-valid": "^1.2.1", - "@emotion/serialize": "^1.1.2", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1" - }, - "peerDependencies": { - "@emotion/react": "^11.0.0-rc.0", - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/unitless": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", - "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" - }, - "node_modules/@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", - "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", - "peerDependencies": { - "react": ">=16.8.0" - } - }, - "node_modules/@emotion/utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" - }, - "node_modules/@emotion/weak-memoize": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", - "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", - "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@mapbox/extent": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@mapbox/extent/-/extent-0.4.0.tgz", - "integrity": "sha512-MSoKw3qPceGuupn04sdaJrFeLKvcSETVLZCGS8JA9x6zXQL3FWiKaIXYIZEDXd5jpXpWlRxinCZIN49yRy0C9A==" - }, - "node_modules/@mapbox/geojson-area": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz", - "integrity": "sha512-bBqqFn1kIbLBfn7Yq1PzzwVkPYQr9lVUeT8Dhd0NL5n76PBuXzOcuLV7GOSbEB1ia8qWxH4COCvFpziEu/yReA==", - "dependencies": { - "wgs84": "0.0.0" - } - }, - "node_modules/@mapbox/geojson-coords": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-coords/-/geojson-coords-0.0.2.tgz", - "integrity": "sha512-YuVzpseee/P1T5BWyeVVPppyfmuXYHFwZHmybkqaMfu4BWlOf2cmMGKj2Rr92MwfSTOCSUA0PAsVGRG8akY0rg==", - "dependencies": { - "@mapbox/geojson-normalize": "0.0.1", - "geojson-flatten": "^1.0.4" - } - }, - "node_modules/@mapbox/geojson-extent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-extent/-/geojson-extent-1.0.1.tgz", - "integrity": "sha512-hh8LEO3djT4fqfr8sSC6wKt+p0TMiu+KOLMBUiFOyj+zGq7+IXwQGl0ppCVDkyzCewyd9LoGe9zAvDxXrLfhLw==", - "dependencies": { - "@mapbox/extent": "0.4.0", - "@mapbox/geojson-coords": "0.0.2", - "rw": "~0.1.4", - "traverse": "~0.6.6" - }, - "bin": { - "geojson-extent": "bin/geojson-extent" - } - }, - "node_modules/@mapbox/geojson-extent/node_modules/rw": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/rw/-/rw-0.1.4.tgz", - "integrity": "sha512-vSj3D96kMcjNyqPcp65wBRIDImGSrUuMxngNNxvw8MQaO+aQ6llzRPH7XcJy5zrpb3wU++045+Uz/IDIM684iw==" - }, - "node_modules/@mapbox/geojson-normalize": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-normalize/-/geojson-normalize-0.0.1.tgz", - "integrity": "sha512-82V7YHcle8lhgIGqEWwtXYN5cy0QM/OHq3ypGhQTbvHR57DF0vMHMjjVSQKFfVXBe/yWCBZTyOuzvK7DFFnx5Q==", - "bin": { - "geojson-normalize": "geojson-normalize" - } - }, - "node_modules/@mapbox/geojson-rewind": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", - "integrity": "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==", - "dependencies": { - "get-stream": "^6.0.1", - "minimist": "^1.2.6" - }, - "bin": { - "geojson-rewind": "geojson-rewind" - } - }, - "node_modules/@mapbox/jsonlint-lines-primitives": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@mapbox/mapbox-gl-draw": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-draw/-/mapbox-gl-draw-1.4.2.tgz", - "integrity": "sha512-Zvl5YN+tIuYZlzPmuzOgkoJsZX6sHMQsnFI+O3ox8EwYkpLO2w0U2FvVhQuVnq1Yys12x6UnF+0IPoEdBy2UfA==", - "dependencies": { - "@mapbox/geojson-area": "^0.2.2", - "@mapbox/geojson-extent": "^1.0.1", - "@mapbox/geojson-normalize": "^0.0.1", - "@mapbox/point-geometry": "^0.1.0", - "hat": "0.0.3", - "lodash.isequal": "^4.5.0", - "xtend": "^4.0.2" - } - }, - "node_modules/@mapbox/point-geometry": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" - }, - "node_modules/@mapbox/tiny-sdf": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", - "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" - }, - "node_modules/@mapbox/unitbezier": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", - "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" - }, - "node_modules/@mapbox/vector-tile": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", - "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", - "dependencies": { - "@mapbox/point-geometry": "~0.1.0" - } - }, - "node_modules/@mapbox/whoots-js": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", - "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.2.1.tgz", - "integrity": "sha512-ZVT5QlkVhlxlPav+ca0NO3Moc7EzbHDO2FXW4ic3Q0Vm+TDUw9I8A2EBws7xUUQZf7HQB3kQ+3Jsh5mFLRD4GQ==", - "dependencies": { - "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/unitbezier": "^0.0.1", - "@types/mapbox__point-geometry": "^0.1.2", - "json-stringify-pretty-compact": "^3.0.0", - "minimist": "^1.2.8", - "rw": "^1.3.3", - "sort-object": "^3.0.3" - }, - "bin": { - "gl-style-format": "dist/gl-style-format.mjs", - "gl-style-migrate": "dist/gl-style-migrate.mjs", - "gl-style-validate": "dist/gl-style-validate.mjs" - } - }, - "node_modules/@maptiler/client": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@maptiler/client/-/client-1.5.0.tgz", - "integrity": "sha512-7YL2SJ3VantBnwuly5333PIHx1ihUpNBiMC5iiQtYFfhceSaFpJPe7G6ANpPxG4iENVLW9hFRQERC5sGwvjAJw==", - "dependencies": { - "@types/geojson": "^7946.0.10" - } - }, - "node_modules/@maptiler/sdk": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@maptiler/sdk/-/sdk-1.1.1.tgz", - "integrity": "sha512-Jp8p6fbX3du0aiFQTcKWGVeJty+43H43p94t9ohjJiIWhuParFh/BpzTnhJjNeWkXb9p7lD5zU5jdDV068lcvA==", - "dependencies": { - "@maptiler/client": "^1.5.0", - "events": "^3.3.0", - "js-base64": "^3.7.4", - "maplibre-gl": "^3.1.0", - "uuid": "^9.0.0" - } - }, - "node_modules/@mui/base": { - "version": "5.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.10.tgz", - "integrity": "sha512-moTAhGwFfQffj7hsu61FnqcGqVcd53A1CrOhnskM9TF0Uh2rnLDMCuar4JRUWWpaJofAfQEbQBBFPadFQLI4PA==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@emotion/is-prop-valid": "^1.2.1", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.4", - "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", - "prop-types": "^15.8.1", - "react-is": "^18.2.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/base/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@mui/core-downloads-tracker": { - "version": "5.14.4", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.4.tgz", - "integrity": "sha512-pW2XghSi3hpYKX57Wu0SCWMTSpzvXZmmucj3TcOJWaCiFt4xr05w2gcwBZi36dAp9uvd9//9N51qbblmnD+GPg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - } - }, - "node_modules/@mui/icons-material": { - "version": "5.11.16", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.11.16.tgz", - "integrity": "sha512-oKkx9z9Kwg40NtcIajF9uOXhxiyTZrrm9nmIJ4UjkU2IdHpd4QVLbCc/5hZN/y0C6qzi2Zlxyr9TGddQx2vx2A==", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@mui/material": "^5.0.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/material": { - "version": "5.14.4", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.4.tgz", - "integrity": "sha512-2XUV3KyRC07BQPPzEgd+ss3x/ezXtHeKtOGCMCNmx3MauZojPYUpSwFkE0fYgYCD9dMQMVG4DY/VF38P0KShsg==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@mui/base": "5.0.0-beta.10", - "@mui/core-downloads-tracker": "^5.14.4", - "@mui/system": "^5.14.4", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.4", - "@types/react-transition-group": "^4.4.6", - "clsx": "^2.0.0", - "csstype": "^3.1.2", - "prop-types": "^15.8.1", - "react-is": "^18.2.0", - "react-transition-group": "^4.4.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/material/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@mui/private-theming": { - "version": "5.14.4", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.4.tgz", - "integrity": "sha512-ISXsHDiQ3z1XA4IuKn+iXDWvDjcz/UcQBiFZqtdoIsEBt8CB7wgdQf3LwcwqO81dl5ofg/vNQBEnXuKfZHrnYA==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@mui/utils": "^5.14.4", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/styled-engine": { - "version": "5.13.2", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.13.2.tgz", - "integrity": "sha512-VCYCU6xVtXOrIN8lcbuPmoG+u7FYuOERG++fpY74hPpEWkyFQG97F+/XfTQVYzlR2m7nPjnwVUgATcTCMEaMvw==", - "dependencies": { - "@babel/runtime": "^7.21.0", - "@emotion/cache": "^11.11.0", - "csstype": "^3.1.2", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@emotion/react": "^11.4.1", - "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - } - } - }, - "node_modules/@mui/system": { - "version": "5.14.4", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.4.tgz", - "integrity": "sha512-oPgfWS97QNfHcDBapdkZIs4G5i85BJt69Hp6wbXF6s7vi3Evcmhdk8AbCRW6n0sX4vTj8oe0mh0RIm1G2A1KDA==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@mui/private-theming": "^5.14.4", - "@mui/styled-engine": "^5.13.2", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.4", - "clsx": "^2.0.0", - "csstype": "^3.1.2", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/system/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@mui/types": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.4.tgz", - "integrity": "sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==", - "peerDependencies": { - "@types/react": "*" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils": { - "version": "5.14.4", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.4.tgz", - "integrity": "sha512-4ANV0txPD3x0IcTCSEHKDWnsutg1K3m6Vz5IckkbLXVYu17oOZCVUdOKsb/txUmaCd0v0PmSRe5PW+Mlvns5dQ==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@types/prop-types": "^15.7.5", - "@types/react-is": "^18.2.1", - "prop-types": "^15.8.1", - "react-is": "^18.2.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "react": "^17.0.0 || ^18.0.0" - } - }, - "node_modules/@mui/x-data-grid": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-6.4.0.tgz", - "integrity": "sha512-rFpjJh4ZTJW3JnjmTsn5B32PMMJtjxTdRZyjn3Re5K/BA/iJQvN1qHO26qoqbo4Vt3b3dbRLThM/Q0N59PL2Fw==", - "dependencies": { - "@babel/runtime": "^7.21.0", - "@mui/utils": "^5.12.3", - "clsx": "^1.2.1", - "prop-types": "^15.8.1", - "reselect": "^4.1.8" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui" - }, - "peerDependencies": { - "@mui/material": "^5.4.1", - "@mui/system": "^5.4.1", - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" - } - }, - "node_modules/@next/env": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.19.tgz", - "integrity": "sha512-FsAT5x0jF2kkhNkKkukhsyYOrRqtSxrEhfliniIq0bwWbuXLgyt3Gv0Ml+b91XwjwArmuP7NxCiGd++GGKdNMQ==" - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.19.tgz", - "integrity": "sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.19.tgz", - "integrity": "sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.19.tgz", - "integrity": "sha512-vdlnIlaAEh6H+G6HrKZB9c2zJKnpPVKnA6LBwjwT2BTjxI7e0Hx30+FoWCgi50e+YO49p6oPOtesP9mXDRiiUg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.19.tgz", - "integrity": "sha512-aU0HkH2XPgxqrbNRBFb3si9Ahu/CpaR5RPmN2s9GiM9qJCiBBlZtRTiEca+DC+xRPyCThTtWYgxjWHgU7ZkyvA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.19.tgz", - "integrity": "sha512-htwOEagMa/CXNykFFeAHHvMJeqZfNQEoQvHfsA4wgg5QqGNqD5soeCer4oGlCol6NGUxknrQO6VEustcv+Md+g==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.19.tgz", - "integrity": "sha512-4Gj4vvtbK1JH8ApWTT214b3GwUh9EKKQjY41hH/t+u55Knxi/0wesMzwQRhppK6Ddalhu0TEttbiJ+wRcoEj5Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.19.tgz", - "integrity": "sha512-bUfDevQK4NsIAHXs3/JNgnvEY+LRyneDN788W2NYiRIIzmILjba7LaQTfihuFawZDhRtkYCv3JDC3B4TwnmRJw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.19.tgz", - "integrity": "sha512-Y5kikILFAr81LYIFaw6j/NrOtmiM4Sf3GtOc0pn50ez2GCkr+oejYuKGcwAwq3jiTKuzF6OF4iT2INPoxRycEA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.19.tgz", - "integrity": "sha512-YzA78jBDXMYiINdPdJJwGgPNT3YqBNNGhsthsDoWHL9p24tEJn9ViQf/ZqTbwSpX/RrkPupLfuuTH2sf73JBAw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@remix-run/router": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.7.1.tgz", - "integrity": "sha512-bgVQM4ZJ2u2CM8k1ey70o1ePFXsEzYVZoWghh6WjM8p59jQ7HxzbHW4SbnWFG7V9ig9chLawQxDTZ3xzOF8MkQ==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.10", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", - "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@swc/helpers": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", - "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@testing-library/dom": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", - "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "picocolors": "1.1.1", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@testing-library/jest-dom": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz", - "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==", - "dev": true, - "dependencies": { - "@adobe/css-tools": "^4.4.0", - "aria-query": "^5.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.6.3", - "picocolors": "^1.1.1", - "redent": "^3.0.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", - "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", - "dev": true - }, - "node_modules/@testing-library/react": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.3.1.tgz", - "integrity": "sha512-H99XjUhWQw0lTgyMN05W3xQG1Nh4lq574D8keFf1dDoNTJgp66VbJozRaczoF+wsiaPJNt/TcnfpLGufGxSrZQ==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^9.0.0", - "@types/react-dom": "^18.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" - } - }, - "node_modules/@testing-library/react/node_modules/@testing-library/dom": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", - "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.1.3", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@testing-library/react/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, - "dependencies": { - "deep-equal": "^2.0.5" - } - }, - "node_modules/@testing-library/react/node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/@testing-library/user-event": { - "version": "14.6.1", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.1.tgz", - "integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==", - "dev": true, - "engines": { - "node": ">=12", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", - "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@turf/along": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/along/-/along-6.5.0.tgz", - "integrity": "sha512-LLyWQ0AARqJCmMcIEAXF4GEu8usmd4Kbz3qk1Oy5HoRNpZX47+i5exQtmIWKdqJ1MMhW26fCTXgpsEs5zgJ5gw==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/angle": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-6.5.0.tgz", - "integrity": "sha512-4pXMbWhFofJJAOvTMCns6N4C8CMd5Ih4O2jSAG9b3dDHakj3O4yN1+Zbm+NUei+eVEZ9gFeVp9svE3aMDenIkw==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/area": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-6.5.0.tgz", - "integrity": "sha512-xCZdiuojokLbQ+29qR6qoMD89hv+JAgWjLrwSEWL+3JV8IXKeNFl6XkEJz9HGkVpnXvQKJoRz4/liT+8ZZ5Jyg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/bbox": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-6.5.0.tgz", - "integrity": "sha512-RBbLaao5hXTYyyg577iuMtDB8ehxMlUqHEJiMs8jT1GHkFhr6sYre3lmLsPeYEi/ZKj5TP5tt7fkzNdJ4GIVyw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/bbox-clip": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-6.5.0.tgz", - "integrity": "sha512-F6PaIRF8WMp8EmgU/Ke5B1Y6/pia14UAYB5TiBC668w5rVVjy5L8rTm/m2lEkkDMHlzoP9vNY4pxpNthE7rLcQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/bbox-polygon": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-6.5.0.tgz", - "integrity": "sha512-+/r0NyL1lOG3zKZmmf6L8ommU07HliP4dgYToMoTxqzsWzyLjaj/OzgQ8rBmv703WJX+aS6yCmLuIhYqyufyuw==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/bearing": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-6.5.0.tgz", - "integrity": "sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/bezier-spline": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-6.5.0.tgz", - "integrity": "sha512-vokPaurTd4PF96rRgGVm6zYYC5r1u98ZsG+wZEv9y3kJTuJRX/O3xIY2QnTGTdbVmAJN1ouOsD0RoZYaVoXORQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-clockwise": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-6.5.0.tgz", - "integrity": "sha512-45+C7LC5RMbRWrxh3Z0Eihsc8db1VGBO5d9BLTOAwU4jR6SgsunTfRWR16X7JUwIDYlCVEmnjcXJNi/kIU3VIw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-contains": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz", - "integrity": "sha512-4m8cJpbw+YQcKVGi8y0cHhBUnYT+QRfx6wzM4GI1IdtYH3p4oh/DOBJKrepQyiDzFDaNIjxuWXBh0ai1zVwOQQ==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-crosses": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-6.5.0.tgz", - "integrity": "sha512-gvshbTPhAHporTlQwBJqyfW+2yV8q/mOTxG6PzRVl6ARsqNoqYQWkd4MLug7OmAqVyBzLK3201uAeBjxbGw0Ng==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/polygon-to-line": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-disjoint": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-6.5.0.tgz", - "integrity": "sha512-rZ2ozlrRLIAGo2bjQ/ZUu4oZ/+ZjGvLkN5CKXSKBcu6xFO6k2bgqeM8a1836tAW+Pqp/ZFsTA5fZHsJZvP2D5g==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/polygon-to-line": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-equal": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-6.5.0.tgz", - "integrity": "sha512-cY0M3yoLC26mhAnjv1gyYNQjn7wxIXmL2hBmI/qs8g5uKuC2hRWi13ydufE3k4x0aNRjFGlg41fjoYLwaVF+9Q==", - "dependencies": { - "@turf/clean-coords": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "geojson-equality": "0.1.6" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-intersects": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-6.5.0.tgz", - "integrity": "sha512-nIxkizjRdjKCYFQMnml6cjPsDOBCThrt+nkqtSEcxkKMhAQj5OO7o2CecioNTaX8EayqwMGVKcsz27oP4mKPTw==", - "dependencies": { - "@turf/boolean-disjoint": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-6.5.0.tgz", - "integrity": "sha512-8btMIdnbXVWUa1M7D4shyaSGxLRw6NjMcqKBcsTXcZdnaixl22k7ar7BvIzkaRYN3SFECk9VGXfLncNS3ckQUw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/line-overlap": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-equality": "0.1.6" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-parallel": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-6.5.0.tgz", - "integrity": "sha512-aSHJsr1nq9e5TthZGZ9CZYeXklJyRgR5kCLm5X4urz7+MotMOp/LsGOsvKvK9NeUl9+8OUmfMn8EFTT8LkcvIQ==", - "dependencies": { - "@turf/clean-coords": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-point-in-polygon": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz", - "integrity": "sha512-DtSuVFB26SI+hj0SjrvXowGTUCHlgevPAIsukssW6BG5MlNSBQAo70wpICBNJL6RjukXg8d2eXaAWuD/CqL00A==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-point-on-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-6.5.0.tgz", - "integrity": "sha512-A1BbuQ0LceLHvq7F/P7w3QvfpmZqbmViIUPHdNLvZimFNLo4e6IQunmzbe+8aSStH9QRZm3VOflyvNeXvvpZEQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/boolean-within": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-6.5.0.tgz", - "integrity": "sha512-YQB3oU18Inx35C/LU930D36RAVe7LDXk1kWsQ8mLmuqYn9YdPsDQTMTkLJMhoQ8EbN7QTdy333xRQ4MYgToteQ==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/buffer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-6.5.0.tgz", - "integrity": "sha512-qeX4N6+PPWbKqp1AVkBVWFerGjMYMUyencwfnkCesoznU6qvfugFHNAngNqIBVnJjZ5n8IFyOf+akcxnrt9sNg==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/center": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/projection": "^6.5.0", - "d3-geo": "1.7.1", - "turf-jsts": "*" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/buffer/node_modules/d3-array": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", - "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==" - }, - "node_modules/@turf/buffer/node_modules/d3-geo": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.7.1.tgz", - "integrity": "sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw==", - "dependencies": { - "d3-array": "1" - } - }, - "node_modules/@turf/center": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/center/-/center-6.5.0.tgz", - "integrity": "sha512-T8KtMTfSATWcAX088rEDKjyvQCBkUsLnK/Txb6/8WUXIeOZyHu42G7MkdkHRoHtwieLdduDdmPLFyTdG5/e7ZQ==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/center-mean": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-6.5.0.tgz", - "integrity": "sha512-AAX6f4bVn12pTVrMUiB9KrnV94BgeBKpyg3YpfnEbBpkN/znfVhL8dG8IxMAxAoSZ61Zt9WLY34HfENveuOZ7Q==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/center-median": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-6.5.0.tgz", - "integrity": "sha512-dT8Ndu5CiZkPrj15PBvslpuf01ky41DEYEPxS01LOxp5HOUHXp1oJxsPxvc+i/wK4BwccPNzU1vzJ0S4emd1KQ==", - "dependencies": { - "@turf/center-mean": "^6.5.0", - "@turf/centroid": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/center-of-mass": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-6.5.0.tgz", - "integrity": "sha512-EWrriU6LraOfPN7m1jZi+1NLTKNkuIsGLZc2+Y8zbGruvUW+QV7K0nhf7iZWutlxHXTBqEXHbKue/o79IumAsQ==", - "dependencies": { - "@turf/centroid": "^6.5.0", - "@turf/convex": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/centroid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-6.5.0.tgz", - "integrity": "sha512-MwE1oq5E3isewPprEClbfU5pXljIK/GUOMbn22UM3IFPDJX0KeoyLNwghszkdmFp/qMGL/M13MMWvU+GNLXP/A==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/circle": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-6.5.0.tgz", - "integrity": "sha512-oU1+Kq9DgRnoSbWFHKnnUdTmtcRUMmHoV9DjTXu9vOLNV5OWtAAh1VZ+mzsioGGzoDNT/V5igbFOkMfBQc0B6A==", - "dependencies": { - "@turf/destination": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clean-coords": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-6.5.0.tgz", - "integrity": "sha512-EMX7gyZz0WTH/ET7xV8MyrExywfm9qUi0/MY89yNffzGIEHuFfqwhcCqZ8O00rZIPZHUTxpmsxQSTfzJJA1CPw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clone": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-6.5.0.tgz", - "integrity": "sha512-mzVtTFj/QycXOn6ig+annKrM6ZlimreKYz6f/GSERytOpgzodbQyOgkfwru100O1KQhhjSudKK4DsQ0oyi9cTw==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clusters": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-6.5.0.tgz", - "integrity": "sha512-Y6gfnTJzQ1hdLfCsyd5zApNbfLIxYEpmDibHUqR5z03Lpe02pa78JtgrgUNt1seeO/aJ4TG1NLN8V5gOrHk04g==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clusters-dbscan": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-6.5.0.tgz", - "integrity": "sha512-SxZEE4kADU9DqLRiT53QZBBhu8EP9skviSyl+FGj08Y01xfICM/RR9ACUdM0aEQimhpu+ZpRVcUK+2jtiCGrYQ==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0", - "density-clustering": "1.3.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clusters-kmeans": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-6.5.0.tgz", - "integrity": "sha512-DwacD5+YO8kwDPKaXwT9DV46tMBVNsbi1IzdajZu1JDSWoN7yc7N9Qt88oi+p30583O0UPVkAK+A10WAQv4mUw==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "skmeans": "0.9.7" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/collect": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-6.5.0.tgz", - "integrity": "sha512-4dN/T6LNnRg099m97BJeOcTA5fSI8cu87Ydgfibewd2KQwBexO69AnjEFqfPX3Wj+Zvisj1uAVIZbPmSSrZkjg==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0", - "rbush": "2.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/combine": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-6.5.0.tgz", - "integrity": "sha512-Q8EIC4OtAcHiJB3C4R+FpB4LANiT90t17uOd851qkM2/o6m39bfN5Mv0PWqMZIHWrrosZqRqoY9dJnzz/rJxYQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/concave": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-6.5.0.tgz", - "integrity": "sha512-I/sUmUC8TC5h/E2vPwxVht+nRt+TnXIPRoztDFvS8/Y0+cBDple9inLSo9nnPXMXidrBlGXZ9vQx/BjZUJgsRQ==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/tin": "^6.5.0", - "topojson-client": "3.x", - "topojson-server": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/concave/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/@turf/concave/node_modules/topojson-client": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz", - "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==", - "dependencies": { - "commander": "2" - }, - "bin": { - "topo2geo": "bin/topo2geo", - "topomerge": "bin/topomerge", - "topoquantize": "bin/topoquantize" - } - }, - "node_modules/@turf/convex": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-6.5.0.tgz", - "integrity": "sha512-x7ZwC5z7PJB0SBwNh7JCeCNx7Iu+QSrH7fYgK0RhhNop13TqUlvHMirMLRgf2db1DqUetrAO2qHJeIuasquUWg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0", - "concaveman": "*" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/destination": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-6.5.0.tgz", - "integrity": "sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/difference": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-6.5.0.tgz", - "integrity": "sha512-l8iR5uJqvI+5Fs6leNbhPY5t/a3vipUF/3AeVLpwPQcgmedNXyheYuy07PcMGH5Jdpi5gItOiTqwiU/bUH4b3A==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "polygon-clipping": "^0.15.3" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/dissolve": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-6.5.0.tgz", - "integrity": "sha512-WBVbpm9zLTp0Bl9CE35NomTaOL1c4TQCtEoO43YaAhNEWJOOIhZMFJyr8mbvYruKl817KinT3x7aYjjCMjTAsQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "polygon-clipping": "^0.15.3" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/distance": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-6.5.0.tgz", - "integrity": "sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/distance-weight": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-6.5.0.tgz", - "integrity": "sha512-a8qBKkgVNvPKBfZfEJZnC3DV7dfIsC3UIdpRci/iap/wZLH41EmS90nM+BokAJflUHYy8PqE44wySGWHN1FXrQ==", - "dependencies": { - "@turf/centroid": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/ellipse": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-6.5.0.tgz", - "integrity": "sha512-kuXtwFviw/JqnyJXF1mrR/cb496zDTSbGKtSiolWMNImYzGGkbsAsFTjwJYgD7+4FixHjp0uQPzo70KDf3AIBw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/rhumb-destination": "^6.5.0", - "@turf/transform-rotate": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/envelope": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-6.5.0.tgz", - "integrity": "sha512-9Z+FnBWvOGOU4X+fMZxYFs1HjFlkKqsddLuMknRaqcJd6t+NIv5DWvPtDL8ATD2GEExYDiFLwMdckfr1yqJgHA==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/bbox-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/explode": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-6.5.0.tgz", - "integrity": "sha512-6cSvMrnHm2qAsace6pw9cDmK2buAlw8+tjeJVXMfMyY+w7ZUi1rprWMsY92J7s2Dar63Bv09n56/1V7+tcj52Q==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/flatten": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-6.5.0.tgz", - "integrity": "sha512-IBZVwoNLVNT6U/bcUUllubgElzpMsNoCw8tLqBw6dfYg9ObGmpEjf9BIYLr7a2Yn5ZR4l7YIj2T7kD5uJjZADQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/flip": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-6.5.0.tgz", - "integrity": "sha512-oyikJFNjt2LmIXQqgOGLvt70RgE2lyzPMloYWM7OR5oIFGRiBvqVD2hA6MNw6JewIm30fWZ8DQJw1NHXJTJPbg==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/great-circle": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-6.5.0.tgz", - "integrity": "sha512-7ovyi3HaKOXdFyN7yy1yOMa8IyOvV46RC1QOQTT+RYUN8ke10eyqExwBpL9RFUPvlpoTzoYbM/+lWPogQlFncg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/helpers": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-6.5.0.tgz", - "integrity": "sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw==", - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/hex-grid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-6.5.0.tgz", - "integrity": "sha512-Ln3tc2tgZT8etDOldgc6e741Smg1CsMKAz1/Mlel+MEL5Ynv2mhx3m0q4J9IB1F3a4MNjDeVvm8drAaf9SF33g==", - "dependencies": { - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/intersect": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/interpolate": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-6.5.0.tgz", - "integrity": "sha512-LSH5fMeiGyuDZ4WrDJNgh81d2DnNDUVJtuFryJFup8PV8jbs46lQGfI3r1DJ2p1IlEJIz3pmAZYeTfMMoeeohw==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/centroid": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/hex-grid": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/point-grid": "^6.5.0", - "@turf/square-grid": "^6.5.0", - "@turf/triangle-grid": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/intersect": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-6.5.0.tgz", - "integrity": "sha512-2legGJeKrfFkzntcd4GouPugoqPUjexPZnOvfez+3SfIMrHvulw8qV8u7pfVyn2Yqs53yoVCEjS5sEpvQ5YRQg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "polygon-clipping": "^0.15.3" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/invariant": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-6.5.0.tgz", - "integrity": "sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/isobands": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-6.5.0.tgz", - "integrity": "sha512-4h6sjBPhRwMVuFaVBv70YB7eGz+iw0bhPRnp+8JBdX1UPJSXhoi/ZF2rACemRUr0HkdVB/a1r9gC32vn5IAEkw==", - "dependencies": { - "@turf/area": "^6.5.0", - "@turf/bbox": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/explode": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "object-assign": "*" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/isolines": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-6.5.0.tgz", - "integrity": "sha512-6ElhiLCopxWlv4tPoxiCzASWt/jMRvmp6mRYrpzOm3EUl75OhHKa/Pu6Y9nWtCMmVC/RcWtiiweUocbPLZLm0A==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "object-assign": "*" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/kinks": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-6.5.0.tgz", - "integrity": "sha512-ViCngdPt1eEL7hYUHR2eHR662GvCgTc35ZJFaNR6kRtr6D8plLaDju0FILeFFWSc+o8e3fwxZEJKmFj9IzPiIQ==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/length": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/length/-/length-6.5.0.tgz", - "integrity": "sha512-5pL5/pnw52fck3oRsHDcSGrj9HibvtlrZ0QNy2OcW8qBFDNgZ4jtl6U7eATVoyWPKBHszW3dWETW+iLV7UARig==", - "dependencies": { - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-arc": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-6.5.0.tgz", - "integrity": "sha512-I6c+V6mIyEwbtg9P9zSFF89T7QPe1DPTG3MJJ6Cm1MrAY0MdejwQKOpsvNl8LDU2ekHOlz2kHpPVR7VJsoMllA==", - "dependencies": { - "@turf/circle": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-chunk": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-6.5.0.tgz", - "integrity": "sha512-i1FGE6YJaaYa+IJesTfyRRQZP31QouS+wh/pa6O3CC0q4T7LtHigyBSYjrbjSLfn2EVPYGlPCMFEqNWCOkC6zg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/length": "^6.5.0", - "@turf/line-slice-along": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-intersect": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-6.5.0.tgz", - "integrity": "sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "geojson-rbush": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-offset": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-6.5.0.tgz", - "integrity": "sha512-CEXZbKgyz8r72qRvPchK0dxqsq8IQBdH275FE6o4MrBkzMcoZsfSjghtXzKaz9vvro+HfIXal0sTk2mqV1lQTw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-overlap": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-6.5.0.tgz", - "integrity": "sha512-xHOaWLd0hkaC/1OLcStCpfq55lPHpPNadZySDXYiYjEz5HXr1oKmtMYpn0wGizsLwrOixRdEp+j7bL8dPt4ojQ==", - "dependencies": { - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0", - "deep-equal": "1.x", - "geojson-rbush": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-segment": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-6.5.0.tgz", - "integrity": "sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-slice": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-6.5.0.tgz", - "integrity": "sha512-vDqJxve9tBHhOaVVFXqVjF5qDzGtKWviyjbyi2QnSnxyFAmLlLnBfMX8TLQCAf2GxHibB95RO5FBE6I2KVPRuw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-slice-along": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-6.5.0.tgz", - "integrity": "sha512-KHJRU6KpHrAj+BTgTNqby6VCTnDzG6a1sJx/I3hNvqMBLvWVA2IrkR9L9DtsQsVY63IBwVdQDqiwCuZLDQh4Ng==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-split": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-6.5.0.tgz", - "integrity": "sha512-/rwUMVr9OI2ccJjw7/6eTN53URtGThNSD5I0GgxyFXMtxWiloRJ9MTff8jBbtPWrRka/Sh2GkwucVRAEakx9Sw==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0", - "@turf/square": "^6.5.0", - "@turf/truncate": "^6.5.0", - "geojson-rbush": "3.x" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/line-to-polygon": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-6.5.0.tgz", - "integrity": "sha512-qYBuRCJJL8Gx27OwCD1TMijM/9XjRgXH/m/TyuND4OXedBpIWlK5VbTIO2gJ8OCfznBBddpjiObLBrkuxTpN4Q==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/mask": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-6.5.0.tgz", - "integrity": "sha512-RQha4aU8LpBrmrkH8CPaaoAfk0Egj5OuXtv6HuCQnHeGNOQt3TQVibTA3Sh4iduq4EPxnZfDjgsOeKtrCA19lg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "polygon-clipping": "^0.15.3" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/meta": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.5.0.tgz", - "integrity": "sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/midpoint": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-6.5.0.tgz", - "integrity": "sha512-MyTzV44IwmVI6ec9fB2OgZ53JGNlgOpaYl9ArKoF49rXpL84F9rNATndbe0+MQIhdkw8IlzA6xVP4lZzfMNVCw==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/moran-index": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-6.5.0.tgz", - "integrity": "sha512-ItsnhrU2XYtTtTudrM8so4afBCYWNaB0Mfy28NZwLjB5jWuAsvyV+YW+J88+neK/ougKMTawkmjQqodNJaBeLQ==", - "dependencies": { - "@turf/distance-weight": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/nearest-point": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-6.5.0.tgz", - "integrity": "sha512-fguV09QxilZv/p94s8SMsXILIAMiaXI5PATq9d7YWijLxWUj6Q/r43kxyoi78Zmwwh1Zfqz9w+bCYUAxZ5+euA==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/nearest-point-on-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz", - "integrity": "sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/nearest-point-to-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-6.5.0.tgz", - "integrity": "sha512-PXV7cN0BVzUZdjj6oeb/ESnzXSfWmEMrsfZSDRgqyZ9ytdiIj/eRsnOXLR13LkTdXVOJYDBuf7xt1mLhM4p6+Q==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/point-to-line-distance": "^6.5.0", - "object-assign": "*" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/planepoint": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-6.5.0.tgz", - "integrity": "sha512-R3AahA6DUvtFbka1kcJHqZ7DMHmPXDEQpbU5WaglNn7NaCQg9HB0XM0ZfqWcd5u92YXV+Gg8QhC8x5XojfcM4Q==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/point-grid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-6.5.0.tgz", - "integrity": "sha512-Iq38lFokNNtQJnOj/RBKmyt6dlof0yhaHEDELaWHuECm1lIZLY3ZbVMwbs+nXkwTAHjKfS/OtMheUBkw+ee49w==", - "dependencies": { - "@turf/boolean-within": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/point-on-feature": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-6.5.0.tgz", - "integrity": "sha512-bDpuIlvugJhfcF/0awAQ+QI6Om1Y1FFYE8Y/YdxGRongivix850dTeXCo0mDylFdWFPGDo7Mmh9Vo4VxNwW/TA==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/center": "^6.5.0", - "@turf/explode": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/nearest-point": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/point-to-line-distance": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-6.5.0.tgz", - "integrity": "sha512-opHVQ4vjUhNBly1bob6RWy+F+hsZDH9SA0UW36pIRzfpu27qipU18xup0XXEePfY6+wvhF6yL/WgCO2IbrLqEA==", - "dependencies": { - "@turf/bearing": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/projection": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0", - "@turf/rhumb-distance": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/points-within-polygon": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-6.5.0.tgz", - "integrity": "sha512-YyuheKqjliDsBDt3Ho73QVZk1VXX1+zIA2gwWvuz8bR1HXOkcuwk/1J76HuFMOQI3WK78wyAi+xbkx268PkQzQ==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/polygon-smooth": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-6.5.0.tgz", - "integrity": "sha512-LO/X/5hfh/Rk4EfkDBpLlVwt3i6IXdtQccDT9rMjXEP32tRgy0VMFmdkNaXoGlSSKf/1mGqLl4y4wHd86DqKbg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/polygon-tangents": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-6.5.0.tgz", - "integrity": "sha512-sB4/IUqJMYRQH9jVBwqS/XDitkEfbyqRy+EH/cMRJURTg78eHunvJ708x5r6umXsbiUyQU4eqgPzEylWEQiunw==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/boolean-within": "^6.5.0", - "@turf/explode": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/nearest-point": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/polygon-to-line": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-6.5.0.tgz", - "integrity": "sha512-5p4n/ij97EIttAq+ewSnKt0ruvuM+LIDzuczSzuHTpq4oS7Oq8yqg5TQ4nzMVuK41r/tALCk7nAoBuw3Su4Gcw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/polygonize": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-6.5.0.tgz", - "integrity": "sha512-a/3GzHRaCyzg7tVYHo43QUChCspa99oK4yPqooVIwTC61npFzdrmnywMv0S+WZjHZwK37BrFJGFrZGf6ocmY5w==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/envelope": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/projection": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-6.5.0.tgz", - "integrity": "sha512-/Pgh9mDvQWWu8HRxqpM+tKz8OzgauV+DiOcr3FCjD6ubDnrrmMJlsf6fFJmggw93mtVPrZRL6yyi9aYCQBOIvg==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/random": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/random/-/random-6.5.0.tgz", - "integrity": "sha512-8Q25gQ/XbA7HJAe+eXp4UhcXM9aOOJFaxZ02+XSNwMvY8gtWSCBLVqRcW4OhqilgZ8PeuQDWgBxeo+BIqqFWFQ==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rectangle-grid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-6.5.0.tgz", - "integrity": "sha512-yQZ/1vbW68O2KsSB3OZYK+72aWz/Adnf7m2CMKcC+aq6TwjxZjAvlbCOsNUnMAuldRUVN1ph6RXMG4e9KEvKvg==", - "dependencies": { - "@turf/boolean-intersects": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rewind": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-6.5.0.tgz", - "integrity": "sha512-IoUAMcHWotBWYwSYuYypw/LlqZmO+wcBpn8ysrBNbazkFNkLf3btSDZMkKJO/bvOzl55imr/Xj4fi3DdsLsbzQ==", - "dependencies": { - "@turf/boolean-clockwise": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rhumb-bearing": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-6.5.0.tgz", - "integrity": "sha512-jMyqiMRK4hzREjQmnLXmkJ+VTNTx1ii8vuqRwJPcTlKbNWfjDz/5JqJlb5NaFDcdMpftWovkW5GevfnuzHnOYA==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rhumb-destination": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-6.5.0.tgz", - "integrity": "sha512-RHNP1Oy+7xTTdRrTt375jOZeHceFbjwohPHlr9Hf68VdHHPMAWgAKqiX2YgSWDcvECVmiGaBKWus1Df+N7eE4Q==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rhumb-distance": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-6.5.0.tgz", - "integrity": "sha512-oKp8KFE8E4huC2Z1a1KNcFwjVOqa99isxNOwfo4g3SUABQ6NezjKDDrnvC4yI5YZ3/huDjULLBvhed45xdCrzg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/sample": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-6.5.0.tgz", - "integrity": "sha512-kSdCwY7el15xQjnXYW520heKUrHwRvnzx8ka4eYxX9NFeOxaFITLW2G7UtXb6LJK8mmPXI8Aexv23F2ERqzGFg==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/sector": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-6.5.0.tgz", - "integrity": "sha512-cYUOkgCTWqa23SOJBqxoFAc/yGCUsPRdn/ovbRTn1zNTm/Spmk6hVB84LCKOgHqvSF25i0d2kWqpZDzLDdAPbw==", - "dependencies": { - "@turf/circle": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/line-arc": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/shortest-path": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-6.5.0.tgz", - "integrity": "sha512-4de5+G7+P4hgSoPwn+SO9QSi9HY5NEV/xRJ+cmoFVRwv2CDsuOPDheHKeuIAhKyeKDvPvPt04XYWbac4insJMg==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/bbox-polygon": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/clean-coords": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/transform-scale": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/simplify": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-6.5.0.tgz", - "integrity": "sha512-USas3QqffPHUY184dwQdP8qsvcVH/PWBYdXY5am7YTBACaQOMAlf6AKJs9FT8jiO6fQpxfgxuEtwmox+pBtlOg==", - "dependencies": { - "@turf/clean-coords": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/square": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/square/-/square-6.5.0.tgz", - "integrity": "sha512-BM2UyWDmiuHCadVhHXKIx5CQQbNCpOxB6S/aCNOCLbhCeypKX5Q0Aosc5YcmCJgkwO5BERCC6Ee7NMbNB2vHmQ==", - "dependencies": { - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/square-grid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-6.5.0.tgz", - "integrity": "sha512-mlR0ayUdA+L4c9h7p4k3pX6gPWHNGuZkt2c5II1TJRmhLkW2557d6b/Vjfd1z9OVaajb1HinIs1FMSAPXuuUrA==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/rectangle-grid": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/standard-deviational-ellipse": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-6.5.0.tgz", - "integrity": "sha512-02CAlz8POvGPFK2BKK8uHGUk/LXb0MK459JVjKxLC2yJYieOBTqEbjP0qaWhiBhGzIxSMaqe8WxZ0KvqdnstHA==", - "dependencies": { - "@turf/center-mean": "^6.5.0", - "@turf/ellipse": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/points-within-polygon": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/tag": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-6.5.0.tgz", - "integrity": "sha512-XwlBvrOV38CQsrNfrxvBaAPBQgXMljeU0DV8ExOyGM7/hvuGHJw3y8kKnQ4lmEQcmcrycjDQhP7JqoRv8vFssg==", - "dependencies": { - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/tesselate": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-6.5.0.tgz", - "integrity": "sha512-M1HXuyZFCfEIIKkglh/r5L9H3c5QTEsnMBoZOFQiRnGPGmJWcaBissGb7mTFX2+DKE7FNWXh4TDnZlaLABB0dQ==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "earcut": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/tin": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-6.5.0.tgz", - "integrity": "sha512-YLYikRzKisfwj7+F+Tmyy/LE3d2H7D4kajajIfc9mlik2+esG7IolsX/+oUz1biguDYsG0DUA8kVYXDkobukfg==", - "dependencies": { - "@turf/helpers": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/transform-rotate": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-6.5.0.tgz", - "integrity": "sha512-A2Ip1v4246ZmpssxpcL0hhiVBEf4L8lGnSPWTgSv5bWBEoya2fa/0SnFX9xJgP40rMP+ZzRaCN37vLHbv1Guag==", - "dependencies": { - "@turf/centroid": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0", - "@turf/rhumb-destination": "^6.5.0", - "@turf/rhumb-distance": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/transform-scale": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-6.5.0.tgz", - "integrity": "sha512-VsATGXC9rYM8qTjbQJ/P7BswKWXHdnSJ35JlV4OsZyHBMxJQHftvmZJsFbOqVtQnIQIzf2OAly6rfzVV9QLr7g==", - "dependencies": { - "@turf/bbox": "^6.5.0", - "@turf/center": "^6.5.0", - "@turf/centroid": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0", - "@turf/rhumb-destination": "^6.5.0", - "@turf/rhumb-distance": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/transform-translate": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-6.5.0.tgz", - "integrity": "sha512-NABLw5VdtJt/9vSstChp93pc6oel4qXEos56RBMsPlYB8hzNTEKYtC146XJvyF4twJeeYS8RVe1u7KhoFwEM5w==", - "dependencies": { - "@turf/clone": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/rhumb-destination": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/triangle-grid": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-6.5.0.tgz", - "integrity": "sha512-2jToUSAS1R1htq4TyLQYPTIsoy6wg3e3BQXjm2rANzw4wPQCXGOxrur1Fy9RtzwqwljlC7DF4tg0OnWr8RjmfA==", - "dependencies": { - "@turf/distance": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/intersect": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/truncate": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-6.5.0.tgz", - "integrity": "sha512-pFxg71pLk+eJj134Z9yUoRhIi8vqnnKvCYwdT4x/DQl/19RVdq1tV3yqOT3gcTQNfniteylL5qV1uTBDV5sgrg==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/turf": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-6.5.0.tgz", - "integrity": "sha512-ipMCPnhu59bh92MNt8+pr1VZQhHVuTMHklciQURo54heoxRzt1neNYZOBR6jdL+hNsbDGAECMuIpAutX+a3Y+w==", - "dependencies": { - "@turf/along": "^6.5.0", - "@turf/angle": "^6.5.0", - "@turf/area": "^6.5.0", - "@turf/bbox": "^6.5.0", - "@turf/bbox-clip": "^6.5.0", - "@turf/bbox-polygon": "^6.5.0", - "@turf/bearing": "^6.5.0", - "@turf/bezier-spline": "^6.5.0", - "@turf/boolean-clockwise": "^6.5.0", - "@turf/boolean-contains": "^6.5.0", - "@turf/boolean-crosses": "^6.5.0", - "@turf/boolean-disjoint": "^6.5.0", - "@turf/boolean-equal": "^6.5.0", - "@turf/boolean-intersects": "^6.5.0", - "@turf/boolean-overlap": "^6.5.0", - "@turf/boolean-parallel": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/boolean-point-on-line": "^6.5.0", - "@turf/boolean-within": "^6.5.0", - "@turf/buffer": "^6.5.0", - "@turf/center": "^6.5.0", - "@turf/center-mean": "^6.5.0", - "@turf/center-median": "^6.5.0", - "@turf/center-of-mass": "^6.5.0", - "@turf/centroid": "^6.5.0", - "@turf/circle": "^6.5.0", - "@turf/clean-coords": "^6.5.0", - "@turf/clone": "^6.5.0", - "@turf/clusters": "^6.5.0", - "@turf/clusters-dbscan": "^6.5.0", - "@turf/clusters-kmeans": "^6.5.0", - "@turf/collect": "^6.5.0", - "@turf/combine": "^6.5.0", - "@turf/concave": "^6.5.0", - "@turf/convex": "^6.5.0", - "@turf/destination": "^6.5.0", - "@turf/difference": "^6.5.0", - "@turf/dissolve": "^6.5.0", - "@turf/distance": "^6.5.0", - "@turf/distance-weight": "^6.5.0", - "@turf/ellipse": "^6.5.0", - "@turf/envelope": "^6.5.0", - "@turf/explode": "^6.5.0", - "@turf/flatten": "^6.5.0", - "@turf/flip": "^6.5.0", - "@turf/great-circle": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/hex-grid": "^6.5.0", - "@turf/interpolate": "^6.5.0", - "@turf/intersect": "^6.5.0", - "@turf/invariant": "^6.5.0", - "@turf/isobands": "^6.5.0", - "@turf/isolines": "^6.5.0", - "@turf/kinks": "^6.5.0", - "@turf/length": "^6.5.0", - "@turf/line-arc": "^6.5.0", - "@turf/line-chunk": "^6.5.0", - "@turf/line-intersect": "^6.5.0", - "@turf/line-offset": "^6.5.0", - "@turf/line-overlap": "^6.5.0", - "@turf/line-segment": "^6.5.0", - "@turf/line-slice": "^6.5.0", - "@turf/line-slice-along": "^6.5.0", - "@turf/line-split": "^6.5.0", - "@turf/line-to-polygon": "^6.5.0", - "@turf/mask": "^6.5.0", - "@turf/meta": "^6.5.0", - "@turf/midpoint": "^6.5.0", - "@turf/moran-index": "^6.5.0", - "@turf/nearest-point": "^6.5.0", - "@turf/nearest-point-on-line": "^6.5.0", - "@turf/nearest-point-to-line": "^6.5.0", - "@turf/planepoint": "^6.5.0", - "@turf/point-grid": "^6.5.0", - "@turf/point-on-feature": "^6.5.0", - "@turf/point-to-line-distance": "^6.5.0", - "@turf/points-within-polygon": "^6.5.0", - "@turf/polygon-smooth": "^6.5.0", - "@turf/polygon-tangents": "^6.5.0", - "@turf/polygon-to-line": "^6.5.0", - "@turf/polygonize": "^6.5.0", - "@turf/projection": "^6.5.0", - "@turf/random": "^6.5.0", - "@turf/rewind": "^6.5.0", - "@turf/rhumb-bearing": "^6.5.0", - "@turf/rhumb-destination": "^6.5.0", - "@turf/rhumb-distance": "^6.5.0", - "@turf/sample": "^6.5.0", - "@turf/sector": "^6.5.0", - "@turf/shortest-path": "^6.5.0", - "@turf/simplify": "^6.5.0", - "@turf/square": "^6.5.0", - "@turf/square-grid": "^6.5.0", - "@turf/standard-deviational-ellipse": "^6.5.0", - "@turf/tag": "^6.5.0", - "@turf/tesselate": "^6.5.0", - "@turf/tin": "^6.5.0", - "@turf/transform-rotate": "^6.5.0", - "@turf/transform-scale": "^6.5.0", - "@turf/transform-translate": "^6.5.0", - "@turf/triangle-grid": "^6.5.0", - "@turf/truncate": "^6.5.0", - "@turf/union": "^6.5.0", - "@turf/unkink-polygon": "^6.5.0", - "@turf/voronoi": "^6.5.0" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/union": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/union/-/union-6.5.0.tgz", - "integrity": "sha512-igYWCwP/f0RFHIlC2c0SKDuM/ObBaqSljI3IdV/x71805QbIvY/BYGcJdyNcgEA6cylIGl/0VSlIbpJHZ9ldhw==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "polygon-clipping": "^0.15.3" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/unkink-polygon": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-6.5.0.tgz", - "integrity": "sha512-8QswkzC0UqKmN1DT6HpA9upfa1HdAA5n6bbuzHy8NJOX8oVizVAqfEPY0wqqTgboDjmBR4yyImsdPGUl3gZ8JQ==", - "dependencies": { - "@turf/area": "^6.5.0", - "@turf/boolean-point-in-polygon": "^6.5.0", - "@turf/helpers": "^6.5.0", - "@turf/meta": "^6.5.0", - "rbush": "^2.0.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/voronoi": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-6.5.0.tgz", - "integrity": "sha512-C/xUsywYX+7h1UyNqnydHXiun4UPjK88VDghtoRypR9cLlb7qozkiLRphQxxsCM0KxyxpVPHBVQXdAL3+Yurow==", - "dependencies": { - "@turf/helpers": "^6.5.0", - "@turf/invariant": "^6.5.0", - "d3-voronoi": "1.1.2" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@types/aria-query": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", - "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", - "dev": true - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", - "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.28.2" - } - }, - "node_modules/@types/geojson": { - "version": "7946.0.10", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.10.tgz", - "integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==" - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/@types/mapbox__point-geometry": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz", - "integrity": "sha512-D0lgCq+3VWV85ey1MZVkE8ZveyuvW5VAfuahVTQRpXFQTxw03SuIf1/K4UQ87MMIXVKzpFjXFiFMZzLj2kU+iA==" - }, - "node_modules/@types/mapbox__vector-tile": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz", - "integrity": "sha512-kDwVreQO5V4c8yAxzZVQLE5tyWF+IPToAanloQaSnwfXmIcJ7cyOrv8z4Ft4y7PsLYmhWXmON8MBV8RX0Rgr8g==", - "dependencies": { - "@types/geojson": "*", - "@types/mapbox__point-geometry": "*", - "@types/pbf": "*" - } - }, - "node_modules/@types/node": { - "version": "25.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", - "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==", - "dev": true, - "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" - } - }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" - }, - "node_modules/@types/pbf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.2.tgz", - "integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==" - }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" - }, - "node_modules/@types/react": { - "version": "18.3.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", - "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", - "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", - "dev": true, - "peerDependencies": { - "@types/react": "^18.0.0" - } - }, - "node_modules/@types/react-is": { - "version": "18.2.1", - "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz", - "integrity": "sha512-wyUkmaaSZEzFZivD8F2ftSyAfk6L+DfFliVj/mYdOXbVjRcS87fQJLTnhk6dRZPuJjI+9g6RZJO4PNCngUrmyw==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-transition-group": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.6.tgz", - "integrity": "sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true - }, - "node_modules/@types/yargs": { - "version": "17.0.35", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", - "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "deprecated": "Use your platform's native atob() and btoa() methods instead", - "dev": true - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", - "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", - "dev": true, - "dependencies": { - "acorn": "^8.1.0", - "acorn-walk": "^8.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", - "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/attr-accept": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", - "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", - "engines": { - "node": ">=4" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-plugin-macros": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", - "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", - "dependencies": { - "@babel/runtime": "^7.12.5", - "cosmiconfig": "^7.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", - "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "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==", - "dev": true - }, - "node_modules/baseline-browser-mapping": { - "version": "2.10.34", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.34.tgz", - "integrity": "sha512-IMDedajPifLnHNY0X9n8hKxRTQ6/eTHwr5bDo04WnuqxyKw6LYtQywCuuqPZwhl3aBXMvQpJov42GLCwRRdQzw==", - "dev": true, - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/bytewise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", - "integrity": "sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ==", - "dependencies": { - "bytewise-core": "^1.2.2", - "typewise": "^1.0.3" - } - }, - "node_modules/bytewise-core": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", - "integrity": "sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA==", - "dependencies": { - "typewise-core": "^1.2" - } - }, - "node_modules/call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001793", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz", - "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "dev": true - }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", - "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concaveman": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/concaveman/-/concaveman-1.2.1.tgz", - "integrity": "sha512-PwZYKaM/ckQSa8peP5JpVr7IMJ4Nn/MHIaWUjP4be+KoZ7Botgs8seAZGpmaOM+UZXawcdYRao/px9ycrCihHw==", - "dependencies": { - "point-in-polygon": "^1.1.0", - "rbush": "^3.0.1", - "robust-predicates": "^2.0.4", - "tinyqueue": "^2.0.3" - } - }, - "node_modules/concaveman/node_modules/rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", - "dependencies": { - "quickselect": "^2.0.0" - } - }, - "node_modules/concaveman/node_modules/robust-predicates": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-2.0.4.tgz", - "integrity": "sha512-l4NwboJM74Ilm4VKfbAtFeGq7aEjWL+5kVFcmgFA2MrdnQWx9iE/tUGvxY5HyMI7o/WpSIUFLbC5fbeaHgSCYg==" - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" - }, - "node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/create-jest/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "dev": true - }, - "node_modules/cssom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", - "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", - "dev": true - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==" - }, - "node_modules/d3": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.5.tgz", - "integrity": "sha512-JgoahDG51ncUfJu6wX/1vWQEqOflgXyl4MaHqlcSruTez7yhaRKR9i8VjjcQGeS2en/jnFivXuaIMnseMMt0XA==", - "dependencies": { - "d3-array": "3", - "d3-axis": "3", - "d3-brush": "3", - "d3-chord": "3", - "d3-color": "3", - "d3-contour": "4", - "d3-delaunay": "6", - "d3-dispatch": "3", - "d3-drag": "3", - "d3-dsv": "3", - "d3-ease": "3", - "d3-fetch": "3", - "d3-force": "3", - "d3-format": "3", - "d3-geo": "3", - "d3-hierarchy": "3", - "d3-interpolate": "3", - "d3-path": "3", - "d3-polygon": "3", - "d3-quadtree": "3", - "d3-random": "3", - "d3-scale": "4", - "d3-scale-chromatic": "3", - "d3-selection": "3", - "d3-shape": "3", - "d3-time": "3", - "d3-time-format": "4", - "d3-timer": "3", - "d3-transition": "3", - "d3-zoom": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-array": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", - "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", - "dependencies": { - "internmap": "1 - 2" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-axis": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", - "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-brush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", - "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "3", - "d3-transition": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-chord": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", - "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", - "dependencies": { - "d3-path": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-contour": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", - "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", - "dependencies": { - "d3-array": "^3.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", - "dependencies": { - "delaunator": "5" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dispatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", - "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-drag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", - "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-selection": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", - "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", - "dependencies": { - "commander": "7", - "iconv-lite": "0.6", - "rw": "1" - }, - "bin": { - "csv2json": "bin/dsv2json.js", - "csv2tsv": "bin/dsv2dsv.js", - "dsv2dsv": "bin/dsv2dsv.js", - "dsv2json": "bin/dsv2json.js", - "json2csv": "bin/json2dsv.js", - "json2dsv": "bin/json2dsv.js", - "json2tsv": "bin/json2dsv.js", - "tsv2csv": "bin/dsv2dsv.js", - "tsv2json": "bin/dsv2json.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", - "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", - "dependencies": { - "d3-dsv": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-force": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", - "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-quadtree": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-geo": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.0.tgz", - "integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==", - "dependencies": { - "d3-array": "2.5.0 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-hierarchy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", - "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", - "dependencies": { - "d3-color": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-polygon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", - "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-quadtree": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", - "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-random": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", - "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-scale": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", - "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", - "dependencies": { - "d3-array": "2.10.0 - 3", - "d3-format": "1 - 3", - "d3-interpolate": "1.2.0 - 3", - "d3-time": "2.1.1 - 3", - "d3-time-format": "2 - 4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-scale-chromatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz", - "integrity": "sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==", - "dependencies": { - "d3-color": "1 - 3", - "d3-interpolate": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-selection": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", - "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", - "dependencies": { - "d3-path": "^3.1.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", - "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", - "dependencies": { - "d3-array": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-time-format": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", - "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", - "dependencies": { - "d3-time": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-timer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", - "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-transition": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", - "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", - "dependencies": { - "d3-color": "1 - 3", - "d3-dispatch": "1 - 3", - "d3-ease": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "d3-selection": "2 - 3" - } - }, - "node_modules/d3-voronoi": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz", - "integrity": "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw==" - }, - "node_modules/d3-zoom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", - "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "2 - 3", - "d3-transition": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/date-fns": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", - "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/kossnocorp" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", - "dev": true - }, - "node_modules/dedent": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", - "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", - "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delaunator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.0.tgz", - "integrity": "sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==", - "dependencies": { - "robust-predicates": "^3.0.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/density-clustering": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/density-clustering/-/density-clustering-1.3.0.tgz", - "integrity": "sha512-icpmBubVTwLnsaor9qH/4tG5+7+f61VcqMN3V3pm9sxxSCt2Jcs0zWOgwZW9ARJYaKD3FumIgHiMOcIMRRAzFQ==" - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true - }, - "node_modules/dom-helpers": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", - "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", - "dependencies": { - "@babel/runtime": "^7.8.7", - "csstype": "^3.0.2" - } - }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", - "dev": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/earcut": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", - "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" - }, - "node_modules/electron-to-chromium": { - "version": "1.5.368", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.368.tgz", - "integrity": "sha512-7RckJJK4uESJF9PxvfMWd3TGqIiieUTG4HxnKaKuIpGbcr+r2ZEB3g2gAhCP3Fqm42vJSzLfgab9eva/C4/XVw==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/file-selector": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", - "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", - "dependencies": { - "tslib": "^2.4.0" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/geojson-equality": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/geojson-equality/-/geojson-equality-0.1.6.tgz", - "integrity": "sha512-TqG8YbqizP3EfwP5Uw4aLu6pKkg6JQK9uq/XZ1lXQntvTHD1BBKJWhNpJ2M0ax6TuWMP3oyx6Oq7FCIfznrgpQ==", - "dependencies": { - "deep-equal": "^1.0.0" - } - }, - "node_modules/geojson-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/geojson-flatten/-/geojson-flatten-1.1.1.tgz", - "integrity": "sha512-k/6BCd0qAt7vdqdM1LkLfAy72EsLDy0laNwX0x2h49vfYCiQkRc4PSra8DNEdJ10EKRpwEvDXMb0dBknTJuWpQ==" - }, - "node_modules/geojson-rbush": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-3.2.0.tgz", - "integrity": "sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w==", - "dependencies": { - "@turf/bbox": "*", - "@turf/helpers": "6.x", - "@turf/meta": "6.x", - "@types/geojson": "7946.0.8", - "rbush": "^3.0.1" - } - }, - "node_modules/geojson-rbush/node_modules/@types/geojson": { - "version": "7946.0.8", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", - "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" - }, - "node_modules/geojson-rbush/node_modules/rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", - "dependencies": { - "quickselect": "^2.0.0" - } - }, - "node_modules/geojson-vt": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz", - "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gl-matrix": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", - "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" - }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hat": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz", - "integrity": "sha512-zpImx2GoKXy42fVDSEad2BPKuSQdLcqsCYa48K3zHSzM/ugWuYjLDr8IXxpVuL7uCLHw56eaiLxCRthhOzf5ug==", - "engines": { - "node": "*" - } - }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, - "dependencies": { - "whatwg-encoding": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "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.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", - "engines": { - "node": ">=12" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-reports": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", - "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", - "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-validate/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-base64": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", - "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.6", - "acorn": "^8.8.1", - "acorn-globals": "^7.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.2", - "decimal.js": "^10.4.2", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.2", - "parse5": "^7.1.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "node_modules/json-stringify-pretty-compact": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz", - "integrity": "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA==" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/kdbush": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", - "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lz-string": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", - "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", - "dev": true, - "bin": { - "lz-string": "bin/bin.js" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/maplibre-gl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-3.1.0.tgz", - "integrity": "sha512-KFarVUUszCEucPwnGsFJtPMQBg/F6lg+SPDmTztKUD/n0YShETjIOdNmm5jpxacEX3+dq50MzlqDr6VH+RtDDA==", - "dependencies": { - "@mapbox/geojson-rewind": "^0.5.2", - "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^2.0.6", - "@mapbox/unitbezier": "^0.0.1", - "@mapbox/vector-tile": "^1.3.1", - "@mapbox/whoots-js": "^3.1.0", - "@maplibre/maplibre-gl-style-spec": "^19.2.1", - "@types/geojson": "^7946.0.10", - "@types/mapbox__point-geometry": "^0.1.2", - "@types/mapbox__vector-tile": "^1.3.0", - "@types/pbf": "^3.0.2", - "earcut": "^2.2.4", - "geojson-vt": "^3.2.1", - "gl-matrix": "^3.4.3", - "global-prefix": "^3.0.0", - "kdbush": "^4.0.2", - "murmurhash-js": "^1.0.0", - "pbf": "^3.2.1", - "potpack": "^2.0.0", - "quickselect": "^2.0.0", - "supercluster": "^8.0.1", - "tinyqueue": "^2.0.3", - "vt-pbf": "^3.1.3" - }, - "engines": { - "node": ">=16.14.0", - "npm": ">=8.1.0" - }, - "funding": { - "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/murmurhash-js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", - "integrity": "sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw==" - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/next": { - "version": "13.4.19", - "resolved": "https://registry.npmjs.org/next/-/next-13.4.19.tgz", - "integrity": "sha512-HuPSzzAbJ1T4BD8e0bs6B9C1kWQ6gv8ykZoRWs5AQoiIuqbGHHdQO7Ljuvg05Q0Z24E2ABozHe6FxDvI6HfyAw==", - "dependencies": { - "@next/env": "13.4.19", - "@swc/helpers": "0.5.1", - "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.1.1", - "watchpack": "2.4.0", - "zod": "3.21.4" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=16.8.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "13.4.19", - "@next/swc-darwin-x64": "13.4.19", - "@next/swc-linux-arm64-gnu": "13.4.19", - "@next/swc-linux-arm64-musl": "13.4.19", - "@next/swc-linux-x64-gnu": "13.4.19", - "@next/swc-linux-x64-musl": "13.4.19", - "@next/swc-win32-arm64-msvc": "13.4.19", - "@next/swc-win32-ia32-msvc": "13.4.19", - "@next/swc-win32-x64-msvc": "13.4.19" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.47", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz", - "integrity": "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nwsapi": { - "version": "2.2.23", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz", - "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==", - "dev": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse5": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", - "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", - "dev": true, - "dependencies": { - "entities": "^6.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/pbf": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", - "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", - "dependencies": { - "ieee754": "^1.1.12", - "resolve-protobuf-schema": "^2.1.0" - }, - "bin": { - "pbf": "bin/pbf" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" - }, - "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/point-in-polygon": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.1.0.tgz", - "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==" - }, - "node_modules/polygon-clipping": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.3.tgz", - "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", - "dependencies": { - "splaytree": "^3.1.0" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - ], - "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/potpack": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz", - "integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw==" - }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/protocol-buffers-schema": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", - "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" - }, - "node_modules/psl": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", - "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", - "dev": true, - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "node_modules/quickselect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", - "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" - }, - "node_modules/rbush": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz", - "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==", - "dependencies": { - "quickselect": "^1.0.1" - } - }, - "node_modules/rbush/node_modules/quickselect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz", - "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==" - }, - "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, - "node_modules/react-dropzone": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", - "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", - "dependencies": { - "attr-accept": "^2.2.2", - "file-selector": "^0.6.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">= 10.13" - }, - "peerDependencies": { - "react": ">= 16.8 || 18.0.0" - } - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" - }, - "node_modules/react-loading": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/react-loading/-/react-loading-2.0.3.tgz", - "integrity": "sha512-Vdqy79zq+bpeWJqC+xjltUjuGApyoItPgL0vgVfcJHhqwU7bAMKzysfGW/ADu6i0z0JiOCRJjo+IkFNkRNbA3A==", - "peerDependencies": { - "prop-types": "^15.6.0", - "react": ">=0.14.0" - } - }, - "node_modules/react-router": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.14.1.tgz", - "integrity": "sha512-U4PfgvG55LdvbQjg5Y9QRWyVxIdO1LlpYT7x+tMAxd9/vmiPuJhIwdxZuIQLN/9e3O4KFDHYfR9gzGeYMasW8g==", - "dependencies": { - "@remix-run/router": "1.7.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.14.1.tgz", - "integrity": "sha512-ssF6M5UkQjHK70fgukCJyjlda0Dgono2QGwqGvuk7D+EDGHdacEN3Yke2LTMjkrpHuFwBfDFsEjGVXBDmL+bWw==", - "dependencies": { - "@remix-run/router": "1.7.1", - "react-router": "6.14.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "node_modules/react-toastify": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-9.1.3.tgz", - "integrity": "sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==", - "dependencies": { - "clsx": "^1.1.1" - }, - "peerDependencies": { - "react": ">=16", - "react-dom": ">=16" - } - }, - "node_modules/react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", - "dependencies": { - "@babel/runtime": "^7.5.5", - "dom-helpers": "^5.0.1", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": ">=16.6.0", - "react-dom": ">=16.6.0" - } - }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "node_modules/reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-protobuf-schema": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", - "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", - "dependencies": { - "protocol-buffers-schema": "^3.3.1" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/robust-predicates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", - "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" - }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } - }, - "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/skmeans": { - "version": "0.9.7", - "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz", - "integrity": "sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg==" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sort-asc": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.2.0.tgz", - "integrity": "sha512-umMGhjPeHAI6YjABoSTrFp2zaBtXBej1a0yKkuMUyjjqu6FJsTF+JYwCswWDg+zJfk/5npWUUbd33HH/WLzpaA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sort-desc": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/sort-desc/-/sort-desc-0.2.0.tgz", - "integrity": "sha512-NqZqyvL4VPW+RAxxXnB8gvE1kyikh8+pR+T+CXLksVRN9eiQqkQlPwqWYU0mF9Jm7UnctShlxLyAt1CaBOTL1w==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sort-object": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sort-object/-/sort-object-3.0.3.tgz", - "integrity": "sha512-nK7WOY8jik6zaG9CRwZTaD5O7ETWDLZYMM12pqY8htll+7dYeqGfEUPcUBHOpSJg2vJOrvFIY2Dl5cX2ih1hAQ==", - "dependencies": { - "bytewise": "^1.1.0", - "get-value": "^2.0.2", - "is-extendable": "^0.1.1", - "sort-asc": "^0.2.0", - "sort-desc": "^0.2.0", - "union-value": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/splaytree": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", - "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split-string/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "dependencies": { - "min-indent": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz", - "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/stylis": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" - }, - "node_modules/supercluster": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", - "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", - "dependencies": { - "kdbush": "^4.0.2" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sweetalert2": { - "version": "11.7.12", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.7.12.tgz", - "integrity": "sha512-TQJy8mQymJLzqWPQOMQErd81Zd/rSYr0UL4pEc7bqEihtjS+zt7LWJXLhfPp93e+Hf3Z2FHMB6QGNskAMCsdTg==", - "funding": { - "type": "individual", - "url": "https://github.com/sponsors/limonte" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tinyqueue": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", - "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/topojson-server": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.1.tgz", - "integrity": "sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw==", - "dependencies": { - "commander": "2" - }, - "bin": { - "geo2topo": "bin/geo2topo" - } - }, - "node_modules/topojson-server/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/traverse": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", - "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tslib": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz", - "integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==" - }, - "node_modules/turf-jsts": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/turf-jsts/-/turf-jsts-1.2.3.tgz", - "integrity": "sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA==" - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typewise": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typewise/-/typewise-1.0.3.tgz", - "integrity": "sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ==", - "dependencies": { - "typewise-core": "^1.2.0" - } - }, - "node_modules/typewise-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typewise-core/-/typewise-core-1.2.0.tgz", - "integrity": "sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg==" - }, - "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", - "dev": true - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/vt-pbf": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", - "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", - "dependencies": { - "@mapbox/point-geometry": "0.1.0", - "@mapbox/vector-tile": "^1.3.1", - "pbf": "^3.2.1" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", - "dev": true, - "dependencies": { - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/wgs84": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/wgs84/-/wgs84-0.0.0.tgz", - "integrity": "sha512-ANHlY4Rb5kHw40D0NJ6moaVfOCMrp9Gpd1R/AIQYg2ko4/jzcJ+TVXYYF6kXJqQwITvEZP4yEthjM7U6rYlljQ==" - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", - "dev": true, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.22", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", - "integrity": "sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", - "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/front-end/package.json b/front-end/package.json deleted file mode 100755 index 00c0131..0000000 --- a/front-end/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "next-app", - "version": "0.1.0", - "private": true, - "proxy": "http://localhost:8000", - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "test": "jest", - "test:watch": "jest --watch" - }, - "dependencies": { - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@mapbox/mapbox-gl-draw": "^1.4.2", - "@maptiler/sdk": "^1.1.1", - "@mui/icons-material": "^5.11.16", - "@mui/material": "^5.14.4", - "@mui/x-data-grid": "^6.4.0", - "@turf/turf": "^6.5.0", - "d3": "^7.8.5", - "date-fns": "^3.6.0", - "lodash.debounce": "^4.0.8", - "maplibre-gl": "^3.1.0", - "next": "^13.4.19", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-dropzone": "^14.2.3", - "react-loading": "^2.0.3", - "react-router-dom": "^6.14.1", - "react-toastify": "^9.1.3", - "sweetalert2": "^11.7.12" - }, - "devDependencies": { - "@testing-library/jest-dom": "^6.9.1", - "@testing-library/react": "^14.3.1", - "@testing-library/user-event": "^14.6.1", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0" - } -} diff --git a/front-end/pages/_app.js b/front-end/pages/_app.js deleted file mode 100755 index ab7a558..0000000 --- a/front-end/pages/_app.js +++ /dev/null @@ -1,29 +0,0 @@ -import '../styles/globals.css' -import EditMapProvider from '../contexts/EditMapProvider' -import { FolderProvider } from "../contexts/FolderContext"; -import FetchTaskInfoProvider from '../contexts/FetchTaskInfoProvider'; -import ReloadMapProvider from "../contexts/ReloadMapProvider"; -import ImpersonationBanner from "../components/ImpersonationBanner"; -import { installCsrfFetch } from "../utils/csrf"; - -// Every mutating API call must carry the CSRF header; wrap fetch once, -// globally, before any component code runs (no-op during SSR). -installCsrfFetch(); - -function MyApp({ Component, pageProps }) { - return ( - - - - - - - - - - - - ) -} - -export default MyApp diff --git a/front-end/pages/api/hello.js b/front-end/pages/api/hello.js deleted file mode 100755 index a7fedaf..0000000 --- a/front-end/pages/api/hello.js +++ /dev/null @@ -1,7 +0,0 @@ -// Next.js API route support: https://nextjs.org/docs/api-routes/introduction - -export default (req, res) => { - // Open Chrome DevTools to step through the debugger! - // debugger; - res.status(200).json({ name: 'Hello, world!' }); -}; diff --git a/front-end/pages/challenge.js b/front-end/pages/challenge.js deleted file mode 100644 index 4c5385c..0000000 --- a/front-end/pages/challenge.js +++ /dev/null @@ -1,99 +0,0 @@ -import { useState } from 'react'; -import { backend_url } from "../utils/settings"; -import Navbar from '../components/Navbar'; -import UploadChallenge from '../components/UploadChallenge'; -import { Drawer } from '@mui/material'; -import MyFile from '../components/MyFile'; -import dynamic from 'next/dynamic'; -import Swal from 'sweetalert2'; - - -const DynamicMap = dynamic(() => import('../components/Map'), { ssr: false }); - -function ChallengePage() { - const [data, setData] = useState(null); - const [myFileOpen, setMyFileOpen] = useState(false); - const [uploadOpen, setOpen] = useState(false); - - const handleDrawerOpen = () => { - setMyFileOpen(true); - }; - - const handleDrawerClose = () => { - setMyFileOpen(false); - }; - - const handleDrawerOpen2 = () => { - setOpen(true); - }; - - const handleDrawerClose2 = () => { - setOpen(false); - }; - - const fetchData = async () => { - try { - const response = await fetch(`${backend_url}/api/compute-challenge`); - const jsonData = await response.json(); - setData(jsonData); - } catch (error) { - Swal.fire('Error', 'Oops, something went wrong on our end, try again later', 'error'); - - } - } - - return ( -
- - - - {data &&
{JSON.stringify(data, null, 4)}
} - - - - - - -
- ); -} - -const CustomDrawer = ({ isOpen, children, onClose }) => { - if (!isOpen) return null; // Don't render the drawer at all if it's not open - - return ( -
- - {children} -
- ); -}; - -export default ChallengePage; diff --git a/front-end/pages/editnetworkfileinfo.js b/front-end/pages/editnetworkfileinfo.js deleted file mode 100644 index b9ab52c..0000000 --- a/front-end/pages/editnetworkfileinfo.js +++ /dev/null @@ -1,30 +0,0 @@ -import Navbar from "../components/Navbar"; -import { Drawer } from "@mui/material"; -import { useContext, useState } from "react"; -import { styled } from '@mui/material/styles'; -import { Typography } from "@mui/material"; -import dynamic from "next/dynamic"; -import {useFolder} from "../contexts/FolderContext.js"; - - -const FileEditTable = dynamic(() => import("../components/FileEditTable"), { ssr: false }); - -const StyledTypography = styled(Typography)({ - marginTop: "20px", - marginBottom: "20px", -}); - - -const editfileinfo = () => { - const {folderID, setFolderID} = useFolder(); - - return ( -
- - -
- ); -}; - - -export default editfileinfo; diff --git a/front-end/pages/index.js b/front-end/pages/index.js deleted file mode 100755 index 88deca1..0000000 --- a/front-end/pages/index.js +++ /dev/null @@ -1,143 +0,0 @@ -import styles from "../styles/Home.module.css"; -import Navbar from "../components/Navbar"; -import dynamic from "next/dynamic"; -import { Drawer } from "@mui/material"; -import MyFile from "../components/MyFile"; -import { useContext, useState, useEffect } from "react"; -import LayerVisibilityProvider from "../contexts/LayerVisibilityProvider"; -import SelectedLocationProvider from "../contexts/SelectedLocationProvider"; -import EditMapContext from "../contexts/EditMapContext"; -import MyEdit from "../components/MyEdit"; -import SelectedPolygonProvider from "../contexts/SelectedPolygonProvider"; -import SelectedPolygonAreaProvider from "../contexts/SelectedPolygonAreaProvider"; -import EditLayerVisibilityProvider from "../contexts/EditLayerVisibilityProvider"; -import { styled } from '@mui/material/styles'; -import { Typography, Container, Box } from "@mui/material"; -import Edit from "@mui/icons-material/Edit"; -import Upload from "../components/Upload"; -import FetchTaskInfoContext from "../contexts/FetchTaskInfoContext"; -import ReloadMapContext from "../contexts/ReloadMapContext"; - -const DynamicMap = dynamic(() => import("../components/Map"), { ssr: false }); -const Editmap = dynamic(() => import("../components/Editmap"), { ssr: false }); - -const StyledTypography = styled(Typography)({ - marginTop: "20px", - marginBottom: "20px", -}); - - -const HomePage = () => { - const [myFileOpen, setMyFileOpen] = useState(false); - const [uploadOpen, setOpen] = useState(false); - const { isEditingMap } = useContext(EditMapContext); - - const { setShouldFetchTaskInfo } = useContext(FetchTaskInfoContext); - const { setShouldReloadMap } = useContext(ReloadMapContext); - - useEffect(() => { - setShouldFetchTaskInfo(true); - setShouldReloadMap(true); - }, []); - - const handleDrawerOpen = () => { - setMyFileOpen(true); - }; - - const handleDrawerClose = () => { - setMyFileOpen(false); - }; - - const handleDrawerOpen2 = () => { - setOpen(true); - }; - - const handleDrawerClose2 = () => { - setOpen(false); - }; - - return ( - -
- - - - - - - - {isEditingMap ? : } - {/* This is where I will add filing logic */} - - {isEditingMap ? : } - - - - Upload Network Files Below: - - - - - - - - - -
- - ); -}; - -const CustomDrawer = ({ isOpen, children, onClose }) => { - if (!isOpen) return null; // Don't render the drawer at all if it's not open - - return ( -
- - {children} -
- ); -}; - - -export default HomePage; diff --git a/front-end/pages/login.js b/front-end/pages/login.js deleted file mode 100644 index e806e61..0000000 --- a/front-end/pages/login.js +++ /dev/null @@ -1,167 +0,0 @@ -import React, { useContext, useState } from "react"; -import { useRouter } from "next/router"; -import { TextField, Button, Typography, Container } from '@mui/material'; -import { styled } from '@mui/material/styles'; -import Swal from 'sweetalert2'; -import { backend_url } from '../utils/settings'; -import styles from '../styles/Login.module.css'; -import Navbar from '../components/Navbar'; -import { ToastContainer, toast } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import FetchTaskInfoContext from "../contexts/FetchTaskInfoContext"; - -const LoginContainer = styled("div")({ - display: "flex", - flexDirection: "column", - alignItems: "center", - marginTop: "8px", -}); - -const LoginForm = styled("form")({ - width: "100%", - marginTop: "8px", -}); - -const LoginButtonContainer = styled("div")({ - marginTop: "16px", - display: "flex", - gap: "16px", -}); - -const RegisterButton = styled(Button)({ - marginLeft: "16px", -}); - -const AuthContainer = styled("div")({ - display: "flex", - flexDirection: "row", - justifyContent: "center", - alignItems: "center", - width: "100%", - marginTop: "2%", -}); - - - -const Login = () => { - const router = useRouter(); - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const { setShouldFetchTaskInfo } = useContext(FetchTaskInfoContext); - - const validateEmail = (email) => { - const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - return re.test(String(email).toLowerCase()); - }; - - - const handleLogin = async (e) => { - e.preventDefault(); - - if (!validateEmail(email)) { - toast.error("Please enter a valid email address"); - } - - try { - const response = await fetch(`${backend_url}/api/login`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ email, password }), - credentials: 'include', - }); - - if (response.ok) { - const data = await response.json(); - if (data.status === 'success') { - router.push('/'); - setShouldFetchTaskInfo(true); - } else { - if (data.message === 'Invalid credentials') { - toast.error('Incorrect email or password.', 'error'); - } - } - } - } catch (error) { - toast.error('Error on server side'); - } - }; - - const handleRegisterClick = (event) => { - event.preventDefault(); - router.push('/register'); - }; - - return ( -
- - - - - - - Sign in with Email and Password - - - setEmail(e.target.value)} - /> - setPassword(e.target.value)} - /> - - - - Register - - - - - - - -
- ); -}; - -export default Login; diff --git a/front-end/pages/previousexport.js b/front-end/pages/previousexport.js deleted file mode 100644 index 5091ad8..0000000 --- a/front-end/pages/previousexport.js +++ /dev/null @@ -1,315 +0,0 @@ -import React, { useEffect, useState, useContext } from "react"; -import { useRouter } from "next/router"; -import { Typography, Container, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper, IconButton } from "@mui/material"; -import { styled } from "@mui/material/styles"; -import DeleteIcon from "@mui/icons-material/Delete"; -import MapIcon from "@mui/icons-material/Map"; -import Swal from "sweetalert2"; -import { backend_url } from "../utils/settings"; -import dynamic from 'next/dynamic'; -import Navbar from '../components/Navbar'; -import EditMapContext from "../contexts/EditMapContext"; -import Modal from '@mui/material/Modal'; -import { Box } from '@mui/system'; -import CloseIcon from '@mui/icons-material/Close'; -import EditIcon from '@mui/icons-material/Edit'; -import DownloadIcon from '@mui/icons-material/Download'; -import {useFolder} from "../contexts/FolderContext.js"; -import { toast, ToastContainer } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import ReloadMapContext from "../contexts/ReloadMapContext.js"; - - -const Minimap = dynamic( - () => import('../components/Minimap'), - { ssr: false } -); - -const HeaderText = styled(Typography)({ - marginBottom: "20px", - marginTop: "20px", -}); - -const StyledTable = styled(Table)({ - minWidth: 650, -}); - -const StyledContainer = styled(Container)({ - zIndex: 1000, - position: "relative", - minWidth: "80%", - height: "90vh", - marginTop: "20px" -}); - -const StyledIconButton = styled(IconButton)({ - color: "#f44336", - "&:hover": { - color: "#d32f2f", - }, -}); - - - -const PreviousExport = () => { - - const [filesByPeriod, setFilesByPeriod] = useState({}); - const router = useRouter(); - - - const { setEditingMap } = useContext(EditMapContext); - - const [viewonlymapid, setViewonlymapid] = useState(null); - - const [open, setOpen] = useState(false); - - const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); - - const {folderID, setFolderID} = useFolder(); - - const { setShouldReloadMap } = useContext(ReloadMapContext); - const fetchExportedFiles = async () => { - try { - const response = await fetch(`${backend_url}/api/export`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - credentials: 'include', - }); - - if (response.status === 401) { - Swal.fire({ - icon: 'error', - title: 'Oops...', - text: 'Session expired, please log in again!' - }); - router.push('/login'); - return; - } - - const data = await response.json(); - - if (!response.ok) { - throw new Error(data.message || 'Failed to fetch exported files'); - } - setFilesByPeriod(groupFilesByPeriod(data)); - } catch (error) { - console.error(error); - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to fetch exported files.' - }); - } - }; - - - const groupFilesByPeriod = (files) => { - return files.reduce((acc, file) => { - const fileDate = new Date(file.timestamp); - const year = fileDate.getFullYear(); - const startDate1 = new Date(year, 2, 16); - const endDate1 = new Date(year, 8, 15); - const startDate2 = new Date(year, 8, 16); - const endDate2 = new Date(year + 1, 2, 15); - - let period = ""; - if (fileDate >= startDate1 && fileDate <= endDate1) { - period = `${year} March 16 - ${year} Sep 15`; - } else if (fileDate >= startDate2 && fileDate <= endDate2) { - period = `${year} Sep 16 - ${year + 1} Mar 15`; - } - - if (!acc[period]) { - acc[period] = []; - } - acc[period].push(file); - return acc; - }, {}); - }; - - - - - useEffect(() => { - fetchExportedFiles(); - }, []); - - const handleDelete = async (period, fileIndex) => { - try { - const file = filesByPeriod[period][fileIndex]; - const response = await fetch(`${backend_url}/api/delexport/${file.id}`, { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - }, - credentials: 'include', - }); - - const data = await response.json(); - if (data.status === "success") { - - const newFilesByPeriod = { ...filesByPeriod }; - newFilesByPeriod[period].splice(fileIndex, 1); - setFilesByPeriod(newFilesByPeriod); - } - else { - toast.error(data.message); - } - } catch (error) { - toast.error("Error on server side, please try again later"); - } - }; - - - const handleDownload = async (period, fileIndex) => { - try { - const file = filesByPeriod[period][fileIndex]; - const response = await fetch(`${backend_url}/api/downloadexport/${file.id}`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - credentials: 'include', - }); - - if (!response.ok) { - throw new Error('Failed to download report'); - } - const blob = await response.blob(); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = file.name || 'download.csv'; // Use the file's name or a default - document.body.appendChild(a); - a.click(); - window.URL.revokeObjectURL(url); - a.remove(); - - } catch (error) { - console.error(error); - Swal.fire({ - icon: 'error', - title: 'Error', - text: 'Failed to delete the report. Please try again.' - }); - } - }; - - - const handleEditMap = (period, fileIndex) => { - const file = filesByPeriod[period][fileIndex]; - setFolderID(file.folder_id); - setEditingMap(true); - setShouldReloadMap(true); - router.push("/"); - }; - - const handleViewOnMap = (period, fileIndex) => { - const file = filesByPeriod[period][fileIndex]; - setViewonlymapid(file.folder_id); - handleOpen(); - }; - - - return ( -
- - - - - Your Previous Exported Filings - - - - Close Map - - - - - -
- ); -}; - -const FileTable = ({ filesByPeriod, handleDelete, handleViewOnMap, handleEditMap, handleDownload }) => { - return ( - <> - {Object.keys(filesByPeriod).map(period => ( -
- - {period} - - - - - - Filename - Created Time - Action - - - - {filesByPeriod[period].map((file, fileIndex) => ( - - {file.name} - {new Date(file.timestamp).toLocaleString()} - - handleViewOnMap(period, fileIndex)}> - - - View - - - handleEditMap(period, fileIndex)}> - - - Edit - - - handleDownload(period, fileIndex)}> - - - Download - - - handleDelete(period, fileIndex)}> - - - Delete - - - - - ))} - - - -
- ))} - - ); -}; - - -export default PreviousExport; \ No newline at end of file diff --git a/front-end/pages/profile.js b/front-end/pages/profile.js deleted file mode 100755 index e3fea83..0000000 --- a/front-end/pages/profile.js +++ /dev/null @@ -1,566 +0,0 @@ -import { useEffect, useState } from "react"; -import Navbar from '../components/Navbar'; -import { Button, Container, Typography, TextField, Paper, Grid, Divider, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material'; -import { ToastContainer, toast } from 'react-toastify'; -import "react-toastify/dist/ReactToastify.css"; -import { useRouter } from "next/router"; -import { backend_url } from "../utils/settings"; - - - -const Profile = () => { - const [user, setUser] = useState(null); - const [token, setToken] = useState(''); - const [showEmailTokenField, setShowEmailTokenField] = useState(false); - const [showOrgTokenField, setShowOrgTokenField] = useState(false); - const [openCreateOrg, setOpenCreateOrg] = useState(false); - const [openJoinOrg, setOpenJoinOrg] = useState(false); - - const [email, setEmail] = useState(''); - const [orgName, setOrgName] = useState(''); - const [joinOrgToken, setJoinOrgToken] = useState(''); - const router = useRouter(); - - const [providerId, setProviderId] = useState(''); - const [brandName, setBrandName] = useState(''); - - - // State for confirming exit/delete action - const [openConfirmDialog, setOpenConfirmDialog] = useState(false); - - // Function to handle the confirm action - const handleConfirmAction = () => { - if (user.is_admin) { - deleteOrganization(); - } else { - exitOrganization(); - } - setOpenConfirmDialog(false); - }; - - // Function to open the confirm dialog - const handleOpenConfirmDialog = () => { - setOpenConfirmDialog(true); - }; - - // Function to close the confirm dialog - const handleCloseConfirmDialog = () => { - setOpenConfirmDialog(false); - }; - - - const deleteOrganization = () => { - fetch(`${backend_url}/api/delete_organization`, { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ organizationName: user.organization.organization_name }), - credentials: 'include', - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success("Organization deleted successfully!"); - setUser({ ...user, organization: null }); - } else { - toast.error(data.message); - } - }) - .catch(error => { - console.error('Error deleting organization:', error); - toast.error('Network error or server issue'); - }); - }; - - const exitOrganization = () => { - fetch(`${backend_url}/api/exit_organization`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ organizationName: user.organization.organization_name }), - credentials: 'include', - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success("Exited organization successfully!"); - setUser({ ...user, organization: null }); - } else { - toast.error(data.message); - } - }) - .catch(error => { - console.error('Error exiting organization:', error); - toast.error('Network error or server issue'); - }); - }; - - const validateEmail = (email) => { - const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - return re.test(String(email).toLowerCase()); - }; - - const updateOrganizationDetails = () => { - if (!providerId && !brandName && !email && !orgName) { - toast.error("Please fill in the required fields"); - return; - } - - if (!validateEmail(email)) { - toast.error("Please enter a valid email address"); - return; - } - - const emailUpdated = user.email !== email; - fetch(`${backend_url}/api/update_profile`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - email: email, - organizationName: orgName, - providerId: providerId, - brandName: brandName - }), - credentials: 'include', - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success("Profile updated successfully!"); - setUser({ - ...user, - email: email, - verified: emailUpdated ? false : user.verified, - organization: orgName || providerId || brandName ? { - organization_name: orgName, - provider_id: providerId, - brand_name: brandName - } : null - }); - } else { - toast.error(data.message); - } - }); - }; - - useEffect(() => { - fetch(`${backend_url}/api/user`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - credentials: 'include', - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - setUser(data.userinfo); - setEmail(data.userinfo.email || ''); - if (data.userinfo.organization) { - setProviderId(data.userinfo.organization.provider_id || ''); - setBrandName(data.userinfo.organization.brand_name || ''); - setOrgName(data.userinfo.organization.organization_name || ''); - } - } else { - toast.error("Failed to fetch user data"); - router.push('/login'); - } - }) - .catch(error => { - console.error("Fetch error:", error); - toast.error("Network error or server issue"); - }); - }, []); - - - - const handleOpenCreateOrg = () => { - setOpenCreateOrg(true); - }; - - const handleCloseCreateOrg = () => { - setOpenCreateOrg(false); - }; - - const handleCreateOrg = () => { - if (!user.verified) { - toast.error("Please verify your email address before creating an organization"); - return; - } - if (!orgName) { - toast.error("Please enter an organization name."); - return; - } - fetch(`${backend_url}/api/create_organization`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ orgName: orgName }), - credentials: 'include', - }).then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success("Organization created successfully!"); - setUser({ - ...user, - is_admin: true, // Set is_admin to true organization: { organization_name: orgName } }); - organization: { - organization_name: orgName, - } - }); - } else { - toast.error(data.message); - } - handleCloseCreateOrg(); - }); - }; - - const handleJoinOrg = () => { - if (!orgName) { - toast.error("Please enter an organization name."); - return; - } - fetch(`${backend_url}/api/join_organization`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ name: orgName }), - credentials: 'include', - }).then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success("Join request sent to organization admin. Please ask them for the verification token to finish your join request"); - setShowOrgTokenField(true); - } else { - toast.error(data.message); - } - handleCloseJoinOrg(); - }); - }; - - const handleOpenJoinOrg = () => { - setOpenJoinOrg(true); - }; - - const handleCloseJoinOrg = () => { - setOpenJoinOrg(false); - }; - - const resendVerification = () => { - if (!user || !user.email) { - toast.error("User email not available"); - return; - } - fetch(`${backend_url}/api/send_email_verification`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ email: user.email }) - }) - .then(response => response.json()) - .then(data => { - if (data.status === "success") { - toast.success("Verification email resent"); - setShowEmailTokenField(true); - } else { - toast.error(data.message); - } - }); - }; - - const handleVerifyToken = (e) => { - e.preventDefault(); - fetch(`${backend_url}/api/verify_token`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ token }) - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success('Email address verified successfully.'); - setShowEmailTokenField(false); - setUser({ ...user, verified: true }); - } else { - toast.error(data.message); - } - }) - .catch(error => { - console.error('Error verifying token:', error); - toast.error('Network error or server issue'); - }); - }; - - const handleVerifyJoinOrgToken = (e) => { - e.preventDefault(); - fetch(`${backend_url}/api/verify_token`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ token: joinOrgToken }) - }) - .then(response => response.json()) - .then(data => { - if (data.status === 'success') { - toast.success(`Joined ${orgName} successfully.`); - setShowOrgTokenField(false); - setUser({ ...user, organization: { organization_name: orgName } }); - } else { - toast.error(data.message); - } - }) - .catch(error => { - console.error('Error verifying token:', error); - toast.error('Network error or server issue'); - }); - }; - - if (!user) return
Loading...
; - - return ( -
- - - - - - {/* User Account Info Section */} - - - - User Account Info - - - setEmail(e.target.value)} - fullWidth - margin="normal" - /> - {!user.verified && ( - <> - - Your account is not verified. Please verify your email. - - - {showEmailTokenField && ( -
- setToken(e.target.value)} - /> - - - )} - - )} -
-
- - {/* Organization Info Section */} - - - - Organization Info - - - {user.organization ? ( - <> - {user.is_admin && - - - You are the admin of the organization - - } - - - setOrgName(e.target.value)} - fullWidth - margin="normal" - /> - - - setProviderId(e.target.value)} - fullWidth - margin="normal" - /> - - - setBrandName(e.target.value)} - fullWidth - margin="normal" - /> - - - - ) : ( - <> - - Associate your account with an organization to start working on filings via: - - - - {showOrgTokenField && ( -
- setJoinOrgToken(e.target.value)} - /> - - - )} - - )} -
-
- - {/* */} - - {user.organization && - - } - {/* */} - -
-
- - - {user.is_admin ? 'Delete Organization' : 'Exit Organization'} - - - Are you sure you want to {user.is_admin ? 'delete this organization? All your filings will also be deleted.' : 'exit this organization?'} This action cannot be undone. - - - - - - - - - {/* Create Organization Dialog */} - - Create an Organization - - setOrgName(e.target.value)} - /> - - - - - - - - {/* Join Organization Dialog */} - - Join an Organization - - setOrgName(e.target.value)} - /> - - - - - - -
- ); -}; - -export default Profile; diff --git a/front-end/pages/register.js b/front-end/pages/register.js deleted file mode 100755 index ef61020..0000000 --- a/front-end/pages/register.js +++ /dev/null @@ -1,141 +0,0 @@ -import { useState } from "react"; -import { useRouter } from "next/router"; -import { TextField, Button, Typography, Container } from "@mui/material"; -import Navbar from "../components/Navbar"; -import { ToastContainer, toast } from "react-toastify"; -import "react-toastify/dist/ReactToastify.css"; -import { backend_url } from "../utils/settings"; -import { styled } from "@mui/system"; - -const RegisterContainer = styled("div")({ - display: "flex", - flexDirection: "column", - alignItems: "center", - marginTop: "8px", -}); - -const RegisterForm = styled("form")({ - width: "100%", - marginTop: "8px", -}); - -const RegisterButtonContainer = styled("div")({ - marginTop: "16px", - display: "flex", - gap: "16px", -}); - -const Register = () => { - const router = useRouter(); - - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); - - const validateEmail = (email) => { - const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - return re.test(String(email).toLowerCase()); - }; - - const handleRegister = async (e) => { - e.preventDefault(); - - if (!validateEmail(email)) { - toast.error( - "Please enter a valid email address", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 5000, - } - ); - return; - } - - console.log("url " + (backend_url + "/api/register")); - try { - const response = await fetch(`${backend_url}/api/register`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ email, password }), - credentials: "include", - }); - - if (response.ok) { - const data = await response.json(); - if (data.status === "success") { - router.push("/profile"); - } - } else if (response.status === 400) { - const data = await response.json(); - if (data.message === "Email already exists") { - toast.error( - "Email already exists", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 5000, - } - ); - } - } - } catch (error) { - console.error("Register error:", error); - } - }; - - return ( -
- - - - - - Register - - - setEmail(e.target.value)} - key="email-input" - /> - setPassword(e.target.value)} - key="password-input" - /> - - - - - - -
- ); -}; - -export default Register; \ No newline at end of file diff --git a/front-end/pages/resetPassword.js b/front-end/pages/resetPassword.js deleted file mode 100644 index 717401b..0000000 --- a/front-end/pages/resetPassword.js +++ /dev/null @@ -1,203 +0,0 @@ -import React, { useState } from 'react'; -import { useRouter } from 'next/router'; -import { TextField, Button, Typography, Container } from '@mui/material'; -import { ToastContainer, toast } from 'react-toastify'; -import 'react-toastify/dist/ReactToastify.css'; -import Navbar from '../components/Navbar'; -import { backend_url } from '../utils/settings'; - -const ResetPassword = () => { - const [email, setEmail] = useState(''); - const [token, setToken] = useState(''); - const [newPassword, setNewPassword] = useState(''); - const [step, setStep] = useState(1); // 1 for entering email, 2 for entering token, 3 for entering new password - const router = useRouter(); - - const handleRequestReset = async (e) => { - e.preventDefault(); - try { - const response = await fetch(`${backend_url}/api/request_password_reset`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ email }) - }); - const data = await response.json(); - if (data.status === 'success') { - toast.success('Password reset email sent.'); - setStep(2); - } else { - toast.error(data.message); - } - } catch (error) { - toast.error('Error sending password reset email.'); - } - }; - - const handleVerifyToken = async (e) => { - e.preventDefault(); - try { - const response = await fetch(`${backend_url}/api/verify_token`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ token }) - }); - const data = await response.json(); - if (data.status === 'success') { - toast.success('Token verified.'); - setStep(3); - } else { - toast.error(data.message); - } - } catch (error) { - toast.error('Error verifying token.'); - } - }; - - const handleResendToken = async () => { - try { - const response = await fetch(`${backend_url}/api/request_password_reset`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ email }) - }); - const data = await response.json(); - if (data.status === 'success') { - toast.success('Password reset email resent.'); - } else { - toast.error(data.message); - } - } catch (error) { - toast.error('Error resending password reset email.'); - } - }; - - const handleResetPassword = async (e) => { - e.preventDefault(); - try { - const response = await fetch(`${backend_url}/api/reset_password`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ token, newPassword }) - }); - const data = await response.json(); - if (data.status === 'success') { - toast.success('Password reset successfully.'); - router.push('/login'); - } else { - toast.error(data.message); - } - } catch (error) { - toast.error('Error resetting password.'); - } - }; - - return ( -
- - - - - {step === 1 ? 'Reset Password' : step === 2 ? 'Enter Token' : 'Enter New Password'} - - {step === 1 && ( -
- setEmail(e.target.value)} - /> - - - )} - {step === 2 && ( - <> -
- setToken(e.target.value)} - /> - - - - - )} - {step === 3 && ( -
- setNewPassword(e.target.value)} - /> - - - )} -
-
- ); -}; - -export default ResetPassword; diff --git a/front-end/pages/submitChallenge.js b/front-end/pages/submitChallenge.js deleted file mode 100644 index 31bf9c0..0000000 --- a/front-end/pages/submitChallenge.js +++ /dev/null @@ -1,27 +0,0 @@ -import Questionnaire from '../components/Questionnaire'; -import Navbar from '../components/Navbar'; - - -const Challenge = () => { - return ( -
- -
-

Challenge Form

- -
- - -
- ); -}; - -export default Challenge; diff --git a/front-end/pages/wirelessextension.js b/front-end/pages/wirelessextension.js deleted file mode 100644 index 1fdfa10..0000000 --- a/front-end/pages/wirelessextension.js +++ /dev/null @@ -1,787 +0,0 @@ -import React, { useState } from 'react'; -import Navbar from '../components/Navbar'; -import SmallLoadingEffect from '../components/SmallLoadingEffect'; -import WirelessCoveragemap from '../components/WirelessCoveragemap'; -import { useRouter } from "next/router"; -import { backend_url } from '../utils/settings'; -import { - Typography, - Container, - TextField, - Button, - FormControl, - InputLabel, - Select, - MenuItem, - Box, - Grid, - Paper, - Drawer, - Tooltip, - Input, - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from '@mui/material'; -import Swal from 'sweetalert2'; -import { styled } from "@mui/material/styles"; - - -const fieldGroups = { - towerLocation: [ - { key: 'towername', label: 'Tower Name', unit: '' }, - { key: 'latitude', label: 'Latitude', unit: 'degrees' }, - { key: 'longitude', label: 'Longitude', unit: 'degrees' }, - // ... other tower location fields - ], - signalStrength: [ - // { key: 'erp', label: 'Effective Radiated Power', unit: 'dBd' }, - { key: 'frequency', label: 'Frequency', unit: 'MHz' }, - { key: 'radius', label: 'Coverage Radius', unit: 'Km' }, - // ... other signal strength fields - ], - antennaInformation: [ - { key: 'antennaHeight', label: 'Antenna Height', unit: 'meters' }, - { key: 'antennaTilt', label: 'Antenna Tilt', unit: 'degrees' }, - { key: 'horizontalFacing', label: 'Horizontal Facing', unit: 'degrees' }, - // ... other antenna information fields - ], - filterOptions: [ - { key: 'floorLossRate', label: 'Floor Loss Rate', unit: 'dB' }, - // ... other filter option fields if needed - ], -}; - -const formContainerStyle = { - maxHeight: 'calc(100vh)', - overflowY: 'auto', -}; - - -const StyledFormControl = styled(FormControl)({ - margin: "4px", - minWidth: "150px", - backgroundColor: "white", - borderRadius: "4px", - height: "25px", - display: "flex", - alignItems: "center", -}); - -const StyledSelect = styled(Select)({ - height: "25px", - padding: "0 0 0 10px", - minWidth: "150px", -}); - -const networkInfoHeaderStyle = { - textAlign: 'center', - margin: '10px 0', - fontWeight: 'bold', -}; - -const tech_types = { - "Geostationary Satellite": 60, - "Non-geostationary Satellite": 61, - "Unlicensed Terrestrial Fixed Wireless": 70, - "Licensed Terrestrial Fixed Wireless": 71, - "Licensed-by-Rule Terrestrial Fixed Wireless": 72, - "Other": 0, -}; - -const latency_type = { - "<= 100 ms": 1, - "> 100 ms": 0, -}; - -const bus_codes = { - Business: "B", - Residential: "R", - Both: "X", -}; - -const StyledInput = styled(Input)({ - padding: '10px', - margin: '4px', - border: '1px solid #ccc', - borderRadius: '4px', - width: 'calc(100% - 24px)', // accounting for padding and margins - boxSizing: 'border-box', // make sure padding doesn't affect the width - maxHeight: '30%' -}); - -const StyledButton = styled(Button)({ - margin: '20px 4px 4px', -}); - -const StyledGridItem = styled(Grid)(({ theme }) => ({ - display: 'flex', - flexDirection: 'column', - justifyContent: 'flex-start', // Align items to the start of the flex container - alignItems: 'flex-start', // Align items to the start of the cross axis - padding: theme.spacing(1), - [theme.breakpoints.down('xs')]: { - width: '100%', - boxSizing: 'border-box', - }, -})); - -const WirelessExtension = () => { - - const [isLoadingForUntimedEffect, setIsLoadingForUntimedEffect] = useState(false); - const [formData, setFormData] = useState({ - towername: '', - latitude: '', - longitude: '', - // erp: '', - frequency: '', - radius: '', - antennaHeight: '', - antennaTilt: '', - horizontalFacing: '', - floorLossRate: 150, - // ... include other default values as necessary - }); - const [inPreviewMode, setInPreviewMode] = useState(false); - const [colorMapping, setColorMapping] = useState({}); - const [saveCoverage, setSaveCoverage] = useState(false); - - const [imageUrl, setImageUrl] = useState(''); - const [transparentImageUrl, setTransparentImageUrl] = useState(''); - const [bounds, setBounds] = useState({ - north: 39.5, east: -98.5, south: 39.5, west: -98.5 - }); - - const [downloadSpeed, setDownloadSpeed] = React.useState(""); - const [uploadSpeed, setUploadSpeed] = React.useState(""); - const [techType, setTechType] = React.useState(""); - const [latency, setLatency] = React.useState(""); - const [categoryCode, setCategoryCode] = React.useState(""); - - const [openDialog, setOpenDialog] = useState(false); - - - const router = useRouter(); - const handleDialogClose = (option) => { - setOpenDialog(false); - if (option === 'mainPage') { - router.push('/'); - } - }; - - const handleInputChange = (event) => { - const { name, value } = event.target; - setFormData((prevFormData) => ({ - ...prevFormData, - [name]: value, - })); - }; - - const fetchKMLFile = (kml_filename) => { - fetch(`${backend_url}/api/download-kmlfile/${kml_filename}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then((response) => { - if (response.ok) { - return response.blob(); - } else { - throw new Error('Failed to fetch file'); - } - }) - .then((blob) => { - // Create a URL for the blob - const fileUrl = URL.createObjectURL(blob); - - // Create a temporary anchor element and trigger a download - const a = document.createElement("a"); - a.href = fileUrl; - a.download = kml_filename; // Set the file name for download - document.body.appendChild(a); // Append to the document - a.click(); // Trigger a click to download - - // Clean up: remove the anchor element and revoke the object URL - document.body.removeChild(a); - URL.revokeObjectURL(fileUrl); - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const fetchRasterImage = (towerId) => { - fetch(`${backend_url}/api/get-raster-image/${towerId}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then((response) => { - if (response.ok) { - return response.blob().then(imageBlob => ({ - imageBlob - })); - } else { - throw new Error('Failed to fetch raster data'); - } - }) - .then(({ imageBlob }) => { - // Create a URL for the image blob - const imageUrl = URL.createObjectURL(imageBlob); - setImageUrl(imageUrl); - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const fetchTransparentRasterImage = (towerId) => { - fetch(`${backend_url}/api/get-transparent-raster-image/${towerId}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then((response) => { - if (response.ok) { - return response.blob().then(imageBlob => ({ - imageBlob - })); - } else { - throw new Error('Failed to fetch raster data'); - } - }) - .then(({ imageBlob }) => { - // Create a URL for the image blob - const imageUrl = URL.createObjectURL(imageBlob); - setTransparentImageUrl(imageUrl); - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const fetchRasterBounds = (towerId) => { - fetch(`${backend_url}/api/get-raster-bounds/${towerId}`, { - method: "GET", - credentials: "include", // make sure to send credentials to maintain the session - }) - .then((response) => { - if (response.ok) { - return response.json(); // Parse the JSON response body - } else { - throw new Error('Failed to fetch raster bounds'); - } - }) - .then((data) => { - // Use the bounds from the response data - setBounds(data.bounds); - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const fetchLossToColorMapping = (towerId) => { - fetch(`${backend_url}/api/get-loss-color-mapping/${towerId}`, { - method: "GET", - credentials: "include", - }) - .then((response) => { - if (response.ok) { - return response.json(); - } else { - throw new Error('Failed to fetch loss to color mapping'); - } - }) - .then((mapping) => { - setColorMapping(mapping); // Update the state with the fetched mapping - }) - .catch((error) => { - Swal.fire({ - icon: "error", - title: "Oops...", - text: error.message, - }); - }); - }; - - const handleComputeCoverage = (event) => { - event.preventDefault(); - setIsLoadingForUntimedEffect(true); - fetch(`${backend_url}/api/compute-wireless-coverage`, { - method: "POST", - headers: { - 'Content-Type': 'application/json', // Set the content type to application/json - }, - body: JSON.stringify(formData), // Serialize formData to JSON - credentials: "include", - }) - .then((response) => { - if (response.status === 401) { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else if (response.status === 200) { - setInPreviewMode(true); - return response.json(); - } else if (response.status === 500 || response.status === 400) { - setIsLoadingForUntimedEffect(false); - toast.error( - "There is an error on our end", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 10000, - } - ); - } - }) - .then((data) => { - if (data) { - const intervalId = setInterval(() => { - fetch(`${backend_url}/api/status/${data.task_id}`) - .then((response) => response.json()) - .then((status) => { - if (status.state !== "PENDING") { - setIsLoadingForUntimedEffect(false); - clearInterval(intervalId); - fetchRasterImage(formData.towername); - fetchTransparentRasterImage(formData.towername); - fetchRasterBounds(formData.towername); - fetchLossToColorMapping(formData.towername); - } - }); - }, 5000); - } - }) - .catch((error) => { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "There is an error on our end, please try again later", - }); - console.error("Error:", error); - - }); - }; - - const saveCoverageClick = (event) => { - event.preventDefault(); - setSaveCoverage(true); - }; - - const handleSaveCoverage = (event) => { - event.preventDefault(); - setIsLoadingForUntimedEffect(true); - const coverageData = { - towername: formData.towername, // Ensure towername is included - downloadSpeed: downloadSpeed, - uploadSpeed: uploadSpeed, - techType: techType, - latency: latency, - categoryCode: categoryCode - }; - console.log(coverageData); - fetch(`${backend_url}/api/compute-wireless-prediction-fabric-coverage`, { - method: "POST", - headers: { - 'Content-Type': 'application/json', // Set the content type to application/json - }, - body: JSON.stringify(coverageData), // Serialize formData to JSON - credentials: "include", - }) - .then((response) => { - if (response.status === 401) { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else if (response.status === 200) { - return response.json(); - } else if (response.status === 500 || response.status === 400) { - setIsLoadingForUntimedEffect(false); - toast.error( - "There is an error on our end", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 10000, - } - ); - } - }) - .then((data) => { - if (data) { - const intervalId = setInterval(() => { - fetch(`${backend_url}/api/status/${data.task_id}`) - .then((response) => response.json()) - .then((status) => { - if (status.state !== "PENDING") { - setIsLoadingForUntimedEffect(false); - clearInterval(intervalId); - setSaveCoverage(false); - fetchKMLFile(data.kml_filename); - setOpenDialog(true); - } - }); - }, 5000); - } - }) - .catch((error) => { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "There is an error on our end, please try again later", - }); - console.error("Error:", error); - - }); - }; - - const handleFileUpload = (event) => { - const file = event.target.files[0]; - if (file) { - // setIsLoadingForUntimedEffect(true); - const formD = new FormData(); - formD.append('file', file); - - fetch(`${backend_url}/api/upload-tower-csv`, { - method: 'POST', - credentials: 'include', - body: formD - }) - .then((response) => { - if (response.status === 401) { - setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "Session expired, please log in again!", - }); - // Redirect to login page - router.push("/login"); - return; - } else if (response.status === 200) { - return response.json(); - } else if (response.status === 500 || response.status === 400) { - setIsLoadingForUntimedEffect(false); - toast.error( - "There is an error on our end", - { - position: toast.POSITION.TOP_RIGHT, - autoClose: 10000, - } - ); - } - }) - .then(data => { - // Assuming the backend returns the parsed CSV data in the same structure as the formData state - - // The backend returns an array with a dict object for each tower, since we only support - // single tower information in the frontend, we just use data[0] for now. - - setFormData(prevFormData => ({ - ...prevFormData, - towername: data[0].towerName || '', - latitude: data[0].latitude || '', - longitude: data[0].longitude || '', - frequency: data[0].frequency || '', - radius: data[0].coverageRadius || '', - antennaHeight: data[0].antennaHeight || '', - antennaTilt: data[0].antennaTilt || '', - horizontalFacing: data[0].horizontalFacing || '', - floorLossRate: data[0].floorLossRate || 150 - })); - }) - .catch(error => { - // setIsLoadingForUntimedEffect(false); - Swal.fire({ - icon: "error", - title: "Oops...", - text: "There was a problem uploading the file", - }); - console.log(error); - }); - } - }; - - const downloadSampleCSV = () => { - // Construct the URL to your sample CSV file located in the public folder - // Trigger the browser to download the file - window.location.href = process.env.NEXT_PUBLIC_SAMPLE_TOWER_INFO_CSV; - }; - - - - const renderFieldGroup = (group, groupName) => { - return ( - - {groupName} - {group.map((field) => ( - {field.unit} : null, - }} - /> - ))} - - ); - }; - - return ( -
-
- {(isLoadingForUntimedEffect) && } -
- - - - - {/* This will take 3 columns on medium devices and above, and full width on small devices */} - - - Tower Information - - - {/* Adjust the width as needed */} - - - {/* Adjust the width as needed */} - - - -
- {renderFieldGroup(fieldGroups.towerLocation, 'Tower Location')} - {renderFieldGroup(fieldGroups.signalStrength, 'Signal Strength')} - {renderFieldGroup(fieldGroups.antennaInformation, 'Antenna Information')} - {renderFieldGroup(fieldGroups.filterOptions, 'Filter Options')} - - {inPreviewMode && ( - - )} -
-
-
- - {/* This will take 9 columns on medium devices and above, and full width on small devices */} - - -
- - setSaveCoverage(false)} - > -
- - Please fill in your network information - - - - - setDownloadSpeed(e.target.value)} - /> - - - - setUploadSpeed(e.target.value)} - /> - - - - - setTechType(e.target.value)} - > - {Object.entries(tech_types).map(([key, value]) => ( - - -
- {key} -
-
-
- ))} -
-
-
- - - - setLatency(e.target.value)} - > - {Object.entries(latency_type).map(([key, value]) => ( - -
- {key} -
-
- ))} -
-
-
- - - - setCategoryCode(e.target.value)} - > - {Object.entries(bus_codes).map(([key, value]) => ( - -
- {key} -
-
- ))} -
-
-
- - - Submit - - -
-
- -
- - -
- - handleDialogClose('stay')} - aria-labelledby="alert-dialog-title" - aria-describedby="alert-dialog-description" - > - {"Your fabric location coverage has been successfully computed saved."} - - - - - - - - - -
- ); -}; - -export default WirelessExtension; diff --git a/front-end/public/map_marker.svg b/front-end/public/map_marker.svg deleted file mode 100755 index ea01eca..0000000 --- a/front-end/public/map_marker.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/front-end/styles/Home.module.css b/front-end/styles/Home.module.css deleted file mode 100755 index e69de29..0000000 diff --git a/front-end/styles/Login.module.css b/front-end/styles/Login.module.css deleted file mode 100644 index 5488bd5..0000000 --- a/front-end/styles/Login.module.css +++ /dev/null @@ -1,46 +0,0 @@ -/* login.module.css */ - -.container { - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - background-color: #f5f7fa; - font-family: 'Arial', sans-serif; -} - -.header { - text-align: center; - margin-bottom: 2rem; -} - -.title { - font-size: 2.5rem; - font-weight: bold; - color: #333; -} - -.subtitle { - font-size: 1.2rem; - color: #777; - margin-top: 0.5rem; -} - -#firebaseui-auth-container { - width: 100%; - max-width: 450px; - padding: 2rem; - box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); - border-radius: 10px; - margin-top: -150px; /* Adjust based on header height */ -} - -.firebaseui-card-content { - padding: 1.5rem !important; -} - -.firebaseui-id-page-title { - font-size: 1.5rem !important; - font-weight: 500 !important; -} - diff --git a/front-end/styles/Map.module.css b/front-end/styles/Map.module.css deleted file mode 100755 index 458754b..0000000 --- a/front-end/styles/Map.module.css +++ /dev/null @@ -1,51 +0,0 @@ -.map-container { - position: relative; - width: 100%; - height: 100vh; -} - -#map { - width: 100%; - height: 100%; -} - -.button-container { - position: absolute; - top: 10px; - left: 10px; - /* z-index: 1000; */ -} - -.button-container button { - padding: 10px; - background-color: white; - border: 1px solid #ccc; - border-radius: 4px; - cursor: pointer; -} - -.loading-spinner-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - background-color: rgba(255, 255, 255, 0.7); /* Adjust the background color and opacity as needed */ - /* z-index: 999; */ -} - -.loading-spinner { - width: 50px; - height: 50px; -} - -.tab-content { - display: none; -} - -.tab-content.active { - display: block; -} diff --git a/front-end/styles/Tool.module.css b/front-end/styles/Tool.module.css deleted file mode 100755 index b5f9ed4..0000000 --- a/front-end/styles/Tool.module.css +++ /dev/null @@ -1,53 +0,0 @@ -.content { - display: flex; -} - -.mapContainer { - flex: 1; - position: relative; - height: 100vh; -} - -.iconContainer { - position: absolute; - top: 50%; - right: 20px; - transform: translateY(-50%); - cursor: pointer; - background-color: #f0f0f0; - padding: 10px; - border-radius: 50%; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); - /* z-index: 999; */ -} - -.expandIcon { - color: grey; - font-size: 20px; - z-index: 1; - -} - -.sidebar { - flex: 0 0 200px; - background-color: #f0f0f0; - transform: translateX(100%); - transition: transform 0.3s ease-in-out; - z-index: 0; -} - -.sidebarVisible { - transform: translateX(0); -} - -.sidebarContent { - padding: 10px; -} - -.backButton { - margin-bottom: -25px; -} - -.backButtonContainer { - padding-top: 1px; /* Adjust the padding as needed */ -} \ No newline at end of file diff --git a/front-end/styles/globals.css b/front-end/styles/globals.css deleted file mode 100755 index e5e2dcc..0000000 --- a/front-end/styles/globals.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; -} - -a { - color: inherit; - text-decoration: none; -} - -* { - box-sizing: border-box; -} diff --git a/front-end/utils/FactSheets.js b/front-end/utils/FactSheets.js deleted file mode 100755 index e933f60..0000000 --- a/front-end/utils/FactSheets.js +++ /dev/null @@ -1,54 +0,0 @@ -export const stateList = [ - { name: "Alaska", abbreviation: "AK", latitude: "63.588753", longitude: "-154.493062" }, - { name: "Alabama", abbreviation: "AL", latitude: "32.318231", longitude: "-86.902298" }, - { name: "Arkansas", abbreviation: "AR", latitude: "35.20105", longitude: "-91.831833" }, - { name: "Arizona", abbreviation: "AZ", latitude: "34.048928", longitude: "-111.093731" }, - { name: "California", abbreviation: "CA", latitude: "36.778261", longitude: "-119.417932" }, - { name: "Colorado", abbreviation: "CO", latitude: "39.550051", longitude: "-105.782067" }, - { name: "Connecticut", abbreviation: "CT", latitude: "41.603221", longitude: "-73.087749" }, - { name: "District of Columbia", abbreviation: "DC", latitude: "38.905985", longitude: "-77.033418" }, - { name: "Delaware", abbreviation: "DE", latitude: "38.910832", longitude: "-75.52767" }, - { name: "Florida", abbreviation: "FL", latitude: "27.664827", longitude: "-81.515754" }, - { name: "Georgia", abbreviation: "GA", latitude: "32.157435", longitude: "-82.907123" }, - { name: "Hawaii", abbreviation: "HI", latitude: "19.898682", longitude: "-155.665857" }, - { name: "Iowa", abbreviation: "IA", latitude: "41.878003", longitude: "-93.097702" }, - { name: "Idaho", abbreviation: "ID", latitude: "44.068202", longitude: "-114.742041" }, - { name: "Illinois", abbreviation: "IL", latitude: "40.633125", longitude: "-89.398528" }, - { name: "Indiana", abbreviation: "IN", latitude: "40.551217", longitude: "-85.602364" }, - { name: "Kansas", abbreviation: "KS", latitude: "39.011902", longitude: "-98.484246" }, - { name: "Kentucky", abbreviation: "KY", latitude: "37.839333", longitude: "-84.270018" }, - { name: "Louisiana", abbreviation: "LA", latitude: "31.244823", longitude: "-92.145024" }, - { name: "Massachusetts", abbreviation: "MA", latitude: "42.407211", longitude: "-71.382437" }, - { name: "Maryland", abbreviation: "MD", latitude: "39.045755", longitude: "-76.641271" }, - { name: "Maine", abbreviation: "ME", latitude: "45.253783", longitude: "-69.445469" }, - { name: "Michigan", abbreviation: "MI", latitude: "44.314844", longitude: "-85.602364" }, - { name: "Minnesota", abbreviation: "MN", latitude: "46.729553", longitude: "-94.6859" }, - { name: "Missouri", abbreviation: "MO", latitude: "37.964253", longitude: "-91.831833" }, - { name: "Mississippi", abbreviation: "MS", latitude: "32.354668", longitude: "-89.398528" }, - { name: "Montana", abbreviation: "MT", latitude: "46.879682", longitude: "-110.362566" }, - { name: "North Carolina", abbreviation: "NC", latitude: "35.759573", longitude: "-79.0193" }, - { name: "North Dakota", abbreviation: "ND", latitude: "47.551493", longitude: "-101.002012" }, - { name: "Nebraska", abbreviation: "NE", latitude: "41.492537", longitude: "-99.901813" }, - { name: "New Hampshire", abbreviation: "NH", latitude: "43.193852", longitude: "-71.572395" }, - { name: "New Jersey", abbreviation: "NJ", latitude: "40.058324", longitude: "-74.405661" }, - { name: "New Mexico", abbreviation: "NM", latitude: "34.97273", longitude: "-105.032363" }, - { name: "Nevada", abbreviation: "NV", latitude: "38.80261", longitude: "-116.419389" }, - { name: "New York", abbreviation: "NY", latitude: "43.299428", longitude: "-74.217933" }, - { name: "Ohio", abbreviation: "OH", latitude: "40.417287", longitude: "-82.907123" }, - { name: "Oklahoma", abbreviation: "OK", latitude: "35.007752", longitude: "-97.092877" }, - { name: "Oregon", abbreviation: "OR", latitude: "43.804133", longitude: "-120.554201" }, - { name: "Pennsylvania", abbreviation: "PA", latitude: "41.203322", longitude: "-77.194525" }, - { name: "Puerto Rico", abbreviation: "PR", latitude: "18.220833", longitude: "-66.590149" }, - { name: "Rhode Island", abbreviation: "RI", latitude: "41.580095", longitude: "-71.477429" }, - { name: "South Carolina", abbreviation: "SC", latitude: "33.836081", longitude: "-81.163725" }, - { name: "South Dakota", abbreviation: "SD", latitude: "43.969515", longitude: "-99.901813" }, - { name: "Tennessee", abbreviation: "TN", latitude: "35.517491", longitude: "-86.580447" }, - { name: "Texas", abbreviation: "TX", latitude: "31.968599", longitude: "-99.901813" }, - { name: "Utah", abbreviation: "UT", latitude: "39.32098", longitude: "-111.093731" }, - { name: "Virginia", abbreviation: "VA", latitude: "37.431573", longitude: "-78.656894" }, - { name: "Vermont", abbreviation: "VT", latitude: "44.558803", longitude: "-72.577841" }, - { name: "Washington", abbreviation: "WA", latitude: "47.751074", longitude: "-120.740139" }, - { name: "Wisconsin", abbreviation: "WI", latitude: "43.78444", longitude: "-88.787868" }, - { name: "West Virginia", abbreviation: "WV", latitude: "38.597626", longitude: "-80.454903" }, - { name: "Wyoming", abbreviation: "WY", latitude: "43.075968", longitude: "-107.290284" } - ]; \ No newline at end of file diff --git a/front-end/utils/csrf.js b/front-end/utils/csrf.js deleted file mode 100644 index 26c79b5..0000000 --- a/front-end/utils/csrf.js +++ /dev/null @@ -1,31 +0,0 @@ -// Double-submit CSRF support. At login the backend sets two cookies: the -// HttpOnly session `token` and a JS-readable `csrf_access_token`. Every -// mutating request must echo the latter in an X-CSRF-TOKEN header or the -// backend rejects it. Installing a global fetch wrapper once (from _app.js) -// covers every call site without touching them individually. - -export function readCsrfToken() { - if (typeof document === "undefined") return null; - const match = document.cookie.match(/(?:^|;\s*)csrf_access_token=([^;]+)/); - return match ? decodeURIComponent(match[1]) : null; -} - -const MUTATING = ["POST", "PUT", "PATCH", "DELETE"]; - -export function installCsrfFetch() { - if (typeof window === "undefined" || window.__bdkCsrfFetchInstalled) return; - const origFetch = window.fetch.bind(window); - window.fetch = (input, init) => { - const method = ((init && init.method) || (input && input.method) || "GET").toUpperCase(); - if (MUTATING.includes(method)) { - const token = readCsrfToken(); - if (token) { - const headers = new Headers((init && init.headers) || undefined); - if (!headers.has("X-CSRF-TOKEN")) headers.set("X-CSRF-TOKEN", token); - init = { ...(init || {}), headers }; - } - } - return origFetch(input, init); - }; - window.__bdkCsrfFetchInstalled = true; -} diff --git a/front-end/utils/settings.js b/front-end/utils/settings.js deleted file mode 100644 index 6223c4a..0000000 --- a/front-end/utils/settings.js +++ /dev/null @@ -1,21 +0,0 @@ -// Keyless OSM raster basemap, used whenever a MapTiler style URL isn't -// configured — the map then renders without any API key (dev/demo). MapLibre -// accepts either a style URL string or a style object, so consumers don't care -// which one they get. -const osmFallbackStyle = { - version: 8, - sources: { - osm: { - type: "raster", - tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"], - tileSize: 256, - attribution: "© OpenStreetMap contributors", - }, - }, - layers: [{ id: "osm", type: "raster", source: "osm" }], -}; - -export const backend_url = process.env.NEXT_PUBLIC_DEVELOP_BACKEND_URL; -export const maptile_street = process.env.NEXT_PUBLIC_DEVELOP_MAPTILE_STREET || osmFallbackStyle; -export const maptile_satelite = process.env.NEXT_PUBLIC_DEVELOP_MAPTILE_SATELITE || osmFallbackStyle; -export const maptile_dark = process.env.NEXT_PUBLIC_DEVELOP_MAPTILE_DARK || osmFallbackStyle; diff --git a/nginx.conf.local b/nginx.conf.local index 8bbb78a..8dd0fa1 100644 --- a/nginx.conf.local +++ b/nginx.conf.local @@ -5,59 +5,18 @@ server { # Large uploads (fabric deliveries, coverage files) — matches prod. client_max_body_size 500M; - # Frontend route for everything else + # Every path is served by the backend — the server-rendered app, /api, + # the admin panel, auth pages, and static assets all live there (same + # shape as deploy/nginx.conf, minus TLS). location / { - proxy_pass http://frontend:3000; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_cache_bypass $http_upgrade; - proxy_buffering off; - proxy_redirect off; - proxy_buffers 8 16k; - proxy_buffer_size 16k; - proxy_busy_buffers_size 24k; - } - - # Backend routes - location /api/ { - proxy_pass http://backend:8000; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_buffers 8 16k; - proxy_buffer_size 16k; - proxy_busy_buffers_size 24k; - } - - # Server-rendered admin panel (Flask + htmx). Covers /admin/, /admin/api/, - # and /admin/static/. Longest-prefix match wins over `location /`. - location = /admin { return 301 /admin/; } - location /admin/ { - proxy_pass http://backend:8000; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_buffers 8 16k; - proxy_buffer_size 16k; - proxy_busy_buffers_size 24k; - } - - # Server-rendered app pages (the redesigned UI), brought up page by page - # beside the SPA. These paths are new (the SPA doesn't own them), so they - # all route to the backend already; a page goes live when the backend - # replaces its placeholder — no nginx change per page. - location ~ ^/(org|files|map|submissions|setup|filing|assets|auth)(/|$) { proxy_pass http://backend:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_buffers 8 16k; - proxy_buffer_size 16k; - proxy_busy_buffers_size 24k; + proxy_http_version 1.1; + proxy_buffering off; # SSE (job pill / map finalize streams) + proxy_read_timeout 300s; + proxy_send_timeout 300s; + proxy_connect_timeout 60s; } - } diff --git a/start-nginx.sh b/start-nginx.sh deleted file mode 100644 index d081d63..0000000 --- a/start-nginx.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f - -# Read the passphrase from a file -set timeout -1 -set passphrase [read [open "/ssl/passphrase_file" r]] - -# Start Nginx and provide the passphrase when prompted -spawn nginx - -expect { - "Enter PEM pass phrase:" { - send "$passphrase\r" - exp_continue - } -} - -# Keep the script running to not exit the container -interact From c8323738014cfbc5f4ff1f6b9b1eeead34e00df1 Mon Sep 17 00:00:00 2001 From: Shaddi Hasan Date: Tue, 7 Jul 2026 11:14:53 -0400 Subject: [PATCH 3/4] audit: record every provider-data upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server-rendered upload paths never wrote audit rows — the only log_action("upload") call lived in the removed SPA endpoint, so since cutover, uploads were absent from the tamper-evident trail (only the operational celerytaskinfo rows recorded them). For an FCC-filing system the ingest of provider data belongs in the audit log. Both intake services now log on successful dispatch — coverage uploads in upload_service.dispatch_upload, fabric deliveries in fabric_service.intake_fabric — so all four page routes (/files and /setup doors) inherit it, tagged with kind, task id, and filenames. --- back-end/services/fabric_service.py | 8 +++ back-end/services/upload_service.py | 10 ++++ back-end/tests/test_audit.py | 86 +++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) diff --git a/back-end/services/fabric_service.py b/back-end/services/fabric_service.py index 78d1970..8f42c0c 100644 --- a/back-end/services/fabric_service.py +++ b/back-end/services/fabric_service.py @@ -31,6 +31,7 @@ ) from database.models import fabric_data, kml_data, supplemental_data from services import fabric_intake +from services.audit import log_action from services.exceptions import ServiceError ROLE_TO_TYPE = { @@ -166,6 +167,13 @@ def intake_fabric(user_id, folderid, filename, data, session, override_vintage=F files_changed=", ".join(f.name for f in new_files), ) + log_action( + "upload", + user_id=user.id, + resource_type="folder", + resource_id=folderid, + details={"kind": "fabric", "task_id": result.id, "files": [f.name for f in new_files]}, + ) return { "task_id": result.id, "roles": roles, diff --git a/back-end/services/upload_service.py b/back-end/services/upload_service.py index 5a6145c..ba15a22 100644 --- a/back-end/services/upload_service.py +++ b/back-end/services/upload_service.py @@ -28,6 +28,7 @@ process_data, ) from controllers.database_controller import celerytaskinfo_ops, folder_ops, user_ops +from services.audit import log_action from services.exceptions import ServiceError from utils.logger_config import logger @@ -173,6 +174,15 @@ def dispatch_upload( session=session, files_changed=concatenated_filenames, ) + # The audit row is the tamper-evident record (celerytaskinfo is + # operational state); every ingest of provider data must land here. + log_action( + "upload", + user_id=user_id, + resource_type="folder", + resource_id=folderid if folderid != -1 else None, + details={"kind": "coverage", "task_id": result.id, "files": filenames}, + ) return result.id diff --git a/back-end/tests/test_audit.py b/back-end/tests/test_audit.py index a07ff0e..8054f94 100644 --- a/back-end/tests/test_audit.py +++ b/back-end/tests/test_audit.py @@ -125,3 +125,89 @@ def test_org_create_audited(client): client.post("/org/create", data={"name": "Audit ISP"}) assert len(_rows("org_create")) == 1 assert _rows("org_create")[0].details.get("name") == "Audit ISP" + + +# ------------------------------------------------------------------- uploads + + +@pytest.fixture() +def no_tiles(monkeypatch): + from controllers.celery_controller import celery_tasks as ct + + monkeypatch.setattr(ct, "_coalesced_tile_rebuild", lambda *a, **k: "stubbed") + + +POLYGON_GEOJSON = b"""{"type":"FeatureCollection","features":[{"type":"Feature","properties":{}, +"geometry":{"type":"Polygon","coordinates":[[[-80.01,37.27],[-79.90,37.27],[-79.90,37.31], +[-80.01,37.31],[-80.01,37.27]]]}}]}""" + +FABRIC_ROWS = [ + (1001, "1 MAIN ST", "TRUE", 37.28, -79.95, "51161", "VA"), + (1002, "2 ELM AVE", "TRUE", 37.50, -79.95, "51161", "VA"), +] + + +def _login_with_filing(client, db_session, email): + from datetime import date + + _register(client, email) + uid = _verify(email) + org = H.make_org(db_session, name=f"audit-org-{email}") + from database.models import user + + u = db_session.query(user).filter(user.id == uid).one() + u.organization_id = org.id + db_session.commit() + folder = H.make_folder(db_session, org.id, deadline=date(2025, 9, 1)) + return org, folder + + +def test_coverage_upload_audited(client, db_session, no_tiles): + """Every ingest of provider data must land in the audit trail — this is + an FCC-filing system. Regression: the server-rendered upload paths + originally wrote no audit rows at all.""" + import io + + from tests.conftest_helpers import make_active_fabric_csv + + org, folder = _login_with_filing(client, db_session, "covaudit@example.com") + H.seed_fabric(db_session, folder.id, make_active_fabric_csv(FABRIC_ROWS)) + + resp = client.post( + "/files/coverage/upload", + data={"network_files": [(io.BytesIO(POLYGON_GEOJSON), "sector.geojson")]}, + content_type="multipart/form-data", + ) + assert resp.status_code == 200 + + rows = _rows("upload") + assert len(rows) == 1 + assert rows[0].resource_type == "folder" + assert rows[0].resource_id == folder.id + assert rows[0].details.get("kind") == "coverage" + assert rows[0].details.get("files") == ["sector.geojson"] + assert rows[0].details.get("task_id") + + +def test_fabric_upload_audited(client, db_session, no_tiles): + import io + + from tests.conftest_helpers import make_active_fabric_csv + + org, folder = _login_with_filing(client, db_session, "fabaudit@example.com") + csv_bytes = make_active_fabric_csv(FABRIC_ROWS) + + resp = client.post( + "/files/fabric/upload", + data={"fabric_file": (io.BytesIO(csv_bytes), "FCC_Active_BSL_06302025_ver7.csv")}, + content_type="multipart/form-data", + ) + assert resp.status_code == 200 + + rows = _rows("upload") + assert len(rows) == 1 + assert rows[0].resource_type == "folder" + assert rows[0].resource_id == folder.id + assert rows[0].details.get("kind") == "fabric" + assert rows[0].details.get("files") == ["FCC_Active_BSL_06302025_ver7.csv"] + assert rows[0].details.get("task_id") From 73558af389d186e744cdf5ceed9becbc1bf28edb Mon Sep 17 00:00:00 2001 From: Shaddi Hasan Date: Tue, 7 Jul 2026 11:36:35 -0400 Subject: [PATCH 4/4] Add health endpoint The SPA version of BDK exposed a raw /api request as a defacto health check for CI; removing the SPA code broke this. This adds back a dedicated health check API endpoint in the new version of BDK. --- .github/workflows/ci.yml | 2 +- back-end/routes/app_pages.py | 10 +++++++++- back-end/tests/test_app_pages.py | 8 ++++++++ docker-compose.smoke.yml | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e720e36..d8fb1e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: # suite runs in-process with a memory:// limiter, so it can't catch "the # image won't even start" — a dep missing from the lock, a Redis-storage # boot failure, a broken migration, or WSGI wiring. `--wait` fails the job - # if /api never becomes healthy. + # if /healthz never answers. - name: boot + health-check /api run: docker compose -f docker-compose.smoke.yml up --build --wait --wait-timeout 240 - name: backend logs (on failure) diff --git a/back-end/routes/app_pages.py b/back-end/routes/app_pages.py index d08c20a..5b74415 100644 --- a/back-end/routes/app_pages.py +++ b/back-end/routes/app_pages.py @@ -13,7 +13,7 @@ from datetime import date from functools import wraps -from flask import Blueprint, g, make_response, redirect, render_template, request +from flask import Blueprint, g, jsonify, make_response, redirect, render_template, request from flask_jwt_extended import get_jwt_identity, verify_jwt_in_request from controllers.database_controller import folder_ops, organization_ops, setting_ops, user_ops @@ -132,6 +132,14 @@ def wrapper(*args, **kwargs): return wrapper +@bp.route("/healthz") +def healthz(): + """Liveness probe for the CI boot smoke and deploy tooling. Deliberately + touches nothing (no auth, no DB): it answers "is the WSGI app up", so a + degraded dependency can't wedge the container health loop.""" + return jsonify({"status": "ok"}) + + @bp.route("/", strict_slashes=False) def root(): """The app's front door (live once nginx routes / here at cutover): diff --git a/back-end/tests/test_app_pages.py b/back-end/tests/test_app_pages.py index 6b714b2..949050b 100644 --- a/back-end/tests/test_app_pages.py +++ b/back-end/tests/test_app_pages.py @@ -131,3 +131,11 @@ def test_header_filing_label_has_year_and_countdown(client, db_session): assert "completed Aug 15, 2025" in html finally: s.close() + + +def test_healthz_is_public_and_cheap(client): + """The boot smoke (CI) and deploy tooling health-check this: it must + answer 200 without auth, a DB, or a session.""" + resp = client.get("/healthz") + assert resp.status_code == 200 + assert resp.get_json() == {"status": "ok"} diff --git a/docker-compose.smoke.yml b/docker-compose.smoke.yml index fca6ea7..890bc43 100644 --- a/docker-compose.smoke.yml +++ b/docker-compose.smoke.yml @@ -69,12 +69,12 @@ services: # Boot the prod WSGI server (entrypoint runs `alembic upgrade head` first). command: gunicorn routes:app -b 0.0.0.0:8000 -w 2 --threads 4 healthcheck: - # No curl in the image; use python. /api is the lightweight health route. + # No curl in the image; use python. /healthz is the liveness route. test: - "CMD" - "python" - "-c" - - "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/api',timeout=3).status==200 else 1)" + - "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/healthz',timeout=3).status==200 else 1)" interval: 4s timeout: 5s retries: 25