@kofany/beamterm-terx 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1908 @@
1
+ let wasm;
2
+ export function __wbg_set_wasm(val) {
3
+ wasm = val;
4
+ }
5
+
6
+ function addToExternrefTable0(obj) {
7
+ const idx = wasm.__externref_table_alloc();
8
+ wasm.__wbindgen_externrefs.set(idx, obj);
9
+ return idx;
10
+ }
11
+
12
+ function _assertClass(instance, klass) {
13
+ if (!(instance instanceof klass)) {
14
+ throw new Error(`expected instance of ${klass.name}`);
15
+ }
16
+ }
17
+
18
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
19
+ ? { register: () => {}, unregister: () => {} }
20
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
21
+
22
+ function debugString(val) {
23
+ // primitive types
24
+ const type = typeof val;
25
+ if (type == 'number' || type == 'boolean' || val == null) {
26
+ return `${val}`;
27
+ }
28
+ if (type == 'string') {
29
+ return `"${val}"`;
30
+ }
31
+ if (type == 'symbol') {
32
+ const description = val.description;
33
+ if (description == null) {
34
+ return 'Symbol';
35
+ } else {
36
+ return `Symbol(${description})`;
37
+ }
38
+ }
39
+ if (type == 'function') {
40
+ const name = val.name;
41
+ if (typeof name == 'string' && name.length > 0) {
42
+ return `Function(${name})`;
43
+ } else {
44
+ return 'Function';
45
+ }
46
+ }
47
+ // objects
48
+ if (Array.isArray(val)) {
49
+ const length = val.length;
50
+ let debug = '[';
51
+ if (length > 0) {
52
+ debug += debugString(val[0]);
53
+ }
54
+ for(let i = 1; i < length; i++) {
55
+ debug += ', ' + debugString(val[i]);
56
+ }
57
+ debug += ']';
58
+ return debug;
59
+ }
60
+ // Test for built-in
61
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
62
+ let className;
63
+ if (builtInMatches && builtInMatches.length > 1) {
64
+ className = builtInMatches[1];
65
+ } else {
66
+ // Failed to match the standard '[object ClassName]'
67
+ return toString.call(val);
68
+ }
69
+ if (className == 'Object') {
70
+ // we're a user defined class or Object
71
+ // JSON.stringify avoids problems with cycles, and is generally much
72
+ // easier than looping through ownProperties of `val`.
73
+ try {
74
+ return 'Object(' + JSON.stringify(val) + ')';
75
+ } catch (_) {
76
+ return 'Object';
77
+ }
78
+ }
79
+ // errors
80
+ if (val instanceof Error) {
81
+ return `${val.name}: ${val.message}\n${val.stack}`;
82
+ }
83
+ // TODO we could test for more things here, like `Set`s and `Map`s.
84
+ return className;
85
+ }
86
+
87
+ function getArrayF32FromWasm0(ptr, len) {
88
+ ptr = ptr >>> 0;
89
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
90
+ }
91
+
92
+ function getArrayU8FromWasm0(ptr, len) {
93
+ ptr = ptr >>> 0;
94
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
95
+ }
96
+
97
+ let cachedDataViewMemory0 = null;
98
+ function getDataViewMemory0() {
99
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
100
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
101
+ }
102
+ return cachedDataViewMemory0;
103
+ }
104
+
105
+ let cachedFloat32ArrayMemory0 = null;
106
+ function getFloat32ArrayMemory0() {
107
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
108
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
109
+ }
110
+ return cachedFloat32ArrayMemory0;
111
+ }
112
+
113
+ function getStringFromWasm0(ptr, len) {
114
+ ptr = ptr >>> 0;
115
+ return decodeText(ptr, len);
116
+ }
117
+
118
+ let cachedUint8ArrayMemory0 = null;
119
+ function getUint8ArrayMemory0() {
120
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
121
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
122
+ }
123
+ return cachedUint8ArrayMemory0;
124
+ }
125
+
126
+ function handleError(f, args) {
127
+ try {
128
+ return f.apply(this, args);
129
+ } catch (e) {
130
+ const idx = addToExternrefTable0(e);
131
+ wasm.__wbindgen_exn_store(idx);
132
+ }
133
+ }
134
+
135
+ function isLikeNone(x) {
136
+ return x === undefined || x === null;
137
+ }
138
+
139
+ function makeMutClosure(arg0, arg1, dtor, f) {
140
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
141
+ const real = (...args) => {
142
+
143
+ // First up with a closure we increment the internal reference
144
+ // count. This ensures that the Rust closure environment won't
145
+ // be deallocated while we're invoking it.
146
+ state.cnt++;
147
+ const a = state.a;
148
+ state.a = 0;
149
+ try {
150
+ return f(a, state.b, ...args);
151
+ } finally {
152
+ state.a = a;
153
+ real._wbg_cb_unref();
154
+ }
155
+ };
156
+ real._wbg_cb_unref = () => {
157
+ if (--state.cnt === 0) {
158
+ state.dtor(state.a, state.b);
159
+ state.a = 0;
160
+ CLOSURE_DTORS.unregister(state);
161
+ }
162
+ };
163
+ CLOSURE_DTORS.register(real, state, state);
164
+ return real;
165
+ }
166
+
167
+ function passArray8ToWasm0(arg, malloc) {
168
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
169
+ getUint8ArrayMemory0().set(arg, ptr / 1);
170
+ WASM_VECTOR_LEN = arg.length;
171
+ return ptr;
172
+ }
173
+
174
+ function passStringToWasm0(arg, malloc, realloc) {
175
+ if (realloc === undefined) {
176
+ const buf = cachedTextEncoder.encode(arg);
177
+ const ptr = malloc(buf.length, 1) >>> 0;
178
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
179
+ WASM_VECTOR_LEN = buf.length;
180
+ return ptr;
181
+ }
182
+
183
+ let len = arg.length;
184
+ let ptr = malloc(len, 1) >>> 0;
185
+
186
+ const mem = getUint8ArrayMemory0();
187
+
188
+ let offset = 0;
189
+
190
+ for (; offset < len; offset++) {
191
+ const code = arg.charCodeAt(offset);
192
+ if (code > 0x7F) break;
193
+ mem[ptr + offset] = code;
194
+ }
195
+ if (offset !== len) {
196
+ if (offset !== 0) {
197
+ arg = arg.slice(offset);
198
+ }
199
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
200
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
201
+ const ret = cachedTextEncoder.encodeInto(arg, view);
202
+
203
+ offset += ret.written;
204
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
205
+ }
206
+
207
+ WASM_VECTOR_LEN = offset;
208
+ return ptr;
209
+ }
210
+
211
+ function takeFromExternrefTable0(idx) {
212
+ const value = wasm.__wbindgen_externrefs.get(idx);
213
+ wasm.__externref_table_dealloc(idx);
214
+ return value;
215
+ }
216
+
217
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
218
+ cachedTextDecoder.decode();
219
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
220
+ let numBytesDecoded = 0;
221
+ function decodeText(ptr, len) {
222
+ numBytesDecoded += len;
223
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
224
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
225
+ cachedTextDecoder.decode();
226
+ numBytesDecoded = len;
227
+ }
228
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
229
+ }
230
+
231
+ const cachedTextEncoder = new TextEncoder();
232
+
233
+ if (!('encodeInto' in cachedTextEncoder)) {
234
+ cachedTextEncoder.encodeInto = function (arg, view) {
235
+ const buf = cachedTextEncoder.encode(arg);
236
+ view.set(buf);
237
+ return {
238
+ read: arg.length,
239
+ written: buf.length
240
+ };
241
+ }
242
+ }
243
+
244
+ let WASM_VECTOR_LEN = 0;
245
+
246
+ function wasm_bindgen__convert__closures_____invoke__hbee1b5e623a87165(arg0, arg1, arg2) {
247
+ wasm.wasm_bindgen__convert__closures_____invoke__hbee1b5e623a87165(arg0, arg1, arg2);
248
+ }
249
+
250
+ function wasm_bindgen__convert__closures_____invoke__h4d1e7414f3e2b484(arg0, arg1, arg2) {
251
+ wasm.wasm_bindgen__convert__closures_____invoke__h4d1e7414f3e2b484(arg0, arg1, arg2);
252
+ }
253
+
254
+ const BatchFinalization = (typeof FinalizationRegistry === 'undefined')
255
+ ? { register: () => {}, unregister: () => {} }
256
+ : new FinalizationRegistry(ptr => wasm.__wbg_batch_free(ptr >>> 0, 1));
257
+
258
+ const BeamtermRendererFinalization = (typeof FinalizationRegistry === 'undefined')
259
+ ? { register: () => {}, unregister: () => {} }
260
+ : new FinalizationRegistry(ptr => wasm.__wbg_beamtermrenderer_free(ptr >>> 0, 1));
261
+
262
+ const CellFinalization = (typeof FinalizationRegistry === 'undefined')
263
+ ? { register: () => {}, unregister: () => {} }
264
+ : new FinalizationRegistry(ptr => wasm.__wbg_cell_free(ptr >>> 0, 1));
265
+
266
+ const CellQueryFinalization = (typeof FinalizationRegistry === 'undefined')
267
+ ? { register: () => {}, unregister: () => {} }
268
+ : new FinalizationRegistry(ptr => wasm.__wbg_cellquery_free(ptr >>> 0, 1));
269
+
270
+ const CellStyleFinalization = (typeof FinalizationRegistry === 'undefined')
271
+ ? { register: () => {}, unregister: () => {} }
272
+ : new FinalizationRegistry(ptr => wasm.__wbg_cellstyle_free(ptr >>> 0, 1));
273
+
274
+ const MouseEventFinalization = (typeof FinalizationRegistry === 'undefined')
275
+ ? { register: () => {}, unregister: () => {} }
276
+ : new FinalizationRegistry(ptr => wasm.__wbg_mouseevent_free(ptr >>> 0, 1));
277
+
278
+ const SizeFinalization = (typeof FinalizationRegistry === 'undefined')
279
+ ? { register: () => {}, unregister: () => {} }
280
+ : new FinalizationRegistry(ptr => wasm.__wbg_size_free(ptr >>> 0, 1));
281
+
282
+ const TerminalDebugApiFinalization = (typeof FinalizationRegistry === 'undefined')
283
+ ? { register: () => {}, unregister: () => {} }
284
+ : new FinalizationRegistry(ptr => wasm.__wbg_terminaldebugapi_free(ptr >>> 0, 1));
285
+
286
+ export class Batch {
287
+ static __wrap(ptr) {
288
+ ptr = ptr >>> 0;
289
+ const obj = Object.create(Batch.prototype);
290
+ obj.__wbg_ptr = ptr;
291
+ BatchFinalization.register(obj, obj.__wbg_ptr, obj);
292
+ return obj;
293
+ }
294
+ __destroy_into_raw() {
295
+ const ptr = this.__wbg_ptr;
296
+ this.__wbg_ptr = 0;
297
+ BatchFinalization.unregister(this);
298
+ return ptr;
299
+ }
300
+ free() {
301
+ const ptr = this.__destroy_into_raw();
302
+ wasm.__wbg_batch_free(ptr, 0);
303
+ }
304
+ /**
305
+ * Updates a cell by its buffer index.
306
+ * @param {number} idx
307
+ * @param {Cell} cell_data
308
+ */
309
+ cellByIndex(idx, cell_data) {
310
+ _assertClass(cell_data, Cell);
311
+ wasm.batch_cellByIndex(this.__wbg_ptr, idx, cell_data.__wbg_ptr);
312
+ }
313
+ /**
314
+ * Updates a single cell at the given position.
315
+ * @param {number} x
316
+ * @param {number} y
317
+ * @param {Cell} cell_data
318
+ */
319
+ cell(x, y, cell_data) {
320
+ _assertClass(cell_data, Cell);
321
+ wasm.batch_cell(this.__wbg_ptr, x, y, cell_data.__wbg_ptr);
322
+ }
323
+ /**
324
+ * Fill a rectangular region
325
+ * @param {number} x
326
+ * @param {number} y
327
+ * @param {number} width
328
+ * @param {number} height
329
+ * @param {Cell} cell_data
330
+ */
331
+ fill(x, y, width, height, cell_data) {
332
+ _assertClass(cell_data, Cell);
333
+ const ret = wasm.batch_fill(this.__wbg_ptr, x, y, width, height, cell_data.__wbg_ptr);
334
+ if (ret[1]) {
335
+ throw takeFromExternrefTable0(ret[0]);
336
+ }
337
+ }
338
+ /**
339
+ * Write text to the terminal
340
+ * @param {number} x
341
+ * @param {number} y
342
+ * @param {string} text
343
+ * @param {CellStyle} style
344
+ */
345
+ text(x, y, text, style) {
346
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ _assertClass(style, CellStyle);
349
+ const ret = wasm.batch_text(this.__wbg_ptr, x, y, ptr0, len0, style.__wbg_ptr);
350
+ if (ret[1]) {
351
+ throw takeFromExternrefTable0(ret[0]);
352
+ }
353
+ }
354
+ /**
355
+ * Updates multiple cells from an array.
356
+ * Each element should be [x, y, cellData].
357
+ * @param {any} cells_json
358
+ */
359
+ cells(cells_json) {
360
+ const ret = wasm.batch_cells(this.__wbg_ptr, cells_json);
361
+ if (ret[1]) {
362
+ throw takeFromExternrefTable0(ret[0]);
363
+ }
364
+ }
365
+ /**
366
+ * Clear the terminal with specified background color
367
+ * @param {number} bg
368
+ */
369
+ clear(bg) {
370
+ const ret = wasm.batch_clear(this.__wbg_ptr, bg);
371
+ if (ret[1]) {
372
+ throw takeFromExternrefTable0(ret[0]);
373
+ }
374
+ }
375
+ /**
376
+ * Synchronize all pending updates to the GPU
377
+ */
378
+ flush() {
379
+ const ret = wasm.batch_flush(this.__wbg_ptr);
380
+ if (ret[1]) {
381
+ throw takeFromExternrefTable0(ret[0]);
382
+ }
383
+ }
384
+ }
385
+ if (Symbol.dispose) Batch.prototype[Symbol.dispose] = Batch.prototype.free;
386
+
387
+ /**
388
+ * JavaScript wrapper for the terminal renderer
389
+ */
390
+ export class BeamtermRenderer {
391
+ static __wrap(ptr) {
392
+ ptr = ptr >>> 0;
393
+ const obj = Object.create(BeamtermRenderer.prototype);
394
+ obj.__wbg_ptr = ptr;
395
+ BeamtermRendererFinalization.register(obj, obj.__wbg_ptr, obj);
396
+ return obj;
397
+ }
398
+ __destroy_into_raw() {
399
+ const ptr = this.__wbg_ptr;
400
+ this.__wbg_ptr = 0;
401
+ BeamtermRendererFinalization.unregister(this);
402
+ return ptr;
403
+ }
404
+ free() {
405
+ const ptr = this.__destroy_into_raw();
406
+ wasm.__wbg_beamtermrenderer_free(ptr, 0);
407
+ }
408
+ /**
409
+ * Check if there is an active selection
410
+ * @returns {boolean}
411
+ */
412
+ hasSelection() {
413
+ const ret = wasm.beamtermrenderer_hasSelection(this.__wbg_ptr);
414
+ return ret !== 0;
415
+ }
416
+ /**
417
+ * Get the terminal dimensions in cells
418
+ * @returns {Size}
419
+ */
420
+ terminalSize() {
421
+ const ret = wasm.beamtermrenderer_terminalSize(this.__wbg_ptr);
422
+ return Size.__wrap(ret);
423
+ }
424
+ /**
425
+ * Clear any active selection
426
+ */
427
+ clearSelection() {
428
+ wasm.beamtermrenderer_clearSelection(this.__wbg_ptr);
429
+ }
430
+ /**
431
+ * Enable default mouse selection behavior with built-in copy to clipboard.
432
+ *
433
+ * # Arguments
434
+ * * `mode` - Selection mode (Linear or Block)
435
+ * * `trim_whitespace` - Whether to trim trailing whitespace from selections
436
+ * * `drag_threshold_ms` - Optional minimum time (ms) before drag activates selection.
437
+ * Defaults to 200ms. Higher values prevent accidental selections during fast gestures.
438
+ * @param {SelectionMode} mode
439
+ * @param {boolean} trim_whitespace
440
+ * @param {number | null} [drag_threshold_ms]
441
+ */
442
+ enableSelection(mode, trim_whitespace, drag_threshold_ms) {
443
+ const ret = wasm.beamtermrenderer_enableSelection(this.__wbg_ptr, mode, trim_whitespace, !isLikeNone(drag_threshold_ms), isLikeNone(drag_threshold_ms) ? 0 : drag_threshold_ms);
444
+ if (ret[1]) {
445
+ throw takeFromExternrefTable0(ret[0]);
446
+ }
447
+ }
448
+ /**
449
+ * Create a new render batch
450
+ * @returns {Batch}
451
+ */
452
+ batch() {
453
+ const ret = wasm.beamtermrenderer_batch(this.__wbg_ptr);
454
+ return Batch.__wrap(ret);
455
+ }
456
+ /**
457
+ * Copy text to the system clipboard
458
+ * @param {string} text
459
+ */
460
+ copyToClipboard(text) {
461
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len0 = WASM_VECTOR_LEN;
463
+ wasm.beamtermrenderer_copyToClipboard(this.__wbg_ptr, ptr0, len0);
464
+ }
465
+ /**
466
+ * Set a custom mouse event handler
467
+ * @param {Function} handler
468
+ */
469
+ setMouseHandler(handler) {
470
+ const ret = wasm.beamtermrenderer_setMouseHandler(this.__wbg_ptr, handler);
471
+ if (ret[1]) {
472
+ throw takeFromExternrefTable0(ret[0]);
473
+ }
474
+ }
475
+ /**
476
+ * Create a terminal renderer with custom static font atlas data.
477
+ *
478
+ * # Arguments
479
+ * * `canvas_id` - CSS selector for the canvas element
480
+ * * `atlas_data` - Binary atlas data (from .atlas file), or null for default
481
+ * @param {string} canvas_id
482
+ * @param {Uint8Array | null} [atlas_data]
483
+ * @returns {BeamtermRenderer}
484
+ */
485
+ static withStaticAtlas(canvas_id, atlas_data) {
486
+ const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
+ const len0 = WASM_VECTOR_LEN;
488
+ const ret = wasm.beamtermrenderer_withStaticAtlas(ptr0, len0, isLikeNone(atlas_data) ? 0 : addToExternrefTable0(atlas_data));
489
+ if (ret[2]) {
490
+ throw takeFromExternrefTable0(ret[1]);
491
+ }
492
+ return BeamtermRenderer.__wrap(ret[0]);
493
+ }
494
+ /**
495
+ * Create a terminal renderer with a dynamic font atlas using browser fonts.
496
+ *
497
+ * The dynamic atlas rasterizes glyphs on-demand using the browser's canvas API,
498
+ * enabling support for any system font, emoji, and complex scripts.
499
+ *
500
+ * # Arguments
501
+ * * `canvas_id` - CSS selector for the canvas element
502
+ * * `font_family` - Array of font family names (e.g., `["Hack", "JetBrains Mono"]`)
503
+ * * `font_size` - Font size in pixels
504
+ *
505
+ * # Example
506
+ * ```javascript
507
+ * const renderer = BeamtermRenderer.withDynamicAtlas(
508
+ * "#terminal",
509
+ * ["JetBrains Mono", "Fira Code"],
510
+ * 16.0
511
+ * );
512
+ * ```
513
+ * @param {string} canvas_id
514
+ * @param {Array<any>} font_family
515
+ * @param {number} font_size
516
+ * @returns {BeamtermRenderer}
517
+ */
518
+ static withDynamicAtlas(canvas_id, font_family, font_size) {
519
+ const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
520
+ const len0 = WASM_VECTOR_LEN;
521
+ const ret = wasm.beamtermrenderer_withDynamicAtlas(ptr0, len0, font_family, font_size);
522
+ if (ret[2]) {
523
+ throw takeFromExternrefTable0(ret[1]);
524
+ }
525
+ return BeamtermRenderer.__wrap(ret[0]);
526
+ }
527
+ /**
528
+ * Create a new terminal renderer with the default embedded font atlas.
529
+ * @param {string} canvas_id
530
+ */
531
+ constructor(canvas_id) {
532
+ const ptr0 = passStringToWasm0(canvas_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
533
+ const len0 = WASM_VECTOR_LEN;
534
+ const ret = wasm.beamtermrenderer_new(ptr0, len0);
535
+ if (ret[2]) {
536
+ throw takeFromExternrefTable0(ret[1]);
537
+ }
538
+ this.__wbg_ptr = ret[0] >>> 0;
539
+ BeamtermRendererFinalization.register(this, this.__wbg_ptr, this);
540
+ return this;
541
+ }
542
+ /**
543
+ * Render the terminal to the canvas
544
+ */
545
+ render() {
546
+ wasm.beamtermrenderer_render(this.__wbg_ptr);
547
+ }
548
+ /**
549
+ * Resize the terminal to fit new canvas dimensions
550
+ * @param {number} width
551
+ * @param {number} height
552
+ */
553
+ resize(width, height) {
554
+ const ret = wasm.beamtermrenderer_resize(this.__wbg_ptr, width, height);
555
+ if (ret[1]) {
556
+ throw takeFromExternrefTable0(ret[0]);
557
+ }
558
+ }
559
+ /**
560
+ * Get selected text based on a cell query
561
+ * @param {CellQuery} query
562
+ * @returns {string}
563
+ */
564
+ getText(query) {
565
+ let deferred1_0;
566
+ let deferred1_1;
567
+ try {
568
+ _assertClass(query, CellQuery);
569
+ const ret = wasm.beamtermrenderer_getText(this.__wbg_ptr, query.__wbg_ptr);
570
+ deferred1_0 = ret[0];
571
+ deferred1_1 = ret[1];
572
+ return getStringFromWasm0(ret[0], ret[1]);
573
+ } finally {
574
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
575
+ }
576
+ }
577
+ /**
578
+ * Get the cell size in pixels
579
+ * @returns {Size}
580
+ */
581
+ cellSize() {
582
+ const ret = wasm.beamtermrenderer_cellSize(this.__wbg_ptr);
583
+ return Size.__wrap(ret);
584
+ }
585
+ }
586
+ if (Symbol.dispose) BeamtermRenderer.prototype[Symbol.dispose] = BeamtermRenderer.prototype.free;
587
+
588
+ /**
589
+ * JavaScript wrapper for cell data
590
+ */
591
+ export class Cell {
592
+ static __wrap(ptr) {
593
+ ptr = ptr >>> 0;
594
+ const obj = Object.create(Cell.prototype);
595
+ obj.__wbg_ptr = ptr;
596
+ CellFinalization.register(obj, obj.__wbg_ptr, obj);
597
+ return obj;
598
+ }
599
+ __destroy_into_raw() {
600
+ const ptr = this.__wbg_ptr;
601
+ this.__wbg_ptr = 0;
602
+ CellFinalization.unregister(this);
603
+ return ptr;
604
+ }
605
+ free() {
606
+ const ptr = this.__destroy_into_raw();
607
+ wasm.__wbg_cell_free(ptr, 0);
608
+ }
609
+ /**
610
+ * @param {string} symbol
611
+ */
612
+ set symbol(symbol) {
613
+ const ptr0 = passStringToWasm0(symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
614
+ const len0 = WASM_VECTOR_LEN;
615
+ wasm.cell_set_symbol(this.__wbg_ptr, ptr0, len0);
616
+ }
617
+ /**
618
+ * @returns {number}
619
+ */
620
+ get bg() {
621
+ const ret = wasm.cell_bg(this.__wbg_ptr);
622
+ return ret >>> 0;
623
+ }
624
+ /**
625
+ * @returns {number}
626
+ */
627
+ get fg() {
628
+ const ret = wasm.cell_fg(this.__wbg_ptr);
629
+ return ret >>> 0;
630
+ }
631
+ /**
632
+ * @param {string} symbol
633
+ * @param {CellStyle} style
634
+ */
635
+ constructor(symbol, style) {
636
+ const ptr0 = passStringToWasm0(symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
+ const len0 = WASM_VECTOR_LEN;
638
+ _assertClass(style, CellStyle);
639
+ const ret = wasm.cell_new(ptr0, len0, style.__wbg_ptr);
640
+ this.__wbg_ptr = ret >>> 0;
641
+ CellFinalization.register(this, this.__wbg_ptr, this);
642
+ return this;
643
+ }
644
+ /**
645
+ * @returns {number}
646
+ */
647
+ get style() {
648
+ const ret = wasm.cell_style(this.__wbg_ptr);
649
+ return ret;
650
+ }
651
+ /**
652
+ * @param {number} color
653
+ */
654
+ set bg(color) {
655
+ wasm.cell_set_bg(this.__wbg_ptr, color);
656
+ }
657
+ /**
658
+ * @param {number} color
659
+ */
660
+ set fg(color) {
661
+ wasm.cell_set_fg(this.__wbg_ptr, color);
662
+ }
663
+ /**
664
+ * @returns {string}
665
+ */
666
+ get symbol() {
667
+ let deferred1_0;
668
+ let deferred1_1;
669
+ try {
670
+ const ret = wasm.cell_symbol(this.__wbg_ptr);
671
+ deferred1_0 = ret[0];
672
+ deferred1_1 = ret[1];
673
+ return getStringFromWasm0(ret[0], ret[1]);
674
+ } finally {
675
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
676
+ }
677
+ }
678
+ /**
679
+ * @param {number} style
680
+ */
681
+ set style(style) {
682
+ wasm.cell_set_style(this.__wbg_ptr, style);
683
+ }
684
+ }
685
+ if (Symbol.dispose) Cell.prototype[Symbol.dispose] = Cell.prototype.free;
686
+
687
+ /**
688
+ * Query for selecting cells in the terminal
689
+ */
690
+ export class CellQuery {
691
+ static __wrap(ptr) {
692
+ ptr = ptr >>> 0;
693
+ const obj = Object.create(CellQuery.prototype);
694
+ obj.__wbg_ptr = ptr;
695
+ CellQueryFinalization.register(obj, obj.__wbg_ptr, obj);
696
+ return obj;
697
+ }
698
+ __destroy_into_raw() {
699
+ const ptr = this.__wbg_ptr;
700
+ this.__wbg_ptr = 0;
701
+ CellQueryFinalization.unregister(this);
702
+ return ptr;
703
+ }
704
+ free() {
705
+ const ptr = this.__destroy_into_raw();
706
+ wasm.__wbg_cellquery_free(ptr, 0);
707
+ }
708
+ /**
709
+ * Configure whether to trim trailing whitespace from lines
710
+ * @param {boolean} enabled
711
+ * @returns {CellQuery}
712
+ */
713
+ trimTrailingWhitespace(enabled) {
714
+ const ptr = this.__destroy_into_raw();
715
+ const ret = wasm.cellquery_trimTrailingWhitespace(ptr, enabled);
716
+ return CellQuery.__wrap(ret);
717
+ }
718
+ /**
719
+ * Set the ending position for the selection
720
+ * @param {number} col
721
+ * @param {number} row
722
+ * @returns {CellQuery}
723
+ */
724
+ end(col, row) {
725
+ const ptr = this.__destroy_into_raw();
726
+ const ret = wasm.cellquery_end(ptr, col, row);
727
+ return CellQuery.__wrap(ret);
728
+ }
729
+ /**
730
+ * Create a new cell query with the specified selection mode
731
+ * @param {SelectionMode} mode
732
+ */
733
+ constructor(mode) {
734
+ const ret = wasm.cellquery_new(mode);
735
+ this.__wbg_ptr = ret >>> 0;
736
+ CellQueryFinalization.register(this, this.__wbg_ptr, this);
737
+ return this;
738
+ }
739
+ /**
740
+ * Set the starting position for the selection
741
+ * @param {number} col
742
+ * @param {number} row
743
+ * @returns {CellQuery}
744
+ */
745
+ start(col, row) {
746
+ const ptr = this.__destroy_into_raw();
747
+ const ret = wasm.cellquery_start(ptr, col, row);
748
+ return CellQuery.__wrap(ret);
749
+ }
750
+ /**
751
+ * Check if the query is empty (no selection range)
752
+ * @returns {boolean}
753
+ */
754
+ isEmpty() {
755
+ const ret = wasm.cellquery_isEmpty(this.__wbg_ptr);
756
+ return ret !== 0;
757
+ }
758
+ }
759
+ if (Symbol.dispose) CellQuery.prototype[Symbol.dispose] = CellQuery.prototype.free;
760
+
761
+ export class CellStyle {
762
+ static __wrap(ptr) {
763
+ ptr = ptr >>> 0;
764
+ const obj = Object.create(CellStyle.prototype);
765
+ obj.__wbg_ptr = ptr;
766
+ CellStyleFinalization.register(obj, obj.__wbg_ptr, obj);
767
+ return obj;
768
+ }
769
+ __destroy_into_raw() {
770
+ const ptr = this.__wbg_ptr;
771
+ this.__wbg_ptr = 0;
772
+ CellStyleFinalization.unregister(this);
773
+ return ptr;
774
+ }
775
+ free() {
776
+ const ptr = this.__destroy_into_raw();
777
+ wasm.__wbg_cellstyle_free(ptr, 0);
778
+ }
779
+ /**
780
+ * Add strikethrough effect
781
+ * @returns {CellStyle}
782
+ */
783
+ strikethrough() {
784
+ const ptr = this.__destroy_into_raw();
785
+ const ret = wasm.cellstyle_strikethrough(ptr);
786
+ return CellStyle.__wrap(ret);
787
+ }
788
+ /**
789
+ * Sets the background color
790
+ * @param {number} color
791
+ * @returns {CellStyle}
792
+ */
793
+ bg(color) {
794
+ const ptr = this.__destroy_into_raw();
795
+ const ret = wasm.cellstyle_bg(ptr, color);
796
+ return CellStyle.__wrap(ret);
797
+ }
798
+ /**
799
+ * Sets the foreground color
800
+ * @param {number} color
801
+ * @returns {CellStyle}
802
+ */
803
+ fg(color) {
804
+ const ptr = this.__destroy_into_raw();
805
+ const ret = wasm.cellstyle_fg(ptr, color);
806
+ return CellStyle.__wrap(ret);
807
+ }
808
+ /**
809
+ * Create a new TextStyle with default (normal) style
810
+ */
811
+ constructor() {
812
+ const ret = wasm.cellstyle_new();
813
+ this.__wbg_ptr = ret >>> 0;
814
+ CellStyleFinalization.register(this, this.__wbg_ptr, this);
815
+ return this;
816
+ }
817
+ /**
818
+ * Get the combined style bits
819
+ * @returns {number}
820
+ */
821
+ get bits() {
822
+ const ret = wasm.cellstyle_bits(this.__wbg_ptr);
823
+ return ret;
824
+ }
825
+ /**
826
+ * Add bold style
827
+ * @returns {CellStyle}
828
+ */
829
+ bold() {
830
+ const ptr = this.__destroy_into_raw();
831
+ const ret = wasm.cellstyle_bold(ptr);
832
+ return CellStyle.__wrap(ret);
833
+ }
834
+ /**
835
+ * Add italic style
836
+ * @returns {CellStyle}
837
+ */
838
+ italic() {
839
+ const ptr = this.__destroy_into_raw();
840
+ const ret = wasm.cellstyle_italic(ptr);
841
+ return CellStyle.__wrap(ret);
842
+ }
843
+ /**
844
+ * Add underline effect
845
+ * @returns {CellStyle}
846
+ */
847
+ underline() {
848
+ const ptr = this.__destroy_into_raw();
849
+ const ret = wasm.cellstyle_underline(ptr);
850
+ return CellStyle.__wrap(ret);
851
+ }
852
+ }
853
+ if (Symbol.dispose) CellStyle.prototype[Symbol.dispose] = CellStyle.prototype.free;
854
+
855
+ /**
856
+ * Mouse event data with terminal coordinates
857
+ */
858
+ export class MouseEvent {
859
+ static __wrap(ptr) {
860
+ ptr = ptr >>> 0;
861
+ const obj = Object.create(MouseEvent.prototype);
862
+ obj.__wbg_ptr = ptr;
863
+ MouseEventFinalization.register(obj, obj.__wbg_ptr, obj);
864
+ return obj;
865
+ }
866
+ __destroy_into_raw() {
867
+ const ptr = this.__wbg_ptr;
868
+ this.__wbg_ptr = 0;
869
+ MouseEventFinalization.unregister(this);
870
+ return ptr;
871
+ }
872
+ free() {
873
+ const ptr = this.__destroy_into_raw();
874
+ wasm.__wbg_mouseevent_free(ptr, 0);
875
+ }
876
+ /**
877
+ * Type of mouse event
878
+ * @returns {MouseEventType}
879
+ */
880
+ get event_type() {
881
+ const ret = wasm.__wbg_get_mouseevent_event_type(this.__wbg_ptr);
882
+ return ret;
883
+ }
884
+ /**
885
+ * Type of mouse event
886
+ * @param {MouseEventType} arg0
887
+ */
888
+ set event_type(arg0) {
889
+ wasm.__wbg_set_mouseevent_event_type(this.__wbg_ptr, arg0);
890
+ }
891
+ /**
892
+ * Column in terminal grid (0-based)
893
+ * @returns {number}
894
+ */
895
+ get col() {
896
+ const ret = wasm.__wbg_get_mouseevent_col(this.__wbg_ptr);
897
+ return ret;
898
+ }
899
+ /**
900
+ * Column in terminal grid (0-based)
901
+ * @param {number} arg0
902
+ */
903
+ set col(arg0) {
904
+ wasm.__wbg_set_mouseevent_col(this.__wbg_ptr, arg0);
905
+ }
906
+ /**
907
+ * Row in terminal grid (0-based)
908
+ * @returns {number}
909
+ */
910
+ get row() {
911
+ const ret = wasm.__wbg_get_mouseevent_row(this.__wbg_ptr);
912
+ return ret;
913
+ }
914
+ /**
915
+ * Row in terminal grid (0-based)
916
+ * @param {number} arg0
917
+ */
918
+ set row(arg0) {
919
+ wasm.__wbg_set_mouseevent_row(this.__wbg_ptr, arg0);
920
+ }
921
+ /**
922
+ * Mouse button (0=left, 1=middle, 2=right)
923
+ * @returns {number}
924
+ */
925
+ get button() {
926
+ const ret = wasm.__wbg_get_mouseevent_button(this.__wbg_ptr);
927
+ return ret;
928
+ }
929
+ /**
930
+ * Mouse button (0=left, 1=middle, 2=right)
931
+ * @param {number} arg0
932
+ */
933
+ set button(arg0) {
934
+ wasm.__wbg_set_mouseevent_button(this.__wbg_ptr, arg0);
935
+ }
936
+ /**
937
+ * Whether Ctrl key was pressed
938
+ * @returns {boolean}
939
+ */
940
+ get ctrl_key() {
941
+ const ret = wasm.__wbg_get_mouseevent_ctrl_key(this.__wbg_ptr);
942
+ return ret !== 0;
943
+ }
944
+ /**
945
+ * Whether Ctrl key was pressed
946
+ * @param {boolean} arg0
947
+ */
948
+ set ctrl_key(arg0) {
949
+ wasm.__wbg_set_mouseevent_ctrl_key(this.__wbg_ptr, arg0);
950
+ }
951
+ /**
952
+ * Whether Shift key was pressed
953
+ * @returns {boolean}
954
+ */
955
+ get shift_key() {
956
+ const ret = wasm.__wbg_get_mouseevent_shift_key(this.__wbg_ptr);
957
+ return ret !== 0;
958
+ }
959
+ /**
960
+ * Whether Shift key was pressed
961
+ * @param {boolean} arg0
962
+ */
963
+ set shift_key(arg0) {
964
+ wasm.__wbg_set_mouseevent_shift_key(this.__wbg_ptr, arg0);
965
+ }
966
+ /**
967
+ * Whether Alt key was pressed
968
+ * @returns {boolean}
969
+ */
970
+ get alt_key() {
971
+ const ret = wasm.__wbg_get_mouseevent_alt_key(this.__wbg_ptr);
972
+ return ret !== 0;
973
+ }
974
+ /**
975
+ * Whether Alt key was pressed
976
+ * @param {boolean} arg0
977
+ */
978
+ set alt_key(arg0) {
979
+ wasm.__wbg_set_mouseevent_alt_key(this.__wbg_ptr, arg0);
980
+ }
981
+ }
982
+ if (Symbol.dispose) MouseEvent.prototype[Symbol.dispose] = MouseEvent.prototype.free;
983
+
984
+ /**
985
+ * Type of mouse event
986
+ * @enum {0 | 1 | 2}
987
+ */
988
+ export const MouseEventType = Object.freeze({
989
+ /**
990
+ * Mouse button pressed
991
+ */
992
+ MouseDown: 0, "0": "MouseDown",
993
+ /**
994
+ * Mouse button released
995
+ */
996
+ MouseUp: 1, "1": "MouseUp",
997
+ /**
998
+ * Mouse moved
999
+ */
1000
+ MouseMove: 2, "2": "MouseMove",
1001
+ });
1002
+
1003
+ /**
1004
+ * Selection mode for text selection in the terminal
1005
+ * @enum {0 | 1}
1006
+ */
1007
+ export const SelectionMode = Object.freeze({
1008
+ /**
1009
+ * Rectangular block selection
1010
+ */
1011
+ Block: 0, "0": "Block",
1012
+ /**
1013
+ * Linear text flow selection
1014
+ */
1015
+ Linear: 1, "1": "Linear",
1016
+ });
1017
+
1018
+ export class Size {
1019
+ static __wrap(ptr) {
1020
+ ptr = ptr >>> 0;
1021
+ const obj = Object.create(Size.prototype);
1022
+ obj.__wbg_ptr = ptr;
1023
+ SizeFinalization.register(obj, obj.__wbg_ptr, obj);
1024
+ return obj;
1025
+ }
1026
+ __destroy_into_raw() {
1027
+ const ptr = this.__wbg_ptr;
1028
+ this.__wbg_ptr = 0;
1029
+ SizeFinalization.unregister(this);
1030
+ return ptr;
1031
+ }
1032
+ free() {
1033
+ const ptr = this.__destroy_into_raw();
1034
+ wasm.__wbg_size_free(ptr, 0);
1035
+ }
1036
+ /**
1037
+ * @returns {number}
1038
+ */
1039
+ get width() {
1040
+ const ret = wasm.__wbg_get_mouseevent_col(this.__wbg_ptr);
1041
+ return ret;
1042
+ }
1043
+ /**
1044
+ * @param {number} arg0
1045
+ */
1046
+ set width(arg0) {
1047
+ wasm.__wbg_set_mouseevent_col(this.__wbg_ptr, arg0);
1048
+ }
1049
+ /**
1050
+ * @returns {number}
1051
+ */
1052
+ get height() {
1053
+ const ret = wasm.__wbg_get_mouseevent_row(this.__wbg_ptr);
1054
+ return ret;
1055
+ }
1056
+ /**
1057
+ * @param {number} arg0
1058
+ */
1059
+ set height(arg0) {
1060
+ wasm.__wbg_set_mouseevent_row(this.__wbg_ptr, arg0);
1061
+ }
1062
+ }
1063
+ if (Symbol.dispose) Size.prototype[Symbol.dispose] = Size.prototype.free;
1064
+
1065
+ /**
1066
+ * Debug API exposed to browser console for terminal inspection.
1067
+ */
1068
+ export class TerminalDebugApi {
1069
+ __destroy_into_raw() {
1070
+ const ptr = this.__wbg_ptr;
1071
+ this.__wbg_ptr = 0;
1072
+ TerminalDebugApiFinalization.unregister(this);
1073
+ return ptr;
1074
+ }
1075
+ free() {
1076
+ const ptr = this.__destroy_into_raw();
1077
+ wasm.__wbg_terminaldebugapi_free(ptr, 0);
1078
+ }
1079
+ /**
1080
+ * Returns the symbol for a given glyph ID, or null if not found.
1081
+ * @param {number} glyph_id
1082
+ * @returns {string | undefined}
1083
+ */
1084
+ getSymbol(glyph_id) {
1085
+ const ret = wasm.terminaldebugapi_getSymbol(this.__wbg_ptr, glyph_id);
1086
+ let v1;
1087
+ if (ret[0] !== 0) {
1088
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1089
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1090
+ }
1091
+ return v1;
1092
+ }
1093
+ /**
1094
+ * Returns the cell size in pixels as an object with `width` and `height` fields.
1095
+ * @returns {any}
1096
+ */
1097
+ getCellSize() {
1098
+ const ret = wasm.terminaldebugapi_getCellSize(this.__wbg_ptr);
1099
+ return ret;
1100
+ }
1101
+ /**
1102
+ * Returns the canvas size in pixels as an object with `width` and `height` fields.
1103
+ * @returns {any}
1104
+ */
1105
+ getCanvasSize() {
1106
+ const ret = wasm.terminaldebugapi_getCanvasSize(this.__wbg_ptr);
1107
+ return ret;
1108
+ }
1109
+ /**
1110
+ * Returns the number of glyphs available in the font atlas.
1111
+ * @returns {number}
1112
+ */
1113
+ getGlyphCount() {
1114
+ const ret = wasm.terminaldebugapi_getGlyphCount(this.__wbg_ptr);
1115
+ return ret >>> 0;
1116
+ }
1117
+ /**
1118
+ * Returns the base glyph ID for a given symbol, or null if not found.
1119
+ * @param {string} symbol
1120
+ * @returns {number | undefined}
1121
+ */
1122
+ getBaseGlyphId(symbol) {
1123
+ const ptr0 = passStringToWasm0(symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1124
+ const len0 = WASM_VECTOR_LEN;
1125
+ const ret = wasm.terminaldebugapi_getBaseGlyphId(this.__wbg_ptr, ptr0, len0);
1126
+ return ret === 0xFFFFFF ? undefined : ret;
1127
+ }
1128
+ /**
1129
+ * @returns {Array<any>}
1130
+ */
1131
+ getAtlasLookup() {
1132
+ const ret = wasm.terminaldebugapi_getAtlasLookup(this.__wbg_ptr);
1133
+ return ret;
1134
+ }
1135
+ /**
1136
+ * Returns the terminal size in cells as an object with `cols` and `rows` fields.
1137
+ * @returns {any}
1138
+ */
1139
+ getTerminalSize() {
1140
+ const ret = wasm.terminaldebugapi_getTerminalSize(this.__wbg_ptr);
1141
+ return ret;
1142
+ }
1143
+ /**
1144
+ * Returns an array of glyphs that were requested but not found in the font atlas.
1145
+ * @returns {Array<any>}
1146
+ */
1147
+ getMissingGlyphs() {
1148
+ const ret = wasm.terminaldebugapi_getMissingGlyphs(this.__wbg_ptr);
1149
+ return ret;
1150
+ }
1151
+ }
1152
+ if (Symbol.dispose) TerminalDebugApi.prototype[Symbol.dispose] = TerminalDebugApi.prototype.free;
1153
+
1154
+ /**
1155
+ * @param {string} symbol
1156
+ * @param {CellStyle} style
1157
+ * @returns {Cell}
1158
+ */
1159
+ export function cell(symbol, style) {
1160
+ const ptr0 = passStringToWasm0(symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1161
+ const len0 = WASM_VECTOR_LEN;
1162
+ _assertClass(style, CellStyle);
1163
+ var ptr1 = style.__destroy_into_raw();
1164
+ const ret = wasm.cell(ptr0, len0, ptr1);
1165
+ return Cell.__wrap(ret);
1166
+ }
1167
+
1168
+ /**
1169
+ * Initialize the WASM module
1170
+ */
1171
+ export function main() {
1172
+ wasm.main();
1173
+ }
1174
+
1175
+ /**
1176
+ * @returns {CellStyle}
1177
+ */
1178
+ export function style() {
1179
+ const ret = wasm.cellstyle_new();
1180
+ return CellStyle.__wrap(ret);
1181
+ }
1182
+
1183
+ export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
1184
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1185
+ return ret;
1186
+ };
1187
+
1188
+ export function __wbg_Number_2d1dcfcf4ec51736(arg0) {
1189
+ const ret = Number(arg0);
1190
+ return ret;
1191
+ };
1192
+
1193
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
1194
+ const ret = String(arg1);
1195
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1196
+ const len1 = WASM_VECTOR_LEN;
1197
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1198
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1199
+ };
1200
+
1201
+ export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
1202
+ const v = arg0;
1203
+ const ret = typeof(v) === 'boolean' ? v : undefined;
1204
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1205
+ };
1206
+
1207
+ export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
1208
+ const ret = debugString(arg1);
1209
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1210
+ const len1 = WASM_VECTOR_LEN;
1211
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1212
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1213
+ };
1214
+
1215
+ export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
1216
+ const ret = arg0 in arg1;
1217
+ return ret;
1218
+ };
1219
+
1220
+ export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
1221
+ const ret = typeof(arg0) === 'function';
1222
+ return ret;
1223
+ };
1224
+
1225
+ export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
1226
+ const val = arg0;
1227
+ const ret = typeof(val) === 'object' && val !== null;
1228
+ return ret;
1229
+ };
1230
+
1231
+ export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
1232
+ const ret = arg0 === undefined;
1233
+ return ret;
1234
+ };
1235
+
1236
+ export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
1237
+ const ret = arg0 == arg1;
1238
+ return ret;
1239
+ };
1240
+
1241
+ export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
1242
+ const obj = arg1;
1243
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1244
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1245
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1246
+ };
1247
+
1248
+ export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
1249
+ const obj = arg1;
1250
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1251
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1252
+ var len1 = WASM_VECTOR_LEN;
1253
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1254
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1255
+ };
1256
+
1257
+ export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
1258
+ throw new Error(getStringFromWasm0(arg0, arg1));
1259
+ };
1260
+
1261
+ export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
1262
+ arg0._wbg_cb_unref();
1263
+ };
1264
+
1265
+ export function __wbg_activeTexture_59810c16ea8d6e34(arg0, arg1) {
1266
+ arg0.activeTexture(arg1 >>> 0);
1267
+ };
1268
+
1269
+ export function __wbg_addEventListener_6a82629b3d430a48() { return handleError(function (arg0, arg1, arg2, arg3) {
1270
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
1271
+ }, arguments) };
1272
+
1273
+ export function __wbg_altKey_e13fae92dfebca3e(arg0) {
1274
+ const ret = arg0.altKey;
1275
+ return ret;
1276
+ };
1277
+
1278
+ export function __wbg_apply_52e9ae668d017009() { return handleError(function (arg0, arg1, arg2) {
1279
+ const ret = arg0.apply(arg1, arg2);
1280
+ return ret;
1281
+ }, arguments) };
1282
+
1283
+ export function __wbg_attachShader_ce575704294db9cc(arg0, arg1, arg2) {
1284
+ arg0.attachShader(arg1, arg2);
1285
+ };
1286
+
1287
+ export function __wbg_beginPath_33d1c14766492a39(arg0) {
1288
+ arg0.beginPath();
1289
+ };
1290
+
1291
+ export function __wbg_bindBufferBase_ff74eb07e91625d0(arg0, arg1, arg2, arg3) {
1292
+ arg0.bindBufferBase(arg1 >>> 0, arg2 >>> 0, arg3);
1293
+ };
1294
+
1295
+ export function __wbg_bindBuffer_c24c31cbec41cb21(arg0, arg1, arg2) {
1296
+ arg0.bindBuffer(arg1 >>> 0, arg2);
1297
+ };
1298
+
1299
+ export function __wbg_bindTexture_6ed714c0afe8b8d1(arg0, arg1, arg2) {
1300
+ arg0.bindTexture(arg1 >>> 0, arg2);
1301
+ };
1302
+
1303
+ export function __wbg_bindVertexArray_ced27387a0718508(arg0, arg1) {
1304
+ arg0.bindVertexArray(arg1);
1305
+ };
1306
+
1307
+ export function __wbg_bufferData_69dbeea8e1d79f7b(arg0, arg1, arg2, arg3) {
1308
+ arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0);
1309
+ };
1310
+
1311
+ export function __wbg_bufferData_ca0a87aa6811791d(arg0, arg1, arg2, arg3, arg4) {
1312
+ arg0.bufferData(arg1 >>> 0, getArrayU8FromWasm0(arg2, arg3), arg4 >>> 0);
1313
+ };
1314
+
1315
+ export function __wbg_button_a54acd25bab5d442(arg0) {
1316
+ const ret = arg0.button;
1317
+ return ret;
1318
+ };
1319
+
1320
+ export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
1321
+ const ret = arg0.call(arg1);
1322
+ return ret;
1323
+ }, arguments) };
1324
+
1325
+ export function __wbg_clearColor_66e5dad6393f32ec(arg0, arg1, arg2, arg3, arg4) {
1326
+ arg0.clearColor(arg1, arg2, arg3, arg4);
1327
+ };
1328
+
1329
+ export function __wbg_clearRect_995d722c31c68b62(arg0, arg1, arg2, arg3, arg4) {
1330
+ arg0.clearRect(arg1, arg2, arg3, arg4);
1331
+ };
1332
+
1333
+ export function __wbg_clear_00ac71df5db8ab17(arg0, arg1) {
1334
+ arg0.clear(arg1 >>> 0);
1335
+ };
1336
+
1337
+ export function __wbg_clip_502afc9d77774101(arg0) {
1338
+ arg0.clip();
1339
+ };
1340
+
1341
+ export function __wbg_clipboard_c210ce30f20907dd(arg0) {
1342
+ const ret = arg0.clipboard;
1343
+ return ret;
1344
+ };
1345
+
1346
+ export function __wbg_compileShader_ba337110bed419e1(arg0, arg1) {
1347
+ arg0.compileShader(arg1);
1348
+ };
1349
+
1350
+ export function __wbg_createBuffer_465b645a46535184(arg0) {
1351
+ const ret = arg0.createBuffer();
1352
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1353
+ };
1354
+
1355
+ export function __wbg_createProgram_ffe9d4a2cba210f4(arg0) {
1356
+ const ret = arg0.createProgram();
1357
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1358
+ };
1359
+
1360
+ export function __wbg_createShader_f88f9b82748ef6c0(arg0, arg1) {
1361
+ const ret = arg0.createShader(arg1 >>> 0);
1362
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1363
+ };
1364
+
1365
+ export function __wbg_createTexture_41211a4e8ae0afec(arg0) {
1366
+ const ret = arg0.createTexture();
1367
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1368
+ };
1369
+
1370
+ export function __wbg_createVertexArray_997b3c5b1091afd9(arg0) {
1371
+ const ret = arg0.createVertexArray();
1372
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1373
+ };
1374
+
1375
+ export function __wbg_ctrlKey_b391e5105c3f6e76(arg0) {
1376
+ const ret = arg0.ctrlKey;
1377
+ return ret;
1378
+ };
1379
+
1380
+ export function __wbg_data_83b2a9a09dd4ab39(arg0, arg1) {
1381
+ const ret = arg1.data;
1382
+ const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
1383
+ const len1 = WASM_VECTOR_LEN;
1384
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1385
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1386
+ };
1387
+
1388
+ export function __wbg_deleteBuffer_ba7f1164cc23b2ca(arg0, arg1) {
1389
+ arg0.deleteBuffer(arg1);
1390
+ };
1391
+
1392
+ export function __wbg_deleteShader_c357bb8fbede8370(arg0, arg1) {
1393
+ arg0.deleteShader(arg1);
1394
+ };
1395
+
1396
+ export function __wbg_deleteTexture_2a9b703dc2df5657(arg0, arg1) {
1397
+ arg0.deleteTexture(arg1);
1398
+ };
1399
+
1400
+ export function __wbg_devicePixelRatio_390dee26c70aa30f(arg0) {
1401
+ const ret = arg0.devicePixelRatio;
1402
+ return ret;
1403
+ };
1404
+
1405
+ export function __wbg_document_5b745e82ba551ca5(arg0) {
1406
+ const ret = arg0.document;
1407
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1408
+ };
1409
+
1410
+ export function __wbg_done_62ea16af4ce34b24(arg0) {
1411
+ const ret = arg0.done;
1412
+ return ret;
1413
+ };
1414
+
1415
+ export function __wbg_drawElementsInstanced_ad84faddf2b48335(arg0, arg1, arg2, arg3, arg4, arg5) {
1416
+ arg0.drawElementsInstanced(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
1417
+ };
1418
+
1419
+ export function __wbg_enableVertexAttribArray_2898de871f949393(arg0, arg1) {
1420
+ arg0.enableVertexAttribArray(arg1 >>> 0);
1421
+ };
1422
+
1423
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
1424
+ let deferred0_0;
1425
+ let deferred0_1;
1426
+ try {
1427
+ deferred0_0 = arg0;
1428
+ deferred0_1 = arg1;
1429
+ console.error(getStringFromWasm0(arg0, arg1));
1430
+ } finally {
1431
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1432
+ }
1433
+ };
1434
+
1435
+ export function __wbg_error_7bc7d576a6aaf855(arg0) {
1436
+ console.error(arg0);
1437
+ };
1438
+
1439
+ export function __wbg_fillText_64c0e1b7373270a3() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1440
+ arg0.fillText(getStringFromWasm0(arg1, arg2), arg3, arg4);
1441
+ }, arguments) };
1442
+
1443
+ export function __wbg_generateMipmap_85452cd8f350f404(arg0, arg1) {
1444
+ arg0.generateMipmap(arg1 >>> 0);
1445
+ };
1446
+
1447
+ export function __wbg_getContext_01f42b234e833f0a() { return handleError(function (arg0, arg1, arg2) {
1448
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
1449
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1450
+ }, arguments) };
1451
+
1452
+ export function __wbg_getContext_2f210d0a58d43d95() { return handleError(function (arg0, arg1, arg2) {
1453
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
1454
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1455
+ }, arguments) };
1456
+
1457
+ export function __wbg_getImageData_da396caba11eb89f() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1458
+ const ret = arg0.getImageData(arg1, arg2, arg3, arg4);
1459
+ return ret;
1460
+ }, arguments) };
1461
+
1462
+ export function __wbg_getParameter_1dfd667c33169fab() { return handleError(function (arg0, arg1) {
1463
+ const ret = arg0.getParameter(arg1 >>> 0);
1464
+ return ret;
1465
+ }, arguments) };
1466
+
1467
+ export function __wbg_getProgramInfoLog_a0ff8b0971fcaf48(arg0, arg1, arg2) {
1468
+ const ret = arg1.getProgramInfoLog(arg2);
1469
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1470
+ var len1 = WASM_VECTOR_LEN;
1471
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1472
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1473
+ };
1474
+
1475
+ export function __wbg_getProgramParameter_c777611a448a6ccd(arg0, arg1, arg2) {
1476
+ const ret = arg0.getProgramParameter(arg1, arg2 >>> 0);
1477
+ return ret;
1478
+ };
1479
+
1480
+ export function __wbg_getUniformBlockIndex_1453ff945a9eefd5(arg0, arg1, arg2, arg3) {
1481
+ const ret = arg0.getUniformBlockIndex(arg1, getStringFromWasm0(arg2, arg3));
1482
+ return ret;
1483
+ };
1484
+
1485
+ export function __wbg_getUniformLocation_21ac12bfc569cbbf(arg0, arg1, arg2, arg3) {
1486
+ const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3));
1487
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1488
+ };
1489
+
1490
+ export function __wbg_get_6b7bd52aca3f9671(arg0, arg1) {
1491
+ const ret = arg0[arg1 >>> 0];
1492
+ return ret;
1493
+ };
1494
+
1495
+ export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
1496
+ const ret = Reflect.get(arg0, arg1);
1497
+ return ret;
1498
+ }, arguments) };
1499
+
1500
+ export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
1501
+ const ret = arg0[arg1];
1502
+ return ret;
1503
+ };
1504
+
1505
+ export function __wbg_height_a07787f693c253d2(arg0) {
1506
+ const ret = arg0.height;
1507
+ return ret;
1508
+ };
1509
+
1510
+ export function __wbg_height_b39b909fd2ab3669(arg0) {
1511
+ const ret = arg0.height;
1512
+ return ret;
1513
+ };
1514
+
1515
+ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
1516
+ let result;
1517
+ try {
1518
+ result = arg0 instanceof ArrayBuffer;
1519
+ } catch (_) {
1520
+ result = false;
1521
+ }
1522
+ const ret = result;
1523
+ return ret;
1524
+ };
1525
+
1526
+ export function __wbg_instanceof_HtmlCanvasElement_c4251b1b6a15edcc(arg0) {
1527
+ let result;
1528
+ try {
1529
+ result = arg0 instanceof HTMLCanvasElement;
1530
+ } catch (_) {
1531
+ result = false;
1532
+ }
1533
+ const ret = result;
1534
+ return ret;
1535
+ };
1536
+
1537
+ export function __wbg_instanceof_OffscreenCanvasRenderingContext2d_52996da29a2bf2f5(arg0) {
1538
+ let result;
1539
+ try {
1540
+ result = arg0 instanceof OffscreenCanvasRenderingContext2D;
1541
+ } catch (_) {
1542
+ result = false;
1543
+ }
1544
+ const ret = result;
1545
+ return ret;
1546
+ };
1547
+
1548
+ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
1549
+ let result;
1550
+ try {
1551
+ result = arg0 instanceof Uint8Array;
1552
+ } catch (_) {
1553
+ result = false;
1554
+ }
1555
+ const ret = result;
1556
+ return ret;
1557
+ };
1558
+
1559
+ export function __wbg_instanceof_WebGl2RenderingContext_121e4c8c95b128ef(arg0) {
1560
+ let result;
1561
+ try {
1562
+ result = arg0 instanceof WebGL2RenderingContext;
1563
+ } catch (_) {
1564
+ result = false;
1565
+ }
1566
+ const ret = result;
1567
+ return ret;
1568
+ };
1569
+
1570
+ export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
1571
+ let result;
1572
+ try {
1573
+ result = arg0 instanceof Window;
1574
+ } catch (_) {
1575
+ result = false;
1576
+ }
1577
+ const ret = result;
1578
+ return ret;
1579
+ };
1580
+
1581
+ export function __wbg_isArray_51fd9e6422c0a395(arg0) {
1582
+ const ret = Array.isArray(arg0);
1583
+ return ret;
1584
+ };
1585
+
1586
+ export function __wbg_isSafeInteger_ae7d3f054d55fa16(arg0) {
1587
+ const ret = Number.isSafeInteger(arg0);
1588
+ return ret;
1589
+ };
1590
+
1591
+ export function __wbg_iterator_27b7c8b35ab3e86b() {
1592
+ const ret = Symbol.iterator;
1593
+ return ret;
1594
+ };
1595
+
1596
+ export function __wbg_length_22ac23eaec9d8053(arg0) {
1597
+ const ret = arg0.length;
1598
+ return ret;
1599
+ };
1600
+
1601
+ export function __wbg_length_d45040a40c570362(arg0) {
1602
+ const ret = arg0.length;
1603
+ return ret;
1604
+ };
1605
+
1606
+ export function __wbg_linkProgram_93f76a2f5030041e(arg0, arg1) {
1607
+ arg0.linkProgram(arg1);
1608
+ };
1609
+
1610
+ export function __wbg_log_1d990106d99dacb7(arg0) {
1611
+ console.log(arg0);
1612
+ };
1613
+
1614
+ export function __wbg_mouseevent_new(arg0) {
1615
+ const ret = MouseEvent.__wrap(arg0);
1616
+ return ret;
1617
+ };
1618
+
1619
+ export function __wbg_navigator_b49edef831236138(arg0) {
1620
+ const ret = arg0.navigator;
1621
+ return ret;
1622
+ };
1623
+
1624
+ export function __wbg_new_1ba21ce319a06297() {
1625
+ const ret = new Object();
1626
+ return ret;
1627
+ };
1628
+
1629
+ export function __wbg_new_25f239778d6112b9() {
1630
+ const ret = new Array();
1631
+ return ret;
1632
+ };
1633
+
1634
+ export function __wbg_new_6421f6084cc5bc5a(arg0) {
1635
+ const ret = new Uint8Array(arg0);
1636
+ return ret;
1637
+ };
1638
+
1639
+ export function __wbg_new_8a6f238a6ece86ea() {
1640
+ const ret = new Error();
1641
+ return ret;
1642
+ };
1643
+
1644
+ export function __wbg_new_9468dd6e5df427f6() { return handleError(function (arg0, arg1) {
1645
+ const ret = new OffscreenCanvas(arg0 >>> 0, arg1 >>> 0);
1646
+ return ret;
1647
+ }, arguments) };
1648
+
1649
+ export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
1650
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1651
+ return ret;
1652
+ };
1653
+
1654
+ export function __wbg_next_138a17bbf04e926c(arg0) {
1655
+ const ret = arg0.next;
1656
+ return ret;
1657
+ };
1658
+
1659
+ export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
1660
+ const ret = arg0.next();
1661
+ return ret;
1662
+ }, arguments) };
1663
+
1664
+ export function __wbg_now_8cf15d6e317793e1(arg0) {
1665
+ const ret = arg0.now();
1666
+ return ret;
1667
+ };
1668
+
1669
+ export function __wbg_offsetX_cef943cf53ab2b5a(arg0) {
1670
+ const ret = arg0.offsetX;
1671
+ return ret;
1672
+ };
1673
+
1674
+ export function __wbg_offsetY_9a093457f71ef493(arg0) {
1675
+ const ret = arg0.offsetY;
1676
+ return ret;
1677
+ };
1678
+
1679
+ export function __wbg_performance_c77a440eff2efd9b(arg0) {
1680
+ const ret = arg0.performance;
1681
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1682
+ };
1683
+
1684
+ export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
1685
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1686
+ };
1687
+
1688
+ export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
1689
+ const ret = arg0.push(arg1);
1690
+ return ret;
1691
+ };
1692
+
1693
+ export function __wbg_querySelector_15a92ce6bed6157d() { return handleError(function (arg0, arg1, arg2) {
1694
+ const ret = arg0.querySelector(getStringFromWasm0(arg1, arg2));
1695
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1696
+ }, arguments) };
1697
+
1698
+ export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
1699
+ const ret = arg0.queueMicrotask;
1700
+ return ret;
1701
+ };
1702
+
1703
+ export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
1704
+ queueMicrotask(arg0);
1705
+ };
1706
+
1707
+ export function __wbg_rect_9d502ba97dca2331(arg0, arg1, arg2, arg3, arg4) {
1708
+ arg0.rect(arg1, arg2, arg3, arg4);
1709
+ };
1710
+
1711
+ export function __wbg_removeEventListener_565e273024b68b75() { return handleError(function (arg0, arg1, arg2, arg3) {
1712
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
1713
+ }, arguments) };
1714
+
1715
+ export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
1716
+ const ret = Promise.resolve(arg0);
1717
+ return ret;
1718
+ };
1719
+
1720
+ export function __wbg_restore_352c39c9bbeedc91(arg0) {
1721
+ arg0.restore();
1722
+ };
1723
+
1724
+ export function __wbg_save_131c8dc648f702b6(arg0) {
1725
+ arg0.save();
1726
+ };
1727
+
1728
+ export function __wbg_set_781438a03c0c3c81() { return handleError(function (arg0, arg1, arg2) {
1729
+ const ret = Reflect.set(arg0, arg1, arg2);
1730
+ return ret;
1731
+ }, arguments) };
1732
+
1733
+ export function __wbg_set_fillStyle_b26e462a87b14315(arg0, arg1, arg2) {
1734
+ arg0.fillStyle = getStringFromWasm0(arg1, arg2);
1735
+ };
1736
+
1737
+ export function __wbg_set_font_6d67b15564a1e344(arg0, arg1, arg2) {
1738
+ arg0.font = getStringFromWasm0(arg1, arg2);
1739
+ };
1740
+
1741
+ export function __wbg_set_height_6f8f8ef4cb40e496(arg0, arg1) {
1742
+ arg0.height = arg1 >>> 0;
1743
+ };
1744
+
1745
+ export function __wbg_set_textAlign_0e0827546ee09feb(arg0, arg1, arg2) {
1746
+ arg0.textAlign = getStringFromWasm0(arg1, arg2);
1747
+ };
1748
+
1749
+ export function __wbg_set_textBaseline_4a53c509caa41c76(arg0, arg1, arg2) {
1750
+ arg0.textBaseline = getStringFromWasm0(arg1, arg2);
1751
+ };
1752
+
1753
+ export function __wbg_set_width_7ff7a22c6e9f423e(arg0, arg1) {
1754
+ arg0.width = arg1 >>> 0;
1755
+ };
1756
+
1757
+ export function __wbg_shaderSource_aea71cfa376fc985(arg0, arg1, arg2, arg3) {
1758
+ arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3));
1759
+ };
1760
+
1761
+ export function __wbg_shiftKey_a6df227a917d203b(arg0) {
1762
+ const ret = arg0.shiftKey;
1763
+ return ret;
1764
+ };
1765
+
1766
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
1767
+ const ret = arg1.stack;
1768
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1769
+ const len1 = WASM_VECTOR_LEN;
1770
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1771
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1772
+ };
1773
+
1774
+ export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
1775
+ const ret = typeof global === 'undefined' ? null : global;
1776
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1777
+ };
1778
+
1779
+ export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
1780
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1781
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1782
+ };
1783
+
1784
+ export function __wbg_static_accessor_SELF_08f5a74c69739274() {
1785
+ const ret = typeof self === 'undefined' ? null : self;
1786
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1787
+ };
1788
+
1789
+ export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
1790
+ const ret = typeof window === 'undefined' ? null : window;
1791
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1792
+ };
1793
+
1794
+ export function __wbg_texParameteri_3a52bfd2ef280632(arg0, arg1, arg2, arg3) {
1795
+ arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3);
1796
+ };
1797
+
1798
+ export function __wbg_texStorage3D_0b08c3a68b3d128e(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1799
+ arg0.texStorage3D(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5, arg6);
1800
+ };
1801
+
1802
+ export function __wbg_texSubImage3D_fefbf42bde1981d3() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) {
1803
+ arg0.texSubImage3D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 >>> 0, arg10 >>> 0, arg11 === 0 ? undefined : getArrayU8FromWasm0(arg11, arg12), arg13 >>> 0);
1804
+ }, arguments) };
1805
+
1806
+ export function __wbg_then_429f7caf1026411d(arg0, arg1, arg2) {
1807
+ const ret = arg0.then(arg1, arg2);
1808
+ return ret;
1809
+ };
1810
+
1811
+ export function __wbg_then_4f95312d68691235(arg0, arg1) {
1812
+ const ret = arg0.then(arg1);
1813
+ return ret;
1814
+ };
1815
+
1816
+ export function __wbg_uniform1i_85131b7388bc8e3f(arg0, arg1, arg2) {
1817
+ arg0.uniform1i(arg1, arg2);
1818
+ };
1819
+
1820
+ export function __wbg_uniformBlockBinding_83eb9ed3f1189da9(arg0, arg1, arg2, arg3) {
1821
+ arg0.uniformBlockBinding(arg1, arg2 >>> 0, arg3 >>> 0);
1822
+ };
1823
+
1824
+ export function __wbg_useProgram_4632a62f19deea67(arg0, arg1) {
1825
+ arg0.useProgram(arg1);
1826
+ };
1827
+
1828
+ export function __wbg_value_57b7b035e117f7ee(arg0) {
1829
+ const ret = arg0.value;
1830
+ return ret;
1831
+ };
1832
+
1833
+ export function __wbg_vertexAttribDivisor_4f37e0f7c1197d16(arg0, arg1, arg2) {
1834
+ arg0.vertexAttribDivisor(arg1 >>> 0, arg2 >>> 0);
1835
+ };
1836
+
1837
+ export function __wbg_vertexAttribIPointer_87d7fcce484093c9(arg0, arg1, arg2, arg3, arg4, arg5) {
1838
+ arg0.vertexAttribIPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4, arg5);
1839
+ };
1840
+
1841
+ export function __wbg_vertexAttribPointer_880223685613a791(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1842
+ arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6);
1843
+ };
1844
+
1845
+ export function __wbg_viewport_1b0f7b63c424b52f(arg0, arg1, arg2, arg3, arg4) {
1846
+ arg0.viewport(arg1, arg2, arg3, arg4);
1847
+ };
1848
+
1849
+ export function __wbg_width_9ab139dc647aa315(arg0) {
1850
+ const ret = arg0.width;
1851
+ return ret;
1852
+ };
1853
+
1854
+ export function __wbg_width_dd0cfe94d42f5143(arg0) {
1855
+ const ret = arg0.width;
1856
+ return ret;
1857
+ };
1858
+
1859
+ export function __wbg_writeText_c9776abb6826901c(arg0, arg1, arg2) {
1860
+ const ret = arg0.writeText(getStringFromWasm0(arg1, arg2));
1861
+ return ret;
1862
+ };
1863
+
1864
+ export function __wbindgen_cast_146fd35f906c65cd(arg0, arg1) {
1865
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 111, function: Function { arguments: [Externref], shim_idx: 112, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1866
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h128802127193e191, wasm_bindgen__convert__closures_____invoke__hbee1b5e623a87165);
1867
+ return ret;
1868
+ };
1869
+
1870
+ export function __wbindgen_cast_195a282855cb0b65(arg0, arg1) {
1871
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 61, function: Function { arguments: [NamedExternref("MouseEvent")], shim_idx: 62, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1872
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h63d9d38af9217a8f, wasm_bindgen__convert__closures_____invoke__h4d1e7414f3e2b484);
1873
+ return ret;
1874
+ };
1875
+
1876
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1877
+ // Cast intrinsic for `Ref(String) -> Externref`.
1878
+ const ret = getStringFromWasm0(arg0, arg1);
1879
+ return ret;
1880
+ };
1881
+
1882
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
1883
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1884
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1885
+ return ret;
1886
+ };
1887
+
1888
+ export function __wbindgen_cast_cd07b1914aa3d62c(arg0, arg1) {
1889
+ // Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
1890
+ const ret = getArrayF32FromWasm0(arg0, arg1);
1891
+ return ret;
1892
+ };
1893
+
1894
+ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1895
+ // Cast intrinsic for `F64 -> Externref`.
1896
+ const ret = arg0;
1897
+ return ret;
1898
+ };
1899
+
1900
+ export function __wbindgen_init_externref_table() {
1901
+ const table = wasm.__wbindgen_externrefs;
1902
+ const offset = table.grow(4);
1903
+ table.set(0, undefined);
1904
+ table.set(offset + 0, undefined);
1905
+ table.set(offset + 1, null);
1906
+ table.set(offset + 2, true);
1907
+ table.set(offset + 3, false);
1908
+ };