commit ac72da88f2feed1d5bb8f980e23f26c09ece33f4 Author: ravi Date: Mon Apr 27 12:48:37 2026 +0530 kml first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..635990f --- /dev/null +++ b/README.md @@ -0,0 +1,176 @@ +# KML Map Tool — User Guide + +Tauri 2 desktop app for reviewing, correcting and exporting fixed-asset / range-asset annotations produced by the dashcam labelling pipeline. Replaces the legacy FastAPI + Leaflet tools. + +--- + +## Quick start + +1. **Login** — pick or create a user when the app opens. The username is stamped on every audit-log entry. +2. **Import data** — top-left **Import…** button: + - **Fixed assets (JSON)** — point assets like streetlights, signs. + - **Range assets (JSON)** — linear assets with start / mid / end (e.g., crash barriers). + - **KML scope polygon** — defines which assets are "in scope". Points outside the polygon are hidden by default. + - **OSM roads (GeoJSON)** — imported road network for snapping / direction lookups. + - **Metadata polyline (KML)** — vehicle GPS track from the source video; takes priority over OSM for direction inference. +3. The map auto-centers on the first imported asset. Pan / zoom triggers viewport-bounded fetches (debounced) to keep the deck.gl rendering snappy. + +--- + +## Map basics + +- **Basemaps** — Basemap selector at the top. Default: **Google Satellite (deep zoom)** which uses Google Earth tiles and goes deeper than the regular Google Satellite layer (helpful at z≥22 to see streetlights / road surface). +- **Compare mode** — secondary basemap layered side-by-side via the Compare toggle. +- **Layer toggles** — Fixed / Range / OSM / Scope / Metadata visibility. +- **Filters panel** (left side) — narrow the visible set by Asset type, Side, Video, Asset name. Counts update live with the current viewport. +- **Show out-of-scope / Show deleted** — toggles to expose hidden assets for inspection or restore. + +--- + +## Selecting and editing one asset + +- **Click an asset** to select. The right-side **Selected** panel shows type, name, row_id, video, side. By default an image popup opens (toggle in Settings). +- **Drag the pin** on the map to move the asset. Range assets show **S / M / E** (start / mid / end) draggable pins. +- **`[` / `]`** keyboard shortcuts step through the visible filtered list. +- **Reset to original** — restores the lat/lng captured at first import. Useful if a snap or drag went wrong. +- **Snap to nearest road** — shifts the asset to the OSM road centerline or its lane-offset side. Direction priority: **metadata polyline → OSM `oneway` → position-based fallback**. Idempotent above 0.5 m drift. +- **Side: Left / Right** — toggle without moving the geometry. +- **Rename class…** — change `asset_name` (e.g. fix a mis-classified label). Pulls suggestions from `classes.txt`. +- **Delete** — soft-delete (recoverable via Restore or Undo). +- **Mark as anchor** — flag for the bulk **Distribute correction** flow (see below). + +--- + +## Lasso selection (for bulk operations) + +- **Start lasso** then pick a shape: **circle**, **rect**, or **polygon**. +- Polygon mode: click to add vertices, click near the first vertex (gold ring) or double-click to close. Pan / zoom while drawing — vertices stay anchored to the map. +- **ESC** cancels at any time and clears the lingering polygon panel. +- Once selected, you get bulk actions: **In-scope / Out-of-scope / Auto / Delete / Restore / Rename / Set Left / Set Right / Reset to original / Clear links**. +- Polygon-only extras: **Auto-link L↔R**, **Auto-link by video**, **Auto-link nearest** (see Pair linking). + +--- + +## Cross-side / cross-video pair linking + +Common situation: one physical asset (e.g., a median streetlight) is captured in two videos (LHS and RHS) and shows up as two near-duplicate points. Pair linking marks them as the same physical thing without deleting either. + +- **Auto-link** — draw a polygon lasso over the area, then pick the matching strategy in the polygon panel: + - **L↔R**: requires assets to have a `side` label; pairs Left with Right. + - **By video**: pairs across the two largest video buckets (use when both videos see the same poles from opposite sides). + - **Nearest**: pairs by proximity regardless of side or video. Use when `video_name` is `Not available` / NA. +- **Pair max** slider (2–60 m, default 30 m) — the maximum allowed pair distance. Independent from the duplicate epsilon. +- Manual links override auto-links: + - **Right-click an asset → right-click another** — locks them as a pair (pink line). The "anchor" asset gets a status-bar prompt. + - **Right-click two already-linked assets** — unlinks them. +- **Click a link line** to select it; press **Delete** to clear that link. +- Link colors: **pink = locked manual link** (survives Auto-link re-runs); **blue = auto link** (replaceable on the next re-run). +- Unlink an asset directly via **Unlink** button on the selected panel. +- After fixing a few wrong pairs manually, click **Auto-link** again — locked links stay; orphaned partners get re-matched among the remaining unlocked candidates. + +--- + +## Duplicates + +- **Find duplicates** — scans the *currently visible viewport* for clusters of points within the chosen ε (metres). Zoom out to widen the search; zoom out fully to scan everywhere. +- **Cross-video only** — restrict matches to pairs from different videos. +- For each cluster you can **Delete losers** (keep one, delete the rest) or **Move losers out-of-scope**. + +--- + +## Distribute correction (GPS bias fix) + +When the GPS is uniformly off for a whole video / stretch, you don't want to drag every streetlight by hand. + +1. **Filter** the map to the affected slice (e.g., `video=X`, `name=Streetlight`). +2. Click an asset → **Mark as anchor** (gold ring appears). +3. **Drag** the gold-ringed asset to where it should be. Repeat for as many anchors as you like. +4. Click **Distribute correction** in the yellow panel that appears at the top of the actions sidebar. + - **1 anchor** → all visible assets shift by the same Δlat/Δlng (uniform). + - **2+ anchors** → row_id-sorted piecewise linear interpolation between consecutive anchors. Assets *outside* the first–last anchor span are not touched. +5. **Undo** in Recent actions reverts the entire distribution in one step. + +Range assets (start / mid / end) translate as a rigid body — all three vertices shift by the same Δ. + +--- + +## OSM road editing + +- **OSM tools…** modal — generate roads for the visible bbox (Overpass), import existing GeoJSON, export current roads, prune small road classes. +- **OSM edit mode** — drag any road's vertex to refine the centerline. Markers are gated by zoom ≥ 14 and capped at 80 vertices / 40 ghost dots per viewport so the map stays responsive. +- **Flip road direction** — cycle a road's `oneway` between 0 / 1 / -1 when it's wrong. +- **Lane offset (m)** — controls the parallel offset used by snap-to-road. Range 0.1–30 m. + +--- + +## Snap-to-road + +- **Per-asset** — Snap to nearest road on the selected panel. +- **Bulk visible** — snap every visible fixed asset to the nearest road (50 m max). +- **Snap by video** — snap every asset (fixed + range) for a given video. +- Range assets snap all three vertices independently (not just mid). +- Direction priority: **metadata polyline > OSM `oneway` > position-based**. + +--- + +## Centerline override + +Some asset classes (expansion joint, vms gantry) belong on the road centerline, not the LHS/RHS offset. Settings → **Snap to centerline (instead of offset lane)** lets you tick those class names. + +--- + +## Settings ⚙ modal + +- **Image popup** + - On / off (when off, marker pins still appear but no image opens on click). + - Width: S / M / L / XL. + - Aspect ratio: 16:9 / 4:3 / 3:2 / 1:1. +- **Snap to centerline names** — list of asset_names that should snap to centerline. +- **Image folder (offline)** — a local folder used to resolve `image_path` URLs to disk (HTTPS URLs always pass through unchanged). + +--- + +## Export + +The **Export data…** button writes every non-deleted asset in one of four formats: + +- **`.json` Source JSON** — round-trippable. Same shape `import_fixed_assets` and `import_range_assets` accept (separate `fixed` and `range` arrays). Includes `image_path*`, `side`, `deleted`, etc. +- **`.geojson`** — FeatureCollection. Points for fixed assets, LineStrings for ranges. Properties include `image_path*`, `link_pair_id`, `link_locked`, `in_scope`, `modified`. +- **`.kml`** — Placemarks for GIS tools. Includes name, description, geometry. +- **`.csv`** — full row dump for spreadsheets / external pipelines. + +OSM roads can be exported separately via **OSM tools… → Export current roads** (writes GeoJSON with `name`, `highway`, `oneway` preserved). + +--- + +## Keyboard shortcuts + +| Key | Action | +|---|---| +| `[` / `]` | Step prev / next asset in the filtered list | +| `ESC` | Cancel: lasso / link-pick / draw-road / road-edit / image popup | +| `Delete` / `Backspace` | Unlink the currently-selected link line | + +--- + +## Undo / Redo + +Every state-changing action writes an audit row. The **Recent actions** panel shows the last N. Click **Undo** on any row to revert; **Redo** on a previously undone row replays it. Multi-asset operations (bulk delete, distribute, auto-link) revert as a single atomic step. Road edits (OSM vertex drag, create / delete / flip) are not audited. + +--- + +## Performance notes + +- Viewport-bounded fetch: `assets` only contains rows inside the current map bbox, debounced ~400 ms after pan / zoom. +- Bulk operations use 500-id chunks to stay safely under SQLite's 999-bind-param ceiling. +- Auto-link / Distribute over very large viewports may take several seconds at 50k+ rows; prefer narrowing with filters or zoom first. +- Image prefetching warms the previous / next two thumbnails so `[` / `]` navigation feels instant. + +--- + +## Troubleshooting + +- **No assets visible after import** — check Filters panel (especially Videos), Show out-of-scope toggle, and whether a stale KML scope from a previous import is filtering everything out. +- **Streetlights not visible on satellite** — switch to **Google Satellite (deep zoom)** basemap and zoom to z≥22. +- **Snap moves assets to the wrong side** — load the metadata polyline (gives true vehicle heading), or fix the OSM road's `oneway` direction. +- **Re-importing wipes my edits** — re-import preserves rows where `modified=1` (manual moves) and rows the user deleted; only `modified=0` geometry is re-stamped from source. If you need a fresh start, use **Reset DB** in the Data section first. diff --git a/index.html b/index.html new file mode 100644 index 0000000..ff93803 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Tauri + React + Typescript + + + +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..d2271af --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6396 @@ +{ + "name": "kml_map_tool", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "kml_map_tool", + "version": "0.1.0", + "dependencies": { + "@deck.gl/core": "^9.3.1", + "@deck.gl/extensions": "^9.3.1", + "@deck.gl/layers": "^9.3.1", + "@deck.gl/mapbox": "^9.3.1", + "@tauri-apps/api": "^2", + "@tauri-apps/plugin-dialog": "^2.7.0", + "@tauri-apps/plugin-opener": "^2", + "deck.gl": "^9.3.1", + "maplibre-gl": "^5.24.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@tauri-apps/cli": "^2", + "@types/react": "^19.1.8", + "@types/react-dom": "^19.1.6", + "@vitejs/plugin-react": "^4.6.0", + "typescript": "~5.8.3", + "vite": "^7.0.4" + } + }, + "node_modules/@amcharts/amcharts5": { + "version": "5.14.4", + "resolved": "https://registry.npmjs.org/@amcharts/amcharts5/-/amcharts5-5.14.4.tgz", + "integrity": "sha512-Tl7wQLWvsvyWVtlCIm1yhZtJviSDYjuNTnlUkO0D49GyByoK0nb9fr0DK4rUw4DVgyLcySxWBsb2lzTJm5Rd9Q==", + "license": "SEE LICENSE IN LICENSE", + "peer": true, + "dependencies": { + "@types/d3": "^7.0.0", + "@types/d3-chord": "^3.0.0", + "@types/d3-hierarchy": "3.1.1", + "@types/d3-sankey": "^0.11.1", + "@types/d3-shape": "^3.0.0", + "@types/geojson": "^7946.0.8", + "@types/polylabel": "^1.0.5", + "@types/svg-arc-to-cubic-bezier": "^3.2.0", + "d3": "^7.0.0", + "d3-chord": "^3.0.0", + "d3-force": "^3.0.0", + "d3-geo": "^3.0.0", + "d3-hierarchy": "^3.0.0", + "d3-sankey": "^0.12.3", + "d3-selection": "^3.0.0", + "d3-shape": "^3.0.0", + "d3-transition": "^3.0.0", + "d3-voronoi-treemap": "^1.1.2", + "flatpickr": "^4.6.13", + "markerjs2": "^2.29.4", + "pdfmake": "^0.2.2", + "polylabel": "^1.1.0", + "seedrandom": "^3.0.5", + "svg-arc-to-cubic-bezier": "^3.2.0", + "tslib": "^2.2.0" + } + }, + "node_modules/@arcgis/core": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@arcgis/core/-/core-4.34.8.tgz", + "integrity": "sha512-UrEBTjXpSA9fhmmnAENBzz9GG81xALTezQFMXUs2iMB+tiOckmJyBbhATI/W4lIQyUfNEK7Zm/46EP2PhDga/A==", + "license": "SEE LICENSE IN copyright.txt", + "peer": true, + "dependencies": { + "@amcharts/amcharts5": "~5.14.1", + "@arcgis/toolkit": "^4.34.0", + "@esri/arcgis-html-sanitizer": "~4.1.0", + "@esri/calcite-components": "^3.3.2", + "@vaadin/grid": "~24.9.1", + "@zip.js/zip.js": "~2.8.7", + "luxon": "~3.7.2", + "marked": "~16.3.0", + "tslib": "^2.8.1" + } + }, + "node_modules/@arcgis/lumina": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@arcgis/lumina/-/lumina-4.34.9.tgz", + "integrity": "sha512-efqO+SwR+1IYf29AATh1l2FUeypRyRINTBNkaJY+KkaFe+8gqSJ45qOmputhyzF5WTRDb7WhOYgnChjp6VYPpA==", + "license": "SEE LICENSE IN LICENSE.md", + "peer": true, + "dependencies": { + "@arcgis/toolkit": "~4.34.9", + "csstype": "^3.1.3", + "tslib": "^2.8.1" + }, + "peerDependencies": { + "@lit/context": "^1.1.5", + "lit": "^3.3.0" + }, + "peerDependenciesMeta": { + "@lit/context": { + "optional": true + } + } + }, + "node_modules/@arcgis/toolkit": { + "version": "4.34.9", + "resolved": "https://registry.npmjs.org/@arcgis/toolkit/-/toolkit-4.34.9.tgz", + "integrity": "sha512-wFST+eVnCwmg9NyICVyn9bsBnR+TlWklsGqG3L7xqSTgfXo6TuCThE7wtTb8xWxsTBkGvImqMUgpgLuwQuTQ1g==", + "license": "SEE LICENSE IN LICENSE.md", + "peer": true, + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@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/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@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.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "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.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@carto/api-client": { + "version": "0.5.26", + "resolved": "https://registry.npmjs.org/@carto/api-client/-/api-client-0.5.26.tgz", + "integrity": "sha512-dMIfVubI+4VrylazzrJQOEza+YvWEoK7fAiyqLLB3Je7yljFvklSxGA3c5LaYD3XiHhZ7PrdM3SQH84SUNrW2A==", + "license": "MIT", + "dependencies": { + "@loaders.gl/schema": "^4.3.3", + "@types/geojson": "^7946.0.16", + "d3-format": "^3.1.0", + "d3-scale": "^4.0.2", + "h3-js": "^4.1.0", + "jsep": "^1.4.0", + "quadbin": "^0.4.1-alpha.0" + } + }, + "node_modules/@deck.gl/aggregation-layers": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/aggregation-layers/-/aggregation-layers-9.3.1.tgz", + "integrity": "sha512-Aikrnrft79kbWjMNENxKF+Gg4JO0y4wkF8fokrr/tXRKaNIy/WV9yPXu3sNKzwZliucV/uJJtAE7DxCtyJl6uw==", + "license": "MIT", + "dependencies": { + "@luma.gl/shadertools": "^9.3.2", + "@math.gl/core": "^4.1.0", + "@math.gl/web-mercator": "^4.1.0", + "d3-hexbin": "^0.2.1" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@deck.gl/layers": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2" + } + }, + "node_modules/@deck.gl/arcgis": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/arcgis/-/arcgis-9.3.1.tgz", + "integrity": "sha512-CIBIS0LDbWfYCoTx14WuOEMcyzdtA2J1QIIqOEh0NlZRB1xYIVdfFU/UvIVjC0JCraGrYi+IAi13g/xudUwL/g==", + "license": "MIT", + "dependencies": { + "esri-loader": "^3.7.0" + }, + "peerDependencies": { + "@arcgis/core": "^4.0.0", + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2", + "@luma.gl/webgl": "~9.3.2" + } + }, + "node_modules/@deck.gl/carto": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/carto/-/carto-9.3.1.tgz", + "integrity": "sha512-NC4qawzpRAP5yKOKwrmeATNDYFFf3i4CGbEjDxgdsXCIi1dR6XfZNYng3DC8xah9NNbdcaJhZvzCeLZ5VfPb1A==", + "license": "MIT", + "dependencies": { + "@carto/api-client": "^0.5.19", + "@loaders.gl/compression": "^4.4.1", + "@loaders.gl/gis": "^4.4.1", + "@loaders.gl/loader-utils": "^4.4.1", + "@loaders.gl/mvt": "^4.4.1", + "@loaders.gl/schema": "^4.4.1", + "@loaders.gl/tiles": "^4.4.1", + "@luma.gl/core": "^9.3.2", + "@luma.gl/shadertools": "^9.3.2", + "@math.gl/web-mercator": "^4.1.0", + "@types/d3-array": "^3.0.2", + "@types/d3-color": "^3.1.3", + "@types/d3-scale": "^3.0.0", + "cartocolor": "^5.0.2", + "d3-array": "^3.2.0", + "d3-color": "^3.1.0", + "d3-format": "^3.1.0", + "d3-scale": "^4.0.0", + "earcut": "^2.2.4", + "h3-js": "^4.4.0", + "moment-timezone": "^0.6.0", + "pbf": "^3.2.1", + "quadbin": "^0.4.0" + }, + "peerDependencies": { + "@deck.gl/aggregation-layers": "~9.3.0", + "@deck.gl/core": "~9.3.0", + "@deck.gl/extensions": "~9.3.0", + "@deck.gl/geo-layers": "~9.3.0", + "@deck.gl/layers": "~9.3.0", + "@loaders.gl/core": "^4.4.1", + "@luma.gl/core": "~9.3.2" + } + }, + "node_modules/@deck.gl/core": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/core/-/core-9.3.1.tgz", + "integrity": "sha512-uixmBJhaAAgjzppcJ+0Hh2R1BYvFHvCHFReXN93iQxQoNB3VCC03pGEhZ0hrW7hcVLC8ExCUrg8VRJW60wXzcA==", + "license": "MIT", + "dependencies": { + "@loaders.gl/core": "^4.4.1", + "@loaders.gl/images": "^4.4.1", + "@luma.gl/core": "^9.3.2", + "@luma.gl/engine": "^9.3.2", + "@luma.gl/shadertools": "^9.3.2", + "@luma.gl/webgl": "^9.3.2", + "@math.gl/core": "^4.1.0", + "@math.gl/sun": "^4.1.0", + "@math.gl/types": "^4.1.0", + "@math.gl/web-mercator": "^4.1.0", + "@probe.gl/env": "^4.1.1", + "@probe.gl/log": "^4.1.1", + "@probe.gl/stats": "^4.1.1", + "@types/offscreencanvas": "^2019.6.4", + "gl-matrix": "^3.0.0", + "mjolnir.js": "^3.0.0" + } + }, + "node_modules/@deck.gl/extensions": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/extensions/-/extensions-9.3.1.tgz", + "integrity": "sha512-XTJgC8pnS9zuiFRhlPTQnE0WKMuJCnZ4xdXmd9TMJRH58Z0DKaKHpc3j32heFKLoRHo3G/TKlCoP/my5tgYT+Q==", + "license": "MIT", + "dependencies": { + "@luma.gl/shadertools": "^9.3.2", + "@luma.gl/webgl": "^9.3.2", + "@math.gl/core": "^4.1.0" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2" + } + }, + "node_modules/@deck.gl/geo-layers": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/geo-layers/-/geo-layers-9.3.1.tgz", + "integrity": "sha512-MyQs/mb/+Kp3Y+HARClQxnvCYH0MjkXR+QAyalMdM/bJoVox8sw7k2WkHyzubEH5uKFWX6F509XueC86SrVrZw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/3d-tiles": "^4.4.1", + "@loaders.gl/gis": "^4.4.1", + "@loaders.gl/loader-utils": "^4.4.1", + "@loaders.gl/mvt": "^4.4.1", + "@loaders.gl/schema": "^4.4.1", + "@loaders.gl/terrain": "^4.4.1", + "@loaders.gl/tiles": "^4.4.1", + "@loaders.gl/wms": "^4.4.1", + "@luma.gl/gltf": "^9.3.2", + "@luma.gl/shadertools": "^9.3.2", + "@math.gl/core": "^4.1.0", + "@math.gl/culling": "^4.1.0", + "@math.gl/web-mercator": "^4.1.0", + "@types/geojson": "^7946.0.8", + "a5-js": "^0.7.2", + "h3-js": "^4.4.0", + "long": "^3.2.0" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@deck.gl/extensions": "~9.3.0", + "@deck.gl/layers": "~9.3.0", + "@deck.gl/mesh-layers": "~9.3.0", + "@loaders.gl/core": "^4.4.1", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2" + } + }, + "node_modules/@deck.gl/google-maps": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/google-maps/-/google-maps-9.3.1.tgz", + "integrity": "sha512-TJNrjia2wM8u13gBNGVqLUK4BozQuEL5tvv9R0M9gjnslpFjTkjjEcs9Nje9ZAeZoOrk3BClkcCv8McCsq/glg==", + "license": "MIT", + "dependencies": { + "@luma.gl/webgl": "^9.3.2", + "@math.gl/core": "^4.1.0", + "@types/google.maps": "^3.48.6" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@luma.gl/webgl": "~9.3.2" + } + }, + "node_modules/@deck.gl/json": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/json/-/json-9.3.1.tgz", + "integrity": "sha512-no8u0/7sxNtNKYhNSEBo0U5MgnT1Gf8J5507/cH/pfnWvGFBc7j85/6IyX6fDjt7aYAvX3RXStRP4fY4bP89WA==", + "license": "MIT", + "dependencies": { + "jsep": "^0.3.0" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0" + } + }, + "node_modules/@deck.gl/json/node_modules/jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@deck.gl/layers": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/layers/-/layers-9.3.1.tgz", + "integrity": "sha512-gUT/UMrmSCYsJCyv78qjHdeZVnqDexX61WxNP3dUa7ZplXiG3NxZvjhS0PYeBLritOtCJSv3b13vR2ka+j49ZQ==", + "license": "MIT", + "dependencies": { + "@loaders.gl/images": "^4.4.1", + "@loaders.gl/schema": "^4.4.1", + "@luma.gl/shadertools": "^9.3.2", + "@mapbox/tiny-sdf": "^2.0.5", + "@math.gl/core": "^4.1.0", + "@math.gl/polygon": "^4.1.0", + "@math.gl/web-mercator": "^4.1.0", + "earcut": "^2.2.4" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@loaders.gl/core": "^4.4.1", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2" + } + }, + "node_modules/@deck.gl/mapbox": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/mapbox/-/mapbox-9.3.1.tgz", + "integrity": "sha512-4SgpWMeZiqiZEiz9yPdr89cVRL8HFcvXLxXUA0ExhMreUdNuK/j2OIQHPhw6vp1xCFbJEEqRelQ0pJYkhGDkYw==", + "license": "MIT", + "dependencies": { + "@math.gl/web-mercator": "^4.1.0" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@math.gl/web-mercator": "^4.1.0" + } + }, + "node_modules/@deck.gl/mesh-layers": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/mesh-layers/-/mesh-layers-9.3.1.tgz", + "integrity": "sha512-SvLviM1bYcdFZiX2OZ4Hf0zC44brm1gLbP3j92w/Vt+Mp5O0UHGuzKNPA4kdyL1wAuRfKXXfoJZzVg1/YNbT4g==", + "license": "MIT", + "dependencies": { + "@loaders.gl/gltf": "^4.4.1", + "@loaders.gl/schema": "^4.4.1", + "@luma.gl/gltf": "^9.3.2", + "@luma.gl/shadertools": "^9.3.2" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2", + "@luma.gl/engine": "~9.3.2", + "@luma.gl/gltf": "~9.3.2", + "@luma.gl/shadertools": "~9.3.2" + } + }, + "node_modules/@deck.gl/react": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/react/-/react-9.3.1.tgz", + "integrity": "sha512-stvcX6VVrHlv8TXsCCk1NwE0CFHqXgp9veSj8u98lwafb1l2Y+WptCeZhyB1MPJyDMXkWKss0MiYuFGIqKEXmw==", + "license": "MIT", + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@deck.gl/widgets": "~9.3.0", + "react": ">=16.3.0", + "react-dom": ">=16.3.0" + } + }, + "node_modules/@deck.gl/widgets": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@deck.gl/widgets/-/widgets-9.3.1.tgz", + "integrity": "sha512-/l9XH1FXNEvOPPCJgMzvC+RWLb6tRuxccrIa4aTGvE5iegeP5pRFi7I+ogZumNx0/RiSr4AUygUh6IquaDQIFw==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.7.5", + "preact": "^10.17.0" + }, + "peerDependencies": { + "@deck.gl/core": "~9.3.0", + "@luma.gl/core": "~9.3.2" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esri/arcgis-html-sanitizer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-html-sanitizer/-/arcgis-html-sanitizer-4.1.0.tgz", + "integrity": "sha512-einEveDJ/k1180NOp78PB/4Hje9eBy3dyOGLLtLn6bSkizpUfCwuYBIXOA7Y3F/k/BsTQXgKqUVwQ0eiscWMdA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "xss": "1.0.13" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@esri/calcite-components": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@esri/calcite-components/-/calcite-components-3.3.3.tgz", + "integrity": "sha512-tw+EfJ3pb+Odj71W6E9GUkm8rMbNxfW1KeiI8GgsKDzhr39hMKwY+zYYFFYuO0FONxWGvAB+B8yqB0NvH7WeHw==", + "license": "SEE LICENSE.md", + "peer": true, + "dependencies": { + "@arcgis/lumina": ">=4.34.0-next.158 <4.35.0", + "@arcgis/toolkit": ">=4.34.0-next.158 <4.35.0", + "@esri/calcite-ui-icons": "4.3.0", + "@floating-ui/dom": "^1.6.12", + "@floating-ui/utils": "^0.2.8", + "@types/sortablejs": "^1.15.8", + "color": "^5.0.0", + "composed-offset-position": "^0.0.6", + "es-toolkit": "^1.39.8", + "focus-trap": "^7.6.5", + "interactjs": "^1.10.27", + "lit": "^3.3.0", + "sortablejs": "^1.15.6", + "timezone-groups": "^0.10.4", + "type-fest": "^4.30.1" + } + }, + "node_modules/@esri/calcite-ui-icons": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@esri/calcite-ui-icons/-/calcite-ui-icons-4.3.0.tgz", + "integrity": "sha512-iOOuRurpjFxFVw6+aXW2JpSkRBrdOpBcbdibfPOmSPqMd1aoHBtYmYXetKoH9vfrXoBiPyO2PkDnczhsu/N9IA==", + "license": "SEE LICENSE.md", + "peer": true, + "bin": { + "spriter": "bin/spriter.js" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz", + "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.11" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz", + "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.5", + "@floating-ui/utils": "^0.2.11" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz", + "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==", + "license": "MIT" + }, + "node_modules/@foliojs-fork/fontkit": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/fontkit/-/fontkit-1.9.2.tgz", + "integrity": "sha512-IfB5EiIb+GZk+77TRB86AHroVaqfq8JRFlUbz0WEwsInyCG0epX2tCPOy+UfaWPju30DeVoUAXfzWXmhn753KA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@foliojs-fork/restructure": "^2.0.2", + "brotli": "^1.2.0", + "clone": "^1.0.4", + "deep-equal": "^1.0.0", + "dfa": "^1.2.0", + "tiny-inflate": "^1.0.2", + "unicode-properties": "^1.2.2", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/@foliojs-fork/linebreak": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/linebreak/-/linebreak-1.1.2.tgz", + "integrity": "sha512-ZPohpxxbuKNE0l/5iBJnOAfUaMACwvUIKCvqtWGKIMv1lPYoNjYXRfhi9FeeV9McBkBLxsMFWTVVhHJA8cyzvg==", + "license": "MIT", + "peer": true, + "dependencies": { + "base64-js": "1.3.1", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/@foliojs-fork/linebreak/node_modules/base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "license": "MIT", + "peer": true + }, + "node_modules/@foliojs-fork/pdfkit": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/@foliojs-fork/pdfkit/-/pdfkit-0.15.3.tgz", + "integrity": "sha512-Obc0Wmy3bm7BINFVvPhcl2rnSSK61DQrlHU8aXnAqDk9LCjWdUOPwhgD8Ywz5VtuFjRxmVOM/kQ/XLIBjDvltw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@foliojs-fork/fontkit": "^1.9.2", + "@foliojs-fork/linebreak": "^1.1.1", + "crypto-js": "^4.2.0", + "jpeg-exif": "^1.1.4", + "png-js": "^1.0.0" + } + }, + "node_modules/@foliojs-fork/restructure": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/restructure/-/restructure-2.0.2.tgz", + "integrity": "sha512-59SgoZ3EXbkfSX7b63tsou/SDGzwUEK6MuB5sKqgVK1/XE0fxmpsOb9DQI8LXW3KfGnAjImCGhhEb7uPPAUVNA==", + "license": "MIT", + "peer": true + }, + "node_modules/@interactjs/types": { + "version": "1.10.27", + "resolved": "https://registry.npmjs.org/@interactjs/types/-/types-1.10.27.tgz", + "integrity": "sha512-BUdv0cvs4H5ODuwft2Xp4eL8Vmi3LcihK42z0Ft/FbVJZoRioBsxH+LlsBdK4tAie7PqlKGy+1oyOncu1nQ6eA==", + "license": "MIT", + "peer": true + }, + "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==", + "dev": true, + "license": "MIT", + "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, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT", + "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==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.5.1.tgz", + "integrity": "sha512-Aou5UdlSpr5whQe8AA/bZG0jMj96CoJIWbGfZ91qieWu5AWUMKw8VR/pAkQkJYvBNhmCcWnZlyyk5oze8JIqYA==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@lit/reactive-element": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.1.2.tgz", + "integrity": "sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.5.0" + } + }, + "node_modules/@loaders.gl/3d-tiles": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/3d-tiles/-/3d-tiles-4.4.1.tgz", + "integrity": "sha512-837MynN5/lqVbuZcqdxFb0CMfT8v0yRlX7TUFKIBdmkS7AeRRrgcrB+XKblrkdZINUcxOs2N/YLVkwC9wLH1Uw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/compression": "4.4.1", + "@loaders.gl/crypto": "4.4.1", + "@loaders.gl/draco": "4.4.1", + "@loaders.gl/gltf": "4.4.1", + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/math": "4.4.1", + "@loaders.gl/tiles": "4.4.1", + "@loaders.gl/zip": "4.4.1", + "@math.gl/core": "^4.1.0", + "@math.gl/culling": "^4.1.0", + "@math.gl/geospatial": "^4.1.0", + "@probe.gl/log": "^4.1.1", + "long": "^5.2.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/3d-tiles/node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/@loaders.gl/compression": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/compression/-/compression-4.4.1.tgz", + "integrity": "sha512-MKtGbqHBH7xRVFKyB3E9xRqRMwNW8H72OKpUBDdFwP+hQ0mjHZuud0GeYm5pP50+7o3J2PrES06kHTwT4fg7oQ==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "@types/pako": "^1.0.1", + "fflate": "0.7.4", + "pako": "1.0.11", + "snappyjs": "^0.6.1" + }, + "optionalDependencies": { + "@types/brotli": "^1.3.0", + "brotli": "^1.3.2", + "lz4js": "^0.2.0", + "zstd-codec": "^0.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/core": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/core/-/core-4.4.1.tgz", + "integrity": "sha512-/s4IuvCCQUepvhjLnmePwQppGko2d1pxRS+sp7lyExU0uiqo5dVsAKaCZ2VnddBkFWgDVb/wvcZUBmv/dWcj0Q==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/schema-utils": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "@probe.gl/log": "^4.1.1" + } + }, + "node_modules/@loaders.gl/crypto": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/crypto/-/crypto-4.4.1.tgz", + "integrity": "sha512-ORhS9GSYr9uVTU4I2Taa46XBgPPG+nKErKcyDGIXov3gs0EtgMqs8nU4epuLbsJN3+du6FkQaILyGSZlTxbA7Q==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "@types/crypto-js": "^4.0.2" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/draco": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/draco/-/draco-4.4.1.tgz", + "integrity": "sha512-EcapVlkP8Pz53VKg9pYRQUzqm9jH+A+7vGE1kV8nkv63lN8/qtFzBSWMiC6IX1CwxjKJDEINU9Sh8YB1AfMwbQ==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/schema-utils": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "draco3d": "1.5.7" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/geoarrow": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/geoarrow/-/geoarrow-4.4.1.tgz", + "integrity": "sha512-d9+AxsNpdJzilgHTFnyycoIocp4b+iEX3bbCCAEdUm/7eZbOdM7sFcgLLiGVTehtGnOUOICskjrzT27gqmzDqg==", + "license": "MIT", + "dependencies": { + "@math.gl/polygon": "^4.1.0", + "apache-arrow": ">= 17.0.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/gis": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/gis/-/gis-4.4.1.tgz", + "integrity": "sha512-M9Z9jXwye4SjlD1hAFJwE3+eZiN1lprwlSkWIo7R642kN5r3R60M9fqBD1mvCTBj96FPmbsyOm1eYKS0XCpKxQ==", + "license": "MIT", + "dependencies": { + "@loaders.gl/geoarrow": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/schema-utils": "4.4.1", + "@mapbox/vector-tile": "^1.3.1", + "@math.gl/polygon": "^4.1.0", + "pbf": "^3.2.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/gltf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/gltf/-/gltf-4.4.1.tgz", + "integrity": "sha512-9ESHEm3YoMgsQh8QS1N99uwA+cij6p6xhCmZnHX4rQnqHm0jvE5RAHlGV1D/Xjvr4PR8IiXaBn/QDl/qdGIxkw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/draco": "4.4.1", + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/textures": "4.4.1", + "@math.gl/core": "^4.1.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/images": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/images/-/images-4.4.1.tgz", + "integrity": "sha512-v9A4BliEKGxhLuEbh0Ke8ElUlp04KxpKIknUtXXWoEaszAMTSrHI3YhaL/JdRlHraC1VUF/sjzbSBFkKh7nxJg==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/loader-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/loader-utils/-/loader-utils-4.4.1.tgz", + "integrity": "sha512-waosL7VtVRfXsNOXtAM3rOjZyNQD0lQBlhuB5/oY+E+lNzYNFlzgiGXiDOwBpcs7dK7kW2Vv8+KcxyIGIyXOtg==", + "license": "MIT", + "dependencies": { + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "@probe.gl/log": "^4.1.1", + "@probe.gl/stats": "^4.1.1" + } + }, + "node_modules/@loaders.gl/math": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/math/-/math-4.4.1.tgz", + "integrity": "sha512-xenAPOAUd7HDlus5V/g4LKVh1l7FpyVRSYXa+g7tBj91xzhRYgLEXSxdrGfRNAFMDOSGC1ITwCGQwlwSX4Mpxw==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "^4.1.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/mvt": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/mvt/-/mvt-4.4.1.tgz", + "integrity": "sha512-ou1Oyec7hcpCQ2onF1FefNXVv1MwPjwUkII6IFrrRZ/f0/ei0b8yc5IVwO4gkhta/Ve/Y+mFcs/GaeQZMOEBOg==", + "license": "MIT", + "dependencies": { + "@loaders.gl/gis": "4.4.1", + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@math.gl/polygon": "^4.1.0", + "@probe.gl/stats": "^4.1.1", + "pbf": "^3.2.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/schema": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/schema/-/schema-4.4.1.tgz", + "integrity": "sha512-s7NjEnyK6jZvJJSWj/mHq+S9mHRHVzIYtFP+C7sMf1gVCQbdkt6OSAMUWRzwPr9+whQNVWjZ9pbLsI/IPW3zvw==", + "license": "MIT", + "dependencies": { + "@types/geojson": "^7946.0.7", + "apache-arrow": ">= 17.0.0" + } + }, + "node_modules/@loaders.gl/schema-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/schema-utils/-/schema-utils-4.4.1.tgz", + "integrity": "sha512-4upip2O6MFaWzk68/lnna7P2uRj9NQ8MIk/ff3CLbciP5/9lKl1qyuzObz5JrJRYzfGB6I81vpOn6FSVQ6m6KQ==", + "license": "MIT", + "dependencies": { + "@loaders.gl/schema": "4.4.1", + "@types/geojson": "^7946.0.7", + "apache-arrow": ">= 17.0.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/terrain": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/terrain/-/terrain-4.4.1.tgz", + "integrity": "sha512-cBLT+G0HefySTppxqqkMKcN5kfOfIRRx0WDPHa0VHFJw9rbnxoEDhrXvfsXfOATNFFNtcpgQUDqDqhEBp0XvZw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@mapbox/martini": "^0.2.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/textures": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/textures/-/textures-4.4.1.tgz", + "integrity": "sha512-r1//6sO29GOHso+IvXQ3GrvXZ4cl03VWc34XcnXPn3sAV7O96uRGd5xkyx60lMYAl7Jv7qK/smT3z4Mdxdd4aA==", + "license": "MIT", + "dependencies": { + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/worker-utils": "4.4.1", + "@math.gl/types": "^4.1.0", + "ktx-parse": "^0.7.0", + "texture-compressor": "^1.0.2" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/tiles": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/tiles/-/tiles-4.4.1.tgz", + "integrity": "sha512-EbF81/c1oXJocVAKR0rx+vWSOnmBBWWhM7pZpYk6oNUQAJfA99APhiRNstAJiJomAgqAxr7vfnhXHjPZg6osZw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/math": "4.4.1", + "@math.gl/core": "^4.1.0", + "@math.gl/culling": "^4.1.0", + "@math.gl/geospatial": "^4.1.0", + "@math.gl/web-mercator": "^4.1.0", + "@probe.gl/stats": "^4.1.1" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/wms": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/wms/-/wms-4.4.1.tgz", + "integrity": "sha512-sIaqyHXPuLQnkN2eebvczZYVvapkjA8EZaI8feaPxj4jZk/Hk5EuZzIbxJ4eftLotZwDHd3XzEVIs6YlFOSJ+Q==", + "license": "MIT", + "dependencies": { + "@loaders.gl/images": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "@loaders.gl/xml": "4.4.1", + "@turf/rewind": "^5.1.5", + "deep-strict-equal": "^0.2.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/worker-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/worker-utils/-/worker-utils-4.4.1.tgz", + "integrity": "sha512-ovMyIyj9dlChuHuD64Bel7Mir2UYlmLqlZ9MMzVxzTTLvaudJoNAXi6Disp0ooxwF62ZqjNXXutaSbS6UDeuIg==", + "license": "MIT", + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/xml": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/xml/-/xml-4.4.1.tgz", + "integrity": "sha512-+8Dtxp0BZZj1CVUkiIlKGDLmhwsPILK9yJvc1P7tuJO9KsaQ5cywJk/b8A7lmqb2SfPkEg0xlQOK2FWIo1ATMA==", + "license": "MIT", + "dependencies": { + "@loaders.gl/loader-utils": "4.4.1", + "@loaders.gl/schema": "4.4.1", + "fast-xml-parser": "^5.3.6" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@loaders.gl/zip": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@loaders.gl/zip/-/zip-4.4.1.tgz", + "integrity": "sha512-fV7oqREEzzqYl2/b4tiM+J4qeSq6pB4gw1hHngpCtVyjVwWVtsNH2r1ly9kkv4XssIdXJxPcrX/GR0mDIwmp6w==", + "license": "MIT", + "dependencies": { + "@loaders.gl/compression": "4.4.1", + "@loaders.gl/crypto": "4.4.1", + "@loaders.gl/loader-utils": "4.4.1", + "jszip": "^3.1.5", + "md5": "^2.3.0" + }, + "peerDependencies": { + "@loaders.gl/core": "~4.4.0" + } + }, + "node_modules/@luma.gl/core": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@luma.gl/core/-/core-9.3.3.tgz", + "integrity": "sha512-jCFm2htvrVpcXIy85TBTF1ROgMfknKnfw2OH+Vydr41hiCFd6nqr79gM3f2uhaNkal0BghFNqF3qDioKiUWtew==", + "license": "MIT", + "dependencies": { + "@math.gl/types": "^4.1.0", + "@probe.gl/env": "^4.1.1", + "@probe.gl/log": "^4.1.1", + "@probe.gl/stats": "^4.1.1", + "@types/offscreencanvas": "^2019.7.3" + } + }, + "node_modules/@luma.gl/engine": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@luma.gl/engine/-/engine-9.3.3.tgz", + "integrity": "sha512-StmMTzUcUlpKMU3wvWU48A6OQyphptD9zVGBsSkK6iHIBdtBKlOcmqRkyfvRouo8JHtlrnoJDHLVKhxorwhGAg==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "^4.1.0", + "@math.gl/types": "^4.1.0", + "@probe.gl/log": "^4.1.1", + "@probe.gl/stats": "^4.1.1" + }, + "peerDependencies": { + "@luma.gl/core": "~9.3.0", + "@luma.gl/shadertools": "~9.3.0" + } + }, + "node_modules/@luma.gl/gltf": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@luma.gl/gltf/-/gltf-9.3.3.tgz", + "integrity": "sha512-/wty4PHYeQelXvDJesyuMdqtAfpL1XcyEQffcEAwKwu9w7JdkygSShdUwTT1iF7no0uGKuWgq824dVC9WBBQcw==", + "license": "MIT", + "dependencies": { + "@loaders.gl/core": "~4.4.0", + "@loaders.gl/gltf": "~4.4.0", + "@loaders.gl/textures": "~4.4.0", + "@math.gl/core": "^4.1.0" + }, + "peerDependencies": { + "@luma.gl/core": "~9.3.0", + "@luma.gl/engine": "~9.3.0", + "@luma.gl/shadertools": "~9.3.0" + } + }, + "node_modules/@luma.gl/shadertools": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@luma.gl/shadertools/-/shadertools-9.3.3.tgz", + "integrity": "sha512-4ZfG4/Utix951vqyiG/JIx+Eg+GMNwOxgr/07/i0gf7bK1gJZIEQ5BxVcDw4MCQfdoVlGPGzl0cQKbdqBvaCAQ==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "^4.1.0", + "@math.gl/types": "^4.1.0" + }, + "peerDependencies": { + "@luma.gl/core": "~9.3.0" + } + }, + "node_modules/@luma.gl/webgl": { + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/@luma.gl/webgl/-/webgl-9.3.3.tgz", + "integrity": "sha512-X+aavdP5o6VFHSA0es9gKZTT145jfcFbhKJt/gwJrptnKNoIW4+Y37ZEpCo1AzAnr+FQCxjgcM2kOCpoWMfSVA==", + "license": "MIT", + "dependencies": { + "@math.gl/types": "^4.1.0", + "@probe.gl/env": "^4.1.1" + }, + "peerDependencies": { + "@luma.gl/core": "~9.3.0" + } + }, + "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/martini": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@mapbox/martini/-/martini-0.2.0.tgz", + "integrity": "sha512-7hFhtkb0KTLEls+TRw/rWayq5EeHtTaErgm/NskVoXmtgAQu/9D299aeyj6mzAR/6XUnYRp2lU+4IcrYRFjVsQ==", + "license": "ISC" + }, + "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==", + "license": "ISC" + }, + "node_modules/@mapbox/tiny-sdf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.1.0.tgz", + "integrity": "sha512-uFJhNh36BR4OCuWIEiWaEix9CA2WzT6CAIcqVjWYpnx8+QDtS+oC4QehRrx5cX4mgWs37MmKnwUejeHxVymzNg==", + "license": "BSD-2-Clause" + }, + "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==", + "license": "BSD-2-Clause" + }, + "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==", + "license": "BSD-3-Clause", + "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==", + "license": "ISC", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@maplibre/geojson-vt": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.1.0.tgz", + "integrity": "sha512-2eIY4gZxeKIVOZVNkAMb+5NgXhgsMQpOveTQAvnp53LYqHGJZDidk7Ew0Tged9PThidpbS+NFTh0g4zivhPDzQ==", + "license": "ISC", + "dependencies": { + "kdbush": "^4.0.2" + } + }, + "node_modules/@maplibre/maplibre-gl-style-spec": { + "version": "24.8.1", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-24.8.1.tgz", + "integrity": "sha512-zxa92qF96ZNojLxeAjnaRpjVCy+swoUNJvDhtpC90k7u5F0TMr4GmvNqMKvYrMoPB8d7gRSXbMG1hBbmgESIsw==", + "license": "ISC", + "dependencies": { + "@mapbox/jsonlint-lines-primitives": "~2.0.2", + "@mapbox/unitbezier": "^0.0.1", + "json-stringify-pretty-compact": "^4.0.0", + "minimist": "^1.2.8", + "quickselect": "^3.0.0", + "rw": "^1.3.3", + "tinyqueue": "^3.0.0" + }, + "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/@maplibre/mlt": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.1.9.tgz", + "integrity": "sha512-g/tD8EYJB97udq33ipuJ9a4Q7fcbZnTEnUrgnEc/tLMmEL+zaCbR+X5fkDBO2dgpaAMsLH179qE3UXg2N0Nc/g==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@mapbox/point-geometry": "^1.1.0" + } + }, + "node_modules/@maplibre/mlt/node_modules/@mapbox/point-geometry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-1.1.0.tgz", + "integrity": "sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==", + "license": "ISC" + }, + "node_modules/@maplibre/vt-pbf": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.3.0.tgz", + "integrity": "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w==", + "license": "MIT", + "dependencies": { + "@mapbox/point-geometry": "^1.1.0", + "@mapbox/vector-tile": "^2.0.4", + "@maplibre/geojson-vt": "^5.0.4", + "@types/geojson": "^7946.0.16", + "@types/supercluster": "^7.1.3", + "pbf": "^4.0.1", + "supercluster": "^8.0.1" + } + }, + "node_modules/@maplibre/vt-pbf/node_modules/@mapbox/point-geometry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-1.1.0.tgz", + "integrity": "sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==", + "license": "ISC" + }, + "node_modules/@maplibre/vt-pbf/node_modules/@mapbox/vector-tile": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-2.0.4.tgz", + "integrity": "sha512-AkOLcbgGTdXScosBWwmmD7cDlvOjkg/DetGva26pIRiZPdeJYjYKarIlb4uxVzi6bwHO6EWH82eZ5Nuv4T5DUg==", + "license": "BSD-3-Clause", + "dependencies": { + "@mapbox/point-geometry": "~1.1.0", + "@types/geojson": "^7946.0.16", + "pbf": "^4.0.1" + } + }, + "node_modules/@maplibre/vt-pbf/node_modules/@maplibre/geojson-vt": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-5.0.4.tgz", + "integrity": "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ==", + "license": "ISC" + }, + "node_modules/@maplibre/vt-pbf/node_modules/pbf": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", + "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", + "license": "BSD-3-Clause", + "dependencies": { + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, + "node_modules/@math.gl/core": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/core/-/core-4.1.0.tgz", + "integrity": "sha512-FrdHBCVG3QdrworwrUSzXIaK+/9OCRLscxI2OUy6sLOHyHgBMyfnEGs99/m3KNvs+95BsnQLWklVfpKfQzfwKA==", + "license": "MIT", + "dependencies": { + "@math.gl/types": "4.1.0" + } + }, + "node_modules/@math.gl/culling": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/culling/-/culling-4.1.0.tgz", + "integrity": "sha512-jFmjFEACnP9kVl8qhZxFNhCyd47qPfSVmSvvjR0/dIL6R9oD5zhR1ub2gN16eKDO/UM7JF9OHKU3EBIfeR7gtg==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "4.1.0", + "@math.gl/types": "4.1.0" + } + }, + "node_modules/@math.gl/geospatial": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/geospatial/-/geospatial-4.1.0.tgz", + "integrity": "sha512-BzsUhpVvnmleyYF6qdqJIip6FtIzJmnWuPTGhlBuPzh7VBHLonCFSPtQpbkRuoyAlbSyaGXcVt6p6lm9eK2vtg==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "4.1.0", + "@math.gl/types": "4.1.0" + } + }, + "node_modules/@math.gl/polygon": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/polygon/-/polygon-4.1.0.tgz", + "integrity": "sha512-YA/9PzaCRHbIP5/0E9uTYrqe+jsYTQoqoDWhf6/b0Ixz8bPZBaGDEafLg3z7ffBomZLacUty9U3TlPjqMtzPjA==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "4.1.0" + } + }, + "node_modules/@math.gl/sun": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/sun/-/sun-4.1.0.tgz", + "integrity": "sha512-i3q6OCBLSZ5wgZVhXg+X7gsjY/TUtuFW/2KBiq/U1ypLso3S4sEykoU/MGjxUv1xiiGtr+v8TeMbO1OBIh/HmA==", + "license": "MIT" + }, + "node_modules/@math.gl/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/types/-/types-4.1.0.tgz", + "integrity": "sha512-clYZdHcmRvMzVK5fjeDkQlHUzXQSNdZ7s4xOqC3nJPgz4C/TZkUecTo9YS4PruZqtDda/ag4erndP0MIn40dGA==", + "license": "MIT" + }, + "node_modules/@math.gl/web-mercator": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@math.gl/web-mercator/-/web-mercator-4.1.0.tgz", + "integrity": "sha512-HZo3vO5GCMkXJThxRJ5/QYUYRr3XumfT8CzNNCwoJfinxy5NtKUd7dusNTXn7yJ40UoB8FMIwkVwNlqaiRZZAw==", + "license": "MIT", + "dependencies": { + "@math.gl/core": "4.1.0" + } + }, + "node_modules/@nodable/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, + "node_modules/@open-wc/dedupe-mixin": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@open-wc/dedupe-mixin/-/dedupe-mixin-1.4.0.tgz", + "integrity": "sha512-Sj7gKl1TLcDbF7B6KUhtvr+1UCxdhMbNY5KxdU5IfMFWqL8oy1ZeAcCANjoB1TL0AJTcPmcCFsCbHf8X2jGDUA==", + "license": "MIT", + "peer": true + }, + "node_modules/@polymer/polymer": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@polymer/polymer/-/polymer-3.5.2.tgz", + "integrity": "sha512-fWwImY/UH4bb2534DVSaX+Azs2yKg8slkMBHOyGeU2kKx7Xmxp6Lee0jP8p6B3d7c1gFUPB2Z976dTUtX81pQA==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@webcomponents/shadycss": "^1.9.1" + } + }, + "node_modules/@probe.gl/env": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@probe.gl/env/-/env-4.1.1.tgz", + "integrity": "sha512-+68seNDMVsEegRB47pFA/Ws1Fjy8agcFYXxzorKToyPcD6zd+gZ5uhwoLd7TzsSw6Ydns//2KEszWn+EnNHTbA==", + "license": "MIT" + }, + "node_modules/@probe.gl/log": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@probe.gl/log/-/log-4.1.1.tgz", + "integrity": "sha512-kcZs9BT44pL7hS1OkRGKYRXI/SN9KejUlPD+BY40DguRLzdC5tLG/28WGMyfKdn/51GT4a0p+0P8xvDn1Ez+Kg==", + "license": "MIT", + "dependencies": { + "@probe.gl/env": "4.1.1" + } + }, + "node_modules/@probe.gl/stats": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-4.1.1.tgz", + "integrity": "sha512-4VpAyMHOqydSvPlEyHwXaE+AkIdR03nX+Qhlxsk2D/IW4OVmDZgIsvJB1cDzyEEtcfKcnaEbfXeiPgejBceT6g==", + "license": "MIT" + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@swc/helpers": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.21.tgz", + "integrity": "sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@tauri-apps/api": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz", + "integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==", + "license": "Apache-2.0 OR MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, + "node_modules/@tauri-apps/cli": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.10.1.tgz", + "integrity": "sha512-jQNGF/5quwORdZSSLtTluyKQ+o6SMa/AUICfhf4egCGFdMHqWssApVgYSbg+jmrZoc8e1DscNvjTnXtlHLS11g==", + "dev": true, + "license": "Apache-2.0 OR MIT", + "bin": { + "tauri": "tauri.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + }, + "optionalDependencies": { + "@tauri-apps/cli-darwin-arm64": "2.10.1", + "@tauri-apps/cli-darwin-x64": "2.10.1", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.10.1", + "@tauri-apps/cli-linux-arm64-gnu": "2.10.1", + "@tauri-apps/cli-linux-arm64-musl": "2.10.1", + "@tauri-apps/cli-linux-riscv64-gnu": "2.10.1", + "@tauri-apps/cli-linux-x64-gnu": "2.10.1", + "@tauri-apps/cli-linux-x64-musl": "2.10.1", + "@tauri-apps/cli-win32-arm64-msvc": "2.10.1", + "@tauri-apps/cli-win32-ia32-msvc": "2.10.1", + "@tauri-apps/cli-win32-x64-msvc": "2.10.1" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.10.1.tgz", + "integrity": "sha512-Z2OjCXiZ+fbYZy7PmP3WRnOpM9+Fy+oonKDEmUE6MwN4IGaYqgceTjwHucc/kEEYZos5GICve35f7ZiizgqEnQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.10.1.tgz", + "integrity": "sha512-V/irQVvjPMGOTQqNj55PnQPVuH4VJP8vZCN7ajnj+ZS8Kom1tEM2hR3qbbIRoS3dBKs5mbG8yg1WC+97dq17Pw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.10.1.tgz", + "integrity": "sha512-Hyzwsb4VnCWKGfTw+wSt15Z2pLw2f0JdFBfq2vHBOBhvg7oi6uhKiF87hmbXOBXUZaGkyRDkCHsdzJcIfoJC2w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.10.1.tgz", + "integrity": "sha512-OyOYs2t5GkBIvyWjA1+h4CZxTcdz1OZPCWAPz5DYEfB0cnWHERTnQ/SLayQzncrT0kwRoSfSz9KxenkyJoTelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.10.1.tgz", + "integrity": "sha512-MIj78PDDGjkg3NqGptDOGgfXks7SYJwhiMh8SBoZS+vfdz7yP5jN18bNaLnDhsVIPARcAhE1TlsZe/8Yxo2zqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.10.1.tgz", + "integrity": "sha512-X0lvOVUg8PCVaoEtEAnpxmnkwlE1gcMDTqfhbefICKDnOTJ5Est3qL0SrWxizDackIOKBcvtpejrSiVpuJI1kw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.10.1.tgz", + "integrity": "sha512-2/12bEzsJS9fAKybxgicCDFxYD1WEI9kO+tlDwX5znWG2GwMBaiWcmhGlZ8fi+DMe9CXlcVarMTYc0L3REIRxw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.10.1.tgz", + "integrity": "sha512-Y8J0ZzswPz50UcGOFuXGEMrxbjwKSPgXftx5qnkuMs2rmwQB5ssvLb6tn54wDSYxe7S6vlLob9vt0VKuNOaCIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.10.1.tgz", + "integrity": "sha512-iSt5B86jHYAPJa/IlYw++SXtFPGnWtFJriHn7X0NFBVunF6zu9+/zOn8OgqIWSl8RgzhLGXQEEtGBdR4wzpVgg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.10.1.tgz", + "integrity": "sha512-gXyxgEzsFegmnWywYU5pEBURkcFN/Oo45EAwvZrHMh+zUSEAvO5E8TXsgPADYm31d1u7OQU3O3HsYfVBf2moHw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.10.1.tgz", + "integrity": "sha512-6Cn7YpPFwzChy0ERz6djKEmUehWrYlM+xTaNzGPgZocw3BD7OfwfWHKVWxXzdjEW2KfKkHddfdxK1XXTYqBRLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/plugin-dialog": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.7.0.tgz", + "integrity": "sha512-4nS/hfGMGCXiAS3LtVjH9AgsSAPJeG/7R+q8agTFqytjnMa4Zq95Bq8WzVDkckpanX+yyRHXnRtrKXkANKDHvw==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.10.1" + } + }, + "node_modules/@tauri-apps/plugin-opener": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.3.tgz", + "integrity": "sha512-CCcUltXMOfUEArbf3db3kCE7Ggy1ExBEBl51Ko2ODJ6GDYHRp1nSNlQm5uNCFY5k7/ufaK5Ib3Du/Zir19IYQQ==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@tauri-apps/api": "^2.8.0" + } + }, + "node_modules/@turf/boolean-clockwise": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-5.1.5.tgz", + "integrity": "sha512-FqbmEEOJ4rU4/2t7FKx0HUWmjFEVqR+NJrFP7ymGSjja2SQ7Q91nnBihGuT+yuHHl6ElMjQ3ttsB/eTmyCycxA==", + "license": "MIT", + "dependencies": { + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5" + } + }, + "node_modules/@turf/clone": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-5.1.5.tgz", + "integrity": "sha512-//pITsQ8xUdcQ9pVb4JqXiSqG4dos5Q9N4sYFoWghX21tfOV2dhc5TGqYOhnHrQS7RiKQL1vQ48kIK34gQ5oRg==", + "license": "MIT", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/helpers": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz", + "integrity": "sha512-/lF+JR+qNDHZ8bF9d+Cp58nxtZWJ3sqFe6n3u3Vpj+/0cqkjk4nXKYBSY0azm+GIYB5mWKxUXvuP/m0ZnKj1bw==", + "license": "MIT" + }, + "node_modules/@turf/invariant": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.2.0.tgz", + "integrity": "sha512-28RCBGvCYsajVkw2EydpzLdcYyhSA77LovuOvgCJplJWaNVyJYH6BOR3HR9w50MEkPqb/Vc/jdo6I6ermlRtQA==", + "license": "MIT", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/meta": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz", + "integrity": "sha512-ZjQ3Ii62X9FjnK4hhdsbT+64AYRpaI8XMBMcyftEOGSmPMUVnkbvuv3C9geuElAXfQU7Zk1oWGOcrGOD9zr78Q==", + "license": "MIT", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/rewind": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-5.1.5.tgz", + "integrity": "sha512-Gdem7JXNu+G4hMllQHXRFRihJl3+pNl7qY+l4qhQFxq+hiU1cQoVFnyoleIqWKIrdK/i2YubaSwc3SCM7N5mMw==", + "license": "MIT", + "dependencies": { + "@turf/boolean-clockwise": "^5.1.5", + "@turf/clone": "^5.1.5", + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5", + "@turf/meta": "^5.1.5" + } + }, + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "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, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/brotli": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/brotli/-/brotli-1.3.5.tgz", + "integrity": "sha512-9xoNr+bcxT236/7ZgcWw/6Pb2RRetE13p4bFy1xYSckKwyOiRfmInay8baUWZgH7/284Wl6IPe7+nOI9+OQg/A==", + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/command-line-args": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.3.tgz", + "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==", + "license": "MIT" + }, + "node_modules/@types/command-line-usage": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.4.tgz", + "integrity": "sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==", + "license": "MIT" + }, + "node_modules/@types/crypto-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz", + "integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==", + "license": "MIT" + }, + "node_modules/@types/d3": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", + "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", + "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", + "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", + "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", + "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz", + "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", + "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", + "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", + "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", + "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", + "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.1.tgz", + "integrity": "sha512-QwjxA3+YCKH3N1Rs3uSiSy1bdxlLB1uUiENXeJudBoAFvtDuswUxLcanoOaR2JYn1melDTuIXR8VhnVyI3yG/A==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", + "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-random": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.3.tgz", + "integrity": "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-sankey": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@types/d3-sankey/-/d3-sankey-0.11.2.tgz", + "integrity": "sha512-U6SrTWUERSlOhnpSrgvMX64WblX1AxX6nEjI2t3mLK2USpQrnbwYYK+AS9SwiE7wgYmOsSSKoSdr8aoKBH0HgQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-shape": "^1" + } + }, + "node_modules/@types/d3-sankey/node_modules/@types/d3-path": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.11.tgz", + "integrity": "sha512-4pQMp8ldf7UaB/gR8Fvvy69psNHkTpD/pVw3vmEi8iZAB9EPMBruB1JvHO4BIq9QkUUd2lV1F5YXpMNj7JPBpw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-sankey/node_modules/@types/d3-shape": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.12.tgz", + "integrity": "sha512-8oMzcd4+poSLGgV0R1Q1rOlx/xdmozS4Xab7np0eamFFUYq71AU9pOCJEFnkXW2aI/oXdVYJzw6pssbSut7Z9Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-path": "^1" + } + }, + "node_modules/@types/d3-scale": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-3.3.5.tgz", + "integrity": "sha512-YOpKj0kIEusRf7ofeJcSZQsvKbnTwpe1DUF+P2qsotqG53kEsjm7EzzliqQxMkAWdkZcHrg5rRhB4JiDOQPX+A==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "^2" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-scale/node_modules/@types/d3-time": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-2.1.4.tgz", + "integrity": "sha512-BTfLsxTeo7yFxI/haOOf1ZwJ6xKgQLT9dCp+EcmQv87Gox6X+oKl4mLKfO6fnWm3P22+A6DknMNEZany8ql2Rw==", + "license": "MIT" + }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", + "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", + "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", + "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", + "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "license": "MIT" + }, + "node_modules/@types/google.maps": { + "version": "3.64.0", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.64.0.tgz", + "integrity": "sha512-dN0H6tB4lgLQLovcbPXFYYOEV41TpyyJghzb5jrzjB96FZmjeOghevVdC+BMGd6YqyCqXaggyEtqRXLRjzCBZA==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "undici-types": "~7.19.0" + } + }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.3", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", + "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==", + "license": "MIT" + }, + "node_modules/@types/pako": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.7.tgz", + "integrity": "sha512-YBtzT2ztNF6R/9+UXj2wTGFnC9NklAnASt3sC0h2m1bbH7G6FyBIkt4AN8ThZpNfxUo1b2iMVO0UawiJymEt8A==", + "license": "MIT" + }, + "node_modules/@types/polylabel": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/polylabel/-/polylabel-1.1.3.tgz", + "integrity": "sha512-9Zw2KoDpi+T4PZz2G6pO2xArE0m/GSMTW1MIxF2s8ZY8x9XDO6fv9um0ydRGvcbkFLlaq8yNK6eZxnmMZtDgWQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/react": { + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@types/sortablejs": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.9.tgz", + "integrity": "sha512-7HP+rZGE2p886PKV9c9OJzLBI6BBJu1O7lJGYnPyG3fS4/duUCcngkNCjsLwIMV+WMqANe3tt4irrXHSIe68OQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/supercluster": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz", + "integrity": "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==", + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/svg-arc-to-cubic-bezier": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@types/svg-arc-to-cubic-bezier/-/svg-arc-to-cubic-bezier-3.2.3.tgz", + "integrity": "sha512-UNOnbTtl0nVTm8hwKaz5R5VZRvSulFMGojO5+Q7yucKxBoCaTtS4ibSQVRHo5VW5AaRo145U8p1Vfg5KrYe9Bg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "peer": true + }, + "node_modules/@vaadin/a11y-base": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/a11y-base/-/a11y-base-24.9.14.tgz", + "integrity": "sha512-ropoBCS9H8sobwZneDbQaqOvOB5ZS8Mn7w9j2WMhSgclUaPIZbGOTV6er58DfaEIx0kWfLgN0Lpqu+1Fc0ssbA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/checkbox": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/checkbox/-/checkbox-24.9.14.tgz", + "integrity": "sha512-IRR8xNlbTy46G5hddstP1u3qpDy+GOlzQvxcdcL5Off4KtgFBuvBLHHQSQ2frolMP4sjLbeUsaagPWV/lhJ4wQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/a11y-base": "~24.9.14", + "@vaadin/component-base": "~24.9.14", + "@vaadin/field-base": "~24.9.14", + "@vaadin/vaadin-lumo-styles": "~24.9.14", + "@vaadin/vaadin-material-styles": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/component-base": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-24.9.14.tgz", + "integrity": "sha512-xTwQJaoSUhWA1xBDls8q6QkNsIlhnQRDCqt/gmLg4ixzjceajPpaobVjIoTeit9a86wwQOK0kkvPTHDM9Yku6Q==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/vaadin-development-mode-detector": "^2.0.0", + "@vaadin/vaadin-usage-statistics": "^2.1.0", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/field-base": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-24.9.14.tgz", + "integrity": "sha512-+B2Q/Q4MzFmBfz/nFdH2RS6YYTt3JvaAgibM1bLJRihiOG2UodKy7FGik3dVcYSdEZR+jBabUNj4YwsQwuKiXw==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/a11y-base": "~24.9.14", + "@vaadin/component-base": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/grid": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/grid/-/grid-24.9.14.tgz", + "integrity": "sha512-kC84mI8wZF8hVWKGIUpLWDR1HvagfySVoB9rt4RBx3sy7C+CGBnw3pHWLMMmED5soMsxuA3AWf27ut7naCudPQ==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/a11y-base": "~24.9.14", + "@vaadin/checkbox": "~24.9.14", + "@vaadin/component-base": "~24.9.14", + "@vaadin/lit-renderer": "~24.9.14", + "@vaadin/text-field": "~24.9.14", + "@vaadin/vaadin-lumo-styles": "~24.9.14", + "@vaadin/vaadin-material-styles": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/icon": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-24.9.14.tgz", + "integrity": "sha512-o2XrPtXmVX1TFa8Sr/MelnBok9o5Eczs1W6cNMm2kaeD5O8yN5EU+G8Q71po1iBDE4Y+C86zXhcvkGvLlMrIpA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "~24.9.14", + "@vaadin/vaadin-lumo-styles": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/input-container": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-24.9.14.tgz", + "integrity": "sha512-jWtpkbVOKr9MuH5Q2BnwHfzUFii3eZRBET/bxwn2gzRg4pt9KXazBJZ49SCkMYIaAqgAbkJ0vjgbC2+3OVNZYg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "~24.9.14", + "@vaadin/vaadin-lumo-styles": "~24.9.14", + "@vaadin/vaadin-material-styles": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/lit-renderer": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-24.9.14.tgz", + "integrity": "sha512-knpWn6+/GEJb5x/Ec7JP6JI+FAPPTKDs1XnJZ+PP+2lWo4jrW3OszG9IZK53H2KU4KrDs6iQFQ/qVzzj/71zvA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/text-field": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-24.9.14.tgz", + "integrity": "sha512-ve1is6xG0NopENh122ZgbN/BEffPbWcd37O+2Us4FbgUazcCm2z8AlgGNcroQo+bDDoMfsE7NjY+OfxsS5tPhA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/a11y-base": "~24.9.14", + "@vaadin/component-base": "~24.9.14", + "@vaadin/field-base": "~24.9.14", + "@vaadin/input-container": "~24.9.14", + "@vaadin/vaadin-lumo-styles": "~24.9.14", + "@vaadin/vaadin-material-styles": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14", + "lit": "^3.0.0" + } + }, + "node_modules/@vaadin/vaadin-development-mode-detector": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.7.tgz", + "integrity": "sha512-9FhVhr0ynSR3X2ao+vaIEttcNU5XfzCbxtmYOV8uIRnUCtNgbvMOIcyGBvntsX9I5kvIP2dV3cFAOG9SILJzEA==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@vaadin/vaadin-lumo-styles": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.9.14.tgz", + "integrity": "sha512-jbvnSjvYX0mA4etq382XZ7IObfdQeoDt+v7F4cnJCJUXbGv2lYmESaOofSQnb1RBqST/5KXGk/GWIbRftCu7Qg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "~24.9.14", + "@vaadin/icon": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14" + } + }, + "node_modules/@vaadin/vaadin-material-styles": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.9.14.tgz", + "integrity": "sha512-2Bl9XtNb6sGE+GpiGxqSRm/RhcU4e9oTEkzHauq8JGmBBvR/15h5CoLGPzzCRKuQpiuwrjhp3Qnz7p8KJiRaAg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "~24.9.14", + "@vaadin/vaadin-themable-mixin": "~24.9.14" + } + }, + "node_modules/@vaadin/vaadin-themable-mixin": { + "version": "24.9.14", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.9.14.tgz", + "integrity": "sha512-t0igrcLaC1MeS//YUHymtGq9pjFfao4vnZTXcNrKDmi5JAozqPDPL916+Nos6/dVWVw1pcctmXdG9Z+joAxc9w==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "lit": "^3.0.0", + "style-observer": "^0.0.8" + } + }, + "node_modules/@vaadin/vaadin-usage-statistics": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-usage-statistics/-/vaadin-usage-statistics-2.1.3.tgz", + "integrity": "sha512-8r4TNknD7OJQADe3VygeofFR7UNAXZ2/jjBFP5dgI8+2uMfnuGYgbuHivasKr9WSQ64sPej6m8rDoM1uSllXjQ==", + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@vaadin/vaadin-development-mode-detector": "^2.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/@webcomponents/shadycss": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.11.2.tgz", + "integrity": "sha512-vRq+GniJAYSBmTRnhCYPAPq6THYqovJ/gzGThWbgEZUQaBccndGTi1hdiUP15HzEco0I6t4RCtXyX0rsSmwgPw==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@zip.js/zip.js": { + "version": "2.8.26", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.26.tgz", + "integrity": "sha512-RQ4h9F6DOiHxpdocUDrOl6xBM+yOtz+LkUol47AVWcfebGBDpZ7w7Xvz9PS24JgXvLGiXXzSAfdCdVy1tPlaFA==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "bun": ">=0.7.0", + "deno": ">=1.0.0", + "node": ">=18.0.0" + } + }, + "node_modules/a5-js": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/a5-js/-/a5-js-0.7.3.tgz", + "integrity": "sha512-3aoMwHmNkyuMDHS4q6GRRInpOawamen2pokIbc0MQmR9cqG0Y9+B0bZpzswwetjrSG2ckbYtShH+nKru6+3O5Q==", + "license": "Apache-2.0", + "dependencies": { + "gl-matrix": "^3.4.3" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/apache-arrow": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-21.1.0.tgz", + "integrity": "sha512-kQrYLxhC+NTVVZ4CCzGF6L/uPVOzJmD1T3XgbiUnP7oTeVFOFgEUu6IKNwCDkpFoBVqDKQivlX4RUFqqnWFlEA==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.11", + "@types/command-line-args": "^5.2.3", + "@types/command-line-usage": "^5.0.4", + "@types/node": "^24.0.3", + "command-line-args": "^6.0.1", + "command-line-usage": "^7.0.1", + "flatbuffers": "^25.1.24", + "json-bignum": "^0.0.3", + "tslib": "^2.6.2" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.js" + } + }, + "node_modules/apache-arrow/node_modules/@types/node": { + "version": "24.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz", + "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/apache-arrow/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-back": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.3.tgz", + "integrity": "sha512-SGDvmg6QTYiTxCBkYVmThcoa67uLl35pyzRHdpCGBOcqFy6BtwnphoFPk7LhJshD+Yk1Kt35WGWeZPTgwR4Fhw==", + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.22", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.22.tgz", + "integrity": "sha512-6qruVrb5rse6WylFkU0FhBKKGuecWseqdpQfhkawn6ztyk2QlfwSRjsDxMCLJrkfmfN21qvhl9ABgaMeRkuwww==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/brotli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", + "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", + "license": "MIT", + "dependencies": { + "base64-js": "^1.1.2" + } + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "license": "MIT", + "peer": true, + "dependencies": { + "pako": "~1.0.5" + } + }, + "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" + } + ], + "license": "MIT", + "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/buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha512-Bvx4xH00qweepGc43xFvMs5BKASXTbHaHm6+kDYIK9p/4iFwjATQkmPKHQSgJZzKbAymhztRbXUf1Nqhzl73/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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/caniuse-lite": { + "version": "1.0.30001790", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001790.tgz", + "integrity": "sha512-bOoxfJPyYo+ds6W0YfptaCWbFnJYjh2Y1Eow5lRv+vI2u8ganPZqNm1JwNh0t2ELQCqIWg4B3dWEusgAmsoyOw==", + "dev": true, + "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" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/cartocolor": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/cartocolor/-/cartocolor-5.0.2.tgz", + "integrity": "sha512-Ihb/wU5V6BVbHwapd8l/zg7bnhZ4YPFVfa7quSpL86lfkPJSf4YuNBT+EvesPRP5vSqhl6vZVsQJwCR8alBooQ==", + "license": "CC-BY-4.0", + "dependencies": { + "colorbrewer": "1.5.6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "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/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-5.0.3.tgz", + "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^3.1.3", + "color-string": "^2.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.4.tgz", + "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/color-string/node_modules/color-name": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.0.tgz", + "integrity": "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.3.tgz", + "integrity": "sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==", + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=14.6" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.0.tgz", + "integrity": "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/colorbrewer": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/colorbrewer/-/colorbrewer-1.5.6.tgz", + "integrity": "sha512-fONg2pGXyID8zNgKHBlagW8sb/AMShGzj4rRJfz5biZ7iuHQZYquSCLE/Co1oSQFmt/vvwjyezJCejQl7FG/tg==", + "license": [ + { + "type": "Apache-Style", + "url": "https://github.com/saikocat/colorbrewer/blob/master/LICENSE.txt" + } + ] + }, + "node_modules/command-line-args": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-6.0.2.tgz", + "integrity": "sha512-AIjYVxrV9X752LmPDLbVYv8aMCuHPSLZJXEo2qo/xJfv+NYhaZ4sMSF01rM+gHPaMgvPM0l5D/F+Qx+i2WfSmQ==", + "license": "MIT", + "dependencies": { + "array-back": "^6.2.3", + "find-replace": "^5.0.2", + "lodash.camelcase": "^4.3.0", + "typical": "^7.3.0" + }, + "engines": { + "node": ">=12.20" + }, + "peerDependencies": { + "@75lb/nature": "latest" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } + } + }, + "node_modules/command-line-usage": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.4.tgz", + "integrity": "sha512-85UdvzTNx/+s5CkSgBm/0hzP80RFHAa7PsfeADE5ezZF3uHz3/Tqj9gIKGT9PTtpycc3Ua64T0oVulGfKxzfqg==", + "license": "MIT", + "dependencies": { + "array-back": "^6.2.2", + "chalk-template": "^0.4.0", + "table-layout": "^4.1.1", + "typical": "^7.3.0" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "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==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/composed-offset-position": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/composed-offset-position/-/composed-offset-position-0.0.6.tgz", + "integrity": "sha512-Q7dLompI6lUwd7LWyIcP66r4WcS9u7AL2h8HaeipiRfCRPLMWqRx8fYsjb4OHi6UQFifO7XtNC2IlEJ1ozIFxw==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "@floating-ui/utils": "^0.2.5" + } + }, + "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, + "license": "MIT" + }, + "node_modules/core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha512-IG97qShIP+nrJCXMCgkNZgH7jZQ4n8RpPyPeXX++T6avR/KhLhgLiHKoEn5Rc1KjfycSfA9DMa6m+4C4eguHhw==", + "license": "MIT", + "dependencies": { + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT", + "peer": true + }, + "node_modules/cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==", + "license": "MIT", + "peer": 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==", + "license": "MIT" + }, + "node_modules/d3": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "BSD-3-Clause", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", + "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "license": "ISC", + "peer": true, + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hexbin": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/d3-hexbin/-/d3-hexbin-0.2.2.tgz", + "integrity": "sha512-KS3fUT2ReD4RlGCjvCEm1RgMtp2NFZumdMu4DBzQK8AZv3fXRM6Xm8I4fSU07UXvH4xxg03NwWKWdvxfS/yc4w==", + "license": "BSD-3-Clause" + }, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-sankey": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", + "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "d3-array": "1 - 2", + "d3-shape": "^1.2.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "internmap": "^1.0.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/d3-sankey/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-sankey/node_modules/internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "license": "ISC", + "peer": true + }, + "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==", + "license": "ISC", + "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.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "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==", + "license": "ISC", + "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==", + "license": "ISC", + "peer": true, + "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==", + "license": "ISC", + "peer": true, + "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-map": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/d3-voronoi-map/-/d3-voronoi-map-2.1.1.tgz", + "integrity": "sha512-mCXfz/kD9IQxjHaU2IMjkO8fSo4J6oysPR2iL+omDsCy1i1Qn6BQ/e4hEAW8C6ms2kfuHwqtbNom80Hih94YsA==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "d3-dispatch": "2.*", + "d3-polygon": "2.*", + "d3-timer": "2.*", + "d3-weighted-voronoi": "1.*" + } + }, + "node_modules/d3-voronoi-map/node_modules/d3-dispatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz", + "integrity": "sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/d3-voronoi-map/node_modules/d3-polygon": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-2.0.0.tgz", + "integrity": "sha512-MsexrCK38cTGermELs0cO1d79DcTsQRN7IWMJKczD/2kBjzNXxLUWP33qRF6VDpiLV/4EI4r6Gs0DAWQkE8pSQ==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/d3-voronoi-map/node_modules/d3-timer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz", + "integrity": "sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/d3-voronoi-treemap": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/d3-voronoi-treemap/-/d3-voronoi-treemap-1.1.2.tgz", + "integrity": "sha512-7odu9HdG/yLPWwzDteJq4yd9Q/NwgQV7IE/u36VQtcCK7k1sZwDqbkHCeMKNTBsq5mQjDwolTsrXcU0j8ZEMCA==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "d3-voronoi-map": "2.*" + } + }, + "node_modules/d3-weighted-voronoi": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/d3-weighted-voronoi/-/d3-weighted-voronoi-1.1.3.tgz", + "integrity": "sha512-C3WdvSKl9aqhAy+f3QT3PPsQG6V+ajDfYO3BSclQDSD+araW2xDBFIH67aKzsSuuuKaX8K2y2dGq1fq/dWTVig==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "d3-array": "2", + "d3-polygon": "2" + } + }, + "node_modules/d3-weighted-voronoi/node_modules/d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "internmap": "^1.0.0" + } + }, + "node_modules/d3-weighted-voronoi/node_modules/d3-polygon": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-2.0.0.tgz", + "integrity": "sha512-MsexrCK38cTGermELs0cO1d79DcTsQRN7IWMJKczD/2kBjzNXxLUWP33qRF6VDpiLV/4EI4r6Gs0DAWQkE8pSQ==", + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/d3-weighted-voronoi/node_modules/internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "license": "ISC", + "peer": true + }, + "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==", + "license": "ISC", + "peer": true, + "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/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deck.gl": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/deck.gl/-/deck.gl-9.3.1.tgz", + "integrity": "sha512-LLb//zqOK6MvwXdWKRYL116elGKs+2w2UO+yErO9RK35MmaQeYjzSU2r+Fzdi8mWsX/87FHD/PpZ74rfTy6boA==", + "license": "MIT", + "dependencies": { + "@deck.gl/aggregation-layers": "9.3.1", + "@deck.gl/arcgis": "9.3.1", + "@deck.gl/carto": "9.3.1", + "@deck.gl/core": "9.3.1", + "@deck.gl/extensions": "9.3.1", + "@deck.gl/geo-layers": "9.3.1", + "@deck.gl/google-maps": "9.3.1", + "@deck.gl/json": "9.3.1", + "@deck.gl/layers": "9.3.1", + "@deck.gl/mapbox": "9.3.1", + "@deck.gl/mesh-layers": "9.3.1", + "@deck.gl/react": "9.3.1", + "@deck.gl/widgets": "9.3.1", + "@loaders.gl/core": "^4.4.1", + "@luma.gl/core": "^9.3.2", + "@luma.gl/engine": "^9.3.2" + }, + "peerDependencies": { + "@arcgis/core": "^4.0.0", + "react": ">=16.3.0", + "react-dom": ">=16.3.0" + }, + "peerDependenciesMeta": { + "@arcgis/core": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/deep-strict-equal": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz", + "integrity": "sha512-3daSWyvZ/zwJvuMGlzG1O+Ow0YSadGfb3jsh9xoCutv2tWyB9dA4YvR9L9/fSdDZa2dByYQe+TqapSGUrjnkoA==", + "license": "MIT", + "dependencies": { + "core-assert": "^0.2.0" + }, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, + "node_modules/dfa": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", + "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==", + "license": "MIT", + "peer": true + }, + "node_modules/draco3d": { + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz", + "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==", + "license": "Apache-2.0" + }, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "ISC" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.344", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.344.tgz", + "integrity": "sha512-4MxfbmNDm+KPh066EZy+eUnkcDPcZ35wNmOWzFuh/ijvHsve6kbLTLURy88uCNK5FbpN+yk2nQY6BYh1GEt+wg==", + "dev": true, + "license": "ISC" + }, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-toolkit": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.46.0.tgz", + "integrity": "sha512-IToJ6ct9OLl5zz6WsC/1vZEwfSZ7Myil+ygl5Tf30Xjn9AEkzNB4kqp2G7VUJKF1DtTx/ra5M5KLlXvzOg51BA==", + "license": "MIT", + "peer": true, + "workspaces": [ + "docs", + "benchmarks" + ] + }, + "node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "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, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/esri-loader": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/esri-loader/-/esri-loader-3.7.0.tgz", + "integrity": "sha512-cB1Sw9EQjtW4mtT7eFBjn/6VaaIWNTjmTd2asnnEyuZk1xVSFRMCfLZSBSjZM7ZarDcVu5WIjOP0t0MYVu4hVQ==", + "deprecated": "Use @arcgis/core instead.", + "license": "Apache-2.0" + }, + "node_modules/fast-xml-builder": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz", + "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.2.tgz", + "integrity": "sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "@nodable/entities": "^2.1.0", + "fast-xml-builder": "^1.1.5", + "path-expression-matcher": "^1.5.0", + "strnum": "^2.2.3" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fflate": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz", + "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==", + "license": "MIT" + }, + "node_modules/find-replace": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-5.0.2.tgz", + "integrity": "sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@75lb/nature": "latest" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } + } + }, + "node_modules/flatbuffers": { + "version": "25.9.23", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-25.9.23.tgz", + "integrity": "sha512-MI1qs7Lo4Syw0EOzUl0xjs2lsoeqFku44KpngfIduHBYvzm8h2+7K8YMQh1JtVVVrUvhLpNwqVi4DERegUJhPQ==", + "license": "Apache-2.0" + }, + "node_modules/flatpickr": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.13.tgz", + "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==", + "license": "MIT", + "peer": true + }, + "node_modules/focus-trap": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.8.0.tgz", + "integrity": "sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "tabbable": "^6.4.0" + } + }, + "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, + "license": "MIT", + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "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==", + "license": "MIT", + "peer": true, + "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-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gl-matrix": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.4.tgz", + "integrity": "sha512-latSnyDNt/8zYUB6VIJ6PCh2jBjJX6gnDsoCZ7LyW7GkqrD51EWwa9qCoGixj8YqBtETQK/xY7OmpTF8xz1DdQ==", + "license": "MIT" + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/h3-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/h3-js/-/h3-js-4.4.0.tgz", + "integrity": "sha512-DvJh07MhGgY2KcC4OeZc8SSyA+ZXpdvoh6uCzGpoKvWtZxJB+g6VXXC1+eWYkaMIsLz7J/ErhOalHCpcs1KYog==", + "license": "Apache-2.0", + "engines": { + "node": ">=4", + "npm": ">=3", + "yarn": ">=1.3.0" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "license": "MIT", + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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==", + "license": "MIT", + "peer": true, + "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" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/image-size": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz", + "integrity": "sha512-Hiyv+mXHfFEP7LzUL/llg9RwFxxY+o9N3JVLIeG5E7iFIFAalxvRU9UZthBdYDEVnzHMgjnKJPPpay5BWf1g9g==", + "license": "MIT", + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/interactjs": { + "version": "1.10.27", + "resolved": "https://registry.npmjs.org/interactjs/-/interactjs-1.10.27.tgz", + "integrity": "sha512-y/8RcCftGAF24gSp76X2JS3XpHiUvDQyhF8i7ujemBz77hwiHDuJzftHx7thY8cxGogwGiPJ+o97kWB6eAXnsA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@interactjs/types": "1.10.27" + } + }, + "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==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "license": "MIT" + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-error": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", + "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "peer": true, + "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/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/jpeg-exif": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/jpeg-exif/-/jpeg-exif-1.1.4.tgz", + "integrity": "sha512-a+bKEcCjtuW5WTdgeXFzswSrdqi0jk4XlEtZlx5A94wCoBpFjfFTbo/Tra5SpNCl/YFZPvcV1dJc+TAYeg6ROQ==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "license": "MIT", + "peer": true + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsep": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-bignum": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", + "integrity": "sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/json-stringify-pretty-compact": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-4.0.0.tgz", + "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==", + "license": "MIT" + }, + "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, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/kdbush": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", + "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==", + "license": "ISC" + }, + "node_modules/ktx-parse": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.7.1.tgz", + "integrity": "sha512-FeA3g56ksdFNwjXJJsc1CCc7co+AJYDp6ipIp878zZ2bU8kWROatLYf39TQEd4/XRSUvBXovQ8gaVKWPXsCLEQ==", + "license": "MIT" + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lit": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.3.2.tgz", + "integrity": "sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@lit/reactive-element": "^2.1.0", + "lit-element": "^4.2.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-element": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.2.2.tgz", + "integrity": "sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.5.0", + "@lit/reactive-element": "^2.1.0", + "lit-html": "^3.3.0" + } + }, + "node_modules/lit-html": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.2.tgz", + "integrity": "sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.6" + } + }, + "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, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/luxon": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", + "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/lz4js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/lz4js/-/lz4js-0.2.0.tgz", + "integrity": "sha512-gY2Ia9Lm7Ep8qMiuGRhvUq0Q7qUereeldZPP1PMEJxPtEWHJLqw9pgX68oHajBH0nzJK4MaZEA/YNV3jT8u8Bg==", + "license": "ISC", + "optional": true + }, + "node_modules/maplibre-gl": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-5.24.0.tgz", + "integrity": "sha512-ALyFxgtd5R+65UqZ/++lOqwWcC0SNho9c27fYSyLmG7AfnAul2o46F05aDJGPbFU57wos9dgcIySHs0Xe6ia3A==", + "license": "BSD-3-Clause", + "dependencies": { + "@mapbox/jsonlint-lines-primitives": "^2.0.2", + "@mapbox/point-geometry": "^1.1.0", + "@mapbox/tiny-sdf": "^2.1.0", + "@mapbox/unitbezier": "^0.0.1", + "@mapbox/vector-tile": "^2.0.4", + "@mapbox/whoots-js": "^3.1.0", + "@maplibre/geojson-vt": "^6.1.0", + "@maplibre/maplibre-gl-style-spec": "^24.8.1", + "@maplibre/mlt": "^1.1.8", + "@maplibre/vt-pbf": "^4.3.0", + "@types/geojson": "^7946.0.16", + "earcut": "^3.0.2", + "gl-matrix": "^3.4.4", + "kdbush": "^4.0.2", + "murmurhash-js": "^1.0.0", + "pbf": "^4.0.1", + "potpack": "^2.1.0", + "quickselect": "^3.0.0", + "tinyqueue": "^3.0.0" + }, + "engines": { + "node": ">=16.14.0", + "npm": ">=8.1.0" + }, + "funding": { + "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" + } + }, + "node_modules/maplibre-gl/node_modules/@mapbox/point-geometry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-1.1.0.tgz", + "integrity": "sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==", + "license": "ISC" + }, + "node_modules/maplibre-gl/node_modules/@mapbox/vector-tile": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-2.0.4.tgz", + "integrity": "sha512-AkOLcbgGTdXScosBWwmmD7cDlvOjkg/DetGva26pIRiZPdeJYjYKarIlb4uxVzi6bwHO6EWH82eZ5Nuv4T5DUg==", + "license": "BSD-3-Clause", + "dependencies": { + "@mapbox/point-geometry": "~1.1.0", + "@types/geojson": "^7946.0.16", + "pbf": "^4.0.1" + } + }, + "node_modules/maplibre-gl/node_modules/earcut": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.2.tgz", + "integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==", + "license": "ISC" + }, + "node_modules/maplibre-gl/node_modules/pbf": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", + "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", + "license": "BSD-3-Clause", + "dependencies": { + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, + "node_modules/marked": { + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.3.0.tgz", + "integrity": "sha512-K3UxuKu6l6bmA5FUwYho8CfJBlsUWAooKtdGgMcERSpF7gcBUrCGsLH7wDaaNOzwq18JzSUDyoEb/YsrqMac3w==", + "license": "MIT", + "peer": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/markerjs2": { + "version": "2.32.7", + "resolved": "https://registry.npmjs.org/markerjs2/-/markerjs2-2.32.7.tgz", + "integrity": "sha512-HeFRZjmc43DOG3lSQp92z49cq2oCYpYn2pX++SkJAW1Dij4xJtRquVRf+cXeSZQWDX3ufns1Ry/bGk+zveP7rA==", + "license": "SEE LICENSE IN LICENSE", + "peer": true + }, + "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==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "license": "BSD-3-Clause", + "dependencies": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mjolnir.js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mjolnir.js/-/mjolnir.js-3.0.0.tgz", + "integrity": "sha512-siX3YCG7N2HnmN1xMH3cK4JkUZJhbkhRFJL+G5N1vH0mh1t5088rJknIoqDFWDIU6NPGvRRgLnYW3ZHjSMEBLA==", + "license": "MIT" + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.6.1.tgz", + "integrity": "sha512-1B9lmAhB9D9/sHaPC1N7wLFEVUoFldxOpOO96lOD1PvJ43vCd0ozDPbu0FEL3++VvawOlDkq8YD373tJmP5JHw==", + "license": "MIT", + "dependencies": { + "moment": "^2.29.4" + }, + "engines": { + "node": "*" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", + "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "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==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "node_modules/path-expression-matcher": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", + "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/pbf": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.3.0.tgz", + "integrity": "sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, + "node_modules/pdfmake": { + "version": "0.2.23", + "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.2.23.tgz", + "integrity": "sha512-A/IksoKb/ikOZH1edSDJ/2zBbqJKDghD4+fXn3rT7quvCJDlsZMs3NmIB3eajLMMFU9Bd3bZPVvlUMXhvFI+bQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@foliojs-fork/linebreak": "^1.1.2", + "@foliojs-fork/pdfkit": "^0.15.3", + "iconv-lite": "^0.7.1", + "xmldoc": "^2.0.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/pdfmake/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/png-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.1.0.tgz", + "integrity": "sha512-PM/uYGzGdNSzqeOgly68+6wKQDL1SY0a/N+OEa/+br6LnHWOAJB0Npiamnodfq3jd2LS/i2fMeOKSAILjA+m5Q==", + "peer": true, + "dependencies": { + "browserify-zlib": "^0.2.0" + } + }, + "node_modules/polylabel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/polylabel/-/polylabel-1.1.0.tgz", + "integrity": "sha512-bxaGcA40sL3d6M4hH72Z4NdLqxpXRsCFk8AITYg6x1rn1Ei3izf00UMLklerBZTO49aPA3CYrIwVulx2Bce2pA==", + "license": "ISC", + "peer": true, + "dependencies": { + "tinyqueue": "^2.0.3" + } + }, + "node_modules/polylabel/node_modules/tinyqueue": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", + "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", + "license": "ISC", + "peer": true + }, + "node_modules/postcss": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz", + "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/potpack": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.1.0.tgz", + "integrity": "sha512-pcaShQc1Shq0y+E7GqJqvZj8DTthWV1KeHGdi0Z6IAin2Oi3JnLCOfwnCo84qc+HAp52wT9nK9H7FAJp5a44GQ==", + "license": "ISC" + }, + "node_modules/preact": { + "version": "10.29.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.1.tgz", + "integrity": "sha512-gQCLc/vWroE8lIpleXtdJhTFDogTdZG9AjMUpVkDf2iTCNwYNWA+u16dL41TqUDJO4gm2IgrcMv3uTpjd4Pwmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/protocol-buffers-schema": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.1.tgz", + "integrity": "sha512-VG2K63Igkiv9p76tk1lilczEK1cT+kCjKtkdhw1dQZV3k3IXJbd3o6Ho8b9zJZaHSnT2hKe4I+ObmX9w6m5SmQ==", + "license": "MIT" + }, + "node_modules/quadbin": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/quadbin/-/quadbin-0.4.2.tgz", + "integrity": "sha512-1NFzjFVM23Um51/ttD6lFDqGtUHNS5Ky1slZHk3YPwMbC+7Jl3ULLb4QvDo6+Nerv8b8SgUV+ysOhziUh4B5cQ==", + "license": "MIT", + "dependencies": { + "@math.gl/web-mercator": "^4.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/quickselect": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz", + "integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==", + "license": "ISC" + }, + "node_modules/react": { + "version": "19.2.5", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz", + "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.5", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz", + "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.5" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==", + "license": "MIT", + "peer": true, + "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/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==", + "license": "MIT", + "dependencies": { + "protocol-buffers-schema": "^3.3.1" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", + "license": "Unlicense", + "peer": true + }, + "node_modules/rollup": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", + "license": "BSD-3-Clause" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT", + "peer": true + }, + "node_modules/sax": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", + "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", + "license": "BlueOak-1.0.0", + "peer": true, + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", + "license": "MIT", + "peer": true + }, + "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, + "license": "ISC", + "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==", + "license": "MIT", + "peer": true, + "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==", + "license": "MIT", + "peer": true, + "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/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/snappyjs": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/snappyjs/-/snappyjs-0.6.1.tgz", + "integrity": "sha512-YIK6I2lsH072UE0aOFxxY1dPDCS43I5ktqHpeAsuLNYWkE5pGxRGWfDM4/vSUfNzXjC1Ivzt3qx31PCLmc9yqg==", + "license": "MIT" + }, + "node_modules/sortablejs": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.7.tgz", + "integrity": "sha512-Kk8wLQPlS+yi1ZEf48a4+fzHa4yxjC30M/Sr2AnQu+f/MPwvvX9XjZ6OWejiz8crBsLwSq8GHqaxaET7u6ux0A==", + "license": "MIT", + "peer": true + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "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==", + "license": "BSD-3-Clause" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/strnum": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, + "node_modules/style-observer": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/style-observer/-/style-observer-0.0.8.tgz", + "integrity": "sha512-UaIPn33Sx4BJ+goia51Q++VFWoplWK1995VdxQYzwwbFa+FUNLKlG+aiIdG2Vw7VyzIUBi8tqu8mTyg0Ppu6Yg==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/LeaVerou" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/leaverou" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/supercluster": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", + "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", + "license": "ISC", + "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==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/svg-arc-to-cubic-bezier": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/svg-arc-to-cubic-bezier/-/svg-arc-to-cubic-bezier-3.2.0.tgz", + "integrity": "sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==", + "license": "ISC", + "peer": true + }, + "node_modules/tabbable": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.4.0.tgz", + "integrity": "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==", + "license": "MIT", + "peer": true + }, + "node_modules/table-layout": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-4.1.1.tgz", + "integrity": "sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==", + "license": "MIT", + "dependencies": { + "array-back": "^6.2.2", + "wordwrapjs": "^5.1.0" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/texture-compressor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/texture-compressor/-/texture-compressor-1.0.2.tgz", + "integrity": "sha512-dStVgoaQ11mA5htJ+RzZ51ZxIZqNOgWKAIvtjLrW1AliQQLCmrDqNzQZ8Jh91YealQ95DXt4MEduLzJmbs6lig==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.10", + "image-size": "^0.7.4" + }, + "bin": { + "texture-compressor": "bin/texture-compressor.js" + } + }, + "node_modules/timezone-groups": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/timezone-groups/-/timezone-groups-0.10.4.tgz", + "integrity": "sha512-AnkJYrbb7uPkDCEqGeVJiawZNiwVlSkkeX4jZg1gTEguClhyX+/Ezn07KB6DT29tG3UN418ldmS/W6KqGOTDjg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "license": "MIT", + "peer": true + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyqueue": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-3.0.0.tgz", + "integrity": "sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==", + "license": "ISC" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/undici-types": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "license": "MIT", + "optional": true + }, + "node_modules/unicode-properties": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", + "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", + "license": "MIT", + "peer": true, + "dependencies": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/unicode-trie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", + "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/unicode-trie/node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "license": "MIT", + "peer": true + }, + "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" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/vite": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.2.tgz", + "integrity": "sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/wordwrapjs": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.1.tgz", + "integrity": "sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg==", + "license": "MIT", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/xmldoc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-2.0.3.tgz", + "integrity": "sha512-6gRk4NY/Jvg67xn7OzJuxLRsGgiXBaPUQplVJ/9l99uIugxh4FTOewYz5ic8WScj7Xx/2WvhENiQKwkK9RpE4w==", + "license": "MIT", + "peer": true, + "dependencies": { + "sax": "^1.4.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/xss": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.13.tgz", + "integrity": "sha512-clu7dxTm1e8Mo5fz3n/oW3UCXBfV89xZ72jM8yzo1vR/pIS0w3sgB3XV2H8Vm6zfGnHL0FzvLJPJEBhd86/z4Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "bin": { + "xss": "bin/xss" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/xss/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==", + "license": "MIT", + "peer": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/zstd-codec": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/zstd-codec/-/zstd-codec-0.1.5.tgz", + "integrity": "sha512-v3fyjpK8S/dpY/X5WxqTK3IoCnp/ZOLxn144GZVlNUjtwAchzrVo03h+oMATFhCIiJ5KTr4V3vDQQYz4RU684g==", + "license": "MIT", + "optional": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..bef43e6 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "kml_map_tool", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview", + "tauri": "tauri" + }, + "dependencies": { + "@deck.gl/core": "^9.3.1", + "@deck.gl/extensions": "^9.3.1", + "@deck.gl/layers": "^9.3.1", + "@deck.gl/mapbox": "^9.3.1", + "@tauri-apps/api": "^2", + "@tauri-apps/plugin-dialog": "^2.7.0", + "@tauri-apps/plugin-opener": "^2", + "deck.gl": "^9.3.1", + "maplibre-gl": "^5.24.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@tauri-apps/cli": "^2", + "@types/react": "^19.1.8", + "@types/react-dom": "^19.1.6", + "@vitejs/plugin-react": "^4.6.0", + "typescript": "~5.8.3", + "vite": "^7.0.4" + } +} diff --git a/public/tauri.svg b/public/tauri.svg new file mode 100644 index 0000000..31b62c9 --- /dev/null +++ b/public/tauri.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore new file mode 100644 index 0000000..b21bd68 --- /dev/null +++ b/src-tauri/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Generated by Tauri +# will have schema files for capabilities auto-completion +/gen/schemas diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock new file mode 100644 index 0000000..1fc7816 --- /dev/null +++ b/src-tauri/Cargo.lock @@ -0,0 +1,6481 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47" +dependencies = [ + "bzip2-sys", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.11.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.18", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.2.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.11.1", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.11.1", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.29.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "matches", + "phf 0.10.1", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.13.1", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "ctor" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.11.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dom_query" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser 0.36.0", + "foldhash 0.2.0", + "html5ever 0.38.0", + "precomputed-hash", + "selectors 0.36.1", + "tendril 0.5.0", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "earcut" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88459a2a8e3a514b6e6de38cf3aaa9250a894cb098f74a932db77fcc8341b6d0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "embed-resource" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31a88c8d26de40ed18fe748c547845aa39de1db3afd958f8cb91579f3644bcb" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.2+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "float_next_after" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37007738a80ea34f969af54a3390dd72cacdef654974cfd449c9f6f72dbaac10" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "geo" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30eb1fdc57c1e5cfd11826fe0caec4b9dc7901f3758263bb506228d88c8d9e9a" +dependencies = [ + "earcut", + "float_next_after", + "geo-types", + "geographiclib-rs", + "i_overlay", + "log", + "num-traits", + "rand 0.10.1", + "rand_pcg 0.10.2", + "robust", + "rstar", + "sif-itree", + "spade", +] + +[[package]] +name = "geo-types" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94776032c45f950d30a13af6113c2ad5625316c9abfbccee4dd5a6695f8fe0f5" +dependencies = [ + "approx", + "num-traits", + "rayon", + "rstar", + "serde", + "spade", +] + +[[package]] +name = "geographiclib-rs" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5a7f08910fd98737a6eda7568e7c5e645093e073328eeef49758cfe8b0489c7" +dependencies = [ + "libm", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.11.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" +dependencies = [ + "log", + "mac", + "markup5ever 0.14.1", + "match_token", +] + +[[package]] +name = "html5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" +dependencies = [ + "log", + "markup5ever 0.38.0", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "i_float" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "813145bb0ad5b60f55cbbf3c74cdceda1c0a9d253b35c4cc36ae0df7887cb78f" +dependencies = [ + "libm", +] + +[[package]] +name = "i_key_sort" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d73d122b937fca067feb0ad74f62388920272b27c356d4df2d0cfdd59e044cf0" +dependencies = [ + "rayon", +] + +[[package]] +name = "i_overlay" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934cba666ad1bf60436a190af6eaa3f58f57b5bad28268ce3fb45d9185862232" +dependencies = [ + "i_float", + "i_key_sort", + "i_shape", + "i_tree", + "rayon", +] + +[[package]] +name = "i_shape" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa9eac533d7509a8ab87672b60ac610c17240f9ea4851d26227689fdfe349c8" +dependencies = [ + "i_float", +] + +[[package]] +name = "i_tree" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4804bdc1dc124eb7e1aa9e144ecc04096bcf787a10a15fa44af682b51f0f6cce" + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.0", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.11.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "kml" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bc5b33f81c33cf4fde1581f3cd68244ce027023324266770d799345f9919611" +dependencies = [ + "geo-types", + "num-traits", + "quick-xml 0.37.5", + "thiserror 2.0.18", + "zip", +] + +[[package]] +name = "kml_map_tool" +version = "0.1.0" +dependencies = [ + "anyhow", + "geo", + "kml", + "reqwest 0.12.28", + "serde", + "serde_json", + "sqlx", + "tauri", + "tauri-build", + "tauri-plugin-dialog", + "tauri-plugin-opener", + "tokio", +] + +[[package]] +name = "kuchikiki" +version = "0.8.8-speedreader" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" +dependencies = [ + "cssparser 0.29.6", + "html5ever 0.29.1", + "indexmap 2.14.0", + "selectors 0.24.0", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "markup5ever" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" +dependencies = [ + "log", + "phf 0.11.3", + "phf_codegen 0.11.3", + "string_cache 0.8.9", + "string_cache_codegen 0.5.4", + "tendril 0.4.3", +] + +[[package]] +name = "markup5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" +dependencies = [ + "log", + "tendril 0.5.0", + "web_atoms", +] + +[[package]] +name = "match_token" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9fec5a4e89860383d778d10563a605838f8f0b2f9303868937e5ff32e86177" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.18", + "windows-sys 0.60.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.11.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "num-conv" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.11.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.11.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.11.1", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.11.1", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.11.1", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.11.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.11.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.11.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "open" +version = "5.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3bab717c29a857abf75fcef718d441ec7cb2725f937343c734740a985d37fd" +dependencies = [ + "dunce", + "is-wsl", + "libc", + "pathdiff", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_shared 0.8.0", +] + +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_macros 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.6", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared 0.11.3", + "rand 0.8.6", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.2", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher 1.0.2", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "plist" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" +dependencies = [ + "base64 0.22.1", + "indexmap 2.14.0", + "quick-xml 0.38.4", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.11+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + +[[package]] +name = "quick-xml" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.4", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg 0.2.1", +] + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.11.1", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.18", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "reqwest" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rfd" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" +dependencies = [ + "block2", + "dispatch2", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "log", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "robust" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e27ee8bb91ca0adcf0ecb116293afa12d393f9c2b9b9cd54d33e8078fe19839" + +[[package]] +name = "rstar" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" +dependencies = [ + "heapless", + "num-traits", + "smallvec", +] + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.11.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.117", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +dependencies = [ + "bitflags 1.3.2", + "cssparser 0.29.6", + "derive_more 0.99.20", + "fxhash", + "log", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc 0.2.0", + "smallvec", +] + +[[package]] +name = "selectors" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +dependencies = [ + "bitflags 2.11.1", + "cssparser 0.36.0", + "derive_more 2.1.1", + "log", + "new_debug_unreachable", + "phf 0.13.1", + "phf_codegen 0.13.1", + "precomputed-hash", + "rustc-hash", + "servo_arc 0.4.3", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "servo_arc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sif-itree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7f45b8998ced5134fb1d75732c77842a3e888f19c1ff98481822e8fbfbf930b" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "spade" +version = "2.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9699399fd9349b00b184f5635b074f9ec93afffef30c853f8c875b32c0f8c7fa" +dependencies = [ + "hashbrown 0.16.1", + "num-traits", + "robust", + "smallvec", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64 0.22.1", + "bytes", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap 2.14.0", + "log", + "memchr", + "once_cell", + "percent-encoding", + "serde", + "sha2", + "smallvec", + "thiserror 2.0.18", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.117", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck 0.5.0", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-sqlite", + "syn 2.0.117", + "tokio", + "url", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror 2.0.18", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.11.3", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.13.1", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.34.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9103edf55f2da3c82aea4c7fab7c4241032bfeea0e71fa557d98e00e7ce7cc20" +dependencies = [ + "bitflags 2.11.1", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "parking_lot", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da77cc00fb9028caf5b5d4650f75e31f1ef3693459dfca7f7e506d1ecef0ba2d" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "http-range", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest 0.13.2", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.18", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bbc990d1dbf57a8e1c7fa2327f2a614d8b757805603c1b9ba5c81bade09fd4d" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "toml 0.9.12+spec-1.1.0", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a24476afd977c5d5d169f72425868613d82747916dd29e0a357c84c4bd6d29" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.117", + "tauri-utils", + "thiserror 2.0.18", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39b349a98dadaffebb73f0a40dcd1f23c999211e5a2e744403db384d0c33de7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddde7d51c907b940fb573006cdda9a642d6a7c8153657e88f8a5c3c9290cd4aa" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "toml 0.9.12+spec-1.1.0", + "walkdir", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1fa4150c95ae391946cc8b8f905ab14797427caba3a8a2f79628e956da91809" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror 2.0.18", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36e1ec28b79f3d0683f4507e1615c36292c0ea6716668770d4396b9b39871ed8" +dependencies = [ + "anyhow", + "dunce", + "glob", + "log", + "objc2-foundation", + "percent-encoding", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "tauri-utils", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", + "url", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc624469b06f59f5a29f874bbc61a2ed737c0f9c23ef09855a292c389c42e83f" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.18", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2826d79a3297ed08cd6ea7f412644ef58e32969504bc4fbd8d7dbeabc4445ea2" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.18", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11ea2e6f801d275fdd890d6c9603736012742a1c33b96d0db788c9cdebf7f9e" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219a1f983a2af3653f75b5747f76733b0da7ff03069c7a41901a5eb3ace4557d" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dunce", + "glob", + "html5ever 0.29.1", + "http", + "infer", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.3", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1087b111fe2b005e42dbdc1990fc18593234238d47453b0c99b7de1c9ab2c1e0" +dependencies = [ + "dunce", + "embed-resource", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "tendril" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4790fc369d5a530f4b544b094e31388b9b3a37c0f4652ade4505945f5660d24" +dependencies = [ + "new_debug_unreachable", + "utf-8", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.52.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.2", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.11+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.2", +] + +[[package]] +name = "toml_parser" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +dependencies = [ + "winnow 1.0.2", +] + +[[package]] +name = "toml_writer" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags 2.11.1", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.18", + "windows-sys 0.60.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +dependencies = [ + "getrandom 0.4.2", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.117", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.14.0", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.15.5", + "indexmap 2.14.0", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7cff6eef815df1834fd250e3a2ff436044d82a9f1bc1980ca1dbdf07effc538" +dependencies = [ + "phf 0.13.1", + "phf_codegen 0.13.1", + "string_cache 0.9.0", + "string_cache_codegen 0.6.1", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-roots" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.18", + "windows", + "windows-core 0.61.2", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap 2.14.0", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "indexmap 2.14.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.14.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wry" +version = "0.54.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a8135d8676225e5744de000d4dff5a082501bf7db6a1c1495034f8c314edbc" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.18", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 0.7.15", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" +dependencies = [ + "serde", + "winnow 0.7.15", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zerofrom" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "zip" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +dependencies = [ + "arbitrary", + "bzip2", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap 2.14.0", + "memchr", + "thiserror 2.0.18", + "time", + "zopfli", + "zstd", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "zvariant" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 0.7.15", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.117", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.117", + "winnow 0.7.15", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml new file mode 100644 index 0000000..8bdceda --- /dev/null +++ b/src-tauri/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "kml_map_tool" +version = "0.1.0" +description = "A Tauri App" +authors = ["you"] +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +# The `_lib` suffix may seem redundant but it is necessary +# to make the lib name unique and wouldn't conflict with the bin name. +# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 +name = "kml_map_tool_lib" +crate-type = ["staticlib", "cdylib", "rlib"] + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +tauri = { version = "2", features = ["protocol-asset"] } +tauri-plugin-opener = "2" +tauri-plugin-dialog = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite", "macros"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "fs"] } +anyhow = "1" +kml = "0.13" +geo = "0.33" +reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json"] } + diff --git a/src-tauri/build.rs b/src-tauri/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json new file mode 100644 index 0000000..778bfb5 --- /dev/null +++ b/src-tauri/capabilities/default.json @@ -0,0 +1,11 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": [ + "core:default", + "opener:default", + "dialog:default" + ] +} diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png new file mode 100644 index 0000000..6be5e50 Binary files /dev/null and b/src-tauri/icons/128x128.png differ diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png new file mode 100644 index 0000000..e81bece Binary files /dev/null and b/src-tauri/icons/128x128@2x.png differ diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png new file mode 100644 index 0000000..a437dd5 Binary files /dev/null and b/src-tauri/icons/32x32.png differ diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png new file mode 100644 index 0000000..0ca4f27 Binary files /dev/null and b/src-tauri/icons/Square107x107Logo.png differ diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png new file mode 100644 index 0000000..b81f820 Binary files /dev/null and b/src-tauri/icons/Square142x142Logo.png differ diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png new file mode 100644 index 0000000..624c7bf Binary files /dev/null and b/src-tauri/icons/Square150x150Logo.png differ diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png new file mode 100644 index 0000000..c021d2b Binary files /dev/null and b/src-tauri/icons/Square284x284Logo.png differ diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png new file mode 100644 index 0000000..6219700 Binary files /dev/null and b/src-tauri/icons/Square30x30Logo.png differ diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png new file mode 100644 index 0000000..f9bc048 Binary files /dev/null and b/src-tauri/icons/Square310x310Logo.png differ diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png new file mode 100644 index 0000000..d5fbfb2 Binary files /dev/null and b/src-tauri/icons/Square44x44Logo.png differ diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png new file mode 100644 index 0000000..63440d7 Binary files /dev/null and b/src-tauri/icons/Square71x71Logo.png differ diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png new file mode 100644 index 0000000..f3f705a Binary files /dev/null and b/src-tauri/icons/Square89x89Logo.png differ diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png new file mode 100644 index 0000000..4556388 Binary files /dev/null and b/src-tauri/icons/StoreLogo.png differ diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns new file mode 100644 index 0000000..12a5bce Binary files /dev/null and b/src-tauri/icons/icon.icns differ diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico new file mode 100644 index 0000000..b3636e4 Binary files /dev/null and b/src-tauri/icons/icon.ico differ diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png new file mode 100644 index 0000000..e1cd261 Binary files /dev/null and b/src-tauri/icons/icon.png differ diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs new file mode 100644 index 0000000..5981ba2 --- /dev/null +++ b/src-tauri/src/commands.rs @@ -0,0 +1,4343 @@ +use crate::scope; +use geo::algorithm::Distance; +use geo::{ClosestPoint, Closest, Coord, Geodesic, LineString, Point}; +use serde::{Deserialize, Serialize}; +use sqlx::SqlitePool; +use std::path::Path; +use tauri::State; + +pub struct AppState { + pub pool: SqlitePool, +} + +#[derive(Debug, Deserialize)] +struct FixedAssetInput { + row_id: String, + asset_name: String, + video_name: String, + coord: CoordValue, + image_path: Option, + #[serde(default)] + deleted: bool, + #[serde(default)] + side: Option, +} + +#[derive(Debug, Deserialize)] +#[serde(untagged)] +enum CoordValue { + Floats([f64; 2]), + Strings([String; 2]), +} + +impl CoordValue { + fn to_lat_lng(&self) -> Result<(f64, f64), String> { + match self { + CoordValue::Floats([lat, lng]) => Ok((*lat, *lng)), + CoordValue::Strings([lat, lng]) => { + let lat: f64 = lat.parse().map_err(|_| "invalid lat string".to_string())?; + let lng: f64 = lng.parse().map_err(|_| "invalid lng string".to_string())?; + Ok((lat, lng)) + } + } + } +} + +#[derive(Debug, Deserialize)] +#[serde(untagged)] +enum NumOrStr { + Num(f64), + Str(String), +} + +impl NumOrStr { + fn to_f64(&self) -> Result { + match self { + NumOrStr::Num(v) => Ok(*v), + NumOrStr::Str(s) => s + .parse::() + .map_err(|_| format!("invalid float: {}", s)), + } + } +} + +#[derive(Debug, Deserialize)] +struct RangeAssetInput { + row_id: String, + asset_name: String, + video_name: String, + coord_lat: NumOrStr, + coord_lng: NumOrStr, + start_coord_lat: NumOrStr, + start_coord_lng: NumOrStr, + end_coord_lat: NumOrStr, + end_coord_lng: NumOrStr, + image_path1: Option, + image_path2: Option, + image_path3: Option, + #[serde(default)] + deleted: bool, + #[serde(default)] + side: Option, +} + +use std::sync::{OnceLock, RwLock}; +static CURRENT_USER: OnceLock> = OnceLock::new(); +fn user_id() -> String { + CURRENT_USER + .get_or_init(|| RwLock::new("default".to_string())) + .read() + .unwrap() + .clone() +} + +#[derive(Debug, Serialize, sqlx::FromRow)] +pub struct User { + pub id: i64, + pub username: String, + pub display_name: String, + pub created_at: String, +} + +#[tauri::command] +pub async fn list_users(state: State<'_, AppState>) -> Result, String> { + sqlx::query_as::<_, User>( + "SELECT id, username, display_name, created_at FROM users ORDER BY username", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string()) +} + +#[tauri::command] +pub async fn create_user( + username: String, + display_name: String, + state: State<'_, AppState>, +) -> Result { + let row: (i64,) = sqlx::query_as( + "INSERT INTO users (username, display_name) VALUES (?, ?) RETURNING id", + ) + .bind(username.trim()) + .bind(display_name.trim()) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(row.0) +} + +#[tauri::command] +pub async fn delete_user(id: i64, state: State<'_, AppState>) -> Result<(), String> { + sqlx::query("DELETE FROM users WHERE id = ?") + .bind(id) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub fn set_current_user(username: String) -> Result<(), String> { + let lock = CURRENT_USER.get_or_init(|| RwLock::new("default".to_string())); + *lock.write().unwrap() = username; + Ok(()) +} + +#[derive(Debug, Serialize, sqlx::FromRow)] +pub struct AuditRow { + pub id: i64, + pub action_type: String, + pub scope: String, + pub asset_ids: String, + pub user_id: String, + pub before: Option, + pub after: Option, + pub ts: String, + pub undone: i64, +} + +#[derive(Debug, Deserialize, Serialize)] +struct MoveAfter { + vertex: String, + lat: f64, + lng: f64, +} + +#[derive(Debug, Serialize, Deserialize, sqlx::FromRow)] +pub struct Asset { + pub id: i64, + pub row_id: String, + pub asset_type: String, + pub asset_name: String, + pub video_name: String, + pub lat: Option, + pub lng: Option, + pub start_lat: Option, + pub start_lng: Option, + pub end_lat: Option, + pub end_lng: Option, + pub image_path: Option, + pub image_path1: Option, + pub image_path2: Option, + pub image_path3: Option, + pub deleted: i64, + pub modified: i64, + pub merged_into: Option, + pub in_scope: Option, + pub side: Option, + pub link_pair_id: Option, + pub link_locked: Option, +} + +fn normalize_side(s: &str) -> Option { + match s.trim().to_uppercase().as_str() { + "LHS" | "LEFT" | "L" => Some("Left".to_string()), + "RHS" | "RIGHT" | "R" => Some("Right".to_string()), + _ => None, + } +} + +fn detect_side(paths: &[Option<&str>]) -> Option { + for p in paths.iter().flatten() { + if p.contains("/LHS/") || p.contains("_LHS_") || p.contains("/Left/") { + return Some("Left".into()); + } + if p.contains("/RHS/") || p.contains("_RHS_") || p.contains("/Right/") { + return Some("Right".into()); + } + } + None +} + +#[tauri::command] +pub async fn import_fixed_assets( + path: String, + state: State<'_, AppState>, +) -> Result { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + let parsed: Vec = + serde_json::from_slice(&bytes).map_err(|e| e.to_string())?; + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut count = 0usize; + for input in parsed { + let (lat, lng) = input.coord.to_lat_lng()?; + let side = input + .side + .as_deref() + .and_then(normalize_side) + .or_else(|| detect_side(&[input.image_path.as_deref()])); + sqlx::query( + r#" + INSERT INTO assets ( + row_id, asset_type, asset_name, video_name, + lat, lng, min_lat, max_lat, min_lng, max_lng, + image_path, deleted, side + ) VALUES (?, 'fixed', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + ON CONFLICT(row_id) DO UPDATE SET + asset_name = excluded.asset_name, + video_name = excluded.video_name, + -- Preserve user edits: only re-stamp geometry when the row was + -- never modified by hand. modified=0 means no manual move/snap. + lat = CASE WHEN assets.modified = 0 THEN excluded.lat ELSE assets.lat END, + lng = CASE WHEN assets.modified = 0 THEN excluded.lng ELSE assets.lng END, + min_lat = CASE WHEN assets.modified = 0 THEN excluded.min_lat ELSE assets.min_lat END, + max_lat = CASE WHEN assets.modified = 0 THEN excluded.max_lat ELSE assets.max_lat END, + min_lng = CASE WHEN assets.modified = 0 THEN excluded.min_lng ELSE assets.min_lng END, + max_lng = CASE WHEN assets.modified = 0 THEN excluded.max_lng ELSE assets.max_lng END, + image_path = excluded.image_path, + -- Re-import never resurrects rows the user explicitly deleted. + deleted = CASE WHEN assets.deleted = 1 THEN 1 ELSE excluded.deleted END, + side = excluded.side + "#, + ) + .bind(&input.row_id) + .bind(&input.asset_name) + .bind(&input.video_name) + .bind(lat) + .bind(lng) + .bind(lat) + .bind(lat) + .bind(lng) + .bind(lng) + .bind(&input.image_path) + .bind(input.deleted as i64) + .bind(&side) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + count += 1; + } + tx.commit().await.map_err(|e| e.to_string())?; + // Capture original position once, never overwrite (preserves source-of-truth + // through subsequent edits and re-imports). + sqlx::query( + "UPDATE assets + SET orig_lat = COALESCE(orig_lat, lat), + orig_lng = COALESCE(orig_lng, lng) + WHERE asset_type = 'fixed'", + ) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(count) +} + +#[tauri::command] +pub async fn import_range_assets( + path: String, + state: State<'_, AppState>, +) -> Result { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + let parsed: Vec = + serde_json::from_slice(&bytes).map_err(|e| e.to_string())?; + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut count = 0usize; + for input in parsed { + let mid_lat = input.coord_lat.to_f64()?; + let mid_lng = input.coord_lng.to_f64()?; + let s_lat = input.start_coord_lat.to_f64()?; + let s_lng = input.start_coord_lng.to_f64()?; + let e_lat = input.end_coord_lat.to_f64()?; + let e_lng = input.end_coord_lng.to_f64()?; + let min_lat = mid_lat.min(s_lat).min(e_lat); + let max_lat = mid_lat.max(s_lat).max(e_lat); + let min_lng = mid_lng.min(s_lng).min(e_lng); + let max_lng = mid_lng.max(s_lng).max(e_lng); + let side = input + .side + .as_deref() + .and_then(normalize_side) + .or_else(|| { + detect_side(&[ + input.image_path1.as_deref(), + input.image_path2.as_deref(), + input.image_path3.as_deref(), + ]) + }); + + sqlx::query( + r#" + INSERT INTO assets ( + row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + min_lat, max_lat, min_lng, max_lng, + image_path1, image_path2, image_path3, deleted, side + ) VALUES (?, 'range', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + ON CONFLICT(row_id) DO UPDATE SET + asset_type = excluded.asset_type, + asset_name = excluded.asset_name, + video_name = excluded.video_name, + -- Preserve user edits: re-stamp geometry only when modified=0. + lat = CASE WHEN assets.modified = 0 THEN excluded.lat ELSE assets.lat END, + lng = CASE WHEN assets.modified = 0 THEN excluded.lng ELSE assets.lng END, + start_lat = CASE WHEN assets.modified = 0 THEN excluded.start_lat ELSE assets.start_lat END, + start_lng = CASE WHEN assets.modified = 0 THEN excluded.start_lng ELSE assets.start_lng END, + end_lat = CASE WHEN assets.modified = 0 THEN excluded.end_lat ELSE assets.end_lat END, + end_lng = CASE WHEN assets.modified = 0 THEN excluded.end_lng ELSE assets.end_lng END, + min_lat = CASE WHEN assets.modified = 0 THEN excluded.min_lat ELSE assets.min_lat END, + max_lat = CASE WHEN assets.modified = 0 THEN excluded.max_lat ELSE assets.max_lat END, + min_lng = CASE WHEN assets.modified = 0 THEN excluded.min_lng ELSE assets.min_lng END, + max_lng = CASE WHEN assets.modified = 0 THEN excluded.max_lng ELSE assets.max_lng END, + image_path1 = excluded.image_path1, + image_path2 = excluded.image_path2, + image_path3 = excluded.image_path3, + deleted = CASE WHEN assets.deleted = 1 THEN 1 ELSE excluded.deleted END, + side = excluded.side + "#, + ) + .bind(&input.row_id) + .bind(&input.asset_name) + .bind(&input.video_name) + .bind(mid_lat) + .bind(mid_lng) + .bind(s_lat) + .bind(s_lng) + .bind(e_lat) + .bind(e_lng) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(&input.image_path1) + .bind(&input.image_path2) + .bind(&input.image_path3) + .bind(input.deleted as i64) + .bind(&side) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + count += 1; + } + tx.commit().await.map_err(|e| e.to_string())?; + sqlx::query( + "UPDATE assets + SET orig_lat = COALESCE(orig_lat, lat), + orig_lng = COALESCE(orig_lng, lng), + orig_start_lat = COALESCE(orig_start_lat, start_lat), + orig_start_lng = COALESCE(orig_start_lng, start_lng), + orig_end_lat = COALESCE(orig_end_lat, end_lat), + orig_end_lng = COALESCE(orig_end_lng, end_lng) + WHERE asset_type = 'range'", + ) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(count) +} + +async fn apply_scope_after_change(pool: &SqlitePool) -> Result<(), String> { + let geoms = scope::load_geoms(pool).await.map_err(|e| e.to_string())?; + if geoms.is_empty() { + return Ok(()); + } + scope::apply_scope_to_assets(pool, &geoms) + .await + .map(|_| ()) + .map_err(|e| e.to_string()) +} + +#[derive(Debug, Serialize)] +pub struct ScopePolygonOut { + pub id: i64, + pub name: Option, + pub geojson: String, + pub geom_type: String, +} + +#[tauri::command] +pub async fn import_kml_scope( + path: String, + state: State<'_, AppState>, +) -> Result { + let parsed = scope::parse_kml(Path::new(&path)) + .await + .map_err(|e| e.to_string())?; + scope::replace_scope(&state.pool, &parsed) + .await + .map_err(|e| e.to_string())?; + let geoms: Vec<_> = parsed.iter().map(|p| p.geom.clone()).collect(); + scope::apply_scope_to_assets(&state.pool, &geoms) + .await + .map_err(|e| e.to_string())?; + Ok(parsed.len()) +} + +#[tauri::command] +pub async fn get_scope_polygons( + state: State<'_, AppState>, +) -> Result, String> { + let rows: Vec<(i64, Option, String, String)> = + sqlx::query_as("SELECT id, name, geojson, geom_type FROM scope_polygons") + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(rows + .into_iter() + .map(|(id, name, geojson, geom_type)| ScopePolygonOut { + id, + name, + geojson, + geom_type, + }) + .collect()) +} + +#[tauri::command] +pub async fn update_asset_position( + id: i64, + vertex: String, + lat: f64, + lng: f64, + state: State<'_, AppState>, +) -> Result<(), String> { + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + + let row = sqlx::query_as::<_, Asset>( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(id) + .fetch_one(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let before_json = serde_json::to_string(&row).map_err(|e| e.to_string())?; + + let (new_lat, new_lng, new_slat, new_slng, new_elat, new_elng) = match vertex.as_str() { + "fixed" | "mid" => ( + Some(lat), + Some(lng), + row.start_lat, + row.start_lng, + row.end_lat, + row.end_lng, + ), + "start" => ( + row.lat, + row.lng, + Some(lat), + Some(lng), + row.end_lat, + row.end_lng, + ), + "end" => ( + row.lat, + row.lng, + row.start_lat, + row.start_lng, + Some(lat), + Some(lng), + ), + other => return Err(format!("invalid vertex: {}", other)), + }; + + let lats: Vec = [new_lat, new_slat, new_elat].into_iter().flatten().collect(); + let lngs: Vec = [new_lng, new_slng, new_elng].into_iter().flatten().collect(); + let min_lat = lats.iter().cloned().fold(f64::INFINITY, f64::min); + let max_lat = lats.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + let min_lng = lngs.iter().cloned().fold(f64::INFINITY, f64::min); + let max_lng = lngs.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, + min_lng = ?, max_lng = ?, + modified = 1, + modified_by = ?, + modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_lat) + .bind(new_lng) + .bind(new_slat) + .bind(new_slng) + .bind(new_elat) + .bind(new_elng) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let after_json = serde_json::to_string(&MoveAfter { + vertex: vertex.clone(), + lat, + lng, + }) + .map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('move', 'single', ?, ?, ?, ?, datetime('now'))", + ) + .bind(format!("[{}]", id)) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(()) +} + +#[derive(Debug, serde::Deserialize)] +pub struct TranslateCorrection { + pub id: i64, + pub dlat: f64, + pub dlng: f64, +} + +#[tauri::command] +pub async fn bulk_translate( + corrections: Vec, + state: State<'_, AppState>, +) -> Result { + if corrections.is_empty() { + return Ok(0); + } + let ids: Vec = corrections.iter().map(|c| c.id).collect(); + // SQLite caps bind params at 999; chunk the prefetch SELECT. + let mut rows: Vec = Vec::with_capacity(ids.len()); + for chunk in ids.chunks(500) { + let placeholders = chunk.iter().map(|_| "?").collect::>().join(","); + let sql = format!( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query_as::<_, Asset>(&sql); + for id in chunk { + q = q.bind(id); + } + let part: Vec = q + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + rows.extend(part); + } + use std::collections::HashMap; + let by_id: HashMap = rows.iter().map(|a| (a.id, a)).collect(); + + let mut before_map = serde_json::Map::new(); + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut changed = 0usize; + for c in &corrections { + let Some(row) = by_id.get(&c.id) else { continue }; + before_map.insert( + c.id.to_string(), + serde_json::json!({ + "lat": row.lat, + "lng": row.lng, + "start_lat": row.start_lat, + "start_lng": row.start_lng, + "end_lat": row.end_lat, + "end_lng": row.end_lng, + "modified": row.modified, + }), + ); + let new_lat = row.lat.map(|v| v + c.dlat); + let new_lng = row.lng.map(|v| v + c.dlng); + let new_slat = row.start_lat.map(|v| v + c.dlat); + let new_slng = row.start_lng.map(|v| v + c.dlng); + let new_elat = row.end_lat.map(|v| v + c.dlat); + let new_elng = row.end_lng.map(|v| v + c.dlng); + let lats: Vec = [new_lat, new_slat, new_elat] + .into_iter() + .flatten() + .collect(); + let lngs: Vec = [new_lng, new_slng, new_elng] + .into_iter() + .flatten() + .collect(); + if lats.is_empty() || lngs.is_empty() { + continue; + } + let mn_lat = lats.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lat = lats.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + let mn_lng = lngs.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lng = lngs.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_lat) + .bind(new_lng) + .bind(new_slat) + .bind(new_slng) + .bind(new_elat) + .bind(new_elng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(user_id()) + .bind(c.id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + changed += 1; + } + if changed == 0 { + return Ok(0); + } + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, ts) + VALUES ('bulk_translate', 'bulk', ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(serde_json::to_string(&before_map).map_err(|e| e.to_string())?) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(changed) +} + +#[tauri::command] +pub async fn reset_assets_to_original( + ids: Vec, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + // SQLite caps bind params at 999; chunk both SELECTs. + let mut rows: Vec = Vec::with_capacity(ids.len()); + for chunk in ids.chunks(500) { + let placeholders = chunk.iter().map(|_| "?").collect::>().join(","); + let select_sql = format!( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query_as::<_, Asset>(&select_sql); + for id in chunk { + q = q.bind(id); + } + let part: Vec = q + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + rows.extend(part); + } + + // Snapshot before & fetch originals (chunked the same way). + type OrigRow = ( + i64, + Option, + Option, + Option, + Option, + Option, + Option, + String, + ); + let mut origs: Vec = Vec::with_capacity(ids.len()); + for chunk in ids.chunks(500) { + let placeholders = chunk.iter().map(|_| "?").collect::>().join(","); + let orig_sql = format!( + "SELECT id, orig_lat, orig_lng, orig_start_lat, orig_start_lng, + orig_end_lat, orig_end_lng, asset_type + FROM assets WHERE id IN ({})", + placeholders + ); + let mut oq = sqlx::query_as::<_, OrigRow>(&orig_sql); + for id in chunk { + oq = oq.bind(id); + } + let part = oq + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + origs.extend(part); + } + use std::collections::HashMap; + let orig_map: HashMap, Option, Option, Option, Option, Option, String)> = + origs + .into_iter() + .map(|(id, a, b, c, d, e, f, t)| (id, (a, b, c, d, e, f, t))) + .collect(); + + let mut before_map = serde_json::Map::new(); + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut changed = 0usize; + for row in &rows { + let Some(o) = orig_map.get(&row.id) else { continue }; + // No original recorded (asset created before this column existed): skip. + let has_orig = o.0.is_some() + || o.2.is_some() + || o.4.is_some(); + if !has_orig { + continue; + } + let (new_lat, new_lng, new_slat, new_slng, new_elat, new_elng) = if o.6 == "range" { + (o.0, o.1, o.2, o.3, o.4, o.5) + } else { + (o.0, o.1, None, None, None, None) + }; + + before_map.insert( + row.id.to_string(), + serde_json::json!({ + "lat": row.lat, + "lng": row.lng, + "start_lat": row.start_lat, + "start_lng": row.start_lng, + "end_lat": row.end_lat, + "end_lng": row.end_lng, + "modified": row.modified, + }), + ); + + let lats: Vec = [new_lat, new_slat, new_elat] + .into_iter() + .flatten() + .collect(); + let lngs: Vec = [new_lng, new_slng, new_elng] + .into_iter() + .flatten() + .collect(); + if lats.is_empty() || lngs.is_empty() { + continue; + } + let mn_lat = lats.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lat = lats.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + let mn_lng = lngs.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lng = lngs.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, + min_lng = ?, max_lng = ?, + modified = 0, + modified_by = ?, + modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_lat) + .bind(new_lng) + .bind(new_slat) + .bind(new_slng) + .bind(new_elat) + .bind(new_elng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(user_id()) + .bind(row.id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + changed += 1; + } + if changed == 0 { + return Ok(0); + } + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, ts) + VALUES ('reset_position', 'bulk', ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(serde_json::to_string(&before_map).map_err(|e| e.to_string())?) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(changed) +} + +#[tauri::command] +pub async fn delete_asset(id: i64, state: State<'_, AppState>) -> Result<(), String> { + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let res = sqlx::query("UPDATE assets SET deleted = 1, modified = 1, modified_by = ?, modified_at = datetime('now') WHERE id = ? AND deleted = 0") + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + if res.rows_affected() == 0 { + return Err("asset not found or already deleted".to_string()); + } + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, ts) + VALUES ('delete', 'single', ?, ?, datetime('now'))", + ) + .bind(format!("[{}]", id)) + .bind(user_id()) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn delete_assets_by_video( + video_name: String, + state: State<'_, AppState>, +) -> Result { + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let ids: Vec<(i64,)> = sqlx::query_as( + "SELECT id FROM assets WHERE video_name = ? AND deleted = 0", + ) + .bind(&video_name) + .fetch_all(&mut *tx) + .await + .map_err(|e| e.to_string())?; + if ids.is_empty() { + return Ok(0); + } + let id_list: Vec = ids.iter().map(|(i,)| *i).collect(); + sqlx::query("UPDATE assets SET deleted = 1, modified = 1, modified_by = ?, modified_at = datetime('now') WHERE video_name = ? AND deleted = 0") + .bind(user_id()) + .bind(&video_name) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + let ids_json = serde_json::to_string(&id_list).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, ts) + VALUES ('delete_by_video', 'video', ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&video_name) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(id_list.len()) +} + +#[tauri::command] +pub async fn merge_polylines( + primary_id: i64, + secondary_id: i64, + state: State<'_, AppState>, +) -> Result<(), String> { + if primary_id == secondary_id { + return Err("primary and secondary must differ".to_string()); + } + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let primary: Asset = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(primary_id) + .fetch_one(&mut *tx) + .await + .map_err(|e| e.to_string())?; + let secondary: Asset = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(secondary_id) + .fetch_one(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + if primary.asset_type != "range" || secondary.asset_type != "range" { + return Err("both assets must be range".to_string()); + } + if secondary.merged_into.is_some() { + return Err("secondary is already merged".to_string()); + } + if secondary.deleted == 1 { + return Err("secondary is deleted".to_string()); + } + + // Snapshot primary BEFORE we modify its geometry — needed to undo a merge. + let primary_before = serde_json::to_string(&primary).map_err(|e| e.to_string())?; + + // Combine geometry: pick the closest pair of endpoints (one from each polyline) + // as the "join" — the OTHER two endpoints become the new outer start/end. + let p_start = ( + primary.start_lat.ok_or("primary has no start_lat")?, + primary.start_lng.ok_or("primary has no start_lng")?, + ); + let p_end = ( + primary.end_lat.ok_or("primary has no end_lat")?, + primary.end_lng.ok_or("primary has no end_lng")?, + ); + let s_start = ( + secondary.start_lat.ok_or("secondary has no start_lat")?, + secondary.start_lng.ok_or("secondary has no start_lng")?, + ); + let s_end = ( + secondary.end_lat.ok_or("secondary has no end_lat")?, + secondary.end_lng.ok_or("secondary has no end_lng")?, + ); + let dist = |a: (f64, f64), b: (f64, f64)| { + Geodesic.distance(Point::new(a.1, a.0), Point::new(b.1, b.0)) + }; + let d_ss = dist(p_start, s_start); + let d_se = dist(p_start, s_end); + let d_es = dist(p_end, s_start); + let d_ee = dist(p_end, s_end); + let min_d = d_ss.min(d_se).min(d_es).min(d_ee); + let (new_start, new_end) = if (min_d - d_ss).abs() < 1e-9 { + (p_end, s_end) + } else if (min_d - d_se).abs() < 1e-9 { + (p_end, s_start) + } else if (min_d - d_es).abs() < 1e-9 { + (p_start, s_end) + } else { + (p_start, s_start) + }; + let new_mid = ( + (new_start.0 + new_end.0) / 2.0, + (new_start.1 + new_end.1) / 2.0, + ); + let mn_lat = new_start.0.min(new_mid.0).min(new_end.0); + let mx_lat = new_start.0.max(new_mid.0).max(new_end.0); + let mn_lng = new_start.1.min(new_mid.1).min(new_end.1); + let mx_lng = new_start.1.max(new_mid.1).max(new_end.1); + + // 1) extend primary to combined geometry + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_mid.0) + .bind(new_mid.1) + .bind(new_start.0) + .bind(new_start.1) + .bind(new_end.0) + .bind(new_end.1) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(user_id()) + .bind(primary_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + // 2) hide secondary, link to primary + sqlx::query( + "UPDATE assets SET + merged_into = ?, + deleted = 1, + modified = 1, + modified_by = ?, + modified_at = datetime('now') + WHERE id = ?", + ) + .bind(primary_id) + .bind(user_id()) + .bind(secondary_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let ids_json = + serde_json::to_string(&[primary_id, secondary_id]).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, ts) + VALUES ('merge', 'merge', ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&primary_before) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + tx.commit().await.map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn undo_action(action_id: i64, state: State<'_, AppState>) -> Result<(), String> { + let row: AuditRow = + sqlx::query_as("SELECT id, action_type, scope, asset_ids, user_id, before, after, ts, undone FROM action_history WHERE id = ?") + .bind(action_id) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + if row.undone == 1 { + return Err("action already undone".to_string()); + } + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + match row.action_type.as_str() { + "move" => { + let snap: Asset = serde_json::from_str( + row.before.as_deref().unwrap_or("{}"), + ) + .map_err(|e| e.to_string())?; + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, + min_lng = ?, max_lng = ?, + modified = ?, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(snap.lat) + .bind(snap.lng) + .bind(snap.start_lat) + .bind(snap.start_lng) + .bind(snap.end_lat) + .bind(snap.end_lng) + // Recompute bbox from snapshot + .bind(min_or_nan(&[snap.lat, snap.start_lat, snap.end_lat])) + .bind(max_or_nan(&[snap.lat, snap.start_lat, snap.end_lat])) + .bind(min_or_nan(&[snap.lng, snap.start_lng, snap.end_lng])) + .bind(max_or_nan(&[snap.lng, snap.start_lng, snap.end_lng])) + .bind(snap.modified) + .bind(user_id()) + .bind(snap.id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + "delete" | "delete_by_video" => { + let ids: Vec = serde_json::from_str(&row.asset_ids).map_err(|e| e.to_string())?; + for id in ids { + sqlx::query("UPDATE assets SET deleted = 0, modified = 1, modified_by = ?, modified_at = datetime('now') WHERE id = ?") + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "set_scope" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let in_scope = val.get("in_scope").and_then(|v| v.as_i64()); + let manual = val.get("manual_scope").and_then(|v| v.as_i64()); + sqlx::query( + "UPDATE assets SET in_scope = ?, manual_scope = ? WHERE id = ?", + ) + .bind(in_scope) + .bind(manual) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "rename" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let prior = val + .get("asset_name") + .and_then(|v| v.as_str()) + .unwrap_or(""); + sqlx::query("UPDATE assets SET asset_name = ? WHERE id = ?") + .bind(prior) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "change_side" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let prior = + val.get("side").and_then(|v| v.as_str()).map(String::from); + sqlx::query("UPDATE assets SET side = ? WHERE id = ?") + .bind(&prior) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "link" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let pair = val.get("link_pair_id").and_then(|v| v.as_i64()); + let locked = val + .get("link_locked") + .and_then(|v| v.as_i64()) + .unwrap_or(0); + sqlx::query( + "UPDATE assets SET link_pair_id = ?, link_locked = ? WHERE id = ?", + ) + .bind(pair) + .bind(locked) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "bulk_translate" => { + // Same shape as reset_position: before_map keyed by id with + // pre-edit lat/lng/start/end. Restore each row. + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let lat = val.get("lat").and_then(|v| v.as_f64()); + let lng = val.get("lng").and_then(|v| v.as_f64()); + let slat = val.get("start_lat").and_then(|v| v.as_f64()); + let slng = val.get("start_lng").and_then(|v| v.as_f64()); + let elat = val.get("end_lat").and_then(|v| v.as_f64()); + let elng = val.get("end_lng").and_then(|v| v.as_f64()); + let modified = val.get("modified").and_then(|v| v.as_i64()).unwrap_or(0); + let lats: Vec = [lat, slat, elat].into_iter().flatten().collect(); + let lngs: Vec = [lng, slng, elng].into_iter().flatten().collect(); + if lats.is_empty() || lngs.is_empty() { + continue; + } + let mn_lat = lats.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lat = lats.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + let mn_lng = lngs.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lng = lngs.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = ?, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(lat) + .bind(lng) + .bind(slat) + .bind(slng) + .bind(elat) + .bind(elng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(modified) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "reset_position" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let lat = val.get("lat").and_then(|v| v.as_f64()); + let lng = val.get("lng").and_then(|v| v.as_f64()); + let slat = val.get("start_lat").and_then(|v| v.as_f64()); + let slng = val.get("start_lng").and_then(|v| v.as_f64()); + let elat = val.get("end_lat").and_then(|v| v.as_f64()); + let elng = val.get("end_lng").and_then(|v| v.as_f64()); + let modified = val.get("modified").and_then(|v| v.as_i64()).unwrap_or(0); + let lats: Vec = [lat, slat, elat].into_iter().flatten().collect(); + let lngs: Vec = [lng, slng, elng].into_iter().flatten().collect(); + if lats.is_empty() || lngs.is_empty() { + continue; + } + let mn_lat = lats.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lat = lats.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + let mn_lng = lngs.iter().cloned().fold(f64::INFINITY, f64::min); + let mx_lng = lngs.iter().cloned().fold(f64::NEG_INFINITY, f64::max); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = ?, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(lat) + .bind(lng) + .bind(slat) + .bind(slng) + .bind(elat) + .bind(elng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(modified) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "restore" => { + // Inverse of restore = re-delete. + let ids: Vec = serde_json::from_str(&row.asset_ids) + .map_err(|e| e.to_string())?; + for id in ids { + sqlx::query("UPDATE assets SET deleted = 1 WHERE id = ?") + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "merge" => { + // asset_ids = [primary_id, secondary_id]; before = full primary snapshot. + let ids: Vec = serde_json::from_str(&row.asset_ids).map_err(|e| e.to_string())?; + if ids.len() != 2 { + return Err("malformed merge audit row".to_string()); + } + let primary_id = ids[0]; + let secondary_id = ids[1]; + // Restore primary geometry from snapshot. + let snap: Asset = serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + let mn_lat = min_or_nan(&[snap.lat, snap.start_lat, snap.end_lat]); + let mx_lat = max_or_nan(&[snap.lat, snap.start_lat, snap.end_lat]); + let mn_lng = min_or_nan(&[snap.lng, snap.start_lng, snap.end_lng]); + let mx_lng = max_or_nan(&[snap.lng, snap.start_lng, snap.end_lng]); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = ?, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(snap.lat) + .bind(snap.lng) + .bind(snap.start_lat) + .bind(snap.start_lng) + .bind(snap.end_lat) + .bind(snap.end_lng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(snap.modified) + .bind(user_id()) + .bind(primary_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + // Restore secondary's flags. + sqlx::query( + "UPDATE assets SET merged_into = NULL, deleted = 0, modified = 1, + modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(user_id()) + .bind(secondary_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + "bulk_snap" => { + let before_map: serde_json::Map = + serde_json::from_str(row.before.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, snap_val) in before_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let snap: Asset = + serde_json::from_value(snap_val).map_err(|e| e.to_string())?; + let mn_lat = min_or_nan(&[snap.lat, snap.start_lat, snap.end_lat]); + let mx_lat = max_or_nan(&[snap.lat, snap.start_lat, snap.end_lat]); + let mn_lng = min_or_nan(&[snap.lng, snap.start_lng, snap.end_lng]); + let mx_lng = max_or_nan(&[snap.lng, snap.start_lng, snap.end_lng]); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = ?, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(snap.lat) + .bind(snap.lng) + .bind(snap.start_lat) + .bind(snap.start_lng) + .bind(snap.end_lat) + .bind(snap.end_lng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(snap.modified) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + other => return Err(format!("unknown action_type: {}", other)), + } + sqlx::query("UPDATE action_history SET undone = 1 WHERE id = ?") + .bind(action_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(()) +} + +fn min_or_nan(vals: &[Option]) -> f64 { + vals.iter() + .filter_map(|v| *v) + .fold(f64::INFINITY, f64::min) +} + +fn max_or_nan(vals: &[Option]) -> f64 { + vals.iter() + .filter_map(|v| *v) + .fold(f64::NEG_INFINITY, f64::max) +} + +#[derive(Debug, Deserialize)] +struct GeoJsonFeatureCollection { + features: Vec, +} + +#[derive(Debug, Deserialize)] +struct GeoJsonFeature { + geometry: serde_json::Value, + #[serde(default)] + properties: serde_json::Value, +} + +#[derive(Debug, Serialize)] +pub struct RoadOut { + pub id: i64, + pub name: Option, + pub geojson: String, +} + +async fn snapshot_scope_state( + pool: &SqlitePool, + ids: &[i64], +) -> Result, String> { + if ids.is_empty() { + return Ok(serde_json::Map::new()); + } + let placeholders = vec!["?"; ids.len()].join(","); + let sql = format!( + "SELECT id, in_scope, manual_scope FROM assets WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query_as::<_, (i64, Option, Option)>(&sql); + for id in ids { + q = q.bind(id); + } + let rows = q.fetch_all(pool).await.map_err(|e| e.to_string())?; + let mut m = serde_json::Map::new(); + for (id, in_scope, manual) in rows { + m.insert( + id.to_string(), + serde_json::json!({"in_scope": in_scope, "manual_scope": manual}), + ); + } + Ok(m) +} + +#[tauri::command] +pub async fn set_assets_in_scope( + ids: Vec, + in_scope: bool, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + let before = snapshot_scope_state(&state.pool, &ids).await?; + let placeholders = vec!["?"; ids.len()].join(","); + let sql = format!( + "UPDATE assets SET in_scope = ?, manual_scope = ?, modified_by = ?, \ + modified_at = datetime('now') WHERE id IN ({})", + placeholders + ); + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut q = sqlx::query(&sql) + .bind(in_scope as i64) + .bind(in_scope as i64) + .bind(user_id()); + for id in &ids { + q = q.bind(id); + } + let res = q.execute(&mut *tx).await.map_err(|e| e.to_string())?; + let after = snapshot_scope_state(&state.pool, &ids).await?; + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + let before_json = serde_json::to_string(&before).map_err(|e| e.to_string())?; + let after_json = serde_json::to_string(&after).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('set_scope', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[tauri::command] +pub async fn clear_manual_scope( + ids: Vec, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + let before = snapshot_scope_state(&state.pool, &ids).await?; + let placeholders = vec!["?"; ids.len()].join(","); + let sql = format!( + "UPDATE assets SET manual_scope = NULL WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query(&sql); + for id in &ids { + q = q.bind(id); + } + let res = q.execute(&state.pool).await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + let after = snapshot_scope_state(&state.pool, &ids).await?; + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + let before_json = serde_json::to_string(&before).map_err(|e| e.to_string())?; + let after_json = serde_json::to_string(&after).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('set_scope', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[tauri::command] +pub async fn set_assets_by_video_in_scope( + video_name: String, + in_scope: bool, + state: State<'_, AppState>, +) -> Result { + let rows: Vec<(i64,)> = sqlx::query_as( + "SELECT id FROM assets WHERE video_name = ? AND deleted = 0", + ) + .bind(&video_name) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + let ids: Vec = rows.into_iter().map(|(id,)| id).collect(); + set_assets_in_scope(ids, in_scope, state).await +} + +#[tauri::command] +pub async fn delete_assets_bulk( + ids: Vec, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + // SQLite caps bind params at 999; chunk into batches. + let mut assets: Vec = Vec::with_capacity(ids.len()); + for chunk in ids.chunks(500) { + let placeholders = chunk.iter().map(|_| "?").collect::>().join(","); + let before_sql = format!( + "SELECT id, row_id, asset_type, asset_name, video_name, lat, lng, \ + start_lat, start_lng, end_lat, end_lng, \ + image_path, image_path1, image_path2, image_path3, \ + deleted, modified, merged_into, in_scope, side, \ + link_pair_id, link_locked \ + FROM assets WHERE id IN ({}) AND deleted = 0", + placeholders + ); + let mut bq = sqlx::query_as::<_, Asset>(&before_sql); + for id in chunk { + bq = bq.bind(id); + } + let part = bq.fetch_all(&state.pool).await.map_err(|e| e.to_string())?; + assets.extend(part); + } + if assets.is_empty() { + return Ok(0); + } + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut total_affected: u64 = 0; + for chunk in ids.chunks(500) { + let placeholders = chunk.iter().map(|_| "?").collect::>().join(","); + let upd_sql = format!( + "UPDATE assets SET deleted = 1, modified = 1, modified_by = ?, \ + modified_at = datetime('now') WHERE id IN ({}) AND deleted = 0", + placeholders + ); + let mut uq = sqlx::query(&upd_sql).bind(user_id()); + for id in chunk { + uq = uq.bind(id); + } + let r = uq.execute(&mut *tx).await.map_err(|e| e.to_string())?; + total_affected += r.rows_affected(); + } + let affected_ids: Vec = assets.iter().map(|a| a.id).collect(); + let mut before_map = serde_json::Map::new(); + for a in &assets { + before_map.insert( + a.id.to_string(), + serde_json::to_value(a).unwrap_or(serde_json::Value::Null), + ); + } + let ids_json = serde_json::to_string(&affected_ids).map_err(|e| e.to_string())?; + let before_json = serde_json::to_string(&before_map).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, ts) + VALUES ('delete', 'bulk', ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(total_affected as usize) +} + +#[tauri::command] +pub async fn export_assets( + path: String, + format: String, + state: State<'_, AppState>, +) -> Result { + let assets: Vec = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE deleted = 0 ORDER BY asset_type, asset_name, id", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + + let body = match format.to_lowercase().as_str() { + "geojson" | "json" => { + let mut features = vec![]; + for a in &assets { + let props = serde_json::json!({ + "row_id": a.row_id, + "asset_type": a.asset_type, + "asset_name": a.asset_name, + "video_name": a.video_name, + "side": a.side, + "in_scope": a.in_scope, + "modified": a.modified, + "image_path": a.image_path, + "image_path1": a.image_path1, + "image_path2": a.image_path2, + "image_path3": a.image_path3, + "link_pair_id": a.link_pair_id, + "link_locked": a.link_locked, + }); + if a.asset_type == "fixed" { + if let (Some(la), Some(ln)) = (a.lat, a.lng) { + features.push(serde_json::json!({ + "type": "Feature", + "geometry": {"type": "Point", "coordinates": [ln, la]}, + "properties": props, + })); + } + } else if a.asset_type == "range" { + let mut coords: Vec<[f64; 2]> = vec![]; + if let (Some(la), Some(ln)) = (a.start_lat, a.start_lng) { + coords.push([ln, la]); + } + if let (Some(la), Some(ln)) = (a.lat, a.lng) { + coords.push([ln, la]); + } + if let (Some(la), Some(ln)) = (a.end_lat, a.end_lng) { + coords.push([ln, la]); + } + if coords.len() >= 2 { + features.push(serde_json::json!({ + "type": "Feature", + "geometry": {"type": "LineString", "coordinates": coords}, + "properties": props, + })); + } + } + } + serde_json::to_string_pretty(&serde_json::json!({ + "type": "FeatureCollection", + "features": features, + })) + .map_err(|e| e.to_string())? + } + "kml" => { + let mut s = String::new(); + s.push_str("\n"); + s.push_str("\n"); + for a in &assets { + let name = format!("{} · {}", a.asset_name, a.row_id); + let desc = format!( + "type: {}\nvideo: {}\nside: {}\nmodified: {}", + a.asset_type, + a.video_name, + a.side.as_deref().unwrap_or(""), + a.modified + ); + if a.asset_type == "fixed" { + if let (Some(la), Some(ln)) = (a.lat, a.lng) { + s.push_str(&format!( + "{}{}\ + {},{},0\n", + xml_escape(&name), + xml_escape(&desc), + ln, + la + )); + } + } else if a.asset_type == "range" { + let mut coords: Vec<(f64, f64)> = vec![]; + if let (Some(la), Some(ln)) = (a.start_lat, a.start_lng) { + coords.push((ln, la)); + } + if let (Some(la), Some(ln)) = (a.lat, a.lng) { + coords.push((ln, la)); + } + if let (Some(la), Some(ln)) = (a.end_lat, a.end_lng) { + coords.push((ln, la)); + } + if coords.len() >= 2 { + let coord_str = coords + .iter() + .map(|(ln, la)| format!("{},{},0", ln, la)) + .collect::>() + .join(" "); + s.push_str(&format!( + "{}{}\ + {}\n", + xml_escape(&name), + xml_escape(&desc), + coord_str + )); + } + } + } + s.push_str("\n"); + s + } + "source" => { + // Round-trippable JSON in the same shape import_*_assets accept. + // Fixed and range objects are written into separate top-level keys + // so the user can re-feed each via the matching importer. Includes + // deleted=true rows so the audit state survives a round-trip. + let mut fixed_arr: Vec = vec![]; + let mut range_arr: Vec = vec![]; + for a in &assets { + if a.asset_type == "fixed" { + if let (Some(la), Some(ln)) = (a.lat, a.lng) { + fixed_arr.push(serde_json::json!({ + "row_id": a.row_id, + "asset_name": a.asset_name, + "video_name": a.video_name, + "image_path": a.image_path, + "coord": [la, ln], + "deleted": a.deleted != 0, + "side": a.side, + })); + } + } else if a.asset_type == "range" { + if let (Some(la), Some(ln), Some(sla), Some(sln), Some(ela), Some(eln)) = + (a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng) + { + range_arr.push(serde_json::json!({ + "row_id": a.row_id, + "asset_name": a.asset_name, + "video_name": a.video_name, + "coord_lat": la, + "coord_lng": ln, + "start_coord_lat": sla, + "start_coord_lng": sln, + "end_coord_lat": ela, + "end_coord_lng": eln, + "image_path1": a.image_path1, + "image_path2": a.image_path2, + "image_path3": a.image_path3, + "deleted": a.deleted != 0, + "side": a.side, + })); + } + } + } + serde_json::to_string_pretty(&serde_json::json!({ + "fixed": fixed_arr, + "range": range_arr, + })) + .map_err(|e| e.to_string())? + } + "csv" => { + let mut s = String::new(); + s.push_str("id,row_id,asset_type,asset_name,video_name,side,in_scope,deleted,modified,lat,lng,start_lat,start_lng,end_lat,end_lng,link_pair_id,link_locked,image_path,image_path1,image_path2,image_path3\n"); + let csv_q = |v: Option<&str>| -> String { + let s = v.unwrap_or(""); + if s.contains(',') || s.contains('"') || s.contains('\n') { + format!("\"{}\"", s.replace('"', "\"\"")) + } else { + s.to_string() + } + }; + let f = |o: Option| o.map(|v| v.to_string()).unwrap_or_default(); + let i = |o: Option| o.map(|v| v.to_string()).unwrap_or_default(); + for a in &assets { + s.push_str(&format!( + "{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}\n", + a.id, + csv_q(Some(&a.row_id)), + a.asset_type, + csv_q(Some(&a.asset_name)), + csv_q(Some(&a.video_name)), + csv_q(a.side.as_deref()), + i(a.in_scope), + a.deleted, + a.modified, + f(a.lat), + f(a.lng), + f(a.start_lat), + f(a.start_lng), + f(a.end_lat), + f(a.end_lng), + i(a.link_pair_id), + i(a.link_locked), + csv_q(a.image_path.as_deref()), + csv_q(a.image_path1.as_deref()), + csv_q(a.image_path2.as_deref()), + csv_q(a.image_path3.as_deref()), + )); + } + s + } + other => return Err(format!("unsupported format: {}", other)), + }; + + tokio::fs::write(&path, body) + .await + .map_err(|e| e.to_string())?; + Ok(assets.len()) +} + +fn xml_escape(s: &str) -> String { + s.replace('&', "&") + .replace('<', "<") + .replace('>', ">") + .replace('"', """) + .replace('\'', "'") +} + +#[tauri::command] +pub async fn list_classes(state: State<'_, AppState>) -> Result, String> { + // Read classes.txt from app dir if present; otherwise fall back to the + // distinct asset_name list. Frontend uses this to populate the rename + // dropdown. + let path = std::env::current_dir() + .map_err(|e| e.to_string())? + .join("classes.txt"); + if path.exists() { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + let s = String::from_utf8_lossy(&bytes); + let names: Vec = s + .lines() + .map(|l| l.trim().to_string()) + .filter(|l| !l.is_empty() && !l.starts_with('#')) + .collect(); + if !names.is_empty() { + return Ok(names); + } + } + let rows: Vec<(String,)> = sqlx::query_as( + "SELECT DISTINCT asset_name FROM assets WHERE deleted = 0 ORDER BY asset_name", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(rows.into_iter().map(|(n,)| n).collect()) +} + +#[tauri::command] +pub async fn add_class(name: String) -> Result<(), String> { + let path = std::env::current_dir() + .map_err(|e| e.to_string())? + .join("classes.txt"); + let trimmed = name.trim().to_string(); + if trimmed.is_empty() { + return Err("class name is empty".into()); + } + let mut existing = if path.exists() { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + String::from_utf8_lossy(&bytes).to_string() + } else { + String::new() + }; + let already = existing.lines().any(|l| l.trim() == trimmed); + if already { + return Ok(()); + } + if !existing.is_empty() && !existing.ends_with('\n') { + existing.push('\n'); + } + existing.push_str(&trimmed); + existing.push('\n'); + tokio::fs::write(&path, existing) + .await + .map_err(|e| e.to_string())?; + Ok(()) +} + +#[derive(Debug, Serialize)] +pub struct AutoLinkResult { + pub linked: usize, + pub leftover_a: usize, + pub leftover_b: usize, +} + +async fn snapshot_link_state( + pool: &SqlitePool, + ids: &[i64], +) -> Result, String> { + if ids.is_empty() { + return Ok(serde_json::Map::new()); + } + let placeholders = vec!["?"; ids.len()].join(","); + let sql = format!( + "SELECT id, link_pair_id, link_locked FROM assets WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query_as::<_, (i64, Option, Option)>(&sql); + for id in ids { + q = q.bind(id); + } + let rows = q.fetch_all(pool).await.map_err(|e| e.to_string())?; + let mut m = serde_json::Map::new(); + for (id, pair, locked) in rows { + m.insert( + id.to_string(), + serde_json::json!({"link_pair_id": pair, "link_locked": locked.unwrap_or(0)}), + ); + } + Ok(m) +} + +fn haversine_m(a: (f64, f64), b: (f64, f64)) -> f64 { + let r = 6_371_000.0_f64; + let to_rad = |d: f64| d * std::f64::consts::PI / 180.0; + let d_lat = to_rad(b.0 - a.0); + let d_lng = to_rad(b.1 - a.1); + let s = (d_lat / 2.0).sin().powi(2) + + to_rad(a.0).cos() * to_rad(b.0).cos() * (d_lng / 2.0).sin().powi(2); + 2.0 * r * s.sqrt().asin() +} + +fn point_in_polygon(lng: f64, lat: f64, verts: &[[f64; 2]]) -> bool { + if verts.len() < 3 { + return false; + } + let mut inside = false; + let n = verts.len(); + let mut j = n - 1; + for i in 0..n { + let xi = verts[i][0]; + let yi = verts[i][1]; + let xj = verts[j][0]; + let yj = verts[j][1]; + let intersect = (yi > lat) != (yj > lat) + && lng < (xj - xi) * (lat - yi) / (yj - yi + 1e-12) + xi; + if intersect { + inside = !inside; + } + j = i; + } + inside +} + +#[tauri::command] +pub async fn auto_link_in_polygon( + polygon: Vec<[f64; 2]>, + split_by: String, + max_distance_m: f64, + state: State<'_, AppState>, +) -> Result { + if polygon.len() < 3 { + return Err("polygon needs ≥ 3 vertices".into()); + } + if max_distance_m <= 0.0 { + return Err("max_distance_m must be > 0".into()); + } + let mn_lat = polygon.iter().map(|p| p[1]).fold(f64::INFINITY, f64::min); + let mx_lat = polygon.iter().map(|p| p[1]).fold(f64::NEG_INFINITY, f64::max); + let mn_lng = polygon.iter().map(|p| p[0]).fold(f64::INFINITY, f64::min); + let mx_lng = polygon.iter().map(|p| p[0]).fold(f64::NEG_INFINITY, f64::max); + + let candidates: Vec = sqlx::query_as( + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a JOIN assets_rtree r ON r.id = a.id + WHERE r.max_lat >= ? AND r.min_lat <= ? + AND r.max_lng >= ? AND r.min_lng <= ? + AND a.deleted = 0", + ) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + + let inside: Vec<&Asset> = candidates + .iter() + .filter(|a| match (a.lat, a.lng) { + (Some(la), Some(lo)) => point_in_polygon(lo, la, &polygon), + _ => false, + }) + .collect(); + + let split_key = |a: &Asset| -> String { + match split_by.as_str() { + "video" => a.video_name.clone(), + _ => a + .side + .clone() + .map(|s| s.to_uppercase()) + .unwrap_or_else(|| "_".to_string()), + } + }; + + let pool: Vec<&Asset> = inside + .iter() + .filter(|a| a.link_locked.unwrap_or(0) != 1) + .copied() + .collect(); + + let (matched, leftover_a, leftover_b): (Vec<(i64, i64)>, usize, usize) = + if split_by == "none" { + // Pair nearest neighbours regardless of side/video. Useful when + // video_name is missing or unreliable. + let n = pool.len(); + let mut p: Vec<(usize, usize, f64)> = Vec::with_capacity(n * n / 2); + for i in 0..n { + let (la, lo) = (pool[i].lat.unwrap(), pool[i].lng.unwrap()); + for j in (i + 1)..n { + let (lb, lob) = (pool[j].lat.unwrap(), pool[j].lng.unwrap()); + let d = haversine_m((la, lo), (lb, lob)); + if d <= max_distance_m { + p.push((i, j, d)); + } + } + } + p.sort_by(|x, y| x.2.partial_cmp(&y.2).unwrap_or(std::cmp::Ordering::Equal)); + let mut used = vec![false; n]; + let mut m: Vec<(i64, i64)> = vec![]; + for (i, j, _) in &p { + if used[*i] || used[*j] { + continue; + } + used[*i] = true; + used[*j] = true; + m.push((pool[*i].id, pool[*j].id)); + } + let leftover = used.iter().filter(|x| !**x).count(); + (m, leftover, 0) + } else { + use std::collections::HashMap; + let mut buckets: HashMap> = HashMap::new(); + for a in &pool { + buckets.entry(split_key(a)).or_default().push(a); + } + let mut groups: Vec<(String, Vec<&Asset>)> = buckets.into_iter().collect(); + groups.sort_by(|a, b| b.1.len().cmp(&a.1.len())); + if groups.len() < 2 { + return Ok(AutoLinkResult { + linked: 0, + leftover_a: groups.first().map(|g| g.1.len()).unwrap_or(0), + leftover_b: 0, + }); + } + let group_a = groups[0].1.clone(); + let group_b = groups[1].1.clone(); + + let mut p: Vec<(usize, usize, f64)> = + Vec::with_capacity(group_a.len() * group_b.len()); + for (i, a) in group_a.iter().enumerate() { + let (la, lo) = (a.lat.unwrap(), a.lng.unwrap()); + for (j, b) in group_b.iter().enumerate() { + let (lb, lob) = (b.lat.unwrap(), b.lng.unwrap()); + let d = haversine_m((la, lo), (lb, lob)); + if d <= max_distance_m { + p.push((i, j, d)); + } + } + } + p.sort_by(|x, y| x.2.partial_cmp(&y.2).unwrap_or(std::cmp::Ordering::Equal)); + let mut used_a = vec![false; group_a.len()]; + let mut used_b = vec![false; group_b.len()]; + let mut m: Vec<(i64, i64)> = vec![]; + for (i, j, _) in &p { + if used_a[*i] || used_b[*j] { + continue; + } + used_a[*i] = true; + used_b[*j] = true; + m.push((group_a[*i].id, group_b[*j].id)); + } + let la = used_a.iter().filter(|x| !**x).count(); + let lb = used_b.iter().filter(|x| !**x).count(); + (m, la, lb) + }; + + let mut affected_ids: Vec = vec![]; + for (a, b) in &matched { + affected_ids.push(*a); + affected_ids.push(*b); + } + let before = snapshot_link_state(&state.pool, &affected_ids).await?; + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + // Orphan any prior partners of the matched ids (only if they were unlocked). + for id in &affected_ids { + sqlx::query( + "UPDATE assets SET link_pair_id = NULL, link_locked = 0 + WHERE id IN (SELECT link_pair_id FROM assets WHERE id = ?) AND link_locked = 0", + ) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + for (a, b) in &matched { + sqlx::query("UPDATE assets SET link_pair_id = ?, link_locked = 0 WHERE id = ?") + .bind(b) + .bind(a) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + sqlx::query("UPDATE assets SET link_pair_id = ?, link_locked = 0 WHERE id = ?") + .bind(a) + .bind(b) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + let after = snapshot_link_state(&state.pool, &affected_ids).await?; + let ids_json = serde_json::to_string(&affected_ids).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('link', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(serde_json::to_string(&before).map_err(|e| e.to_string())?) + .bind(serde_json::to_string(&after).map_err(|e| e.to_string())?) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + + Ok(AutoLinkResult { + linked: matched.len(), + leftover_a, + leftover_b, + }) +} + +#[tauri::command] +pub async fn set_link( + a_id: i64, + b_id: i64, + state: State<'_, AppState>, +) -> Result<(), String> { + if a_id == b_id { + return Err("can't link an asset to itself".into()); + } + let prev: Vec<(i64, Option)> = + sqlx::query_as("SELECT id, link_pair_id FROM assets WHERE id IN (?, ?)") + .bind(a_id) + .bind(b_id) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + let mut all_ids = vec![a_id, b_id]; + for (_, p) in &prev { + if let Some(pid) = p { + if !all_ids.contains(pid) { + all_ids.push(*pid); + } + } + } + let before = snapshot_link_state(&state.pool, &all_ids).await?; + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + for (_, p) in &prev { + if let Some(pid) = p { + sqlx::query("UPDATE assets SET link_pair_id = NULL, link_locked = 0 WHERE id = ?") + .bind(pid) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + sqlx::query("UPDATE assets SET link_pair_id = ?, link_locked = 1 WHERE id = ?") + .bind(b_id) + .bind(a_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + sqlx::query("UPDATE assets SET link_pair_id = ?, link_locked = 1 WHERE id = ?") + .bind(a_id) + .bind(b_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + let after = snapshot_link_state(&state.pool, &all_ids).await?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('link', 'single', ?, ?, ?, ?, datetime('now'))", + ) + .bind(serde_json::to_string(&all_ids).map_err(|e| e.to_string())?) + .bind(user_id()) + .bind(serde_json::to_string(&before).map_err(|e| e.to_string())?) + .bind(serde_json::to_string(&after).map_err(|e| e.to_string())?) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn clear_link(id: i64, state: State<'_, AppState>) -> Result<(), String> { + let row: (Option,) = + sqlx::query_as("SELECT link_pair_id FROM assets WHERE id = ?") + .bind(id) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + let mut all_ids = vec![id]; + if let Some(p) = row.0 { + all_ids.push(p); + } + let before = snapshot_link_state(&state.pool, &all_ids).await?; + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + for aid in &all_ids { + sqlx::query("UPDATE assets SET link_pair_id = NULL, link_locked = 0 WHERE id = ?") + .bind(aid) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + let after = snapshot_link_state(&state.pool, &all_ids).await?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('link', 'single', ?, ?, ?, ?, datetime('now'))", + ) + .bind(serde_json::to_string(&all_ids).map_err(|e| e.to_string())?) + .bind(user_id()) + .bind(serde_json::to_string(&before).map_err(|e| e.to_string())?) + .bind(serde_json::to_string(&after).map_err(|e| e.to_string())?) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn change_assets_side( + ids: Vec, + side: String, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + let normalized = match side.trim().to_uppercase().as_str() { + "LEFT" | "LHS" | "L" => "Left", + "RIGHT" | "RHS" | "R" => "Right", + _ => return Err(format!("invalid side: {}", side)), + }; + let placeholders = vec!["?"; ids.len()].join(","); + let before_sql = format!( + "SELECT id, side FROM assets WHERE id IN ({})", + placeholders + ); + let mut bq = sqlx::query_as::<_, (i64, Option)>(&before_sql); + for id in &ids { + bq = bq.bind(id); + } + let prior = bq.fetch_all(&state.pool).await.map_err(|e| e.to_string())?; + let mut before_map = serde_json::Map::new(); + for (id, side_v) in &prior { + before_map.insert(id.to_string(), serde_json::json!({"side": side_v})); + } + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let upd_sql = format!( + "UPDATE assets SET side = ?, modified = 1, modified_by = ?, \ + modified_at = datetime('now') WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query(&upd_sql).bind(normalized).bind(user_id()); + for id in &ids { + q = q.bind(id); + } + let res = q.execute(&mut *tx).await.map_err(|e| e.to_string())?; + let after = serde_json::json!({"side": normalized}); + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + let before_json = serde_json::to_string(&before_map).map_err(|e| e.to_string())?; + let after_json = serde_json::to_string(&after).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('change_side', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[tauri::command] +pub async fn rename_assets( + ids: Vec, + asset_name: String, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + let trimmed = asset_name.trim().to_string(); + if trimmed.is_empty() { + return Err("asset_name is empty".into()); + } + let placeholders = vec!["?"; ids.len()].join(","); + // Snapshot before-state so undo can restore prior names. + let before_sql = format!( + "SELECT id, asset_name FROM assets WHERE id IN ({})", + placeholders + ); + let mut bq = sqlx::query_as::<_, (i64, String)>(&before_sql); + for id in &ids { + bq = bq.bind(id); + } + let prior = bq + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + let mut before_map = serde_json::Map::new(); + for (id, name) in &prior { + before_map.insert(id.to_string(), serde_json::json!({"asset_name": name})); + } + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let upd_sql = format!( + "UPDATE assets SET asset_name = ?, modified = 1, modified_by = ?, \ + modified_at = datetime('now') WHERE id IN ({})", + placeholders + ); + let mut q = sqlx::query(&upd_sql).bind(&trimmed).bind(user_id()); + for id in &ids { + q = q.bind(id); + } + let res = q.execute(&mut *tx).await.map_err(|e| e.to_string())?; + let after = serde_json::json!({"asset_name": trimmed}); + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + let before_json = serde_json::to_string(&before_map).map_err(|e| e.to_string())?; + let after_json = serde_json::to_string(&after).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('rename', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[derive(Debug, Serialize)] +pub struct DuplicateMember { + pub id: i64, + pub row_id: String, + pub asset_name: String, + pub video_name: String, + pub side: Option, + pub lat: Option, + pub lng: Option, + pub asset_type: String, + pub start_lat: Option, + pub start_lng: Option, + pub end_lat: Option, + pub end_lng: Option, +} + +#[derive(Debug, Serialize)] +pub struct DuplicateCluster { + pub id: usize, + pub asset_name: String, + pub members: Vec, +} + +#[tauri::command] +pub async fn find_duplicate_clusters( + eps_m: f64, + min_lat: Option, + max_lat: Option, + min_lng: Option, + max_lng: Option, + cross_video_only: Option, + state: State<'_, AppState>, +) -> Result, String> { + let cross_only = cross_video_only.unwrap_or(false); + if eps_m <= 0.0 { + return Err("eps_m must be > 0".into()); + } + let assets: Vec = if let (Some(a), Some(b), Some(c), Some(d)) = + (min_lat, max_lat, min_lng, max_lng) + { + sqlx::query_as( + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a JOIN assets_rtree r ON r.id = a.id + WHERE r.max_lat >= ? AND r.min_lat <= ? + AND r.max_lng >= ? AND r.min_lng <= ? + AND a.deleted = 0", + ) + .bind(a) + .bind(b) + .bind(c) + .bind(d) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())? + } else { + sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE deleted = 0", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())? + }; + + use std::collections::HashMap; + let mut buckets: HashMap<(String, String), Vec<&Asset>> = HashMap::new(); + for a in &assets { + if a.lat.is_none() || a.lng.is_none() { + continue; + } + let side = a.side.clone().unwrap_or_default(); + buckets + .entry((a.asset_name.clone(), side)) + .or_default() + .push(a); + } + + fn find(parent: &mut [usize], x: usize) -> usize { + let mut r = x; + while parent[r] != r { + r = parent[r]; + } + let mut cur = x; + while parent[cur] != r { + let nxt = parent[cur]; + parent[cur] = r; + cur = nxt; + } + r + } + fn union(parent: &mut [usize], a: usize, b: usize) { + let ra = find(parent, a); + let rb = find(parent, b); + if ra != rb { + parent[ra] = rb; + } + } + + let mut clusters: Vec = vec![]; + let mut next_cluster_id = 0usize; + + for ((name, _side), group) in buckets { + if group.len() < 2 { + continue; + } + let n = group.len(); + let mut parent: Vec = (0..n).collect(); + for i in 0..n { + for j in (i + 1)..n { + let a = group[i]; + let b = group[j]; + if cross_only { + let av = a.video_name.trim(); + let bv = b.video_name.trim(); + // Empty/missing video names never count as "same" — that + // would silently block dup detection on assets where the + // labeler forgot to set the video. + if !av.is_empty() && !bv.is_empty() && av == bv { + continue; + } + } + let pa = Point::new(a.lng.unwrap(), a.lat.unwrap()); + let pb = Point::new(b.lng.unwrap(), b.lat.unwrap()); + if Geodesic.distance(pa, pb) > eps_m { + continue; + } + // Range × range: also require best-paired endpoints OR best + // endpoint <-> any-vertex distance to be within 2×eps. This is + // looser than before so ranges that overlap but end at slightly + // different points still cluster. Mismatched-direction pairs + // still pass via the min(same,opp) test. + if a.asset_type == "range" && b.asset_type == "range" { + let endpoints_ok = (|| { + let asa = Point::new(a.start_lng?, a.start_lat?); + let ase = Point::new(a.end_lng?, a.end_lat?); + let bsa = Point::new(b.start_lng?, b.start_lat?); + let bse = Point::new(b.end_lng?, b.end_lat?); + let same = Geodesic + .distance(asa, bsa) + .max(Geodesic.distance(ase, bse)); + let opp = Geodesic + .distance(asa, bse) + .max(Geodesic.distance(ase, bsa)); + Some(same.min(opp) <= eps_m * 2.0) + })() + .unwrap_or(true); + if !endpoints_ok { + continue; + } + } + union(&mut parent, i, j); + } + } + + let mut by_root: HashMap> = HashMap::new(); + for i in 0..n { + let r = find(&mut parent, i); + by_root.entry(r).or_default().push(i); + } + for (_root, members) in by_root { + if members.len() < 2 { + continue; + } + if cross_only { + let mut videos = std::collections::HashSet::new(); + for &i in &members { + videos.insert(group[i].video_name.clone()); + } + if videos.len() < 2 { + continue; + } + } + let mut out_members: Vec = vec![]; + for &i in &members { + let m = group[i]; + out_members.push(DuplicateMember { + id: m.id, + row_id: m.row_id.clone(), + asset_name: m.asset_name.clone(), + video_name: m.video_name.clone(), + side: m.side.clone(), + lat: m.lat, + lng: m.lng, + asset_type: m.asset_type.clone(), + start_lat: m.start_lat, + start_lng: m.start_lng, + end_lat: m.end_lat, + end_lng: m.end_lng, + }); + } + clusters.push(DuplicateCluster { + id: next_cluster_id, + asset_name: name.clone(), + members: out_members, + }); + next_cluster_id += 1; + } + } + clusters.sort_by(|a, b| b.members.len().cmp(&a.members.len())); + Ok(clusters) +} + +#[tauri::command] +pub async fn list_video_names( + state: State<'_, AppState>, +) -> Result, String> { + let rows: Vec<(String,)> = sqlx::query_as( + "SELECT DISTINCT video_name FROM assets WHERE deleted = 0 ORDER BY video_name", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(rows.into_iter().map(|(n,)| n).collect()) +} + +#[tauri::command] +pub async fn restore_assets( + ids: Vec, + state: State<'_, AppState>, +) -> Result { + if ids.is_empty() { + return Ok(0); + } + let placeholders = vec!["?"; ids.len()].join(","); + let upd_sql = format!( + "UPDATE assets SET deleted = 0, modified = 1, modified_by = ?, \ + modified_at = datetime('now') WHERE id IN ({}) AND deleted = 1", + placeholders + ); + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let mut q = sqlx::query(&upd_sql).bind(user_id()); + for id in &ids { + q = q.bind(id); + } + let res = q.execute(&mut *tx).await.map_err(|e| e.to_string())?; + let ids_json = serde_json::to_string(&ids).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, ts) + VALUES ('restore', 'bulk', ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[tauri::command] +pub async fn list_asset_names( + state: State<'_, AppState>, +) -> Result, String> { + let rows: Vec<(String,)> = sqlx::query_as( + "SELECT DISTINCT asset_name FROM assets WHERE deleted = 0 ORDER BY asset_name", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(rows.into_iter().map(|(n,)| n).collect()) +} + +#[tauri::command] +pub async fn get_osm_roads(state: State<'_, AppState>) -> Result, String> { + let rows: Vec<(i64, Option, String)> = + sqlx::query_as("SELECT id, name, geojson FROM roads") + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(rows + .into_iter() + .map(|(id, name, geojson)| RoadOut { id, name, geojson }) + .collect()) +} + +#[tauri::command] +pub async fn read_metadata_polyline(path: String) -> Result, String> { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + let v: serde_json::Value = + serde_json::from_slice(&bytes).map_err(|e| e.to_string())?; + let track = v + .get("track") + .and_then(|t| t.as_array()) + .ok_or_else(|| "missing 'track' array".to_string())?; + let mut out = vec![]; + for pt in track { + let arr = match pt.as_array() { + Some(a) if a.len() >= 2 => a, + _ => continue, + }; + // metadata_polyline.json stores [lat, lng]; convert to [lng, lat] for deck.gl + let lat = arr[0].as_f64().unwrap_or(f64::NAN); + let lng = arr[1].as_f64().unwrap_or(f64::NAN); + if lat.is_finite() && lng.is_finite() { + out.push([lng, lat]); + } + } + Ok(out) +} + +#[tauri::command] +pub async fn import_osm_geojson( + path: String, + highway_classes: Option>, + state: State<'_, AppState>, +) -> Result { + let bytes = tokio::fs::read(&path).await.map_err(|e| e.to_string())?; + let fc: GeoJsonFeatureCollection = + serde_json::from_slice(&bytes).map_err(|e| e.to_string())?; + let class_filter: Option> = + highway_classes.map(|v| v.into_iter().collect()); + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + sqlx::query("DELETE FROM roads") + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let mut inserted = 0usize; + for f in fc.features { + let highway = f + .properties + .get("highway") + .and_then(|v| v.as_str()) + .unwrap_or("") + .to_string(); + if let Some(set) = &class_filter { + if !highway.is_empty() && !set.contains(&highway) { + continue; + } + } + let geom_type = f + .geometry + .get("type") + .and_then(|v| v.as_str()) + .unwrap_or(""); + if geom_type != "LineString" { + continue; + } + let coords_v = f + .geometry + .get("coordinates") + .and_then(|v| v.as_array()) + .ok_or_else(|| "missing coordinates".to_string())?; + let mut min_lat = f64::INFINITY; + let mut max_lat = f64::NEG_INFINITY; + let mut min_lng = f64::INFINITY; + let mut max_lng = f64::NEG_INFINITY; + let mut valid = false; + for c in coords_v { + let arr = match c.as_array() { + Some(a) if a.len() >= 2 => a, + _ => continue, + }; + let lng = arr[0].as_f64().unwrap_or(f64::NAN); + let lat = arr[1].as_f64().unwrap_or(f64::NAN); + if !lng.is_finite() || !lat.is_finite() { + continue; + } + if lat < min_lat { + min_lat = lat; + } + if lat > max_lat { + max_lat = lat; + } + if lng < min_lng { + min_lng = lng; + } + if lng > max_lng { + max_lng = lng; + } + valid = true; + } + if !valid { + continue; + } + let name = f + .properties + .get("name") + .and_then(|v| v.as_str()) + .or_else(|| f.properties.get("ref").and_then(|v| v.as_str())) + .map(|s| s.to_string()); + let oneway: i64 = match f.properties.get("oneway") { + Some(serde_json::Value::Number(n)) => n.as_i64().unwrap_or(0), + Some(serde_json::Value::String(s)) => match s.as_str() { + "yes" | "true" | "1" => 1, + "-1" | "reverse" => -1, + _ => 0, + }, + Some(serde_json::Value::Bool(true)) => 1, + _ => 0, + }; + let geojson_str = f.geometry.to_string(); + sqlx::query( + "INSERT INTO roads(name, geojson, min_lat, max_lat, min_lng, max_lng, oneway, highway) + VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + ) + .bind(&name) + .bind(&geojson_str) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(oneway) + .bind(&highway) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + inserted += 1; + } + tx.commit().await.map_err(|e| e.to_string())?; + Ok(inserted) +} + +#[derive(Debug, Serialize)] +pub struct MergeRoadsResult { + pub names_processed: usize, + pub ways_consumed: usize, + pub merged_into: usize, + pub skipped_branched: usize, +} + +/// Merge OSM ways that share a `name` and connect end-to-end into a single +/// LineString. Endpoints within 1 m are treated as the same node. +/// Branched components (any node with > 2 incident ways) are skipped to keep +/// merged geometry single-stranded; user can still edit those individually. +#[tauri::command] +pub async fn merge_roads_by_name( + state: State<'_, AppState>, +) -> Result { + use std::collections::{HashMap, HashSet}; + + // Pull every named road. Empty / NULL names are skipped (we can't group them). + let rows: Vec<(i64, String, String, i64, Option)> = sqlx::query_as( + "SELECT id, geojson, COALESCE(name, ''), COALESCE(oneway, 0), + highway + FROM roads + WHERE name IS NOT NULL AND TRIM(name) <> ''", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + + // Bucket by name. + let mut by_name: HashMap, i64, Option)>> = + HashMap::new(); + for (id, gj, name, ow, hw) in rows { + let line = match parse_linestring(&gj) { + Some(l) => l, + None => continue, + }; + by_name + .entry(name) + .or_default() + .push((id, line, ow, hw)); + } + + // Endpoint keying: round to 5 decimals (~1 m). Two ways are adjacent if + // any endpoint key matches. + fn key(c: &Coord) -> (i64, i64) { + ((c.x * 1e5).round() as i64, (c.y * 1e5).round() as i64) + } + + let mut names_processed = 0usize; + let mut ways_consumed = 0usize; + let mut merged_into = 0usize; + let mut skipped_branched = 0usize; + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + + for (name, ways) in by_name { + if ways.len() < 2 { + continue; + } + names_processed += 1; + let n = ways.len(); + // Map each endpoint key to the list of way indices touching it. + let mut node_to_ways: HashMap<(i64, i64), Vec> = HashMap::new(); + for (i, (_, line, _, _)) in ways.iter().enumerate() { + let s = line.0.first().unwrap(); + let e = line.0.last().unwrap(); + node_to_ways.entry(key(s)).or_default().push(i); + node_to_ways.entry(key(e)).or_default().push(i); + } + + // Find connected components via BFS on ways. + let mut visited = vec![false; n]; + for start in 0..n { + if visited[start] { + continue; + } + let mut comp: Vec = vec![]; + let mut stack = vec![start]; + while let Some(u) = stack.pop() { + if visited[u] { + continue; + } + visited[u] = true; + comp.push(u); + let line = &ways[u].1; + for k in [key(line.0.first().unwrap()), key(line.0.last().unwrap())] { + if let Some(peers) = node_to_ways.get(&k) { + for &v in peers { + if !visited[v] { + stack.push(v); + } + } + } + } + } + if comp.len() < 2 { + continue; + } + // Branched check: count incident ways per endpoint, restricted to comp. + let comp_set: HashSet = comp.iter().copied().collect(); + let mut deg: HashMap<(i64, i64), Vec> = HashMap::new(); + for &i in &comp { + let line = &ways[i].1; + deg.entry(key(line.0.first().unwrap())).or_default().push(i); + deg.entry(key(line.0.last().unwrap())).or_default().push(i); + } + let max_deg = deg.values().map(|v| v.len()).max().unwrap_or(0); + if max_deg > 2 { + skipped_branched += 1; + continue; + } + // Find walk start: a node with degree 1 (chain endpoint) or any node (cycle). + let start_node = deg + .iter() + .find(|(_, v)| v.len() == 1) + .map(|(k, _)| *k) + .unwrap_or_else(|| *deg.keys().next().unwrap()); + // Walk: from start_node, pick its way, follow to the other end, repeat. + let mut ordered_segments: Vec>> = vec![]; + let mut current_node = start_node; + let mut used: HashSet = HashSet::new(); + while used.len() < comp.len() { + let nexts = deg.get(¤t_node).cloned().unwrap_or_default(); + let pick = nexts + .into_iter() + .find(|i| !used.contains(i) && comp_set.contains(i)); + let way_idx = match pick { + Some(x) => x, + None => break, + }; + used.insert(way_idx); + let line = &ways[way_idx].1; + let s_key = key(line.0.first().unwrap()); + let e_key = key(line.0.last().unwrap()); + let coords: Vec> = if s_key == current_node { + line.0.clone() + } else { + line.0.iter().rev().copied().collect() + }; + let next_node = if s_key == current_node { e_key } else { s_key }; + ordered_segments.push(coords); + current_node = next_node; + } + if used.len() != comp.len() { + // Couldn't walk the whole thing — bail rather than corrupt geometry. + skipped_branched += 1; + continue; + } + // Concatenate; drop duplicate junction vertex between consecutive segments. + let mut merged: Vec> = vec![]; + for (i, seg) in ordered_segments.into_iter().enumerate() { + let start = if i == 0 { 0 } else { 1 }; + merged.extend(seg.into_iter().skip(start)); + } + if merged.len() < 2 { + continue; + } + // Dominant oneway (most common among comp members). + let mut ow_count: HashMap = HashMap::new(); + for &i in &comp { + *ow_count.entry(ways[i].2).or_default() += 1; + } + let dom_ow = ow_count + .into_iter() + .max_by_key(|(_, c)| *c) + .map(|(k, _)| k) + .unwrap_or(0); + // Pick a highway value (use any present). + let dom_hw = comp + .iter() + .find_map(|&i| ways[i].3.clone()) + .unwrap_or_default(); + + // Compute bbox. + let mut mn_lat = f64::INFINITY; + let mut mx_lat = f64::NEG_INFINITY; + let mut mn_lng = f64::INFINITY; + let mut mx_lng = f64::NEG_INFINITY; + for c in &merged { + if c.y < mn_lat { mn_lat = c.y; } + if c.y > mx_lat { mx_lat = c.y; } + if c.x < mn_lng { mn_lng = c.x; } + if c.x > mx_lng { mx_lng = c.x; } + } + // Delete the source rows. + for &i in &comp { + sqlx::query("DELETE FROM roads WHERE id = ?") + .bind(ways[i].0) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + // Insert merged. + let coords_array: Vec<[f64; 2]> = + merged.iter().map(|c| [c.x, c.y]).collect(); + let geom = serde_json::json!({ + "type": "LineString", + "coordinates": coords_array, + }); + sqlx::query( + "INSERT INTO roads(name, geojson, min_lat, max_lat, min_lng, max_lng, oneway, highway) + VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + ) + .bind(&name) + .bind(geom.to_string()) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(dom_ow) + .bind(&dom_hw) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + ways_consumed += comp.len(); + merged_into += 1; + } + } + tx.commit().await.map_err(|e| e.to_string())?; + Ok(MergeRoadsResult { + names_processed, + ways_consumed, + merged_into, + skipped_branched, + }) +} + +#[tauri::command] +pub async fn export_osm_roads( + path: String, + state: State<'_, AppState>, +) -> Result { + let rows: Vec<(i64, Option, String, i64, Option)> = sqlx::query_as( + "SELECT id, name, geojson, COALESCE(oneway, 0), highway FROM roads", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + let mut features: Vec = Vec::with_capacity(rows.len()); + for (id, name, gj, ow, hw) in &rows { + let geom: serde_json::Value = match serde_json::from_str(gj) { + Ok(v) => v, + Err(_) => continue, + }; + features.push(serde_json::json!({ + "type": "Feature", + "geometry": geom, + "properties": { + "id": id, + "name": name, + "oneway": ow, + "highway": hw, + }, + })); + } + let fc = serde_json::json!({ + "type": "FeatureCollection", + "features": features, + }); + tokio::fs::write(&path, serde_json::to_string_pretty(&fc).map_err(|e| e.to_string())?) + .await + .map_err(|e| e.to_string())?; + Ok(features.len()) +} + +#[tauri::command] +pub async fn generate_osm_for_bbox( + min_lat: f64, + min_lng: f64, + max_lat: f64, + max_lng: f64, + path: String, + overpass_url: Option, +) -> Result { + let url = overpass_url + .unwrap_or_else(|| "https://overpass-api.de/api/interpreter".to_string()); + let query = format!( + "[out:json][timeout:180];\ + (way[\"highway\"~\"motorway|trunk|primary|secondary|tertiary|motorway_link|trunk_link|primary_link|secondary_link|tertiary_link|residential|unclassified|service\"]\ + ({},{},{},{}););\ + out body geom;", + min_lat, min_lng, max_lat, max_lng + ); + let client = reqwest::Client::builder() + .timeout(std::time::Duration::from_secs(240)) + .build() + .map_err(|e| e.to_string())?; + let resp = client + .post(&url) + .body(query) + .send() + .await + .map_err(|e| format!("Overpass request failed: {}", e))?; + if !resp.status().is_success() { + return Err(format!("Overpass HTTP {}", resp.status())); + } + let body: serde_json::Value = + resp.json().await.map_err(|e| format!("Overpass parse: {}", e))?; + let elements = body + .get("elements") + .and_then(|v| v.as_array()) + .cloned() + .unwrap_or_default(); + let mut features: Vec = vec![]; + for el in elements { + if el.get("type").and_then(|v| v.as_str()) != Some("way") { + continue; + } + let geom = match el.get("geometry").and_then(|v| v.as_array()) { + Some(g) if g.len() >= 2 => g.clone(), + _ => continue, + }; + let coords: Vec<[f64; 2]> = geom + .iter() + .filter_map(|p| { + let lon = p.get("lon")?.as_f64()?; + let lat = p.get("lat")?.as_f64()?; + Some([lon, lat]) + }) + .collect(); + if coords.len() < 2 { + continue; + } + let tags = el.get("tags").cloned().unwrap_or(serde_json::Value::Null); + let name = tags + .get("name") + .and_then(|v| v.as_str()) + .or_else(|| tags.get("ref").and_then(|v| v.as_str())) + .map(|s| s.to_string()); + let highway = tags + .get("highway") + .and_then(|v| v.as_str()) + .map(|s| s.to_string()); + let oneway: i64 = match tags.get("oneway").and_then(|v| v.as_str()) { + Some("yes") | Some("true") | Some("1") => 1, + Some("-1") | Some("reverse") => -1, + _ => { + if tags.get("junction").and_then(|v| v.as_str()) == Some("roundabout") + || matches!( + tags.get("highway").and_then(|v| v.as_str()), + Some("motorway") | Some("motorway_link") + ) + { + 1 + } else { + 0 + } + } + }; + features.push(serde_json::json!({ + "type": "Feature", + "geometry": {"type": "LineString", "coordinates": coords}, + "properties": { + "id": el.get("id"), + "name": name, + "highway": highway, + "oneway": oneway, + }, + })); + } + let fc = serde_json::json!({ + "type": "FeatureCollection", + "features": features, + }); + tokio::fs::write(&path, serde_json::to_string(&fc).map_err(|e| e.to_string())?) + .await + .map_err(|e| e.to_string())?; + Ok(features.len()) +} + +#[tauri::command] +pub async fn flip_road_direction( + id: i64, + state: State<'_, AppState>, +) -> Result { + let row: (i64,) = sqlx::query_as("SELECT COALESCE(oneway, 0) FROM roads WHERE id = ?") + .bind(id) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + // 0 → 1 (set forward); 1 → -1; -1 → 1. + let next = match row.0 { + 0 => 1, + v if v > 0 => -1, + _ => 1, + }; + sqlx::query("UPDATE roads SET oneway = ? WHERE id = ?") + .bind(next) + .bind(id) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(next) +} + +#[tauri::command] +pub async fn delete_roads_by_highway( + classes: Vec, + state: State<'_, AppState>, +) -> Result { + if classes.is_empty() { + return Ok(0); + } + let placeholders = vec!["?"; classes.len()].join(","); + let sql = format!( + "DELETE FROM roads WHERE highway IN ({})", + placeholders + ); + let mut q = sqlx::query(&sql); + for c in &classes { + q = q.bind(c); + } + let res = q.execute(&state.pool).await.map_err(|e| e.to_string())?; + Ok(res.rows_affected() as usize) +} + +#[derive(Debug, Serialize, sqlx::FromRow)] +pub struct RoadClassCount { + pub highway: Option, + pub n: i64, +} + +#[tauri::command] +pub async fn list_road_classes( + state: State<'_, AppState>, +) -> Result, String> { + sqlx::query_as::<_, RoadClassCount>( + "SELECT highway, COUNT(*) AS n FROM roads GROUP BY highway ORDER BY n DESC", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string()) +} + +#[tauri::command] +pub async fn create_osm_road( + name: Option, + coords: Vec<[f64; 2]>, + state: State<'_, AppState>, +) -> Result { + if coords.len() < 2 { + return Err("a road must have at least 2 vertices".into()); + } + let mut min_lat = f64::INFINITY; + let mut max_lat = f64::NEG_INFINITY; + let mut min_lng = f64::INFINITY; + let mut max_lng = f64::NEG_INFINITY; + for c in &coords { + let lng = c[0]; + let lat = c[1]; + if !lng.is_finite() || !lat.is_finite() { + return Err("non-finite coordinate".into()); + } + if lat < min_lat { + min_lat = lat; + } + if lat > max_lat { + max_lat = lat; + } + if lng < min_lng { + min_lng = lng; + } + if lng > max_lng { + max_lng = lng; + } + } + let geom = serde_json::json!({ + "type": "LineString", + "coordinates": coords, + }); + let row: (i64,) = sqlx::query_as( + "INSERT INTO roads(name, geojson, min_lat, max_lat, min_lng, max_lng) + VALUES (?, ?, ?, ?, ?, ?) RETURNING id", + ) + .bind(&name) + .bind(geom.to_string()) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(row.0) +} + +#[tauri::command] +pub async fn delete_osm_road( + id: i64, + state: State<'_, AppState>, +) -> Result<(), String> { + sqlx::query("DELETE FROM roads WHERE id = ?") + .bind(id) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn update_osm_road( + id: i64, + coords: Vec<[f64; 2]>, + state: State<'_, AppState>, +) -> Result<(), String> { + if coords.len() < 2 { + return Err("a road must have at least 2 vertices".into()); + } + let mut min_lat = f64::INFINITY; + let mut max_lat = f64::NEG_INFINITY; + let mut min_lng = f64::INFINITY; + let mut max_lng = f64::NEG_INFINITY; + for c in &coords { + let lng = c[0]; + let lat = c[1]; + if !lng.is_finite() || !lat.is_finite() { + return Err("non-finite coordinate".into()); + } + if lat < min_lat { + min_lat = lat; + } + if lat > max_lat { + max_lat = lat; + } + if lng < min_lng { + min_lng = lng; + } + if lng > max_lng { + max_lng = lng; + } + } + let geom = serde_json::json!({ + "type": "LineString", + "coordinates": coords, + }); + sqlx::query( + "UPDATE roads SET geojson = ?, min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ? WHERE id = ?", + ) + .bind(geom.to_string()) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(id) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + // Refresh R-tree row (no UPDATE trigger; emulate via delete+insert). + sqlx::query("DELETE FROM roads_rtree WHERE id = ?") + .bind(id) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO roads_rtree(id, min_lat, max_lat, min_lng, max_lng) VALUES (?, ?, ?, ?, ?)", + ) + .bind(id) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .execute(&state.pool) + .await + .map_err(|e| e.to_string())?; + Ok(()) +} + +fn parse_linestring(geojson: &str) -> Option> { + let v: serde_json::Value = serde_json::from_str(geojson).ok()?; + let coords = v.get("coordinates")?.as_array()?; + let mut out = Vec::with_capacity(coords.len()); + for c in coords { + let arr = c.as_array()?; + if arr.len() < 2 { + return None; + } + out.push(Coord { + x: arr[0].as_f64()?, + y: arr[1].as_f64()?, + }); + } + if out.len() < 2 { + return None; + } + Some(LineString(out)) +} + +/// Snap a single (lng, lat) to the closest segment in `candidates`, then +/// apply a side-aware perpendicular offset. Returns Ok((new_lat, new_lng)) +/// when the closest road is within `max_d`. The sign convention: +/// side="Left"/"LHS"/"L" → +perpendicular relative to vehicle heading +/// side="Right"/"RHS"/"R" → −perpendicular +/// otherwise → fall back to position-derived sign +fn snap_point_with_offset( + candidates: &[(LineString, i32)], + side: Option<&str>, + metadata_track: Option<&[[f64; 2]]>, + lng: f64, + lat: f64, + offset: f64, + max_d: f64, +) -> Result<(f64, f64), String> { + let pt = Point::new(lng, lat); + // Track best snap, the segment endpoints, and the road's oneway tag. + let mut best: Option<(f64, Point, (f64, f64), (f64, f64), i32)> = None; + for (line, ow) in candidates { + for seg in line.lines() { + let seg_ls = LineString(vec![seg.start, seg.end]); + let snapped = match seg_ls.closest_point(&pt) { + Closest::SinglePoint(p) | Closest::Intersection(p) => p, + _ => continue, + }; + let d = Geodesic.distance(pt, snapped); + if best.as_ref().map(|b| d < b.0).unwrap_or(true) { + best = Some(( + d, + snapped, + (seg.start.x, seg.start.y), + (seg.end.x, seg.end.y), + *ow, + )); + } + } + } + let (dist, sp, seg_start, seg_end, oneway) = + best.ok_or_else(|| "no usable roads".to_string())?; + if dist > max_d { + return Err(format!( + "nearest road is {:.1} m away (>{:.0} m limit)", + dist, max_d + )); + } + let mut new_lng = sp.x(); + let mut new_lat = sp.y(); + if offset > 0.0 { + let lat0 = new_lat; + let m_per_lat = 111_320.0_f64; + let m_per_lng = 111_320.0_f64 + * (lat0 * std::f64::consts::PI / 180.0).cos().abs().max(1e-6); + // Determine vehicle heading direction. Priority: + // 1. metadata polyline (true vehicle GPS) + // 2. road oneway tag (segment direction × oneway sign) + // 3. fall back to raw segment direction (sign-from-position later) + let metadata_heading = metadata_track + .and_then(|t| vehicle_heading_at(t, new_lng, new_lat)); + let heading_known_for_side = metadata_heading.is_some() || oneway != 0; + let (dx, dy) = match metadata_heading { + Some((vx, vy)) => (vx * m_per_lng, vy * m_per_lat), + None => { + let raw_x = (seg_end.0 - seg_start.0) * m_per_lng; + let raw_y = (seg_end.1 - seg_start.1) * m_per_lat; + let s = if oneway < 0 { -1.0 } else { 1.0 }; + (raw_x * s, raw_y * s) + } + }; + let len = (dx * dx + dy * dy).sqrt().max(1e-9); + let px = -dy / len; + let py = dx / len; + // Use the asset's annotated side only if we actually know which way + // traffic flows (metadata or oneway). Otherwise raw segment direction + // is arbitrary and the side label would flip half the time. + let sign = if heading_known_for_side { + match side.map(|s| s.to_uppercase()) { + Some(ref s) if s == "LEFT" || s == "LHS" || s == "L" => 1.0, + Some(ref s) if s == "RIGHT" || s == "RHS" || s == "R" => -1.0, + _ => { + let ax = (lng - new_lng) * m_per_lng; + let ay = (lat - new_lat) * m_per_lat; + let dot = px * ax + py * ay; + if dot >= 0.0 { 1.0 } else { -1.0 } + } + } + } else { + let ax = (lng - new_lng) * m_per_lng; + let ay = (lat - new_lat) * m_per_lat; + let dot = px * ax + py * ay; + if dot >= 0.0 { 1.0 } else { -1.0 } + }; + new_lng += sign * px * offset / m_per_lng; + new_lat += sign * py * offset / m_per_lat; + } + Ok((new_lat, new_lng)) +} + +/// Local vehicle heading at the metadata sample nearest to (lng, lat). +/// Returns (dx_lng, dy_lat) — unnormalized direction vector. None if track too +/// short to derive a heading. +fn vehicle_heading_at( + track: &[[f64; 2]], + lng: f64, + lat: f64, +) -> Option<(f64, f64)> { + if track.len() < 2 { + return None; + } + let mut best_i = 0usize; + let mut best_d2 = f64::INFINITY; + for (i, p) in track.iter().enumerate() { + let dx = p[0] - lng; + let dy = p[1] - lat; + let d2 = dx * dx + dy * dy; + if d2 < best_d2 { + best_d2 = d2; + best_i = i; + } + } + let a = track[best_i.saturating_sub(1)]; + let b = track[(best_i + 1).min(track.len() - 1)]; + Some((b[0] - a[0], b[1] - a[1])) +} + +#[tauri::command] +pub async fn snap_to_road( + asset_id: i64, + max_distance_m: Option, + offset_m: Option, + metadata_track: Option>, + state: State<'_, AppState>, +) -> Result<(f64, f64), String> { + let max_d = max_distance_m.unwrap_or(50.0); + let offset = offset_m.unwrap_or(0.0).max(0.0); + + let row: Asset = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(asset_id) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + + // Build vertex list: fixed → just mid; range → start + mid + end. + let mut targets: Vec<(&'static str, f64, f64)> = vec![]; + if row.asset_type == "range" { + if let (Some(la), Some(ln)) = (row.start_lat, row.start_lng) { + targets.push(("start", la, ln)); + } + if let (Some(la), Some(ln)) = (row.lat, row.lng) { + targets.push(("mid", la, ln)); + } + if let (Some(la), Some(ln)) = (row.end_lat, row.end_lng) { + targets.push(("end", la, ln)); + } + } else if let (Some(la), Some(ln)) = (row.lat, row.lng) { + targets.push(("mid", la, ln)); + } + if targets.is_empty() { + return Err("asset has no coordinate".into()); + } + + // Use the asset's overall bbox padded by max_d for the R-tree candidate query. + let bbox_min_lat = targets.iter().map(|t| t.1).fold(f64::INFINITY, f64::min); + let bbox_max_lat = targets.iter().map(|t| t.1).fold(f64::NEG_INFINITY, f64::max); + let bbox_min_lng = targets.iter().map(|t| t.2).fold(f64::INFINITY, f64::min); + let bbox_max_lng = targets.iter().map(|t| t.2).fold(f64::NEG_INFINITY, f64::max); + let pad_lat = max_d / 111_320.0; + let pad_lng = max_d + / (111_320.0 + * (bbox_min_lat * std::f64::consts::PI / 180.0) + .cos() + .abs() + .max(1e-6)); + let candidate_rows: Vec<(i64, String, i64)> = sqlx::query_as( + "SELECT r.id, r.geojson, COALESCE(r.oneway, 0) + FROM roads r JOIN roads_rtree x ON x.id = r.id + WHERE x.max_lat >= ? AND x.min_lat <= ? AND x.max_lng >= ? AND x.min_lng <= ?", + ) + .bind(bbox_min_lat - pad_lat) + .bind(bbox_max_lat + pad_lat) + .bind(bbox_min_lng - pad_lng) + .bind(bbox_max_lng + pad_lng) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + if candidate_rows.is_empty() { + return Err(format!("no roads within ~{:.0} m", max_d)); + } + let candidates: Vec<(LineString, i32)> = candidate_rows + .into_iter() + .filter_map(|(_, gj, ow)| parse_linestring(&gj).map(|l| (l, ow as i32))) + .collect(); + let track = metadata_track.as_deref(); + + // Snap each vertex independently. + let mut snapped_pts: Vec<(&'static str, f64, f64)> = Vec::with_capacity(targets.len()); + for (label, vlat, vlng) in &targets { + let (nlat, nlng) = snap_point_with_offset( + &candidates, + row.side.as_deref(), + track, + *vlng, + *vlat, + offset, + max_d, + )?; + snapped_pts.push((*label, nlat, nlng)); + } + // Idempotency. + let no_change = snapped_pts.iter().zip(targets.iter()).all( + |((_, nl, ng), (_, ol, og))| { + Geodesic.distance(Point::new(*og, *ol), Point::new(*ng, *nl)) < 0.5 + }, + ); + let mid_after = snapped_pts.iter().find(|(l, _, _)| *l == "mid"); + let return_lat = mid_after.map(|m| m.1).unwrap_or(snapped_pts[0].1); + let return_lng = mid_after.map(|m| m.2).unwrap_or(snapped_pts[0].2); + if no_change { + return Ok((return_lat, return_lng)); + } + + // Persist as a "move" so it's undoable. + let before_json = serde_json::to_string(&row).map_err(|e| e.to_string())?; + let mut new_mid_lat = row.lat; + let mut new_mid_lng = row.lng; + let mut new_s_lat = row.start_lat; + let mut new_s_lng = row.start_lng; + let mut new_e_lat = row.end_lat; + let mut new_e_lng = row.end_lng; + for (label, nlat, nlng) in &snapped_pts { + match *label { + "start" => { + new_s_lat = Some(*nlat); + new_s_lng = Some(*nlng); + } + "mid" => { + new_mid_lat = Some(*nlat); + new_mid_lng = Some(*nlng); + } + "end" => { + new_e_lat = Some(*nlat); + new_e_lng = Some(*nlng); + } + _ => {} + } + } + let min_lat = min_or_nan(&[new_mid_lat, new_s_lat, new_e_lat]); + let max_lat = max_or_nan(&[new_mid_lat, new_s_lat, new_e_lat]); + let min_lng = min_or_nan(&[new_mid_lng, new_s_lng, new_e_lng]); + let max_lng = max_or_nan(&[new_mid_lng, new_s_lng, new_e_lng]); + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_mid_lat) + .bind(new_mid_lng) + .bind(new_s_lat) + .bind(new_s_lng) + .bind(new_e_lat) + .bind(new_e_lng) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(user_id()) + .bind(asset_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let after_json = serde_json::to_string( + &snapped_pts + .iter() + .map(|(l, la, ln)| (l.to_string(), *la, *ln)) + .collect::>(), + ) + .map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('move', 'single', ?, ?, ?, ?, datetime('now'))", + ) + .bind(format!("[{}]", asset_id)) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok((return_lat, return_lng)) +} + +#[derive(Debug, Serialize)] +pub struct BulkSnapResult { + pub snapped: usize, + pub skipped_far: usize, + pub skipped_no_geom: usize, +} + +#[tauri::command] +pub async fn snap_assets_in_bbox( + min_lat: Option, + max_lat: Option, + min_lng: Option, + max_lng: Option, + video_name: Option, + max_distance_m: Option, + offset_m: Option, + centerline_names: Option>, + metadata_track: Option>, + state: State<'_, AppState>, +) -> Result { + let max_d = max_distance_m.unwrap_or(50.0); + let offset = offset_m.unwrap_or(0.0).max(0.0); + let centerline: std::collections::HashSet = + centerline_names.unwrap_or_default().into_iter().collect(); + + let road_rows: Vec<(i64, String, i64)> = + sqlx::query_as("SELECT id, geojson, COALESCE(oneway, 0) FROM roads") + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())?; + if road_rows.is_empty() { + return Err("no roads loaded — import OSM first".into()); + } + let roads: Vec<(LineString, i32)> = road_rows + .into_iter() + .filter_map(|(_, gj, ow)| parse_linestring(&gj).map(|l| (l, ow as i32))) + .collect(); + + let assets: Vec = if let Some(vname) = video_name.as_deref() { + sqlx::query_as( + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a + WHERE a.video_name = ? AND a.deleted = 0", + ) + .bind(vname) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())? + } else { + let (mn_la, mx_la, mn_ln, mx_ln) = match (min_lat, max_lat, min_lng, max_lng) { + (Some(a), Some(b), Some(c), Some(d)) => (a, b, c, d), + _ => return Err("provide either video_name or full bbox".into()), + }; + sqlx::query_as( + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a JOIN assets_rtree r ON r.id = a.id + WHERE r.max_lat >= ? AND r.min_lat <= ? + AND r.max_lng >= ? AND r.min_lng <= ? + AND a.deleted = 0", + ) + .bind(mn_la) + .bind(mx_la) + .bind(mn_ln) + .bind(mx_ln) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string())? + }; + + let mut snapped = 0usize; + let mut skipped_far = 0usize; + let mut skipped_no_geom = 0usize; + let mut affected_ids: Vec = vec![]; + let mut before_map = serde_json::Map::new(); + let mut after_map = serde_json::Map::new(); + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + let track = metadata_track.as_deref(); + for asset in assets { + let asset_offset = if centerline.contains(&asset.asset_name) { + 0.0 + } else { + offset + }; + let side = asset.side.as_deref(); + + // Build the list of vertices to snap. For fixed: just (mid). + // For range: (start, mid, end), each independently snapped/offset. + let mut targets: Vec<(&'static str, f64, f64)> = vec![]; + if asset.asset_type == "range" { + if let (Some(la), Some(ln)) = (asset.start_lat, asset.start_lng) { + targets.push(("start", la, ln)); + } + if let (Some(la), Some(ln)) = (asset.lat, asset.lng) { + targets.push(("mid", la, ln)); + } + if let (Some(la), Some(ln)) = (asset.end_lat, asset.end_lng) { + targets.push(("end", la, ln)); + } + } else if let (Some(la), Some(ln)) = (asset.lat, asset.lng) { + targets.push(("mid", la, ln)); + } + if targets.is_empty() { + skipped_no_geom += 1; + continue; + } + + // Snap each vertex; bail out for the asset if any vertex is too far + // (keeps the asset's three vertices in lockstep — partial snap would + // produce a kinked polyline). + let mut snapped_pts: Vec<(&'static str, f64, f64)> = vec![]; + let mut bail = false; + let mut too_far = false; + for (label, vlat, vlng) in &targets { + match snap_point_with_offset( + &roads, + side, + track, + *vlng, + *vlat, + asset_offset, + max_d, + ) { + Ok((nlat, nlng)) => snapped_pts.push((*label, nlat, nlng)), + Err(msg) => { + if msg.contains("away") { + too_far = true; + } else { + bail = true; + } + } + } + } + if bail || snapped_pts.len() != targets.len() { + if too_far { + skipped_far += 1; + } else { + skipped_no_geom += 1; + } + continue; + } + // Idempotency: if every vertex moved <0.1m, skip. + let no_change = snapped_pts.iter().zip(targets.iter()).all( + |((_, nl, ng), (_, ol, og))| { + Geodesic.distance(Point::new(*og, *ol), Point::new(*ng, *nl)) + < 0.5 + }, + ); + if no_change { + continue; + } + + before_map.insert( + asset.id.to_string(), + serde_json::to_value(&asset).unwrap_or(serde_json::Value::Null), + ); + let mut after_obj = serde_json::Map::new(); + let mut new_mid_lat = asset.lat; + let mut new_mid_lng = asset.lng; + let mut new_s_lat = asset.start_lat; + let mut new_s_lng = asset.start_lng; + let mut new_e_lat = asset.end_lat; + let mut new_e_lng = asset.end_lng; + for (label, nlat, nlng) in &snapped_pts { + after_obj.insert(format!("{}_lat", label), serde_json::json!(nlat)); + after_obj.insert(format!("{}_lng", label), serde_json::json!(nlng)); + match *label { + "start" => { + new_s_lat = Some(*nlat); + new_s_lng = Some(*nlng); + } + "mid" => { + new_mid_lat = Some(*nlat); + new_mid_lng = Some(*nlng); + } + "end" => { + new_e_lat = Some(*nlat); + new_e_lng = Some(*nlng); + } + _ => {} + } + } + after_map.insert( + asset.id.to_string(), + serde_json::Value::Object(after_obj), + ); + affected_ids.push(asset.id); + + let mn_lat = min_or_nan(&[new_mid_lat, new_s_lat, new_e_lat]); + let mx_lat = max_or_nan(&[new_mid_lat, new_s_lat, new_e_lat]); + let mn_lng = min_or_nan(&[new_mid_lng, new_s_lng, new_e_lng]); + let mx_lng = max_or_nan(&[new_mid_lng, new_s_lng, new_e_lng]); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_mid_lat) + .bind(new_mid_lng) + .bind(new_s_lat) + .bind(new_s_lng) + .bind(new_e_lat) + .bind(new_e_lng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(user_id()) + .bind(asset.id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + snapped += 1; + } + + if snapped > 0 { + let ids_json = serde_json::to_string(&affected_ids).map_err(|e| e.to_string())?; + let before_json = + serde_json::to_string(&before_map).map_err(|e| e.to_string())?; + let after_json = + serde_json::to_string(&after_map).map_err(|e| e.to_string())?; + sqlx::query( + "INSERT INTO action_history + (action_type, scope, asset_ids, user_id, before, after, ts) + VALUES ('bulk_snap', 'bulk', ?, ?, ?, ?, datetime('now'))", + ) + .bind(&ids_json) + .bind(user_id()) + .bind(&before_json) + .bind(&after_json) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + + Ok(BulkSnapResult { + snapped, + skipped_far, + skipped_no_geom, + }) +} + +#[tauri::command] +pub async fn reset_database(state: State<'_, AppState>) -> Result<(), String> { + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + // Trigger assets_ad clears assets_rtree as rows leave assets. + sqlx::query("DELETE FROM assets") + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + sqlx::query("DELETE FROM scope_polygons") + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + sqlx::query("DELETE FROM action_history") + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + sqlx::query("DELETE FROM roads") + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + Ok(()) +} + +#[tauri::command] +pub async fn list_recent_actions( + limit: i64, + state: State<'_, AppState>, +) -> Result, String> { + sqlx::query_as::<_, AuditRow>( + "SELECT id, action_type, scope, asset_ids, user_id, before, after, ts, undone + FROM action_history ORDER BY id DESC LIMIT ?", + ) + .bind(limit) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string()) +} + +#[tauri::command] +pub async fn redo_action(action_id: i64, state: State<'_, AppState>) -> Result<(), String> { + let row: AuditRow = sqlx::query_as( + "SELECT id, action_type, scope, asset_ids, user_id, before, after, ts, undone + FROM action_history WHERE id = ?", + ) + .bind(action_id) + .fetch_one(&state.pool) + .await + .map_err(|e| e.to_string())?; + if row.undone == 0 { + return Err("action is not in an undone state".to_string()); + } + + let mut tx = state.pool.begin().await.map_err(|e| e.to_string())?; + match row.action_type.as_str() { + "move" => { + let after_str = row.after.as_deref().unwrap_or(""); + let mv: MoveAfter = + serde_json::from_str(after_str).map_err(|e| e.to_string())?; + let ids: Vec = serde_json::from_str(&row.asset_ids) + .map_err(|e| e.to_string())?; + let id = *ids.first().ok_or("missing asset id")?; + + let asset: Asset = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(id) + .fetch_one(&mut *tx) + .await + .map_err(|e| e.to_string())?; + + let (new_lat, new_lng, new_slat, new_slng, new_elat, new_elng) = + match mv.vertex.as_str() { + "fixed" | "mid" => ( + Some(mv.lat), + Some(mv.lng), + asset.start_lat, + asset.start_lng, + asset.end_lat, + asset.end_lng, + ), + "start" => ( + asset.lat, + asset.lng, + Some(mv.lat), + Some(mv.lng), + asset.end_lat, + asset.end_lng, + ), + "end" => ( + asset.lat, + asset.lng, + asset.start_lat, + asset.start_lng, + Some(mv.lat), + Some(mv.lng), + ), + other => return Err(format!("invalid vertex: {}", other)), + }; + let min_lat = min_or_nan(&[new_lat, new_slat, new_elat]); + let max_lat = max_or_nan(&[new_lat, new_slat, new_elat]); + let min_lng = min_or_nan(&[new_lng, new_slng, new_elng]); + let max_lng = max_or_nan(&[new_lng, new_slng, new_elng]); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, start_lat = ?, start_lng = ?, end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_lat) + .bind(new_lng) + .bind(new_slat) + .bind(new_slng) + .bind(new_elat) + .bind(new_elng) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + "delete" | "delete_by_video" => { + let ids: Vec = + serde_json::from_str(&row.asset_ids).map_err(|e| e.to_string())?; + for id in ids { + sqlx::query( + "UPDATE assets SET deleted = 1, modified = 1, + modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "set_scope" => { + let after_map: serde_json::Map = + serde_json::from_str(row.after.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in after_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let in_scope = val.get("in_scope").and_then(|v| v.as_i64()); + let manual = val.get("manual_scope").and_then(|v| v.as_i64()); + sqlx::query( + "UPDATE assets SET in_scope = ?, manual_scope = ? WHERE id = ?", + ) + .bind(in_scope) + .bind(manual) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "rename" => { + let after_val: serde_json::Value = + serde_json::from_str(row.after.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + let new_name = after_val + .get("asset_name") + .and_then(|v| v.as_str()) + .unwrap_or(""); + let ids: Vec = serde_json::from_str(&row.asset_ids) + .map_err(|e| e.to_string())?; + for id in ids { + sqlx::query("UPDATE assets SET asset_name = ? WHERE id = ?") + .bind(new_name) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "change_side" => { + let after_val: serde_json::Value = + serde_json::from_str(row.after.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + let new_side = after_val + .get("side") + .and_then(|v| v.as_str()) + .map(String::from); + let ids: Vec = serde_json::from_str(&row.asset_ids) + .map_err(|e| e.to_string())?; + for id in ids { + sqlx::query("UPDATE assets SET side = ? WHERE id = ?") + .bind(&new_side) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "link" => { + let after_map: serde_json::Map = + serde_json::from_str(row.after.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in after_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + let pair = val.get("link_pair_id").and_then(|v| v.as_i64()); + let locked = val + .get("link_locked") + .and_then(|v| v.as_i64()) + .unwrap_or(0); + sqlx::query( + "UPDATE assets SET link_pair_id = ?, link_locked = ? WHERE id = ?", + ) + .bind(pair) + .bind(locked) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "restore" => { + let ids: Vec = serde_json::from_str(&row.asset_ids) + .map_err(|e| e.to_string())?; + for id in ids { + sqlx::query("UPDATE assets SET deleted = 0 WHERE id = ?") + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + "merge" => { + let ids: Vec = + serde_json::from_str(&row.asset_ids).map_err(|e| e.to_string())?; + if ids.len() != 2 { + return Err("malformed merge audit row".to_string()); + } + sqlx::query( + "UPDATE assets SET merged_into = ?, deleted = 1, modified = 1, + modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(ids[0]) + .bind(user_id()) + .bind(ids[1]) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + "bulk_snap" => { + let after_map: serde_json::Map = + serde_json::from_str(row.after.as_deref().unwrap_or("{}")) + .map_err(|e| e.to_string())?; + for (id_str, val) in after_map { + let id: i64 = id_str.parse().map_err(|_| "bad id".to_string())?; + // bulk_snap stores keys: mid_lat/mid_lng (always), and + // start_lat/start_lng + end_lat/end_lng for range assets. Read + // the current row so we can leave any vertex untouched if the + // snap didn't supply that label. + let cur: Asset = sqlx::query_as( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE id = ?", + ) + .bind(id) + .fetch_one(&mut *tx) + .await + .map_err(|e| e.to_string())?; + let read = |k: &str| val.get(k).and_then(|v| v.as_f64()); + let new_lat = read("mid_lat").or(cur.lat); + let new_lng = read("mid_lng").or(cur.lng); + let new_slat = read("start_lat").or(cur.start_lat); + let new_slng = read("start_lng").or(cur.start_lng); + let new_elat = read("end_lat").or(cur.end_lat); + let new_elng = read("end_lng").or(cur.end_lng); + let mn_lat = min_or_nan(&[new_lat, new_slat, new_elat]); + let mx_lat = max_or_nan(&[new_lat, new_slat, new_elat]); + let mn_lng = min_or_nan(&[new_lng, new_slng, new_elng]); + let mx_lng = max_or_nan(&[new_lng, new_slng, new_elng]); + sqlx::query( + "UPDATE assets SET + lat = ?, lng = ?, + start_lat = ?, start_lng = ?, + end_lat = ?, end_lng = ?, + min_lat = ?, max_lat = ?, min_lng = ?, max_lng = ?, + modified = 1, modified_by = ?, modified_at = datetime('now') + WHERE id = ?", + ) + .bind(new_lat) + .bind(new_lng) + .bind(new_slat) + .bind(new_slng) + .bind(new_elat) + .bind(new_elng) + .bind(mn_lat) + .bind(mx_lat) + .bind(mn_lng) + .bind(mx_lng) + .bind(user_id()) + .bind(id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + } + } + other => return Err(format!("unknown action_type: {}", other)), + } + sqlx::query("UPDATE action_history SET undone = 0 WHERE id = ?") + .bind(action_id) + .execute(&mut *tx) + .await + .map_err(|e| e.to_string())?; + tx.commit().await.map_err(|e| e.to_string())?; + apply_scope_after_change(&state.pool).await?; + Ok(()) +} + +#[tauri::command] +pub async fn list_assets(state: State<'_, AppState>) -> Result, String> { + sqlx::query_as::<_, Asset>( + "SELECT id, row_id, asset_type, asset_name, video_name, + lat, lng, start_lat, start_lng, end_lat, end_lng, + image_path, image_path1, image_path2, image_path3, + deleted, modified, merged_into, in_scope, side, link_pair_id, link_locked + FROM assets WHERE deleted = 0", + ) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string()) +} + +// Bbox-overlap query via R-tree. +// NOTE: does not handle antimeridian crossings — fine for current Qatar data. +#[tauri::command] +pub async fn get_assets_in_bbox( + min_lat: f64, + max_lat: f64, + min_lng: f64, + max_lng: f64, + include_deleted: Option, + state: State<'_, AppState>, +) -> Result, String> { + let include = include_deleted.unwrap_or(false); + let sql = if include { + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a + JOIN assets_rtree r ON r.id = a.id + WHERE r.max_lat >= ? AND r.min_lat <= ? + AND r.max_lng >= ? AND r.min_lng <= ?" + } else { + "SELECT a.id, a.row_id, a.asset_type, a.asset_name, a.video_name, + a.lat, a.lng, a.start_lat, a.start_lng, a.end_lat, a.end_lng, + a.image_path, a.image_path1, a.image_path2, a.image_path3, + a.deleted, a.modified, a.merged_into, a.in_scope, a.side, a.link_pair_id, a.link_locked + FROM assets a + JOIN assets_rtree r ON r.id = a.id + WHERE r.max_lat >= ? AND r.min_lat <= ? + AND r.max_lng >= ? AND r.min_lng <= ? + AND a.deleted = 0" + }; + sqlx::query_as::<_, Asset>(sql) + .bind(min_lat) + .bind(max_lat) + .bind(min_lng) + .bind(max_lng) + .fetch_all(&state.pool) + .await + .map_err(|e| e.to_string()) +} diff --git a/src-tauri/src/db.rs b/src-tauri/src/db.rs new file mode 100644 index 0000000..318246d --- /dev/null +++ b/src-tauri/src/db.rs @@ -0,0 +1,247 @@ +use anyhow::Result; +use sqlx::sqlite::{SqliteConnectOptions, SqlitePoolOptions}; +use sqlx::SqlitePool; +use std::path::Path; +use std::str::FromStr; + +pub async fn init_pool(db_path: &Path) -> Result { + if let Some(parent) = db_path.parent() { + tokio::fs::create_dir_all(parent).await?; + } + + let url = format!("sqlite://{}", db_path.display()); + let opts = SqliteConnectOptions::from_str(&url)? + .create_if_missing(true) + .journal_mode(sqlx::sqlite::SqliteJournalMode::Wal) + .synchronous(sqlx::sqlite::SqliteSynchronous::Normal); + + let pool = SqlitePoolOptions::new() + .max_connections(4) + .connect_with(opts) + .await?; + + apply_schema(&pool).await?; + Ok(pool) +} + +async fn apply_schema(pool: &SqlitePool) -> Result<()> { + sqlx::query( + r#" + CREATE TABLE IF NOT EXISTS assets ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + row_id TEXT NOT NULL UNIQUE, + asset_type TEXT NOT NULL CHECK (asset_type IN ('fixed','range')), + asset_name TEXT NOT NULL, + video_name TEXT NOT NULL, + lat REAL, + lng REAL, + start_lat REAL, + start_lng REAL, + end_lat REAL, + end_lng REAL, + min_lat REAL NOT NULL, + max_lat REAL NOT NULL, + min_lng REAL NOT NULL, + max_lng REAL NOT NULL, + image_path TEXT, + image_path1 TEXT, + image_path2 TEXT, + image_path3 TEXT, + deleted INTEGER NOT NULL DEFAULT 0, + modified INTEGER NOT NULL DEFAULT 0, + modified_by TEXT, + modified_at TEXT, + merged_into INTEGER REFERENCES assets(id), + in_scope INTEGER + ) + "#, + ) + .execute(pool) + .await?; + + sqlx::query("CREATE INDEX IF NOT EXISTS idx_assets_video ON assets(video_name)") + .execute(pool) + .await?; + sqlx::query("CREATE INDEX IF NOT EXISTS idx_assets_type ON assets(asset_type)") + .execute(pool) + .await?; + sqlx::query("CREATE INDEX IF NOT EXISTS idx_assets_name ON assets(asset_name)") + .execute(pool) + .await?; + // Migration: side detected from image_path (LHS/RHS) at import time. + let _ = sqlx::query("ALTER TABLE assets ADD COLUMN side TEXT") + .execute(pool) + .await; + // Manual scope override: NULL = derived from scope polygons (default), + // 0 = forced out-of-scope, 1 = forced in-scope. Set via lasso bulk edits. + let _ = sqlx::query("ALTER TABLE assets ADD COLUMN manual_scope INTEGER") + .execute(pool) + .await; + // Cross-side / cross-video pair links: link_pair_id is the partner asset's id. + // link_locked = 1 marks a manual link that survives auto-match re-runs. + let _ = sqlx::query("ALTER TABLE assets ADD COLUMN link_pair_id INTEGER") + .execute(pool) + .await; + let _ = sqlx::query( + "ALTER TABLE assets ADD COLUMN link_locked INTEGER NOT NULL DEFAULT 0", + ) + .execute(pool) + .await; + // Original positions captured at import time. Never overwritten by edits or + // re-imports; used to support "Reset to original" (single + bulk). + for col in [ + "orig_lat", "orig_lng", + "orig_start_lat", "orig_start_lng", + "orig_end_lat", "orig_end_lng", + ] { + let _ = sqlx::query(&format!("ALTER TABLE assets ADD COLUMN {} REAL", col)) + .execute(pool) + .await; + } + let _ = sqlx::query("ALTER TABLE roads ADD COLUMN oneway INTEGER NOT NULL DEFAULT 0") + .execute(pool) + .await; + let _ = sqlx::query("ALTER TABLE roads ADD COLUMN highway TEXT") + .execute(pool) + .await; + sqlx::query( + "CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT NOT NULL UNIQUE, + display_name TEXT NOT NULL, + created_at TEXT NOT NULL DEFAULT (datetime('now')) + )", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE VIRTUAL TABLE IF NOT EXISTS assets_rtree USING rtree( + id, min_lat, max_lat, min_lng, max_lng + )", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE TRIGGER IF NOT EXISTS assets_ai AFTER INSERT ON assets + BEGIN + INSERT INTO assets_rtree(id, min_lat, max_lat, min_lng, max_lng) + VALUES (NEW.id, NEW.min_lat, NEW.max_lat, NEW.min_lng, NEW.max_lng); + END", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE TRIGGER IF NOT EXISTS assets_au AFTER UPDATE ON assets + BEGIN + UPDATE assets_rtree + SET min_lat = NEW.min_lat, max_lat = NEW.max_lat, + min_lng = NEW.min_lng, max_lng = NEW.max_lng + WHERE id = OLD.id; + END", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE TRIGGER IF NOT EXISTS assets_ad AFTER DELETE ON assets + BEGIN + DELETE FROM assets_rtree WHERE id = OLD.id; + END", + ) + .execute(pool) + .await?; + + sqlx::query( + "INSERT INTO assets_rtree(id, min_lat, max_lat, min_lng, max_lng) + SELECT id, min_lat, max_lat, min_lng, max_lng FROM assets + WHERE id NOT IN (SELECT id FROM assets_rtree)", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE TABLE IF NOT EXISTS scope_polygons ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT, + geojson TEXT NOT NULL, + geom_type TEXT NOT NULL DEFAULT 'polygon' + )", + ) + .execute(pool) + .await?; + // Migration for DBs predating geom_type column. + let _ = sqlx::query( + "ALTER TABLE scope_polygons ADD COLUMN geom_type TEXT NOT NULL DEFAULT 'polygon'", + ) + .execute(pool) + .await; + + sqlx::query( + "CREATE TABLE IF NOT EXISTS roads ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT, + geojson TEXT NOT NULL, + min_lat REAL NOT NULL, + max_lat REAL NOT NULL, + min_lng REAL NOT NULL, + max_lng REAL NOT NULL + )", + ) + .execute(pool) + .await?; + sqlx::query( + "CREATE VIRTUAL TABLE IF NOT EXISTS roads_rtree USING rtree( + id, min_lat, max_lat, min_lng, max_lng + )", + ) + .execute(pool) + .await?; + sqlx::query( + "CREATE TRIGGER IF NOT EXISTS roads_ai AFTER INSERT ON roads + BEGIN + INSERT INTO roads_rtree(id, min_lat, max_lat, min_lng, max_lng) + VALUES (NEW.id, NEW.min_lat, NEW.max_lat, NEW.min_lng, NEW.max_lng); + END", + ) + .execute(pool) + .await?; + sqlx::query( + "CREATE TRIGGER IF NOT EXISTS roads_ad AFTER DELETE ON roads + BEGIN + DELETE FROM roads_rtree WHERE id = OLD.id; + END", + ) + .execute(pool) + .await?; + + sqlx::query( + "CREATE TABLE IF NOT EXISTS action_history ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + action_type TEXT NOT NULL, + scope TEXT NOT NULL, + asset_ids TEXT NOT NULL, + user_id TEXT NOT NULL, + before TEXT, + after TEXT, + ts TEXT NOT NULL, + undone INTEGER NOT NULL DEFAULT 0 + )", + ) + .execute(pool) + .await?; + // Migration for DBs created before `after` column existed. + let _ = sqlx::query("ALTER TABLE action_history ADD COLUMN after TEXT") + .execute(pool) + .await; + sqlx::query("CREATE INDEX IF NOT EXISTS idx_audit_ts ON action_history(ts DESC)") + .execute(pool) + .await?; + sqlx::query("CREATE INDEX IF NOT EXISTS idx_audit_undone ON action_history(undone)") + .execute(pool) + .await?; + + Ok(()) +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs new file mode 100644 index 0000000..ce75f71 --- /dev/null +++ b/src-tauri/src/lib.rs @@ -0,0 +1,96 @@ +mod commands; +mod db; +mod scope; + +use commands::{ + delete_asset, delete_assets_by_video, get_assets_in_bbox, get_osm_roads, + get_scope_polygons, import_fixed_assets, import_kml_scope, import_osm_geojson, + import_range_assets, list_assets, list_recent_actions, merge_polylines, reset_assets_to_original, + read_metadata_polyline, redo_action, reset_database, snap_assets_in_bbox, + add_class, auto_link_in_polygon, bulk_translate, change_assets_side, clear_link, clear_manual_scope, + create_osm_road, create_user, set_link, + delete_roads_by_highway, export_osm_roads, find_duplicate_clusters, + flip_road_direction, generate_osm_for_bbox, list_road_classes, merge_roads_by_name, + delete_assets_bulk, delete_osm_road, delete_user, export_assets, + list_asset_names, list_classes, list_users, list_video_names, + rename_assets, restore_assets, set_assets_by_video_in_scope, + set_assets_in_scope, set_current_user, snap_to_road, + undo_action, update_asset_position, update_osm_road, AppState, +}; +use tauri::Manager; + +#[cfg_attr(mobile, tauri::mobile_entry_point)] +pub fn run() { + tauri::Builder::default() + .plugin(tauri_plugin_opener::init()) + .plugin(tauri_plugin_dialog::init()) + .setup(|app| { + let app_data = app + .path() + .app_data_dir() + .expect("could not resolve app data dir"); + let db_path = app_data.join("markers.db"); + + let handle = app.handle().clone(); + tauri::async_runtime::block_on(async move { + let pool = db::init_pool(&db_path) + .await + .expect("failed to initialize SQLite pool"); + handle.manage(AppState { pool }); + }); + Ok(()) + }) + .invoke_handler(tauri::generate_handler![ + import_fixed_assets, + import_range_assets, + list_assets, + get_assets_in_bbox, + update_asset_position, + import_kml_scope, + get_scope_polygons, + delete_asset, + delete_assets_by_video, + undo_action, + list_recent_actions, + merge_polylines, reset_assets_to_original, + reset_database, + redo_action, + import_osm_geojson, + snap_to_road, + get_osm_roads, + read_metadata_polyline, + snap_assets_in_bbox, + update_osm_road, + create_osm_road, + delete_osm_road, + list_asset_names, + export_assets, + set_assets_in_scope, + set_assets_by_video_in_scope, + clear_manual_scope, + delete_assets_bulk, + list_video_names, + list_classes, + add_class, + rename_assets, + restore_assets, + list_users, + create_user, + delete_user, + set_current_user, + find_duplicate_clusters, + delete_roads_by_highway, + list_road_classes, + merge_roads_by_name, + export_osm_roads, + generate_osm_for_bbox, + flip_road_direction, + change_assets_side, + auto_link_in_polygon, + bulk_translate, + set_link, + clear_link + ]) + .run(tauri::generate_context!()) + .expect("error while running tauri application"); +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs new file mode 100644 index 0000000..fa13593 --- /dev/null +++ b/src-tauri/src/main.rs @@ -0,0 +1,6 @@ +// Prevents additional console window on Windows in release, DO NOT REMOVE!! +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + kml_map_tool_lib::run() +} diff --git a/src-tauri/src/scope.rs b/src-tauri/src/scope.rs new file mode 100644 index 0000000..7144819 --- /dev/null +++ b/src-tauri/src/scope.rs @@ -0,0 +1,270 @@ +use anyhow::Result; +use geo::algorithm::Distance; +use geo::{ClosestPoint, Closest, Contains, Coord, Geodesic, LineString, Point, Polygon as GeoPolygon}; +use kml::types::{Geometry as KmlGeom, Kml, Placemark}; +use sqlx::SqlitePool; +use std::path::Path; + +/// Distance threshold for "near a scope LineString" → in_scope = 1. +const LINE_PROXIMITY_M: f64 = 30.0; + +#[derive(Clone)] +pub enum ScopeGeom { + Polygon(GeoPolygon), + Line(LineString), +} + +pub struct ParsedFeature { + pub name: Option, + pub geom: ScopeGeom, + pub geojson: String, + pub geom_type: &'static str, +} + +pub async fn parse_kml(path: &Path) -> Result> { + let s = tokio::fs::read_to_string(path).await?; + let kml: Kml = s.parse()?; + let mut out = vec![]; + walk(&kml, None, &mut out); + Ok(out) +} + +fn walk(kml: &Kml, parent_name: Option<&str>, out: &mut Vec) { + match kml { + Kml::KmlDocument(doc) => { + for el in &doc.elements { + walk(el, parent_name, out); + } + } + Kml::Document { elements, .. } => { + for el in elements { + walk(el, parent_name, out); + } + } + Kml::Folder(folder) => { + for el in &folder.elements { + walk(el, folder.name.as_deref(), out); + } + } + Kml::Placemark(p) => { + let name = p.name.clone(); + if let Some(g) = &p.geometry { + extract(g, name.as_deref(), p, out); + } + } + _ => {} + } +} + +fn extract(g: &KmlGeom, name: Option<&str>, _p: &Placemark, out: &mut Vec) { + match g { + KmlGeom::Polygon(poly) => { + let outer: Vec> = poly + .outer + .coords + .iter() + .map(|c| Coord { x: c.x, y: c.y }) + .collect(); + if outer.len() < 4 { + return; + } + let inners: Vec> = poly + .inner + .iter() + .map(|ring| { + LineString( + ring.coords + .iter() + .map(|c| Coord { x: c.x, y: c.y }) + .collect(), + ) + }) + .collect(); + let geo_poly = GeoPolygon::new(LineString(outer), inners); + let geojson = polygon_to_geojson(&geo_poly); + out.push(ParsedFeature { + name: name.map(|s| s.to_string()), + geom: ScopeGeom::Polygon(geo_poly), + geojson, + geom_type: "polygon", + }); + } + KmlGeom::LineString(ls) => { + let pts: Vec> = ls + .coords + .iter() + .map(|c| Coord { x: c.x, y: c.y }) + .collect(); + if pts.len() < 2 { + return; + } + let line = LineString(pts); + let geojson = linestring_to_geojson(&line); + out.push(ParsedFeature { + name: name.map(|s| s.to_string()), + geom: ScopeGeom::Line(line), + geojson, + geom_type: "linestring", + }); + } + KmlGeom::MultiGeometry(mg) => { + for sub in &mg.geometries { + extract(sub, name, _p, out); + } + } + _ => {} + } +} + +fn polygon_to_geojson(p: &GeoPolygon) -> String { + let mut rings: Vec> = vec![]; + rings.push(p.exterior().0.iter().map(|c| [c.x, c.y]).collect()); + for inner in p.interiors() { + rings.push(inner.0.iter().map(|c| [c.x, c.y]).collect()); + } + serde_json::to_string(&serde_json::json!({ + "type": "Polygon", + "coordinates": rings + })) + .unwrap_or_else(|_| "{}".to_string()) +} + +fn linestring_to_geojson(l: &LineString) -> String { + let coords: Vec<[f64; 2]> = l.0.iter().map(|c| [c.x, c.y]).collect(); + serde_json::to_string(&serde_json::json!({ + "type": "LineString", + "coordinates": coords + })) + .unwrap_or_else(|_| "{}".to_string()) +} + +pub async fn replace_scope(pool: &SqlitePool, features: &[ParsedFeature]) -> Result<()> { + let mut tx = pool.begin().await?; + sqlx::query("DELETE FROM scope_polygons") + .execute(&mut *tx) + .await?; + for f in features { + sqlx::query( + "INSERT INTO scope_polygons(name, geojson, geom_type) VALUES (?, ?, ?)", + ) + .bind(&f.name) + .bind(&f.geojson) + .bind(f.geom_type) + .execute(&mut *tx) + .await?; + } + tx.commit().await?; + Ok(()) +} + +/// in_scope = inside any polygon OR within LINE_PROXIMITY_M of any LineString. +/// Range assets are tagged by midpoint only (v1 limitation). +pub async fn apply_scope_to_assets( + pool: &SqlitePool, + geoms: &[ScopeGeom], +) -> Result { + if geoms.is_empty() { + // Reset only assets that don't have a manual override. + sqlx::query("UPDATE assets SET in_scope = NULL WHERE manual_scope IS NULL") + .execute(pool) + .await?; + return Ok(0); + } + let rows: Vec<(i64, Option, Option)> = sqlx::query_as( + "SELECT id, lat, lng FROM assets WHERE manual_scope IS NULL", + ) + .fetch_all(pool) + .await?; + let mut tx = pool.begin().await?; + let mut tagged = 0usize; + for (id, lat, lng) in rows { + let in_scope = match (lat, lng) { + (Some(la), Some(lo)) => { + let p = Point::new(lo, la); + geoms.iter().any(|g| match g { + ScopeGeom::Polygon(poly) => poly.contains(&p), + ScopeGeom::Line(line) => match line.closest_point(&p) { + Closest::SinglePoint(cp) | Closest::Intersection(cp) => { + Geodesic.distance(p, cp) <= LINE_PROXIMITY_M + } + Closest::Indeterminate => false, + }, + }) + } + _ => false, + }; + sqlx::query("UPDATE assets SET in_scope = ? WHERE id = ?") + .bind(in_scope as i64) + .bind(id) + .execute(&mut *tx) + .await?; + tagged += 1; + } + tx.commit().await?; + Ok(tagged) +} + +pub async fn load_geoms(pool: &SqlitePool) -> Result> { + let rows: Vec<(String, String)> = + sqlx::query_as("SELECT geojson, geom_type FROM scope_polygons") + .fetch_all(pool) + .await?; + let mut out = vec![]; + for (gj, gt) in rows { + let value = match serde_json::from_str::(&gj) { + Ok(v) => v, + Err(_) => continue, + }; + let coords = match value.get("coordinates") { + Some(c) => c, + None => continue, + }; + if gt == "polygon" { + let arr = match coords.as_array() { + Some(a) => a, + None => continue, + }; + let mut rings: Vec> = vec![]; + for ring in arr { + if let Some(ring_arr) = ring.as_array() { + let pts: Vec> = ring_arr + .iter() + .filter_map(|p| p.as_array()) + .filter_map(|p| { + Some(Coord { + x: p.first()?.as_f64()?, + y: p.get(1)?.as_f64()?, + }) + }) + .collect(); + if pts.len() >= 4 { + rings.push(LineString(pts)); + } + } + } + if let Some(outer) = rings.first().cloned() { + let inners: Vec> = rings.into_iter().skip(1).collect(); + out.push(ScopeGeom::Polygon(GeoPolygon::new(outer, inners))); + } + } else if gt == "linestring" { + let arr = match coords.as_array() { + Some(a) => a, + None => continue, + }; + let pts: Vec> = arr + .iter() + .filter_map(|p| p.as_array()) + .filter_map(|p| { + Some(Coord { + x: p.first()?.as_f64()?, + y: p.get(1)?.as_f64()?, + }) + }) + .collect(); + if pts.len() >= 2 { + out.push(ScopeGeom::Line(LineString(pts))); + } + } + } + Ok(out) +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json new file mode 100644 index 0000000..9d805c9 --- /dev/null +++ b/src-tauri/tauri.conf.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "kml_map_tool", + "version": "0.1.0", + "identifier": "com.seekright.kmlmap", + "build": { + "beforeDevCommand": "npm run dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build", + "frontendDist": "../dist" + }, + "app": { + "windows": [ + { + "title": "kml_map_tool", + "width": 800, + "height": 600 + } + ], + "security": { + "csp": null, + "assetProtocol": { + "enable": true, + "scope": ["**"] + } + } + }, + "bundle": { + "active": true, + "targets": "all", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ] + } +} diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..fb39c75 --- /dev/null +++ b/src/App.css @@ -0,0 +1,706 @@ +html, +body, +#root { + height: 100%; + margin: 0; + padding: 0; + font-family: Inter, Avenir, Helvetica, Arial, sans-serif; + font-size: 14px; +} + +.app { + position: relative; + height: 100vh; + width: 100vw; + overflow: hidden; +} + +.map-area { + display: flex; + flex-direction: row; + height: 100%; + width: 100%; +} + +.map-pane { + flex: 1 1 0; + min-width: 0; + height: 100%; + border-right: 1px solid #ccc; +} + +.map-pane:last-child { + border-right: none; +} + +.control-panel { + position: absolute; + top: 12px; + right: 12px; + z-index: 10; + background: rgba(255, 255, 255, 0.95); + padding: 8px 10px; + padding-right: 36px; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + width: 200px; + font-size: 12px; +} + +.control-panel h3 { + margin: 0 0 4px 0; + font-size: 12px; + font-weight: 600; + color: #333; +} + +.control-panel .field { + margin-bottom: 6px; +} + +.control-panel .field select { + padding: 3px 5px; + font-size: 12px; +} + +.primary-btn { + font-size: 12px; + padding: 5px 8px; +} + +.merge-slot { + padding: 4px 6px; + font-size: 11px; +} + +.merge-label { + flex: 0 0 50px; +} + +.panel-toggle { + position: absolute; + top: 12px; + right: 12px; + z-index: 11; + width: 32px; + height: 32px; + border-radius: 6px; + border: none; + background: rgba(255, 255, 255, 0.95); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + cursor: pointer; + font-size: 16px; + line-height: 1; + color: #2c3e50; + display: flex; + align-items: center; + justify-content: center; +} + +.panel-toggle:hover { + background: #fff; +} + +.control-panel h3 { + margin: 0 0 8px 0; + font-size: 14px; + font-weight: 600; +} + +.control-panel .field { + display: flex; + flex-direction: column; + gap: 4px; + margin-bottom: 10px; +} + +.control-panel .field > span { + font-size: 12px; + color: #555; +} + +.control-panel .field select { + padding: 6px 8px; + border: 1px solid #ccc; + border-radius: 4px; + background: #fff; + font-size: 13px; +} + +.control-panel .field.checkbox { + flex-direction: row; + align-items: center; + gap: 8px; + margin-bottom: 0; +} + +.control-panel .field.checkbox > span { + font-size: 13px; + color: #222; +} + +.primary-btn { + width: 100%; + padding: 8px 10px; + background: #2980b9; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 13px; +} + +.primary-btn:disabled { + background: #95a5a6; + cursor: not-allowed; +} + +.primary-btn:hover:not(:disabled) { + background: #2471a3; +} + +.status { + margin-top: 8px; + font-size: 12px; + color: #444; + word-break: break-word; +} + +.action-list { + list-style: none; + margin: 0; + padding: 0; + max-height: 240px; + overflow-y: auto; + border: 1px solid #eee; + border-radius: 4px; +} + +.action-list li { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + padding: 4px 6px; + border-bottom: 1px solid #f1f1f1; + font-size: 11px; +} + +.action-list li:last-child { + border-bottom: none; +} + +.action-text { + flex: 1 1 auto; + min-width: 0; + word-break: break-word; +} + +.undo-btn { + flex: 0 0 auto; + padding: 3px 8px; + background: #f1c40f; + color: #222; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 11px; +} + +.undo-btn:hover:not(:disabled) { + background: #d4ac0d; +} + +.undo-btn:disabled { + background: #ddd; + cursor: not-allowed; +} + +.redo-btn { + flex: 0 0 auto; + padding: 3px 8px; + background: #27ae60; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 11px; +} + +.redo-btn:hover:not(:disabled) { + background: #1e8449; +} + +.redo-btn:disabled { + background: #ddd; + cursor: not-allowed; +} + +.action-list li.action-undone { + opacity: 0.55; + font-style: italic; +} + +.thumb-row { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); + gap: 6px; + margin-top: 6px; +} + +.thumb { + display: block; + width: 100%; + padding: 0; + border: 1px solid #ddd; + border-radius: 4px; + background: #f5f5f5; + cursor: pointer; + overflow: hidden; +} + +.thumb:hover { + border-color: #2980b9; +} + +.thumb img { + display: block; + width: 100%; + height: 80px; + object-fit: cover; +} + +.side-chip { + display: inline-block; + margin-left: 6px; + padding: 1px 6px; + border-radius: 10px; + font-size: 10px; + font-weight: 600; + vertical-align: middle; +} + +.side-lhs, +.side-left { + background: #fffbe6; + color: #d68910; + border: 1px solid #f1c40f; +} + +.side-rhs, +.side-right { + background: #ebf5fb; + color: #1f618d; + border: 1px solid #5dade2; +} + +.hint { + margin-top: 6px; + font-size: 11px; + color: #666; + font-style: italic; +} + +.layer-toggles { + display: flex; + flex-direction: column; + gap: 4px; +} + +.layer-toggle { + display: flex; + align-items: center; + gap: 6px; + font-size: 12px; + color: #222; + cursor: pointer; +} + +.layer-toggle input { + margin: 0; +} + +/* MapLibre popup with inline image previews + caption */ +.asset-popup { + display: flex; + flex-direction: column; + gap: 6px; + min-width: 240px; +} + +.popup-imgs { + display: flex; + gap: 4px; + flex-wrap: wrap; +} + +.popup-imgs img { + width: var(--popup-img-w, 440px); + height: var(--popup-img-h, 320px); + object-fit: cover; + border-radius: 4px; + background: #eee; +} + +.popup-caption { + font-size: 13px; + color: #2c3e50; + line-height: 1.3; +} + +.popup-caption strong { + font-size: 14px; +} + +.popup-caption small { + color: #7f8c8d; + font-size: 11px; + word-break: break-all; +} + +.side-tag { + display: inline-block; + margin-left: 6px; + padding: 1px 6px; + border-radius: 10px; + font-size: 10px; + font-weight: 600; +} + +.side-tag.side-left, +.side-tag.side-lhs { + background: #fffbe6; + color: #d68910; + border: 1px solid #f1c40f; +} + +.side-tag.side-right, +.side-tag.side-rhs { + background: #ebf5fb; + color: #1f618d; + border: 1px solid #5dade2; +} + +.maplibregl-popup-content { + padding: 8px 10px !important; + border-radius: 6px !important; +} + +/* S/M/E vertex pins for range editing */ +.vertex-pin { + width: 28px; + height: 28px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + color: #fff; + font-weight: 700; + font-size: 12px; + border: 2px solid #fff; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); + cursor: grab; + user-select: none; +} + +.vertex-pin.v-start { background: #2ecc71; } +.vertex-pin.v-mid { background: #f39c12; } +.vertex-pin.v-end { background: #e74c3c; } +.vertex-pin.v-fixed { background: #1abc9c; } +.vertex-pin.v-osm { background: #ffd700; color: #222; width: 14px; height: 14px; font-size: 10px; } +.vertex-pin.v-osm-ghost { + background: rgba(255, 215, 0, 0.45); + color: #222; + width: 11px; + height: 11px; + font-size: 11px; + line-height: 11px; + border: 1px dashed #b8860b; + cursor: copy; +} +.vertex-pin.v-osm-ghost:hover { + background: #ffd700; + border-style: solid; +} + +.maplibregl-popup { + z-index: 10000 !important; +} + +.user-chip { + position: absolute; + top: 12px; + right: 100px; + padding: 4px 10px; + background: rgba(67, 97, 238, 0.9); + color: #fff; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + cursor: pointer; + z-index: 100; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} +.user-chip:hover { + background: #4361ee; +} + +.lasso-circle, +.lasso-rect { + position: absolute; + border: 2px solid #e91e63; + background: rgba(233, 30, 99, 0.15); + pointer-events: none; + z-index: 7; +} +.lasso-circle { + border-radius: 50%; +} +.lasso-rect { + border-radius: 2px; +} + +/* Modal */ +.modal-backdrop { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.45); + z-index: 100; + display: flex; + align-items: center; + justify-content: center; +} + +.modal-card { + background: #fff; + border-radius: 8px; + width: 480px; + max-width: 92vw; + max-height: 86vh; + overflow: auto; + padding: 16px 18px; + box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); + position: relative; + font-size: 13px; + color: #222; +} + +.modal-card h2 { + margin: 0 0 12px 0; + font-size: 16px; +} + +.modal-card h4 { + margin: 14px 0 6px 0; + font-size: 13px; + color: #333; +} + +.modal-close { + position: absolute; + top: 8px; + right: 12px; + background: transparent; + border: none; + font-size: 20px; + cursor: pointer; + color: #555; +} + +.modal-close:hover { color: #000; } + +.size-picker { + display: flex; + gap: 6px; +} + +.size-picker button { + flex: 1; + padding: 6px; + border: 1px solid #ccc; + background: #fafafa; + border-radius: 4px; + cursor: pointer; + font-size: 12px; +} + +.size-picker button.active { + background: #2980b9; + color: #fff; + border-color: #2471a3; +} + +/* Filters */ +.filter-section { + margin-top: 12px; +} + +.filter-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + font-size: 11px; + color: #222; + padding: 2px 0; + cursor: pointer; +} + +.filter-row input[type="checkbox"] { + margin: 0; + flex: 0 0 auto; +} + +.filter-row .count { + flex: 0 0 auto; + font-size: 10px; + color: #888; + font-variant-numeric: tabular-nums; +} + +.filter-row .label { + flex: 1 1 auto; + min-width: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.filter-summary { + font-size: 11px; + color: #555; + margin-top: 4px; +} + +.gear-btn { + position: absolute; + top: 12px; + right: 56px; + z-index: 11; + width: 32px; + height: 32px; + border-radius: 6px; + border: none; + background: rgba(255, 255, 255, 0.95); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + cursor: pointer; + font-size: 16px; + display: flex; + align-items: center; + justify-content: center; + color: #2c3e50; +} + +.gear-btn:hover { background: #fff; } + +.filter-panel { + position: absolute; + top: 12px; + left: 12px; + z-index: 10; + background: rgba(255, 255, 255, 0.95); + padding: 8px 10px; + padding-right: 36px; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + width: 220px; + font-size: 12px; + max-height: calc(100vh - 24px); + overflow-y: auto; +} + +.filter-panel h3 { + margin: 0 0 4px 0; + font-size: 12px; + font-weight: 600; + color: #333; +} + +.filter-panel h4 { + margin: 8px 0 4px 0; + font-size: 11px; + font-weight: 600; + color: #555; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.filter-close { + top: 4px !important; + right: 4px !important; + width: 26px !important; + height: 26px !important; + font-size: 14px !important; +} + +.filter-open-btn { + position: absolute; + top: 12px; + left: 12px; + z-index: 11; + padding: 6px 12px; + background: rgba(255, 255, 255, 0.95); + border: none; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + cursor: pointer; + font-size: 12px; + color: #2c3e50; +} + +.filter-open-btn:hover { background: #fff; } + +.control-panel { + max-height: calc(100vh - 24px); + overflow-y: auto; +} + +.merge-slots { + display: flex; + flex-direction: column; + gap: 6px; +} + +.merge-slot { + display: flex; + align-items: center; + gap: 6px; + padding: 6px 8px; + border: 1px solid #eee; + border-radius: 4px; + font-size: 12px; +} + +.merge-label { + flex: 0 0 60px; + color: #555; + font-weight: 500; +} + +.merge-value { + flex: 1 1 auto; + min-width: 0; + font-size: 11px; + word-break: break-word; + color: #2c3e50; +} + +.merge-pick { + flex: 0 0 auto; + padding: 3px 8px; + background: #34495e; + color: #fff; + border: none; + border-radius: 3px; + cursor: pointer; + font-size: 11px; +} + +.merge-pick:hover:not(:disabled) { + background: #2c3e50; +} + +.merge-pick:disabled { + background: #bdc3c7; + cursor: not-allowed; +} diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..7db66fe --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,3929 @@ +import { useEffect, useMemo, useRef, useState } from "react"; +import { invoke } from "@tauri-apps/api/core"; +import { open, save } from "@tauri-apps/plugin-dialog"; + +const IMAGE_FOLDER_KEY = "kml_map_tool.image_folder"; +const POPUP_SIZE_KEY = "kml_map_tool.popup_size"; +const POPUP_ENABLED_KEY = "kml_map_tool.popup_enabled"; +const POPUP_ASPECT_KEY = "kml_map_tool.popup_aspect"; + +type PopupSize = "S" | "M" | "L" | "XL"; +const POPUP_WIDTH_PX: Record = { + S: 220, + M: 330, + L: 440, + XL: 600, +}; +type PopupAspect = "16:9" | "4:3" | "3:2" | "1:1"; +const POPUP_ASPECT_VAL: Record = { + "16:9": 16 / 9, + "4:3": 4 / 3, + "3:2": 3 / 2, + "1:1": 1, +}; + +type Filters = { + videos: Set; // empty = all + sides: Set; // empty = all + types: Set<"fixed" | "range">; // empty = all + names: Set; // empty = all (asset_name) +}; +import { + MapView, + Viewport, + BoundsBox, + Vertex, + LayerVisibility, + OsmRoadFC, +} from "./MapView"; +import { BASEMAPS, DEFAULT_BASEMAP_ID } from "./basemaps"; +import type { ActionRow, Asset, ScopePolygon } from "./types"; +import "./App.css"; +import { LoginScreen } from "./LoginScreen"; + +const USER_KEY = "kml_map_tool.user"; +const NA_VIDEO = "NA"; +const NA_SENTINELS = new Set([ + "", + "na", + "n/a", + "none", + "null", + "not available", + "unknown", +]); +const displayVideo = (v: string | null | undefined) => { + if (!v) return NA_VIDEO; + const t = v.trim(); + if (t === "" || NA_SENTINELS.has(t.toLowerCase())) return NA_VIDEO; + return v; +}; + +const INITIAL_VIEWPORT: Viewport = { + center: [51.4, 25.5], + zoom: 9, +}; + +const BBOX_FETCH_DEBOUNCE_MS = 400; + +type CurrentUser = { username: string; displayName: string }; + +export default function App() { + const [currentUser, setCurrentUser] = useState(() => { + if (typeof window === "undefined") return null; + try { + const raw = window.localStorage.getItem(USER_KEY); + if (!raw) return null; + return JSON.parse(raw) as CurrentUser; + } catch { + return null; + } + }); + // Re-establish backend session whenever we have a stored user. + useEffect(() => { + if (currentUser) { + invoke("set_current_user", { username: currentUser.username }).catch( + () => {}, + ); + } + }, [currentUser]); + if (!currentUser) { + return ( + { + const u = { username, displayName }; + window.localStorage.setItem(USER_KEY, JSON.stringify(u)); + setCurrentUser(u); + }} + /> + ); + } + return { + window.localStorage.removeItem(USER_KEY); + setCurrentUser(null); + }} />; +} + +function AppShell({ + currentUser, + onLogout, +}: { + currentUser: CurrentUser; + onLogout: () => void; +}) { + const [viewport, setViewport] = useState(INITIAL_VIEWPORT); + const [bounds, setBounds] = useState(null); + const [primaryId, setPrimaryId] = useState(DEFAULT_BASEMAP_ID); + const [secondaryId, setSecondaryId] = useState("esri-imagery"); + const [compare, setCompare] = useState(false); + const [assets, setAssets] = useState([]); + const [scopePolygons, setScopePolygons] = useState([]); + const [recentActions, setRecentActions] = useState([]); + const [status, setStatus] = useState(""); + const [busy, setBusy] = useState(false); + const [selectedAssetId, setSelectedAssetId] = useState(null); + const [bulkVideoName, setBulkVideoName] = useState(""); + const [mergePrimary, setMergePrimary] = useState(null); + const [mergeSecondary, setMergeSecondary] = useState(null); + const [panelOpen, setPanelOpen] = useState(true); + const [placeMode, setPlaceMode] = useState(false); + const [imageFolder, setImageFolder] = useState(() => + typeof window !== "undefined" + ? window.localStorage.getItem(IMAGE_FOLDER_KEY) + : null, + ); + const OSM_FOLDER_KEY = "kml_map_tool.osm_folder"; + const [osmFolder, setOsmFolder] = useState(() => + typeof window !== "undefined" + ? window.localStorage.getItem(OSM_FOLDER_KEY) + : null, + ); + const [osmRoads, setOsmRoads] = useState({ + type: "FeatureCollection", + features: [], + }); + const [metadataTrack, setMetadataTrack] = useState>([]); + const [layerVisibility, setLayerVisibility] = useState({ + scope: true, + metadata: true, + osm: true, + fixed: true, + range: true, + }); + const [settingsOpen, setSettingsOpen] = useState(false); + const [popupSize, setPopupSize] = useState(() => { + if (typeof window === "undefined") return "L"; + const v = window.localStorage.getItem(POPUP_SIZE_KEY) as PopupSize | null; + return v && v in POPUP_WIDTH_PX ? v : "L"; + }); + const [popupEnabled, setPopupEnabled] = useState(() => { + if (typeof window === "undefined") return true; + const v = window.localStorage.getItem(POPUP_ENABLED_KEY); + return v === null ? true : v === "1"; + }); + const [popupAspect, setPopupAspect] = useState(() => { + if (typeof window === "undefined") return "4:3"; + const v = window.localStorage.getItem(POPUP_ASPECT_KEY) as PopupAspect | null; + return v && v in POPUP_ASPECT_VAL ? v : "4:3"; + }); + const [filters, setFilters] = useState({ + videos: new Set(), + sides: new Set(), + types: new Set(), + names: new Set(), + }); + const [videosExpanded, setVideosExpanded] = useState(false); + const [namesExpanded, setNamesExpanded] = useState(true); + const [filterPanelOpen, setFilterPanelOpen] = useState(true); + const [videoSearch, setVideoSearch] = useState(""); + const [allAssetNames, setAllAssetNames] = useState([]); + const [osmEditMode, setOsmEditMode] = useState(false); + const [editingRoadId, setEditingRoadId] = useState(null); + const [drawRoadMode, setDrawRoadMode] = useState(false); + const [drawRoadCoords, setDrawRoadCoords] = useState< + Array<[number, number]> + >([]); + const [lassoMode, setLassoMode] = useState(false); + const [lassoShape, setLassoShape] = useState<"circle" | "rect" | "polygon">( + "circle", + ); + const [lassoSelected, setLassoSelected] = useState<{ + ids: number[]; + label: string; + } | null>(null); + const [lassoPolygonPoints, setLassoPolygonPoints] = useState< + Array<[number, number]> | null + >(null); + const [linkPickMode, setLinkPickMode] = useState(false); + const [rightClickFirstId, setRightClickFirstId] = useState(null); + const [selectedLink, setSelectedLink] = useState<[number, number] | null>(null); + // GPS-bias anchors: each anchor stashes the asset's lat/lng *at the time of + // marking* so we can compute the user's hand-drag delta later. Drags are + // committed to the DB normally; Distribute reads each asset's current position + // and compares to its origLat/origLng to derive Δ. + const [anchors, setAnchors] = useState< + Map + >(new Map()); + const [autoLinkMaxM, setAutoLinkMaxM] = useState(() => { + if (typeof window === "undefined") return 30; + const v = window.localStorage.getItem("kml_map_tool.autolink_max_m"); + const n = v ? parseFloat(v) : NaN; + return Number.isFinite(n) && n > 0 ? n : 30; + }); + useEffect(() => { + window.localStorage.setItem( + "kml_map_tool.autolink_max_m", + String(autoLinkMaxM), + ); + }, [autoLinkMaxM]); + const [lassoListOpen, setLassoListOpen] = useState(false); + const [showDeleted, setShowDeleted] = useState(false); + const [showOutOfScope, setShowOutOfScope] = useState(true); + const [showInScope, setShowInScope] = useState(true); + const [visibilityOpen, setVisibilityOpen] = useState(false); + const [allVideoNames, setAllVideoNames] = useState([]); + const DUP_EPS_KEY = "kml_map_tool.dup_eps_m"; + const [dupEpsM, setDupEpsM] = useState(() => { + if (typeof window === "undefined") return 3; + const v = parseFloat(window.localStorage.getItem(DUP_EPS_KEY) ?? ""); + return Number.isFinite(v) && v > 0 ? v : 3; + }); + useEffect(() => { + window.localStorage.setItem(DUP_EPS_KEY, String(dupEpsM)); + }, [dupEpsM]); + type DupMember = { + id: number; + row_id: string; + asset_name: string; + video_name: string; + side: string | null; + lat: number | null; + lng: number | null; + asset_type: string; + }; + type DupCluster = { id: number; asset_name: string; members: DupMember[] }; + const [dupClusters, setDupClusters] = useState([]); + const [dupActive, setDupActive] = useState(null); + const [dupKeep, setDupKeep] = useState>(new Map()); + const [dupCrossOnly, setDupCrossOnly] = useState(false); + const [classNames, setClassNames] = useState([]); + const [renameOpen, setRenameOpen] = useState< + null | { ids: number[]; current: string } + >(null); + const [renameInput, setRenameInput] = useState(""); + const [osmToolsOpen, setOsmToolsOpen] = useState(false); + const [importsOpen, setImportsOpen] = useState(false); + const [osmToolPrune, setOsmToolPrune] = useState(true); + const [osmToolPruneClasses, setOsmToolPruneClasses] = useState( + "service,residential,unclassified,footway,path,track,cycleway,pedestrian,living_street,busway", + ); + const savedVisRef = useRef(null); + const CENTERLINE_NAMES_KEY = "kml_map_tool.centerline_names"; + const [centerlineNames, setCenterlineNames] = useState>(() => { + if (typeof window === "undefined") return new Set(); + try { + const raw = window.localStorage.getItem(CENTERLINE_NAMES_KEY); + return new Set(raw ? (JSON.parse(raw) as string[]) : []); + } catch { + return new Set(); + } + }); + useEffect(() => { + window.localStorage.setItem( + CENTERLINE_NAMES_KEY, + JSON.stringify(Array.from(centerlineNames)), + ); + }, [centerlineNames]); + const ROAD_OFFSET_KEY = "kml_map_tool.road_offset_m"; + const [roadOffsetMeters, setRoadOffsetMeters] = useState(() => { + if (typeof window === "undefined") return 4; + const v = parseFloat(window.localStorage.getItem(ROAD_OFFSET_KEY) ?? ""); + return Number.isFinite(v) && v > 0 ? v : 4; + }); + useEffect(() => { + window.localStorage.setItem(ROAD_OFFSET_KEY, String(roadOffsetMeters)); + }, [roadOffsetMeters]); + + useEffect(() => { + const w = POPUP_WIDTH_PX[popupSize]; + const h = Math.round(w / POPUP_ASPECT_VAL[popupAspect]); + document.documentElement.style.setProperty("--popup-img-w", `${w}px`); + document.documentElement.style.setProperty("--popup-img-h", `${h}px`); + window.localStorage.setItem(POPUP_SIZE_KEY, popupSize); + window.localStorage.setItem(POPUP_ASPECT_KEY, popupAspect); + }, [popupSize, popupAspect]); + useEffect(() => { + window.localStorage.setItem(POPUP_ENABLED_KEY, popupEnabled ? "1" : "0"); + }, [popupEnabled]); + + // Counts on the current bbox slice (live update as user pans/zooms). + const counts = useMemo(() => { + const byVideo = new Map(); + const bySide = new Map(); + const byType = new Map(); + for (const a of assets) { + const vn = displayVideo(a.video_name); + byVideo.set(vn, (byVideo.get(vn) ?? 0) + 1); + const s = a.side ?? "(none)"; + bySide.set(s, (bySide.get(s) ?? 0) + 1); + byType.set(a.asset_type, (byType.get(a.asset_type) ?? 0) + 1); + } + return { byVideo, bySide, byType }; + }, [assets]); + + const filteredAssets = useMemo(() => { + return assets.filter((a) => { + if (filters.videos.size && !filters.videos.has(displayVideo(a.video_name))) + return false; + if (filters.sides.size) { + const s = a.side ?? "(none)"; + if (!filters.sides.has(s)) return false; + } + if (filters.types.size && !filters.types.has(a.asset_type)) return false; + if (filters.names.size && !filters.names.has(a.asset_name)) return false; + // Video filter: explicit list. If allVideoNames is loaded and the asset's + // video isn't in filters.videos, hide it. + if ( + allVideoNames.length > 0 && + !filters.videos.has(displayVideo(a.video_name)) + ) + return false; + const inScope = a.in_scope !== 0; + if (!showOutOfScope && !inScope) return false; + if (!showInScope && inScope) return false; + return true; + }); + }, [assets, filters, showOutOfScope, showInScope, allVideoNames]); + + // Per-asset_name counts within the current video/side/type filter context + // (but ignoring the names filter itself, so toggling a name doesn't make the + // others disappear). + const namesCounts = useMemo(() => { + const m = new Map(); + for (const a of assets) { + if (filters.videos.size && !filters.videos.has(displayVideo(a.video_name))) + continue; + if (filters.sides.size) { + const s = a.side ?? "(none)"; + if (!filters.sides.has(s)) continue; + } + if (filters.types.size && !filters.types.has(a.asset_type)) continue; + m.set(a.asset_name, (m.get(a.asset_name) ?? 0) + 1); + } + return m; + }, [assets, filters.videos, filters.sides, filters.types]); + + function toggleSet(set: Set, value: T): Set { + const next = new Set(set); + if (next.has(value)) next.delete(value); + else next.add(value); + return next; + } + + function clearFilters() { + setFilters({ + videos: new Set(), + sides: new Set(), + types: new Set(), + names: new Set(), + }); + } + + const NUDGE_METERS = 0.5; + + const selectedAsset = useMemo( + () => assets.find((a) => a.id === selectedAssetId) ?? null, + [assets, selectedAssetId], + ); + + const navigableAssets = useMemo(() => { + return [...filteredAssets].sort((a, b) => { + const va = displayVideo(a.video_name).localeCompare( + displayVideo(b.video_name), + ); + if (va !== 0) return va; + return a.id - b.id; + }); + }, [filteredAssets]); + + // Memoize colorBy decision — at 50k filtered assets, rebuilding two Sets on + // every parent render was burning meaningful CPU. + const colorBy = useMemo<"video" | "asset" | "side">(() => { + const vids = new Set(); + const names = new Set(); + for (const a of filteredAssets) { + vids.add(displayVideo(a.video_name)); + names.add(a.asset_name); + if (vids.size > 1 && names.size > 1) break; // early-out: result will be "video" + } + if (vids.size <= 1 && names.size === 1) return "side"; + if (vids.size <= 1) return "asset"; + return "video"; + }, [filteredAssets]); + + function gotoAdjacent(dir: -1 | 1) { + if (navigableAssets.length === 0) return; + let idx = -1; + if (selectedAssetId !== null) { + idx = navigableAssets.findIndex((a) => a.id === selectedAssetId); + } + const next = + idx === -1 + ? navigableAssets[0] + : navigableAssets[ + (idx + dir + navigableAssets.length) % navigableAssets.length + ]; + setSelectedAssetId(next.id); + if (next.lat !== null && next.lng !== null) { + setViewport((v) => ({ + center: [next.lng as number, next.lat as number], + zoom: Math.max(v.zoom, 16), + })); + } + setStatus( + `Selected ${next.asset_name} · ${next.row_id} (${navigableAssets.indexOf(next) + 1}/${navigableAssets.length})`, + ); + } + + const debounceRef = useRef(null); + const fetchSeqRef = useRef(0); + const boundsRef = useRef(null); + + async function fetchBboxAssets(b: BoundsBox) { + const seq = ++fetchSeqRef.current; + const list = await invoke("get_assets_in_bbox", { + minLat: b.south, + maxLat: b.north, + minLng: b.west, + maxLng: b.east, + includeDeleted: showDeleted, + }); + if (seq === fetchSeqRef.current) { + setAssets(list); + } + return list; + } + + useEffect(() => { + if (!bounds) return; + boundsRef.current = bounds; + // Skip fetch when assets are hidden — OSM edit mode hides the asset layers, + // and lasso/draw modes intercept all pointer events. Refetching would just + // burn CPU rebuilding deck layers that nobody can see or interact with. + if (osmEditMode || lassoMode || drawRoadMode) return; + if (debounceRef.current !== null) { + window.clearTimeout(debounceRef.current); + } + debounceRef.current = window.setTimeout(() => { + fetchBboxAssets(bounds).catch((e) => setStatus(`Fetch failed: ${e}`)); + }, BBOX_FETCH_DEBOUNCE_MS); + void showDeleted; + return () => { + if (debounceRef.current !== null) { + window.clearTimeout(debounceRef.current); + debounceRef.current = null; + } + }; + }, [bounds, showDeleted, osmEditMode, lassoMode, drawRoadMode]); + + async function handlePositionChange( + id: number, + vertex: Vertex, + lat: number, + lng: number, + ) { + try { + await invoke("update_asset_position", { id, vertex, lat, lng }); + setStatus(`Moved ${vertex} to ${lat.toFixed(6)}, ${lng.toFixed(6)}`); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Move failed: ${e}`); + } + } + + function defaultVertex(a: Asset): Vertex { + return a.asset_type === "fixed" ? "fixed" : "mid"; + } + + async function handlePlaceAt(lat: number, lng: number) { + if (!selectedAsset) return; + setPlaceMode(false); + await handlePositionChange( + selectedAsset.id, + defaultVertex(selectedAsset), + lat, + lng, + ); + } + + // ESC: deselect editing road (or cancel a draw-in-progress). + useEffect(() => { + const handler = (e: KeyboardEvent) => { + if ((e.key === "Delete" || e.key === "Backspace") && selectedLink) { + const target = e.target as HTMLElement | null; + const tag = target?.tagName; + if (tag === "INPUT" || tag === "TEXTAREA" || target?.isContentEditable) { + return; + } + e.preventDefault(); + const [idA, idB] = selectedLink; + setSelectedLink(null); + invoke("clear_link", { id: idA }) + .then(() => setStatus(`Unlinked #${idA} ↔ #${idB}`)) + .then(refreshAfterMutation) + .catch((err) => setStatus(`Unlink failed: ${err}`)); + return; + } + if (e.key !== "Escape") return; + if (lassoMode) { + e.preventDefault(); + setLassoMode(false); + setLassoSelected(null); + setLassoPolygonPoints(null); + setStatus("Lasso cancelled."); + return; + } + if (linkPickMode) { + e.preventDefault(); + setLinkPickMode(false); + } else if (rightClickFirstId !== null) { + e.preventDefault(); + setRightClickFirstId(null); + setStatus("Pair link cancelled."); + } else if (drawRoadMode) { + e.preventDefault(); + cancelDrawRoad(); + } else if (editingRoadId !== null) { + e.preventDefault(); + setEditingRoadId(null); + setStatus("Cleared road selection."); + } + }; + window.addEventListener("keydown", handler); + return () => window.removeEventListener("keydown", handler); + }, [drawRoadMode, editingRoadId, linkPickMode, rightClickFirstId, lassoMode, selectedLink]); + + // Image prefetch: when an asset is selected, warm the browser cache for its + // immediate neighbours so [/] navigation feels instant. + useEffect(() => { + if (!selectedAsset) return; + const idx = navigableAssets.findIndex((a) => a.id === selectedAsset.id); + if (idx === -1) return; + const targets = [ + navigableAssets[idx - 1], + navigableAssets[idx + 1], + navigableAssets[idx + 2], + navigableAssets[idx - 2], + ].filter(Boolean); + const handles: HTMLImageElement[] = []; + for (const a of targets) { + const urls = [ + a.image_path, + a.image_path1, + a.image_path2, + a.image_path3, + ].filter((u): u is string => !!u); + for (const u of urls) { + const i = new Image(); + i.decoding = "async"; + i.src = u; // bypass resolveImageSrc — http(s) URLs go direct anyway + handles.push(i); + } + } + return () => { + // Allow GC; aborting in-flight image fetches is best-effort. + for (const i of handles) { + i.src = ""; + } + }; + }, [selectedAsset, navigableAssets]); + + // Global prev/next navigation: `[` and `]` cycle through filtered assets. + useEffect(() => { + const handler = (e: KeyboardEvent) => { + if ( + e.target instanceof HTMLInputElement || + e.target instanceof HTMLTextAreaElement || + e.target instanceof HTMLSelectElement + ) { + return; + } + if (e.key === "]" || e.key === "}") { + e.preventDefault(); + gotoAdjacent(1); + } else if (e.key === "[" || e.key === "{") { + e.preventDefault(); + gotoAdjacent(-1); + } + }; + window.addEventListener("keydown", handler); + return () => window.removeEventListener("keydown", handler); + }, [navigableAssets, selectedAssetId]); + + // Keyboard arrow nudge for the selected asset (mid for range, fixed for fixed). + useEffect(() => { + if (!selectedAsset) return; + const a = selectedAsset; + const handler = (e: KeyboardEvent) => { + if ( + e.target instanceof HTMLInputElement || + e.target instanceof HTMLTextAreaElement || + e.target instanceof HTMLSelectElement + ) { + return; + } + const arrows: Record = { + ArrowUp: [1, 0], + ArrowDown: [-1, 0], + ArrowLeft: [0, -1], + ArrowRight: [0, 1], + }; + const dir = arrows[e.key]; + if (!dir) return; + const baseLat = + (a.asset_type === "fixed" ? a.lat : a.lat) ?? viewport.center[1]; + const baseLng = + (a.asset_type === "fixed" ? a.lng : a.lng) ?? viewport.center[0]; + if (baseLat === null || baseLng === null) return; + e.preventDefault(); + const dLat = (dir[0] * NUDGE_METERS) / 111320; + const dLng = + (dir[1] * NUDGE_METERS) / + (111320 * Math.cos((baseLat * Math.PI) / 180)); + handlePositionChange( + a.id, + defaultVertex(a), + (baseLat as number) + dLat, + (baseLng as number) + dLng, + ).catch(() => {}); + }; + window.addEventListener("keydown", handler); + return () => window.removeEventListener("keydown", handler); + }, [selectedAsset, viewport.center]); + + async function handleDeleteSelected() { + if (!selectedAsset) return; + try { + await invoke("delete_asset", { id: selectedAsset.id }); + setStatus(`Deleted ${selectedAsset.asset_name} · ${selectedAsset.row_id}`); + setSelectedAssetId(null); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Delete failed: ${e}`); + } + } + + async function handleBulkDeleteByVideo() { + const name = bulkVideoName.trim(); + if (!name) { + setStatus("Enter a video name first."); + return; + } + try { + const count = await invoke("delete_assets_by_video", { + videoName: name, + }); + if (count === 0) { + setStatus(`No live assets matched video "${name}"`); + } else { + setStatus(`Deleted ${count} assets from video "${name}"`); + setBulkVideoName(""); + } + await refreshAfterMutation(); + } catch (e) { + setStatus(`Bulk delete failed: ${e}`); + } + } + + async function handleSetImageFolder() { + if (busy) return; + try { + const picked = await open({ directory: true, multiple: false }); + if (typeof picked !== "string") return; + setImageFolder(picked); + window.localStorage.setItem(IMAGE_FOLDER_KEY, picked); + setStatus(`Image folder: ${picked}`); + } catch (e) { + setStatus(`Folder pick failed: ${e}`); + } + } + + function handleClearImageFolder() { + setImageFolder(null); + window.localStorage.removeItem(IMAGE_FOLDER_KEY); + setStatus("Cleared image folder; using image_path as-is."); + } + + async function handleResetDatabase() { + if (busy) return; + const ok = window.confirm( + "Wipe ALL assets, scope polygons, and action history?\n\nThis cannot be undone.", + ); + if (!ok) return; + setBusy(true); + try { + await invoke("reset_database"); + setAssets([]); + setScopePolygons([]); + setRecentActions([]); + setSelectedAssetId(null); + setMergePrimary(null); + setMergeSecondary(null); + setStatus("Database reset."); + } catch (e) { + setStatus(`Reset failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleUndo(actionId: number) { + try { + await invoke("undo_action", { actionId }); + setStatus(`Undone action #${actionId}`); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Undo failed: ${e}`); + } + } + + async function handleRedo(actionId: number) { + try { + await invoke("redo_action", { actionId }); + setStatus(`Redone action #${actionId}`); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Redo failed: ${e}`); + } + } + + function pickMergeSlot(slot: "primary" | "secondary") { + if (!selectedAsset) { + setStatus("Select a range asset first."); + return; + } + if (selectedAsset.asset_type !== "range") { + setStatus("Merge only works on range assets."); + return; + } + if (slot === "primary") setMergePrimary(selectedAsset); + else setMergeSecondary(selectedAsset); + } + + async function handleMerge() { + if (!mergePrimary || !mergeSecondary) return; + if (mergePrimary.id === mergeSecondary.id) { + setStatus("Primary and secondary must differ."); + return; + } + try { + await invoke("merge_polylines", { + primaryId: mergePrimary.id, + secondaryId: mergeSecondary.id, + }); + setStatus( + `Merged ${mergeSecondary.row_id} into ${mergePrimary.row_id}`, + ); + setMergePrimary(null); + setMergeSecondary(null); + setSelectedAssetId(null); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Merge failed: ${e}`); + } + } + + function formatAction(a: ActionRow): string { + let count = 1; + try { + count = (JSON.parse(a.asset_ids) as number[]).length; + } catch { + /* ignore */ + } + switch (a.action_type) { + case "move": + return `Moved asset (${count})`; + case "delete": + return `Deleted asset (${count})`; + case "delete_by_video": + return `Deleted ${count} assets by video`; + case "merge": + return `Merged ${count} polylines`; + case "bulk_snap": + return `Bulk-snapped ${count} to road`; + case "set_scope": + return `Set scope on ${count}`; + case "rename": + return `Renamed ${count}`; + case "change_side": + return `Side change on ${count}`; + case "link": + return a.scope === "single" ? `Link change` : `Auto-linked ${count}`; + case "restore": + return `Restored ${count}`; + case "reset_position": + return `Reset ${count} to original`; + case "bulk_translate": + return `Distributed correction across ${count}`; + default: + return `${a.action_type} (${count})`; + } + } + + async function refreshScopePolygons() { + const list = await invoke("get_scope_polygons"); + setScopePolygons(list); + return list; + } + + async function refreshOsmRoads() { + const list = await invoke< + Array<{ id: number; name: string | null; geojson: string }> + >("get_osm_roads"); + setOsmRoads({ + type: "FeatureCollection", + features: list.map((r) => ({ + type: "Feature", + geometry: JSON.parse(r.geojson), + properties: { id: r.id, name: r.name }, + })), + }); + return list; + } + + async function refreshAssetNames() { + try { + const list = await invoke("list_asset_names"); + setAllAssetNames(list); + } catch { + /* ignore */ + } + } + + async function refreshVideoNames() { + try { + const raw = await invoke("list_video_names"); + const list = Array.from(new Set(raw.map(displayVideo))).sort(); + // Auto-include only videos we haven't seen before, so user de-selections + // survive every mutation refresh. + setFilters((f) => { + const previouslyKnown = new Set(allVideoNames); + const next = new Set(f.videos); + if (allVideoNames.length === 0) { + // First run: include everything. + for (const v of list) next.add(v); + } else { + // Subsequent runs: only auto-include genuinely new entries. + for (const v of list) { + if (!previouslyKnown.has(v)) next.add(v); + } + } + return { ...f, videos: next }; + }); + setAllVideoNames(list); + } catch { + /* ignore */ + } + } + + async function refreshClasses() { + try { + const list = await invoke("list_classes"); + setClassNames(list); + } catch { + /* ignore */ + } + } + + async function refreshActions() { + const list = await invoke("list_recent_actions", { limit: 10 }); + setRecentActions(list); + return list; + } + + async function refreshAfterMutation() { + const tasks: Promise[] = [ + refreshActions(), + refreshAssetNames(), + refreshVideoNames(), + refreshClasses(), + ]; + if (boundsRef.current) tasks.push(fetchBboxAssets(boundsRef.current)); + await Promise.all(tasks); + } + + useEffect(() => { + refreshScopePolygons().catch((e) => + setStatus(`Scope load failed: ${e}`), + ); + refreshOsmRoads().catch(() => {}); + refreshActions().catch(() => {}); + refreshAssetNames().catch(() => {}); + refreshVideoNames().catch(() => {}); + refreshClasses().catch(() => {}); + invoke("list_assets") + .then((list) => { + if (list.length > 0) { + setStatus(`${list.length} assets in DB`); + const first = list.find((a) => a.lat !== null && a.lng !== null); + if (first) { + setViewport({ + center: [first.lng as number, first.lat as number], + zoom: 13, + }); + } + } + }) + .catch((e) => setStatus(`Load failed: ${e}`)); + }, []); + + function toggleOsmEditMode() { + if (osmEditMode) { + // Exit: restore previous layer visibility. + if (savedVisRef.current) { + setLayerVisibility(savedVisRef.current); + savedVisRef.current = null; + } + setEditingRoadId(null); + setDrawRoadMode(false); + setDrawRoadCoords([]); + setOsmEditMode(false); + setStatus("Exited OSM edit mode."); + } else { + // Enter: snapshot visibility and hide non-OSM layers. + savedVisRef.current = layerVisibility; + setLayerVisibility({ + scope: false, + metadata: false, + osm: true, + fixed: false, + range: false, + }); + setSelectedAssetId(null); + setOsmEditMode(true); + setStatus("OSM edit mode: click a road to edit its vertices."); + } + } + + function startDrawRoad() { + setDrawRoadCoords([]); + setDrawRoadMode(true); + setEditingRoadId(null); + setStatus("Click on the map to add vertices. Finish to save."); + } + + function cancelDrawRoad() { + setDrawRoadMode(false); + setDrawRoadCoords([]); + setStatus("Cancelled new road."); + } + + function handleDrawRoadAddPoint(lat: number, lng: number) { + setDrawRoadCoords((prev) => [...prev, [lng, lat] as [number, number]]); + } + + async function finishDrawRoad() { + if (drawRoadCoords.length < 2) { + setStatus("A road needs at least 2 vertices."); + return; + } + const name = window.prompt("Road name (optional):", "") || null; + try { + const newId = await invoke("create_osm_road", { + name, + coords: drawRoadCoords, + }); + await refreshOsmRoads(); + setDrawRoadMode(false); + setDrawRoadCoords([]); + setEditingRoadId(newId); + setStatus( + `Created road #${newId} with ${drawRoadCoords.length} vertices.`, + ); + } catch (e) { + setStatus(`Create road failed: ${e}`); + } + } + + async function handleDeleteRoad() { + if (editingRoadId === null) return; + const ok = window.confirm(`Delete road #${editingRoadId}?`); + if (!ok) return; + try { + await invoke("delete_osm_road", { id: editingRoadId }); + await refreshOsmRoads(); + setEditingRoadId(null); + setStatus(`Deleted road #${editingRoadId}.`); + } catch (e) { + setStatus(`Delete failed: ${e}`); + } + } + + async function handleUpdateRoad( + id: number, + coords: Array<[number, number]>, + ) { + try { + await invoke("update_osm_road", { id, coords }); + await refreshOsmRoads(); + setStatus(`Updated road #${id} (${coords.length} vertices).`); + } catch (e) { + setStatus(`Road update failed: ${e}`); + } + } + + async function handleImportOsm() { + if (busy) return; + setBusy(true); + setStatus("Picking GeoJSON…"); + try { + const picked = await open({ + multiple: false, + directory: false, + filters: [{ name: "GeoJSON", extensions: ["geojson", "json"] }], + }); + if (typeof picked !== "string") { + setStatus(""); + return; + } + const majorOnly = window.confirm( + "Import MAJOR roads only (motorway/trunk/primary/secondary/tertiary)?\n\nClick OK to filter; Cancel to import all road classes (warning: can be very slow on large GeoJSONs).", + ); + const args: Record = { path: picked }; + if (majorOnly) { + args.highwayClasses = [ + "motorway", + "motorway_link", + "trunk", + "trunk_link", + "primary", + "primary_link", + "secondary", + "secondary_link", + "tertiary", + "tertiary_link", + ]; + } + setStatus("Importing OSM roads…"); + const count = await invoke("import_osm_geojson", args); + await refreshOsmRoads(); + setStatus(`Loaded ${count} road segment(s)`); + } catch (e) { + setStatus(`OSM import failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function pickOsmFolder() { + const picked = await open({ directory: true, multiple: false }); + if (typeof picked !== "string") return; + setOsmFolder(picked); + window.localStorage.setItem(OSM_FOLDER_KEY, picked); + setStatus(`OSM folder: ${picked}`); + } + + async function ensureOsmFolder(): Promise { + if (osmFolder) return osmFolder; + const picked = await open({ directory: true, multiple: false }); + if (typeof picked !== "string") return null; + setOsmFolder(picked); + window.localStorage.setItem(OSM_FOLDER_KEY, picked); + return picked; + } + + async function handleGenerateOsm() { + if (busy) return; + if (!boundsRef.current) { + setStatus("Pan/zoom the map first."); + return; + } + const folder = await ensureOsmFolder(); + if (!folder) return; + const b = boundsRef.current; + const sep = + folder.endsWith("/") || folder.endsWith("\\") ? "" : "/"; + const ts = new Date().toISOString().replace(/[:.]/g, "-").slice(0, 19); + const path = `${folder}${sep}osm_${b.south.toFixed(4)}_${b.west.toFixed(4)}_${b.north.toFixed(4)}_${b.east.toFixed(4)}_${ts}.geojson`; + setBusy(true); + setStatus("Fetching OSM from Overpass…"); + try { + const n = await invoke("generate_osm_for_bbox", { + minLat: b.south, + minLng: b.west, + maxLat: b.north, + maxLng: b.east, + path, + }); + setStatus( + `Generated ${n} OSM way(s) → ${path}. Use Import → OSM roads to load.`, + ); + } catch (e) { + setStatus(`Generate OSM failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleExportOsm() { + if (busy) return; + const folder = await ensureOsmFolder(); + if (!folder) return; + const sep = + folder.endsWith("/") || folder.endsWith("\\") ? "" : "/"; + const ts = new Date().toISOString().replace(/[:.]/g, "-").slice(0, 19); + const path = `${folder}${sep}osm_export_${ts}.geojson`; + setBusy(true); + try { + const n = await invoke("export_osm_roads", { path }); + setStatus(`Exported ${n} road(s) → ${path}`); + } catch (e) { + setStatus(`Export OSM failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function applyOsmTools() { + if (busy) return; + setBusy(true); + try { + const summary: string[] = []; + if (osmToolPrune) { + const classes = osmToolPruneClasses + .split(",") + .map((s) => s.trim()) + .filter((s) => s !== ""); + if (classes.length > 0) { + const n = await invoke("delete_roads_by_highway", { classes }); + summary.push(`pruned ${n}`); + } + } + await refreshOsmRoads(); + setOsmToolsOpen(false); + setStatus( + summary.length > 0 ? `OSM tools: ${summary.join("; ")}.` : "Nothing selected.", + ); + } catch (e) { + setStatus(`OSM tools failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleLoadMetadataPolyline() { + if (busy) return; + setBusy(true); + setStatus("Picking metadata polyline JSON…"); + try { + const picked = await open({ + multiple: false, + directory: false, + filters: [{ name: "JSON", extensions: ["json"] }], + }); + if (typeof picked !== "string") { + setStatus(""); + return; + } + const track = await invoke>( + "read_metadata_polyline", + { path: picked }, + ); + setMetadataTrack(track); + setStatus(`Loaded ${track.length}-point metadata polyline`); + } catch (e) { + setStatus(`Metadata polyline failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleSnapByVideo() { + if (busy) return; + const name = bulkVideoName.trim(); + if (!name) { + setStatus("Pick a video name first (use the bulk-delete input)."); + return; + } + const ok = window.confirm( + `Snap every asset (fixed + range) from video "${name}" to the nearest OSM road?\n\n` + + `Single undoable action.`, + ); + if (!ok) return; + setBusy(true); + try { + const res = await invoke<{ + snapped: number; + skipped_far: number; + skipped_no_geom: number; + }>("snap_assets_in_bbox", { + minLat: null, + maxLat: null, + minLng: null, + maxLng: null, + videoName: name, + maxDistanceM: 50, + offsetM: roadOffsetMeters, + centerlineNames: Array.from(centerlineNames), + metadataTrack: metadataTrack.length >= 2 ? metadataTrack : null, + }); + setStatus( + `Snap by video: ${res.snapped} moved, ${res.skipped_far} too far, ${res.skipped_no_geom} skipped`, + ); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Snap by video failed: ${e}`); + } finally { + setBusy(false); + } + } + + function handleLassoComplete( + shape: "circle" | "rect" | "polygon", + points: Array<[number, number]>, + ) { + const R = 6371000; + const toRad = (d: number) => (d * Math.PI) / 180; + const haversine = (a: [number, number], b: [number, number]) => { + const dLat = toRad(b[1] - a[1]); + const dLng = toRad(b[0] - a[0]); + const s = + Math.sin(dLat / 2) ** 2 + + Math.cos(toRad(a[1])) * + Math.cos(toRad(b[1])) * + Math.sin(dLng / 2) ** 2; + return 2 * R * Math.asin(Math.sqrt(s)); + }; + const ids: number[] = []; + let label = ""; + if (shape === "circle") { + const center = points[0]; + const edge = points[1]; + const radius = haversine(center, edge); + if (radius < 1) { + setStatus("Lasso too small."); + return; + } + for (const a of filteredAssets) { + if (a.deleted !== 0) continue; + if (a.lat === null || a.lng === null) continue; + if (haversine(center, [a.lng, a.lat]) <= radius) ids.push(a.id); + } + label = `circle r=${radius.toFixed(0)} m`; + } else if (shape === "rect") { + const [a, b] = points; + const minLng = Math.min(a[0], b[0]); + const maxLng = Math.max(a[0], b[0]); + const minLat = Math.min(a[1], b[1]); + const maxLat = Math.max(a[1], b[1]); + if (maxLng - minLng < 1e-6 || maxLat - minLat < 1e-6) { + setStatus("Lasso too small."); + return; + } + for (const x of filteredAssets) { + if (x.deleted !== 0) continue; + if (x.lat === null || x.lng === null) continue; + if ( + x.lng >= minLng && + x.lng <= maxLng && + x.lat >= minLat && + x.lat <= maxLat + ) + ids.push(x.id); + } + label = "bbox"; + } else { + // polygon: ray-casting test + const verts = points; + if (verts.length < 3) { + setStatus("Need at least 3 polygon vertices."); + return; + } + setLassoPolygonPoints(verts); + const insidePoly = (lng: number, lat: number) => { + let inside = false; + for (let i = 0, j = verts.length - 1; i < verts.length; j = i++) { + const xi = verts[i][0], + yi = verts[i][1]; + const xj = verts[j][0], + yj = verts[j][1]; + const intersect = + yi > lat !== yj > lat && + lng < ((xj - xi) * (lat - yi)) / (yj - yi + 1e-12) + xi; + if (intersect) inside = !inside; + } + return inside; + }; + for (const x of filteredAssets) { + if (x.deleted !== 0) continue; + if (x.lat === null || x.lng === null) continue; + if (insidePoly(x.lng, x.lat)) ids.push(x.id); + } + label = `polygon (${verts.length})`; + } + if (ids.length === 0) { + setStatus(`Lasso (${label}) selected nothing.`); + return; + } + setLassoSelected({ ids, label }); + setLassoMode(false); + setStatus(`Lasso (${label}) selected ${ids.length} asset(s)`); + } + + function naturalCompare(a: string, b: string): number { + return a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }); + } + + async function handleDistribute() { + if (anchors.size === 0) return; + // Snapshot anchor deltas from the current DB state vs the captured originals. + type Anchor = { + id: number; + origLat: number; + origLng: number; + curLat: number; + curLng: number; + rowId: string; + dlat: number; + dlng: number; + }; + const anchorList: Anchor[] = []; + for (const [id, info] of anchors) { + const cur = filteredAssets.find((a) => a.id === id); + if (!cur || cur.lat === null || cur.lng === null) continue; + anchorList.push({ + id, + origLat: info.origLat, + origLng: info.origLng, + curLat: cur.lat, + curLng: cur.lng, + rowId: info.rowId, + dlat: cur.lat - info.origLat, + dlng: cur.lng - info.origLng, + }); + } + if (anchorList.length === 0) { + setStatus("No usable anchors (assets may have been deleted)."); + return; + } + const moved = anchorList.filter( + (a) => Math.abs(a.dlat) + Math.abs(a.dlng) > 1e-9, + ); + if (moved.length === 0) { + setStatus( + "Anchors haven't been moved yet. Drag the gold-ringed asset(s) to where they belong, then click Distribute.", + ); + return; + } + anchorList.sort((a, b) => naturalCompare(a.rowId, b.rowId)); + const anchorIds = new Set(anchorList.map((a) => a.id)); + + // Build the corrections payload for every visible filtered asset that + // isn't itself an anchor (anchors already moved, no need to re-translate). + const targets = filteredAssets + .filter( + (a) => + a.deleted === 0 && + a.lat !== null && + a.lng !== null && + !anchorIds.has(a.id), + ) + .slice() + .sort((a, b) => naturalCompare(a.row_id, b.row_id)); + + const corrections: Array<{ id: number; dlat: number; dlng: number }> = []; + + if (anchorList.length === 1) { + const { dlat, dlng } = anchorList[0]; + for (const t of targets) corrections.push({ id: t.id, dlat, dlng }); + } else { + // Piecewise linear interp by row_id ordering. Build a single sorted + // sequence of {kind, rowId, payload} and assign each entry a rank. + type Entry = + | { kind: "anchor"; anchor: Anchor; rank: number } + | { kind: "target"; asset: Asset; rank: number }; + const merged: Entry[] = [ + ...anchorList.map( + (a) => ({ kind: "anchor", anchor: a, rank: 0 }) as Entry, + ), + ...targets.map( + (t) => ({ kind: "target", asset: t, rank: 0 }) as Entry, + ), + ]; + merged.sort((x, y) => { + const xr = x.kind === "anchor" ? x.anchor.rowId : x.asset.row_id; + const yr = y.kind === "anchor" ? y.anchor.rowId : y.asset.row_id; + return naturalCompare(xr, yr); + }); + merged.forEach((e, i) => (e.rank = i)); + const anchorByRank = merged.filter((e) => e.kind === "anchor") as Array< + Extract + >; + for (const e of merged) { + if (e.kind !== "target") continue; + // Find bracketing anchors by rank. + let left: (typeof anchorByRank)[number] | null = null; + let right: (typeof anchorByRank)[number] | null = null; + for (const a of anchorByRank) { + if (a.rank <= e.rank) left = a; + else { + right = a; + break; + } + } + let dlat: number; + let dlng: number; + if (left && right) { + const span = right.rank - left.rank; + const tt = span > 0 ? (e.rank - left.rank) / span : 0; + dlat = left.anchor.dlat + (right.anchor.dlat - left.anchor.dlat) * tt; + dlng = left.anchor.dlng + (right.anchor.dlng - left.anchor.dlng) * tt; + } else { + // Asset is outside the [firstAnchor, lastAnchor] span. Leave it alone + // — multi-anchor mode only corrects what's between the bookends. + continue; + } + corrections.push({ id: e.asset.id, dlat, dlng }); + } + } + + if (corrections.length === 0) { + setStatus("Nothing to distribute (no other visible assets)."); + return; + } + const ok = window.confirm( + `Distribute correction across ${corrections.length} asset(s) using ${moved.length} anchor(s)?`, + ); + if (!ok) return; + setBusy(true); + try { + const n = await invoke("bulk_translate", { corrections }); + setStatus(`Distributed correction across ${n} asset(s). Use Undo to revert.`); + setAnchors(new Map()); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Distribute failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleAutoLink(splitBy: "side" | "video" | "none") { + if (!lassoPolygonPoints || lassoPolygonPoints.length < 3) { + setStatus("Use the polygon lasso to define a region first."); + return; + } + setBusy(true); + try { + const res = await invoke<{ + linked: number; + leftover_a: number; + leftover_b: number; + }>("auto_link_in_polygon", { + polygon: lassoPolygonPoints, + splitBy, + maxDistanceM: autoLinkMaxM, + }); + setStatus( + `Auto-linked ${res.linked} pair(s) by ${splitBy}; leftover ${res.leftover_a} + ${res.leftover_b}. Right-click pairs to correct, then re-run to rebalance.`, + ); + // Keep lassoPolygonPoints + lassoSelected so the user can right-click to + // correct individual pairs and then re-run auto-link to rebalance the + // orphans. Locked manual links survive every re-run. + await refreshAfterMutation(); + } catch (e) { + setStatus(`Auto-link failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleSetLink(otherId: number) { + if (!selectedAsset) return; + setBusy(true); + try { + await invoke("set_link", { aId: selectedAsset.id, bId: otherId }); + setStatus(`Linked ${selectedAsset.id} ↔ ${otherId} (locked)`); + setLinkPickMode(false); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Set link failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleClearLink() { + if (!selectedAsset) return; + setBusy(true); + try { + await invoke("clear_link", { id: selectedAsset.id }); + setStatus(`Unlinked ${selectedAsset.id}`); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Clear link failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleLassoChangeSide(side: "Left" | "Right") { + if (!lassoSelected) return; + setBusy(true); + try { + const n = await invoke("change_assets_side", { + ids: lassoSelected.ids, + side, + }); + setStatus(`Set ${n} asset(s) to ${side}`); + setLassoSelected(null); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Side change failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleLassoSetScope(inScope: boolean) { + if (!lassoSelected) return; + setBusy(true); + try { + const n = await invoke("set_assets_in_scope", { + ids: lassoSelected.ids, + inScope, + }); + setStatus( + `Marked ${n} asset(s) as ${inScope ? "in-scope" : "out-of-scope"}`, + ); + setLassoSelected(null); + setLassoMode(false); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Set scope failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleLassoClearOverride() { + if (!lassoSelected) return; + setBusy(true); + try { + const n = await invoke("clear_manual_scope", { + ids: lassoSelected.ids, + }); + setStatus(`Cleared manual scope on ${n} asset(s); re-derived from KML.`); + setLassoSelected(null); + setLassoMode(false); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Clear scope failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleLassoDelete() { + if (!lassoSelected) return; + const ok = window.confirm( + `Delete ${lassoSelected.ids.length} asset(s) inside the lasso?`, + ); + if (!ok) return; + setBusy(true); + try { + const n = await invoke("delete_assets_bulk", { + ids: lassoSelected.ids, + }); + setStatus(`Deleted ${n} asset(s) via lasso.`); + setLassoSelected(null); + setLassoMode(false); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Bulk delete failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleFindDuplicates(restrictToBbox: boolean) { + if (busy) return; + setBusy(true); + try { + const args: Record = { + epsM: dupEpsM, + crossVideoOnly: dupCrossOnly, + }; + if (restrictToBbox && boundsRef.current) { + args.minLat = boundsRef.current.south; + args.maxLat = boundsRef.current.north; + args.minLng = boundsRef.current.west; + args.maxLng = boundsRef.current.east; + } + const list = await invoke( + "find_duplicate_clusters", + args, + ); + setDupClusters(list); + setDupActive(list[0]?.id ?? null); + const km = new Map(); + for (const c of list) { + // Default keep-pick: the most-recently-modified or just first. + km.set(c.id, c.members[0].id); + } + setDupKeep(km); + setStatus( + list.length === 0 + ? "No duplicate clusters found." + : `Found ${list.length} duplicate cluster(s); ${list.reduce((s, c) => s + c.members.length, 0)} member(s).`, + ); + } catch (e) { + setStatus(`Find duplicates failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleResolveCluster( + cluster: DupCluster, + action: "delete" | "out_of_scope", + ) { + const keepId = dupKeep.get(cluster.id); + if (keepId === undefined) return; + const losers = cluster.members + .filter((m) => m.id !== keepId) + .map((m) => m.id); + if (losers.length === 0) return; + setBusy(true); + try { + if (action === "delete") { + await invoke("delete_assets_bulk", { ids: losers }); + } else { + await invoke("set_assets_in_scope", { + ids: losers, + inScope: false, + }); + } + setStatus( + `Resolved cluster ${cluster.id} (${action}, ${losers.length} losers).`, + ); + setDupClusters((cs) => cs.filter((c) => c.id !== cluster.id)); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Resolve failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleExport() { + if (busy) return; + try { + const picked = await save({ + filters: [ + { name: "Source JSON (round-trip)", extensions: ["json"] }, + { name: "GeoJSON", extensions: ["geojson"] }, + { name: "KML", extensions: ["kml"] }, + { name: "CSV", extensions: ["csv"] }, + ], + }); + if (typeof picked !== "string") return; + const lower = picked.toLowerCase(); + const fmt = lower.endsWith(".kml") + ? "kml" + : lower.endsWith(".csv") + ? "csv" + : lower.endsWith(".json") + ? "source" + : "geojson"; + setBusy(true); + const count = await invoke("export_assets", { + path: picked, + format: fmt, + }); + setStatus(`Exported ${count} asset(s) to ${picked}`); + } catch (e) { + setStatus(`Export failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleBulkSnap() { + if (busy) return; + if (!boundsRef.current) { + setStatus("Pan/zoom the map first."); + return; + } + const b = boundsRef.current; + const ok = window.confirm( + `Snap all visible fixed assets to the nearest OSM road (within 50 m)?\n\n` + + `This is a single Undo-able action (one Undo reverts every snap).`, + ); + if (!ok) return; + setBusy(true); + try { + const res = await invoke<{ + snapped: number; + skipped_far: number; + skipped_no_geom: number; + }>("snap_assets_in_bbox", { + minLat: b.south, + maxLat: b.north, + minLng: b.west, + maxLng: b.east, + maxDistanceM: 50, + offsetM: roadOffsetMeters, + centerlineNames: Array.from(centerlineNames), + metadataTrack: metadataTrack.length >= 2 ? metadataTrack : null, + }); + setStatus( + `Bulk snap: ${res.snapped} moved, ${res.skipped_far} too far, ${res.skipped_no_geom} skipped`, + ); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Bulk snap failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleSnapToRoad() { + if (!selectedAsset) return; + setBusy(true); + try { + const useCenter = centerlineNames.has(selectedAsset.asset_name); + const [lat, lng] = await invoke<[number, number]>("snap_to_road", { + assetId: selectedAsset.id, + maxDistanceM: 50, + offsetM: useCenter ? 0 : roadOffsetMeters, + metadataTrack: metadataTrack.length >= 2 ? metadataTrack : null, + }); + setStatus( + `Snapped to road @ ${lat.toFixed(6)}, ${lng.toFixed(6)}`, + ); + await refreshAfterMutation(); + } catch (e) { + setStatus(`Snap failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleImportScope() { + if (busy) return; + setBusy(true); + setStatus("Picking KML…"); + try { + const picked = await open({ + multiple: false, + directory: false, + filters: [{ name: "KML", extensions: ["kml"] }], + }); + if (typeof picked !== "string") { + setStatus(""); + return; + } + setStatus("Parsing KML…"); + const count = await invoke("import_kml_scope", { path: picked }); + await refreshScopePolygons(); + if (boundsRef.current) { + await fetchBboxAssets(boundsRef.current); + } + setStatus(`Loaded ${count} scope polygon(s)`); + } catch (e) { + setStatus(`KML import failed: ${e}`); + } finally { + setBusy(false); + } + } + + async function handleImport(kind: "fixed" | "range") { + if (busy) return; + setBusy(true); + setStatus("Picking file…"); + try { + const picked = await open({ + multiple: false, + directory: false, + filters: [{ name: "JSON", extensions: ["json"] }], + }); + if (typeof picked !== "string") { + setStatus(""); + return; + } + setStatus("Importing…"); + const cmd = + kind === "fixed" ? "import_fixed_assets" : "import_range_assets"; + const count = await invoke(cmd, { path: picked }); + setStatus(`Imported ${count} ${kind}`); + + // Pull in the new video / class names so the filter auto-includes them. + await Promise.all([ + refreshVideoNames(), + refreshAssetNames(), + refreshClasses(), + ]); + // Re-applied scope (server-side) means in_scope flags may have changed. + if (boundsRef.current) { + await fetchBboxAssets(boundsRef.current); + } + + const all = await invoke("list_assets"); + const first = all.find( + (a) => a.asset_type === kind && a.lat !== null && a.lng !== null, + ); + if (first) { + setViewport({ + center: [first.lng as number, first.lat as number], + zoom: 13, + }); + } + } catch (e) { + setStatus(`Import failed: ${e}`); + } finally { + setBusy(false); + } + } + + return ( +
+
+ setBounds(b)} + assets={filteredAssets} + scopePolygons={scopePolygons} + osmRoads={osmRoads} + metadataTrack={metadataTrack} + layerVisibility={layerVisibility} + selectedAsset={selectedAsset} + onSelect={(a) => { + if (linkPickMode && a && selectedAsset && a.id !== selectedAsset.id) { + handleSetLink(a.id); + return; + } + setSelectedAssetId(a?.id ?? null); + setSelectedLink(null); + setStatus(a ? `Selected ${a.asset_name} · ${a.row_id}` : ""); + }} + onLinkClick={(idA, idB) => { + setSelectedLink([idA, idB]); + setStatus( + `Link #${idA} ↔ #${idB} selected — press Del to unlink, or click elsewhere to dismiss.`, + ); + }} + onAssetRightClick={(a) => { + if (rightClickFirstId === null) { + setRightClickFirstId(a.id); + setStatus( + `Pair link: anchor #${a.id} (${a.asset_name}) — right-click another asset to link, or the same asset again to cancel.`, + ); + return; + } + if (rightClickFirstId === a.id) { + setRightClickFirstId(null); + setStatus("Pair link cancelled."); + return; + } + const aId = rightClickFirstId; + const bId = a.id; + setRightClickFirstId(null); + // If the two assets are already linked to each other, treat the + // gesture as "unlink" instead of replacing/relocking. + const anchor = filteredAssets.find((x) => x.id === aId); + const partner = filteredAssets.find((x) => x.id === bId); + const alreadyLinked = + anchor?.link_pair_id === bId && partner?.link_pair_id === aId; + if (alreadyLinked) { + invoke("clear_link", { id: aId }) + .then(() => setStatus(`Unlinked #${aId} ↔ #${bId}`)) + .then(refreshAfterMutation) + .catch((e) => setStatus(`Unlink failed: ${e}`)); + return; + } + invoke("set_link", { aId, bId }) + .then(() => setStatus(`Linked #${aId} ↔ #${bId} (locked)`)) + .then(refreshAfterMutation) + .catch((e) => setStatus(`Link failed: ${e}`)); + }} + onPositionChange={handlePositionChange} + placeMode={placeMode} + onPlaceAt={handlePlaceAt} + imageFolder={imageFolder} + popupEnabled={popupEnabled} + anchorIds={Array.from(anchors.keys())} + colorBy={colorBy} + osmEditMode={osmEditMode} + editingRoadId={editingRoadId} + onPickRoad={(id) => { + setEditingRoadId(id); + setStatus(`Editing road #${id}. Drag the gold vertex dots.`); + }} + onUpdateRoad={handleUpdateRoad} + roadOffsetMeters={roadOffsetMeters} + drawRoadMode={drawRoadMode} + drawRoadCoords={drawRoadCoords} + onDrawRoadAddPoint={handleDrawRoadAddPoint} + lassoMode={lassoMode} + lassoShape={lassoShape} + onLassoComplete={handleLassoComplete} + highlightedIds={ + dupActive !== null + ? (dupClusters.find((c) => c.id === dupActive)?.members.map( + (m) => m.id, + ) ?? []) + : (lassoSelected?.ids ?? []) + } + /> + {compare && ( + setBounds(b)} + assets={filteredAssets} + scopePolygons={scopePolygons} + osmRoads={osmRoads} + metadataTrack={metadataTrack} + layerVisibility={layerVisibility} + selectedAsset={selectedAsset} + onSelect={(a) => { + setSelectedAssetId(a?.id ?? null); + setStatus(a ? `Selected ${a.asset_name} · ${a.row_id}` : ""); + }} + onPositionChange={handlePositionChange} + imageFolder={imageFolder} + popupEnabled={popupEnabled} + anchorIds={Array.from(anchors.keys())} + colorBy={ + new Set(filteredAssets.map((a) => displayVideo(a.video_name))) + .size <= 1 + ? "asset" + : "video" + } + /> + )} +
+ + + +
{ + if (window.confirm(`Logout ${currentUser.displayName}?`)) onLogout(); + }} + > + {currentUser.displayName} +
+ + {filterPanelOpen ? ( +
+ +

Filters

+
+ Showing {filteredAssets.length} / {assets.length} loaded + +
+ +

setVisibilityOpen((v) => !v)} + title="Click to expand/collapse advanced visibility options" + > + {visibilityOpen ? "▼" : "▶"} ⚙ Visibility +

+ {visibilityOpen && ( + <> + + + + + )} + +

Asset type

+ {(["fixed", "range"] as const).map((t) => ( + + ))} + +

Side

+ {Array.from(counts.bySide.entries()) + .sort() + .map(([side, n]) => ( + + ))} + +

setVideosExpanded((v) => !v)} + title="Click to expand/collapse" + > + {videosExpanded ? "▼" : "▶"} Videos — all {counts.byVideo.size} + {filters.videos.size > 0 && ` (${filters.videos.size} picked)`} +

+ {videosExpanded && ( + <> +
+ + +
+ setVideoSearch(e.target.value)} + autoComplete="off" + style={{ + width: "100%", + padding: 4, + boxSizing: "border-box", + border: "1px solid #ccc", + borderRadius: 3, + fontSize: 11, + marginBottom: 4, + }} + /> +
+ {allVideoNames + .filter((v) => + videoSearch.trim() === "" + ? true + : v + .toLowerCase() + .includes(videoSearch.trim().toLowerCase()), + ) + .map((v) => { + const n = counts.byVideo.get(v) ?? 0; + return [v, n] as [string, number]; + }) + .map(([v, n]) => ( + + ))} +
+ + )} + +

setNamesExpanded((v) => !v)} + title="Click to expand/collapse" + > + {namesExpanded ? "▼" : "▶"} Assets ({namesCounts.size}) + {filters.names.size > 0 && ` (${filters.names.size} picked)`} +

+ {namesExpanded && ( +
+ {Array.from(namesCounts.entries()) + .sort((a, b) => + a[0].localeCompare(b[0], undefined, { sensitivity: "base" }), + ) + .map(([name, n]) => ( + + ))} + {namesCounts.size === 0 && ( +
No assets in current view.
+ )} +
+ )} +
+ ) : ( + + )} + + {renameOpen && ( +
setRenameOpen(null)} + > +
e.stopPropagation()}> + +

Rename class ({renameOpen.ids.length})

+ {renameOpen.current && ( +
+ Current: {renameOpen.current} +
+ )} +

Pick existing class

+
+ {classNames.map((c) => ( + + ))} + {classNames.length === 0 && ( + + No classes loaded. Add one below. + + )} +
+

Or type a new class

+ setRenameInput(e.target.value)} + placeholder="e.g. Crash_Barrier" + style={{ + width: "100%", + padding: 6, + boxSizing: "border-box", + border: "1px solid #ccc", + borderRadius: 4, + fontSize: 13, + }} + /> +
+ + +
+
+
+ )} + + {importsOpen && ( +
setImportsOpen(false)} + > +
e.stopPropagation()}> + +

Import data

+
+ Pick what to import. Each opens a file dialog. +
+
+ + + + + +
+
+
+ )} + + {osmToolsOpen && ( +
setOsmToolsOpen(false)} + > +
e.stopPropagation()}> + +

OSM tools

+
+ Cleanup operations on the imported OSM road layer. Pick what to + run, then Apply. Reversible by re-importing OSM. +
+ +

OSM folder

+
+ {osmFolder ? ( + {osmFolder} + ) : ( + not set — Generate / Export will prompt + )} +
+ + +

Fetch & write

+
+ + +
+ +

Prune small road classes

+ + setOsmToolPruneClasses(e.target.value)} + disabled={!osmToolPrune} + style={{ + width: "100%", + padding: 6, + boxSizing: "border-box", + border: "1px solid #ccc", + borderRadius: 4, + fontSize: 12, + marginTop: 4, + }} + /> + +
+ + +
+
+
+ )} + + {settingsOpen && ( +
setSettingsOpen(false)} + > +
e.stopPropagation()}> + +

Settings

+ +

Image popup

+ +

Popup width

+
+ {(["S", "M", "L", "XL"] as PopupSize[]).map((s) => { + const w = POPUP_WIDTH_PX[s]; + const h = Math.round(w / POPUP_ASPECT_VAL[popupAspect]); + return ( + + ); + })} +
+

Popup aspect ratio

+
+ {(["16:9", "4:3", "3:2", "1:1"] as PopupAspect[]).map((a) => ( + + ))} +
+ +

Snap to centerline (instead of offset lane)

+
+ By default, "Snap to nearest road" moves assets to the LHS/RHS + parallel offset line (controlled by Lane offset). Tick asset + names below to snap them to the road centerline instead — e.g. + kilometer stones or things that sit on the median. +
+
+ {allAssetNames.length === 0 ? ( + + No assets loaded yet. + + ) : ( + allAssetNames.map((name) => ( + + )) + )} +
+ +

Image folder (offline)

+ + {imageFolder && ( + <> +
+ {imageFolder} +
+ + + )} +
+
+ )} + + {panelOpen && ( +
+

Basemap

+ + + {compare && ( + + )} + + + +

Data

+ + + {osmEditMode && editingRoadId !== null && ( + <> + + + + + )} + {osmEditMode && !drawRoadMode && ( + + )} + {osmEditMode && drawRoadMode && ( + <> +
+ Drawing: {drawRoadCoords.length} vertex + {drawRoadCoords.length === 1 ? "" : "es"} +
+
+ + +
+ {drawRoadCoords.length > 0 && ( + + )} + + )} + {osmEditMode && ( + + )} + + {anchors.size > 0 && ( +
+
+ {anchors.size} anchor(s) active. Drag any of the + gold-ringed assets, then click Distribute to spread the GPS + correction across every visible asset (1 anchor → uniform shift; 2+ + → piecewise interp by row_id). +
+
+ + +
+
+ )} + + +
+ {(["circle", "rect", "polygon"] as const).map((s) => ( + + ))} +
+ + {lassoSelected && ( +
+ + {lassoListOpen && ( +
+ {lassoSelected.ids.map((id) => { + const a = assets.find((x) => x.id === id); + if (!a) return null; + return ( +
{ + if (a.lat !== null && a.lng !== null) { + setViewport((v) => ({ + center: [a.lng as number, a.lat as number], + zoom: Math.max(v.zoom, 18), + })); + setSelectedAssetId(a.id); + } + }} + title="Click to center map on this asset" + > + e.stopPropagation()} + onChange={() => { + setLassoSelected((s) => + s + ? { + ...s, + ids: s.ids.filter((x) => x !== id), + } + : s, + ); + }} + /> + + {a.asset_name} + {a.deleted ? " ⌫" : ""} + {a.in_scope === 0 ? " ◌" : ""} + + {a.row_id.slice(-6)} +
+ ); + })} +
+ )} +
+ + + + +
+
+ + +
+
+ + +
+ {lassoPolygonPoints && lassoPolygonPoints.length >= 3 && ( + <> + +
+ + + +
+ + )} +
+ + +
+ +
+ )} + +

Layers

+
+ {( + [ + ["scope", "Scope (KML)"], + ["osm", "OSM roads"], + ["metadata", "Metadata polyline"], + ["fixed", "Fixed assets"], + ["range", "Range polylines"], + ] as const + ).map(([key, label]) => ( + + ))} +
+ + + {scopePolygons.length > 0 && ( +
+ {scopePolygons.length} scope polygon(s) loaded +
+ )} + {status &&
{status}
} + +

+ Navigate ({navigableAssets.length}) +

+
+ + +
+ + {selectedAsset && ( + <> +

Selected

+
+ {selectedAsset.asset_type} · {selectedAsset.asset_name} + {selectedAsset.side && ( + + {selectedAsset.side} + + )} +
+ {selectedAsset.row_id} +
+ video: {displayVideo(selectedAsset.video_name)} +
+ + +
+ Tip: arrow keys nudge selected by ~0.5 m. +
+ {selectedAsset.link_pair_id !== null ? ( +
+ 🔗 Linked to #{selectedAsset.link_pair_id} + {(selectedAsset.link_locked ?? 0) === 1 ? " (locked)" : ""} +
+ + + +
+
+ ) : ( +
+ +
+ )} +
+ + + + {selectedAsset.deleted ? ( + + ) : ( + + )} +
+ + + {(() => { + const isAnchor = anchors.has(selectedAsset.id); + return ( + + ); + })()} + + )} + +
+ Merge range polylines +
+
+ Primary + + {mergePrimary ? mergePrimary.row_id : "(empty)"} + + +
+
+ Secondary + + {mergeSecondary ? mergeSecondary.row_id : "(empty)"} + + +
+
+ + +
+
+
+ +
+ Bulk delete by video + setBulkVideoName(e.target.value)} + autoComplete="off" + style={{ + width: "100%", + padding: 6, + boxSizing: "border-box", + border: "1px solid #ccc", + borderRadius: 4, + fontSize: 13, + marginBottom: 6, + }} + /> + + {Array.from(counts.byVideo.entries()) + .sort((a, b) => b[1] - a[1]) + .map(([v, n]) => ( + + ))} + +
+ + + +
+
+ +
+ Duplicates +
+ ε: + + setDupEpsM(Math.max(0.1, parseFloat(e.target.value) || 3)) + } + style={{ + width: 50, + padding: "2px 4px", + border: "1px solid #ccc", + borderRadius: 3, + fontSize: 11, + }} + /> + m + +
+ + {dupClusters.length > 0 && ( +
+ {dupClusters.map((c) => { + const isActive = dupActive === c.id; + const keepId = dupKeep.get(c.id); + return ( +
+
{ + setDupActive(c.id); + const m = c.members[0]; + if (m.lat !== null && m.lng !== null) { + setViewport((v) => ({ + center: [m.lng as number, m.lat as number], + zoom: Math.max(v.zoom, 18), + })); + } + }} + > + {c.asset_name} · {c.members.length} dup +
+ {isActive && ( +
+ {c.members.map((m) => ( + + ))} +
+ + +
+
+ )} +
+ ); + })} +
+ )} + {dupClusters.length > 0 && ( + + )} +
+ +

Recent actions

+ {recentActions.length === 0 ? ( +
+ No actions yet +
+ ) : ( +
    + {recentActions.map((a) => ( +
  • +
    {formatAction(a)}
    + {a.undone ? ( + + ) : ( + + )} +
  • + ))} +
+ )} +
+ )} +
+ ); +} diff --git a/src/LoginScreen.tsx b/src/LoginScreen.tsx new file mode 100644 index 0000000..fb8a240 --- /dev/null +++ b/src/LoginScreen.tsx @@ -0,0 +1,247 @@ +import { useEffect, useState } from "react"; +import { invoke } from "@tauri-apps/api/core"; + +type User = { + id: number; + username: string; + display_name: string; + created_at: string; +}; + +type Props = { + onLogin: (username: string, displayName: string) => void; +}; + +export function LoginScreen({ onLogin }: Props) { + const [users, setUsers] = useState([]); + const [username, setUsername] = useState(""); + const [displayName, setDisplayName] = useState(""); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(""); + + const fetchUsers = async () => { + try { + const list = await invoke("list_users"); + setUsers(list); + } catch (e) { + setError(`Failed to fetch users: ${e}`); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + fetchUsers(); + }, []); + + const handleLogin = async (u: User) => { + try { + await invoke("set_current_user", { username: u.username }); + onLogin(u.username, u.display_name); + } catch (e) { + setError(`Login failed: ${e}`); + } + }; + + const handleCreate = async () => { + const uname = username.trim(); + const dname = displayName.trim(); + if (!uname || !dname) return; + try { + await invoke("create_user", { username: uname, displayName: dname }); + setUsername(""); + setDisplayName(""); + await fetchUsers(); + } catch (e) { + setError(`Failed to create user: ${e}`); + } + }; + + const handleDelete = async (u: User) => { + if (!confirm(`Delete user "${u.display_name}" (${u.username})?`)) return; + try { + await invoke("delete_user", { id: u.id }); + await fetchUsers(); + } catch (e) { + setError(`Failed to delete user: ${e}`); + } + }; + + return ( +
+
+

+ KML Asset Editor +

+ {error && ( +
+ {error} +
+ )} + {loading ? ( +

Loading users…

+ ) : ( + <> + {users.length > 0 && ( +
+

+ Existing users +

+ {users.map((u) => ( +
+ + {u.display_name} + + @{u.username} + + + + +
+ ))} +
+ )} +
+

+ Create new user +

+ setUsername(e.target.value)} + style={{ + display: "block", + width: "100%", + padding: "8px 10px", + marginBottom: 8, + borderRadius: 4, + border: "1px solid #333", + background: "#1a1a2e", + color: "#e0e0e0", + fontSize: 14, + boxSizing: "border-box", + }} + /> + setDisplayName(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") handleCreate(); + }} + style={{ + display: "block", + width: "100%", + padding: "8px 10px", + marginBottom: 12, + borderRadius: 4, + border: "1px solid #333", + background: "#1a1a2e", + color: "#e0e0e0", + fontSize: 14, + boxSizing: "border-box", + }} + /> + +
+ + )} +
+
+ ); +} diff --git a/src/MapView.tsx b/src/MapView.tsx new file mode 100644 index 0000000..2ce915e --- /dev/null +++ b/src/MapView.tsx @@ -0,0 +1,1576 @@ +import { useEffect, useMemo, useRef } from "react"; +import maplibregl, { Map as MapLibreMap, LngLatLike } from "maplibre-gl"; +import "maplibre-gl/dist/maplibre-gl.css"; +// @ts-expect-error: TS does not see the re-export-of-default in @deck.gl/mapbox's +// index.d.ts (`export { default as MapboxOverlay }`). Vite/Rollup resolve it correctly +// at build time and the value exists at runtime (`Object.keys(require('@deck.gl/mapbox')) +// === ['MapboxOverlay']`). Remove this directive if a future TS/deck.gl release surfaces +// the named export. +import { MapboxOverlay } from "@deck.gl/mapbox"; +import { ScatterplotLayer, PathLayer, GeoJsonLayer, TextLayer } from "@deck.gl/layers"; +import { PathStyleExtension } from "@deck.gl/extensions"; +import { basemapById } from "./basemaps"; +import { videoColorRGB } from "./colors"; +import { resolveImageSrc } from "./imagePath"; +import type { Asset, ScopePolygon } from "./types"; + +export type LayerVisibility = { + scope: boolean; + metadata: boolean; + osm: boolean; + fixed: boolean; + range: boolean; +}; + +export type OsmRoadFC = { + type: "FeatureCollection"; + features: Array<{ + type: "Feature"; + geometry: unknown; + properties: { id: number; name: string | null }; + }>; +}; + +export type Viewport = { + center: [number, number]; + zoom: number; +}; + +export type BoundsBox = { + south: number; + north: number; + west: number; + east: number; +}; + +export type Vertex = "fixed" | "start" | "mid" | "end"; + +type Props = { + basemapId: string; + viewport: Viewport; + onUserMove: (v: Viewport) => void; + onMoveEnd?: (info: { bounds: BoundsBox }) => void; + assets: Asset[]; + scopePolygons?: ScopePolygon[]; + osmRoads?: OsmRoadFC; + metadataTrack?: Array<[number, number]>; + layerVisibility?: LayerVisibility; + selectedAsset?: Asset | null; + onSelect?: (asset: Asset | null) => void; + onAssetRightClick?: (asset: Asset) => void; + onLinkClick?: (idA: number, idB: number) => void; + popupEnabled?: boolean; + onPositionChange?: (id: number, vertex: Vertex, lat: number, lng: number) => void; + placeMode?: boolean; + onPlaceAt?: (lat: number, lng: number) => void; + imageFolder?: string | null; + colorBy?: "video" | "asset" | "side"; + osmEditMode?: boolean; + editingRoadId?: number | null; + onPickRoad?: (id: number) => void; + onUpdateRoad?: (id: number, coords: Array<[number, number]>) => void; + roadOffsetMeters?: number; + drawRoadMode?: boolean; + drawRoadCoords?: Array<[number, number]>; + onDrawRoadAddPoint?: (lat: number, lng: number) => void; + lassoMode?: boolean; + lassoShape?: "circle" | "rect" | "polygon"; + onLassoComplete?: ( + shape: "circle" | "rect" | "polygon", + points: Array<[number, number]>, + ) => void; + highlightedIds?: number[]; + anchorIds?: number[]; +}; + +const DEFAULT_VIS: LayerVisibility = { + scope: true, + metadata: true, + osm: true, + fixed: true, + range: true, +}; + +export function MapView({ + basemapId, + viewport, + onUserMove, + onMoveEnd, + assets, + scopePolygons = [], + osmRoads, + metadataTrack = [], + layerVisibility = DEFAULT_VIS, + selectedAsset, + onSelect, + onAssetRightClick, + onLinkClick, + popupEnabled = true, + onPositionChange, + placeMode = false, + onPlaceAt, + imageFolder = null, + colorBy = "video", + osmEditMode = false, + editingRoadId = null, + onPickRoad, + onUpdateRoad, + roadOffsetMeters = 4, + drawRoadMode = false, + drawRoadCoords = [], + onDrawRoadAddPoint, + lassoMode = false, + lassoShape = "circle", + onLassoComplete, + highlightedIds = [], + anchorIds = [], +}: Props) { + const containerRef = useRef(null); + const mapRef = useRef(null); + const overlayRef = useRef(null); + const onUserMoveRef = useRef(onUserMove); + onUserMoveRef.current = onUserMove; + const onMoveEndRef = useRef(onMoveEnd); + onMoveEndRef.current = onMoveEnd; + const onSelectRef = useRef(onSelect); + const onAssetRightClickRef = useRef(onAssetRightClick); + onAssetRightClickRef.current = onAssetRightClick; + const onLinkClickRef = useRef(onLinkClick); + onLinkClickRef.current = onLinkClick; + onSelectRef.current = onSelect; + const onPositionChangeRef = useRef(onPositionChange); + onPositionChangeRef.current = onPositionChange; + const onPlaceAtRef = useRef(onPlaceAt); + onPlaceAtRef.current = onPlaceAt; + const placeModeRef = useRef(placeMode); + placeModeRef.current = placeMode; + const osmEditModeRef = useRef(osmEditMode); + osmEditModeRef.current = osmEditMode; + const onPickRoadRef = useRef(onPickRoad); + onPickRoadRef.current = onPickRoad; + const drawRoadModeRef = useRef(drawRoadMode); + drawRoadModeRef.current = drawRoadMode; + const onDrawRoadAddPointRef = useRef(onDrawRoadAddPoint); + onDrawRoadAddPointRef.current = onDrawRoadAddPoint; + + useEffect(() => { + if (!containerRef.current) return; + const map = new maplibregl.Map({ + container: containerRef.current, + style: basemapById(basemapId).style, + center: viewport.center as LngLatLike, + zoom: viewport.zoom, + maxZoom: 24, + attributionControl: { compact: true }, + }); + mapRef.current = map; + + map.on("move", (e) => { + if (!e.originalEvent) return; + const c = map.getCenter(); + onUserMoveRef.current({ center: [c.lng, c.lat], zoom: map.getZoom() }); + }); + + map.on("contextmenu", (e) => { + const overlay = overlayRef.current; + if (!overlay || !onAssetRightClickRef.current) return; + const { x, y } = e.point; + const info = overlay.pickObject({ x, y, radius: 8 }) as + | { object?: unknown; layer?: { id?: string } } + | null; + if (!info || !info.object) return; + // An asset record carries `row_id` and `asset_type`; ignore picks that + // landed on roads/scopes/metadata. + const obj = info.object as Partial; + if (typeof obj.row_id !== "string" || typeof obj.id !== "number") return; + e.preventDefault(); + onAssetRightClickRef.current(obj as Asset); + }); + + map.on("moveend", () => { + const b = map.getBounds(); + onMoveEndRef.current?.({ + bounds: { + south: b.getSouth(), + north: b.getNorth(), + west: b.getWest(), + east: b.getEast(), + }, + }); + }); + + const overlay = new MapboxOverlay({ + layers: [], + interleaved: false, + onClick: (info: { + object?: unknown; + coordinate?: number[]; + layer?: { id: string }; + }) => { + if (drawRoadModeRef.current && info.coordinate) { + const [lng, lat] = info.coordinate; + onDrawRoadAddPointRef.current?.(lat, lng); + return; + } + if (placeModeRef.current && info.coordinate) { + const [lng, lat] = info.coordinate; + onPlaceAtRef.current?.(lat, lng); + return; + } + if (osmEditModeRef.current && info.layer?.id === "osm-roads") { + const f = info.object as + | { properties?: { id?: number } } + | undefined; + const rid = f?.properties?.id; + if (typeof rid === "number") { + onPickRoadRef.current?.(rid); + } + return; + } + if (osmEditModeRef.current) { + // In edit mode, canvas clicks elsewhere — ignore. + return; + } + if (info.layer?.id === "asset-links" && info.object) { + const o = info.object as { idA?: number; idB?: number }; + if (typeof o.idA === "number" && typeof o.idB === "number") { + onLinkClickRef.current?.(o.idA, o.idB); + } + return; + } + if (info.object) onSelectRef.current?.(info.object as Asset); + else onSelectRef.current?.(null); + }, + }); + map.addControl(overlay as unknown as maplibregl.IControl); + overlayRef.current = overlay; + + return () => { + overlayRef.current = null; + map.remove(); + mapRef.current = null; + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + useEffect(() => { + const map = mapRef.current; + if (!map) return; + map.setStyle(basemapById(basemapId).style); + }, [basemapId]); + + useEffect(() => { + const map = mapRef.current; + if (!map) return; + const c = map.getCenter(); + const dLng = Math.abs(c.lng - viewport.center[0]); + const dLat = Math.abs(c.lat - viewport.center[1]); + const dZoom = Math.abs(map.getZoom() - viewport.zoom); + if (dLng < 1e-7 && dLat < 1e-7 && dZoom < 1e-4) return; + map.jumpTo({ center: viewport.center as LngLatLike, zoom: viewport.zoom }); + }, [viewport.center, viewport.zoom]); + + const selectedFixedId = + selectedAsset && selectedAsset.asset_type === "fixed" ? selectedAsset.id : null; + const selectedRange = + selectedAsset && + selectedAsset.asset_type === "range" && + selectedAsset.start_lat !== null && + selectedAsset.start_lng !== null && + selectedAsset.lat !== null && + selectedAsset.lng !== null && + selectedAsset.end_lat !== null && + selectedAsset.end_lng !== null + ? selectedAsset + : null; + + const { + fixedPoints, + rangePaths, + rangePoints, + fixedDeleted, + rangeDeleted, + } = useMemo(() => { + const EPS = 1e-7; // ~1 cm; tighter than any real start/end separation + const isDegenerate = (a: Asset) => + Math.abs((a.start_lat as number) - (a.end_lat as number)) < EPS && + Math.abs((a.start_lng as number) - (a.end_lng as number)) < EPS; + const fixedLive: Asset[] = []; + const rangeLive: Asset[] = []; + const rangePtLive: Asset[] = []; + const fixedDel: Asset[] = []; + const rangeDel: Asset[] = []; + for (const a of assets) { + const isRange = + a.asset_type === "range" && + a.lat !== null && + a.lng !== null && + a.start_lat !== null && + a.start_lng !== null && + a.end_lat !== null && + a.end_lng !== null; + const isFixed = + a.asset_type === "fixed" && a.lat !== null && a.lng !== null; + if (a.deleted !== 0) { + if (isFixed) fixedDel.push(a); + else if (isRange) rangeDel.push(a); + continue; + } + if (isFixed) { + if (a.id === selectedFixedId) continue; + fixedLive.push(a); + } else if (isRange) { + if (isDegenerate(a)) rangePtLive.push(a); + else rangeLive.push(a); + } + } + return { + fixedPoints: fixedLive, + rangePaths: rangeLive, + rangePoints: rangePtLive, + fixedDeleted: fixedDel, + rangeDeleted: rangeDel, + }; + }, [assets, selectedFixedId]); + + const { scopePolygonFC, scopeLineFC } = useMemo(() => { + const polys: unknown[] = []; + const lines: unknown[] = []; + for (const p of scopePolygons) { + const f = { + type: "Feature" as const, + geometry: JSON.parse(p.geojson), + properties: { id: p.id, name: p.name }, + }; + if (p.geom_type === "linestring") lines.push(f); + else polys.push(f); + } + return { + scopePolygonFC: { type: "FeatureCollection" as const, features: polys }, + scopeLineFC: { type: "FeatureCollection" as const, features: lines }, + }; + }, [scopePolygons]); + + useEffect(() => { + const overlay = overlayRef.current; + if (!overlay) return; + + const colorKey = (a: Asset) => + colorBy === "asset" ? `${a.video_name}#${a.id}` : a.video_name; + const sideRgb = ( + a: Asset, + ): [number, number, number] | null => { + const s = (a.side ?? "").toLowerCase(); + if (s === "left" || s === "lhs" || s === "l") return [230, 126, 34]; // orange + if (s === "right" || s === "rhs" || s === "r") return [52, 152, 219]; // blue + return null; + }; + // In-scope = vivid; out-of-scope = desaturated; deleted = red. + const colorForFixed = (a: Asset): [number, number, number, number] => { + if (a.in_scope === 0) return [127, 140, 141, 160]; + if (colorBy === "side") { + const s = sideRgb(a); + if (s) return [s[0], s[1], s[2], 230]; + } + const [r, g, b] = videoColorRGB(colorKey(a)); + return [r, g, b, 230]; + }; + const colorForRange = (a: Asset): [number, number, number, number] => { + if (a.in_scope === 0) return [127, 140, 141, 160]; + if (colorBy === "side") { + const s = sideRgb(a); + if (s) return [s[0], s[1], s[2], 220]; + } + const [r, g, b] = videoColorRGB(colorKey(a)); + return [r, g, b, 210]; + }; + + const layers: unknown[] = []; + + const visibleOsm: OsmRoadFC | undefined = + osmEditMode && editingRoadId !== null && osmRoads + ? { + type: "FeatureCollection", + features: osmRoads.features.filter( + (f) => f.properties.id === editingRoadId, + ), + } + : osmRoads; + if ( + layerVisibility.osm && + visibleOsm && + visibleOsm.features.length > 0 + ) { + layers.push( + new GeoJsonLayer({ + id: "osm-roads-halo", + data: visibleOsm, + stroked: true, + filled: false, + getLineColor: [0, 0, 0, 220], + getLineWidth: 6, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + layers.push( + new GeoJsonLayer({ + id: "osm-roads", + data: visibleOsm, + stroked: true, + filled: false, + getLineColor: [0, 229, 255, 255], + getLineWidth: 3, + lineWidthUnits: "pixels", + pickable: osmEditMode, + }), + ); + if (osmEditMode && roadOffsetMeters > 0) { + const haveTrack = metadataTrack.length >= 2; + const headingAt = (lng: number, lat: number): [number, number] => { + if (!haveTrack) return [0, 0]; + let bestI = 0; + let bestD = Infinity; + for (let i = 0; i < metadataTrack.length; i++) { + const dx = metadataTrack[i][0] - lng; + const dy = metadataTrack[i][1] - lat; + const d2 = dx * dx + dy * dy; + if (d2 < bestD) { + bestD = d2; + bestI = i; + } + } + const a = metadataTrack[Math.max(0, bestI - 1)]; + const b = + metadataTrack[Math.min(metadataTrack.length - 1, bestI + 1)]; + return [b[0] - a[0], b[1] - a[1]]; + }; + const offsetPaths: Array<{ path: Array<[number, number]>; side: 1 | -1 }> = []; + for (const f of visibleOsm.features) { + const g = f.geometry as + | { type: string; coordinates: Array<[number, number]> } + | undefined; + if (!g || g.type !== "LineString" || g.coordinates.length < 2) continue; + const lat0 = g.coordinates[0][1]; + const mPerLng = 111320 * Math.cos((lat0 * Math.PI) / 180) || 1; + const mPerLat = 111320; + for (const side of [1, -1] as const) { + const out: Array<[number, number]> = []; + const n = g.coordinates.length; + for (let i = 0; i < n; i++) { + const prev = g.coordinates[Math.max(0, i - 1)]; + const next = g.coordinates[Math.min(n - 1, i + 1)]; + let dx = (next[0] - prev[0]) * mPerLng; + let dy = (next[1] - prev[1]) * mPerLat; + if (haveTrack) { + const [hx, hy] = headingAt( + g.coordinates[i][0], + g.coordinates[i][1], + ); + const hdx = hx * mPerLng; + const hdy = hy * mPerLat; + if (Math.hypot(hdx, hdy) > 1e-6) { + dx = hdx; + dy = hdy; + } + } + const len = Math.hypot(dx, dy) || 1; + const px = -dy / len; + const py = dx / len; + const offX = (side * px * roadOffsetMeters) / mPerLng; + const offY = (side * py * roadOffsetMeters) / mPerLat; + out.push([ + g.coordinates[i][0] + offX, + g.coordinates[i][1] + offY, + ]); + } + offsetPaths.push({ path: out, side }); + } + } + layers.push( + new PathLayer<{ path: Array<[number, number]>; side: 1 | -1 }>({ + id: "osm-offset-lines", + data: offsetPaths, + getPath: (d) => d.path, + getColor: (d) => + d.side === 1 ? [255, 215, 0, 220] : [0, 200, 255, 220], + getWidth: 2, + widthUnits: "pixels", + extensions: [new PathStyleExtension({ dash: true })], + // @ts-expect-error PathStyleExtension adds these props at runtime + getDashArray: [4, 3], + dashJustified: true, + pickable: false, + }), + ); + } + if (drawRoadMode && drawRoadCoords.length > 0) { + if (drawRoadCoords.length >= 2) { + layers.push( + new PathLayer<{ path: Array<[number, number]> }>({ + id: "draw-road-line", + data: [{ path: drawRoadCoords }], + getPath: (d) => d.path, + getColor: [255, 87, 34, 255], + getWidth: 4, + widthUnits: "pixels", + pickable: false, + }), + ); + } + layers.push( + new ScatterplotLayer<[number, number]>({ + id: "draw-road-points", + data: drawRoadCoords, + getPosition: (d) => d, + getRadius: 6, + radiusUnits: "pixels", + getFillColor: [255, 87, 34, 255], + getLineColor: [255, 255, 255, 255], + stroked: true, + getLineWidth: 1.5, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + if (osmEditMode && editingRoadId !== null && osmRoads) { + const editing = osmRoads.features.find( + (f) => f.properties.id === editingRoadId, + ); + if (editing) { + layers.push( + new GeoJsonLayer({ + id: "osm-roads-editing", + data: { type: "FeatureCollection", features: [editing] }, + stroked: true, + filled: false, + getLineColor: [255, 215, 0, 255], + getLineWidth: 5, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + } + } + if (layerVisibility.metadata && metadataTrack.length > 1) { + const N = metadataTrack.length; + const arrowCount = Math.min(8, Math.max(3, Math.floor(N / 50))); + const arrows: Array<{ pos: [number, number]; angle: number }> = []; + for (let k = 1; k <= arrowCount; k++) { + const i = Math.floor((k * N) / (arrowCount + 1)); + const j = Math.min(i + 1, N - 1); + const a = metadataTrack[i]; + const b = metadataTrack[j]; + if (!a || !b) continue; + const dlng = b[0] - a[0]; + const dlat = b[1] - a[1]; + if (dlng === 0 && dlat === 0) continue; + arrows.push({ + pos: a, + angle: (Math.atan2(dlat, dlng) * 180) / Math.PI, + }); + } + const start = metadataTrack[0]; + const end = metadataTrack[N - 1]; + + const stride = Math.max(1, Math.floor(N / 400)); + const dots: Array<[number, number]> = []; + for (let i = 0; i < N; i += stride) dots.push(metadataTrack[i]); + if (dots[dots.length - 1] !== metadataTrack[N - 1]) { + dots.push(metadataTrack[N - 1]); + } + layers.push( + new ScatterplotLayer<[number, number]>({ + id: "metadata-dots", + data: dots, + getPosition: (d) => d, + getRadius: 2, + radiusUnits: "pixels", + getFillColor: [255, 235, 59, 255], + getLineColor: [0, 0, 0, 230], + stroked: true, + getLineWidth: 0.8, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + if (arrows.length > 0) { + layers.push( + new TextLayer<{ pos: [number, number]; angle: number }>({ + id: "metadata-arrows-bg", + data: arrows, + getPosition: (d) => d.pos, + getText: () => ">", + getAngle: (d) => d.angle, + getColor: [0, 0, 0, 255], + getSize: 32, + sizeUnits: "pixels", + getTextAnchor: "middle", + getAlignmentBaseline: "center", + fontFamily: "Arial Black, Arial, sans-serif", + fontWeight: 900, + pickable: false, + }), + ); + layers.push( + new TextLayer<{ pos: [number, number]; angle: number }>({ + id: "metadata-arrows", + data: arrows, + getPosition: (d) => d.pos, + getText: () => ">", + getAngle: (d) => d.angle, + getColor: [255, 235, 59, 255], + getSize: 24, + sizeUnits: "pixels", + getTextAnchor: "middle", + getAlignmentBaseline: "center", + fontFamily: "Arial Black, Arial, sans-serif", + fontWeight: 900, + pickable: false, + }), + ); + } + layers.push( + new ScatterplotLayer<{ pos: [number, number]; kind: "S" | "E" }>({ + id: "metadata-endpoints", + data: [ + { pos: start, kind: "S" as const }, + { pos: end, kind: "E" as const }, + ], + getPosition: (d) => d.pos, + getRadius: 9, + radiusUnits: "pixels", + getFillColor: (d) => + d.kind === "S" ? [46, 204, 113, 255] : [231, 76, 60, 255], + getLineColor: [0, 0, 0, 255], + stroked: true, + getLineWidth: 2, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + layers.push( + new TextLayer<{ pos: [number, number]; kind: "S" | "E" }>({ + id: "metadata-endpoint-labels", + data: [ + { pos: start, kind: "S" as const }, + { pos: end, kind: "E" as const }, + ], + getPosition: (d) => d.pos, + getText: (d) => d.kind, + getColor: [255, 255, 255, 255], + getSize: 11, + sizeUnits: "pixels", + getTextAnchor: "middle", + getAlignmentBaseline: "center", + fontWeight: "bold", + pickable: false, + }), + ); + } + if (layerVisibility.scope) { + layers.push( + new GeoJsonLayer({ + id: "scope-polygons", + data: scopePolygonFC, + filled: true, + stroked: true, + getFillColor: [255, 64, 200, 50], + getLineColor: [0, 0, 0, 220], + getLineWidth: 6, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + layers.push( + new GeoJsonLayer({ + id: "scope-polygons-stroke", + data: scopePolygonFC, + filled: false, + stroked: true, + getLineColor: [255, 64, 200, 255], + getLineWidth: 3, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + layers.push( + new GeoJsonLayer({ + id: "scope-lines-halo", + data: scopeLineFC, + stroked: true, + filled: false, + getLineColor: [0, 0, 0, 220], + getLineWidth: 10, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + layers.push( + new GeoJsonLayer({ + id: "scope-lines", + data: scopeLineFC, + stroked: true, + filled: false, + getLineColor: [255, 64, 200, 255], + getLineWidth: 6, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + if (layerVisibility.range && selectedRange) { + const [vr, vg, vb] = videoColorRGB(selectedRange.video_name); + const haloColor: [number, number, number, number] = [ + 255 - vr, + 255 - vg, + 255 - vb, + 240, + ]; + layers.push( + new PathLayer({ + id: "range-selected-halo", + data: [selectedRange], + getPath: (a) => [ + [a.start_lng as number, a.start_lat as number], + [a.lng as number, a.lat as number], + [a.end_lng as number, a.end_lat as number], + ], + getColor: haloColor, + getWidth: 14, + widthUnits: "pixels", + capRounded: true, + jointRounded: true, + pickable: false, + }), + ); + } + if (layerVisibility.range && rangePoints.length > 0) { + // Degenerate range assets (start ≈ mid ≈ end). Render as a hollow + // ring in the per-video color so they're distinguishable from fixed + // dots (filled) but still visible. + layers.push( + new ScatterplotLayer({ + id: "range-points", + data: rangePoints, + getPosition: (a) => [a.lng as number, a.lat as number], + getRadius: 9, + radiusUnits: "pixels", + getFillColor: [255, 255, 255, 0], + getLineColor: colorForRange, + stroked: true, + getLineWidth: 3, + lineWidthUnits: "pixels", + pickable: true, + updateTriggers: { getLineColor: rangePoints }, + }), + ); + } + if (layerVisibility.range && rangePaths.length > 0) { + type EndpointDot = { + pos: [number, number]; + kind: "S" | "E"; + asset: Asset; + }; + const endpointDots: EndpointDot[] = []; + for (const a of rangePaths) { + if (a.id === selectedRange?.id) continue; // selected uses the big S/E pins + endpointDots.push({ + pos: [a.start_lng as number, a.start_lat as number], + kind: "S", + asset: a, + }); + endpointDots.push({ + pos: [a.end_lng as number, a.end_lat as number], + kind: "E", + asset: a, + }); + } + layers.push( + new ScatterplotLayer({ + id: "range-endpoints", + data: endpointDots, + getPosition: (d) => d.pos, + getRadius: 4, + radiusUnits: "pixels", + getFillColor: (d) => + d.kind === "S" ? [46, 204, 113, 230] : [231, 76, 60, 230], + getLineColor: [255, 255, 255, 230], + stroked: true, + getLineWidth: 1, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + if (layerVisibility.range) { + layers.push( + new PathLayer({ + id: "range-assets", + data: rangePaths, + getPath: (a) => [ + [a.start_lng as number, a.start_lat as number], + [a.lng as number, a.lat as number], + [a.end_lng as number, a.end_lat as number], + ], + getColor: colorForRange, + getWidth: 6, + widthUnits: "pixels", + capRounded: true, + jointRounded: true, + pickable: true, + updateTriggers: { getColor: rangePaths }, + }), + ); + } + // Deleted assets: red, semi-transparent, with a strikethrough-style dashed + // outline so they read as "removed" but are still locatable. + if (layerVisibility.range && rangeDeleted.length > 0) { + layers.push( + new PathLayer({ + id: "range-assets-deleted", + data: rangeDeleted, + getPath: (a) => [ + [a.start_lng as number, a.start_lat as number], + [a.lng as number, a.lat as number], + [a.end_lng as number, a.end_lat as number], + ], + getColor: [231, 76, 60, 180], + getWidth: 4, + widthUnits: "pixels", + extensions: [new PathStyleExtension({ dash: true })], + // @ts-expect-error PathStyleExtension adds these props at runtime + getDashArray: [3, 3], + dashJustified: true, + pickable: true, + }), + ); + } + if (layerVisibility.fixed && fixedDeleted.length > 0) { + layers.push( + new ScatterplotLayer({ + id: "fixed-assets-deleted", + data: fixedDeleted, + getPosition: (a) => [a.lng as number, a.lat as number], + getRadius: 9, + radiusUnits: "pixels", + getFillColor: [231, 76, 60, 60], + getLineColor: [231, 76, 60, 220], + stroked: true, + getLineWidth: 2, + lineWidthUnits: "pixels", + pickable: true, + }), + ); + } + // Cross-side / cross-video links between paired assets — thin pink lines. + // Render once per pair (id < pair_id) so we don't draw twice. + { + const linkPaths: Array<{ + path: Array<[number, number]>; + locked: boolean; + idA: number; + idB: number; + }> = []; + const seen = new Set(); + // Build an id→asset map once; the per-asset .find() was O(N) inside this + // loop, making the layer build O(N²) at 50k visible assets. + const byId = new Map(); + for (const a of assets) byId.set(a.id, a); + for (const a of assets) { + if (a.deleted !== 0) continue; + if (a.lat === null || a.lng === null) continue; + if (a.link_pair_id === null || seen.has(a.id)) continue; + const partner = byId.get(a.link_pair_id); + if (!partner || partner.lat === null || partner.lng === null) continue; + seen.add(a.id); + seen.add(partner.id); + linkPaths.push({ + path: [ + [a.lng, a.lat], + [partner.lng as number, partner.lat as number], + ], + locked: + (a.link_locked ?? 0) === 1 || (partner.link_locked ?? 0) === 1, + idA: a.id, + idB: partner.id, + }); + } + if (linkPaths.length > 0) { + layers.push( + new PathLayer<{ + path: Array<[number, number]>; + locked: boolean; + idA: number; + idB: number; + }>({ + id: "asset-links-halo", + data: linkPaths, + getPath: (d) => d.path, + getColor: [255, 255, 255, 200], + getWidth: 9, + widthUnits: "pixels", + widthMinPixels: 7, + pickable: false, + }), + ); + layers.push( + new PathLayer<{ + path: Array<[number, number]>; + locked: boolean; + idA: number; + idB: number; + }>({ + id: "asset-links", + data: linkPaths, + getPath: (d) => d.path, + // Locked links are saturated pink; auto-links are translucent grey. + getColor: (d) => + d.locked ? [233, 30, 99, 240] : [52, 152, 219, 220], + getWidth: 4, + widthUnits: "pixels", + widthMinPixels: 3, + pickable: true, + }), + ); + } + } + if (highlightedIds.length > 0) { + const idSet = new Set(highlightedIds); + const halos: Array<[number, number]> = []; + for (const a of assets) { + if (a.deleted !== 0) continue; + if (!idSet.has(a.id)) continue; + if (a.lat !== null && a.lng !== null) { + halos.push([a.lng, a.lat]); + } + } + if (halos.length > 0) { + layers.push( + new ScatterplotLayer<[number, number]>({ + id: "lasso-highlight", + data: halos, + getPosition: (d) => d, + getRadius: 14, + radiusUnits: "pixels", + getFillColor: [233, 30, 99, 60], + getLineColor: [233, 30, 99, 255], + stroked: true, + getLineWidth: 3, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + } + if (anchorIds.length > 0) { + const idSet = new Set(anchorIds); + const halos: Array<[number, number]> = []; + for (const a of assets) { + if (a.deleted !== 0) continue; + if (!idSet.has(a.id)) continue; + if (a.lat !== null && a.lng !== null) halos.push([a.lng, a.lat]); + } + if (halos.length > 0) { + layers.push( + new ScatterplotLayer<[number, number]>({ + id: "anchor-rings", + data: halos, + getPosition: (d) => d, + getRadius: 18, + radiusUnits: "pixels", + getFillColor: [255, 215, 0, 0], + getLineColor: [255, 193, 7, 255], + stroked: true, + getLineWidth: 4, + lineWidthUnits: "pixels", + pickable: false, + }), + ); + } + } + if (layerVisibility.fixed) { + layers.push( + new ScatterplotLayer({ + id: "fixed-assets", + data: fixedPoints, + getPosition: (a) => [a.lng as number, a.lat as number], + getRadius: 10, + radiusUnits: "pixels", + getFillColor: colorForFixed, + getLineColor: [255, 255, 255, 255], + lineWidthUnits: "pixels", + getLineWidth: 1.5, + stroked: true, + pickable: true, + updateTriggers: { getFillColor: fixedPoints }, + }), + ); + } + overlay.setProps({ layers }); + }, [ + fixedPoints, + rangePaths, + scopePolygonFC, + scopeLineFC, + osmRoads, + metadataTrack, + layerVisibility, + selectedRange, + colorBy, + osmEditMode, + editingRoadId, + roadOffsetMeters, + drawRoadMode, + drawRoadCoords, + assets, + highlightedIds, + fixedDeleted, + rangeDeleted, + rangePoints, + ]); + + // Manage draggable HTML markers + per-vertex popup for the actively-edited asset. + // For fixed: one cyan pin + auto-popup with the single image. + // For range: 3 pins (S/M/E); click a pin to open a popup at that pin with that + // pin's image only. + useEffect(() => { + const map = mapRef.current; + if (!map || !selectedAsset) return; + const markers: maplibregl.Marker[] = []; + let activePopup: maplibregl.Popup | null = null; + + const labelFor = (kind: Vertex) => + kind === "start" + ? "S" + : kind === "end" + ? "E" + : kind === "mid" + ? "M" + : "·"; + + const verboseFor = (kind: Vertex) => + kind === "start" + ? "Start" + : kind === "end" + ? "End" + : kind === "mid" + ? "Mid" + : ""; + + const showVertexPopup = ( + lng: number, + lat: number, + url: string | null | undefined, + kindLabel: string, + ) => { + if (activePopup) activePopup.remove(); + if (!url) return; + if (!popupEnabled) return; + const root = document.createElement("div"); + root.className = "asset-popup"; + const grid = document.createElement("div"); + grid.className = "popup-imgs"; + const img = document.createElement("img"); + img.src = resolveImageSrc(url, imageFolder); + img.alt = "asset preview"; + img.loading = "eager"; + img.decoding = "async"; + // fetchPriority hint (Chrome / WebKit) — prioritise the visible popup image. + (img as HTMLImageElement & { fetchPriority?: string }).fetchPriority = + "high"; + grid.appendChild(img); + root.appendChild(grid); + + const cap = document.createElement("div"); + cap.className = "popup-caption"; + const strong = document.createElement("strong"); + strong.textContent = kindLabel + ? `${selectedAsset.asset_name} · ${kindLabel}` + : selectedAsset.asset_name; + cap.appendChild(strong); + if (selectedAsset.side) { + cap.appendChild(document.createTextNode(" ")); + const tag = document.createElement("span"); + tag.className = `side-tag side-${selectedAsset.side.toLowerCase()}`; + tag.textContent = selectedAsset.side; + cap.appendChild(tag); + } + cap.appendChild(document.createElement("br")); + const small = document.createElement("small"); + small.textContent = selectedAsset.row_id; + cap.appendChild(small); + root.appendChild(cap); + + // Anchor the popup so it extends toward the side the asset is on: + // side=Left → asset is on the left of the road → popup appears on the LEFT + // of the pin → anchor right edge of popup to pin (anchor: "right") + // side=Right → opposite. + const sideKey = (selectedAsset.side ?? "").toLowerCase(); + const anchor: maplibregl.PositionAnchor = + sideKey === "left" || sideKey === "lhs" + ? "right" + : sideKey === "right" || sideKey === "rhs" + ? "left" + : "bottom"; + activePopup = new maplibregl.Popup({ + closeButton: true, + closeOnClick: false, + maxWidth: "none", + offset: 18, + anchor, + }) + .setLngLat([lng, lat]) + .setDOMContent(root) + .addTo(map); + }; + + type V = { + kind: Vertex; + lat: number | null; + lng: number | null; + img: string | null; + }; + const verts: V[] = + selectedAsset.asset_type === "fixed" + ? [ + { + kind: "fixed", + lat: selectedAsset.lat, + lng: selectedAsset.lng, + img: selectedAsset.image_path, + }, + ] + : [ + { + kind: "start", + lat: selectedAsset.start_lat, + lng: selectedAsset.start_lng, + img: selectedAsset.image_path1, + }, + { + kind: "mid", + lat: selectedAsset.lat, + lng: selectedAsset.lng, + img: selectedAsset.image_path2, + }, + { + kind: "end", + lat: selectedAsset.end_lat, + lng: selectedAsset.end_lng, + img: selectedAsset.image_path3, + }, + ]; + const id = selectedAsset.id; + for (const v of verts) { + if (v.lat === null || v.lng === null) continue; + const el = document.createElement("div"); + const pin = document.createElement("div"); + pin.className = `vertex-pin v-${v.kind}`; + pin.textContent = labelFor(v.kind); + el.appendChild(pin); + el.addEventListener("click", (ev) => { + ev.stopPropagation(); + showVertexPopup(v.lng as number, v.lat as number, v.img, verboseFor(v.kind)); + }); + const m = new maplibregl.Marker({ element: el, draggable: true }) + .setLngLat([v.lng, v.lat]) + .addTo(map); + m.on("dragend", () => { + const ll = m.getLngLat(); + onPositionChangeRef.current?.(id, v.kind, ll.lat, ll.lng); + }); + markers.push(m); + } + + // For fixed assets, auto-open the popup on the single pin. + if (selectedAsset.asset_type === "fixed") { + const v = verts[0]; + if (v.lat !== null && v.lng !== null) { + showVertexPopup(v.lng, v.lat, v.img, ""); + } + } + + const onEsc = (ev: KeyboardEvent) => { + if (ev.key === "Escape" && activePopup) { + activePopup.remove(); + activePopup = null; + } + }; + window.addEventListener("keydown", onEsc); + + return () => { + window.removeEventListener("keydown", onEsc); + markers.forEach((m) => m.remove()); + if (activePopup) activePopup.remove(); + }; + }, [selectedAsset, imageFolder, popupEnabled]); + + useEffect(() => { + const container = containerRef.current; + if (!container) return; + container.style.cursor = + placeMode || drawRoadMode || lassoMode ? "crosshair" : ""; + }, [placeMode, drawRoadMode, lassoMode]); + + // Lasso (circle) selection: drag from center to edge while in lassoMode. + useEffect(() => { + if (!lassoMode) return; + const map = mapRef.current; + const container = containerRef.current; + if (!map || !container) return; + // Polygon mode keeps panning/zooming on so the user can compose a multi-vertex + // selection over a wide area. Circle/rect modes still need dragPan off so the + // drag gesture sizes the lasso instead of panning. + if (lassoShape !== "polygon") { + map.dragPan.disable(); + } + let dragging: { cx: number; cy: number } | null = null; + let preview: HTMLDivElement | null = null; + const removePreview = () => { + if (preview && preview.parentNode) preview.parentNode.removeChild(preview); + preview = null; + }; + const onDown = (e: MouseEvent) => { + const r = container.getBoundingClientRect(); + const cx = e.clientX - r.left; + const cy = e.clientY - r.top; + dragging = { cx, cy }; + removePreview(); + preview = document.createElement("div"); + preview.className = + lassoShape === "rect" ? "lasso-rect" : "lasso-circle"; + preview.style.left = `${cx}px`; + preview.style.top = `${cy}px`; + preview.style.width = `0px`; + preview.style.height = `0px`; + container.appendChild(preview); + e.preventDefault(); + }; + const onMove = (e: MouseEvent) => { + if (!dragging || !preview) return; + const r = container.getBoundingClientRect(); + const x = e.clientX - r.left; + const y = e.clientY - r.top; + if (lassoShape === "rect") { + const left = Math.min(dragging.cx, x); + const top = Math.min(dragging.cy, y); + preview.style.left = `${left}px`; + preview.style.top = `${top}px`; + preview.style.width = `${Math.abs(x - dragging.cx)}px`; + preview.style.height = `${Math.abs(y - dragging.cy)}px`; + } else { + const dx = x - dragging.cx; + const dy = y - dragging.cy; + const radius = Math.hypot(dx, dy); + preview.style.left = `${dragging.cx - radius}px`; + preview.style.top = `${dragging.cy - radius}px`; + preview.style.width = `${radius * 2}px`; + preview.style.height = `${radius * 2}px`; + } + }; + const onUp = (e: MouseEvent) => { + if (!dragging) return; + const r = container.getBoundingClientRect(); + const ex = e.clientX - r.left; + const ey = e.clientY - r.top; + const a = map.unproject([dragging.cx, dragging.cy]); + const b = map.unproject([ex, ey]); + dragging = null; + removePreview(); + onLassoComplete?.(lassoShape === "rect" ? "rect" : "circle", [ + [a.lng, a.lat], + [b.lng, b.lat], + ]); + }; + + // Polygon mode: store vertices in lng/lat (source of truth). Re-project to + // screen coords on every render so panning/zooming keeps points anchored to + // the map. Click-to-add, click-near-first OR double-click to finish. + let polyPoints: Array<{ lng: number; lat: number }> = []; + let polySvg: SVGSVGElement | null = null; + let lastMouseXY: { x: number; y: number } | null = null; + const removePolySvg = () => { + if (polySvg && polySvg.parentNode) + polySvg.parentNode.removeChild(polySvg); + polySvg = null; + }; + const renderPoly = () => { + removePolySvg(); + if (polyPoints.length === 0) return; + const projected = polyPoints.map((p) => map.project([p.lng, p.lat])); + const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + svg.setAttribute( + "style", + "position:absolute;inset:0;pointer-events:none;z-index:7;", + ); + const w = container.clientWidth; + const h = container.clientHeight; + svg.setAttribute("width", String(w)); + svg.setAttribute("height", String(h)); + const pts = projected.map((p) => `${p.x},${p.y}`).join(" "); + const live = + lastMouseXY !== null ? ` ${lastMouseXY.x},${lastMouseXY.y}` : ""; + const poly = document.createElementNS( + "http://www.w3.org/2000/svg", + "polygon", + ); + poly.setAttribute("points", pts + live); + poly.setAttribute("fill", "rgba(233,30,99,0.15)"); + poly.setAttribute("stroke", "#e91e63"); + poly.setAttribute("stroke-width", "2"); + poly.setAttribute("stroke-dasharray", "4 3"); + svg.appendChild(poly); + projected.forEach((p, i) => { + const c = document.createElementNS( + "http://www.w3.org/2000/svg", + "circle", + ); + c.setAttribute("cx", String(p.x)); + c.setAttribute("cy", String(p.y)); + // First vertex gets a fatter ring to telegraph the auto-close hit zone. + c.setAttribute("r", i === 0 ? "7" : "4"); + c.setAttribute("fill", i === 0 ? "rgba(233,30,99,0.35)" : "#e91e63"); + c.setAttribute("stroke", "#fff"); + c.setAttribute("stroke-width", i === 0 ? "2" : "1"); + svg.appendChild(c); + }); + container.appendChild(svg); + polySvg = svg; + }; + const onPolyClick = (e: MouseEvent) => { + const r = container.getBoundingClientRect(); + const x = e.clientX - r.left; + const y = e.clientY - r.top; + // Auto-close: if click lands near the (current screen position of the) + // first vertex, finish polygon. + if (polyPoints.length >= 3) { + const first = map.project([polyPoints[0].lng, polyPoints[0].lat]); + const dx = x - first.x; + const dy = y - first.y; + if (dx * dx + dy * dy <= 196) { + e.preventDefault(); + e.stopPropagation(); + const points: Array<[number, number]> = polyPoints.map((p) => [ + p.lng, + p.lat, + ]); + polyPoints = []; + lastMouseXY = null; + removePolySvg(); + onLassoComplete?.("polygon", points); + return; + } + } + const ll = map.unproject([x, y]); + polyPoints.push({ lng: ll.lng, lat: ll.lat }); + renderPoly(); + e.preventDefault(); + e.stopPropagation(); + }; + const onPolyMove = (e: MouseEvent) => { + if (polyPoints.length === 0) return; + const r = container.getBoundingClientRect(); + lastMouseXY = { x: e.clientX - r.left, y: e.clientY - r.top }; + renderPoly(); + }; + const onMapMove = () => { + if (polyPoints.length > 0) renderPoly(); + }; + const onPolyDbl = (e: MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + if (polyPoints.length < 3) { + polyPoints = []; + removePolySvg(); + return; + } + const points: Array<[number, number]> = polyPoints.map((p) => [p.lng, p.lat]); + polyPoints = []; + removePolySvg(); + onLassoComplete?.("polygon", points); + }; + + if (lassoShape === "polygon") { + container.addEventListener("click", onPolyClick); + container.addEventListener("mousemove", onPolyMove); + container.addEventListener("dblclick", onPolyDbl); + map.on("move", onMapMove); + } else { + container.addEventListener("mousedown", onDown); + window.addEventListener("mousemove", onMove); + window.addEventListener("mouseup", onUp); + } + return () => { + map.dragPan.enable(); + if (lassoShape === "polygon") { + container.removeEventListener("click", onPolyClick); + container.removeEventListener("mousemove", onPolyMove); + container.removeEventListener("dblclick", onPolyDbl); + map.off("move", onMapMove); + removePolySvg(); + } else { + container.removeEventListener("mousedown", onDown); + window.removeEventListener("mousemove", onMove); + window.removeEventListener("mouseup", onUp); + removePreview(); + } + }; + }, [lassoMode, lassoShape, onLassoComplete]); + + // OSM road vertex editing: render draggable markers for every road whose + // vertices fall in the current viewport — no "pick one road first" step. + useEffect(() => { + if (!osmEditMode) return; + const map = mapRef.current; + if (!map || !osmRoads) return; + + let markers: maplibregl.Marker[] = []; + // Hard cap across ALL visible roads combined to stay responsive. + const MAX_VERTICES = 80; + const MAX_GHOSTS = 40; + const renderMarkers = () => { + markers.forEach((m) => m.remove()); + markers = []; + if (map.getZoom() < 14) return; + const b = map.getBounds(); + const padLat = (b.getNorth() - b.getSouth()) * 0.1; + const padLng = (b.getEast() - b.getWest()) * 0.1; + const inView = (lng: number, lat: number) => + lat >= b.getSouth() - padLat && + lat <= b.getNorth() + padLat && + lng >= b.getWest() - padLng && + lng <= b.getEast() + padLng; + + type Spot = { + roadId: number; + idx: number; + coord: [number, number]; + coords: Array<[number, number]>; + }; + const visibleSpots: Spot[] = []; + const ghostSpots: Array<{ + roadId: number; + afterIdx: number; + mid: [number, number]; + coords: Array<[number, number]>; + }> = []; + + // Build per-road coords arrays once; share with closures. + for (const f of osmRoads.features) { + const geom = f.geometry as + | { type: string; coordinates: Array<[number, number]> } + | undefined; + if (!geom || geom.type !== "LineString") continue; + // Quick reject: if road's bbox doesn't intersect viewport, skip. + const cs = geom.coordinates; + if (cs.length < 2) continue; + let mnLng = Infinity, + mxLng = -Infinity, + mnLat = Infinity, + mxLat = -Infinity; + for (const c of cs) { + if (c[0] < mnLng) mnLng = c[0]; + if (c[0] > mxLng) mxLng = c[0]; + if (c[1] < mnLat) mnLat = c[1]; + if (c[1] > mxLat) mxLat = c[1]; + } + if ( + mxLat < b.getSouth() - padLat || + mnLat > b.getNorth() + padLat || + mxLng < b.getWest() - padLng || + mnLng > b.getEast() + padLng + ) { + continue; + } + const coords: Array<[number, number]> = cs.map( + (c) => [c[0], c[1]] as [number, number], + ); + const visIdx: number[] = []; + for (let i = 0; i < coords.length; i++) { + if (inView(coords[i][0], coords[i][1])) visIdx.push(i); + } + for (const idx of visIdx) { + if (visibleSpots.length >= MAX_VERTICES) break; + visibleSpots.push({ + roadId: f.properties.id, + idx, + coord: coords[idx], + coords, + }); + } + // Ghost midpoints between consecutive visible vertices that are also + // adjacent in the polyline. + for (let k = 0; k + 1 < visIdx.length; k++) { + if (ghostSpots.length >= MAX_GHOSTS) break; + const i = visIdx[k]; + const j = visIdx[k + 1]; + if (j !== i + 1) continue; + const a = coords[i]; + const c2 = coords[j]; + ghostSpots.push({ + roadId: f.properties.id, + afterIdx: i, + mid: [(a[0] + c2[0]) / 2, (a[1] + c2[1]) / 2], + coords, + }); + } + if ( + visibleSpots.length >= MAX_VERTICES && + ghostSpots.length >= MAX_GHOSTS + ) { + break; + } + } + + for (const s of visibleSpots) { + const el = document.createElement("div"); + const pin = document.createElement("div"); + pin.className = "vertex-pin v-osm"; + pin.textContent = "•"; + el.appendChild(pin); + const m = new maplibregl.Marker({ element: el, draggable: true }) + .setLngLat(s.coord) + .addTo(map); + m.on("dragend", () => { + const ll = m.getLngLat(); + s.coords[s.idx] = [ll.lng, ll.lat]; + onUpdateRoad?.( + s.roadId, + s.coords.map((p) => [p[0], p[1]]), + ); + }); + markers.push(m); + } + for (const g of ghostSpots) { + const el = document.createElement("div"); + const pin = document.createElement("div"); + pin.className = "vertex-pin v-osm-ghost"; + pin.textContent = "+"; + el.appendChild(pin); + el.title = "Click to insert a vertex here"; + el.addEventListener("click", (ev) => { + ev.stopPropagation(); + const next = g.coords.slice(); + next.splice(g.afterIdx + 1, 0, g.mid); + onUpdateRoad?.(g.roadId, next); + }); + const m = new maplibregl.Marker({ element: el, draggable: false }) + .setLngLat(g.mid) + .addTo(map); + markers.push(m); + } + }; + + renderMarkers(); + map.on("moveend", renderMarkers); + return () => { + map.off("moveend", renderMarkers); + markers.forEach((m) => m.remove()); + }; + }, [osmEditMode, osmRoads, onUpdateRoad]); + + return
; +} diff --git a/src/assets/react.svg b/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/basemaps.ts b/src/basemaps.ts new file mode 100644 index 0000000..89a5684 --- /dev/null +++ b/src/basemaps.ts @@ -0,0 +1,133 @@ +import type { StyleSpecification } from "maplibre-gl"; + +export type Basemap = { + id: string; + name: string; + style: StyleSpecification; +}; + +function rasterStyle( + sourceId: string, + tiles: string[], + attribution: string, + maxzoom = 19, +): StyleSpecification { + return { + version: 8, + sources: { + [sourceId]: { + type: "raster", + tiles, + tileSize: 256, + attribution, + maxzoom, + }, + }, + layers: [ + { + id: sourceId, + type: "raster", + source: sourceId, + }, + ], + }; +} + +export const BASEMAPS: Basemap[] = [ + { + id: "google-satellite", + name: "Google Satellite", + style: rasterStyle( + "google-satellite", + [ + "https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga", + "https://mt1.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga", + "https://mt2.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga", + "https://mt3.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga", + ], + "© Google", + 22, + ), + }, + { + id: "google-hybrid-zoomable", + name: "Google Satellite (deep zoom)", + style: rasterStyle( + "google-hybrid-zoomable", + [ + "https://khms0.google.com/kh/v=996?x={x}&y={y}&z={z}", + "https://khms1.google.com/kh/v=996?x={x}&y={y}&z={z}", + "https://khms2.google.com/kh/v=996?x={x}&y={y}&z={z}", + "https://khms3.google.com/kh/v=996?x={x}&y={y}&z={z}", + ], + "© Google", + 22, + ), + }, + { + id: "esri-clarity", + name: "Esri Imagery Clarity", + style: rasterStyle( + "esri-clarity", + [ + "https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + ], + "Tiles © Esri Clarity", + 22, + ), + }, + { + id: "osm", + name: "OpenStreetMap", + style: rasterStyle( + "osm", + ["https://tile.openstreetmap.org/{z}/{x}/{y}.png"], + "© OpenStreetMap contributors", + 19, + ), + }, + { + id: "esri-imagery", + name: "ArcGIS World Imagery", + style: rasterStyle( + "esri-imagery", + [ + "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + ], + "Tiles © Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community", + 19, + ), + }, + { + id: "esri-street", + name: "ArcGIS World Street Map", + style: rasterStyle( + "esri-street", + [ + "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}", + ], + "Tiles © Esri", + 19, + ), + }, + { + id: "opentopomap", + name: "OpenTopoMap", + style: rasterStyle( + "opentopomap", + [ + "https://a.tile.opentopomap.org/{z}/{x}/{y}.png", + "https://b.tile.opentopomap.org/{z}/{x}/{y}.png", + "https://c.tile.opentopomap.org/{z}/{x}/{y}.png", + ], + "© OpenTopoMap (CC-BY-SA), © OpenStreetMap contributors", + 17, + ), + }, +]; + +export const DEFAULT_BASEMAP_ID = "google-hybrid-zoomable"; + +export function basemapById(id: string): Basemap { + return BASEMAPS.find((b) => b.id === id) ?? BASEMAPS[0]; +} diff --git a/src/colors.ts b/src/colors.ts new file mode 100644 index 0000000..f7103c6 --- /dev/null +++ b/src/colors.ts @@ -0,0 +1,34 @@ +// Stable video_name -> RGB hash (12-color palette). + +const PALETTE: ReadonlyArray = [ + [231, 76, 60], + [52, 152, 219], + [46, 204, 113], + [241, 196, 15], + [155, 89, 182], + [230, 126, 34], + [26, 188, 156], + [233, 30, 99], + [3, 169, 244], + [205, 220, 57], + [255, 87, 34], + [121, 85, 72], +]; + +const cache = new Map(); + +export function videoColorRGB( + name: string | null | undefined, +): readonly [number, number, number] { + const key = name ?? ""; + const hit = cache.get(key); + if (hit) return hit; + let h = 0; + for (let i = 0; i < key.length; i++) { + h = ((h << 5) - h + key.charCodeAt(i)) | 0; + } + const idx = ((h % PALETTE.length) + PALETTE.length) % PALETTE.length; + const c = PALETTE[idx]; + cache.set(key, c); + return c; +} diff --git a/src/imagePath.ts b/src/imagePath.ts new file mode 100644 index 0000000..7899c61 --- /dev/null +++ b/src/imagePath.ts @@ -0,0 +1,27 @@ +import { convertFileSrc } from "@tauri-apps/api/core"; + +export function basename(p: string): string { + const s = p.replace(/\\/g, "/"); + const i = s.lastIndexOf("/"); + return i >= 0 ? s.slice(i + 1) : s; +} + +export function resolveImageSrc( + url: string, + imageFolder: string | null, +): string { + if (!url) return ""; + // HTTP(S) wins over a local image folder. The image folder is meant to + // redirect *local* image_paths to a different on-disk location for offline + // viewing — it should not hijack remote URLs. + if (/^https?:\/\//i.test(url)) return url; + if (imageFolder) { + const sep = + imageFolder.endsWith("/") || imageFolder.endsWith("\\") ? "" : "/"; + return convertFileSrc(`${imageFolder}${sep}${basename(url)}`); + } + if (url.startsWith("/") || /^[A-Za-z]:[\\/]/.test(url)) { + return convertFileSrc(url); + } + return url; +} diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..2be325e --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,9 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App"; + +ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( + + + , +); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..b15fcd7 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,43 @@ +export type ScopePolygon = { + id: number; + name: string | null; + geojson: string; + geom_type: string; +}; + +export type ActionRow = { + id: number; + action_type: string; + scope: string; + asset_ids: string; + user_id: string; + before: string | null; + after: string | null; + ts: string; + undone: number; +}; + +export type Asset = { + id: number; + row_id: string; + asset_type: "fixed" | "range"; + asset_name: string; + video_name: string; + lat: number | null; + lng: number | null; + start_lat: number | null; + start_lng: number | null; + end_lat: number | null; + end_lng: number | null; + image_path: string | null; + image_path1: string | null; + image_path2: string | null; + image_path3: string | null; + deleted: number; + modified: number; + merged_into: number | null; + in_scope: number | null; + side: string | null; + link_pair_id: number | null; + link_locked: number | null; +}; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/test_scope_doha.kml b/test_scope_doha.kml new file mode 100644 index 0000000..4c10603 --- /dev/null +++ b/test_scope_doha.kml @@ -0,0 +1,22 @@ + + + + Doha test scope + + Doha rough scope + + + + + 51.350,25.500,0 + 51.550,25.500,0 + 51.550,25.800,0 + 51.350,25.800,0 + 51.350,25.500,0 + + + + + + + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..5e631b6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "esModuleInterop": true, + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000..42872c5 --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..ddad22a --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,32 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +// @ts-expect-error process is a nodejs global +const host = process.env.TAURI_DEV_HOST; + +// https://vite.dev/config/ +export default defineConfig(async () => ({ + plugins: [react()], + + // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` + // + // 1. prevent Vite from obscuring rust errors + clearScreen: false, + // 2. tauri expects a fixed port, fail if that port is not available + server: { + port: 1420, + strictPort: true, + host: host || false, + hmr: host + ? { + protocol: "ws", + host, + port: 1421, + } + : undefined, + watch: { + // 3. tell Vite to ignore watching `src-tauri` + ignored: ["**/src-tauri/**"], + }, + }, +}));