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

74
frontend/node_modules/@turf/mask/README.md generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# @turf/mask
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## mask
Takes any type of [polygon][1] and an optional mask and returns a [polygon][1] exterior ring with holes.
**Parameters**
- `polygon` **([FeatureCollection][2] \| [Feature][3]&lt;([Polygon][4] \| [MultiPolygon][5])>)** GeoJSON Polygon used as interior rings or holes.
- `mask` **[Feature][3]&lt;[Polygon][4]>?** GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used)
**Examples**
```javascript
var polygon = turf.polygon([
[
[112, -21],
[116, -36],
[146, -39],
[153, -24],
[133, -10],
[112, -21],
],
]);
var mask = turf.polygon([
[
[90, -55],
[170, -55],
[170, 10],
[90, 10],
[90, -55],
],
]);
var masked = turf.mask(polygon, mask);
//addToMap
var addToMap = [masked];
```
Returns **[Feature][3]&lt;[Polygon][4]>** Masked Polygon (exterior ring with holes).
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://tools.ietf.org/html/rfc7946#section-3.2
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.7
<!-- 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/mask
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,79 @@
import { polygon, multiPolygon } from '@turf/helpers';
import polygonClipping from 'polygon-clipping';
/**
* Takes any type of {@link Polygon|polygon} and an optional mask and returns a {@link Polygon|polygon} exterior ring with holes.
*
* @name mask
* @param {FeatureCollection|Feature<Polygon|MultiPolygon>} polygon GeoJSON Polygon used as interior rings or holes.
* @param {Feature<Polygon>} [mask] GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used)
* @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes).
* @example
* var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);
* var mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);
*
* var masked = turf.mask(polygon, mask);
*
* //addToMap
* var addToMap = [masked]
*/
function mask(polygon, mask) {
// Define mask
var maskPolygon = createMask(mask);
var polygonOuters = null;
if (polygon.type === "FeatureCollection") polygonOuters = unionFc(polygon);
else
polygonOuters = createGeomFromPolygonClippingOutput(
polygonClipping.union(polygon.geometry.coordinates)
);
polygonOuters.geometry.coordinates.forEach(function (contour) {
maskPolygon.geometry.coordinates.push(contour[0]);
});
return maskPolygon;
}
function unionFc(fc) {
var unioned =
fc.features.length === 2
? polygonClipping.union(
fc.features[0].geometry.coordinates,
fc.features[1].geometry.coordinates
)
: polygonClipping.union.apply(
polygonClipping,
fc.features.map(function (f) {
return f.geometry.coordinates;
})
);
return createGeomFromPolygonClippingOutput(unioned);
}
function createGeomFromPolygonClippingOutput(unioned) {
return multiPolygon(unioned);
}
/**
* Create Mask Coordinates
*
* @private
* @param {Feature<Polygon>} [mask] default to world if undefined
* @returns {Feature<Polygon>} mask coordinate
*/
function createMask(mask) {
var world = [
[
[180, 90],
[-180, 90],
[-180, -90],
[180, -90],
[180, 90],
],
];
var coordinates = (mask && mask.geometry.coordinates) || world;
return polygon(coordinates);
}
export default mask;

View File

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

86
frontend/node_modules/@turf/mask/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,86 @@
'use strict';
var helpers = require('@turf/helpers');
var polygonClipping = require('polygon-clipping');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var polygonClipping__default = /*#__PURE__*/_interopDefaultLegacy(polygonClipping);
/**
* Takes any type of {@link Polygon|polygon} and an optional mask and returns a {@link Polygon|polygon} exterior ring with holes.
*
* @name mask
* @param {FeatureCollection|Feature<Polygon|MultiPolygon>} polygon GeoJSON Polygon used as interior rings or holes.
* @param {Feature<Polygon>} [mask] GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used)
* @returns {Feature<Polygon>} Masked Polygon (exterior ring with holes).
* @example
* var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);
* var mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);
*
* var masked = turf.mask(polygon, mask);
*
* //addToMap
* var addToMap = [masked]
*/
function mask(polygon, mask) {
// Define mask
var maskPolygon = createMask(mask);
var polygonOuters = null;
if (polygon.type === "FeatureCollection") polygonOuters = unionFc(polygon);
else
polygonOuters = createGeomFromPolygonClippingOutput(
polygonClipping__default['default'].union(polygon.geometry.coordinates)
);
polygonOuters.geometry.coordinates.forEach(function (contour) {
maskPolygon.geometry.coordinates.push(contour[0]);
});
return maskPolygon;
}
function unionFc(fc) {
var unioned =
fc.features.length === 2
? polygonClipping__default['default'].union(
fc.features[0].geometry.coordinates,
fc.features[1].geometry.coordinates
)
: polygonClipping__default['default'].union.apply(
polygonClipping__default['default'],
fc.features.map(function (f) {
return f.geometry.coordinates;
})
);
return createGeomFromPolygonClippingOutput(unioned);
}
function createGeomFromPolygonClippingOutput(unioned) {
return helpers.multiPolygon(unioned);
}
/**
* Create Mask Coordinates
*
* @private
* @param {Feature<Polygon>} [mask] default to world if undefined
* @returns {Feature<Polygon>} mask coordinate
*/
function createMask(mask) {
var world = [
[
[180, 90],
[-180, 90],
[-180, -90],
[180, -90],
[180, 90],
],
];
var coordinates = (mask && mask.geometry.coordinates) || world;
return helpers.polygon(coordinates);
}
module.exports = mask;
module.exports.default = mask;

14
frontend/node_modules/@turf/mask/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import {
Feature,
Polygon,
MultiPolygon,
FeatureCollection,
} from "@turf/helpers";
/**
* http://turfjs.org/docs/#mask
*/
export default function <T extends Polygon | MultiPolygon>(
poly: Feature<T> | FeatureCollection<T> | T,
mask?: Feature<Polygon> | Polygon
): Feature<Polygon>;

61
frontend/node_modules/@turf/mask/package.json generated vendored Normal file
View File

@@ -0,0 +1,61 @@
{
"name": "@turf/mask",
"version": "6.5.0",
"description": "turf mask module",
"author": "Turf Authors",
"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",
"mask",
"polygon"
],
"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": "*",
"mkdirp": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0",
"polygon-clipping": "^0.15.3"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}