@windborne/grapher 1.0.11 → 1.0.13

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.
@@ -1,24 +1,22 @@
1
- import * as wasm from './index_bg.wasm';
1
+ let wasm;
2
2
 
3
- const heap = new Array(32).fill(undefined);
3
+ let cachedUint8ArrayMemory0 = null;
4
4
 
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let WASM_VECTOR_LEN = 0;
10
-
11
- let cachegetUint8Memory0 = null;
12
- function getUint8Memory0() {
13
- if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
14
- cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
15
8
  }
16
- return cachegetUint8Memory0;
9
+ return cachedUint8ArrayMemory0;
17
10
  }
18
11
 
19
- const lTextEncoder = typeof TextEncoder === 'undefined' ? require('util').TextEncoder : TextEncoder;
12
+ function getArrayU8FromWasm0(ptr, len) {
13
+ ptr = ptr >>> 0;
14
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
15
+ }
20
16
 
21
- let cachedTextEncoder = new lTextEncoder('utf-8');
17
+ let WASM_VECTOR_LEN = 0;
18
+
19
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
22
20
 
23
21
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
24
22
  ? function (arg, view) {
@@ -37,16 +35,16 @@ function passStringToWasm0(arg, malloc, realloc) {
37
35
 
38
36
  if (realloc === undefined) {
39
37
  const buf = cachedTextEncoder.encode(arg);
40
- const ptr = malloc(buf.length);
41
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
38
+ const ptr = malloc(buf.length, 1) >>> 0;
39
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
42
40
  WASM_VECTOR_LEN = buf.length;
43
41
  return ptr;
44
42
  }
45
43
 
46
44
  let len = arg.length;
47
- let ptr = malloc(len);
45
+ let ptr = malloc(len, 1) >>> 0;
48
46
 
49
- const mem = getUint8Memory0();
47
+ const mem = getUint8ArrayMemory0();
50
48
 
51
49
  let offset = 0;
52
50
 
@@ -60,11 +58,12 @@ function passStringToWasm0(arg, malloc, realloc) {
60
58
  if (offset !== 0) {
61
59
  arg = arg.slice(offset);
62
60
  }
63
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
64
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
61
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
62
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
65
63
  const ret = encodeString(arg, view);
66
64
 
67
65
  offset += ret.written;
66
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
68
67
  }
69
68
 
70
69
  WASM_VECTOR_LEN = offset;
@@ -75,268 +74,324 @@ function isLikeNone(x) {
75
74
  return x === undefined || x === null;
76
75
  }
77
76
 
78
- let cachegetInt32Memory0 = null;
79
- function getInt32Memory0() {
80
- if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
81
- cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
82
- }
83
- return cachegetInt32Memory0;
84
- }
77
+ let cachedDataViewMemory0 = null;
85
78
 
86
- let heap_next = heap.length;
87
-
88
- function dropObject(idx) {
89
- if (idx < 36) return;
90
- heap[idx] = heap_next;
91
- heap_next = idx;
92
- }
93
-
94
- function takeObject(idx) {
95
- const ret = getObject(idx);
96
- dropObject(idx);
97
- return ret;
79
+ function getDataViewMemory0() {
80
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
81
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
82
+ }
83
+ return cachedDataViewMemory0;
98
84
  }
99
85
 
100
- const lTextDecoder = typeof TextDecoder === 'undefined' ? require('util').TextDecoder : TextDecoder;
86
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
101
87
 
102
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
103
-
104
- cachedTextDecoder.decode();
88
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
105
89
 
106
90
  function getStringFromWasm0(ptr, len) {
107
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
91
+ ptr = ptr >>> 0;
92
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
108
93
  }
109
94
 
110
- function addHeapObject(obj) {
111
- if (heap_next === heap.length) heap.push(heap.length + 1);
112
- const idx = heap_next;
113
- heap_next = heap[idx];
114
-
115
- heap[idx] = obj;
116
- return idx;
117
- }
95
+ let cachedFloat64ArrayMemory0 = null;
118
96
 
119
- let cachegetFloat64Memory0 = null;
120
- function getFloat64Memory0() {
121
- if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
122
- cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
97
+ function getFloat64ArrayMemory0() {
98
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
99
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
123
100
  }
124
- return cachegetFloat64Memory0;
101
+ return cachedFloat64ArrayMemory0;
125
102
  }
126
103
 
127
104
  function passArrayF64ToWasm0(arg, malloc) {
128
- const ptr = malloc(arg.length * 8);
129
- getFloat64Memory0().set(arg, ptr / 8);
105
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
106
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
130
107
  WASM_VECTOR_LEN = arg.length;
131
108
  return ptr;
132
109
  }
133
110
 
134
111
  function passArray8ToWasm0(arg, malloc) {
135
- const ptr = malloc(arg.length * 1);
136
- getUint8Memory0().set(arg, ptr / 1);
112
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
113
+ getUint8ArrayMemory0().set(arg, ptr / 1);
137
114
  WASM_VECTOR_LEN = arg.length;
138
115
  return ptr;
139
116
  }
140
-
141
- let stack_pointer = 32;
142
-
143
- function addBorrowedObject(obj) {
144
- if (stack_pointer == 1) throw new Error('out of js stack');
145
- heap[--stack_pointer] = obj;
146
- return stack_pointer;
147
- }
148
117
  /**
149
- * @param {number} length
150
- * @param {Float64Array} data
151
- * @param {Uint8Array} data_null_mask
152
- * @param {any} params
153
- * @param {Uint8Array} null_mask
154
- * @param {Float64Array} y_values
155
- * @param {Float64Array} min_y_values
156
- * @param {Float64Array} max_y_values
157
- */
118
+ * @param {number} length
119
+ * @param {Float64Array} data
120
+ * @param {Uint8Array} data_null_mask
121
+ * @param {any} params
122
+ * @param {Uint8Array} null_mask
123
+ * @param {Float64Array} y_values
124
+ * @param {Float64Array} min_y_values
125
+ * @param {Float64Array} max_y_values
126
+ */
158
127
  export function selected_space_to_render_space(length, data, data_null_mask, params, null_mask, y_values, min_y_values, max_y_values) {
159
- try {
160
- var ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
161
- var len0 = WASM_VECTOR_LEN;
162
- var ptr1 = passArray8ToWasm0(data_null_mask, wasm.__wbindgen_malloc);
163
- var len1 = WASM_VECTOR_LEN;
164
- var ptr2 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
165
- var len2 = WASM_VECTOR_LEN;
166
- var ptr3 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
167
- var len3 = WASM_VECTOR_LEN;
168
- var ptr4 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
169
- var len4 = WASM_VECTOR_LEN;
170
- var ptr5 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
171
- var len5 = WASM_VECTOR_LEN;
172
- wasm.selected_space_to_render_space(length, ptr0, len0, ptr1, len1, addBorrowedObject(params), ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
173
- } finally {
174
- heap[stack_pointer++] = undefined;
175
- null_mask.set(getUint8Memory0().subarray(ptr2 / 1, ptr2 / 1 + len2));
176
- wasm.__wbindgen_free(ptr2, len2 * 1);
177
- y_values.set(getFloat64Memory0().subarray(ptr3 / 8, ptr3 / 8 + len3));
178
- wasm.__wbindgen_free(ptr3, len3 * 8);
179
- min_y_values.set(getFloat64Memory0().subarray(ptr4 / 8, ptr4 / 8 + len4));
180
- wasm.__wbindgen_free(ptr4, len4 * 8);
181
- max_y_values.set(getFloat64Memory0().subarray(ptr5 / 8, ptr5 / 8 + len5));
182
- wasm.__wbindgen_free(ptr5, len5 * 8);
183
- }
128
+ const ptr0 = passArrayF64ToWasm0(data, wasm.__wbindgen_malloc);
129
+ const len0 = WASM_VECTOR_LEN;
130
+ const ptr1 = passArray8ToWasm0(data_null_mask, wasm.__wbindgen_malloc);
131
+ const len1 = WASM_VECTOR_LEN;
132
+ var ptr2 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
133
+ var len2 = WASM_VECTOR_LEN;
134
+ var ptr3 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
135
+ var len3 = WASM_VECTOR_LEN;
136
+ var ptr4 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
137
+ var len4 = WASM_VECTOR_LEN;
138
+ var ptr5 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
139
+ var len5 = WASM_VECTOR_LEN;
140
+ wasm.selected_space_to_render_space(length, ptr0, len0, ptr1, len1, params, ptr2, len2, null_mask, ptr3, len3, y_values, ptr4, len4, min_y_values, ptr5, len5, max_y_values);
184
141
  }
185
142
 
186
- let cachegetFloat32Memory0 = null;
187
- function getFloat32Memory0() {
188
- if (cachegetFloat32Memory0 === null || cachegetFloat32Memory0.buffer !== wasm.memory.buffer) {
189
- cachegetFloat32Memory0 = new Float32Array(wasm.memory.buffer);
143
+ let cachedFloat32ArrayMemory0 = null;
144
+
145
+ function getFloat32ArrayMemory0() {
146
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
147
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
190
148
  }
191
- return cachegetFloat32Memory0;
149
+ return cachedFloat32ArrayMemory0;
192
150
  }
193
151
 
194
152
  function passArrayF32ToWasm0(arg, malloc) {
195
- const ptr = malloc(arg.length * 4);
196
- getFloat32Memory0().set(arg, ptr / 4);
153
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
154
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
197
155
  WASM_VECTOR_LEN = arg.length;
198
156
  return ptr;
199
157
  }
200
158
 
201
- let cachegetUint32Memory0 = null;
202
- function getUint32Memory0() {
203
- if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) {
204
- cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer);
159
+ let cachedUint32ArrayMemory0 = null;
160
+
161
+ function getUint32ArrayMemory0() {
162
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
163
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
205
164
  }
206
- return cachegetUint32Memory0;
165
+ return cachedUint32ArrayMemory0;
207
166
  }
208
167
 
209
168
  function passArray32ToWasm0(arg, malloc) {
210
- const ptr = malloc(arg.length * 4);
211
- getUint32Memory0().set(arg, ptr / 4);
169
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
170
+ getUint32ArrayMemory0().set(arg, ptr / 4);
212
171
  WASM_VECTOR_LEN = arg.length;
213
172
  return ptr;
214
173
  }
215
174
  /**
216
- * @param {number} dpi_increase
217
- * @param {Uint8Array} null_mask
218
- * @param {Float64Array} y_values
219
- * @param {Float64Array} min_y_values
220
- * @param {Float64Array} max_y_values
221
- * @param {Float32Array} positions
222
- * @param {Float32Array} prev_positions
223
- * @param {Float32Array} vertices
224
- * @param {Uint32Array} indices
225
- * @param {boolean} dashed
226
- * @param {number} dash0
227
- * @param {number} dash1
228
- */
175
+ * @param {number} dpi_increase
176
+ * @param {Uint8Array} null_mask
177
+ * @param {Float64Array} y_values
178
+ * @param {Float64Array} min_y_values
179
+ * @param {Float64Array} max_y_values
180
+ * @param {Float32Array} positions
181
+ * @param {Float32Array} prev_positions
182
+ * @param {Float32Array} vertices
183
+ * @param {Uint32Array} indices
184
+ * @param {boolean} dashed
185
+ * @param {number} dash0
186
+ * @param {number} dash1
187
+ */
229
188
  export function extract_vertices(dpi_increase, null_mask, y_values, min_y_values, max_y_values, positions, prev_positions, vertices, indices, dashed, dash0, dash1) {
230
- try {
231
- var ptr0 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
232
- var len0 = WASM_VECTOR_LEN;
233
- var ptr1 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
234
- var len1 = WASM_VECTOR_LEN;
235
- var ptr2 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
236
- var len2 = WASM_VECTOR_LEN;
237
- var ptr3 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
238
- var len3 = WASM_VECTOR_LEN;
239
- var ptr4 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
240
- var len4 = WASM_VECTOR_LEN;
241
- var ptr5 = passArrayF32ToWasm0(prev_positions, wasm.__wbindgen_malloc);
242
- var len5 = WASM_VECTOR_LEN;
243
- var ptr6 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_malloc);
244
- var len6 = WASM_VECTOR_LEN;
245
- var ptr7 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);
246
- var len7 = WASM_VECTOR_LEN;
247
- wasm.extract_vertices(dpi_increase, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, dashed, dash0, dash1);
248
- } finally {
249
- positions.set(getFloat32Memory0().subarray(ptr4 / 4, ptr4 / 4 + len4));
250
- wasm.__wbindgen_free(ptr4, len4 * 4);
251
- prev_positions.set(getFloat32Memory0().subarray(ptr5 / 4, ptr5 / 4 + len5));
252
- wasm.__wbindgen_free(ptr5, len5 * 4);
253
- vertices.set(getFloat32Memory0().subarray(ptr6 / 4, ptr6 / 4 + len6));
254
- wasm.__wbindgen_free(ptr6, len6 * 4);
255
- indices.set(getUint32Memory0().subarray(ptr7 / 4, ptr7 / 4 + len7));
256
- wasm.__wbindgen_free(ptr7, len7 * 4);
257
- }
189
+ const ptr0 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
190
+ const len0 = WASM_VECTOR_LEN;
191
+ const ptr1 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
192
+ const len1 = WASM_VECTOR_LEN;
193
+ const ptr2 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
194
+ const len2 = WASM_VECTOR_LEN;
195
+ const ptr3 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
196
+ const len3 = WASM_VECTOR_LEN;
197
+ var ptr4 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
198
+ var len4 = WASM_VECTOR_LEN;
199
+ var ptr5 = passArrayF32ToWasm0(prev_positions, wasm.__wbindgen_malloc);
200
+ var len5 = WASM_VECTOR_LEN;
201
+ var ptr6 = passArrayF32ToWasm0(vertices, wasm.__wbindgen_malloc);
202
+ var len6 = WASM_VECTOR_LEN;
203
+ var ptr7 = passArray32ToWasm0(indices, wasm.__wbindgen_malloc);
204
+ var len7 = WASM_VECTOR_LEN;
205
+ wasm.extract_vertices(dpi_increase, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, positions, ptr5, len5, prev_positions, ptr6, len6, vertices, ptr7, len7, indices, dashed, dash0, dash1);
258
206
  }
259
207
 
260
208
  /**
261
- * @param {Uint8Array} null_mask
262
- * @param {Float64Array} y_values
263
- * @param {Float64Array} min_y_values
264
- * @param {Float64Array} max_y_values
265
- * @param {boolean} dashed
266
- * @param {number} dash0
267
- * @param {number} dash1
268
- * @returns {number}
269
- */
209
+ * @param {Uint8Array} null_mask
210
+ * @param {Float64Array} y_values
211
+ * @param {Float64Array} min_y_values
212
+ * @param {Float64Array} max_y_values
213
+ * @param {boolean} dashed
214
+ * @param {number} dash0
215
+ * @param {number} dash1
216
+ * @returns {number}
217
+ */
270
218
  export function get_point_number(null_mask, y_values, min_y_values, max_y_values, dashed, dash0, dash1) {
271
- var ptr0 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
272
- var len0 = WASM_VECTOR_LEN;
273
- var ptr1 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
274
- var len1 = WASM_VECTOR_LEN;
275
- var ptr2 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
276
- var len2 = WASM_VECTOR_LEN;
277
- var ptr3 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
278
- var len3 = WASM_VECTOR_LEN;
279
- var ret = wasm.get_point_number(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, dashed, dash0, dash1);
219
+ const ptr0 = passArray8ToWasm0(null_mask, wasm.__wbindgen_malloc);
220
+ const len0 = WASM_VECTOR_LEN;
221
+ const ptr1 = passArrayF64ToWasm0(y_values, wasm.__wbindgen_malloc);
222
+ const len1 = WASM_VECTOR_LEN;
223
+ const ptr2 = passArrayF64ToWasm0(min_y_values, wasm.__wbindgen_malloc);
224
+ const len2 = WASM_VECTOR_LEN;
225
+ const ptr3 = passArrayF64ToWasm0(max_y_values, wasm.__wbindgen_malloc);
226
+ const len3 = WASM_VECTOR_LEN;
227
+ const ret = wasm.get_point_number(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, dashed, dash0, dash1);
280
228
  return ret;
281
229
  }
282
230
 
283
- /**
284
- */
285
231
  export function main_js() {
286
232
  wasm.main_js();
287
233
  }
288
234
 
289
- export const __wbg_minx_3675eb59ca2b1c04 = function(arg0) {
290
- var ret = getObject(arg0).minX;
291
- return ret;
292
- };
235
+ async function __wbg_load(module, imports) {
236
+ if (typeof Response === 'function' && module instanceof Response) {
237
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
238
+ try {
239
+ return await WebAssembly.instantiateStreaming(module, imports);
293
240
 
294
- export const __wbg_maxx_add7a3e35c2f52a9 = function(arg0) {
295
- var ret = getObject(arg0).maxX;
296
- return ret;
297
- };
241
+ } catch (e) {
242
+ if (module.headers.get('Content-Type') != 'application/wasm') {
243
+ 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);
298
244
 
299
- export const __wbg_miny_9972d9159e80fde8 = function(arg0) {
300
- var ret = getObject(arg0).minY;
301
- return ret;
302
- };
245
+ } else {
246
+ throw e;
247
+ }
248
+ }
249
+ }
303
250
 
304
- export const __wbg_maxy_1c5b27cf1988c667 = function(arg0) {
305
- var ret = getObject(arg0).maxY;
306
- return ret;
307
- };
251
+ const bytes = await module.arrayBuffer();
252
+ return await WebAssembly.instantiate(bytes, imports);
308
253
 
309
- export const __wbg_renderwidth_a0b0f18a85207529 = function(arg0) {
310
- var ret = getObject(arg0).renderWidth;
311
- return ret;
312
- };
254
+ } else {
255
+ const instance = await WebAssembly.instantiate(module, imports);
313
256
 
314
- export const __wbg_renderheight_36b17e8bfc037fc9 = function(arg0) {
315
- var ret = getObject(arg0).renderHeight;
316
- return ret;
317
- };
257
+ if (instance instanceof WebAssembly.Instance) {
258
+ return { instance, module };
259
+
260
+ } else {
261
+ return instance;
262
+ }
263
+ }
264
+ }
318
265
 
319
- export const __wbg_scale_5e6438f0fcc08bc0 = function(arg0) {
320
- var ret = getObject(arg0).scale;
321
- return addHeapObject(ret);
322
- };
266
+ function __wbg_get_imports() {
267
+ const imports = {};
268
+ imports.wbg = {};
269
+ imports.wbg.__wbg_maxx_a3b1e1c3299e47bf = function(arg0) {
270
+ const ret = arg0.maxX;
271
+ return ret;
272
+ };
273
+ imports.wbg.__wbg_maxy_007b81ea99058122 = function(arg0) {
274
+ const ret = arg0.maxY;
275
+ return ret;
276
+ };
277
+ imports.wbg.__wbg_minx_e03d57649d81fc8f = function(arg0) {
278
+ const ret = arg0.minX;
279
+ return ret;
280
+ };
281
+ imports.wbg.__wbg_miny_46aab5af597882a7 = function(arg0) {
282
+ const ret = arg0.minY;
283
+ return ret;
284
+ };
285
+ imports.wbg.__wbg_renderheight_d030fe5a23b4c32b = function(arg0) {
286
+ const ret = arg0.renderHeight;
287
+ return ret;
288
+ };
289
+ imports.wbg.__wbg_renderwidth_8685762ee304f2a7 = function(arg0) {
290
+ const ret = arg0.renderWidth;
291
+ return ret;
292
+ };
293
+ imports.wbg.__wbg_scale_d705e0de44ed2361 = function(arg0) {
294
+ const ret = arg0.scale;
295
+ return ret;
296
+ };
297
+ imports.wbg.__wbindgen_copy_to_typed_array = function(arg0, arg1, arg2) {
298
+ new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));
299
+ };
300
+ imports.wbg.__wbindgen_init_externref_table = function() {
301
+ const table = wasm.__wbindgen_export_0;
302
+ const offset = table.grow(4);
303
+ table.set(0, undefined);
304
+ table.set(offset + 0, undefined);
305
+ table.set(offset + 1, null);
306
+ table.set(offset + 2, true);
307
+ table.set(offset + 3, false);
308
+ ;
309
+ };
310
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
311
+ const obj = arg1;
312
+ const ret = typeof(obj) === 'string' ? obj : undefined;
313
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
314
+ var len1 = WASM_VECTOR_LEN;
315
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
316
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
317
+ };
318
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
319
+ throw new Error(getStringFromWasm0(arg0, arg1));
320
+ };
321
+
322
+ return imports;
323
+ }
324
+
325
+ function __wbg_init_memory(imports, memory) {
326
+
327
+ }
328
+
329
+ function __wbg_finalize_init(instance, module) {
330
+ wasm = instance.exports;
331
+ __wbg_init.__wbindgen_wasm_module = module;
332
+ cachedDataViewMemory0 = null;
333
+ cachedFloat32ArrayMemory0 = null;
334
+ cachedFloat64ArrayMemory0 = null;
335
+ cachedUint32ArrayMemory0 = null;
336
+ cachedUint8ArrayMemory0 = null;
337
+
338
+
339
+ wasm.__wbindgen_start();
340
+ return wasm;
341
+ }
323
342
 
324
- export const __wbindgen_string_get = function(arg0, arg1) {
325
- const obj = getObject(arg1);
326
- var ret = typeof(obj) === 'string' ? obj : undefined;
327
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
328
- var len0 = WASM_VECTOR_LEN;
329
- getInt32Memory0()[arg0 / 4 + 1] = len0;
330
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
331
- };
343
+ function initSync(module) {
344
+ if (wasm !== undefined) return wasm;
332
345
 
333
- export const __wbindgen_object_drop_ref = function(arg0) {
334
- takeObject(arg0);
335
- };
336
346
 
337
- export const __wbindgen_throw = function(arg0, arg1) {
338
- throw new Error(getStringFromWasm0(arg0, arg1));
339
- };
347
+ if (typeof module !== 'undefined') {
348
+ if (Object.getPrototypeOf(module) === Object.prototype) {
349
+ ({module} = module)
350
+ } else {
351
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
352
+ }
353
+ }
354
+
355
+ const imports = __wbg_get_imports();
356
+
357
+ __wbg_init_memory(imports);
358
+
359
+ if (!(module instanceof WebAssembly.Module)) {
360
+ module = new WebAssembly.Module(module);
361
+ }
362
+
363
+ const instance = new WebAssembly.Instance(module, imports);
364
+
365
+ return __wbg_finalize_init(instance, module);
366
+ }
367
+
368
+ async function __wbg_init(module_or_path) {
369
+ if (wasm !== undefined) return wasm;
370
+
340
371
 
341
- wasm.__wbindgen_start();
372
+ if (typeof module_or_path !== 'undefined') {
373
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
374
+ ({module_or_path} = module_or_path)
375
+ } else {
376
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
377
+ }
378
+ }
379
+
380
+ if (typeof module_or_path === 'undefined') {
381
+ module_or_path = new URL('index_bg.wasm', import.meta.url);
382
+ }
383
+ const imports = __wbg_get_imports();
384
+
385
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
386
+ module_or_path = fetch(module_or_path);
387
+ }
388
+
389
+ __wbg_init_memory(imports);
390
+
391
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
392
+
393
+ return __wbg_finalize_init(instance, module);
394
+ }
342
395
 
396
+ export { initSync };
397
+ export default __wbg_init;