@nika-js/onlymap 0.8.4 → 0.9.1
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/CHANGELOG.md +32 -0
- package/README.md +56 -3
- package/dist/{LercDecode.es-BKustV-1.js → LercDecode.es-IEPCRZOv.js} +1 -1
- package/dist/{basemap-B0SwrOqQ.js → basemap-DL0mk9Bf.js} +780 -780
- package/dist/dem-decode.d.ts +58 -0
- package/dist/elements/om-map.d.ts +12 -0
- package/dist/{geoparquet-C5E6N6G0.js → geoparquet-DJxZA0if.js} +1 -1
- package/dist/hillshade-DR3TxO1a.js +186 -0
- package/dist/hillshade-apron-Bem3DWyJ.js +40 -0
- package/dist/hillshade-apron.d.ts +54 -0
- package/dist/hillshade-shader-n_zManfZ.js +160 -0
- package/dist/hillshade-shader.d.ts +152 -0
- package/dist/hillshade.d.ts +133 -0
- package/dist/html-data.d.ts +2 -2
- package/dist/{index-BLIjrGOE.js → index-BjcPjICh.js} +28 -28
- package/dist/{index-xUVMTGZG.js → index-CvuDsvnk.js} +23 -23
- package/dist/index-DO_w0tqR.js +514 -0
- package/dist/{index-BnQDfKfE.js → index-DdTZSuAb.js} +1 -1
- package/dist/{index-D5Fqn_eZ.js → index-oY3XHIux.js} +13145 -12484
- package/dist/{index-CaM1C93G.js → index-vLXZuog4.js} +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/lerc-Bph62dCb.js +22 -0
- package/dist/onlymap.standalone.js +28919 -27259
- package/dist/onlymapjs.js +95 -92
- package/dist/post-process/catalogue.d.ts +61 -0
- package/dist/post-process/compile.d.ts +37 -0
- package/dist/post-process/index.d.ts +71 -0
- package/dist/post-process/ops.d.ts +22 -0
- package/dist/post-process/presets.d.ts +33 -0
- package/dist/post-process/validate.d.ts +8 -0
- package/dist/programmatic.d.ts +11 -0
- package/dist/{raster-B_wekCHv.js → raster-D-eTzCE3.js} +609 -499
- package/dist/raster-hillshade.d.ts +119 -0
- package/dist/{raster-pipeline-Dn2fkLYx.js → raster-pipeline-BlOnMPJe.js} +510 -484
- package/dist/raster-pipeline.d.ts +10 -0
- package/dist/raster.d.ts +5 -0
- package/dist/runtime-core.d.ts +39 -1
- package/dist/terrain-heightfield.d.ts +0 -16
- package/dist/terrain-sample.d.ts +0 -13
- package/dist/version.d.ts +1 -1
- package/dist/volumetrics.d.ts +7 -0
- package/dist/{zarr-Dan2ab-l.js → zarr-BGDoEtFb.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/docs/design/hillshade.md +290 -0
- package/docs/effects.md +208 -0
- package/docs/hillshade.md +203 -0
- package/llms.txt +3 -1
- package/onlymapjs.attributes.json +27 -2
- package/onlymapjs.html-data.json +207 -6
- package/package.json +13 -9
- package/skills/onlymapjs/SKILL.md +4 -2
- package/skills/onlymapjs/references/syntax.md +17 -2
- package/dist/lerc-TxsFLMlC.js +0 -30
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hillshade / shaded relief — the lazy chunk (docs/design/hillshade.md).
|
|
3
|
+
*
|
|
4
|
+
* WHAT THIS IS, AND IS NOT. Cartographic shaded relief is RENDERED TEXTURE:
|
|
5
|
+
* pixels, never numbers. Nothing here is queryable, classified or reported,
|
|
6
|
+
* which is the line issue #13 drew when it put "raster analysis
|
|
7
|
+
* (hillshade/slope)" out of scope — the boundary there is QUERYABILITY, not
|
|
8
|
+
* the arithmetic. This ships no analytic product.
|
|
9
|
+
*
|
|
10
|
+
* It is a LAYER, not a mode of `terrain=`. `terrain=` means a 3D surface: it
|
|
11
|
+
* replaces the basemap, changes what the camera means, and is meaningless at
|
|
12
|
+
* pitch 0. Relief on a print sheet has to compose underneath the data layers
|
|
13
|
+
* like any other layer — and, decisively, a layer draws inside deck's own
|
|
14
|
+
* framebuffer, so it lands in `snapshot()` and UNDER `<om-effect>`. Relief a
|
|
15
|
+
* print finish could not reach would be worth very little.
|
|
16
|
+
*
|
|
17
|
+
* THE SEAM IS THE WHOLE DESIGN PROBLEM. A hillshade is a derivative, so every
|
|
18
|
+
* fragment needs its neighbours — and at a tile's edge the neighbours live in
|
|
19
|
+
* a different tile. Sampling with clamp-to-edge instead makes the derivative
|
|
20
|
+
* collapse to zero along every border, drawing a pale grid over the world:
|
|
21
|
+
* the single most recognisable way a hand-rolled hillshade looks broken.
|
|
22
|
+
* Rather than bind nine textures per draw, each tile is decoded on the CPU
|
|
23
|
+
* (`dem-decode.ts`, which exists because these bytes are heights and must not
|
|
24
|
+
* be colour-managed) into a heightfield with a ONE-PIXEL APRON copied from
|
|
25
|
+
* its eight neighbours. The shader then samples one texture with no edge
|
|
26
|
+
* cases at all, and the neighbour fetches are nearly free because a
|
|
27
|
+
* neighbour is almost always a tile the map is drawing anyway — see
|
|
28
|
+
* `tileCache`.
|
|
29
|
+
*/
|
|
30
|
+
import { CompositeLayer, type Layer } from "@deck.gl/core";
|
|
31
|
+
import { type ElevationDecoder } from "./terrain";
|
|
32
|
+
import { type PaddedHeights } from "./hillshade-apron";
|
|
33
|
+
/** Drops every cached decode — exported for tests and for a page tearing a map down. */
|
|
34
|
+
export declare function clearHillshadeTileCache(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Builds one tile's padded heightfield, fetching the eight neighbours for the
|
|
37
|
+
* apron. x wraps around the antimeridian; y does not, because the poles are
|
|
38
|
+
* not a seam. The composition itself — including what happens when a
|
|
39
|
+
* neighbour genuinely does not exist — lives in `hillshade-apron.ts`, shared
|
|
40
|
+
* with the raster entry point.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildPaddedHeights(template: string, decoder: ElevationDecoder, index: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
z: number;
|
|
46
|
+
}): Promise<PaddedHeights | null>;
|
|
47
|
+
export interface OmHillshadeLayerProps {
|
|
48
|
+
/** A `registerTerrain` preset name, or a raw `{z}/{x}/{y}` DEM URL template. */
|
|
49
|
+
src: string;
|
|
50
|
+
/** Decoder name or explicit scalers — required alongside a RAW url, implied by a preset. */
|
|
51
|
+
decoder?: string | ElevationDecoder | null;
|
|
52
|
+
sunAzimuth?: string | number | null;
|
|
53
|
+
sunWeight?: string | number | null;
|
|
54
|
+
sunElevation?: number | null;
|
|
55
|
+
zFactor?: number | null;
|
|
56
|
+
blend?: string | null;
|
|
57
|
+
maxZoom?: number | null;
|
|
58
|
+
zoomOffset?: number | null;
|
|
59
|
+
opacity?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `src` resolution mirrors `parseTerrainAttrs` exactly: a registered preset
|
|
63
|
+
* name, or a raw `{z}/{x}/{y}` template plus a `decoder`. `src` is REQUIRED
|
|
64
|
+
* even for the keyless global default, which is a deliberate departure from
|
|
65
|
+
* "the bare element just works": every other keyless default in this library
|
|
66
|
+
* is still NAMED by the author (`basemap="positron"`, `terrain="terrarium"`).
|
|
67
|
+
* Keyless-first means no key and no account, not no attribute — and an
|
|
68
|
+
* element that reaches a public tile host with nothing written on it is a
|
|
69
|
+
* network call the markup does not show.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveHillshadeSource(props: OmHillshadeLayerProps): {
|
|
72
|
+
template: string;
|
|
73
|
+
decoder: ElevationDecoder;
|
|
74
|
+
maxZoom: number;
|
|
75
|
+
} | null;
|
|
76
|
+
/**
|
|
77
|
+
* How much sharper the DEM should be than the screen asks for.
|
|
78
|
+
*
|
|
79
|
+
* A 300 dpi plate rendered from screen-resolution relief is mush, and this is
|
|
80
|
+
* the same class of bug the millimetre knobs solved for `<om-effect>`: a
|
|
81
|
+
* capture changes the pixel budget, so anything keyed to pixels has to be
|
|
82
|
+
* re-pointed. `useDevicePixels` is what `withCapturePixelRatio` moves, so the
|
|
83
|
+
* ratio of the canvas's device ratio to the DISPLAY's is exactly the capture
|
|
84
|
+
* boost — 1 while nobody is exporting, whatever the display's own density.
|
|
85
|
+
*/
|
|
86
|
+
export declare function captureZoomOffset(deviceRatio: number, displayRatio: number): number;
|
|
87
|
+
export declare class OmHillshadeLayer extends CompositeLayer<OmHillshadeLayerProps> {
|
|
88
|
+
static layerName: string;
|
|
89
|
+
static defaultProps: {
|
|
90
|
+
src: {
|
|
91
|
+
type: string;
|
|
92
|
+
value: string;
|
|
93
|
+
};
|
|
94
|
+
decoder: {
|
|
95
|
+
type: string;
|
|
96
|
+
value: null;
|
|
97
|
+
optional: boolean;
|
|
98
|
+
};
|
|
99
|
+
sunAzimuth: {
|
|
100
|
+
type: string;
|
|
101
|
+
value: string;
|
|
102
|
+
};
|
|
103
|
+
sunWeight: {
|
|
104
|
+
type: string;
|
|
105
|
+
value: null;
|
|
106
|
+
optional: boolean;
|
|
107
|
+
};
|
|
108
|
+
sunElevation: {
|
|
109
|
+
type: string;
|
|
110
|
+
value: number;
|
|
111
|
+
};
|
|
112
|
+
zFactor: {
|
|
113
|
+
type: string;
|
|
114
|
+
value: number;
|
|
115
|
+
};
|
|
116
|
+
blend: {
|
|
117
|
+
type: string;
|
|
118
|
+
value: string;
|
|
119
|
+
};
|
|
120
|
+
maxZoom: {
|
|
121
|
+
type: string;
|
|
122
|
+
value: null;
|
|
123
|
+
optional: boolean;
|
|
124
|
+
};
|
|
125
|
+
zoomOffset: {
|
|
126
|
+
type: string;
|
|
127
|
+
value: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
renderLayers(): Layer | null;
|
|
131
|
+
initializeState(): void;
|
|
132
|
+
finalizeState(): void;
|
|
133
|
+
}
|
package/dist/html-data.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ interface TagData {
|
|
|
15
15
|
}[];
|
|
16
16
|
}
|
|
17
17
|
/** Hand-authored action list — validated against hasAction() in html-data.test.ts. */
|
|
18
|
-
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "set-pickable", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
18
|
+
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "set-pickable", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-effect", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
19
19
|
/** Hand-authored widget types — validated against the widget registry in html-data.test.ts. */
|
|
20
|
-
export declare const BUILTIN_WIDGETS: readonly ["legend", "layer-switcher", "zoom-controls", "scale-bar", "attribution", "filter", "vega-lite", "dynamic-chart", "player", "draw", "measure", "basemap-switcher", "lighting", "clip-box", "undo-redo", "widgets-toggle", "time-slider", "ifc-browser", "ifc-legend", "feature-inspector", "ifc-inspector", "ifc-loader", "ifc-clash"];
|
|
20
|
+
export declare const BUILTIN_WIDGETS: readonly ["legend", "layer-switcher", "zoom-controls", "scale-bar", "attribution", "filter", "vega-lite", "dynamic-chart", "player", "draw", "measure", "basemap-switcher", "lighting", "effects", "clip-box", "undo-redo", "widgets-toggle", "time-slider", "ifc-browser", "ifc-legend", "feature-inspector", "ifc-inspector", "ifc-loader", "ifc-clash"];
|
|
21
21
|
export declare function buildHtmlCustomData(): {
|
|
22
22
|
version: number;
|
|
23
23
|
tags: TagData[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { y as
|
|
1
|
+
import { aB as Be, aC as le, aD as ce, aE as De, aF as Oe, aG as ke } from "./index-oY3XHIux.js";
|
|
2
|
+
import { y as Fe, a as he, z as G, R as J, A as ue, C as ve, F as je, n as xe, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
|
|
3
3
|
import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
|
|
5
5
|
function de(t) {
|
|
@@ -75,7 +75,7 @@ function Je(t, e) {
|
|
|
75
75
|
return new r(e);
|
|
76
76
|
}
|
|
77
77
|
function* We(t, e) {
|
|
78
|
-
const r = $e(t.schema), s = V(t), n = fe(t), a = s, c = r?.fields.map((o) =>
|
|
78
|
+
const r = $e(t.schema), s = V(t), n = fe(t), a = s, c = r?.fields.map((o) => Fe(o)), h = new he(r.fields);
|
|
79
79
|
let f = 0;
|
|
80
80
|
for (let o = 0; o < s; o++)
|
|
81
81
|
for (let u = 0; u < n; ++u) {
|
|
@@ -393,7 +393,7 @@ class at extends we {
|
|
|
393
393
|
const e = super.getBatch();
|
|
394
394
|
if (e) {
|
|
395
395
|
this.arrowSchema = this.arrowSchema || ot(e.schema);
|
|
396
|
-
const r = lt(this.arrowSchema, e.data), s = new J(this.arrowSchema,
|
|
396
|
+
const r = lt(this.arrowSchema, e.data), s = new J(this.arrowSchema, ve({
|
|
397
397
|
type: new he(this.arrowSchema.fields),
|
|
398
398
|
children: r.map(({ data: n }) => n[0])
|
|
399
399
|
}));
|
|
@@ -578,7 +578,7 @@ class ut {
|
|
|
578
578
|
});
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const re = "\uFEFF",
|
|
581
|
+
const re = "\uFEFF", v = {
|
|
582
582
|
RECORD_SEP: "",
|
|
583
583
|
UNIT_SEP: "",
|
|
584
584
|
BYTE_ORDER_MARK: re,
|
|
@@ -710,7 +710,7 @@ class be {
|
|
|
710
710
|
j(this._config.delimiter) && (this._config.delimiter = this._config.delimiter(e), this._results.meta.delimiter = this._config.delimiter);
|
|
711
711
|
else {
|
|
712
712
|
const c = this.guessDelimiter(e, this._config.newline, this._config.skipEmptyLines, this._config.comments, this._config.delimitersToGuess);
|
|
713
|
-
c.successful ? this._config.delimiter = c.bestDelimiter : (this._delimiterError = !0, this._config.delimiter =
|
|
713
|
+
c.successful ? this._config.delimiter = c.bestDelimiter : (this._delimiterError = !0, this._config.delimiter = v.DefaultDelimiter), this._results.meta.delimiter = this._config.delimiter;
|
|
714
714
|
}
|
|
715
715
|
const a = _e(this._config);
|
|
716
716
|
return this._config.preview && this._config.header && a.preview++, this._input = e, this._parser = new W(a), this._results = this._parser.parse(this._input, r, s), this.processResults(), this._paused ? { meta: { paused: !0 } } : this._results || { meta: { paused: !1 } };
|
|
@@ -734,7 +734,7 @@ class be {
|
|
|
734
734
|
return this._config.skipEmptyLines === "greedy" ? e.join("").trim() === "" : e.length === 1 && e[0].length === 0;
|
|
735
735
|
}
|
|
736
736
|
processResults() {
|
|
737
|
-
if (this._results && this._delimiterError && (this.addError("Delimiter", "UndetectableDelimiter", `Unable to auto-detect delimiting character; defaulted to '${
|
|
737
|
+
if (this._results && this._delimiterError && (this.addError("Delimiter", "UndetectableDelimiter", `Unable to auto-detect delimiting character; defaulted to '${v.DefaultDelimiter}'`), this._delimiterError = !1), this._config.skipEmptyLines)
|
|
738
738
|
for (let e = 0; e < this._results.data.length; e++)
|
|
739
739
|
this.testEmptyLine(this._results.data[e]) && this._results.data.splice(e--, 1);
|
|
740
740
|
return this.needsHeaderRow() && this.fillHeaderFields(), this.applyHeaderAndDynamicTypingAndTransformation();
|
|
@@ -779,7 +779,7 @@ class be {
|
|
|
779
779
|
// eslint-disable-next-line complexity, max-statements
|
|
780
780
|
guessDelimiter(e, r, s, n, a) {
|
|
781
781
|
let c, h, f;
|
|
782
|
-
a = a || [",", " ", "|", ";",
|
|
782
|
+
a = a || [",", " ", "|", ";", v.RECORD_SEP, v.UNIT_SEP];
|
|
783
783
|
for (let o = 0; o < a.length; o++) {
|
|
784
784
|
const u = a[o];
|
|
785
785
|
let i = 0, d = 0, g = 0;
|
|
@@ -842,9 +842,9 @@ function W(t = {}) {
|
|
|
842
842
|
let h;
|
|
843
843
|
t.quoteChar === void 0 ? h = '"' : h = t.quoteChar;
|
|
844
844
|
let f = h;
|
|
845
|
-
if (t.escapeChar !== void 0 && (f = t.escapeChar), (typeof e != "string" ||
|
|
845
|
+
if (t.escapeChar !== void 0 && (f = t.escapeChar), (typeof e != "string" || v.BAD_DELIMITERS.indexOf(e) > -1) && (e = ","), s === e)
|
|
846
846
|
throw new Error("Comment character same as delimiter");
|
|
847
|
-
s === !0 ? s = "#" : (typeof s != "string" ||
|
|
847
|
+
s === !0 ? s = "#" : (typeof s != "string" || v.BAD_DELIMITERS.indexOf(s) > -1) && (s = !1), r !== `
|
|
848
848
|
` && r !== "\r" && r !== `\r
|
|
849
849
|
` && (r = `
|
|
850
850
|
`);
|
|
@@ -854,7 +854,7 @@ function W(t = {}) {
|
|
|
854
854
|
throw new Error("Input must be a string");
|
|
855
855
|
const w = i.length, l = e.length, m = r.length, C = s.length, T = j(n);
|
|
856
856
|
o = 0;
|
|
857
|
-
let y = [],
|
|
857
|
+
let y = [], F = [], p = [], k = 0;
|
|
858
858
|
if (!i)
|
|
859
859
|
return S();
|
|
860
860
|
if (c || c !== !1 && i.indexOf(h) === -1) {
|
|
@@ -884,7 +884,7 @@ function W(t = {}) {
|
|
|
884
884
|
if (i[o] === h) {
|
|
885
885
|
for (b = o, o++; ; ) {
|
|
886
886
|
if (b = i.indexOf(h, b + 1), b === -1)
|
|
887
|
-
return g ||
|
|
887
|
+
return g || F.push({
|
|
888
888
|
type: "Quotes",
|
|
889
889
|
code: "MissingQuotes",
|
|
890
890
|
message: "Quoted field unterminated",
|
|
@@ -918,7 +918,7 @@ function W(t = {}) {
|
|
|
918
918
|
return S(!0);
|
|
919
919
|
break;
|
|
920
920
|
}
|
|
921
|
-
|
|
921
|
+
F.push({
|
|
922
922
|
type: "Quotes",
|
|
923
923
|
code: "InvalidQuotes",
|
|
924
924
|
message: "Trailing quote on quoted field is malformed",
|
|
@@ -973,7 +973,7 @@ function W(t = {}) {
|
|
|
973
973
|
function S(R, D) {
|
|
974
974
|
return {
|
|
975
975
|
data: D || !1 ? y[0] : y,
|
|
976
|
-
errors:
|
|
976
|
+
errors: F,
|
|
977
977
|
meta: {
|
|
978
978
|
delimiter: e,
|
|
979
979
|
linebreak: r,
|
|
@@ -984,7 +984,7 @@ function W(t = {}) {
|
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
986
|
function I() {
|
|
987
|
-
n(S(void 0, !0)), y = [],
|
|
987
|
+
n(S(void 0, !0)), y = [], F = [];
|
|
988
988
|
}
|
|
989
989
|
}, this.abort = function() {
|
|
990
990
|
u = !0;
|
|
@@ -1018,7 +1018,7 @@ function wt(t, e = {}) {
|
|
|
1018
1018
|
throw new Error("Unable to serialize unrecognized input");
|
|
1019
1019
|
function i() {
|
|
1020
1020
|
if (typeof e == "object") {
|
|
1021
|
-
if (typeof e.delimiter == "string" && !
|
|
1021
|
+
if (typeof e.delimiter == "string" && !v.BAD_DELIMITERS.filter(function(l) {
|
|
1022
1022
|
return e.delimiter?.indexOf(l) !== -1;
|
|
1023
1023
|
}).length && (n = e.delimiter), (typeof e.quotes == "boolean" || Array.isArray(e.quotes)) && (r = e.quotes), (typeof e.skipEmptyLines == "boolean" || e.skipEmptyLines === "greedy") && (f = e.skipEmptyLines), typeof e.newline == "string" && (a = e.newline), typeof e.quoteChar == "string" && (c = e.quoteChar), typeof e.header == "boolean" && (s = e.header), Array.isArray(e.columns)) {
|
|
1024
1024
|
if (e.columns.length === 0)
|
|
@@ -1031,7 +1031,7 @@ function wt(t, e = {}) {
|
|
|
1031
1031
|
function d(l, m, C) {
|
|
1032
1032
|
let T = "";
|
|
1033
1033
|
typeof l == "string" && (l = JSON.parse(l)), typeof m == "string" && (m = JSON.parse(m));
|
|
1034
|
-
const y = Array.isArray(l) && l.length > 0,
|
|
1034
|
+
const y = Array.isArray(l) && l.length > 0, F = !Array.isArray(m[0]);
|
|
1035
1035
|
if (y && s) {
|
|
1036
1036
|
for (let p = 0; p < l.length; p++)
|
|
1037
1037
|
p > 0 && (T += n), T += g(l[p], p);
|
|
@@ -1044,7 +1044,7 @@ function wt(t, e = {}) {
|
|
|
1044
1044
|
if (C && !y && (A = C === "greedy" ? m[p].join("").trim() === "" : m[p].length === 1 && m[p][0].length === 0), C === "greedy" && y) {
|
|
1045
1045
|
const B = [];
|
|
1046
1046
|
for (let b = 0; b < k; b++) {
|
|
1047
|
-
const x =
|
|
1047
|
+
const x = F ? l[b] : b;
|
|
1048
1048
|
B.push(m[p][x]);
|
|
1049
1049
|
}
|
|
1050
1050
|
A = B.join("").trim() === "";
|
|
@@ -1052,7 +1052,7 @@ function wt(t, e = {}) {
|
|
|
1052
1052
|
if (!A) {
|
|
1053
1053
|
for (let B = 0; B < k; B++) {
|
|
1054
1054
|
B > 0 && !_ && (T += n);
|
|
1055
|
-
const b = y &&
|
|
1055
|
+
const b = y && F ? l[B] : B;
|
|
1056
1056
|
T += g(m[p][b], B);
|
|
1057
1057
|
}
|
|
1058
1058
|
p < m.length - 1 && (!C || k > 0 && !_) && (T += a);
|
|
@@ -1061,7 +1061,7 @@ function wt(t, e = {}) {
|
|
|
1061
1061
|
return T;
|
|
1062
1062
|
}
|
|
1063
1063
|
function g(l, m) {
|
|
1064
|
-
return typeof l > "u" || l === null ? "" : l.constructor === Date ? JSON.stringify(l).slice(1, 25) : (l = l.toString().replace(u, h), typeof r == "boolean" && r || Array.isArray(r) && r[m] || w(l,
|
|
1064
|
+
return typeof l > "u" || l === null ? "" : l.constructor === Date ? JSON.stringify(l).slice(1, 25) : (l = l.toString().replace(u, h), typeof r == "boolean" && r || Array.isArray(r) && r[m] || w(l, v.BAD_DELIMITERS) || l.indexOf(n) > -1 || l.charAt(0) === " " || l.charAt(l.length - 1) === " " ? c + l + c : l);
|
|
1065
1065
|
}
|
|
1066
1066
|
function w(l, m) {
|
|
1067
1067
|
for (let C = 0; C < m.length; C++)
|
|
@@ -1074,7 +1074,7 @@ function yt(t) {
|
|
|
1074
1074
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1075
1075
|
}
|
|
1076
1076
|
const $ = {
|
|
1077
|
-
...
|
|
1077
|
+
...v,
|
|
1078
1078
|
parse: ft,
|
|
1079
1079
|
unparse: wt,
|
|
1080
1080
|
ChunkStreamer: ye,
|
|
@@ -1337,7 +1337,7 @@ function Dt(t) {
|
|
|
1337
1337
|
function n(i, d) {
|
|
1338
1338
|
var g = [], w = i.length, l = 0, m = 0, C, T = w <= 0, y = !1;
|
|
1339
1339
|
i.charCodeAt(w - 1) === N && --w, i.charCodeAt(w - 1) === Q && --w;
|
|
1340
|
-
function
|
|
1340
|
+
function F() {
|
|
1341
1341
|
if (T) return P;
|
|
1342
1342
|
if (y) return y = !1, ne;
|
|
1343
1343
|
var k, A = l, _;
|
|
@@ -1354,8 +1354,8 @@ function Dt(t) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
return T = !0, i.slice(A, w);
|
|
1356
1356
|
}
|
|
1357
|
-
for (; (C =
|
|
1358
|
-
for (var p = []; C !== ne && C !== P; ) p.push(C), C =
|
|
1357
|
+
for (; (C = F()) !== P; ) {
|
|
1358
|
+
for (var p = []; C !== ne && C !== P; ) p.push(C), C = F();
|
|
1359
1359
|
d && (p = d(p, m++)) == null || g.push(p);
|
|
1360
1360
|
}
|
|
1361
1361
|
return g;
|
|
@@ -1405,14 +1405,14 @@ function ae(t, e = { csv: { useDisplayNames: !0 } }) {
|
|
|
1405
1405
|
const f = [];
|
|
1406
1406
|
for (let o = 0; o < fe(t); ++o) {
|
|
1407
1407
|
const u = h[o];
|
|
1408
|
-
f[o] =
|
|
1408
|
+
f[o] = Ft(u);
|
|
1409
1409
|
}
|
|
1410
1410
|
a.push(f);
|
|
1411
1411
|
}
|
|
1412
1412
|
const c = a.map((h) => h.map((f) => f === null ? "" : f));
|
|
1413
1413
|
return kt(c);
|
|
1414
1414
|
}
|
|
1415
|
-
const
|
|
1415
|
+
const Ft = (t) => t == null ? null : t instanceof Date ? t.toISOString() : typeof t == "object" ? JSON.stringify(t) : String(t), Ut = {
|
|
1416
1416
|
...Ce,
|
|
1417
1417
|
version: "latest",
|
|
1418
1418
|
options: {
|
|
@@ -1429,13 +1429,13 @@ const vt = (t) => t == null ? null : t instanceof Date ? t.toISOString() : typeo
|
|
|
1429
1429
|
batchType: null,
|
|
1430
1430
|
parse: async (t, e) => oe(new TextDecoder().decode(t), e),
|
|
1431
1431
|
parseText: (t, e) => oe(t, e),
|
|
1432
|
-
parseInBatches:
|
|
1432
|
+
parseInBatches: vt
|
|
1433
1433
|
};
|
|
1434
1434
|
async function oe(t, e) {
|
|
1435
1435
|
const r = await U.parseText(t, e);
|
|
1436
1436
|
return L(r, "arrow-table");
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function vt(t, e) {
|
|
1439
1439
|
const r = U.parseInBatches(t, e);
|
|
1440
1440
|
return rt(r, "arrow-table");
|
|
1441
1441
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { J as R, K as S, N as E, Q as N, R as h, S as w, U as W, X as O, Y as x, Z as I, _ as B, $ as _, a0 as P, a1 as k, a2 as $, a3 as z, a4 as v, a5 as F, a6 as C, a7 as U, a8 as p, a9 as M } from "./index-oY3XHIux.js";
|
|
2
|
+
import { aa as $e, ab as ze, ac as ve, ad as Ce, ae as Ue, af as Me, ag as je, ah as De, ai as Je, aj as qe, ak as Ve, al as Ge, am as He, an as Ke, ao as Qe, ap as Xe, aq as Ye, ar as Ze, as as et, at as tt, au as nt, av as rt, aw as at, ax as st, ay as ot } from "./index-oY3XHIux.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function J(t, e, n = {}, r = {}) {
|
|
5
|
-
const a =
|
|
6
|
-
o || (c.url =
|
|
5
|
+
const a = R(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
6
|
+
o || (c.url = E(t, n));
|
|
7
7
|
const i = s.getWorkerPool(c), u = n.jobName || t.name, d = await i.startJob(
|
|
8
8
|
u,
|
|
9
9
|
// eslint-disable-next-line
|
|
@@ -37,7 +37,7 @@ async function q(t, e, n, r) {
|
|
|
37
37
|
console.warn(`process-on-worker: unknown message ${n}`);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function V(t, e) {
|
|
41
41
|
if (!S.isSupported())
|
|
42
42
|
return !1;
|
|
43
43
|
const n = e?._nodeWorkers ?? e?.core?._nodeWorkers, r = e?.worker ?? e?.core?.worker;
|
|
@@ -71,13 +71,13 @@ async function* ge(t) {
|
|
|
71
71
|
for await (const n of t)
|
|
72
72
|
yield { counter: e, line: n }, e++;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const G = "4.4.3", Te = {
|
|
75
75
|
dataType: null,
|
|
76
76
|
batchType: null,
|
|
77
77
|
name: "JSON",
|
|
78
78
|
id: "json",
|
|
79
79
|
module: "json",
|
|
80
|
-
version:
|
|
80
|
+
version: G,
|
|
81
81
|
extensions: ["json", "geojson"],
|
|
82
82
|
mimeTypes: ["application/json"],
|
|
83
83
|
category: "json",
|
|
@@ -89,7 +89,7 @@ const V = "4.4.3", Te = {
|
|
|
89
89
|
function g(t) {
|
|
90
90
|
return JSON.parse(t);
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class H {
|
|
93
93
|
handle;
|
|
94
94
|
size;
|
|
95
95
|
bigsize;
|
|
@@ -158,7 +158,7 @@ async function Q(t) {
|
|
|
158
158
|
}
|
|
159
159
|
function Se(t, e, n, r) {
|
|
160
160
|
!Array.isArray(e) && !w(e) && (r = void 0, n = e, e = void 0), n = n || {};
|
|
161
|
-
const s =
|
|
161
|
+
const s = W(e, r), o = O(t, s, n);
|
|
162
162
|
if (!o)
|
|
163
163
|
return null;
|
|
164
164
|
const c = x(n, o, s), i = I(t), u = () => {
|
|
@@ -283,7 +283,7 @@ function oe(t) {
|
|
|
283
283
|
}
|
|
284
284
|
async function Be(t, e, n) {
|
|
285
285
|
const a = { ...U(), ...n };
|
|
286
|
-
return e.encodeURLtoURL ? ue(e, t, a) :
|
|
286
|
+
return e.encodeURLtoURL ? ue(e, t, a) : V(e, a) ? await J(e, t, a) : await e.encode(t, a);
|
|
287
287
|
}
|
|
288
288
|
function ce(t, e, n) {
|
|
289
289
|
if (e.encodeSync)
|
|
@@ -357,7 +357,7 @@ function le(t, e) {
|
|
|
357
357
|
return n;
|
|
358
358
|
return null;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Re(t, e) {
|
|
361
361
|
if (globalThis.loaders.makeNodeStream)
|
|
362
362
|
return globalThis.loaders.makeNodeStream(t, e);
|
|
363
363
|
const n = t[Symbol.asyncIterator] ? t[Symbol.asyncIterator]() : t[Symbol.iterator]();
|
|
@@ -388,7 +388,7 @@ function Ee(t, e) {
|
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
390
|
}
|
|
391
|
-
const L = "4.4.3",
|
|
391
|
+
const L = "4.4.3", Ee = {
|
|
392
392
|
dataType: null,
|
|
393
393
|
batchType: null,
|
|
394
394
|
name: "Null loader",
|
|
@@ -425,7 +425,7 @@ const L = "4.4.3", Re = {
|
|
|
425
425
|
function m(t, e, n) {
|
|
426
426
|
return null;
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
428
|
+
async function We(t, e, n = () => {
|
|
429
429
|
}, r = () => {
|
|
430
430
|
}) {
|
|
431
431
|
if (t = await t, !t.ok)
|
|
@@ -458,7 +458,7 @@ async function A(t, e, n, r, a, s, o) {
|
|
|
458
458
|
t.error(c), o(c);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class Oe {
|
|
462
462
|
_fetch;
|
|
463
463
|
files = {};
|
|
464
464
|
lowerCaseFiles = {};
|
|
@@ -524,7 +524,7 @@ class We {
|
|
|
524
524
|
// implements IRandomAccessFileSystem
|
|
525
525
|
// RANDOM ACCESS
|
|
526
526
|
async openReadableFile(e, n) {
|
|
527
|
-
return new
|
|
527
|
+
return new H(this.files[e]);
|
|
528
528
|
}
|
|
529
529
|
// PRIVATE
|
|
530
530
|
// Supports case independent paths, and file usage tracking
|
|
@@ -537,10 +537,10 @@ export {
|
|
|
537
537
|
$e as FetchError,
|
|
538
538
|
Te as JSONLoader,
|
|
539
539
|
Ne as NullLoader,
|
|
540
|
-
|
|
540
|
+
Ee as NullWorkerLoader,
|
|
541
541
|
ze as RequestScheduler,
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
Oe as _BrowserFileSystem,
|
|
543
|
+
We as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
545
|
ve as _unregisterLoaders,
|
|
546
546
|
Ce as assert,
|
|
@@ -563,9 +563,9 @@ export {
|
|
|
563
563
|
Je as global,
|
|
564
564
|
qe as isAsyncIterable,
|
|
565
565
|
h as isBrowser,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
Ve as isIterable,
|
|
567
|
+
Ge as isIterator,
|
|
568
|
+
He as isPromise,
|
|
569
569
|
Ke as isPureObject,
|
|
570
570
|
Qe as isReadableStream,
|
|
571
571
|
Xe as isResponse,
|
|
@@ -576,7 +576,7 @@ export {
|
|
|
576
576
|
tt as makeIterator,
|
|
577
577
|
pe as makeLineIterator,
|
|
578
578
|
ge as makeNumberedLineIterator,
|
|
579
|
-
|
|
579
|
+
Re as makeStream,
|
|
580
580
|
me as makeTextDecoderIterator,
|
|
581
581
|
we as makeTextEncoderIterator,
|
|
582
582
|
k as parse,
|
|
@@ -586,7 +586,7 @@ export {
|
|
|
586
586
|
nt as registerLoaders,
|
|
587
587
|
p as resolvePath,
|
|
588
588
|
P as selectLoader,
|
|
589
|
-
|
|
589
|
+
O as selectLoaderSync,
|
|
590
590
|
rt as self,
|
|
591
591
|
at as setLoaderOptions,
|
|
592
592
|
st as setPathPrefix,
|