geo-polygonize 0.23.0 → 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.
@@ -86,7 +86,7 @@ async function startWorkers(module, memory, builder) {
86
86
  //
87
87
  // The only way to work around that is to have side effect code
88
88
  // in an entry point such as Worker file itself.
89
- const worker = new Worker(new URL('./workerHelpers.js', import.meta.url), {
89
+ const worker = new Worker(import.meta.resolve('./workerHelpers.js'), {
90
90
  type: 'module'
91
91
  });
92
92
  worker.postMessage(workerInit);
@@ -97,238 +97,7 @@ async function startWorkers(module, memory, builder) {
97
97
  builder.build();
98
98
  }
99
99
 
100
- let wasm;
101
-
102
- function addToExternrefTable0(obj) {
103
- const idx = wasm.__externref_table_alloc();
104
- wasm.__wbindgen_externrefs.set(idx, obj);
105
- return idx;
106
- }
107
-
108
- function debugString(val) {
109
- // primitive types
110
- const type = typeof val;
111
- if (type == 'number' || type == 'boolean' || val == null) {
112
- return `${val}`;
113
- }
114
- if (type == 'string') {
115
- return `"${val}"`;
116
- }
117
- if (type == 'symbol') {
118
- const description = val.description;
119
- if (description == null) {
120
- return 'Symbol';
121
- } else {
122
- return `Symbol(${description})`;
123
- }
124
- }
125
- if (type == 'function') {
126
- const name = val.name;
127
- if (typeof name == 'string' && name.length > 0) {
128
- return `Function(${name})`;
129
- } else {
130
- return 'Function';
131
- }
132
- }
133
- // objects
134
- if (Array.isArray(val)) {
135
- const length = val.length;
136
- let debug = '[';
137
- if (length > 0) {
138
- debug += debugString(val[0]);
139
- }
140
- for(let i = 1; i < length; i++) {
141
- debug += ', ' + debugString(val[i]);
142
- }
143
- debug += ']';
144
- return debug;
145
- }
146
- // Test for built-in
147
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
148
- let className;
149
- if (builtInMatches && builtInMatches.length > 1) {
150
- className = builtInMatches[1];
151
- } else {
152
- // Failed to match the standard '[object ClassName]'
153
- return toString.call(val);
154
- }
155
- if (className == 'Object') {
156
- // we're a user defined class or Object
157
- // JSON.stringify avoids problems with cycles, and is generally much
158
- // easier than looping through ownProperties of `val`.
159
- try {
160
- return 'Object(' + JSON.stringify(val) + ')';
161
- } catch (_) {
162
- return 'Object';
163
- }
164
- }
165
- // errors
166
- if (val instanceof Error) {
167
- return `${val.name}: ${val.message}\n${val.stack}`;
168
- }
169
- // TODO we could test for more things here, like `Set`s and `Map`s.
170
- return className;
171
- }
172
-
173
- function getArrayU8FromWasm0(ptr, len) {
174
- ptr = ptr >>> 0;
175
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
176
- }
177
-
178
- let cachedDataViewMemory0 = null;
179
- function getDataViewMemory0() {
180
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
181
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
182
- }
183
- return cachedDataViewMemory0;
184
- }
185
-
186
- let cachedFloat64ArrayMemory0 = null;
187
- function getFloat64ArrayMemory0() {
188
- if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
189
- cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
190
- }
191
- return cachedFloat64ArrayMemory0;
192
- }
193
-
194
- function getStringFromWasm0(ptr, len) {
195
- ptr = ptr >>> 0;
196
- return decodeText(ptr, len);
197
- }
198
-
199
- let cachedUint32ArrayMemory0 = null;
200
- function getUint32ArrayMemory0() {
201
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
202
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
203
- }
204
- return cachedUint32ArrayMemory0;
205
- }
206
-
207
- let cachedUint8ArrayMemory0 = null;
208
- function getUint8ArrayMemory0() {
209
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
210
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
211
- }
212
- return cachedUint8ArrayMemory0;
213
- }
214
-
215
- function handleError(f, args) {
216
- try {
217
- return f.apply(this, args);
218
- } catch (e) {
219
- const idx = addToExternrefTable0(e);
220
- wasm.__wbindgen_exn_store(idx);
221
- }
222
- }
223
-
224
- function isLikeNone(x) {
225
- return x === undefined || x === null;
226
- }
227
-
228
- function passArray32ToWasm0(arg, malloc) {
229
- const ptr = malloc(arg.length * 4, 4) >>> 0;
230
- getUint32ArrayMemory0().set(arg, ptr / 4);
231
- WASM_VECTOR_LEN = arg.length;
232
- return ptr;
233
- }
234
-
235
- function passArray8ToWasm0(arg, malloc) {
236
- const ptr = malloc(arg.length * 1, 1) >>> 0;
237
- getUint8ArrayMemory0().set(arg, ptr / 1);
238
- WASM_VECTOR_LEN = arg.length;
239
- return ptr;
240
- }
241
-
242
- function passArrayF64ToWasm0(arg, malloc) {
243
- const ptr = malloc(arg.length * 8, 8) >>> 0;
244
- getFloat64ArrayMemory0().set(arg, ptr / 8);
245
- WASM_VECTOR_LEN = arg.length;
246
- return ptr;
247
- }
248
-
249
- function passStringToWasm0(arg, malloc, realloc) {
250
- if (realloc === undefined) {
251
- const buf = cachedTextEncoder.encode(arg);
252
- const ptr = malloc(buf.length, 1) >>> 0;
253
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
254
- WASM_VECTOR_LEN = buf.length;
255
- return ptr;
256
- }
257
-
258
- let len = arg.length;
259
- let ptr = malloc(len, 1) >>> 0;
260
-
261
- const mem = getUint8ArrayMemory0();
262
-
263
- let offset = 0;
264
-
265
- for (; offset < len; offset++) {
266
- const code = arg.charCodeAt(offset);
267
- if (code > 0x7F) break;
268
- mem[ptr + offset] = code;
269
- }
270
- if (offset !== len) {
271
- if (offset !== 0) {
272
- arg = arg.slice(offset);
273
- }
274
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
275
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
276
- const ret = cachedTextEncoder.encodeInto(arg, view);
277
-
278
- offset += ret.written;
279
- ptr = realloc(ptr, len, offset, 1) >>> 0;
280
- }
281
-
282
- WASM_VECTOR_LEN = offset;
283
- return ptr;
284
- }
285
-
286
- function takeFromExternrefTable0(idx) {
287
- const value = wasm.__wbindgen_externrefs.get(idx);
288
- wasm.__externref_table_dealloc(idx);
289
- return value;
290
- }
291
-
292
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
293
- cachedTextDecoder.decode();
294
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
295
- let numBytesDecoded = 0;
296
- function decodeText(ptr, len) {
297
- numBytesDecoded += len;
298
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
299
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
300
- cachedTextDecoder.decode();
301
- numBytesDecoded = len;
302
- }
303
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
304
- }
305
-
306
- const cachedTextEncoder = new TextEncoder();
307
-
308
- if (!('encodeInto' in cachedTextEncoder)) {
309
- cachedTextEncoder.encodeInto = function (arg, view) {
310
- const buf = cachedTextEncoder.encode(arg);
311
- view.set(buf);
312
- return {
313
- read: arg.length,
314
- written: buf.length
315
- };
316
- };
317
- }
318
-
319
- let WASM_VECTOR_LEN = 0;
320
-
321
- const PolygonizerWasmErrorFinalization = (typeof FinalizationRegistry === 'undefined')
322
- ? { register: () => {}, unregister: () => {} }
323
- : new FinalizationRegistry(ptr => wasm.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
324
-
325
- const WasmPolygonResultFinalization = (typeof FinalizationRegistry === 'undefined')
326
- ? { register: () => {}, unregister: () => {} }
327
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
328
-
329
- const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
330
- ? { register: () => {}, unregister: () => {} }
331
- : new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
100
+ /* @ts-self-types="./geo_polygonize.d.ts" */
332
101
 
333
102
  class PolygonizerWasmError {
334
103
  static __wrap(ptr) {
@@ -348,28 +117,14 @@ class PolygonizerWasmError {
348
117
  const ptr = this.__destroy_into_raw();
349
118
  wasm.__wbg_polygonizerwasmerror_free(ptr, 0);
350
119
  }
351
- /**
352
- * @param {string} name
353
- * @param {string} message
354
- */
355
- constructor(name, message) {
356
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
357
- const len0 = WASM_VECTOR_LEN;
358
- const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
359
- const len1 = WASM_VECTOR_LEN;
360
- const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
361
- this.__wbg_ptr = ret >>> 0;
362
- PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
363
- return this;
364
- }
365
120
  /**
366
121
  * @returns {string}
367
122
  */
368
- get name() {
123
+ get message() {
369
124
  let deferred1_0;
370
125
  let deferred1_1;
371
126
  try {
372
- const ret = wasm.polygonizerwasmerror_name(this.__wbg_ptr);
127
+ const ret = wasm.polygonizerwasmerror_message(this.__wbg_ptr);
373
128
  deferred1_0 = ret[0];
374
129
  deferred1_1 = ret[1];
375
130
  return getStringFromWasm0(ret[0], ret[1]);
@@ -380,11 +135,11 @@ class PolygonizerWasmError {
380
135
  /**
381
136
  * @returns {string}
382
137
  */
383
- get message() {
138
+ get name() {
384
139
  let deferred1_0;
385
140
  let deferred1_1;
386
141
  try {
387
- const ret = wasm.polygonizerwasmerror_message(this.__wbg_ptr);
142
+ const ret = wasm.polygonizerwasmerror_name(this.__wbg_ptr);
388
143
  deferred1_0 = ret[0];
389
144
  deferred1_1 = ret[1];
390
145
  return getStringFromWasm0(ret[0], ret[1]);
@@ -392,14 +147,28 @@ class PolygonizerWasmError {
392
147
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
393
148
  }
394
149
  }
395
- }
396
- if (Symbol.dispose) PolygonizerWasmError.prototype[Symbol.dispose] = PolygonizerWasmError.prototype.free;
397
-
398
- class WasmPolygonResult {
399
- static __wrap(ptr) {
400
- ptr = ptr >>> 0;
401
- const obj = Object.create(WasmPolygonResult.prototype);
402
- obj.__wbg_ptr = ptr;
150
+ /**
151
+ * @param {string} name
152
+ * @param {string} message
153
+ */
154
+ constructor(name, message) {
155
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
156
+ const len0 = WASM_VECTOR_LEN;
157
+ const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
158
+ const len1 = WASM_VECTOR_LEN;
159
+ const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
160
+ this.__wbg_ptr = ret >>> 0;
161
+ PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
162
+ return this;
163
+ }
164
+ }
165
+ if (Symbol.dispose) PolygonizerWasmError.prototype[Symbol.dispose] = PolygonizerWasmError.prototype.free;
166
+
167
+ class WasmPolygonResult {
168
+ static __wrap(ptr) {
169
+ ptr = ptr >>> 0;
170
+ const obj = Object.create(WasmPolygonResult.prototype);
171
+ obj.__wbg_ptr = ptr;
403
172
  WasmPolygonResultFinalization.register(obj, obj.__wbg_ptr, obj);
404
173
  return obj;
405
174
  }
@@ -427,13 +196,6 @@ class WasmPolygonResult {
427
196
  const ret = wasm.wasmpolygonresult_coords_ptr(this.__wbg_ptr);
428
197
  return ret >>> 0;
429
198
  }
430
- /**
431
- * @returns {any}
432
- */
433
- get provenance() {
434
- const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
435
- return ret;
436
- }
437
199
  /**
438
200
  * @returns {any}
439
201
  */
@@ -444,43 +206,50 @@ class WasmPolygonResult {
444
206
  /**
445
207
  * @returns {number}
446
208
  */
447
- ring_offsets_len() {
448
- const ret = wasm.wasmpolygonresult_ring_offsets_len(this.__wbg_ptr);
209
+ flat_line_ids_len() {
210
+ const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
449
211
  return ret >>> 0;
450
212
  }
451
213
  /**
452
214
  * @returns {number}
453
215
  */
454
- ring_offsets_ptr() {
455
- const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
216
+ flat_line_ids_ptr() {
217
+ const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
456
218
  return ret >>> 0;
457
219
  }
458
220
  /**
459
221
  * @returns {number}
460
222
  */
461
- flat_line_ids_len() {
462
- const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
223
+ polygon_offsets_len() {
224
+ const ret = wasm.wasmpolygonresult_polygon_offsets_len(this.__wbg_ptr);
463
225
  return ret >>> 0;
464
226
  }
465
227
  /**
466
228
  * @returns {number}
467
229
  */
468
- flat_line_ids_ptr() {
469
- const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
230
+ polygon_offsets_ptr() {
231
+ const ret = wasm.wasmpolygonresult_polygon_offsets_ptr(this.__wbg_ptr);
470
232
  return ret >>> 0;
471
233
  }
234
+ /**
235
+ * @returns {any}
236
+ */
237
+ get provenance() {
238
+ const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
239
+ return ret;
240
+ }
472
241
  /**
473
242
  * @returns {number}
474
243
  */
475
- polygon_offsets_len() {
476
- const ret = wasm.wasmpolygonresult_polygon_offsets_len(this.__wbg_ptr);
244
+ ring_offsets_len() {
245
+ const ret = wasm.wasmpolygonresult_ring_offsets_len(this.__wbg_ptr);
477
246
  return ret >>> 0;
478
247
  }
479
248
  /**
480
249
  * @returns {number}
481
250
  */
482
- polygon_offsets_ptr() {
483
- const ret = wasm.wasmpolygonresult_polygon_offsets_ptr(this.__wbg_ptr);
251
+ ring_offsets_ptr() {
252
+ const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
484
253
  return ret >>> 0;
485
254
  }
486
255
  /**
@@ -532,6 +301,11 @@ function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygo
532
301
  }
533
302
 
534
303
  /**
304
+ * Polygonizes an Arrow IPC stream containing a GeoArrow LineString array.
305
+ *
306
+ * This zero-copy path avoids JSON serialization overhead and returns a binary
307
+ * Arrow IPC stream containing a GeoArrow Polygon array. Requires the options
308
+ * to be passed as a parsed JS object.
535
309
  * @param {Uint8Array} ipc_bytes
536
310
  * @param {any} options_val
537
311
  * @returns {Uint8Array}
@@ -549,6 +323,11 @@ function polygonizeGeoArrowWithOptions(ipc_bytes, options_val) {
549
323
  }
550
324
 
551
325
  /**
326
+ * Polygonizes a GeoJSON FeatureCollection using the canonical `PolygonizerOptions`.
327
+ *
328
+ * This is the primary entry point for JavaScript users. It accepts a JSON string
329
+ * of options and returns a JSON string representing the result, including faces,
330
+ * dangles, cut-lines, and (optionally) provenance/diagnostics.
552
331
  * @param {string} geojson_str
553
332
  * @param {any} options_val
554
333
  * @returns {string}
@@ -656,6 +435,9 @@ class wbg_rayon_PoolBuilder {
656
435
  const ptr = this.__destroy_into_raw();
657
436
  wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
658
437
  }
438
+ build() {
439
+ wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
440
+ }
659
441
  /**
660
442
  * @returns {number}
661
443
  */
@@ -663,9 +445,6 @@ class wbg_rayon_PoolBuilder {
663
445
  const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
664
446
  return ret >>> 0;
665
447
  }
666
- build() {
667
- wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
668
- }
669
448
  /**
670
449
  * @returns {number}
671
450
  */
@@ -683,7 +462,457 @@ function wbg_rayon_start_worker(receiver) {
683
462
  wasm.wbg_rayon_start_worker(receiver);
684
463
  }
685
464
 
686
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
465
+ function __wbg_get_imports() {
466
+ const import0 = {
467
+ __proto__: null,
468
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
469
+ const ret = Error(getStringFromWasm0(arg0, arg1));
470
+ return ret;
471
+ },
472
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
473
+ const ret = String(arg1);
474
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
475
+ const len1 = WASM_VECTOR_LEN;
476
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
477
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
478
+ },
479
+ __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
480
+ const v = arg0;
481
+ const ret = typeof(v) === 'boolean' ? v : undefined;
482
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
483
+ },
484
+ __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
485
+ const ret = debugString(arg1);
486
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
+ const len1 = WASM_VECTOR_LEN;
488
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
489
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
490
+ },
491
+ __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
492
+ const ret = arg0 in arg1;
493
+ return ret;
494
+ },
495
+ __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
496
+ const val = arg0;
497
+ const ret = typeof(val) === 'object' && val !== null;
498
+ return ret;
499
+ },
500
+ __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
501
+ const ret = typeof(arg0) === 'string';
502
+ return ret;
503
+ },
504
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
505
+ const ret = arg0 === undefined;
506
+ return ret;
507
+ },
508
+ __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
509
+ const ret = arg0 == arg1;
510
+ return ret;
511
+ },
512
+ __wbg___wbindgen_memory_edb3f01e3930bbf6: function() {
513
+ const ret = wasm.memory;
514
+ return ret;
515
+ },
516
+ __wbg___wbindgen_module_bf945c07123bafe2: function() {
517
+ const ret = wasmModule;
518
+ return ret;
519
+ },
520
+ __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
521
+ const obj = arg1;
522
+ const ret = typeof(obj) === 'number' ? obj : undefined;
523
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
524
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
525
+ },
526
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
527
+ const obj = arg1;
528
+ const ret = typeof(obj) === 'string' ? obj : undefined;
529
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
530
+ var len1 = WASM_VECTOR_LEN;
531
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
532
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
533
+ },
534
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
535
+ throw new Error(getStringFromWasm0(arg0, arg1));
536
+ },
537
+ __wbg_entries_e8a20ff8c9757101: function(arg0) {
538
+ const ret = Object.entries(arg0);
539
+ return ret;
540
+ },
541
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
542
+ let deferred0_0;
543
+ let deferred0_1;
544
+ try {
545
+ deferred0_0 = arg0;
546
+ deferred0_1 = arg1;
547
+ console.error(getStringFromWasm0(arg0, arg1));
548
+ } finally {
549
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
550
+ }
551
+ },
552
+ __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
553
+ const ret = arg0[arg1 >>> 0];
554
+ return ret;
555
+ },
556
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
557
+ const ret = arg0[arg1];
558
+ return ret;
559
+ },
560
+ __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
561
+ let result;
562
+ try {
563
+ result = arg0 instanceof ArrayBuffer;
564
+ } catch (_) {
565
+ result = false;
566
+ }
567
+ const ret = result;
568
+ return ret;
569
+ },
570
+ __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
571
+ let result;
572
+ try {
573
+ result = arg0 instanceof Uint8Array;
574
+ } catch (_) {
575
+ result = false;
576
+ }
577
+ const ret = result;
578
+ return ret;
579
+ },
580
+ __wbg_instanceof_Window_23e677d2c6843922: function(arg0) {
581
+ let result;
582
+ try {
583
+ result = arg0 instanceof Window;
584
+ } catch (_) {
585
+ result = false;
586
+ }
587
+ const ret = result;
588
+ return ret;
589
+ },
590
+ __wbg_length_b3416cf66a5452c8: function(arg0) {
591
+ const ret = arg0.length;
592
+ return ret;
593
+ },
594
+ __wbg_length_ea16607d7b61445b: function(arg0) {
595
+ const ret = arg0.length;
596
+ return ret;
597
+ },
598
+ __wbg_new_227d7c05414eb861: function() {
599
+ const ret = new Error();
600
+ return ret;
601
+ },
602
+ __wbg_new_5f486cdf45a04d78: function(arg0) {
603
+ const ret = new Uint8Array(arg0);
604
+ return ret;
605
+ },
606
+ __wbg_new_a70fbab9066b301f: function() {
607
+ const ret = new Array();
608
+ return ret;
609
+ },
610
+ __wbg_new_ab79df5bd7c26067: function() {
611
+ const ret = new Object();
612
+ return ret;
613
+ },
614
+ __wbg_polygonizerwasmerror_new: function(arg0) {
615
+ const ret = PolygonizerWasmError.__wrap(arg0);
616
+ return ret;
617
+ },
618
+ __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
619
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
620
+ },
621
+ __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
622
+ arg0[arg1 >>> 0] = arg2;
623
+ },
624
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
625
+ arg0[arg1] = arg2;
626
+ },
627
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
628
+ const ret = arg1.stack;
629
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
630
+ const len1 = WASM_VECTOR_LEN;
631
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
632
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
633
+ },
634
+ __wbg_startWorkers_8b582d57e92bd2d4: function(arg0, arg1, arg2) {
635
+ const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
636
+ return ret;
637
+ },
638
+ __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
639
+ const ret = typeof global === 'undefined' ? null : global;
640
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
641
+ },
642
+ __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
643
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
644
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
645
+ },
646
+ __wbg_static_accessor_SELF_f207c857566db248: function() {
647
+ const ret = typeof self === 'undefined' ? null : self;
648
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
649
+ },
650
+ __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
651
+ const ret = typeof window === 'undefined' ? null : window;
652
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
653
+ },
654
+ __wbindgen_cast_0000000000000001: function(arg0) {
655
+ // Cast intrinsic for `F64 -> Externref`.
656
+ const ret = arg0;
657
+ return ret;
658
+ },
659
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
660
+ // Cast intrinsic for `Ref(String) -> Externref`.
661
+ const ret = getStringFromWasm0(arg0, arg1);
662
+ return ret;
663
+ },
664
+ __wbindgen_cast_0000000000000003: function(arg0) {
665
+ // Cast intrinsic for `U64 -> Externref`.
666
+ const ret = BigInt.asUintN(64, arg0);
667
+ return ret;
668
+ },
669
+ __wbindgen_init_externref_table: function() {
670
+ const table = wasm.__wbindgen_externrefs;
671
+ const offset = table.grow(4);
672
+ table.set(0, undefined);
673
+ table.set(offset + 0, undefined);
674
+ table.set(offset + 1, null);
675
+ table.set(offset + 2, true);
676
+ table.set(offset + 3, false);
677
+ },
678
+ };
679
+ return {
680
+ __proto__: null,
681
+ "./geo_polygonize_bg.js": import0,
682
+ };
683
+ }
684
+
685
+ const PolygonizerWasmErrorFinalization = (typeof FinalizationRegistry === 'undefined')
686
+ ? { register: () => {}, unregister: () => {} }
687
+ : new FinalizationRegistry(ptr => wasm.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
688
+ const WasmPolygonResultFinalization = (typeof FinalizationRegistry === 'undefined')
689
+ ? { register: () => {}, unregister: () => {} }
690
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
691
+ const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
692
+ ? { register: () => {}, unregister: () => {} }
693
+ : new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
694
+
695
+ function addToExternrefTable0(obj) {
696
+ const idx = wasm.__externref_table_alloc();
697
+ wasm.__wbindgen_externrefs.set(idx, obj);
698
+ return idx;
699
+ }
700
+
701
+ function debugString(val) {
702
+ // primitive types
703
+ const type = typeof val;
704
+ if (type == 'number' || type == 'boolean' || val == null) {
705
+ return `${val}`;
706
+ }
707
+ if (type == 'string') {
708
+ return `"${val}"`;
709
+ }
710
+ if (type == 'symbol') {
711
+ const description = val.description;
712
+ if (description == null) {
713
+ return 'Symbol';
714
+ } else {
715
+ return `Symbol(${description})`;
716
+ }
717
+ }
718
+ if (type == 'function') {
719
+ const name = val.name;
720
+ if (typeof name == 'string' && name.length > 0) {
721
+ return `Function(${name})`;
722
+ } else {
723
+ return 'Function';
724
+ }
725
+ }
726
+ // objects
727
+ if (Array.isArray(val)) {
728
+ const length = val.length;
729
+ let debug = '[';
730
+ if (length > 0) {
731
+ debug += debugString(val[0]);
732
+ }
733
+ for(let i = 1; i < length; i++) {
734
+ debug += ', ' + debugString(val[i]);
735
+ }
736
+ debug += ']';
737
+ return debug;
738
+ }
739
+ // Test for built-in
740
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
741
+ let className;
742
+ if (builtInMatches && builtInMatches.length > 1) {
743
+ className = builtInMatches[1];
744
+ } else {
745
+ // Failed to match the standard '[object ClassName]'
746
+ return toString.call(val);
747
+ }
748
+ if (className == 'Object') {
749
+ // we're a user defined class or Object
750
+ // JSON.stringify avoids problems with cycles, and is generally much
751
+ // easier than looping through ownProperties of `val`.
752
+ try {
753
+ return 'Object(' + JSON.stringify(val) + ')';
754
+ } catch (_) {
755
+ return 'Object';
756
+ }
757
+ }
758
+ // errors
759
+ if (val instanceof Error) {
760
+ return `${val.name}: ${val.message}\n${val.stack}`;
761
+ }
762
+ // TODO we could test for more things here, like `Set`s and `Map`s.
763
+ return className;
764
+ }
765
+
766
+ function getArrayU8FromWasm0(ptr, len) {
767
+ ptr = ptr >>> 0;
768
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
769
+ }
770
+
771
+ let cachedDataViewMemory0 = null;
772
+ function getDataViewMemory0() {
773
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
774
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
775
+ }
776
+ return cachedDataViewMemory0;
777
+ }
778
+
779
+ let cachedFloat64ArrayMemory0 = null;
780
+ function getFloat64ArrayMemory0() {
781
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
782
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
783
+ }
784
+ return cachedFloat64ArrayMemory0;
785
+ }
786
+
787
+ function getStringFromWasm0(ptr, len) {
788
+ ptr = ptr >>> 0;
789
+ return decodeText(ptr, len);
790
+ }
791
+
792
+ let cachedUint32ArrayMemory0 = null;
793
+ function getUint32ArrayMemory0() {
794
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
795
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
796
+ }
797
+ return cachedUint32ArrayMemory0;
798
+ }
799
+
800
+ let cachedUint8ArrayMemory0 = null;
801
+ function getUint8ArrayMemory0() {
802
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
803
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
804
+ }
805
+ return cachedUint8ArrayMemory0;
806
+ }
807
+
808
+ function isLikeNone(x) {
809
+ return x === undefined || x === null;
810
+ }
811
+
812
+ function passArray32ToWasm0(arg, malloc) {
813
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
814
+ getUint32ArrayMemory0().set(arg, ptr / 4);
815
+ WASM_VECTOR_LEN = arg.length;
816
+ return ptr;
817
+ }
818
+
819
+ function passArray8ToWasm0(arg, malloc) {
820
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
821
+ getUint8ArrayMemory0().set(arg, ptr / 1);
822
+ WASM_VECTOR_LEN = arg.length;
823
+ return ptr;
824
+ }
825
+
826
+ function passArrayF64ToWasm0(arg, malloc) {
827
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
828
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
829
+ WASM_VECTOR_LEN = arg.length;
830
+ return ptr;
831
+ }
832
+
833
+ function passStringToWasm0(arg, malloc, realloc) {
834
+ if (realloc === undefined) {
835
+ const buf = cachedTextEncoder.encode(arg);
836
+ const ptr = malloc(buf.length, 1) >>> 0;
837
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
838
+ WASM_VECTOR_LEN = buf.length;
839
+ return ptr;
840
+ }
841
+
842
+ let len = arg.length;
843
+ let ptr = malloc(len, 1) >>> 0;
844
+
845
+ const mem = getUint8ArrayMemory0();
846
+
847
+ let offset = 0;
848
+
849
+ for (; offset < len; offset++) {
850
+ const code = arg.charCodeAt(offset);
851
+ if (code > 0x7F) break;
852
+ mem[ptr + offset] = code;
853
+ }
854
+ if (offset !== len) {
855
+ if (offset !== 0) {
856
+ arg = arg.slice(offset);
857
+ }
858
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
859
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
860
+ const ret = cachedTextEncoder.encodeInto(arg, view);
861
+
862
+ offset += ret.written;
863
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
864
+ }
865
+
866
+ WASM_VECTOR_LEN = offset;
867
+ return ptr;
868
+ }
869
+
870
+ function takeFromExternrefTable0(idx) {
871
+ const value = wasm.__wbindgen_externrefs.get(idx);
872
+ wasm.__externref_table_dealloc(idx);
873
+ return value;
874
+ }
875
+
876
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
877
+ cachedTextDecoder.decode();
878
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
879
+ let numBytesDecoded = 0;
880
+ function decodeText(ptr, len) {
881
+ numBytesDecoded += len;
882
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
883
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
884
+ cachedTextDecoder.decode();
885
+ numBytesDecoded = len;
886
+ }
887
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
888
+ }
889
+
890
+ const cachedTextEncoder = new TextEncoder();
891
+
892
+ if (!('encodeInto' in cachedTextEncoder)) {
893
+ cachedTextEncoder.encodeInto = function (arg, view) {
894
+ const buf = cachedTextEncoder.encode(arg);
895
+ view.set(buf);
896
+ return {
897
+ read: arg.length,
898
+ written: buf.length
899
+ };
900
+ };
901
+ }
902
+
903
+ let WASM_VECTOR_LEN = 0;
904
+
905
+ let wasmModule, wasm;
906
+ function __wbg_finalize_init(instance, module) {
907
+ wasm = instance.exports;
908
+ wasmModule = module;
909
+ cachedDataViewMemory0 = null;
910
+ cachedFloat64ArrayMemory0 = null;
911
+ cachedUint32ArrayMemory0 = null;
912
+ cachedUint8ArrayMemory0 = null;
913
+ wasm.__wbindgen_start();
914
+ return wasm;
915
+ }
687
916
 
688
917
  async function __wbg_load(module, imports) {
689
918
  if (typeof Response === 'function' && module instanceof Response) {
@@ -691,14 +920,12 @@ async function __wbg_load(module, imports) {
691
920
  try {
692
921
  return await WebAssembly.instantiateStreaming(module, imports);
693
922
  } catch (e) {
694
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
923
+ const validResponse = module.ok && expectedResponseType(module.type);
695
924
 
696
925
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
697
926
  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);
698
927
 
699
- } else {
700
- throw e;
701
- }
928
+ } else { throw e; }
702
929
  }
703
930
  }
704
931
 
@@ -713,251 +940,20 @@ async function __wbg_load(module, imports) {
713
940
  return instance;
714
941
  }
715
942
  }
716
- }
717
943
 
718
- function __wbg_get_imports() {
719
- const imports = {};
720
- imports.wbg = {};
721
- imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
722
- const ret = Error(getStringFromWasm0(arg0, arg1));
723
- return ret;
724
- };
725
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
726
- const ret = String(arg1);
727
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
728
- const len1 = WASM_VECTOR_LEN;
729
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
730
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
731
- };
732
- imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
733
- const v = arg0;
734
- const ret = typeof(v) === 'boolean' ? v : undefined;
735
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
736
- };
737
- imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
738
- const ret = debugString(arg1);
739
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
740
- const len1 = WASM_VECTOR_LEN;
741
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
742
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
743
- };
744
- imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
745
- const ret = arg0 in arg1;
746
- return ret;
747
- };
748
- imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
749
- const val = arg0;
750
- const ret = typeof(val) === 'object' && val !== null;
751
- return ret;
752
- };
753
- imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
754
- const ret = typeof(arg0) === 'string';
755
- return ret;
756
- };
757
- imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
758
- const ret = arg0 === undefined;
759
- return ret;
760
- };
761
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
762
- const ret = arg0 == arg1;
763
- return ret;
764
- };
765
- imports.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
766
- const ret = wasm.memory;
767
- return ret;
768
- };
769
- imports.wbg.__wbg___wbindgen_module_967adef62ea6cbf8 = function() {
770
- const ret = __wbg_init.__wbindgen_wasm_module;
771
- return ret;
772
- };
773
- imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
774
- const obj = arg1;
775
- const ret = typeof(obj) === 'number' ? obj : undefined;
776
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
777
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
778
- };
779
- imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
780
- const obj = arg1;
781
- const ret = typeof(obj) === 'string' ? obj : undefined;
782
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
783
- var len1 = WASM_VECTOR_LEN;
784
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
785
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
786
- };
787
- imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
788
- throw new Error(getStringFromWasm0(arg0, arg1));
789
- };
790
- imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
791
- const ret = arg0.call(arg1);
792
- return ret;
793
- }, arguments) };
794
- imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
795
- const ret = Object.entries(arg0);
796
- return ret;
797
- };
798
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
799
- let deferred0_0;
800
- let deferred0_1;
801
- try {
802
- deferred0_0 = arg0;
803
- deferred0_1 = arg1;
804
- console.error(getStringFromWasm0(arg0, arg1));
805
- } finally {
806
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
807
- }
808
- };
809
- imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
810
- const ret = arg0[arg1 >>> 0];
811
- return ret;
812
- };
813
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
814
- const ret = arg0[arg1];
815
- return ret;
816
- };
817
- imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
818
- let result;
819
- try {
820
- result = arg0 instanceof ArrayBuffer;
821
- } catch (_) {
822
- result = false;
823
- }
824
- const ret = result;
825
- return ret;
826
- };
827
- imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
828
- let result;
829
- try {
830
- result = arg0 instanceof Uint8Array;
831
- } catch (_) {
832
- result = false;
833
- }
834
- const ret = result;
835
- return ret;
836
- };
837
- imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
838
- let result;
839
- try {
840
- result = arg0 instanceof Window;
841
- } catch (_) {
842
- result = false;
944
+ function expectedResponseType(type) {
945
+ switch (type) {
946
+ case 'basic': case 'cors': case 'default': return true;
843
947
  }
844
- const ret = result;
845
- return ret;
846
- };
847
- imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
848
- const ret = arg0.length;
849
- return ret;
850
- };
851
- imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
852
- const ret = arg0.length;
853
- return ret;
854
- };
855
- imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
856
- const ret = new Object();
857
- return ret;
858
- };
859
- imports.wbg.__wbg_new_25f239778d6112b9 = function() {
860
- const ret = new Array();
861
- return ret;
862
- };
863
- imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
864
- const ret = new Uint8Array(arg0);
865
- return ret;
866
- };
867
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
868
- const ret = new Error();
869
- return ret;
870
- };
871
- imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
872
- const ret = new Function(getStringFromWasm0(arg0, arg1));
873
- return ret;
874
- };
875
- imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
876
- const ret = PolygonizerWasmError.__wrap(arg0);
877
- return ret;
878
- };
879
- imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
880
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
881
- };
882
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
883
- arg0[arg1] = arg2;
884
- };
885
- imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
886
- arg0[arg1 >>> 0] = arg2;
887
- };
888
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
889
- const ret = arg1.stack;
890
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
891
- const len1 = WASM_VECTOR_LEN;
892
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
893
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
894
- };
895
- imports.wbg.__wbg_startWorkers_2ca11761e08ff5d5 = function(arg0, arg1, arg2) {
896
- const ret = startWorkers(arg0, arg1, wbg_rayon_PoolBuilder.__wrap(arg2));
897
- return ret;
898
- };
899
- imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
900
- const ret = typeof global === 'undefined' ? null : global;
901
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
902
- };
903
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
904
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
905
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
906
- };
907
- imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
908
- const ret = typeof self === 'undefined' ? null : self;
909
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
910
- };
911
- imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
912
- const ret = typeof window === 'undefined' ? null : window;
913
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
914
- };
915
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
916
- // Cast intrinsic for `Ref(String) -> Externref`.
917
- const ret = getStringFromWasm0(arg0, arg1);
918
- return ret;
919
- };
920
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
921
- // Cast intrinsic for `U64 -> Externref`.
922
- const ret = BigInt.asUintN(64, arg0);
923
- return ret;
924
- };
925
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
926
- // Cast intrinsic for `F64 -> Externref`.
927
- const ret = arg0;
928
- return ret;
929
- };
930
- imports.wbg.__wbindgen_init_externref_table = function() {
931
- const table = wasm.__wbindgen_externrefs;
932
- const offset = table.grow(4);
933
- table.set(0, undefined);
934
- table.set(offset + 0, undefined);
935
- table.set(offset + 1, null);
936
- table.set(offset + 2, true);
937
- table.set(offset + 3, false);
938
- };
939
-
940
- return imports;
941
- }
942
-
943
- function __wbg_finalize_init(instance, module) {
944
- wasm = instance.exports;
945
- __wbg_init.__wbindgen_wasm_module = module;
946
- cachedDataViewMemory0 = null;
947
- cachedFloat64ArrayMemory0 = null;
948
- cachedUint32ArrayMemory0 = null;
949
- cachedUint8ArrayMemory0 = null;
950
-
951
-
952
- wasm.__wbindgen_start();
953
- return wasm;
948
+ return false;
949
+ }
954
950
  }
955
951
 
956
952
  function initSync(module) {
957
953
  if (wasm !== undefined) return wasm;
958
954
 
959
955
 
960
- if (typeof module !== 'undefined') {
956
+ if (module !== undefined) {
961
957
  if (Object.getPrototypeOf(module) === Object.prototype) {
962
958
  ({module} = module);
963
959
  } else {
@@ -977,7 +973,7 @@ async function __wbg_init(module_or_path) {
977
973
  if (wasm !== undefined) return wasm;
978
974
 
979
975
 
980
- if (typeof module_or_path !== 'undefined') {
976
+ if (module_or_path !== undefined) {
981
977
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
982
978
  ({module_or_path} = module_or_path);
983
979
  } else {
@@ -985,7 +981,7 @@ async function __wbg_init(module_or_path) {
985
981
  }
986
982
  }
987
983
 
988
- if (typeof module_or_path === 'undefined') {
984
+ if (module_or_path === undefined) {
989
985
  module_or_path = new URL('geo_polygonize_bg.wasm', import.meta.url);
990
986
  }
991
987
  const imports = __wbg_get_imports();