@octoseq/visualiser 0.1.0-main.0d2814e

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.
@@ -0,0 +1,1374 @@
1
+ let wasm;
2
+
3
+ function addToExternrefTable0(obj) {
4
+ const idx = wasm.__externref_table_alloc();
5
+ wasm.__wbindgen_externrefs.set(idx, obj);
6
+ return idx;
7
+ }
8
+
9
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
10
+ ? { register: () => {}, unregister: () => {} }
11
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
12
+
13
+ function debugString(val) {
14
+ // primitive types
15
+ const type = typeof val;
16
+ if (type == 'number' || type == 'boolean' || val == null) {
17
+ return `${val}`;
18
+ }
19
+ if (type == 'string') {
20
+ return `"${val}"`;
21
+ }
22
+ if (type == 'symbol') {
23
+ const description = val.description;
24
+ if (description == null) {
25
+ return 'Symbol';
26
+ } else {
27
+ return `Symbol(${description})`;
28
+ }
29
+ }
30
+ if (type == 'function') {
31
+ const name = val.name;
32
+ if (typeof name == 'string' && name.length > 0) {
33
+ return `Function(${name})`;
34
+ } else {
35
+ return 'Function';
36
+ }
37
+ }
38
+ // objects
39
+ if (Array.isArray(val)) {
40
+ const length = val.length;
41
+ let debug = '[';
42
+ if (length > 0) {
43
+ debug += debugString(val[0]);
44
+ }
45
+ for(let i = 1; i < length; i++) {
46
+ debug += ', ' + debugString(val[i]);
47
+ }
48
+ debug += ']';
49
+ return debug;
50
+ }
51
+ // Test for built-in
52
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
53
+ let className;
54
+ if (builtInMatches && builtInMatches.length > 1) {
55
+ className = builtInMatches[1];
56
+ } else {
57
+ // Failed to match the standard '[object ClassName]'
58
+ return toString.call(val);
59
+ }
60
+ if (className == 'Object') {
61
+ // we're a user defined class or Object
62
+ // JSON.stringify avoids problems with cycles, and is generally much
63
+ // easier than looping through ownProperties of `val`.
64
+ try {
65
+ return 'Object(' + JSON.stringify(val) + ')';
66
+ } catch (_) {
67
+ return 'Object';
68
+ }
69
+ }
70
+ // errors
71
+ if (val instanceof Error) {
72
+ return `${val.name}: ${val.message}\n${val.stack}`;
73
+ }
74
+ // TODO we could test for more things here, like `Set`s and `Map`s.
75
+ return className;
76
+ }
77
+
78
+ function getArrayF32FromWasm0(ptr, len) {
79
+ ptr = ptr >>> 0;
80
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
81
+ }
82
+
83
+ function getArrayU32FromWasm0(ptr, len) {
84
+ ptr = ptr >>> 0;
85
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
86
+ }
87
+
88
+ function getArrayU8FromWasm0(ptr, len) {
89
+ ptr = ptr >>> 0;
90
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
91
+ }
92
+
93
+ let cachedDataViewMemory0 = null;
94
+ function getDataViewMemory0() {
95
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
96
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
97
+ }
98
+ return cachedDataViewMemory0;
99
+ }
100
+
101
+ let cachedFloat32ArrayMemory0 = null;
102
+ function getFloat32ArrayMemory0() {
103
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
104
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
105
+ }
106
+ return cachedFloat32ArrayMemory0;
107
+ }
108
+
109
+ function getStringFromWasm0(ptr, len) {
110
+ ptr = ptr >>> 0;
111
+ return decodeText(ptr, len);
112
+ }
113
+
114
+ let cachedUint32ArrayMemory0 = null;
115
+ function getUint32ArrayMemory0() {
116
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
117
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
118
+ }
119
+ return cachedUint32ArrayMemory0;
120
+ }
121
+
122
+ let cachedUint8ArrayMemory0 = null;
123
+ function getUint8ArrayMemory0() {
124
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
125
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
126
+ }
127
+ return cachedUint8ArrayMemory0;
128
+ }
129
+
130
+ function handleError(f, args) {
131
+ try {
132
+ return f.apply(this, args);
133
+ } catch (e) {
134
+ const idx = addToExternrefTable0(e);
135
+ wasm.__wbindgen_exn_store(idx);
136
+ }
137
+ }
138
+
139
+ function isLikeNone(x) {
140
+ return x === undefined || x === null;
141
+ }
142
+
143
+ function makeMutClosure(arg0, arg1, dtor, f) {
144
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
145
+ const real = (...args) => {
146
+
147
+ // First up with a closure we increment the internal reference
148
+ // count. This ensures that the Rust closure environment won't
149
+ // be deallocated while we're invoking it.
150
+ state.cnt++;
151
+ const a = state.a;
152
+ state.a = 0;
153
+ try {
154
+ return f(a, state.b, ...args);
155
+ } finally {
156
+ state.a = a;
157
+ real._wbg_cb_unref();
158
+ }
159
+ };
160
+ real._wbg_cb_unref = () => {
161
+ if (--state.cnt === 0) {
162
+ state.dtor(state.a, state.b);
163
+ state.a = 0;
164
+ CLOSURE_DTORS.unregister(state);
165
+ }
166
+ };
167
+ CLOSURE_DTORS.register(real, state, state);
168
+ return real;
169
+ }
170
+
171
+ function passArrayF32ToWasm0(arg, malloc) {
172
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
173
+ getFloat32ArrayMemory0().set(arg, ptr / 4);
174
+ WASM_VECTOR_LEN = arg.length;
175
+ return ptr;
176
+ }
177
+
178
+ function passStringToWasm0(arg, malloc, realloc) {
179
+ if (realloc === undefined) {
180
+ const buf = cachedTextEncoder.encode(arg);
181
+ const ptr = malloc(buf.length, 1) >>> 0;
182
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
183
+ WASM_VECTOR_LEN = buf.length;
184
+ return ptr;
185
+ }
186
+
187
+ let len = arg.length;
188
+ let ptr = malloc(len, 1) >>> 0;
189
+
190
+ const mem = getUint8ArrayMemory0();
191
+
192
+ let offset = 0;
193
+
194
+ for (; offset < len; offset++) {
195
+ const code = arg.charCodeAt(offset);
196
+ if (code > 0x7F) break;
197
+ mem[ptr + offset] = code;
198
+ }
199
+ if (offset !== len) {
200
+ if (offset !== 0) {
201
+ arg = arg.slice(offset);
202
+ }
203
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
204
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
205
+ const ret = cachedTextEncoder.encodeInto(arg, view);
206
+
207
+ offset += ret.written;
208
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
209
+ }
210
+
211
+ WASM_VECTOR_LEN = offset;
212
+ return ptr;
213
+ }
214
+
215
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
216
+ cachedTextDecoder.decode();
217
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
218
+ let numBytesDecoded = 0;
219
+ function decodeText(ptr, len) {
220
+ numBytesDecoded += len;
221
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
222
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
223
+ cachedTextDecoder.decode();
224
+ numBytesDecoded = len;
225
+ }
226
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
227
+ }
228
+
229
+ const cachedTextEncoder = new TextEncoder();
230
+
231
+ if (!('encodeInto' in cachedTextEncoder)) {
232
+ cachedTextEncoder.encodeInto = function (arg, view) {
233
+ const buf = cachedTextEncoder.encode(arg);
234
+ view.set(buf);
235
+ return {
236
+ read: arg.length,
237
+ written: buf.length
238
+ };
239
+ }
240
+ }
241
+
242
+ let WASM_VECTOR_LEN = 0;
243
+
244
+ function wasm_bindgen__convert__closures_____invoke__h53437a38721e89f7(arg0, arg1, arg2) {
245
+ wasm.wasm_bindgen__convert__closures_____invoke__h53437a38721e89f7(arg0, arg1, arg2);
246
+ }
247
+
248
+ function wasm_bindgen__convert__closures_____invoke__h9d1c5a23ecfcd5c8(arg0, arg1, arg2) {
249
+ wasm.wasm_bindgen__convert__closures_____invoke__h9d1c5a23ecfcd5c8(arg0, arg1, arg2);
250
+ }
251
+
252
+ function wasm_bindgen__convert__closures_____invoke__h320f3d825d3712ba(arg0, arg1, arg2, arg3) {
253
+ wasm.wasm_bindgen__convert__closures_____invoke__h320f3d825d3712ba(arg0, arg1, arg2, arg3);
254
+ }
255
+
256
+ const __wbindgen_enum_GpuCompilationMessageType = ["error", "warning", "info"];
257
+
258
+ const __wbindgen_enum_GpuDeviceLostReason = ["unknown", "destroyed"];
259
+
260
+ const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
261
+
262
+ const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
263
+
264
+ const __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
265
+
266
+ const WasmVisualiserFinalization = (typeof FinalizationRegistry === 'undefined')
267
+ ? { register: () => {}, unregister: () => {} }
268
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmvisualiser_free(ptr >>> 0, 1));
269
+
270
+ export class WasmVisualiser {
271
+ static __wrap(ptr) {
272
+ ptr = ptr >>> 0;
273
+ const obj = Object.create(WasmVisualiser.prototype);
274
+ obj.__wbg_ptr = ptr;
275
+ WasmVisualiserFinalization.register(obj, obj.__wbg_ptr, obj);
276
+ return obj;
277
+ }
278
+ __destroy_into_raw() {
279
+ const ptr = this.__wbg_ptr;
280
+ this.__wbg_ptr = 0;
281
+ WasmVisualiserFinalization.unregister(this);
282
+ return ptr;
283
+ }
284
+ free() {
285
+ const ptr = this.__destroy_into_raw();
286
+ wasm.__wbg_wasmvisualiser_free(ptr, 0);
287
+ }
288
+ /**
289
+ * Check if a script is currently loaded.
290
+ * @returns {boolean}
291
+ */
292
+ has_script() {
293
+ const ret = wasm.wasmvisualiser_has_script(this.__wbg_ptr);
294
+ return ret !== 0;
295
+ }
296
+ /**
297
+ * Load a Rhai script for controlling the visualiser.
298
+ * Returns true if the script was loaded successfully.
299
+ * @param {string} script
300
+ * @returns {boolean}
301
+ */
302
+ load_script(script) {
303
+ const ptr0 = passStringToWasm0(script, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
+ const len0 = WASM_VECTOR_LEN;
305
+ const ret = wasm.wasmvisualiser_load_script(this.__wbg_ptr, ptr0, len0);
306
+ return ret !== 0;
307
+ }
308
+ /**
309
+ * Push a named signal for use in scripts.
310
+ * The signal will be available as `inputs.<name>` in Rhai scripts.
311
+ * @param {string} name
312
+ * @param {Float32Array} samples
313
+ * @param {number} sample_rate
314
+ */
315
+ push_signal(name, samples, sample_rate) {
316
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
317
+ const len0 = WASM_VECTOR_LEN;
318
+ const ptr1 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
319
+ const len1 = WASM_VECTOR_LEN;
320
+ wasm.wasmvisualiser_push_signal(this.__wbg_ptr, ptr0, len0, ptr1, len1, sample_rate);
321
+ }
322
+ /**
323
+ * Clear all named signals.
324
+ */
325
+ clear_signals() {
326
+ wasm.wasmvisualiser_clear_signals(this.__wbg_ptr);
327
+ }
328
+ /**
329
+ * @param {number} k
330
+ */
331
+ set_sigmoid_k(k) {
332
+ wasm.wasmvisualiser_set_sigmoid_k(this.__wbg_ptr, k);
333
+ }
334
+ /**
335
+ * @param {Float32Array} samples
336
+ * @param {number} sample_rate
337
+ */
338
+ push_zoom_data(samples, sample_rate) {
339
+ const ptr0 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
340
+ const len0 = WASM_VECTOR_LEN;
341
+ wasm.wasmvisualiser_push_zoom_data(this.__wbg_ptr, ptr0, len0, sample_rate);
342
+ }
343
+ /**
344
+ * Get current state values for debugging.
345
+ * Returns [time, scene_entity_count, mesh_count, line_count]
346
+ * @returns {Float32Array}
347
+ */
348
+ get_current_vals() {
349
+ const ret = wasm.wasmvisualiser_get_current_vals(this.__wbg_ptr);
350
+ var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
351
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
352
+ return v1;
353
+ }
354
+ /**
355
+ * Get the last script error message, if any.
356
+ * @returns {string | undefined}
357
+ */
358
+ get_script_error() {
359
+ const ret = wasm.wasmvisualiser_get_script_error(this.__wbg_ptr);
360
+ let v1;
361
+ if (ret[0] !== 0) {
362
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
363
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
364
+ }
365
+ return v1;
366
+ }
367
+ /**
368
+ * @param {Float32Array} samples
369
+ * @param {number} sample_rate
370
+ */
371
+ push_rotation_data(samples, sample_rate) {
372
+ const ptr0 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
373
+ const len0 = WASM_VECTOR_LEN;
374
+ wasm.wasmvisualiser_push_data(this.__wbg_ptr, ptr0, len0, sample_rate);
375
+ }
376
+ constructor() {
377
+ const ret = wasm.wasmvisualiser_new();
378
+ this.__wbg_ptr = ret >>> 0;
379
+ WasmVisualiserFinalization.register(this, this.__wbg_ptr, this);
380
+ return this;
381
+ }
382
+ /**
383
+ * @param {number} dt
384
+ */
385
+ render(dt) {
386
+ wasm.wasmvisualiser_render(this.__wbg_ptr, dt);
387
+ }
388
+ /**
389
+ * @param {number} width
390
+ * @param {number} height
391
+ */
392
+ resize(width, height) {
393
+ wasm.wasmvisualiser_resize(this.__wbg_ptr, width, height);
394
+ }
395
+ /**
396
+ * @param {number} time
397
+ */
398
+ set_time(time) {
399
+ wasm.wasmvisualiser_set_time(this.__wbg_ptr, time);
400
+ }
401
+ /**
402
+ * @param {Float32Array} samples
403
+ * @param {number} sample_rate
404
+ */
405
+ push_data(samples, sample_rate) {
406
+ const ptr0 = passArrayF32ToWasm0(samples, wasm.__wbindgen_malloc);
407
+ const len0 = WASM_VECTOR_LEN;
408
+ wasm.wasmvisualiser_push_data(this.__wbg_ptr, ptr0, len0, sample_rate);
409
+ }
410
+ }
411
+ if (Symbol.dispose) WasmVisualiser.prototype[Symbol.dispose] = WasmVisualiser.prototype.free;
412
+
413
+ /**
414
+ * @param {HTMLCanvasElement} canvas
415
+ * @returns {Promise<WasmVisualiser>}
416
+ */
417
+ export function create_visualiser(canvas) {
418
+ const ret = wasm.create_visualiser(canvas);
419
+ return ret;
420
+ }
421
+
422
+ export function init_panic_hook() {
423
+ wasm.init_panic_hook();
424
+ }
425
+
426
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
427
+
428
+ async function __wbg_load(module, imports) {
429
+ if (typeof Response === 'function' && module instanceof Response) {
430
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
431
+ try {
432
+ return await WebAssembly.instantiateStreaming(module, imports);
433
+ } catch (e) {
434
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
435
+
436
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
437
+ 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);
438
+
439
+ } else {
440
+ throw e;
441
+ }
442
+ }
443
+ }
444
+
445
+ const bytes = await module.arrayBuffer();
446
+ return await WebAssembly.instantiate(bytes, imports);
447
+ } else {
448
+ const instance = await WebAssembly.instantiate(module, imports);
449
+
450
+ if (instance instanceof WebAssembly.Instance) {
451
+ return { instance, module };
452
+ } else {
453
+ return instance;
454
+ }
455
+ }
456
+ }
457
+
458
+ function __wbg_get_imports() {
459
+ const imports = {};
460
+ imports.wbg = {};
461
+ imports.wbg.__wbg_Window_cf5b693340a7c469 = function(arg0) {
462
+ const ret = arg0.Window;
463
+ return ret;
464
+ };
465
+ imports.wbg.__wbg_WorkerGlobalScope_354364d1b0bd06e5 = function(arg0) {
466
+ const ret = arg0.WorkerGlobalScope;
467
+ return ret;
468
+ };
469
+ imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
470
+ const ret = debugString(arg1);
471
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
472
+ const len1 = WASM_VECTOR_LEN;
473
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
474
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
475
+ };
476
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
477
+ const ret = typeof(arg0) === 'function';
478
+ return ret;
479
+ };
480
+ imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
481
+ const ret = arg0 === null;
482
+ return ret;
483
+ };
484
+ imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
485
+ const val = arg0;
486
+ const ret = typeof(val) === 'object' && val !== null;
487
+ return ret;
488
+ };
489
+ imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
490
+ const ret = arg0 === undefined;
491
+ return ret;
492
+ };
493
+ imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
494
+ const obj = arg1;
495
+ const ret = typeof(obj) === 'string' ? obj : undefined;
496
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
497
+ var len1 = WASM_VECTOR_LEN;
498
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
499
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
500
+ };
501
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
502
+ throw new Error(getStringFromWasm0(arg0, arg1));
503
+ };
504
+ imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
505
+ arg0._wbg_cb_unref();
506
+ };
507
+ imports.wbg.__wbg_beginComputePass_90d5303e604970cb = function(arg0, arg1) {
508
+ const ret = arg0.beginComputePass(arg1);
509
+ return ret;
510
+ };
511
+ imports.wbg.__wbg_beginRenderPass_9739520c601001c3 = function(arg0, arg1) {
512
+ const ret = arg0.beginRenderPass(arg1);
513
+ return ret;
514
+ };
515
+ imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {
516
+ const ret = arg0.buffer;
517
+ return ret;
518
+ };
519
+ imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
520
+ const ret = arg0.call(arg1, arg2);
521
+ return ret;
522
+ }, arguments) };
523
+ imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
524
+ const ret = arg0.call(arg1);
525
+ return ret;
526
+ }, arguments) };
527
+ imports.wbg.__wbg_clearBuffer_6164fc25d22b25cc = function(arg0, arg1, arg2, arg3) {
528
+ arg0.clearBuffer(arg1, arg2, arg3);
529
+ };
530
+ imports.wbg.__wbg_clearBuffer_cfcaaf1fb2baa885 = function(arg0, arg1, arg2) {
531
+ arg0.clearBuffer(arg1, arg2);
532
+ };
533
+ imports.wbg.__wbg_configure_2414aed971d368cd = function(arg0, arg1) {
534
+ arg0.configure(arg1);
535
+ };
536
+ imports.wbg.__wbg_copyBufferToBuffer_1ba67191114656a1 = function(arg0, arg1, arg2, arg3, arg4, arg5) {
537
+ arg0.copyBufferToBuffer(arg1, arg2, arg3, arg4, arg5);
538
+ };
539
+ imports.wbg.__wbg_copyBufferToTexture_878d31d479e48f28 = function(arg0, arg1, arg2, arg3) {
540
+ arg0.copyBufferToTexture(arg1, arg2, arg3);
541
+ };
542
+ imports.wbg.__wbg_copyExternalImageToTexture_7878d196c0b60d39 = function(arg0, arg1, arg2, arg3) {
543
+ arg0.copyExternalImageToTexture(arg1, arg2, arg3);
544
+ };
545
+ imports.wbg.__wbg_copyTextureToBuffer_6a8fe0e90f0a663d = function(arg0, arg1, arg2, arg3) {
546
+ arg0.copyTextureToBuffer(arg1, arg2, arg3);
547
+ };
548
+ imports.wbg.__wbg_copyTextureToTexture_0a06a393d6726b4a = function(arg0, arg1, arg2, arg3) {
549
+ arg0.copyTextureToTexture(arg1, arg2, arg3);
550
+ };
551
+ imports.wbg.__wbg_createBindGroupLayout_1d93b6d41c87ba9d = function(arg0, arg1) {
552
+ const ret = arg0.createBindGroupLayout(arg1);
553
+ return ret;
554
+ };
555
+ imports.wbg.__wbg_createBindGroup_61cd07ec9d423432 = function(arg0, arg1) {
556
+ const ret = arg0.createBindGroup(arg1);
557
+ return ret;
558
+ };
559
+ imports.wbg.__wbg_createBuffer_963aa00d5fe859e4 = function(arg0, arg1) {
560
+ const ret = arg0.createBuffer(arg1);
561
+ return ret;
562
+ };
563
+ imports.wbg.__wbg_createCommandEncoder_f0e1613e9a2dc1eb = function(arg0, arg1) {
564
+ const ret = arg0.createCommandEncoder(arg1);
565
+ return ret;
566
+ };
567
+ imports.wbg.__wbg_createComputePipeline_b9616b9fe2f4eb2f = function(arg0, arg1) {
568
+ const ret = arg0.createComputePipeline(arg1);
569
+ return ret;
570
+ };
571
+ imports.wbg.__wbg_createPipelineLayout_56c6cf983f892d2b = function(arg0, arg1) {
572
+ const ret = arg0.createPipelineLayout(arg1);
573
+ return ret;
574
+ };
575
+ imports.wbg.__wbg_createQuerySet_c14be802adf7c207 = function(arg0, arg1) {
576
+ const ret = arg0.createQuerySet(arg1);
577
+ return ret;
578
+ };
579
+ imports.wbg.__wbg_createRenderBundleEncoder_8e4bdffea72f8c1f = function(arg0, arg1) {
580
+ const ret = arg0.createRenderBundleEncoder(arg1);
581
+ return ret;
582
+ };
583
+ imports.wbg.__wbg_createRenderPipeline_079a88a0601fcce1 = function(arg0, arg1) {
584
+ const ret = arg0.createRenderPipeline(arg1);
585
+ return ret;
586
+ };
587
+ imports.wbg.__wbg_createSampler_ef5578990df3baf7 = function(arg0, arg1) {
588
+ const ret = arg0.createSampler(arg1);
589
+ return ret;
590
+ };
591
+ imports.wbg.__wbg_createShaderModule_17f451ea25cae47c = function(arg0, arg1) {
592
+ const ret = arg0.createShaderModule(arg1);
593
+ return ret;
594
+ };
595
+ imports.wbg.__wbg_createTexture_01cc1cd2fea732d9 = function(arg0, arg1) {
596
+ const ret = arg0.createTexture(arg1);
597
+ return ret;
598
+ };
599
+ imports.wbg.__wbg_createView_04701884291e1ccc = function(arg0, arg1) {
600
+ const ret = arg0.createView(arg1);
601
+ return ret;
602
+ };
603
+ imports.wbg.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
604
+ console.debug(arg0);
605
+ };
606
+ imports.wbg.__wbg_destroy_35f94012e5bb9c17 = function(arg0) {
607
+ arg0.destroy();
608
+ };
609
+ imports.wbg.__wbg_destroy_767d9dde1008e293 = function(arg0) {
610
+ arg0.destroy();
611
+ };
612
+ imports.wbg.__wbg_destroy_c6af4226dda95dbd = function(arg0) {
613
+ arg0.destroy();
614
+ };
615
+ imports.wbg.__wbg_dispatchWorkgroupsIndirect_8b25efab93a7a433 = function(arg0, arg1, arg2) {
616
+ arg0.dispatchWorkgroupsIndirect(arg1, arg2);
617
+ };
618
+ imports.wbg.__wbg_dispatchWorkgroups_c102fa81b955935d = function(arg0, arg1, arg2, arg3) {
619
+ arg0.dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
620
+ };
621
+ imports.wbg.__wbg_document_5b745e82ba551ca5 = function(arg0) {
622
+ const ret = arg0.document;
623
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
624
+ };
625
+ imports.wbg.__wbg_drawIndexedIndirect_34484fc6227c7bc8 = function(arg0, arg1, arg2) {
626
+ arg0.drawIndexedIndirect(arg1, arg2);
627
+ };
628
+ imports.wbg.__wbg_drawIndexedIndirect_5a7c30bb5f1d5b67 = function(arg0, arg1, arg2) {
629
+ arg0.drawIndexedIndirect(arg1, arg2);
630
+ };
631
+ imports.wbg.__wbg_drawIndexed_115af1449b52a948 = function(arg0, arg1, arg2, arg3, arg4, arg5) {
632
+ arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
633
+ };
634
+ imports.wbg.__wbg_drawIndexed_a587cce4c317791f = function(arg0, arg1, arg2, arg3, arg4, arg5) {
635
+ arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
636
+ };
637
+ imports.wbg.__wbg_drawIndirect_036d71498a21f1a3 = function(arg0, arg1, arg2) {
638
+ arg0.drawIndirect(arg1, arg2);
639
+ };
640
+ imports.wbg.__wbg_drawIndirect_a1d7c5e893aa5756 = function(arg0, arg1, arg2) {
641
+ arg0.drawIndirect(arg1, arg2);
642
+ };
643
+ imports.wbg.__wbg_draw_5351b12033166aca = function(arg0, arg1, arg2, arg3, arg4) {
644
+ arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
645
+ };
646
+ imports.wbg.__wbg_draw_e2a7c5d66fb2d244 = function(arg0, arg1, arg2, arg3, arg4) {
647
+ arg0.draw(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
648
+ };
649
+ imports.wbg.__wbg_end_0ac71677a5c1717a = function(arg0) {
650
+ arg0.end();
651
+ };
652
+ imports.wbg.__wbg_end_6f776519f1faa582 = function(arg0) {
653
+ arg0.end();
654
+ };
655
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
656
+ let deferred0_0;
657
+ let deferred0_1;
658
+ try {
659
+ deferred0_0 = arg0;
660
+ deferred0_1 = arg1;
661
+ console.error(getStringFromWasm0(arg0, arg1));
662
+ } finally {
663
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
664
+ }
665
+ };
666
+ imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
667
+ console.error(arg0);
668
+ };
669
+ imports.wbg.__wbg_error_e98e6aadd08e0b94 = function(arg0) {
670
+ const ret = arg0.error;
671
+ return ret;
672
+ };
673
+ imports.wbg.__wbg_executeBundles_8e6c0614da2805d4 = function(arg0, arg1) {
674
+ arg0.executeBundles(arg1);
675
+ };
676
+ imports.wbg.__wbg_features_1b464383ea8a7691 = function(arg0) {
677
+ const ret = arg0.features;
678
+ return ret;
679
+ };
680
+ imports.wbg.__wbg_features_e5fbbc2760867852 = function(arg0) {
681
+ const ret = arg0.features;
682
+ return ret;
683
+ };
684
+ imports.wbg.__wbg_finish_20711371c58df61c = function(arg0) {
685
+ const ret = arg0.finish();
686
+ return ret;
687
+ };
688
+ imports.wbg.__wbg_finish_34b2c54329c8719f = function(arg0, arg1) {
689
+ const ret = arg0.finish(arg1);
690
+ return ret;
691
+ };
692
+ imports.wbg.__wbg_finish_a9ab917e756ea00c = function(arg0, arg1) {
693
+ const ret = arg0.finish(arg1);
694
+ return ret;
695
+ };
696
+ imports.wbg.__wbg_finish_e0a6c97c0622f843 = function(arg0) {
697
+ const ret = arg0.finish();
698
+ return ret;
699
+ };
700
+ imports.wbg.__wbg_getBindGroupLayout_4a94df6108ac6667 = function(arg0, arg1) {
701
+ const ret = arg0.getBindGroupLayout(arg1 >>> 0);
702
+ return ret;
703
+ };
704
+ imports.wbg.__wbg_getBindGroupLayout_80e803d942962f6a = function(arg0, arg1) {
705
+ const ret = arg0.getBindGroupLayout(arg1 >>> 0);
706
+ return ret;
707
+ };
708
+ imports.wbg.__wbg_getCompilationInfo_2af3ecdfeda551a3 = function(arg0) {
709
+ const ret = arg0.getCompilationInfo();
710
+ return ret;
711
+ };
712
+ imports.wbg.__wbg_getContext_01f42b234e833f0a = function() { return handleError(function (arg0, arg1, arg2) {
713
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
714
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
715
+ }, arguments) };
716
+ imports.wbg.__wbg_getContext_2f210d0a58d43d95 = function() { return handleError(function (arg0, arg1, arg2) {
717
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
718
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
719
+ }, arguments) };
720
+ imports.wbg.__wbg_getCurrentTexture_5a79cda2ff36e1ee = function(arg0) {
721
+ const ret = arg0.getCurrentTexture();
722
+ return ret;
723
+ };
724
+ imports.wbg.__wbg_getMappedRange_932dd043ae22ee0a = function(arg0, arg1, arg2) {
725
+ const ret = arg0.getMappedRange(arg1, arg2);
726
+ return ret;
727
+ };
728
+ imports.wbg.__wbg_getPreferredCanvasFormat_de73c02773a5209e = function(arg0) {
729
+ const ret = arg0.getPreferredCanvasFormat();
730
+ return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 96) - 1;
731
+ };
732
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
733
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
734
+ }, arguments) };
735
+ imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
736
+ const ret = arg0[arg1 >>> 0];
737
+ return ret;
738
+ };
739
+ imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
740
+ const ret = Reflect.get(arg0, arg1);
741
+ return ret;
742
+ }, arguments) };
743
+ imports.wbg.__wbg_get_c53d381635aa3929 = function(arg0, arg1) {
744
+ const ret = arg0[arg1 >>> 0];
745
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
746
+ };
747
+ imports.wbg.__wbg_gpu_87871e8f7ace8fee = function(arg0) {
748
+ const ret = arg0.gpu;
749
+ return ret;
750
+ };
751
+ imports.wbg.__wbg_has_624cbf0451d880e8 = function(arg0, arg1, arg2) {
752
+ const ret = arg0.has(getStringFromWasm0(arg1, arg2));
753
+ return ret;
754
+ };
755
+ imports.wbg.__wbg_height_a07787f693c253d2 = function(arg0) {
756
+ const ret = arg0.height;
757
+ return ret;
758
+ };
759
+ imports.wbg.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
760
+ console.info(arg0);
761
+ };
762
+ imports.wbg.__wbg_instanceof_GpuAdapter_0731153d2b08720b = function(arg0) {
763
+ let result;
764
+ try {
765
+ result = arg0 instanceof GPUAdapter;
766
+ } catch (_) {
767
+ result = false;
768
+ }
769
+ const ret = result;
770
+ return ret;
771
+ };
772
+ imports.wbg.__wbg_instanceof_GpuCanvasContext_d14121c7bd72fcef = function(arg0) {
773
+ let result;
774
+ try {
775
+ result = arg0 instanceof GPUCanvasContext;
776
+ } catch (_) {
777
+ result = false;
778
+ }
779
+ const ret = result;
780
+ return ret;
781
+ };
782
+ imports.wbg.__wbg_instanceof_GpuDeviceLostInfo_a3677ebb8241d800 = function(arg0) {
783
+ let result;
784
+ try {
785
+ result = arg0 instanceof GPUDeviceLostInfo;
786
+ } catch (_) {
787
+ result = false;
788
+ }
789
+ const ret = result;
790
+ return ret;
791
+ };
792
+ imports.wbg.__wbg_instanceof_GpuOutOfMemoryError_391d9a08edbfa04b = function(arg0) {
793
+ let result;
794
+ try {
795
+ result = arg0 instanceof GPUOutOfMemoryError;
796
+ } catch (_) {
797
+ result = false;
798
+ }
799
+ const ret = result;
800
+ return ret;
801
+ };
802
+ imports.wbg.__wbg_instanceof_GpuValidationError_f4d803c383da3c92 = function(arg0) {
803
+ let result;
804
+ try {
805
+ result = arg0 instanceof GPUValidationError;
806
+ } catch (_) {
807
+ result = false;
808
+ }
809
+ const ret = result;
810
+ return ret;
811
+ };
812
+ imports.wbg.__wbg_instanceof_Object_577e21051f7bcb79 = function(arg0) {
813
+ let result;
814
+ try {
815
+ result = arg0 instanceof Object;
816
+ } catch (_) {
817
+ result = false;
818
+ }
819
+ const ret = result;
820
+ return ret;
821
+ };
822
+ imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
823
+ let result;
824
+ try {
825
+ result = arg0 instanceof Window;
826
+ } catch (_) {
827
+ result = false;
828
+ }
829
+ const ret = result;
830
+ return ret;
831
+ };
832
+ imports.wbg.__wbg_label_2082ab37d2ad170d = function(arg0, arg1) {
833
+ const ret = arg1.label;
834
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
835
+ const len1 = WASM_VECTOR_LEN;
836
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
837
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
838
+ };
839
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
840
+ const ret = arg0.length;
841
+ return ret;
842
+ };
843
+ imports.wbg.__wbg_length_9df32f7add647235 = function(arg0) {
844
+ const ret = arg0.length;
845
+ return ret;
846
+ };
847
+ imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
848
+ const ret = arg0.length;
849
+ return ret;
850
+ };
851
+ imports.wbg.__wbg_limits_2dd632c891786ddf = function(arg0) {
852
+ const ret = arg0.limits;
853
+ return ret;
854
+ };
855
+ imports.wbg.__wbg_limits_f6411f884b0b2d62 = function(arg0) {
856
+ const ret = arg0.limits;
857
+ return ret;
858
+ };
859
+ imports.wbg.__wbg_lineNum_0246de1e072ffe19 = function(arg0) {
860
+ const ret = arg0.lineNum;
861
+ return ret;
862
+ };
863
+ imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
864
+ console.log(arg0);
865
+ };
866
+ imports.wbg.__wbg_lost_6e4d29847ce2a34a = function(arg0) {
867
+ const ret = arg0.lost;
868
+ return ret;
869
+ };
870
+ imports.wbg.__wbg_mapAsync_37f5e03edf2e1352 = function(arg0, arg1, arg2, arg3) {
871
+ const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
872
+ return ret;
873
+ };
874
+ imports.wbg.__wbg_maxBindGroups_768ca5e8623bf450 = function(arg0) {
875
+ const ret = arg0.maxBindGroups;
876
+ return ret;
877
+ };
878
+ imports.wbg.__wbg_maxBindingsPerBindGroup_057972d600d69719 = function(arg0) {
879
+ const ret = arg0.maxBindingsPerBindGroup;
880
+ return ret;
881
+ };
882
+ imports.wbg.__wbg_maxBufferSize_e237b44f19a5a62b = function(arg0) {
883
+ const ret = arg0.maxBufferSize;
884
+ return ret;
885
+ };
886
+ imports.wbg.__wbg_maxColorAttachmentBytesPerSample_d6c7b4051d22c6d6 = function(arg0) {
887
+ const ret = arg0.maxColorAttachmentBytesPerSample;
888
+ return ret;
889
+ };
890
+ imports.wbg.__wbg_maxColorAttachments_7a18ba24c05edcfd = function(arg0) {
891
+ const ret = arg0.maxColorAttachments;
892
+ return ret;
893
+ };
894
+ imports.wbg.__wbg_maxComputeInvocationsPerWorkgroup_b99c2f3611633992 = function(arg0) {
895
+ const ret = arg0.maxComputeInvocationsPerWorkgroup;
896
+ return ret;
897
+ };
898
+ imports.wbg.__wbg_maxComputeWorkgroupSizeX_adb26da9ed7f77f7 = function(arg0) {
899
+ const ret = arg0.maxComputeWorkgroupSizeX;
900
+ return ret;
901
+ };
902
+ imports.wbg.__wbg_maxComputeWorkgroupSizeY_cc217559c98be33b = function(arg0) {
903
+ const ret = arg0.maxComputeWorkgroupSizeY;
904
+ return ret;
905
+ };
906
+ imports.wbg.__wbg_maxComputeWorkgroupSizeZ_66606a80e2cf2309 = function(arg0) {
907
+ const ret = arg0.maxComputeWorkgroupSizeZ;
908
+ return ret;
909
+ };
910
+ imports.wbg.__wbg_maxComputeWorkgroupStorageSize_cb6235497b8c4997 = function(arg0) {
911
+ const ret = arg0.maxComputeWorkgroupStorageSize;
912
+ return ret;
913
+ };
914
+ imports.wbg.__wbg_maxComputeWorkgroupsPerDimension_6bf550b5f21d57cf = function(arg0) {
915
+ const ret = arg0.maxComputeWorkgroupsPerDimension;
916
+ return ret;
917
+ };
918
+ imports.wbg.__wbg_maxDynamicStorageBuffersPerPipelineLayout_c6ac20334e328b47 = function(arg0) {
919
+ const ret = arg0.maxDynamicStorageBuffersPerPipelineLayout;
920
+ return ret;
921
+ };
922
+ imports.wbg.__wbg_maxDynamicUniformBuffersPerPipelineLayout_aa8f14a74b440f01 = function(arg0) {
923
+ const ret = arg0.maxDynamicUniformBuffersPerPipelineLayout;
924
+ return ret;
925
+ };
926
+ imports.wbg.__wbg_maxSampledTexturesPerShaderStage_db7c4922cc60144a = function(arg0) {
927
+ const ret = arg0.maxSampledTexturesPerShaderStage;
928
+ return ret;
929
+ };
930
+ imports.wbg.__wbg_maxSamplersPerShaderStage_538705fe2263e710 = function(arg0) {
931
+ const ret = arg0.maxSamplersPerShaderStage;
932
+ return ret;
933
+ };
934
+ imports.wbg.__wbg_maxStorageBufferBindingSize_32178c0f5f7f85cb = function(arg0) {
935
+ const ret = arg0.maxStorageBufferBindingSize;
936
+ return ret;
937
+ };
938
+ imports.wbg.__wbg_maxStorageBuffersPerShaderStage_9f67e9eae0089f77 = function(arg0) {
939
+ const ret = arg0.maxStorageBuffersPerShaderStage;
940
+ return ret;
941
+ };
942
+ imports.wbg.__wbg_maxStorageTexturesPerShaderStage_57239664936031cf = function(arg0) {
943
+ const ret = arg0.maxStorageTexturesPerShaderStage;
944
+ return ret;
945
+ };
946
+ imports.wbg.__wbg_maxTextureArrayLayers_db5d4e486c78ae04 = function(arg0) {
947
+ const ret = arg0.maxTextureArrayLayers;
948
+ return ret;
949
+ };
950
+ imports.wbg.__wbg_maxTextureDimension1D_3475085ffacabbdc = function(arg0) {
951
+ const ret = arg0.maxTextureDimension1D;
952
+ return ret;
953
+ };
954
+ imports.wbg.__wbg_maxTextureDimension2D_7c8d5ecf09eb8519 = function(arg0) {
955
+ const ret = arg0.maxTextureDimension2D;
956
+ return ret;
957
+ };
958
+ imports.wbg.__wbg_maxTextureDimension3D_8bd976677a0f91d4 = function(arg0) {
959
+ const ret = arg0.maxTextureDimension3D;
960
+ return ret;
961
+ };
962
+ imports.wbg.__wbg_maxUniformBufferBindingSize_95b1a54e7e4a0f0f = function(arg0) {
963
+ const ret = arg0.maxUniformBufferBindingSize;
964
+ return ret;
965
+ };
966
+ imports.wbg.__wbg_maxUniformBuffersPerShaderStage_5f475d9a453af14d = function(arg0) {
967
+ const ret = arg0.maxUniformBuffersPerShaderStage;
968
+ return ret;
969
+ };
970
+ imports.wbg.__wbg_maxVertexAttributes_4c48ca2f5d32f860 = function(arg0) {
971
+ const ret = arg0.maxVertexAttributes;
972
+ return ret;
973
+ };
974
+ imports.wbg.__wbg_maxVertexBufferArrayStride_2233f6933ecc5a16 = function(arg0) {
975
+ const ret = arg0.maxVertexBufferArrayStride;
976
+ return ret;
977
+ };
978
+ imports.wbg.__wbg_maxVertexBuffers_c47e508cd7348554 = function(arg0) {
979
+ const ret = arg0.maxVertexBuffers;
980
+ return ret;
981
+ };
982
+ imports.wbg.__wbg_message_0762358e59db7ed6 = function(arg0, arg1) {
983
+ const ret = arg1.message;
984
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
985
+ const len1 = WASM_VECTOR_LEN;
986
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
987
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
988
+ };
989
+ imports.wbg.__wbg_message_7957ab09f64c6822 = function(arg0, arg1) {
990
+ const ret = arg1.message;
991
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
992
+ const len1 = WASM_VECTOR_LEN;
993
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
994
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
995
+ };
996
+ imports.wbg.__wbg_message_b163994503433c9e = function(arg0, arg1) {
997
+ const ret = arg1.message;
998
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
999
+ const len1 = WASM_VECTOR_LEN;
1000
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1001
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1002
+ };
1003
+ imports.wbg.__wbg_messages_da071582f72bc978 = function(arg0) {
1004
+ const ret = arg0.messages;
1005
+ return ret;
1006
+ };
1007
+ imports.wbg.__wbg_minStorageBufferOffsetAlignment_51b4801fac3a58de = function(arg0) {
1008
+ const ret = arg0.minStorageBufferOffsetAlignment;
1009
+ return ret;
1010
+ };
1011
+ imports.wbg.__wbg_minUniformBufferOffsetAlignment_5d62a77924b2335f = function(arg0) {
1012
+ const ret = arg0.minUniformBufferOffsetAlignment;
1013
+ return ret;
1014
+ };
1015
+ imports.wbg.__wbg_navigator_11b7299bb7886507 = function(arg0) {
1016
+ const ret = arg0.navigator;
1017
+ return ret;
1018
+ };
1019
+ imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
1020
+ const ret = arg0.navigator;
1021
+ return ret;
1022
+ };
1023
+ imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
1024
+ const ret = new Object();
1025
+ return ret;
1026
+ };
1027
+ imports.wbg.__wbg_new_25f239778d6112b9 = function() {
1028
+ const ret = new Array();
1029
+ return ret;
1030
+ };
1031
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1032
+ const ret = new Error();
1033
+ return ret;
1034
+ };
1035
+ imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1036
+ try {
1037
+ var state0 = {a: arg0, b: arg1};
1038
+ var cb0 = (arg0, arg1) => {
1039
+ const a = state0.a;
1040
+ state0.a = 0;
1041
+ try {
1042
+ return wasm_bindgen__convert__closures_____invoke__h320f3d825d3712ba(a, state0.b, arg0, arg1);
1043
+ } finally {
1044
+ state0.a = a;
1045
+ }
1046
+ };
1047
+ const ret = new Promise(cb0);
1048
+ return ret;
1049
+ } finally {
1050
+ state0.a = state0.b = 0;
1051
+ }
1052
+ };
1053
+ imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1054
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1055
+ return ret;
1056
+ };
1057
+ imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1058
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1059
+ return ret;
1060
+ };
1061
+ imports.wbg.__wbg_new_with_byte_offset_and_length_d85c3da1fd8df149 = function(arg0, arg1, arg2) {
1062
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1063
+ return ret;
1064
+ };
1065
+ imports.wbg.__wbg_now_8cf15d6e317793e1 = function(arg0) {
1066
+ const ret = arg0.now();
1067
+ return ret;
1068
+ };
1069
+ imports.wbg.__wbg_offset_336f14c993863b76 = function(arg0) {
1070
+ const ret = arg0.offset;
1071
+ return ret;
1072
+ };
1073
+ imports.wbg.__wbg_popErrorScope_af0b22f136a861d6 = function(arg0) {
1074
+ const ret = arg0.popErrorScope();
1075
+ return ret;
1076
+ };
1077
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1078
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1079
+ };
1080
+ imports.wbg.__wbg_pushErrorScope_b52914ff10ba6ce3 = function(arg0, arg1) {
1081
+ arg0.pushErrorScope(__wbindgen_enum_GpuErrorFilter[arg1]);
1082
+ };
1083
+ imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1084
+ const ret = arg0.push(arg1);
1085
+ return ret;
1086
+ };
1087
+ imports.wbg.__wbg_querySelectorAll_aa1048eae18f6f1a = function() { return handleError(function (arg0, arg1, arg2) {
1088
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
1089
+ return ret;
1090
+ }, arguments) };
1091
+ imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1092
+ const ret = arg0.queueMicrotask;
1093
+ return ret;
1094
+ };
1095
+ imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1096
+ queueMicrotask(arg0);
1097
+ };
1098
+ imports.wbg.__wbg_queue_bea4017efaaf9904 = function(arg0) {
1099
+ const ret = arg0.queue;
1100
+ return ret;
1101
+ };
1102
+ imports.wbg.__wbg_reason_43acd39cce242b50 = function(arg0) {
1103
+ const ret = arg0.reason;
1104
+ return (__wbindgen_enum_GpuDeviceLostReason.indexOf(ret) + 1 || 3) - 1;
1105
+ };
1106
+ imports.wbg.__wbg_requestAdapter_e6dcfac497cafa7a = function(arg0, arg1) {
1107
+ const ret = arg0.requestAdapter(arg1);
1108
+ return ret;
1109
+ };
1110
+ imports.wbg.__wbg_requestDevice_03b802707d5a382c = function(arg0, arg1) {
1111
+ const ret = arg0.requestDevice(arg1);
1112
+ return ret;
1113
+ };
1114
+ imports.wbg.__wbg_resolveQuerySet_811661fb23f3b699 = function(arg0, arg1, arg2, arg3, arg4, arg5) {
1115
+ arg0.resolveQuerySet(arg1, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
1116
+ };
1117
+ imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1118
+ const ret = Promise.resolve(arg0);
1119
+ return ret;
1120
+ };
1121
+ imports.wbg.__wbg_setBindGroup_62a3045b0921e429 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1122
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
1123
+ };
1124
+ imports.wbg.__wbg_setBindGroup_6c0fd18e9a53a945 = function(arg0, arg1, arg2) {
1125
+ arg0.setBindGroup(arg1 >>> 0, arg2);
1126
+ };
1127
+ imports.wbg.__wbg_setBindGroup_7f3b61f1f482133b = function(arg0, arg1, arg2) {
1128
+ arg0.setBindGroup(arg1 >>> 0, arg2);
1129
+ };
1130
+ imports.wbg.__wbg_setBindGroup_bf767a5aa46a33ce = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1131
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
1132
+ };
1133
+ imports.wbg.__wbg_setBindGroup_c4aaff14063226b4 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1134
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
1135
+ };
1136
+ imports.wbg.__wbg_setBindGroup_f82e771dc1b69093 = function(arg0, arg1, arg2) {
1137
+ arg0.setBindGroup(arg1 >>> 0, arg2);
1138
+ };
1139
+ imports.wbg.__wbg_setBlendConstant_016723821cfb3aa4 = function(arg0, arg1) {
1140
+ arg0.setBlendConstant(arg1);
1141
+ };
1142
+ imports.wbg.__wbg_setIndexBuffer_286a40afdff411b7 = function(arg0, arg1, arg2, arg3) {
1143
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3);
1144
+ };
1145
+ imports.wbg.__wbg_setIndexBuffer_7efd0b7a40c65fb9 = function(arg0, arg1, arg2, arg3, arg4) {
1146
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
1147
+ };
1148
+ imports.wbg.__wbg_setIndexBuffer_e091a9673bb575e2 = function(arg0, arg1, arg2, arg3) {
1149
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3);
1150
+ };
1151
+ imports.wbg.__wbg_setIndexBuffer_f0759f00036f615f = function(arg0, arg1, arg2, arg3, arg4) {
1152
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
1153
+ };
1154
+ imports.wbg.__wbg_setPipeline_ba92070b8ee81cf9 = function(arg0, arg1) {
1155
+ arg0.setPipeline(arg1);
1156
+ };
1157
+ imports.wbg.__wbg_setPipeline_c344f76bae58c4d6 = function(arg0, arg1) {
1158
+ arg0.setPipeline(arg1);
1159
+ };
1160
+ imports.wbg.__wbg_setPipeline_d76451c50a121598 = function(arg0, arg1) {
1161
+ arg0.setPipeline(arg1);
1162
+ };
1163
+ imports.wbg.__wbg_setScissorRect_0b6ee0852ef0b6b9 = function(arg0, arg1, arg2, arg3, arg4) {
1164
+ arg0.setScissorRect(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0);
1165
+ };
1166
+ imports.wbg.__wbg_setStencilReference_34fd3d59673a5a9d = function(arg0, arg1) {
1167
+ arg0.setStencilReference(arg1 >>> 0);
1168
+ };
1169
+ imports.wbg.__wbg_setVertexBuffer_06a90dc78e1ad9c4 = function(arg0, arg1, arg2, arg3, arg4) {
1170
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4);
1171
+ };
1172
+ imports.wbg.__wbg_setVertexBuffer_1540e9118b6c451d = function(arg0, arg1, arg2, arg3) {
1173
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3);
1174
+ };
1175
+ imports.wbg.__wbg_setVertexBuffer_5166eedc06450701 = function(arg0, arg1, arg2, arg3, arg4) {
1176
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4);
1177
+ };
1178
+ imports.wbg.__wbg_setVertexBuffer_8621784e5014065b = function(arg0, arg1, arg2, arg3) {
1179
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3);
1180
+ };
1181
+ imports.wbg.__wbg_setViewport_731ad30abb13f744 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1182
+ arg0.setViewport(arg1, arg2, arg3, arg4, arg5, arg6);
1183
+ };
1184
+ imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
1185
+ const ret = Reflect.set(arg0, arg1, arg2);
1186
+ return ret;
1187
+ }, arguments) };
1188
+ imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
1189
+ arg0.set(arg1, arg2 >>> 0);
1190
+ };
1191
+ imports.wbg.__wbg_set_height_6f8f8ef4cb40e496 = function(arg0, arg1) {
1192
+ arg0.height = arg1 >>> 0;
1193
+ };
1194
+ imports.wbg.__wbg_set_height_afe09c24165867f7 = function(arg0, arg1) {
1195
+ arg0.height = arg1 >>> 0;
1196
+ };
1197
+ imports.wbg.__wbg_set_onuncapturederror_19541466822d790b = function(arg0, arg1) {
1198
+ arg0.onuncapturederror = arg1;
1199
+ };
1200
+ imports.wbg.__wbg_set_width_0a22c810f06a5152 = function(arg0, arg1) {
1201
+ arg0.width = arg1 >>> 0;
1202
+ };
1203
+ imports.wbg.__wbg_set_width_7ff7a22c6e9f423e = function(arg0, arg1) {
1204
+ arg0.width = arg1 >>> 0;
1205
+ };
1206
+ imports.wbg.__wbg_size_661bddb3f9898121 = function(arg0) {
1207
+ const ret = arg0.size;
1208
+ return ret;
1209
+ };
1210
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1211
+ const ret = arg1.stack;
1212
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1213
+ const len1 = WASM_VECTOR_LEN;
1214
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1215
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1216
+ };
1217
+ imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1218
+ const ret = typeof global === 'undefined' ? null : global;
1219
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1220
+ };
1221
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1222
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1223
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1224
+ };
1225
+ imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1226
+ const ret = typeof self === 'undefined' ? null : self;
1227
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1228
+ };
1229
+ imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1230
+ const ret = typeof window === 'undefined' ? null : window;
1231
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1232
+ };
1233
+ imports.wbg.__wbg_submit_f635072bb3d05faa = function(arg0, arg1) {
1234
+ arg0.submit(arg1);
1235
+ };
1236
+ imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1237
+ const ret = arg0.then(arg1, arg2);
1238
+ return ret;
1239
+ };
1240
+ imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1241
+ const ret = arg0.then(arg1);
1242
+ return ret;
1243
+ };
1244
+ imports.wbg.__wbg_type_c0d5d83032e9858a = function(arg0) {
1245
+ const ret = arg0.type;
1246
+ return (__wbindgen_enum_GpuCompilationMessageType.indexOf(ret) + 1 || 4) - 1;
1247
+ };
1248
+ imports.wbg.__wbg_unmap_8c2e8131b2aaa844 = function(arg0) {
1249
+ arg0.unmap();
1250
+ };
1251
+ imports.wbg.__wbg_usage_13caa02888040e9f = function(arg0) {
1252
+ const ret = arg0.usage;
1253
+ return ret;
1254
+ };
1255
+ imports.wbg.__wbg_valueOf_663ea9f1ad0d6eda = function(arg0) {
1256
+ const ret = arg0.valueOf();
1257
+ return ret;
1258
+ };
1259
+ imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
1260
+ console.warn(arg0);
1261
+ };
1262
+ imports.wbg.__wbg_wasmvisualiser_new = function(arg0) {
1263
+ const ret = WasmVisualiser.__wrap(arg0);
1264
+ return ret;
1265
+ };
1266
+ imports.wbg.__wbg_width_dd0cfe94d42f5143 = function(arg0) {
1267
+ const ret = arg0.width;
1268
+ return ret;
1269
+ };
1270
+ imports.wbg.__wbg_writeBuffer_5ca4981365eb5ac0 = function(arg0, arg1, arg2, arg3, arg4, arg5) {
1271
+ arg0.writeBuffer(arg1, arg2, arg3, arg4, arg5);
1272
+ };
1273
+ imports.wbg.__wbg_writeTexture_246118eb2f5a1592 = function(arg0, arg1, arg2, arg3, arg4) {
1274
+ arg0.writeTexture(arg1, arg2, arg3, arg4);
1275
+ };
1276
+ imports.wbg.__wbindgen_cast_1ad8672233d2fd7b = function(arg0, arg1) {
1277
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2007, function: Function { arguments: [Externref], shim_idx: 2008, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1278
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf5eaa61ced318e08, wasm_bindgen__convert__closures_____invoke__h53437a38721e89f7);
1279
+ return ret;
1280
+ };
1281
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1282
+ // Cast intrinsic for `Ref(String) -> Externref`.
1283
+ const ret = getStringFromWasm0(arg0, arg1);
1284
+ return ret;
1285
+ };
1286
+ imports.wbg.__wbindgen_cast_762879c56a766cac = function(arg0, arg1) {
1287
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1873, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 1874, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1288
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__heb49a8f426ac2d2e, wasm_bindgen__convert__closures_____invoke__h9d1c5a23ecfcd5c8);
1289
+ return ret;
1290
+ };
1291
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1292
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1293
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1294
+ return ret;
1295
+ };
1296
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1297
+ // Cast intrinsic for `F64 -> Externref`.
1298
+ const ret = arg0;
1299
+ return ret;
1300
+ };
1301
+ imports.wbg.__wbindgen_init_externref_table = function() {
1302
+ const table = wasm.__wbindgen_externrefs;
1303
+ const offset = table.grow(4);
1304
+ table.set(0, undefined);
1305
+ table.set(offset + 0, undefined);
1306
+ table.set(offset + 1, null);
1307
+ table.set(offset + 2, true);
1308
+ table.set(offset + 3, false);
1309
+ };
1310
+
1311
+ return imports;
1312
+ }
1313
+
1314
+ function __wbg_finalize_init(instance, module) {
1315
+ wasm = instance.exports;
1316
+ __wbg_init.__wbindgen_wasm_module = module;
1317
+ cachedDataViewMemory0 = null;
1318
+ cachedFloat32ArrayMemory0 = null;
1319
+ cachedUint32ArrayMemory0 = null;
1320
+ cachedUint8ArrayMemory0 = null;
1321
+
1322
+
1323
+ wasm.__wbindgen_start();
1324
+ return wasm;
1325
+ }
1326
+
1327
+ function initSync(module) {
1328
+ if (wasm !== undefined) return wasm;
1329
+
1330
+
1331
+ if (typeof module !== 'undefined') {
1332
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1333
+ ({module} = module)
1334
+ } else {
1335
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1336
+ }
1337
+ }
1338
+
1339
+ const imports = __wbg_get_imports();
1340
+ if (!(module instanceof WebAssembly.Module)) {
1341
+ module = new WebAssembly.Module(module);
1342
+ }
1343
+ const instance = new WebAssembly.Instance(module, imports);
1344
+ return __wbg_finalize_init(instance, module);
1345
+ }
1346
+
1347
+ async function __wbg_init(module_or_path) {
1348
+ if (wasm !== undefined) return wasm;
1349
+
1350
+
1351
+ if (typeof module_or_path !== 'undefined') {
1352
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1353
+ ({module_or_path} = module_or_path)
1354
+ } else {
1355
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1356
+ }
1357
+ }
1358
+
1359
+ if (typeof module_or_path === 'undefined') {
1360
+ module_or_path = new URL('visualiser_bg.wasm', import.meta.url);
1361
+ }
1362
+ const imports = __wbg_get_imports();
1363
+
1364
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1365
+ module_or_path = fetch(module_or_path);
1366
+ }
1367
+
1368
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1369
+
1370
+ return __wbg_finalize_init(instance, module);
1371
+ }
1372
+
1373
+ export { initSync };
1374
+ export default __wbg_init;