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

62
frontend/node_modules/@turf/sample/README.md generated vendored Normal file
View File

@@ -0,0 +1,62 @@
# @turf/sample
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## sample
Takes a [FeatureCollection][1] and returns a FeatureCollection with given number of [features][2] at random.
**Parameters**
- `featurecollection` **[FeatureCollection][3]** set of input features
- `num` **[number][4]** number of features to select
**Examples**
```javascript
var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});
var sample = turf.sample(points, 5);
//addToMap
var addToMap = [points, sample]
turf.featureEach(sample, function (currentFeature) {
currentFeature.properties['marker-size'] = 'large';
currentFeature.properties['marker-color'] = '#000';
});
```
Returns **[FeatureCollection][3]** a FeatureCollection with `n` features
[1]: https://tools.ietf.org/html/rfc7946#section-3.3
[2]: https://tools.ietf.org/html/rfc7946#section-3.2
[3]: https://tools.ietf.org/html/rfc7946#section-3.3
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
<!-- 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/sample
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,50 @@
import { featureCollection } from '@turf/helpers';
// http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
/**
* Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
*
* @name sample
* @param {FeatureCollection} featurecollection set of input features
* @param {number} num number of features to select
* @returns {FeatureCollection} a FeatureCollection with `n` features
* @example
* var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});
*
* var sample = turf.sample(points, 5);
*
* //addToMap
* var addToMap = [points, sample]
* turf.featureEach(sample, function (currentFeature) {
* currentFeature.properties['marker-size'] = 'large';
* currentFeature.properties['marker-color'] = '#000';
* });
*/
function sample(featurecollection, num) {
if (!featurecollection) throw new Error("featurecollection is required");
if (num === null || num === undefined) throw new Error("num is required");
if (typeof num !== "number") throw new Error("num must be a number");
var outFC = featureCollection(
getRandomSubarray(featurecollection.features, num)
);
return outFC;
}
function getRandomSubarray(arr, size) {
var shuffled = arr.slice(0),
i = arr.length,
min = i - size,
temp,
index;
while (i-- > min) {
index = Math.floor((i + 1) * Math.random());
temp = shuffled[index];
shuffled[index] = shuffled[i];
shuffled[i] = temp;
}
return shuffled.slice(min);
}
export default sample;

View File

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

53
frontend/node_modules/@turf/sample/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,53 @@
'use strict';
var helpers = require('@turf/helpers');
// http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array
/**
* Takes a {@link FeatureCollection} and returns a FeatureCollection with given number of {@link Feature|features} at random.
*
* @name sample
* @param {FeatureCollection} featurecollection set of input features
* @param {number} num number of features to select
* @returns {FeatureCollection} a FeatureCollection with `n` features
* @example
* var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});
*
* var sample = turf.sample(points, 5);
*
* //addToMap
* var addToMap = [points, sample]
* turf.featureEach(sample, function (currentFeature) {
* currentFeature.properties['marker-size'] = 'large';
* currentFeature.properties['marker-color'] = '#000';
* });
*/
function sample(featurecollection, num) {
if (!featurecollection) throw new Error("featurecollection is required");
if (num === null || num === undefined) throw new Error("num is required");
if (typeof num !== "number") throw new Error("num must be a number");
var outFC = helpers.featureCollection(
getRandomSubarray(featurecollection.features, num)
);
return outFC;
}
function getRandomSubarray(arr, size) {
var shuffled = arr.slice(0),
i = arr.length,
min = i - size,
temp,
index;
while (i-- > min) {
index = Math.floor((i + 1) * Math.random());
temp = shuffled[index];
shuffled[index] = shuffled[i];
shuffled[i] = temp;
}
return shuffled.slice(min);
}
module.exports = sample;
module.exports.default = sample;

9
frontend/node_modules/@turf/sample/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import { FeatureCollection, GeometryObject } from "@turf/helpers";
/**
* http://turfjs.org/docs/#sample
*/
export default function sample<T extends GeometryObject>(
features: FeatureCollection<T>,
num: number
): FeatureCollection<T>;

57
frontend/node_modules/@turf/sample/package.json generated vendored Normal file
View File

@@ -0,0 +1,57 @@
{
"name": "@turf/sample",
"version": "6.5.0",
"description": "turf sample 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": [
"geojson",
"stats",
"sample",
"turf"
],
"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"
},
"devDependencies": {
"benchmark": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}