geo-polygonize 0.23.1 → 0.32.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/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/bindings/PolygonizerOptions.d.ts +68 -0
- package/dist/slim/cjs/bindings/SnapStrategy.d.ts +24 -0
- package/dist/slim/cjs/index_slim.js +867 -841
- package/dist/slim/es/bindings/PolygonizerOptions.d.ts +68 -0
- package/dist/slim/es/bindings/SnapStrategy.d.ts +24 -0
- package/dist/slim/es/index_slim.js +867 -841
- package/dist/standard/cjs/bindings/PolygonizerOptions.d.ts +68 -0
- package/dist/standard/cjs/bindings/SnapStrategy.d.ts +24 -0
- package/dist/standard/cjs/index.js +465 -452
- package/dist/standard/es/bindings/PolygonizerOptions.d.ts +68 -0
- package/dist/standard/es/bindings/SnapStrategy.d.ts +24 -0
- package/dist/standard/es/index.js +465 -452
- package/dist/threads/es/bindings/PolygonizerOptions.d.ts +68 -0
- package/dist/threads/es/bindings/SnapStrategy.d.ts +24 -0
- package/dist/threads/es/index.js +521 -525
- package/package.json +13 -4
|
@@ -1,219 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function debugString$1(val) {
|
|
7
|
-
// primitive types
|
|
8
|
-
const type = typeof val;
|
|
9
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
10
|
-
return `${val}`;
|
|
11
|
-
}
|
|
12
|
-
if (type == 'string') {
|
|
13
|
-
return `"${val}"`;
|
|
14
|
-
}
|
|
15
|
-
if (type == 'symbol') {
|
|
16
|
-
const description = val.description;
|
|
17
|
-
if (description == null) {
|
|
18
|
-
return 'Symbol';
|
|
19
|
-
} else {
|
|
20
|
-
return `Symbol(${description})`;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (type == 'function') {
|
|
24
|
-
const name = val.name;
|
|
25
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
26
|
-
return `Function(${name})`;
|
|
27
|
-
} else {
|
|
28
|
-
return 'Function';
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// objects
|
|
32
|
-
if (Array.isArray(val)) {
|
|
33
|
-
const length = val.length;
|
|
34
|
-
let debug = '[';
|
|
35
|
-
if (length > 0) {
|
|
36
|
-
debug += debugString$1(val[0]);
|
|
37
|
-
}
|
|
38
|
-
for(let i = 1; i < length; i++) {
|
|
39
|
-
debug += ', ' + debugString$1(val[i]);
|
|
40
|
-
}
|
|
41
|
-
debug += ']';
|
|
42
|
-
return debug;
|
|
43
|
-
}
|
|
44
|
-
// Test for built-in
|
|
45
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
46
|
-
let className;
|
|
47
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
48
|
-
className = builtInMatches[1];
|
|
49
|
-
} else {
|
|
50
|
-
// Failed to match the standard '[object ClassName]'
|
|
51
|
-
return toString.call(val);
|
|
52
|
-
}
|
|
53
|
-
if (className == 'Object') {
|
|
54
|
-
// we're a user defined class or Object
|
|
55
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
56
|
-
// easier than looping through ownProperties of `val`.
|
|
57
|
-
try {
|
|
58
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
59
|
-
} catch (_) {
|
|
60
|
-
return 'Object';
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
// errors
|
|
64
|
-
if (val instanceof Error) {
|
|
65
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
66
|
-
}
|
|
67
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
68
|
-
return className;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function getArrayU8FromWasm0$1(ptr, len) {
|
|
72
|
-
ptr = ptr >>> 0;
|
|
73
|
-
return getUint8ArrayMemory0$1().subarray(ptr / 1, ptr / 1 + len);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
let cachedDataViewMemory0$1 = null;
|
|
77
|
-
function getDataViewMemory0$1() {
|
|
78
|
-
if (cachedDataViewMemory0$1 === null || cachedDataViewMemory0$1.buffer.detached === true || (cachedDataViewMemory0$1.buffer.detached === undefined && cachedDataViewMemory0$1.buffer !== wasm$1.memory.buffer)) {
|
|
79
|
-
cachedDataViewMemory0$1 = new DataView(wasm$1.memory.buffer);
|
|
80
|
-
}
|
|
81
|
-
return cachedDataViewMemory0$1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
let cachedFloat64ArrayMemory0$1 = null;
|
|
85
|
-
function getFloat64ArrayMemory0$1() {
|
|
86
|
-
if (cachedFloat64ArrayMemory0$1 === null || cachedFloat64ArrayMemory0$1.byteLength === 0) {
|
|
87
|
-
cachedFloat64ArrayMemory0$1 = new Float64Array(wasm$1.memory.buffer);
|
|
88
|
-
}
|
|
89
|
-
return cachedFloat64ArrayMemory0$1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function getStringFromWasm0$1(ptr, len) {
|
|
93
|
-
ptr = ptr >>> 0;
|
|
94
|
-
return decodeText$1(ptr, len);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
let cachedUint32ArrayMemory0$1 = null;
|
|
98
|
-
function getUint32ArrayMemory0$1() {
|
|
99
|
-
if (cachedUint32ArrayMemory0$1 === null || cachedUint32ArrayMemory0$1.byteLength === 0) {
|
|
100
|
-
cachedUint32ArrayMemory0$1 = new Uint32Array(wasm$1.memory.buffer);
|
|
101
|
-
}
|
|
102
|
-
return cachedUint32ArrayMemory0$1;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
let cachedUint8ArrayMemory0$1 = null;
|
|
106
|
-
function getUint8ArrayMemory0$1() {
|
|
107
|
-
if (cachedUint8ArrayMemory0$1 === null || cachedUint8ArrayMemory0$1.byteLength === 0) {
|
|
108
|
-
cachedUint8ArrayMemory0$1 = new Uint8Array(wasm$1.memory.buffer);
|
|
109
|
-
}
|
|
110
|
-
return cachedUint8ArrayMemory0$1;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function isLikeNone$1(x) {
|
|
114
|
-
return x === undefined || x === null;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function passArray32ToWasm0$1(arg, malloc) {
|
|
118
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
119
|
-
getUint32ArrayMemory0$1().set(arg, ptr / 4);
|
|
120
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
121
|
-
return ptr;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function passArray8ToWasm0$1(arg, malloc) {
|
|
125
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
126
|
-
getUint8ArrayMemory0$1().set(arg, ptr / 1);
|
|
127
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
128
|
-
return ptr;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function passArrayF64ToWasm0$1(arg, malloc) {
|
|
132
|
-
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
133
|
-
getFloat64ArrayMemory0$1().set(arg, ptr / 8);
|
|
134
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
135
|
-
return ptr;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function passStringToWasm0$1(arg, malloc, realloc) {
|
|
139
|
-
if (realloc === undefined) {
|
|
140
|
-
const buf = cachedTextEncoder$1.encode(arg);
|
|
141
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
142
|
-
getUint8ArrayMemory0$1().subarray(ptr, ptr + buf.length).set(buf);
|
|
143
|
-
WASM_VECTOR_LEN$1 = buf.length;
|
|
144
|
-
return ptr;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
let len = arg.length;
|
|
148
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
149
|
-
|
|
150
|
-
const mem = getUint8ArrayMemory0$1();
|
|
151
|
-
|
|
152
|
-
let offset = 0;
|
|
153
|
-
|
|
154
|
-
for (; offset < len; offset++) {
|
|
155
|
-
const code = arg.charCodeAt(offset);
|
|
156
|
-
if (code > 0x7F) break;
|
|
157
|
-
mem[ptr + offset] = code;
|
|
158
|
-
}
|
|
159
|
-
if (offset !== len) {
|
|
160
|
-
if (offset !== 0) {
|
|
161
|
-
arg = arg.slice(offset);
|
|
162
|
-
}
|
|
163
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
164
|
-
const view = getUint8ArrayMemory0$1().subarray(ptr + offset, ptr + len);
|
|
165
|
-
const ret = cachedTextEncoder$1.encodeInto(arg, view);
|
|
166
|
-
|
|
167
|
-
offset += ret.written;
|
|
168
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
WASM_VECTOR_LEN$1 = offset;
|
|
172
|
-
return ptr;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function takeFromExternrefTable0$1(idx) {
|
|
176
|
-
const value = wasm$1.__wbindgen_externrefs.get(idx);
|
|
177
|
-
wasm$1.__externref_table_dealloc(idx);
|
|
178
|
-
return value;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
let cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
182
|
-
cachedTextDecoder$1.decode();
|
|
183
|
-
const MAX_SAFARI_DECODE_BYTES$1 = 2146435072;
|
|
184
|
-
let numBytesDecoded$1 = 0;
|
|
185
|
-
function decodeText$1(ptr, len) {
|
|
186
|
-
numBytesDecoded$1 += len;
|
|
187
|
-
if (numBytesDecoded$1 >= MAX_SAFARI_DECODE_BYTES$1) {
|
|
188
|
-
cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
189
|
-
cachedTextDecoder$1.decode();
|
|
190
|
-
numBytesDecoded$1 = len;
|
|
191
|
-
}
|
|
192
|
-
return cachedTextDecoder$1.decode(getUint8ArrayMemory0$1().subarray(ptr, ptr + len));
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const cachedTextEncoder$1 = new TextEncoder();
|
|
196
|
-
|
|
197
|
-
if (!('encodeInto' in cachedTextEncoder$1)) {
|
|
198
|
-
cachedTextEncoder$1.encodeInto = function (arg, view) {
|
|
199
|
-
const buf = cachedTextEncoder$1.encode(arg);
|
|
200
|
-
view.set(buf);
|
|
201
|
-
return {
|
|
202
|
-
read: arg.length,
|
|
203
|
-
written: buf.length
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
let WASM_VECTOR_LEN$1 = 0;
|
|
209
|
-
|
|
210
|
-
const PolygonizerWasmErrorFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
211
|
-
? { register: () => {}, unregister: () => {} }
|
|
212
|
-
: new FinalizationRegistry(ptr => wasm$1.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
|
|
213
|
-
|
|
214
|
-
const WasmPolygonResultFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
215
|
-
? { register: () => {}, unregister: () => {} }
|
|
216
|
-
: new FinalizationRegistry(ptr => wasm$1.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
|
|
4
|
+
/* @ts-self-types="./geo_polygonize.d.ts" */
|
|
217
5
|
|
|
218
6
|
let PolygonizerWasmError$1 = class PolygonizerWasmError {
|
|
219
7
|
static __wrap(ptr) {
|
|
@@ -233,28 +21,14 @@ let PolygonizerWasmError$1 = class PolygonizerWasmError {
|
|
|
233
21
|
const ptr = this.__destroy_into_raw();
|
|
234
22
|
wasm$1.__wbg_polygonizerwasmerror_free(ptr, 0);
|
|
235
23
|
}
|
|
236
|
-
/**
|
|
237
|
-
* @param {string} name
|
|
238
|
-
* @param {string} message
|
|
239
|
-
*/
|
|
240
|
-
constructor(name, message) {
|
|
241
|
-
const ptr0 = passStringToWasm0$1(name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
242
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
243
|
-
const ptr1 = passStringToWasm0$1(message, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
244
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
245
|
-
const ret = wasm$1.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
|
|
246
|
-
this.__wbg_ptr = ret >>> 0;
|
|
247
|
-
PolygonizerWasmErrorFinalization$1.register(this, this.__wbg_ptr, this);
|
|
248
|
-
return this;
|
|
249
|
-
}
|
|
250
24
|
/**
|
|
251
25
|
* @returns {string}
|
|
252
26
|
*/
|
|
253
|
-
get
|
|
27
|
+
get message() {
|
|
254
28
|
let deferred1_0;
|
|
255
29
|
let deferred1_1;
|
|
256
30
|
try {
|
|
257
|
-
const ret = wasm$1.
|
|
31
|
+
const ret = wasm$1.polygonizerwasmerror_message(this.__wbg_ptr);
|
|
258
32
|
deferred1_0 = ret[0];
|
|
259
33
|
deferred1_1 = ret[1];
|
|
260
34
|
return getStringFromWasm0$1(ret[0], ret[1]);
|
|
@@ -265,11 +39,11 @@ let PolygonizerWasmError$1 = class PolygonizerWasmError {
|
|
|
265
39
|
/**
|
|
266
40
|
* @returns {string}
|
|
267
41
|
*/
|
|
268
|
-
get
|
|
42
|
+
get name() {
|
|
269
43
|
let deferred1_0;
|
|
270
44
|
let deferred1_1;
|
|
271
45
|
try {
|
|
272
|
-
const ret = wasm$1.
|
|
46
|
+
const ret = wasm$1.polygonizerwasmerror_name(this.__wbg_ptr);
|
|
273
47
|
deferred1_0 = ret[0];
|
|
274
48
|
deferred1_1 = ret[1];
|
|
275
49
|
return getStringFromWasm0$1(ret[0], ret[1]);
|
|
@@ -277,6 +51,20 @@ let PolygonizerWasmError$1 = class PolygonizerWasmError {
|
|
|
277
51
|
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
278
52
|
}
|
|
279
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} name
|
|
56
|
+
* @param {string} message
|
|
57
|
+
*/
|
|
58
|
+
constructor(name, message) {
|
|
59
|
+
const ptr0 = passStringToWasm0$1(name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
60
|
+
const len0 = WASM_VECTOR_LEN$1;
|
|
61
|
+
const ptr1 = passStringToWasm0$1(message, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
62
|
+
const len1 = WASM_VECTOR_LEN$1;
|
|
63
|
+
const ret = wasm$1.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
|
|
64
|
+
this.__wbg_ptr = ret >>> 0;
|
|
65
|
+
PolygonizerWasmErrorFinalization$1.register(this, this.__wbg_ptr, this);
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
280
68
|
};
|
|
281
69
|
if (Symbol.dispose) PolygonizerWasmError$1.prototype[Symbol.dispose] = PolygonizerWasmError$1.prototype.free;
|
|
282
70
|
|
|
@@ -312,13 +100,6 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
|
|
|
312
100
|
const ret = wasm$1.wasmpolygonresult_coords_ptr(this.__wbg_ptr);
|
|
313
101
|
return ret >>> 0;
|
|
314
102
|
}
|
|
315
|
-
/**
|
|
316
|
-
* @returns {any}
|
|
317
|
-
*/
|
|
318
|
-
get provenance() {
|
|
319
|
-
const ret = wasm$1.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
320
|
-
return ret;
|
|
321
|
-
}
|
|
322
103
|
/**
|
|
323
104
|
* @returns {any}
|
|
324
105
|
*/
|
|
@@ -329,43 +110,50 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
|
|
|
329
110
|
/**
|
|
330
111
|
* @returns {number}
|
|
331
112
|
*/
|
|
332
|
-
|
|
333
|
-
const ret = wasm$1.
|
|
113
|
+
flat_line_ids_len() {
|
|
114
|
+
const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
|
|
334
115
|
return ret >>> 0;
|
|
335
116
|
}
|
|
336
117
|
/**
|
|
337
118
|
* @returns {number}
|
|
338
119
|
*/
|
|
339
|
-
|
|
340
|
-
const ret = wasm$1.
|
|
120
|
+
flat_line_ids_ptr() {
|
|
121
|
+
const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
|
|
341
122
|
return ret >>> 0;
|
|
342
123
|
}
|
|
343
124
|
/**
|
|
344
125
|
* @returns {number}
|
|
345
126
|
*/
|
|
346
|
-
|
|
347
|
-
const ret = wasm$1.
|
|
127
|
+
polygon_offsets_len() {
|
|
128
|
+
const ret = wasm$1.wasmpolygonresult_polygon_offsets_len(this.__wbg_ptr);
|
|
348
129
|
return ret >>> 0;
|
|
349
130
|
}
|
|
350
131
|
/**
|
|
351
132
|
* @returns {number}
|
|
352
133
|
*/
|
|
353
|
-
|
|
354
|
-
const ret = wasm$1.
|
|
134
|
+
polygon_offsets_ptr() {
|
|
135
|
+
const ret = wasm$1.wasmpolygonresult_polygon_offsets_ptr(this.__wbg_ptr);
|
|
355
136
|
return ret >>> 0;
|
|
356
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* @returns {any}
|
|
140
|
+
*/
|
|
141
|
+
get provenance() {
|
|
142
|
+
const ret = wasm$1.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
143
|
+
return ret;
|
|
144
|
+
}
|
|
357
145
|
/**
|
|
358
146
|
* @returns {number}
|
|
359
147
|
*/
|
|
360
|
-
|
|
361
|
-
const ret = wasm$1.
|
|
148
|
+
ring_offsets_len() {
|
|
149
|
+
const ret = wasm$1.wasmpolygonresult_ring_offsets_len(this.__wbg_ptr);
|
|
362
150
|
return ret >>> 0;
|
|
363
151
|
}
|
|
364
152
|
/**
|
|
365
153
|
* @returns {number}
|
|
366
154
|
*/
|
|
367
|
-
|
|
368
|
-
const ret = wasm$1.
|
|
155
|
+
ring_offsets_ptr() {
|
|
156
|
+
const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
|
|
369
157
|
return ret >>> 0;
|
|
370
158
|
}
|
|
371
159
|
/**
|
|
@@ -408,6 +196,11 @@ function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_poly
|
|
|
408
196
|
}
|
|
409
197
|
|
|
410
198
|
/**
|
|
199
|
+
* Polygonizes an Arrow IPC stream containing a GeoArrow LineString array.
|
|
200
|
+
*
|
|
201
|
+
* This zero-copy path avoids JSON serialization overhead and returns a binary
|
|
202
|
+
* Arrow IPC stream containing a GeoArrow Polygon array. Requires the options
|
|
203
|
+
* to be passed as a parsed JS object.
|
|
411
204
|
* @param {Uint8Array} ipc_bytes
|
|
412
205
|
* @param {any} options_val
|
|
413
206
|
* @returns {Uint8Array}
|
|
@@ -425,6 +218,11 @@ function polygonizeGeoArrowWithOptions$1(ipc_bytes, options_val) {
|
|
|
425
218
|
}
|
|
426
219
|
|
|
427
220
|
/**
|
|
221
|
+
* Polygonizes a GeoJSON FeatureCollection using the canonical `PolygonizerOptions`.
|
|
222
|
+
*
|
|
223
|
+
* This is the primary entry point for JavaScript users. It accepts a JSON string
|
|
224
|
+
* of options and returns a JSON string representing the result, including faces,
|
|
225
|
+
* dangles, cut-lines, and (optionally) provenance/diagnostics.
|
|
428
226
|
* @param {string} geojson_str
|
|
429
227
|
* @param {any} options_val
|
|
430
228
|
* @returns {string}
|
|
@@ -514,293 +312,196 @@ function polygonize_geoarrow$1(ipc_bytes, node_input, snap_grid_size, extract_on
|
|
|
514
312
|
return v2;
|
|
515
313
|
}
|
|
516
314
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
315
|
+
function __wbg_get_imports$1() {
|
|
316
|
+
const import0 = {
|
|
317
|
+
__proto__: null,
|
|
318
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
319
|
+
const ret = Error(getStringFromWasm0$1(arg0, arg1));
|
|
320
|
+
return ret;
|
|
321
|
+
},
|
|
322
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
323
|
+
const ret = String(arg1);
|
|
324
|
+
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
325
|
+
const len1 = WASM_VECTOR_LEN$1;
|
|
326
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
327
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
328
|
+
},
|
|
329
|
+
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
330
|
+
const v = arg0;
|
|
331
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
332
|
+
return isLikeNone$1(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
333
|
+
},
|
|
334
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
335
|
+
const ret = debugString$1(arg1);
|
|
336
|
+
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
337
|
+
const len1 = WASM_VECTOR_LEN$1;
|
|
338
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
339
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
340
|
+
},
|
|
341
|
+
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
342
|
+
const ret = arg0 in arg1;
|
|
343
|
+
return ret;
|
|
344
|
+
},
|
|
345
|
+
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
346
|
+
const val = arg0;
|
|
347
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
348
|
+
return ret;
|
|
349
|
+
},
|
|
350
|
+
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
351
|
+
const ret = typeof(arg0) === 'string';
|
|
352
|
+
return ret;
|
|
353
|
+
},
|
|
354
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
355
|
+
const ret = arg0 === undefined;
|
|
356
|
+
return ret;
|
|
357
|
+
},
|
|
358
|
+
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
359
|
+
const ret = arg0 == arg1;
|
|
360
|
+
return ret;
|
|
361
|
+
},
|
|
362
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
363
|
+
const obj = arg1;
|
|
364
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
365
|
+
getDataViewMemory0$1().setFloat64(arg0 + 8 * 1, isLikeNone$1(ret) ? 0 : ret, true);
|
|
366
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, !isLikeNone$1(ret), true);
|
|
367
|
+
},
|
|
368
|
+
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
369
|
+
const obj = arg1;
|
|
370
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
371
|
+
var ptr1 = isLikeNone$1(ret) ? 0 : passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
372
|
+
var len1 = WASM_VECTOR_LEN$1;
|
|
373
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
374
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
375
|
+
},
|
|
376
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
377
|
+
throw new Error(getStringFromWasm0$1(arg0, arg1));
|
|
378
|
+
},
|
|
379
|
+
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
380
|
+
const ret = Object.entries(arg0);
|
|
381
|
+
return ret;
|
|
382
|
+
},
|
|
383
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
384
|
+
let deferred0_0;
|
|
385
|
+
let deferred0_1;
|
|
522
386
|
try {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
529
|
-
|
|
530
|
-
} else {
|
|
531
|
-
throw e;
|
|
532
|
-
}
|
|
387
|
+
deferred0_0 = arg0;
|
|
388
|
+
deferred0_1 = arg1;
|
|
389
|
+
console.error(getStringFromWasm0$1(arg0, arg1));
|
|
390
|
+
} finally {
|
|
391
|
+
wasm$1.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
533
392
|
}
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
};
|
|
636
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
637
|
-
let result;
|
|
638
|
-
try {
|
|
639
|
-
result = arg0 instanceof ArrayBuffer;
|
|
640
|
-
} catch (_) {
|
|
641
|
-
result = false;
|
|
642
|
-
}
|
|
643
|
-
const ret = result;
|
|
644
|
-
return ret;
|
|
645
|
-
};
|
|
646
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
647
|
-
let result;
|
|
648
|
-
try {
|
|
649
|
-
result = arg0 instanceof Uint8Array;
|
|
650
|
-
} catch (_) {
|
|
651
|
-
result = false;
|
|
652
|
-
}
|
|
653
|
-
const ret = result;
|
|
654
|
-
return ret;
|
|
655
|
-
};
|
|
656
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
657
|
-
const ret = arg0.length;
|
|
658
|
-
return ret;
|
|
659
|
-
};
|
|
660
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
661
|
-
const ret = arg0.length;
|
|
662
|
-
return ret;
|
|
663
|
-
};
|
|
664
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
665
|
-
const ret = new Object();
|
|
666
|
-
return ret;
|
|
667
|
-
};
|
|
668
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
669
|
-
const ret = new Array();
|
|
670
|
-
return ret;
|
|
671
|
-
};
|
|
672
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
673
|
-
const ret = new Uint8Array(arg0);
|
|
674
|
-
return ret;
|
|
675
|
-
};
|
|
676
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
677
|
-
const ret = new Error();
|
|
678
|
-
return ret;
|
|
679
|
-
};
|
|
680
|
-
imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
|
|
681
|
-
const ret = PolygonizerWasmError$1.__wrap(arg0);
|
|
682
|
-
return ret;
|
|
683
|
-
};
|
|
684
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
685
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0$1(arg0, arg1), arg2);
|
|
686
|
-
};
|
|
687
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
688
|
-
arg0[arg1] = arg2;
|
|
689
|
-
};
|
|
690
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
691
|
-
arg0[arg1 >>> 0] = arg2;
|
|
692
|
-
};
|
|
693
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
694
|
-
const ret = arg1.stack;
|
|
695
|
-
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
696
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
697
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
698
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
699
|
-
};
|
|
700
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
701
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
702
|
-
const ret = getStringFromWasm0$1(arg0, arg1);
|
|
703
|
-
return ret;
|
|
704
|
-
};
|
|
705
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
706
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
707
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
708
|
-
return ret;
|
|
709
|
-
};
|
|
710
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
711
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
712
|
-
const ret = arg0;
|
|
713
|
-
return ret;
|
|
714
|
-
};
|
|
715
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
716
|
-
const table = wasm$1.__wbindgen_externrefs;
|
|
717
|
-
const offset = table.grow(4);
|
|
718
|
-
table.set(0, undefined);
|
|
719
|
-
table.set(offset + 0, undefined);
|
|
720
|
-
table.set(offset + 1, null);
|
|
721
|
-
table.set(offset + 2, true);
|
|
722
|
-
table.set(offset + 3, false);
|
|
393
|
+
},
|
|
394
|
+
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
395
|
+
const ret = arg0[arg1 >>> 0];
|
|
396
|
+
return ret;
|
|
397
|
+
},
|
|
398
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
399
|
+
const ret = arg0[arg1];
|
|
400
|
+
return ret;
|
|
401
|
+
},
|
|
402
|
+
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
403
|
+
let result;
|
|
404
|
+
try {
|
|
405
|
+
result = arg0 instanceof ArrayBuffer;
|
|
406
|
+
} catch (_) {
|
|
407
|
+
result = false;
|
|
408
|
+
}
|
|
409
|
+
const ret = result;
|
|
410
|
+
return ret;
|
|
411
|
+
},
|
|
412
|
+
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
413
|
+
let result;
|
|
414
|
+
try {
|
|
415
|
+
result = arg0 instanceof Uint8Array;
|
|
416
|
+
} catch (_) {
|
|
417
|
+
result = false;
|
|
418
|
+
}
|
|
419
|
+
const ret = result;
|
|
420
|
+
return ret;
|
|
421
|
+
},
|
|
422
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
423
|
+
const ret = arg0.length;
|
|
424
|
+
return ret;
|
|
425
|
+
},
|
|
426
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
427
|
+
const ret = arg0.length;
|
|
428
|
+
return ret;
|
|
429
|
+
},
|
|
430
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
431
|
+
const ret = new Error();
|
|
432
|
+
return ret;
|
|
433
|
+
},
|
|
434
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
435
|
+
const ret = new Uint8Array(arg0);
|
|
436
|
+
return ret;
|
|
437
|
+
},
|
|
438
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
439
|
+
const ret = new Array();
|
|
440
|
+
return ret;
|
|
441
|
+
},
|
|
442
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
443
|
+
const ret = new Object();
|
|
444
|
+
return ret;
|
|
445
|
+
},
|
|
446
|
+
__wbg_polygonizerwasmerror_new: function(arg0) {
|
|
447
|
+
const ret = PolygonizerWasmError$1.__wrap(arg0);
|
|
448
|
+
return ret;
|
|
449
|
+
},
|
|
450
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
451
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0$1(arg0, arg1), arg2);
|
|
452
|
+
},
|
|
453
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
454
|
+
arg0[arg1 >>> 0] = arg2;
|
|
455
|
+
},
|
|
456
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
457
|
+
arg0[arg1] = arg2;
|
|
458
|
+
},
|
|
459
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
460
|
+
const ret = arg1.stack;
|
|
461
|
+
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
462
|
+
const len1 = WASM_VECTOR_LEN$1;
|
|
463
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
464
|
+
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
465
|
+
},
|
|
466
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
467
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
468
|
+
const ret = arg0;
|
|
469
|
+
return ret;
|
|
470
|
+
},
|
|
471
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
472
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
473
|
+
const ret = getStringFromWasm0$1(arg0, arg1);
|
|
474
|
+
return ret;
|
|
475
|
+
},
|
|
476
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
477
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
478
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
479
|
+
return ret;
|
|
480
|
+
},
|
|
481
|
+
__wbindgen_init_externref_table: function() {
|
|
482
|
+
const table = wasm$1.__wbindgen_externrefs;
|
|
483
|
+
const offset = table.grow(4);
|
|
484
|
+
table.set(0, undefined);
|
|
485
|
+
table.set(offset + 0, undefined);
|
|
486
|
+
table.set(offset + 1, null);
|
|
487
|
+
table.set(offset + 2, true);
|
|
488
|
+
table.set(offset + 3, false);
|
|
489
|
+
},
|
|
490
|
+
};
|
|
491
|
+
return {
|
|
492
|
+
__proto__: null,
|
|
493
|
+
"./geo_polygonize_bg.js": import0,
|
|
723
494
|
};
|
|
724
|
-
|
|
725
|
-
return imports;
|
|
726
495
|
}
|
|
727
496
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
cachedUint8ArrayMemory0$1 = null;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
wasm$1.__wbindgen_start();
|
|
738
|
-
return wasm$1;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
function initSync$1(module) {
|
|
742
|
-
if (wasm$1 !== undefined) return wasm$1;
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
if (typeof module !== 'undefined') {
|
|
746
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
747
|
-
({module} = module);
|
|
748
|
-
} else {
|
|
749
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
const imports = __wbg_get_imports$1();
|
|
754
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
755
|
-
module = new WebAssembly.Module(module);
|
|
756
|
-
}
|
|
757
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
758
|
-
return __wbg_finalize_init$1(instance, module);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
async function __wbg_init$1(module_or_path) {
|
|
762
|
-
if (wasm$1 !== undefined) return wasm$1;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
if (typeof module_or_path !== 'undefined') {
|
|
766
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
767
|
-
({module_or_path} = module_or_path);
|
|
768
|
-
} else {
|
|
769
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead');
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
if (typeof module_or_path === 'undefined') {
|
|
774
|
-
module_or_path = new URL('geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
775
|
-
}
|
|
776
|
-
const imports = __wbg_get_imports$1();
|
|
777
|
-
|
|
778
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
779
|
-
module_or_path = fetch(module_or_path);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
const { instance, module } = await __wbg_load$1(await module_or_path, imports);
|
|
783
|
-
|
|
784
|
-
return __wbg_finalize_init$1(instance, module);
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
var scalarExports = /*#__PURE__*/Object.freeze({
|
|
788
|
-
__proto__: null,
|
|
789
|
-
PolygonizerWasmError: PolygonizerWasmError$1,
|
|
790
|
-
WasmPolygonResult: WasmPolygonResult$1,
|
|
791
|
-
default: __wbg_init$1,
|
|
792
|
-
initSync: initSync$1,
|
|
793
|
-
polygonize: polygonize$1,
|
|
794
|
-
polygonizeGeoArrowWithOptions: polygonizeGeoArrowWithOptions$1,
|
|
795
|
-
polygonizeWithOptions: polygonizeWithOptions$1,
|
|
796
|
-
polygonizeWithOptionsBuffer: polygonizeWithOptionsBuffer$1,
|
|
797
|
-
polygonize_buffers: polygonize_buffers$1,
|
|
798
|
-
polygonize_geoarrow: polygonize_geoarrow$1
|
|
799
|
-
});
|
|
800
|
-
|
|
801
|
-
let wasm;
|
|
497
|
+
const PolygonizerWasmErrorFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
498
|
+
? { register: () => {}, unregister: () => {} }
|
|
499
|
+
: new FinalizationRegistry(ptr => wasm$1.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
|
|
500
|
+
const WasmPolygonResultFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
501
|
+
? { register: () => {}, unregister: () => {} }
|
|
502
|
+
: new FinalizationRegistry(ptr => wasm$1.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
|
|
802
503
|
|
|
803
|
-
function debugString(val) {
|
|
504
|
+
function debugString$1(val) {
|
|
804
505
|
// primitive types
|
|
805
506
|
const type = typeof val;
|
|
806
507
|
if (type == 'number' || type == 'boolean' || val == null) {
|
|
@@ -830,10 +531,10 @@ function debugString(val) {
|
|
|
830
531
|
const length = val.length;
|
|
831
532
|
let debug = '[';
|
|
832
533
|
if (length > 0) {
|
|
833
|
-
debug += debugString(val[0]);
|
|
534
|
+
debug += debugString$1(val[0]);
|
|
834
535
|
}
|
|
835
536
|
for(let i = 1; i < length; i++) {
|
|
836
|
-
debug += ', ' + debugString(val[i]);
|
|
537
|
+
debug += ', ' + debugString$1(val[i]);
|
|
837
538
|
}
|
|
838
539
|
debug += ']';
|
|
839
540
|
return debug;
|
|
@@ -865,86 +566,86 @@ function debugString(val) {
|
|
|
865
566
|
return className;
|
|
866
567
|
}
|
|
867
568
|
|
|
868
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
569
|
+
function getArrayU8FromWasm0$1(ptr, len) {
|
|
869
570
|
ptr = ptr >>> 0;
|
|
870
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
571
|
+
return getUint8ArrayMemory0$1().subarray(ptr / 1, ptr / 1 + len);
|
|
871
572
|
}
|
|
872
573
|
|
|
873
|
-
let cachedDataViewMemory0 = null;
|
|
874
|
-
function getDataViewMemory0() {
|
|
875
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
876
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
574
|
+
let cachedDataViewMemory0$1 = null;
|
|
575
|
+
function getDataViewMemory0$1() {
|
|
576
|
+
if (cachedDataViewMemory0$1 === null || cachedDataViewMemory0$1.buffer.detached === true || (cachedDataViewMemory0$1.buffer.detached === undefined && cachedDataViewMemory0$1.buffer !== wasm$1.memory.buffer)) {
|
|
577
|
+
cachedDataViewMemory0$1 = new DataView(wasm$1.memory.buffer);
|
|
877
578
|
}
|
|
878
|
-
return cachedDataViewMemory0;
|
|
579
|
+
return cachedDataViewMemory0$1;
|
|
879
580
|
}
|
|
880
581
|
|
|
881
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
882
|
-
function getFloat64ArrayMemory0() {
|
|
883
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
884
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
582
|
+
let cachedFloat64ArrayMemory0$1 = null;
|
|
583
|
+
function getFloat64ArrayMemory0$1() {
|
|
584
|
+
if (cachedFloat64ArrayMemory0$1 === null || cachedFloat64ArrayMemory0$1.byteLength === 0) {
|
|
585
|
+
cachedFloat64ArrayMemory0$1 = new Float64Array(wasm$1.memory.buffer);
|
|
885
586
|
}
|
|
886
|
-
return cachedFloat64ArrayMemory0;
|
|
587
|
+
return cachedFloat64ArrayMemory0$1;
|
|
887
588
|
}
|
|
888
589
|
|
|
889
|
-
function getStringFromWasm0(ptr, len) {
|
|
590
|
+
function getStringFromWasm0$1(ptr, len) {
|
|
890
591
|
ptr = ptr >>> 0;
|
|
891
|
-
return decodeText(ptr, len);
|
|
592
|
+
return decodeText$1(ptr, len);
|
|
892
593
|
}
|
|
893
594
|
|
|
894
|
-
let cachedUint32ArrayMemory0 = null;
|
|
895
|
-
function getUint32ArrayMemory0() {
|
|
896
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
897
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
595
|
+
let cachedUint32ArrayMemory0$1 = null;
|
|
596
|
+
function getUint32ArrayMemory0$1() {
|
|
597
|
+
if (cachedUint32ArrayMemory0$1 === null || cachedUint32ArrayMemory0$1.byteLength === 0) {
|
|
598
|
+
cachedUint32ArrayMemory0$1 = new Uint32Array(wasm$1.memory.buffer);
|
|
898
599
|
}
|
|
899
|
-
return cachedUint32ArrayMemory0;
|
|
600
|
+
return cachedUint32ArrayMemory0$1;
|
|
900
601
|
}
|
|
901
602
|
|
|
902
|
-
let cachedUint8ArrayMemory0 = null;
|
|
903
|
-
function getUint8ArrayMemory0() {
|
|
904
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
905
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
603
|
+
let cachedUint8ArrayMemory0$1 = null;
|
|
604
|
+
function getUint8ArrayMemory0$1() {
|
|
605
|
+
if (cachedUint8ArrayMemory0$1 === null || cachedUint8ArrayMemory0$1.byteLength === 0) {
|
|
606
|
+
cachedUint8ArrayMemory0$1 = new Uint8Array(wasm$1.memory.buffer);
|
|
906
607
|
}
|
|
907
|
-
return cachedUint8ArrayMemory0;
|
|
608
|
+
return cachedUint8ArrayMemory0$1;
|
|
908
609
|
}
|
|
909
610
|
|
|
910
|
-
function isLikeNone(x) {
|
|
611
|
+
function isLikeNone$1(x) {
|
|
911
612
|
return x === undefined || x === null;
|
|
912
613
|
}
|
|
913
614
|
|
|
914
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
615
|
+
function passArray32ToWasm0$1(arg, malloc) {
|
|
915
616
|
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
916
|
-
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
917
|
-
WASM_VECTOR_LEN = arg.length;
|
|
617
|
+
getUint32ArrayMemory0$1().set(arg, ptr / 4);
|
|
618
|
+
WASM_VECTOR_LEN$1 = arg.length;
|
|
918
619
|
return ptr;
|
|
919
620
|
}
|
|
920
621
|
|
|
921
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
622
|
+
function passArray8ToWasm0$1(arg, malloc) {
|
|
922
623
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
923
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
924
|
-
WASM_VECTOR_LEN = arg.length;
|
|
624
|
+
getUint8ArrayMemory0$1().set(arg, ptr / 1);
|
|
625
|
+
WASM_VECTOR_LEN$1 = arg.length;
|
|
925
626
|
return ptr;
|
|
926
627
|
}
|
|
927
628
|
|
|
928
|
-
function passArrayF64ToWasm0(arg, malloc) {
|
|
629
|
+
function passArrayF64ToWasm0$1(arg, malloc) {
|
|
929
630
|
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
930
|
-
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
931
|
-
WASM_VECTOR_LEN = arg.length;
|
|
631
|
+
getFloat64ArrayMemory0$1().set(arg, ptr / 8);
|
|
632
|
+
WASM_VECTOR_LEN$1 = arg.length;
|
|
932
633
|
return ptr;
|
|
933
634
|
}
|
|
934
635
|
|
|
935
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
636
|
+
function passStringToWasm0$1(arg, malloc, realloc) {
|
|
936
637
|
if (realloc === undefined) {
|
|
937
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
638
|
+
const buf = cachedTextEncoder$1.encode(arg);
|
|
938
639
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
939
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
940
|
-
WASM_VECTOR_LEN = buf.length;
|
|
640
|
+
getUint8ArrayMemory0$1().subarray(ptr, ptr + buf.length).set(buf);
|
|
641
|
+
WASM_VECTOR_LEN$1 = buf.length;
|
|
941
642
|
return ptr;
|
|
942
643
|
}
|
|
943
644
|
|
|
944
645
|
let len = arg.length;
|
|
945
646
|
let ptr = malloc(len, 1) >>> 0;
|
|
946
647
|
|
|
947
|
-
const mem = getUint8ArrayMemory0();
|
|
648
|
+
const mem = getUint8ArrayMemory0$1();
|
|
948
649
|
|
|
949
650
|
let offset = 0;
|
|
950
651
|
|
|
@@ -958,42 +659,42 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
958
659
|
arg = arg.slice(offset);
|
|
959
660
|
}
|
|
960
661
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
961
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
962
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
662
|
+
const view = getUint8ArrayMemory0$1().subarray(ptr + offset, ptr + len);
|
|
663
|
+
const ret = cachedTextEncoder$1.encodeInto(arg, view);
|
|
963
664
|
|
|
964
665
|
offset += ret.written;
|
|
965
666
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
966
667
|
}
|
|
967
668
|
|
|
968
|
-
WASM_VECTOR_LEN = offset;
|
|
669
|
+
WASM_VECTOR_LEN$1 = offset;
|
|
969
670
|
return ptr;
|
|
970
671
|
}
|
|
971
672
|
|
|
972
|
-
function takeFromExternrefTable0(idx) {
|
|
973
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
974
|
-
wasm.__externref_table_dealloc(idx);
|
|
673
|
+
function takeFromExternrefTable0$1(idx) {
|
|
674
|
+
const value = wasm$1.__wbindgen_externrefs.get(idx);
|
|
675
|
+
wasm$1.__externref_table_dealloc(idx);
|
|
975
676
|
return value;
|
|
976
677
|
}
|
|
977
678
|
|
|
978
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
979
|
-
cachedTextDecoder.decode();
|
|
980
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
981
|
-
let numBytesDecoded = 0;
|
|
982
|
-
function decodeText(ptr, len) {
|
|
983
|
-
numBytesDecoded += len;
|
|
984
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
985
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
986
|
-
cachedTextDecoder.decode();
|
|
987
|
-
numBytesDecoded = len;
|
|
679
|
+
let cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
680
|
+
cachedTextDecoder$1.decode();
|
|
681
|
+
const MAX_SAFARI_DECODE_BYTES$1 = 2146435072;
|
|
682
|
+
let numBytesDecoded$1 = 0;
|
|
683
|
+
function decodeText$1(ptr, len) {
|
|
684
|
+
numBytesDecoded$1 += len;
|
|
685
|
+
if (numBytesDecoded$1 >= MAX_SAFARI_DECODE_BYTES$1) {
|
|
686
|
+
cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
687
|
+
cachedTextDecoder$1.decode();
|
|
688
|
+
numBytesDecoded$1 = len;
|
|
988
689
|
}
|
|
989
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
690
|
+
return cachedTextDecoder$1.decode(getUint8ArrayMemory0$1().subarray(ptr, ptr + len));
|
|
990
691
|
}
|
|
991
692
|
|
|
992
|
-
const cachedTextEncoder = new TextEncoder();
|
|
693
|
+
const cachedTextEncoder$1 = new TextEncoder();
|
|
993
694
|
|
|
994
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
995
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
996
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
695
|
+
if (!('encodeInto' in cachedTextEncoder$1)) {
|
|
696
|
+
cachedTextEncoder$1.encodeInto = function (arg, view) {
|
|
697
|
+
const buf = cachedTextEncoder$1.encode(arg);
|
|
997
698
|
view.set(buf);
|
|
998
699
|
return {
|
|
999
700
|
read: arg.length,
|
|
@@ -1002,15 +703,115 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
1002
703
|
};
|
|
1003
704
|
}
|
|
1004
705
|
|
|
1005
|
-
let WASM_VECTOR_LEN = 0;
|
|
706
|
+
let WASM_VECTOR_LEN$1 = 0;
|
|
1006
707
|
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
708
|
+
let wasm$1;
|
|
709
|
+
function __wbg_finalize_init$1(instance, module) {
|
|
710
|
+
wasm$1 = instance.exports;
|
|
711
|
+
cachedDataViewMemory0$1 = null;
|
|
712
|
+
cachedFloat64ArrayMemory0$1 = null;
|
|
713
|
+
cachedUint32ArrayMemory0$1 = null;
|
|
714
|
+
cachedUint8ArrayMemory0$1 = null;
|
|
715
|
+
wasm$1.__wbindgen_start();
|
|
716
|
+
return wasm$1;
|
|
717
|
+
}
|
|
1010
718
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
719
|
+
async function __wbg_load$1(module, imports) {
|
|
720
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
721
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
722
|
+
try {
|
|
723
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
724
|
+
} catch (e) {
|
|
725
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
726
|
+
|
|
727
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
728
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
729
|
+
|
|
730
|
+
} else { throw e; }
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const bytes = await module.arrayBuffer();
|
|
735
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
736
|
+
} else {
|
|
737
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
738
|
+
|
|
739
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
740
|
+
return { instance, module };
|
|
741
|
+
} else {
|
|
742
|
+
return instance;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
function expectedResponseType(type) {
|
|
747
|
+
switch (type) {
|
|
748
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
749
|
+
}
|
|
750
|
+
return false;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function initSync$1(module) {
|
|
755
|
+
if (wasm$1 !== undefined) return wasm$1;
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
if (module !== undefined) {
|
|
759
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
760
|
+
({module} = module);
|
|
761
|
+
} else {
|
|
762
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
const imports = __wbg_get_imports$1();
|
|
767
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
768
|
+
module = new WebAssembly.Module(module);
|
|
769
|
+
}
|
|
770
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
771
|
+
return __wbg_finalize_init$1(instance);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
async function __wbg_init$1(module_or_path) {
|
|
775
|
+
if (wasm$1 !== undefined) return wasm$1;
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
if (module_or_path !== undefined) {
|
|
779
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
780
|
+
({module_or_path} = module_or_path);
|
|
781
|
+
} else {
|
|
782
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead');
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (module_or_path === undefined) {
|
|
787
|
+
module_or_path = new URL('geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
788
|
+
}
|
|
789
|
+
const imports = __wbg_get_imports$1();
|
|
790
|
+
|
|
791
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
792
|
+
module_or_path = fetch(module_or_path);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
const { instance, module } = await __wbg_load$1(await module_or_path, imports);
|
|
796
|
+
|
|
797
|
+
return __wbg_finalize_init$1(instance);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
var scalarExports = /*#__PURE__*/Object.freeze({
|
|
801
|
+
__proto__: null,
|
|
802
|
+
PolygonizerWasmError: PolygonizerWasmError$1,
|
|
803
|
+
WasmPolygonResult: WasmPolygonResult$1,
|
|
804
|
+
default: __wbg_init$1,
|
|
805
|
+
initSync: initSync$1,
|
|
806
|
+
polygonize: polygonize$1,
|
|
807
|
+
polygonizeGeoArrowWithOptions: polygonizeGeoArrowWithOptions$1,
|
|
808
|
+
polygonizeWithOptions: polygonizeWithOptions$1,
|
|
809
|
+
polygonizeWithOptionsBuffer: polygonizeWithOptionsBuffer$1,
|
|
810
|
+
polygonize_buffers: polygonize_buffers$1,
|
|
811
|
+
polygonize_geoarrow: polygonize_geoarrow$1
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
/* @ts-self-types="./geo_polygonize.d.ts" */
|
|
1014
815
|
|
|
1015
816
|
class PolygonizerWasmError {
|
|
1016
817
|
static __wrap(ptr) {
|
|
@@ -1030,28 +831,14 @@ class PolygonizerWasmError {
|
|
|
1030
831
|
const ptr = this.__destroy_into_raw();
|
|
1031
832
|
wasm.__wbg_polygonizerwasmerror_free(ptr, 0);
|
|
1032
833
|
}
|
|
1033
|
-
/**
|
|
1034
|
-
* @param {string} name
|
|
1035
|
-
* @param {string} message
|
|
1036
|
-
*/
|
|
1037
|
-
constructor(name, message) {
|
|
1038
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1039
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1040
|
-
const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1042
|
-
const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
|
|
1043
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1044
|
-
PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
|
|
1045
|
-
return this;
|
|
1046
|
-
}
|
|
1047
834
|
/**
|
|
1048
835
|
* @returns {string}
|
|
1049
836
|
*/
|
|
1050
|
-
get
|
|
837
|
+
get message() {
|
|
1051
838
|
let deferred1_0;
|
|
1052
839
|
let deferred1_1;
|
|
1053
840
|
try {
|
|
1054
|
-
const ret = wasm.
|
|
841
|
+
const ret = wasm.polygonizerwasmerror_message(this.__wbg_ptr);
|
|
1055
842
|
deferred1_0 = ret[0];
|
|
1056
843
|
deferred1_1 = ret[1];
|
|
1057
844
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1062,11 +849,11 @@ class PolygonizerWasmError {
|
|
|
1062
849
|
/**
|
|
1063
850
|
* @returns {string}
|
|
1064
851
|
*/
|
|
1065
|
-
get
|
|
852
|
+
get name() {
|
|
1066
853
|
let deferred1_0;
|
|
1067
854
|
let deferred1_1;
|
|
1068
855
|
try {
|
|
1069
|
-
const ret = wasm.
|
|
856
|
+
const ret = wasm.polygonizerwasmerror_name(this.__wbg_ptr);
|
|
1070
857
|
deferred1_0 = ret[0];
|
|
1071
858
|
deferred1_1 = ret[1];
|
|
1072
859
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1074,6 +861,20 @@ class PolygonizerWasmError {
|
|
|
1074
861
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1075
862
|
}
|
|
1076
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* @param {string} name
|
|
866
|
+
* @param {string} message
|
|
867
|
+
*/
|
|
868
|
+
constructor(name, message) {
|
|
869
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
870
|
+
const len0 = WASM_VECTOR_LEN;
|
|
871
|
+
const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
872
|
+
const len1 = WASM_VECTOR_LEN;
|
|
873
|
+
const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
|
|
874
|
+
this.__wbg_ptr = ret >>> 0;
|
|
875
|
+
PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
|
|
876
|
+
return this;
|
|
877
|
+
}
|
|
1077
878
|
}
|
|
1078
879
|
if (Symbol.dispose) PolygonizerWasmError.prototype[Symbol.dispose] = PolygonizerWasmError.prototype.free;
|
|
1079
880
|
|
|
@@ -1109,13 +910,6 @@ class WasmPolygonResult {
|
|
|
1109
910
|
const ret = wasm.wasmpolygonresult_coords_ptr(this.__wbg_ptr);
|
|
1110
911
|
return ret >>> 0;
|
|
1111
912
|
}
|
|
1112
|
-
/**
|
|
1113
|
-
* @returns {any}
|
|
1114
|
-
*/
|
|
1115
|
-
get provenance() {
|
|
1116
|
-
const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
1117
|
-
return ret;
|
|
1118
|
-
}
|
|
1119
913
|
/**
|
|
1120
914
|
* @returns {any}
|
|
1121
915
|
*/
|
|
@@ -1126,43 +920,50 @@ class WasmPolygonResult {
|
|
|
1126
920
|
/**
|
|
1127
921
|
* @returns {number}
|
|
1128
922
|
*/
|
|
1129
|
-
|
|
1130
|
-
const ret = wasm.
|
|
923
|
+
flat_line_ids_len() {
|
|
924
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
|
|
1131
925
|
return ret >>> 0;
|
|
1132
926
|
}
|
|
1133
927
|
/**
|
|
1134
928
|
* @returns {number}
|
|
1135
929
|
*/
|
|
1136
|
-
|
|
1137
|
-
const ret = wasm.
|
|
930
|
+
flat_line_ids_ptr() {
|
|
931
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
|
|
1138
932
|
return ret >>> 0;
|
|
1139
933
|
}
|
|
1140
934
|
/**
|
|
1141
935
|
* @returns {number}
|
|
1142
936
|
*/
|
|
1143
|
-
|
|
1144
|
-
const ret = wasm.
|
|
937
|
+
polygon_offsets_len() {
|
|
938
|
+
const ret = wasm.wasmpolygonresult_polygon_offsets_len(this.__wbg_ptr);
|
|
1145
939
|
return ret >>> 0;
|
|
1146
940
|
}
|
|
1147
941
|
/**
|
|
1148
942
|
* @returns {number}
|
|
1149
943
|
*/
|
|
1150
|
-
|
|
1151
|
-
const ret = wasm.
|
|
944
|
+
polygon_offsets_ptr() {
|
|
945
|
+
const ret = wasm.wasmpolygonresult_polygon_offsets_ptr(this.__wbg_ptr);
|
|
1152
946
|
return ret >>> 0;
|
|
1153
947
|
}
|
|
948
|
+
/**
|
|
949
|
+
* @returns {any}
|
|
950
|
+
*/
|
|
951
|
+
get provenance() {
|
|
952
|
+
const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
953
|
+
return ret;
|
|
954
|
+
}
|
|
1154
955
|
/**
|
|
1155
956
|
* @returns {number}
|
|
1156
957
|
*/
|
|
1157
|
-
|
|
1158
|
-
const ret = wasm.
|
|
958
|
+
ring_offsets_len() {
|
|
959
|
+
const ret = wasm.wasmpolygonresult_ring_offsets_len(this.__wbg_ptr);
|
|
1159
960
|
return ret >>> 0;
|
|
1160
961
|
}
|
|
1161
962
|
/**
|
|
1162
963
|
* @returns {number}
|
|
1163
964
|
*/
|
|
1164
|
-
|
|
1165
|
-
const ret = wasm.
|
|
965
|
+
ring_offsets_ptr() {
|
|
966
|
+
const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
|
|
1166
967
|
return ret >>> 0;
|
|
1167
968
|
}
|
|
1168
969
|
/**
|
|
@@ -1205,6 +1006,11 @@ function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygo
|
|
|
1205
1006
|
}
|
|
1206
1007
|
|
|
1207
1008
|
/**
|
|
1009
|
+
* Polygonizes an Arrow IPC stream containing a GeoArrow LineString array.
|
|
1010
|
+
*
|
|
1011
|
+
* This zero-copy path avoids JSON serialization overhead and returns a binary
|
|
1012
|
+
* Arrow IPC stream containing a GeoArrow Polygon array. Requires the options
|
|
1013
|
+
* to be passed as a parsed JS object.
|
|
1208
1014
|
* @param {Uint8Array} ipc_bytes
|
|
1209
1015
|
* @param {any} options_val
|
|
1210
1016
|
* @returns {Uint8Array}
|
|
@@ -1222,6 +1028,11 @@ function polygonizeGeoArrowWithOptions(ipc_bytes, options_val) {
|
|
|
1222
1028
|
}
|
|
1223
1029
|
|
|
1224
1030
|
/**
|
|
1031
|
+
* Polygonizes a GeoJSON FeatureCollection using the canonical `PolygonizerOptions`.
|
|
1032
|
+
*
|
|
1033
|
+
* This is the primary entry point for JavaScript users. It accepts a JSON string
|
|
1034
|
+
* of options and returns a JSON string representing the result, including faces,
|
|
1035
|
+
* dangles, cut-lines, and (optionally) provenance/diagnostics.
|
|
1225
1036
|
* @param {string} geojson_str
|
|
1226
1037
|
* @param {any} options_val
|
|
1227
1038
|
* @returns {string}
|
|
@@ -1311,235 +1122,450 @@ function polygonize_geoarrow(ipc_bytes, node_input, snap_grid_size, extract_only
|
|
|
1311
1122
|
return v2;
|
|
1312
1123
|
}
|
|
1313
1124
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1125
|
+
function __wbg_get_imports() {
|
|
1126
|
+
const import0 = {
|
|
1127
|
+
__proto__: null,
|
|
1128
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
1129
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1130
|
+
return ret;
|
|
1131
|
+
},
|
|
1132
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
1133
|
+
const ret = String(arg1);
|
|
1134
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1135
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1136
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1137
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1138
|
+
},
|
|
1139
|
+
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
1140
|
+
const v = arg0;
|
|
1141
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1142
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1143
|
+
},
|
|
1144
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
1145
|
+
const ret = debugString(arg1);
|
|
1146
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1147
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1148
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1149
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1150
|
+
},
|
|
1151
|
+
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
1152
|
+
const ret = arg0 in arg1;
|
|
1153
|
+
return ret;
|
|
1154
|
+
},
|
|
1155
|
+
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
1156
|
+
const val = arg0;
|
|
1157
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1158
|
+
return ret;
|
|
1159
|
+
},
|
|
1160
|
+
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
1161
|
+
const ret = typeof(arg0) === 'string';
|
|
1162
|
+
return ret;
|
|
1163
|
+
},
|
|
1164
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
1165
|
+
const ret = arg0 === undefined;
|
|
1166
|
+
return ret;
|
|
1167
|
+
},
|
|
1168
|
+
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
1169
|
+
const ret = arg0 == arg1;
|
|
1170
|
+
return ret;
|
|
1171
|
+
},
|
|
1172
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
1173
|
+
const obj = arg1;
|
|
1174
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1175
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1176
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1177
|
+
},
|
|
1178
|
+
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
1179
|
+
const obj = arg1;
|
|
1180
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1181
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1182
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1183
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1184
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1185
|
+
},
|
|
1186
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
1187
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1188
|
+
},
|
|
1189
|
+
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
1190
|
+
const ret = Object.entries(arg0);
|
|
1191
|
+
return ret;
|
|
1192
|
+
},
|
|
1193
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
1194
|
+
let deferred0_0;
|
|
1195
|
+
let deferred0_1;
|
|
1319
1196
|
try {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1326
|
-
|
|
1327
|
-
} else {
|
|
1328
|
-
throw e;
|
|
1329
|
-
}
|
|
1197
|
+
deferred0_0 = arg0;
|
|
1198
|
+
deferred0_1 = arg1;
|
|
1199
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1200
|
+
} finally {
|
|
1201
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1330
1202
|
}
|
|
1331
|
-
}
|
|
1203
|
+
},
|
|
1204
|
+
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
1205
|
+
const ret = arg0[arg1 >>> 0];
|
|
1206
|
+
return ret;
|
|
1207
|
+
},
|
|
1208
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1209
|
+
const ret = arg0[arg1];
|
|
1210
|
+
return ret;
|
|
1211
|
+
},
|
|
1212
|
+
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
1213
|
+
let result;
|
|
1214
|
+
try {
|
|
1215
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1216
|
+
} catch (_) {
|
|
1217
|
+
result = false;
|
|
1218
|
+
}
|
|
1219
|
+
const ret = result;
|
|
1220
|
+
return ret;
|
|
1221
|
+
},
|
|
1222
|
+
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
1223
|
+
let result;
|
|
1224
|
+
try {
|
|
1225
|
+
result = arg0 instanceof Uint8Array;
|
|
1226
|
+
} catch (_) {
|
|
1227
|
+
result = false;
|
|
1228
|
+
}
|
|
1229
|
+
const ret = result;
|
|
1230
|
+
return ret;
|
|
1231
|
+
},
|
|
1232
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
1233
|
+
const ret = arg0.length;
|
|
1234
|
+
return ret;
|
|
1235
|
+
},
|
|
1236
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
1237
|
+
const ret = arg0.length;
|
|
1238
|
+
return ret;
|
|
1239
|
+
},
|
|
1240
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
1241
|
+
const ret = new Error();
|
|
1242
|
+
return ret;
|
|
1243
|
+
},
|
|
1244
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
1245
|
+
const ret = new Uint8Array(arg0);
|
|
1246
|
+
return ret;
|
|
1247
|
+
},
|
|
1248
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
1249
|
+
const ret = new Array();
|
|
1250
|
+
return ret;
|
|
1251
|
+
},
|
|
1252
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
1253
|
+
const ret = new Object();
|
|
1254
|
+
return ret;
|
|
1255
|
+
},
|
|
1256
|
+
__wbg_polygonizerwasmerror_new: function(arg0) {
|
|
1257
|
+
const ret = PolygonizerWasmError.__wrap(arg0);
|
|
1258
|
+
return ret;
|
|
1259
|
+
},
|
|
1260
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
1261
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1262
|
+
},
|
|
1263
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
1264
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1265
|
+
},
|
|
1266
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1267
|
+
arg0[arg1] = arg2;
|
|
1268
|
+
},
|
|
1269
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
1270
|
+
const ret = arg1.stack;
|
|
1271
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1272
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1273
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1274
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1275
|
+
},
|
|
1276
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
1277
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1278
|
+
const ret = arg0;
|
|
1279
|
+
return ret;
|
|
1280
|
+
},
|
|
1281
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1282
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1283
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1284
|
+
return ret;
|
|
1285
|
+
},
|
|
1286
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
1287
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1288
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1289
|
+
return ret;
|
|
1290
|
+
},
|
|
1291
|
+
__wbindgen_init_externref_table: function() {
|
|
1292
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1293
|
+
const offset = table.grow(4);
|
|
1294
|
+
table.set(0, undefined);
|
|
1295
|
+
table.set(offset + 0, undefined);
|
|
1296
|
+
table.set(offset + 1, null);
|
|
1297
|
+
table.set(offset + 2, true);
|
|
1298
|
+
table.set(offset + 3, false);
|
|
1299
|
+
},
|
|
1300
|
+
};
|
|
1301
|
+
return {
|
|
1302
|
+
__proto__: null,
|
|
1303
|
+
"./geo_polygonize_bg.js": import0,
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1332
1306
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1307
|
+
const PolygonizerWasmErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1308
|
+
? { register: () => {}, unregister: () => {} }
|
|
1309
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
|
|
1310
|
+
const WasmPolygonResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1311
|
+
? { register: () => {}, unregister: () => {} }
|
|
1312
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
|
|
1337
1313
|
|
|
1338
|
-
|
|
1339
|
-
|
|
1314
|
+
function debugString(val) {
|
|
1315
|
+
// primitive types
|
|
1316
|
+
const type = typeof val;
|
|
1317
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1318
|
+
return `${val}`;
|
|
1319
|
+
}
|
|
1320
|
+
if (type == 'string') {
|
|
1321
|
+
return `"${val}"`;
|
|
1322
|
+
}
|
|
1323
|
+
if (type == 'symbol') {
|
|
1324
|
+
const description = val.description;
|
|
1325
|
+
if (description == null) {
|
|
1326
|
+
return 'Symbol';
|
|
1340
1327
|
} else {
|
|
1341
|
-
return
|
|
1328
|
+
return `Symbol(${description})`;
|
|
1342
1329
|
}
|
|
1343
1330
|
}
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1351
|
-
return ret;
|
|
1352
|
-
};
|
|
1353
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1354
|
-
const ret = String(arg1);
|
|
1355
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1356
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1357
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1358
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1359
|
-
};
|
|
1360
|
-
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
1361
|
-
const v = arg0;
|
|
1362
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1363
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1364
|
-
};
|
|
1365
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
1366
|
-
const ret = debugString(arg1);
|
|
1367
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1368
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1369
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1370
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1371
|
-
};
|
|
1372
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
1373
|
-
const ret = arg0 in arg1;
|
|
1374
|
-
return ret;
|
|
1375
|
-
};
|
|
1376
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
1377
|
-
const val = arg0;
|
|
1378
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
1379
|
-
return ret;
|
|
1380
|
-
};
|
|
1381
|
-
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
1382
|
-
const ret = typeof(arg0) === 'string';
|
|
1383
|
-
return ret;
|
|
1384
|
-
};
|
|
1385
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
1386
|
-
const ret = arg0 === undefined;
|
|
1387
|
-
return ret;
|
|
1388
|
-
};
|
|
1389
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
1390
|
-
const ret = arg0 == arg1;
|
|
1391
|
-
return ret;
|
|
1392
|
-
};
|
|
1393
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
1394
|
-
const obj = arg1;
|
|
1395
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1396
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1397
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1398
|
-
};
|
|
1399
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
1400
|
-
const obj = arg1;
|
|
1401
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1402
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1403
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1404
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1405
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1406
|
-
};
|
|
1407
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
1408
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1409
|
-
};
|
|
1410
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
1411
|
-
const ret = Object.entries(arg0);
|
|
1412
|
-
return ret;
|
|
1413
|
-
};
|
|
1414
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1415
|
-
let deferred0_0;
|
|
1416
|
-
let deferred0_1;
|
|
1417
|
-
try {
|
|
1418
|
-
deferred0_0 = arg0;
|
|
1419
|
-
deferred0_1 = arg1;
|
|
1420
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1421
|
-
} finally {
|
|
1422
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1331
|
+
if (type == 'function') {
|
|
1332
|
+
const name = val.name;
|
|
1333
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1334
|
+
return `Function(${name})`;
|
|
1335
|
+
} else {
|
|
1336
|
+
return 'Function';
|
|
1423
1337
|
}
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
return ret;
|
|
1432
|
-
};
|
|
1433
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
1434
|
-
let result;
|
|
1435
|
-
try {
|
|
1436
|
-
result = arg0 instanceof ArrayBuffer;
|
|
1437
|
-
} catch (_) {
|
|
1438
|
-
result = false;
|
|
1338
|
+
}
|
|
1339
|
+
// objects
|
|
1340
|
+
if (Array.isArray(val)) {
|
|
1341
|
+
const length = val.length;
|
|
1342
|
+
let debug = '[';
|
|
1343
|
+
if (length > 0) {
|
|
1344
|
+
debug += debugString(val[0]);
|
|
1439
1345
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1346
|
+
for(let i = 1; i < length; i++) {
|
|
1347
|
+
debug += ', ' + debugString(val[i]);
|
|
1348
|
+
}
|
|
1349
|
+
debug += ']';
|
|
1350
|
+
return debug;
|
|
1351
|
+
}
|
|
1352
|
+
// Test for built-in
|
|
1353
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1354
|
+
let className;
|
|
1355
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1356
|
+
className = builtInMatches[1];
|
|
1357
|
+
} else {
|
|
1358
|
+
// Failed to match the standard '[object ClassName]'
|
|
1359
|
+
return toString.call(val);
|
|
1360
|
+
}
|
|
1361
|
+
if (className == 'Object') {
|
|
1362
|
+
// we're a user defined class or Object
|
|
1363
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1364
|
+
// easier than looping through ownProperties of `val`.
|
|
1445
1365
|
try {
|
|
1446
|
-
|
|
1366
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1447
1367
|
} catch (_) {
|
|
1448
|
-
|
|
1368
|
+
return 'Object';
|
|
1449
1369
|
}
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
return ret;
|
|
1472
|
-
};
|
|
1473
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
1474
|
-
const ret = new Error();
|
|
1475
|
-
return ret;
|
|
1476
|
-
};
|
|
1477
|
-
imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
|
|
1478
|
-
const ret = PolygonizerWasmError.__wrap(arg0);
|
|
1479
|
-
return ret;
|
|
1480
|
-
};
|
|
1481
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
1482
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1483
|
-
};
|
|
1484
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1485
|
-
arg0[arg1] = arg2;
|
|
1486
|
-
};
|
|
1487
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
1488
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1489
|
-
};
|
|
1490
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1491
|
-
const ret = arg1.stack;
|
|
1492
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1493
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1494
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1495
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1496
|
-
};
|
|
1497
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1498
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1499
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1500
|
-
return ret;
|
|
1501
|
-
};
|
|
1502
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1503
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
1504
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1505
|
-
return ret;
|
|
1506
|
-
};
|
|
1507
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1508
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
1509
|
-
const ret = arg0;
|
|
1510
|
-
return ret;
|
|
1511
|
-
};
|
|
1512
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1513
|
-
const table = wasm.__wbindgen_externrefs;
|
|
1514
|
-
const offset = table.grow(4);
|
|
1515
|
-
table.set(0, undefined);
|
|
1516
|
-
table.set(offset + 0, undefined);
|
|
1517
|
-
table.set(offset + 1, null);
|
|
1518
|
-
table.set(offset + 2, true);
|
|
1519
|
-
table.set(offset + 3, false);
|
|
1520
|
-
};
|
|
1370
|
+
}
|
|
1371
|
+
// errors
|
|
1372
|
+
if (val instanceof Error) {
|
|
1373
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1374
|
+
}
|
|
1375
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1376
|
+
return className;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1380
|
+
ptr = ptr >>> 0;
|
|
1381
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
let cachedDataViewMemory0 = null;
|
|
1385
|
+
function getDataViewMemory0() {
|
|
1386
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1387
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1388
|
+
}
|
|
1389
|
+
return cachedDataViewMemory0;
|
|
1390
|
+
}
|
|
1521
1391
|
|
|
1522
|
-
|
|
1392
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
1393
|
+
function getFloat64ArrayMemory0() {
|
|
1394
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
1395
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
1396
|
+
}
|
|
1397
|
+
return cachedFloat64ArrayMemory0;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
function getStringFromWasm0(ptr, len) {
|
|
1401
|
+
ptr = ptr >>> 0;
|
|
1402
|
+
return decodeText(ptr, len);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1406
|
+
function getUint32ArrayMemory0() {
|
|
1407
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1408
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1409
|
+
}
|
|
1410
|
+
return cachedUint32ArrayMemory0;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1414
|
+
function getUint8ArrayMemory0() {
|
|
1415
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1416
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1417
|
+
}
|
|
1418
|
+
return cachedUint8ArrayMemory0;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
function isLikeNone(x) {
|
|
1422
|
+
return x === undefined || x === null;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1426
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1427
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1428
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1429
|
+
return ptr;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1433
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1434
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1435
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1436
|
+
return ptr;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
1440
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
1441
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
1442
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1443
|
+
return ptr;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1447
|
+
if (realloc === undefined) {
|
|
1448
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1449
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1450
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1451
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1452
|
+
return ptr;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
let len = arg.length;
|
|
1456
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1457
|
+
|
|
1458
|
+
const mem = getUint8ArrayMemory0();
|
|
1459
|
+
|
|
1460
|
+
let offset = 0;
|
|
1461
|
+
|
|
1462
|
+
for (; offset < len; offset++) {
|
|
1463
|
+
const code = arg.charCodeAt(offset);
|
|
1464
|
+
if (code > 0x7F) break;
|
|
1465
|
+
mem[ptr + offset] = code;
|
|
1466
|
+
}
|
|
1467
|
+
if (offset !== len) {
|
|
1468
|
+
if (offset !== 0) {
|
|
1469
|
+
arg = arg.slice(offset);
|
|
1470
|
+
}
|
|
1471
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1472
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1473
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1474
|
+
|
|
1475
|
+
offset += ret.written;
|
|
1476
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
WASM_VECTOR_LEN = offset;
|
|
1480
|
+
return ptr;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
function takeFromExternrefTable0(idx) {
|
|
1484
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1485
|
+
wasm.__externref_table_dealloc(idx);
|
|
1486
|
+
return value;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1490
|
+
cachedTextDecoder.decode();
|
|
1491
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1492
|
+
let numBytesDecoded = 0;
|
|
1493
|
+
function decodeText(ptr, len) {
|
|
1494
|
+
numBytesDecoded += len;
|
|
1495
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1496
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1497
|
+
cachedTextDecoder.decode();
|
|
1498
|
+
numBytesDecoded = len;
|
|
1499
|
+
}
|
|
1500
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1504
|
+
|
|
1505
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1506
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1507
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1508
|
+
view.set(buf);
|
|
1509
|
+
return {
|
|
1510
|
+
read: arg.length,
|
|
1511
|
+
written: buf.length
|
|
1512
|
+
};
|
|
1513
|
+
};
|
|
1523
1514
|
}
|
|
1524
1515
|
|
|
1516
|
+
let WASM_VECTOR_LEN = 0;
|
|
1517
|
+
|
|
1518
|
+
let wasm;
|
|
1525
1519
|
function __wbg_finalize_init(instance, module) {
|
|
1526
1520
|
wasm = instance.exports;
|
|
1527
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
1528
1521
|
cachedDataViewMemory0 = null;
|
|
1529
1522
|
cachedFloat64ArrayMemory0 = null;
|
|
1530
1523
|
cachedUint32ArrayMemory0 = null;
|
|
1531
1524
|
cachedUint8ArrayMemory0 = null;
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
1525
|
wasm.__wbindgen_start();
|
|
1535
1526
|
return wasm;
|
|
1536
1527
|
}
|
|
1537
1528
|
|
|
1529
|
+
async function __wbg_load(module, imports) {
|
|
1530
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1531
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1532
|
+
try {
|
|
1533
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1534
|
+
} catch (e) {
|
|
1535
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1536
|
+
|
|
1537
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1538
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1539
|
+
|
|
1540
|
+
} else { throw e; }
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
const bytes = await module.arrayBuffer();
|
|
1545
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1546
|
+
} else {
|
|
1547
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1548
|
+
|
|
1549
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1550
|
+
return { instance, module };
|
|
1551
|
+
} else {
|
|
1552
|
+
return instance;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
function expectedResponseType(type) {
|
|
1557
|
+
switch (type) {
|
|
1558
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1559
|
+
}
|
|
1560
|
+
return false;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1538
1564
|
function initSync(module) {
|
|
1539
1565
|
if (wasm !== undefined) return wasm;
|
|
1540
1566
|
|
|
1541
1567
|
|
|
1542
|
-
if (
|
|
1568
|
+
if (module !== undefined) {
|
|
1543
1569
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1544
1570
|
({module} = module);
|
|
1545
1571
|
} else {
|
|
@@ -1552,14 +1578,14 @@ function initSync(module) {
|
|
|
1552
1578
|
module = new WebAssembly.Module(module);
|
|
1553
1579
|
}
|
|
1554
1580
|
const instance = new WebAssembly.Instance(module, imports);
|
|
1555
|
-
return __wbg_finalize_init(instance
|
|
1581
|
+
return __wbg_finalize_init(instance);
|
|
1556
1582
|
}
|
|
1557
1583
|
|
|
1558
1584
|
async function __wbg_init(module_or_path) {
|
|
1559
1585
|
if (wasm !== undefined) return wasm;
|
|
1560
1586
|
|
|
1561
1587
|
|
|
1562
|
-
if (
|
|
1588
|
+
if (module_or_path !== undefined) {
|
|
1563
1589
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1564
1590
|
({module_or_path} = module_or_path);
|
|
1565
1591
|
} else {
|
|
@@ -1567,7 +1593,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1567
1593
|
}
|
|
1568
1594
|
}
|
|
1569
1595
|
|
|
1570
|
-
if (
|
|
1596
|
+
if (module_or_path === undefined) {
|
|
1571
1597
|
module_or_path = new URL('geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
1572
1598
|
}
|
|
1573
1599
|
const imports = __wbg_get_imports();
|
|
@@ -1578,7 +1604,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1578
1604
|
|
|
1579
1605
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1580
1606
|
|
|
1581
|
-
return __wbg_finalize_init(instance
|
|
1607
|
+
return __wbg_finalize_init(instance);
|
|
1582
1608
|
}
|
|
1583
1609
|
|
|
1584
1610
|
var simdExports = /*#__PURE__*/Object.freeze({
|