@mailwoman/soil 9.4.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -116
- package/lib/index.ts +66 -98
- package/lib/paths.ts +24 -0
- package/lib/schema.ts +188 -120
- package/lib/vocabulary.ts +40 -107
- package/out/index.d.ts +52 -70
- package/out/index.d.ts.map +1 -1
- package/out/index.js +24 -72
- package/out/index.js.map +1 -1
- package/out/paths.d.ts +19 -0
- package/out/paths.d.ts.map +1 -0
- package/out/paths.js +21 -0
- package/out/paths.js.map +1 -0
- package/out/schema.d.ts +187 -119
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +31 -31
- package/out/schema.js.map +1 -1
- package/out/sdk/acquire.d.ts +15 -24
- package/out/sdk/acquire.d.ts.map +1 -1
- package/out/sdk/acquire.js +5 -20
- package/out/sdk/acquire.js.map +1 -1
- package/out/sdk/build-soil.d.ts +67 -70
- package/out/sdk/build-soil.d.ts.map +1 -1
- package/out/sdk/build-soil.js +65 -95
- package/out/sdk/build-soil.js.map +1 -1
- package/out/sdk/cell-tiers.d.ts +7 -19
- package/out/sdk/cell-tiers.d.ts.map +1 -1
- package/out/sdk/cell-tiers.js +19 -38
- package/out/sdk/cell-tiers.js.map +1 -1
- package/out/sdk/cells.d.ts +15 -41
- package/out/sdk/cells.d.ts.map +1 -1
- package/out/sdk/cells.js +11 -38
- package/out/sdk/cells.js.map +1 -1
- package/out/sdk/client.d.ts +23 -48
- package/out/sdk/client.d.ts.map +1 -1
- package/out/sdk/client.js +19 -63
- package/out/sdk/client.js.map +1 -1
- package/out/sdk/download.d.ts +24 -47
- package/out/sdk/download.d.ts.map +1 -1
- package/out/sdk/download.js +14 -54
- package/out/sdk/download.js.map +1 -1
- package/out/sdk/ingest/chunk.d.ts +77 -0
- package/out/sdk/ingest/chunk.d.ts.map +1 -0
- package/out/sdk/{ingest-chunk.js → ingest/chunk.js} +19 -17
- package/out/sdk/ingest/chunk.js.map +1 -0
- package/out/sdk/ingest/worker.d.ts +9 -0
- package/out/sdk/ingest/worker.d.ts.map +1 -0
- package/out/{scripts/ingest-chunk.js → sdk/ingest/worker.js} +11 -10
- package/out/sdk/ingest/worker.js.map +1 -0
- package/out/sdk/ingest.d.ts +40 -52
- package/out/sdk/ingest.d.ts.map +1 -1
- package/out/sdk/ingest.js +18 -61
- package/out/sdk/ingest.js.map +1 -1
- package/out/sdk/measure-resolutions.d.ts +5 -16
- package/out/sdk/measure-resolutions.d.ts.map +1 -1
- package/out/sdk/measure-resolutions.js +3 -15
- package/out/sdk/measure-resolutions.js.map +1 -1
- package/out/sdk/reduce.d.ts +33 -59
- package/out/sdk/reduce.d.ts.map +1 -1
- package/out/sdk/reduce.js +47 -78
- package/out/sdk/reduce.js.map +1 -1
- package/out/sdk/survey-area.d.ts +16 -48
- package/out/sdk/survey-area.d.ts.map +1 -1
- package/out/sdk/survey-area.js +33 -77
- package/out/sdk/survey-area.js.map +1 -1
- package/out/sdk/tabular.d.ts +32 -31
- package/out/sdk/tabular.d.ts.map +1 -1
- package/out/sdk/tabular.js +58 -56
- package/out/sdk/tabular.js.map +1 -1
- package/out/sdk/test-kit.d.ts +57 -0
- package/out/sdk/test-kit.d.ts.map +1 -0
- package/out/{test-kit.js → sdk/test-kit.js} +18 -39
- package/out/sdk/test-kit.js.map +1 -0
- package/out/sdk/verify.d.ts +15 -51
- package/out/sdk/verify.d.ts.map +1 -1
- package/out/sdk/verify.js +19 -77
- package/out/sdk/verify.js.map +1 -1
- package/out/vocabulary.d.ts +37 -103
- package/out/vocabulary.d.ts.map +1 -1
- package/out/vocabulary.js +34 -107
- package/out/vocabulary.js.map +1 -1
- package/package.json +36 -190
- package/{lib/sdk → sdk}/acquire.ts +17 -27
- package/{lib/sdk → sdk}/build-soil.ts +114 -128
- package/{lib/sdk → sdk}/cell-tiers.ts +20 -39
- package/{lib/sdk → sdk}/cells.ts +17 -43
- package/sdk/client.ts +147 -0
- package/sdk/download.ts +131 -0
- package/{lib/sdk/ingest-chunk.ts → sdk/ingest/chunk.ts} +34 -26
- package/{lib/scripts/ingest-chunk.ts → sdk/ingest/worker.ts} +10 -9
- package/sdk/ingest.ts +253 -0
- package/{lib/sdk → sdk}/measure-resolutions.ts +5 -16
- package/sdk/reduce.ts +344 -0
- package/{lib/sdk → sdk}/survey-area.ts +39 -83
- package/{lib/sdk → sdk}/tabular.ts +62 -59
- package/{lib → sdk}/test-kit.ts +18 -40
- package/{lib/sdk → sdk}/verify.ts +29 -85
- package/lib/sdk/client.ts +0 -184
- package/lib/sdk/download.ts +0 -161
- package/lib/sdk/index.ts +0 -20
- package/lib/sdk/ingest.ts +0 -278
- package/lib/sdk/reduce.ts +0 -375
- package/out/scripts/ingest-chunk.d.ts +0 -11
- package/out/scripts/ingest-chunk.d.ts.map +0 -1
- package/out/scripts/ingest-chunk.js.map +0 -1
- package/out/sdk/index.d.ts +0 -20
- package/out/sdk/index.d.ts.map +0 -1
- package/out/sdk/index.js +0 -20
- package/out/sdk/index.js.map +0 -1
- package/out/sdk/ingest-chunk.d.ts +0 -73
- package/out/sdk/ingest-chunk.d.ts.map +0 -1
- package/out/sdk/ingest-chunk.js.map +0 -1
- package/out/test-kit.d.ts +0 -79
- package/out/test-kit.d.ts.map +0 -1
- package/out/test-kit.js.map +0 -1
package/out/sdk/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
package/out/sdk/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The acquisition + build surface for the NRCS SSURGO soil-capability layer. The READER is the
|
|
6
|
-
* package root.
|
|
7
|
-
*/
|
|
8
|
-
export * from "#sdk/acquire";
|
|
9
|
-
export * from "#sdk/build-soil";
|
|
10
|
-
export * from "#sdk/cell-tiers";
|
|
11
|
-
export * from "#sdk/cells";
|
|
12
|
-
export * from "#sdk/client";
|
|
13
|
-
export * from "#sdk/download";
|
|
14
|
-
export * from "#sdk/ingest";
|
|
15
|
-
export * from "#sdk/measure-resolutions";
|
|
16
|
-
export * from "#sdk/reduce";
|
|
17
|
-
export * from "#sdk/survey-area";
|
|
18
|
-
export * from "#sdk/tabular";
|
|
19
|
-
export * from "#sdk/verify";
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/out/sdk/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* The streaming pass — every delineation into `soil_map_unit_area` and into the build's touch table — as a
|
|
7
|
-
* unit of work that can run over PART of one survey area.
|
|
8
|
-
*
|
|
9
|
-
* WHY THIS IS A CHUNK RATHER THAN A WHOLE FILE. h3's WASM heap cannot be reset from JavaScript, and it does
|
|
10
|
-
* not survive an unbounded number of polyfill calls: over the flood layer's real product, runs died after
|
|
11
|
-
* roughly 510,000 and 798,000 features on geometry that classifies in milliseconds in a fresh process. A
|
|
12
|
-
* build that completes only when fragmentation happens to stay low is not a reproducible build, so the
|
|
13
|
-
* classification is bounded by construction — {@linkcode buildSoilDatabase} runs one of these per range of
|
|
14
|
-
* the shapefile's own FIDs, each in its own process, and each therefore against a heap that starts empty.
|
|
15
|
-
* Iowa's 99 survey areas hold far more delineations together than any one of them does, which is why the
|
|
16
|
-
* bound is per RANGE rather than per area.
|
|
17
|
-
*
|
|
18
|
-
* THE CHUNK OWNS NO ARTIFACT. It appends rows to a database the parent created and will seal, and returns
|
|
19
|
-
* counts the parent adds up. Chunks run one at a time against that file, so there is no concurrent writer
|
|
20
|
-
* and no locking to reason about.
|
|
21
|
-
*/
|
|
22
|
-
import type { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
23
|
-
import type { SoilDatabase } from "#schema";
|
|
24
|
-
import type { SoilFeatureSource } from "#sdk/ingest";
|
|
25
|
-
/**
|
|
26
|
-
* What one chunk produced. Every field is JSON-serializable, because a chunk normally reports across a process
|
|
27
|
-
* boundary.
|
|
28
|
-
*/
|
|
29
|
-
export interface SoilChunkResult {
|
|
30
|
-
areaSymbol: string;
|
|
31
|
-
delineations: number;
|
|
32
|
-
/**
|
|
33
|
-
* Delineations whose bounding box forced a resolution coarser than the target.
|
|
34
|
-
*/
|
|
35
|
-
coarsened: number;
|
|
36
|
-
/**
|
|
37
|
-
* `[coverageCell, delineationsReachingIt]` pairs — an array rather than a `Map` so it survives the process boundary.
|
|
38
|
-
*/
|
|
39
|
-
observedByCoverageCell: Array<[number, number]>;
|
|
40
|
-
/**
|
|
41
|
-
* The same, counting only delineations whose map unit HAS soil mapping behind it.
|
|
42
|
-
*
|
|
43
|
-
* Separate from the total because the coverage rule turns on it: a coverage cell reached only by `NOTCOM` and
|
|
44
|
-
* access-denied polygons is inside a published survey area and carries no digitized soil mapping, and the survey's
|
|
45
|
-
* §3.2 gives it no row.
|
|
46
|
-
*/
|
|
47
|
-
mappedByCoverageCell: Array<[number, number]>;
|
|
48
|
-
/**
|
|
49
|
-
* Square metres: the encoded rings read WITH their holes, and read without.
|
|
50
|
-
*/
|
|
51
|
-
area: {
|
|
52
|
-
nestedM2: number;
|
|
53
|
-
allExteriorM2: number;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export interface IngestSoilChunkOptions {
|
|
57
|
-
source: SoilFeatureSource;
|
|
58
|
-
indexResolution: number;
|
|
59
|
-
coverageResolution: number;
|
|
60
|
-
/**
|
|
61
|
-
* The map units with NO soil mapping behind them — `NOTCOM`, `NOTPUB`, access denied, or no readable component
|
|
62
|
-
* weights. Passed in rather than joined here so the chunk stays a streaming pass over geometry.
|
|
63
|
-
*/
|
|
64
|
-
noMappingMukeys: ReadonlySet<string>;
|
|
65
|
-
onProgress?: (message: string) => void;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Stream one chunk of one survey area into `database`.
|
|
69
|
-
*
|
|
70
|
-
* @throws {Error} On a delineation the classifier refuses — which includes the allocator's silent zero-cell answer.
|
|
71
|
-
*/
|
|
72
|
-
export declare function ingestSoilChunk(database: DatabaseClient<SoilDatabase>, options: IngestSoilChunkOptions): Promise<SoilChunkResult>;
|
|
73
|
-
//# sourceMappingURL=ingest-chunk.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ingest-chunk.d.ts","sourceRoot":"","sources":["../../lib/sdk/ingest-chunk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH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,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;gBAE7F,IAAI,UAAU,EAAE,CAAC;oBAChB,oBAAoB,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;gBAC1F,CAAC;YACF,CAAC;YAED,YAAY,EAAE,CAAA;YAEd,KAAK,CAAC,UAAU,EAAE,CAAA;YAElB,IAAI,YAAY,GAAG,eAAe,KAAK,CAAC,EAAE,CAAC;gBAC1C,OAAO,CAAC,UAAU,EAAE,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,6BAA6B,CAAC,CAAA;YACpF,CAAC;QACF,CAAC;QAED,KAAK,CAAC,MAAM,EAAE,CAAA;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,KAAK,CAAC,eAAe,EAAE,CAAA;QAEvB,MAAM,KAAK,CAAA;IACZ,CAAC;IAED,OAAO;QACN,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU;QACrC,YAAY;QACZ,SAAS;QACT,sBAAsB,EAAE,CAAC,GAAG,sBAAsB,CAAC;QACnD,oBAAoB,EAAE,CAAC,GAAG,oBAAoB,CAAC;QAC/C,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE;KAC9D,CAAA;AACF,CAAC"}
|
package/out/test-kit.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Hand-built survey areas for the fixture rung: geometry, attributes and an outline, with no network and
|
|
7
|
-
* no GDAL in the loop.
|
|
8
|
-
*
|
|
9
|
-
* A FIXTURE RUNG THAT COULD ONLY RUN THROUGH ogr2ogr WOULD TEST THE CONVERSION ON THE MACHINES THAT HAVE
|
|
10
|
-
* IT AND NOTHING AT ALL ON THE ONES THAT DO NOT. What these fixtures exercise is the whole database half —
|
|
11
|
-
* the declared-domain check, the cell classification, the area-weighted reduction, the four absence
|
|
12
|
-
* shares, the coverage rows, the manifest and the seal.
|
|
13
|
-
*
|
|
14
|
-
* THE ABSENCE CASES ARE THE POINT, AND IOWA HAS NONE OF THEM. Every Iowa survey area is fully digitized,
|
|
15
|
-
* so `NOTCOM`, `NOTPUB` and access-denied map units never appear in the live build — which means the only
|
|
16
|
-
* place `nodata_share` can be exercised is here. The same is true of a component whose rating is NULL for
|
|
17
|
-
* the not-rateable reason and of a class-8 rating: both exist in Iowa but sparsely, and a fixture pins the
|
|
18
|
-
* behaviour rather than hoping a county contains one.
|
|
19
|
-
*/
|
|
20
|
-
import type { SoilComponentTable, SoilMapUnitTable } from "#schema";
|
|
21
|
-
import type { SoilDelineation, SoilFeatureSource } from "#sdk/ingest";
|
|
22
|
-
import type { SurveyAreaAttributes } from "#sdk/survey-area";
|
|
23
|
-
/**
|
|
24
|
-
* Re-exported so a fixture in another workspace builds its rings the same way this one does.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Where the fixture geometry sits — central Iowa, so the cells it produces are the ones a real build would use.
|
|
28
|
-
*/
|
|
29
|
-
export declare const FIXTURE_ORIGIN: {
|
|
30
|
-
lat: number;
|
|
31
|
-
lon: number;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Degrees per fixture square side. About 1.6 km at this latitude — several resolution-9 cells across, so a fixture
|
|
35
|
-
* square has both an interior and a fringe.
|
|
36
|
-
*/
|
|
37
|
-
export declare const FIXTURE_SIDE = 0.015;
|
|
38
|
-
/**
|
|
39
|
-
* The fixture map units. Each one exists to exercise exactly one reading.
|
|
40
|
-
*/
|
|
41
|
-
export declare function fixtureMapUnits(areaSymbol?: string): SoilMapUnitTable[];
|
|
42
|
-
/**
|
|
43
|
-
* The fixture components. `mu-mixed` is 45/35/20 across three classes, which is the case a winner-class schema would
|
|
44
|
-
* report as "class 2" and this one reports as a mixture.
|
|
45
|
-
*/
|
|
46
|
-
export declare function fixtureComponents(): SoilComponentTable[];
|
|
47
|
-
/**
|
|
48
|
-
* The declared domains a fixture build validates and stores, matching what the real `msdomdet.txt` ships.
|
|
49
|
-
*/
|
|
50
|
-
export declare function fixtureDomains(): SurveyAreaAttributes["domains"];
|
|
51
|
-
/**
|
|
52
|
-
* The fixture delineations: a mixed square, a class-8 square, a water square, an unrated square, and a `NOTCOM` square,
|
|
53
|
-
* laid out left to right so each occupies its own ground.
|
|
54
|
-
*/
|
|
55
|
-
export declare function fixtureDelineations(areaSymbol?: string): SoilDelineation[];
|
|
56
|
-
/**
|
|
57
|
-
* The outline covering every fixture delineation, with margin — the survey area's own footprint.
|
|
58
|
-
*
|
|
59
|
-
* The margin is nearly a degree because the coverage test is CONSERVATIVE: `interiorCoverageCellSet` keeps only cells
|
|
60
|
-
* lying wholly inside the outline, and a resolution-6 cell is about 36 km across. An outline the size of the fixture
|
|
61
|
-
* squares yields zero interior cells and the build refuses — correctly, since an artifact with no coverage rows answers
|
|
62
|
-
* unknown everywhere while reporting success.
|
|
63
|
-
*/
|
|
64
|
-
export declare function fixtureOutline(margin?: number): {
|
|
65
|
-
type: "Polygon";
|
|
66
|
-
coordinates: number[][][];
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* A feature source over hand-built delineations.
|
|
70
|
-
*/
|
|
71
|
-
export declare function fixtureSource(delineations: SoilDelineation[], areaSymbol?: string): SoilFeatureSource;
|
|
72
|
-
/**
|
|
73
|
-
* One fixture survey area's attributes.
|
|
74
|
-
*
|
|
75
|
-
* `areaAcres` is left NULL on purpose: the area cross-check compares against what the AUTHORITY publishes, and a
|
|
76
|
-
* fixture that invented an acreage would be checking this package's arithmetic against itself.
|
|
77
|
-
*/
|
|
78
|
-
export declare function fixtureAttributes(areaSymbol?: string): SurveyAreaAttributes;
|
|
79
|
-
//# sourceMappingURL=test-kit.d.ts.map
|
package/out/test-kit.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-kit.d.ts","sourceRoot":"","sources":["../lib/test-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE5D;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAA4B,CAAA;AAEvD;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAA;AAEjC;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,SAAU,GAAG,gBAAgB,EAAE,CAoExE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,kBAAkB,EAAE,CAaxD;AAwBD;;GAEG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAiBhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,SAAU,GAAG,eAAe,EAAE,CAU3E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAO,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;CAAE,CAS5F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,eAAe,EAAE,EAAE,UAAU,SAAU,GAAG,iBAAiB,CAatG;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,SAAU,GAAG,oBAAoB,CAe5E"}
|
package/out/test-kit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-kit.js","sourceRoot":"","sources":["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