all these changes

This commit is contained in:
Jake Kasper
2026-04-09 13:19:47 -05:00
parent e83a51a051
commit 65315f36d1
39102 changed files with 7932979 additions and 567 deletions

20
frontend/node_modules/@turf/truncate/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 TurfJS
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

66
frontend/node_modules/@turf/truncate/README.md generated vendored Normal file
View File

@@ -0,0 +1,66 @@
# @turf/truncate
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## truncate
Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
**Parameters**
- `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
- `options` **[Object][2]** Optional parameters (optional, default `{}`)
- `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`)
- `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`)
- `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
**Examples**
```javascript
var point = turf.point([
70.46923055566859,
58.11088890802906,
1508
]);
var options = {precision: 3, coordinates: 2};
var truncated = turf.truncate(point, options);
//=truncated.geometry.coordinates => [70.469, 58.111]
//addToMap
var addToMap = [truncated];
```
Returns **[GeoJSON][1]** layer with truncated geometry
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->
---
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
### Installation
Install this module individually:
```sh
$ npm install @turf/truncate
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

76
frontend/node_modules/@turf/truncate/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,76 @@
import { coordEach } from "@turf/meta";
/**
* Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
*
* @name truncate
* @param {GeoJSON} geojson any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
* @param {Object} [options={}] Optional parameters
* @param {number} [options.precision=6] coordinate decimal precision
* @param {number} [options.coordinates=3] maximum number of coordinates (primarly used to remove z coordinates)
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} layer with truncated geometry
* @example
* var point = turf.point([
* 70.46923055566859,
* 58.11088890802906,
* 1508
* ]);
* var options = {precision: 3, coordinates: 2};
* var truncated = turf.truncate(point, options);
* //=truncated.geometry.coordinates => [70.469, 58.111]
*
* //addToMap
* var addToMap = [truncated];
*/
function truncate(geojson, options) {
if (options === void 0) { options = {}; }
// Optional parameters
var precision = options.precision;
var coordinates = options.coordinates;
var mutate = options.mutate;
// default params
precision =
precision === undefined || precision === null || isNaN(precision)
? 6
: precision;
coordinates =
coordinates === undefined || coordinates === null || isNaN(coordinates)
? 3
: coordinates;
// validation
if (!geojson)
throw new Error("<geojson> is required");
if (typeof precision !== "number")
throw new Error("<precision> must be a number");
if (typeof coordinates !== "number")
throw new Error("<coordinates> must be a number");
// prevent input mutation
if (mutate === false || mutate === undefined)
geojson = JSON.parse(JSON.stringify(geojson));
var factor = Math.pow(10, precision);
// Truncate Coordinates
coordEach(geojson, function (coords) {
truncateCoords(coords, factor, coordinates);
});
return geojson;
}
/**
* Truncate Coordinates - Mutates coordinates in place
*
* @private
* @param {Array<any>} coords Geometry Coordinates
* @param {number} factor rounding factor for coordinate decimal precision
* @param {number} coordinates maximum number of coordinates (primarly used to remove z coordinates)
* @returns {Array<any>} mutated coordinates
*/
function truncateCoords(coords, factor, coordinates) {
// Remove extra coordinates (usually elevation coordinates and more)
if (coords.length > coordinates)
coords.splice(coordinates, coords.length);
// Truncate coordinate decimals
for (var i = 0; i < coords.length; i++) {
coords[i] = Math.round(coords[i] * factor) / factor;
}
return coords;
}
export default truncate;

View File

@@ -0,0 +1 @@
{"type":"module"}

30
frontend/node_modules/@turf/truncate/dist/js/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,30 @@
import { AllGeoJSON } from "@turf/helpers";
/**
* Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
*
* @name truncate
* @param {GeoJSON} geojson any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
* @param {Object} [options={}] Optional parameters
* @param {number} [options.precision=6] coordinate decimal precision
* @param {number} [options.coordinates=3] maximum number of coordinates (primarly used to remove z coordinates)
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} layer with truncated geometry
* @example
* var point = turf.point([
* 70.46923055566859,
* 58.11088890802906,
* 1508
* ]);
* var options = {precision: 3, coordinates: 2};
* var truncated = turf.truncate(point, options);
* //=truncated.geometry.coordinates => [70.469, 58.111]
*
* //addToMap
* var addToMap = [truncated];
*/
declare function truncate<T extends AllGeoJSON>(geojson: T, options?: {
precision?: number;
coordinates?: number;
mutate?: boolean;
}): T;
export default truncate;

78
frontend/node_modules/@turf/truncate/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var meta_1 = require("@turf/meta");
/**
* Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
*
* @name truncate
* @param {GeoJSON} geojson any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
* @param {Object} [options={}] Optional parameters
* @param {number} [options.precision=6] coordinate decimal precision
* @param {number} [options.coordinates=3] maximum number of coordinates (primarly used to remove z coordinates)
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} layer with truncated geometry
* @example
* var point = turf.point([
* 70.46923055566859,
* 58.11088890802906,
* 1508
* ]);
* var options = {precision: 3, coordinates: 2};
* var truncated = turf.truncate(point, options);
* //=truncated.geometry.coordinates => [70.469, 58.111]
*
* //addToMap
* var addToMap = [truncated];
*/
function truncate(geojson, options) {
if (options === void 0) { options = {}; }
// Optional parameters
var precision = options.precision;
var coordinates = options.coordinates;
var mutate = options.mutate;
// default params
precision =
precision === undefined || precision === null || isNaN(precision)
? 6
: precision;
coordinates =
coordinates === undefined || coordinates === null || isNaN(coordinates)
? 3
: coordinates;
// validation
if (!geojson)
throw new Error("<geojson> is required");
if (typeof precision !== "number")
throw new Error("<precision> must be a number");
if (typeof coordinates !== "number")
throw new Error("<coordinates> must be a number");
// prevent input mutation
if (mutate === false || mutate === undefined)
geojson = JSON.parse(JSON.stringify(geojson));
var factor = Math.pow(10, precision);
// Truncate Coordinates
meta_1.coordEach(geojson, function (coords) {
truncateCoords(coords, factor, coordinates);
});
return geojson;
}
/**
* Truncate Coordinates - Mutates coordinates in place
*
* @private
* @param {Array<any>} coords Geometry Coordinates
* @param {number} factor rounding factor for coordinate decimal precision
* @param {number} coordinates maximum number of coordinates (primarly used to remove z coordinates)
* @returns {Array<any>} mutated coordinates
*/
function truncateCoords(coords, factor, coordinates) {
// Remove extra coordinates (usually elevation coordinates and more)
if (coords.length > coordinates)
coords.splice(coordinates, coords.length);
// Truncate coordinate decimals
for (var i = 0; i < coords.length; i++) {
coords[i] = Math.round(coords[i] * factor) / factor;
}
return coords;
}
exports.default = truncate;

68
frontend/node_modules/@turf/truncate/package.json generated vendored Normal file
View File

@@ -0,0 +1,68 @@
{
"name": "@turf/truncate",
"version": "6.5.0",
"description": "turf truncate module",
"author": "Turf Authors",
"contributors": [
"Denis Carriere <@DenisCarriere>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {
"type": "git",
"url": "git://github.com/Turfjs/turf.git"
},
"funding": "https://opencollective.com/turf",
"publishConfig": {
"access": "public"
},
"keywords": [
"turf",
"geojson",
"gis",
"truncate"
],
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
"types": "dist/js/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0",
"@turf/meta": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}