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/rewind/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.

64
frontend/node_modules/@turf/rewind/README.md generated vendored Normal file
View File

@@ -0,0 +1,64 @@
# @turf/rewind
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## rewind
Rewind [(Multi)LineString][1] or [(Multi)Polygon][2] outer ring counterclockwise and inner rings clockwise (Uses [Shoelace Formula][3]).
**Parameters**
- `geojson` **[GeoJSON][4]** input GeoJSON Polygon
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.reverse` **[boolean][6]** enable reverse winding (optional, default `false`)
- `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
**Examples**
```javascript
var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);
var rewind = turf.rewind(polygon);
//addToMap
var addToMap = [rewind];
```
Returns **[GeoJSON][4]** rewind Polygon
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[3]: http://en.wikipedia.org/wiki/Shoelace_formula
[4]: https://tools.ietf.org/html/rfc7946#section-3
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[6]: 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/rewind
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,134 @@
import clone from '@turf/clone';
import booleanClockwise from '@turf/boolean-clockwise';
import { featureEach, geomEach } from '@turf/meta';
import { getCoords } from '@turf/invariant';
import { isObject, featureCollection } from '@turf/helpers';
/**
* Rewind {@link LineString|(Multi)LineString} or {@link Polygon|(Multi)Polygon} outer ring counterclockwise and inner rings clockwise (Uses {@link http://en.wikipedia.org/wiki/Shoelace_formula|Shoelace Formula}).
*
* @name rewind
* @param {GeoJSON} geojson input GeoJSON Polygon
* @param {Object} [options={}] Optional parameters
* @param {boolean} [options.reverse=false] enable reverse winding
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} rewind Polygon
* @example
* var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);
*
* var rewind = turf.rewind(polygon);
*
* //addToMap
* var addToMap = [rewind];
*/
function rewind(geojson, options) {
// Optional parameters
options = options || {};
if (!isObject(options)) throw new Error("options is invalid");
var reverse = options.reverse || false;
var mutate = options.mutate || false;
// validation
if (!geojson) throw new Error("<geojson> is required");
if (typeof reverse !== "boolean")
throw new Error("<reverse> must be a boolean");
if (typeof mutate !== "boolean")
throw new Error("<mutate> must be a boolean");
// prevent input mutation
if (mutate === false) geojson = clone(geojson);
// Support Feature Collection or Geometry Collection
var results = [];
switch (geojson.type) {
case "GeometryCollection":
geomEach(geojson, function (geometry) {
rewindFeature(geometry, reverse);
});
return geojson;
case "FeatureCollection":
featureEach(geojson, function (feature) {
featureEach(rewindFeature(feature, reverse), function (result) {
results.push(result);
});
});
return featureCollection(results);
}
// Support Feature or Geometry Objects
return rewindFeature(geojson, reverse);
}
/**
* Rewind
*
* @private
* @param {Geometry|Feature<any>} geojson Geometry or Feature
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {Geometry|Feature<any>} rewind Geometry or Feature
*/
function rewindFeature(geojson, reverse) {
var type = geojson.type === "Feature" ? geojson.geometry.type : geojson.type;
// Support all GeoJSON Geometry Objects
switch (type) {
case "GeometryCollection":
geomEach(geojson, function (geometry) {
rewindFeature(geometry, reverse);
});
return geojson;
case "LineString":
rewindLineString(getCoords(geojson), reverse);
return geojson;
case "Polygon":
rewindPolygon(getCoords(geojson), reverse);
return geojson;
case "MultiLineString":
getCoords(geojson).forEach(function (lineCoords) {
rewindLineString(lineCoords, reverse);
});
return geojson;
case "MultiPolygon":
getCoords(geojson).forEach(function (lineCoords) {
rewindPolygon(lineCoords, reverse);
});
return geojson;
case "Point":
case "MultiPoint":
return geojson;
}
}
/**
* Rewind LineString - outer ring clockwise
*
* @private
* @param {Array<Array<number>>} coords GeoJSON LineString geometry coordinates
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {void} mutates coordinates
*/
function rewindLineString(coords, reverse) {
if (booleanClockwise(coords) === reverse) coords.reverse();
}
/**
* Rewind Polygon - outer ring counterclockwise and inner rings clockwise.
*
* @private
* @param {Array<Array<Array<number>>>} coords GeoJSON Polygon geometry coordinates
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {void} mutates coordinates
*/
function rewindPolygon(coords, reverse) {
// outer ring
if (booleanClockwise(coords[0]) !== reverse) {
coords[0].reverse();
}
// inner rings
for (var i = 1; i < coords.length; i++) {
if (booleanClockwise(coords[i]) === reverse) {
coords[i].reverse();
}
}
}
export default rewind;

View File

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

142
frontend/node_modules/@turf/rewind/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,142 @@
'use strict';
var clone = require('@turf/clone');
var booleanClockwise = require('@turf/boolean-clockwise');
var meta = require('@turf/meta');
var invariant = require('@turf/invariant');
var helpers = require('@turf/helpers');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
var booleanClockwise__default = /*#__PURE__*/_interopDefaultLegacy(booleanClockwise);
/**
* Rewind {@link LineString|(Multi)LineString} or {@link Polygon|(Multi)Polygon} outer ring counterclockwise and inner rings clockwise (Uses {@link http://en.wikipedia.org/wiki/Shoelace_formula|Shoelace Formula}).
*
* @name rewind
* @param {GeoJSON} geojson input GeoJSON Polygon
* @param {Object} [options={}] Optional parameters
* @param {boolean} [options.reverse=false] enable reverse winding
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} rewind Polygon
* @example
* var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);
*
* var rewind = turf.rewind(polygon);
*
* //addToMap
* var addToMap = [rewind];
*/
function rewind(geojson, options) {
// Optional parameters
options = options || {};
if (!helpers.isObject(options)) throw new Error("options is invalid");
var reverse = options.reverse || false;
var mutate = options.mutate || false;
// validation
if (!geojson) throw new Error("<geojson> is required");
if (typeof reverse !== "boolean")
throw new Error("<reverse> must be a boolean");
if (typeof mutate !== "boolean")
throw new Error("<mutate> must be a boolean");
// prevent input mutation
if (mutate === false) geojson = clone__default['default'](geojson);
// Support Feature Collection or Geometry Collection
var results = [];
switch (geojson.type) {
case "GeometryCollection":
meta.geomEach(geojson, function (geometry) {
rewindFeature(geometry, reverse);
});
return geojson;
case "FeatureCollection":
meta.featureEach(geojson, function (feature) {
meta.featureEach(rewindFeature(feature, reverse), function (result) {
results.push(result);
});
});
return helpers.featureCollection(results);
}
// Support Feature or Geometry Objects
return rewindFeature(geojson, reverse);
}
/**
* Rewind
*
* @private
* @param {Geometry|Feature<any>} geojson Geometry or Feature
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {Geometry|Feature<any>} rewind Geometry or Feature
*/
function rewindFeature(geojson, reverse) {
var type = geojson.type === "Feature" ? geojson.geometry.type : geojson.type;
// Support all GeoJSON Geometry Objects
switch (type) {
case "GeometryCollection":
meta.geomEach(geojson, function (geometry) {
rewindFeature(geometry, reverse);
});
return geojson;
case "LineString":
rewindLineString(invariant.getCoords(geojson), reverse);
return geojson;
case "Polygon":
rewindPolygon(invariant.getCoords(geojson), reverse);
return geojson;
case "MultiLineString":
invariant.getCoords(geojson).forEach(function (lineCoords) {
rewindLineString(lineCoords, reverse);
});
return geojson;
case "MultiPolygon":
invariant.getCoords(geojson).forEach(function (lineCoords) {
rewindPolygon(lineCoords, reverse);
});
return geojson;
case "Point":
case "MultiPoint":
return geojson;
}
}
/**
* Rewind LineString - outer ring clockwise
*
* @private
* @param {Array<Array<number>>} coords GeoJSON LineString geometry coordinates
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {void} mutates coordinates
*/
function rewindLineString(coords, reverse) {
if (booleanClockwise__default['default'](coords) === reverse) coords.reverse();
}
/**
* Rewind Polygon - outer ring counterclockwise and inner rings clockwise.
*
* @private
* @param {Array<Array<Array<number>>>} coords GeoJSON Polygon geometry coordinates
* @param {Boolean} [reverse=false] enable reverse winding
* @returns {void} mutates coordinates
*/
function rewindPolygon(coords, reverse) {
// outer ring
if (booleanClockwise__default['default'](coords[0]) !== reverse) {
coords[0].reverse();
}
// inner rings
for (var i = 1; i < coords.length; i++) {
if (booleanClockwise__default['default'](coords[i]) === reverse) {
coords[i].reverse();
}
}
}
module.exports = rewind;
module.exports.default = rewind;

12
frontend/node_modules/@turf/rewind/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { AllGeoJSON } from "@turf/helpers";
/**
* http://turfjs.org/docs/#rewind
*/
export default function rewind<T extends AllGeoJSON>(
geojson: T,
options?: {
reverse?: boolean;
mutate?: boolean;
}
): T;

70
frontend/node_modules/@turf/rewind/package.json generated vendored Normal file
View File

@@ -0,0 +1,70 @@
{
"name": "@turf/rewind",
"version": "6.5.0",
"description": "turf rewind module",
"author": "Turf Authors",
"contributors": [
"Abel Vázquez Montoro <@AbelVM>",
"Tom MacWright <@tmcw>",
"Denis Carriere <@DenisCarriere>",
"Morgan Herlocker <@morganherlocker>"
],
"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",
"polygon",
"rewind"
],
"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": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"scripts": {
"bench": "node -r esm bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/boolean-clockwise": "^6.5.0",
"@turf/clone": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0",
"@turf/meta": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}