@pngwasi/config-editor 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3281 @@
1
+ /* @ts-self-types="./config_editor.d.ts" */
2
+
3
+ /**
4
+ * Several documents as tabs, one editor per document, mounted into an
5
+ * element.
6
+ *
7
+ * ```js
8
+ * import { ConfigDocuments, loadConfigEditor } from "@pngwasi/config-editor";
9
+ * await loadConfigEditor();
10
+ * let files = [
11
+ * { id: "main", fileName: "config.yaml", value: mainText, schema },
12
+ * { id: "tls", fileName: "conf.d/tls.toml", value: tlsText, schema },
13
+ * ];
14
+ * const tabs = new ConfigDocuments(document.getElementById("files"), {
15
+ * documents: files,
16
+ * onChange: (id, value) => {
17
+ * files = files.map((file) => (file.id === id ? { ...file, value } : file));
18
+ * tabs.update({ documents: files });
19
+ * },
20
+ * onSave: (id, value) => upload(id, value),
21
+ * onClose: ({ id, dirty }) => { if (!dirty || confirm("Discard changes?")) close(id); },
22
+ * });
23
+ * ```
24
+ */
25
+ export class ConfigDocuments {
26
+ __destroy_into_raw() {
27
+ const ptr = this.__wbg_ptr;
28
+ this.__wbg_ptr = 0;
29
+ ConfigDocumentsFinalization.unregister(this);
30
+ return ptr;
31
+ }
32
+ free() {
33
+ const ptr = this.__destroy_into_raw();
34
+ wasm.__wbg_configdocuments_free(ptr, 0);
35
+ }
36
+ /**
37
+ * The active document's id (`undefined` while none is open).
38
+ * @returns {string | undefined}
39
+ */
40
+ get activeId() {
41
+ try {
42
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
43
+ wasm.configdocuments_activeId(retptr, this.__wbg_ptr);
44
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
45
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
46
+ let v1;
47
+ if (r0 !== 0) {
48
+ v1 = getStringFromWasm0(r0, r1);
49
+ wasm.__wbindgen_export3(r0, r1 * 1, 1);
50
+ }
51
+ return v1;
52
+ } finally {
53
+ wasm.__wbindgen_add_to_stack_pointer(16);
54
+ }
55
+ }
56
+ /**
57
+ * Unmounts the view and its editors. The instance cannot be used
58
+ * afterwards.
59
+ */
60
+ destroy() {
61
+ wasm.configdocuments_destroy(this.__wbg_ptr);
62
+ }
63
+ /**
64
+ * Edits the document `id` as `language` (its own language to go back),
65
+ * as a new `editAs` in the list does, and also when `language` is what
66
+ * its `editAs` already says: a list with an unchanged `editAs` changes
67
+ * nothing, so after an undo stepped back across the switch this asks
68
+ * for it again. A switch the text cannot make yet waits; asking for
69
+ * the language on screen ends one waiting. Give the document the same
70
+ * `editAs` in your list, or the next `update({ documents })` switches
71
+ * back. `false` when no document has that id.
72
+ * @param {string} id
73
+ * @param {LanguageName} language
74
+ * @returns {boolean}
75
+ */
76
+ editAs(id, language) {
77
+ try {
78
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
79
+ wasm.configdocuments_editAs(retptr, this.__wbg_ptr, id, language);
80
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
81
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
82
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
83
+ if (r2) {
84
+ throw takeFromExternrefTable0(r1);
85
+ }
86
+ return r0 !== 0;
87
+ } finally {
88
+ wasm.__wbindgen_add_to_stack_pointer(16);
89
+ }
90
+ }
91
+ /**
92
+ * The editor of the document `id`: paths, folds, focus and saving for
93
+ * that document (`null` when no document has that id). Until the
94
+ * document has been shown once (or listed with `editAsText`), which
95
+ * mounts its editor, its `value`,
96
+ * `text`, `unifiedDiff`, `settings`, `isDirty` and `save` answer for
97
+ * the document as listed and its paths, folds and `reveal` answer
98
+ * `null` (or `false`); once the document is removed all of them do
99
+ * (one listed again with the same id is another document).
100
+ * @param {string} id
101
+ * @returns {EditorView | null}
102
+ */
103
+ editor(id) {
104
+ try {
105
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
106
+ wasm.configdocuments_editor(retptr, this.__wbg_ptr, id);
107
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
108
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
109
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
110
+ if (r2) {
111
+ throw takeFromExternrefTable0(r1);
112
+ }
113
+ return takeFromExternrefTable0(r0);
114
+ } finally {
115
+ wasm.__wbindgen_add_to_stack_pointer(16);
116
+ }
117
+ }
118
+ /**
119
+ * Focuses the active document's editor, keeping its selection.
120
+ */
121
+ focus() {
122
+ wasm.configdocuments_focus(this.__wbg_ptr);
123
+ }
124
+ /**
125
+ * Whether the document `id` differs from its baseline.
126
+ * @param {string} id
127
+ * @returns {boolean}
128
+ */
129
+ isDirty(id) {
130
+ try {
131
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
132
+ wasm.configdocuments_isDirty(retptr, this.__wbg_ptr, id);
133
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
134
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
135
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
136
+ if (r2) {
137
+ throw takeFromExternrefTable0(r1);
138
+ }
139
+ return r0 !== 0;
140
+ } finally {
141
+ wasm.__wbindgen_add_to_stack_pointer(16);
142
+ }
143
+ }
144
+ /**
145
+ * Mounts the view into `element` (its content is replaced).
146
+ * @param {HTMLElement} element
147
+ * @param {DocumentsOptions} options
148
+ */
149
+ constructor(element, options) {
150
+ try {
151
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
152
+ wasm.configdocuments_new(retptr, element, options);
153
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
154
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
155
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
156
+ if (r2) {
157
+ throw takeFromExternrefTable0(r1);
158
+ }
159
+ this.__wbg_ptr = r0;
160
+ ConfigDocumentsFinalization.register(this, this.__wbg_ptr, this);
161
+ return this;
162
+ } finally {
163
+ wasm.__wbindgen_add_to_stack_pointer(16);
164
+ }
165
+ }
166
+ /**
167
+ * Replaces the text of the document `id` with `value`, the host's own
168
+ * whatever it is: with `echoes`, a document's `value` in
169
+ * `update({ documents })` that its editor gave and has not seen come
170
+ * back yet is its echo; this never is (a revert to such a text). List
171
+ * the document with that text from then on. Its editor keeps the
172
+ * caret on the same text when possible, and its read-only ranges on
173
+ * the text they cover (see `host_locks`); `onChange` does not hear it.
174
+ * Returns whether it replaced the text: `false` when no document has
175
+ * that id, when the document holds that text already (a second
176
+ * Discard: nothing changes, and a framework binding reports nothing),
177
+ * or when the host gave it a newer one meanwhile.
178
+ * @param {string} id
179
+ * @param {string} value
180
+ * @returns {boolean}
181
+ */
182
+ replaceValue(id, value) {
183
+ try {
184
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
185
+ wasm.configdocuments_replaceValue(retptr, this.__wbg_ptr, id, value);
186
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
187
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
188
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
189
+ if (r2) {
190
+ throw takeFromExternrefTable0(r1);
191
+ }
192
+ return r0 !== 0;
193
+ } finally {
194
+ wasm.__wbindgen_add_to_stack_pointer(16);
195
+ }
196
+ }
197
+ /**
198
+ * Saves every document with unsaved edits through `onSave`; returns
199
+ * the ids sent.
200
+ * @returns {string[]}
201
+ */
202
+ saveAll() {
203
+ try {
204
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
205
+ wasm.configdocuments_saveAll(retptr, this.__wbg_ptr);
206
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
207
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
208
+ var v1 = getArrayJsValueFromWasm0(r0, r1);
209
+ wasm.__wbindgen_export3(r0, r1 * 4, 4);
210
+ return v1;
211
+ } finally {
212
+ wasm.__wbindgen_add_to_stack_pointer(16);
213
+ }
214
+ }
215
+ /**
216
+ * Saves the document `id` as `Ctrl+S` in its editor does: calls
217
+ * `onSave`. `false` when nothing was sent (no `onSave`, no such
218
+ * document, or an `editAs` edit that cannot convert back yet).
219
+ * @param {string} id
220
+ * @returns {boolean}
221
+ */
222
+ save(id) {
223
+ try {
224
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
225
+ wasm.configdocuments_save(retptr, this.__wbg_ptr, id);
226
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
227
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
228
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
229
+ if (r2) {
230
+ throw takeFromExternrefTable0(r1);
231
+ }
232
+ return r0 !== 0;
233
+ } finally {
234
+ wasm.__wbindgen_add_to_stack_pointer(16);
235
+ }
236
+ }
237
+ /**
238
+ * Shows the document `id` and focuses its editor; `false` when no
239
+ * document has that id.
240
+ * @param {string} id
241
+ * @returns {boolean}
242
+ */
243
+ select(id) {
244
+ try {
245
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
246
+ wasm.configdocuments_select(retptr, this.__wbg_ptr, id);
247
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
248
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
249
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
250
+ if (r2) {
251
+ throw takeFromExternrefTable0(r1);
252
+ }
253
+ return r0 !== 0;
254
+ } finally {
255
+ wasm.__wbindgen_add_to_stack_pointer(16);
256
+ }
257
+ }
258
+ /**
259
+ * The view's settings in effect: every key of `EditorSettings`, set.
260
+ * @returns {Required<EditorSettings>}
261
+ */
262
+ get settings() {
263
+ const ret = wasm.configdocuments_settings(this.__wbg_ptr);
264
+ return ret;
265
+ }
266
+ /**
267
+ * Changes the view, live: `documents`, `activeId`, the settings and
268
+ * the callbacks, any of them. A key left out or `undefined` stays as
269
+ * it is; `null` removes a callback or returns a setting to its default.
270
+ * Settings merge key by key (`strings` text by text, `colors` token by
271
+ * token), under each
272
+ * document's own `settings`. A new `documents` list replaces the list:
273
+ * a document keeps its editor (caret, undo history, scroll, folds)
274
+ * while its `id` stays listed, its text, baseline, file name and
275
+ * read-only state update in place, and a new `language` or `schema`
276
+ * mounts a new editor. With `echoes`, a document's `value` that its
277
+ * editor gave and has not seen listed back yet is its echo and keeps
278
+ * what the editor holds (see `replaceValue`). `activeId` shows that document, leaving the
279
+ * focus where it is (an id not listed throws). `className`, `label` and `echoes`, and an `onClose` or
280
+ * `onAdd` for a view mounted without one (its tabs have no close
281
+ * buttons, its strip no "+"), throw: create a new view instead (the value the
282
+ * view was built with, given again, changes nothing; one left out was built with its default:
283
+ * `null`, `echoes: false`, `className: ""`). Every key is checked before any applies,
284
+ * but for a document's `readOnlyRanges` that cannot be read in its text: they hold no
285
+ * other document back, the list applies, and this throws naming them after.
286
+ * @param {DocumentsUpdate} options
287
+ */
288
+ update(options) {
289
+ try {
290
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
291
+ wasm.configdocuments_update(retptr, this.__wbg_ptr, options);
292
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
293
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
294
+ if (r1) {
295
+ throw takeFromExternrefTable0(r0);
296
+ }
297
+ } finally {
298
+ wasm.__wbindgen_add_to_stack_pointer(16);
299
+ }
300
+ }
301
+ }
302
+ if (Symbol.dispose) ConfigDocuments.prototype[Symbol.dispose] = ConfigDocuments.prototype.free;
303
+
304
+ /**
305
+ * A config editor mounted into an element.
306
+ *
307
+ * ```js
308
+ * import { ConfigEditor, loadConfigEditor } from "@pngwasi/config-editor";
309
+ * await loadConfigEditor();
310
+ * const editor = new ConfigEditor(document.getElementById("config"), {
311
+ * language: "yaml",
312
+ * value: "listen: 7835\n",
313
+ * schema: schemaJson,
314
+ * onChange: (text) => save(text),
315
+ * });
316
+ * ```
317
+ */
318
+ export class ConfigEditor {
319
+ __destroy_into_raw() {
320
+ const ptr = this.__wbg_ptr;
321
+ this.__wbg_ptr = 0;
322
+ ConfigEditorFinalization.unregister(this);
323
+ return ptr;
324
+ }
325
+ free() {
326
+ const ptr = this.__destroy_into_raw();
327
+ wasm.__wbg_configeditor_free(ptr, 0);
328
+ }
329
+ /**
330
+ * The editor's channel to its host, for an editor that replaces this
331
+ * one (its `channel` option): still there after `destroy`.
332
+ * @returns {HostChannel}
333
+ */
334
+ get channel() {
335
+ const ret = wasm.configeditor_channel(this.__wbg_ptr);
336
+ return HostChannel.__wrap(ret);
337
+ }
338
+ /**
339
+ * The path of what the caret is on.
340
+ * @returns {EditorPath | null}
341
+ */
342
+ get currentPath() {
343
+ const ret = wasm.configeditor_currentPath(this.__wbg_ptr);
344
+ return ret;
345
+ }
346
+ /**
347
+ * Unmounts the editor. The instance cannot be used afterwards. An edit
348
+ * still waiting to be saved (while editing as another language) is sent
349
+ * to `onChange` first.
350
+ */
351
+ destroy() {
352
+ wasm.configeditor_destroy(this.__wbg_ptr);
353
+ }
354
+ /**
355
+ * Focuses the editor, keeping its selection.
356
+ */
357
+ focus() {
358
+ wasm.configeditor_focus(this.__wbg_ptr);
359
+ }
360
+ /**
361
+ * Folds every block (`Ctrl+K Ctrl+0`).
362
+ */
363
+ foldAll() {
364
+ wasm.configeditor_foldAll(this.__wbg_ptr);
365
+ }
366
+ /**
367
+ * Folds the block the field at `path` opens; `false` when there is none
368
+ * to fold.
369
+ * @param {FieldPath} path
370
+ * @returns {boolean}
371
+ */
372
+ fold(path) {
373
+ try {
374
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
375
+ wasm.configeditor_fold(retptr, this.__wbg_ptr, path);
376
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
377
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
378
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
379
+ if (r2) {
380
+ throw takeFromExternrefTable0(r1);
381
+ }
382
+ return r0 !== 0;
383
+ } finally {
384
+ wasm.__wbindgen_add_to_stack_pointer(16);
385
+ }
386
+ }
387
+ /**
388
+ * The folded blocks, as one-based `{ startLine, endLine }`: the line
389
+ * that stays visible and the last hidden one.
390
+ * @returns {LineRange[]}
391
+ */
392
+ get foldedLines() {
393
+ const ret = wasm.configeditor_foldedLines(this.__wbg_ptr);
394
+ return ret;
395
+ }
396
+ /**
397
+ * Whether the document differs from the baseline.
398
+ * @returns {boolean}
399
+ */
400
+ get isDirty() {
401
+ const ret = wasm.configeditor_isDirty(this.__wbg_ptr);
402
+ return ret !== 0;
403
+ }
404
+ /**
405
+ * Mounts an editor into `element` (its content is replaced).
406
+ * @param {HTMLElement} element
407
+ * @param {EditorOptions} options
408
+ */
409
+ constructor(element, options) {
410
+ try {
411
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
412
+ wasm.configeditor_new(retptr, element, options);
413
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
414
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
415
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
416
+ if (r2) {
417
+ throw takeFromExternrefTable0(r1);
418
+ }
419
+ this.__wbg_ptr = r0;
420
+ ConfigEditorFinalization.register(this, this.__wbg_ptr, this);
421
+ return this;
422
+ } finally {
423
+ wasm.__wbindgen_add_to_stack_pointer(16);
424
+ }
425
+ }
426
+ /**
427
+ * The path of what the text on screen holds at string index `offset`.
428
+ * @param {number} offset
429
+ * @returns {EditorPath | null}
430
+ */
431
+ pathAt(offset) {
432
+ try {
433
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
434
+ wasm.configeditor_pathAt(retptr, this.__wbg_ptr, offset);
435
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
436
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
437
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
438
+ if (r2) {
439
+ throw takeFromExternrefTable0(r1);
440
+ }
441
+ return takeFromExternrefTable0(r0);
442
+ } finally {
443
+ wasm.__wbindgen_add_to_stack_pointer(16);
444
+ }
445
+ }
446
+ /**
447
+ * Where the field at `path` is written in the text on screen, or `null`.
448
+ * @param {FieldPath} path
449
+ * @returns {EditorRange | null}
450
+ */
451
+ rangeOf(path) {
452
+ try {
453
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
454
+ wasm.configeditor_rangeOf(retptr, this.__wbg_ptr, path);
455
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
456
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
457
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
458
+ if (r2) {
459
+ throw takeFromExternrefTable0(r1);
460
+ }
461
+ return takeFromExternrefTable0(r0);
462
+ } finally {
463
+ wasm.__wbindgen_add_to_stack_pointer(16);
464
+ }
465
+ }
466
+ /**
467
+ * Replaces the document with `value`, the host's own text whatever it
468
+ * is: with `echoes`, `update({ value })` takes a text `onChange` gave
469
+ * that has not come back yet for its echo; this never does (a revert to
470
+ * such a text). Echoes still on their way are skipped when they come.
471
+ * The caret stays on the same text when possible, and the read-only
472
+ * ranges on the text they cover (see `host_locks`); `onChange` does
473
+ * not hear it. Returns whether it replaced the document: `false` when
474
+ * it is that text already (a second Discard: nothing changes, and a
475
+ * framework binding reports nothing), or the host gave a newer one
476
+ * meanwhile.
477
+ * @param {string} value
478
+ * @returns {boolean}
479
+ */
480
+ replaceValue(value) {
481
+ try {
482
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
483
+ wasm.configeditor_replaceValue(retptr, this.__wbg_ptr, value);
484
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
485
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
486
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
487
+ if (r2) {
488
+ throw takeFromExternrefTable0(r1);
489
+ }
490
+ return r0 !== 0;
491
+ } finally {
492
+ wasm.__wbindgen_add_to_stack_pointer(16);
493
+ }
494
+ }
495
+ /**
496
+ * Selects `range` (string indices `{ start, end }` into the text on
497
+ * screen, as `rangeOf` gives them: in the `editAs` language while
498
+ * editing as another one), scrolls it into view inside the editor and
499
+ * focuses the editor without moving the page, as `reveal` does for a
500
+ * field: any stretch, comments and blank lines included. A range past
501
+ * the end is clamped to it. `false` before the editor mounts and for an
502
+ * empty document.
503
+ * @param {{ start: number; end: number }} range
504
+ * @returns {boolean}
505
+ */
506
+ revealRange(range) {
507
+ try {
508
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
509
+ wasm.configeditor_revealRange(retptr, this.__wbg_ptr, range);
510
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
511
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
512
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
513
+ if (r2) {
514
+ throw takeFromExternrefTable0(r1);
515
+ }
516
+ return r0 !== 0;
517
+ } finally {
518
+ wasm.__wbindgen_add_to_stack_pointer(16);
519
+ }
520
+ }
521
+ /**
522
+ * Scrolls to the field at `path`, selects it and focuses the editor;
523
+ * `false` when the document has no such field.
524
+ * @param {FieldPath} path
525
+ * @returns {boolean}
526
+ */
527
+ reveal(path) {
528
+ try {
529
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
530
+ wasm.configeditor_reveal(retptr, this.__wbg_ptr, path);
531
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
532
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
533
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
534
+ if (r2) {
535
+ throw takeFromExternrefTable0(r1);
536
+ }
537
+ return r0 !== 0;
538
+ } finally {
539
+ wasm.__wbindgen_add_to_stack_pointer(16);
540
+ }
541
+ }
542
+ /**
543
+ * Saves as `Ctrl+S` does: calls `onSave` with the document in
544
+ * `language`. `false` when nothing was sent: without `onSave`, after
545
+ * `destroy`, or while an `editAs` edit cannot convert back (the caret
546
+ * goes to the problem).
547
+ * @returns {boolean}
548
+ */
549
+ save() {
550
+ const ret = wasm.configeditor_save(this.__wbg_ptr);
551
+ return ret !== 0;
552
+ }
553
+ /**
554
+ * The settings in effect: every key of `EditorSettings`, set.
555
+ * @returns {Required<EditorSettings>}
556
+ */
557
+ get settings() {
558
+ const ret = wasm.configeditor_settings(this.__wbg_ptr);
559
+ return ret;
560
+ }
561
+ /**
562
+ * The text on screen: in the `editAs` language while editing as another
563
+ * one (what `rangeOf` and `pathAt` index into). After `destroy()`, the
564
+ * last document.
565
+ * @returns {string}
566
+ */
567
+ get text() {
568
+ let deferred1_0;
569
+ let deferred1_1;
570
+ try {
571
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
572
+ wasm.configeditor_text(retptr, this.__wbg_ptr);
573
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
574
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
575
+ deferred1_0 = r0;
576
+ deferred1_1 = r1;
577
+ return getStringFromWasm0(r0, r1);
578
+ } finally {
579
+ wasm.__wbindgen_add_to_stack_pointer(16);
580
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
581
+ }
582
+ }
583
+ /**
584
+ * Opens every fold (`Ctrl+K Ctrl+J`).
585
+ */
586
+ unfoldAll() {
587
+ wasm.configeditor_unfoldAll(this.__wbg_ptr);
588
+ }
589
+ /**
590
+ * Opens the folds around the field at `path`; `false` when none was
591
+ * closed.
592
+ * @param {FieldPath} path
593
+ * @returns {boolean}
594
+ */
595
+ unfold(path) {
596
+ try {
597
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
598
+ wasm.configeditor_unfold(retptr, this.__wbg_ptr, path);
599
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
600
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
601
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
602
+ if (r2) {
603
+ throw takeFromExternrefTable0(r1);
604
+ }
605
+ return r0 !== 0;
606
+ } finally {
607
+ wasm.__wbindgen_add_to_stack_pointer(16);
608
+ }
609
+ }
610
+ /**
611
+ * The unified diff (`diff -u`) of the baseline against the document,
612
+ * with `context` unchanged lines around each change (default 3); empty
613
+ * when they are the same.
614
+ * @param {number} [context]
615
+ * @returns {string}
616
+ */
617
+ unifiedDiff(context) {
618
+ let deferred2_0;
619
+ let deferred2_1;
620
+ try {
621
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
622
+ wasm.configeditor_unifiedDiff(retptr, this.__wbg_ptr, context);
623
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
624
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
625
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
626
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
627
+ var ptr1 = r0;
628
+ var len1 = r1;
629
+ if (r3) {
630
+ ptr1 = 0; len1 = 0;
631
+ throw takeFromExternrefTable0(r2);
632
+ }
633
+ deferred2_0 = ptr1;
634
+ deferred2_1 = len1;
635
+ return getStringFromWasm0(ptr1, len1);
636
+ } finally {
637
+ wasm.__wbindgen_add_to_stack_pointer(16);
638
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
639
+ }
640
+ }
641
+ /**
642
+ * Changes what the editor shows, live (the caret, undo history and
643
+ * folds stay): the constructor's options, any of them. A key left out
644
+ * or `undefined` stays as it is; `null` removes a callback, clears
645
+ * `hostDiagnostics`, `readOnlyPaths` and `readOnlyRanges`, turns
646
+ * `editAs` and `readOnly` off and returns a setting to its default.
647
+ * Settings merge key by key, `strings` text by text, `colors` token by
648
+ * token. A new `value`
649
+ * replaces the document as a host update (the caret kept when the
650
+ * text is unchanged). With `echoes`, a text `onChange` gave that has
651
+ * not come back yet is its echo and keeps the document. Ranges are in
652
+ * `rangesFor`, else `value` (an echo included), else the document,
653
+ * and are moved from that text to the document; `readOnlyRanges` equal
654
+ * to the last ones, given with no new text, stay where the editor
655
+ * moved them (see `host_locks`). The text `onChange` gave last, given
656
+ * while an edit still held is sent first, keeps the document.
657
+ * `language`, `schema`, `fileName`, `className`,
658
+ * `secrets` and `echoes` are what the editor is built from: they throw (create
659
+ * a new editor instead), but for the value it was built with given again
660
+ * (`Object.is`; `language` naming the editor's own; an option left out
661
+ * was built with its default: `null`, `echoes: false`, …).
662
+ * Every key is checked before any applies.
663
+ * @param {EditorUpdate} options
664
+ */
665
+ update(options) {
666
+ try {
667
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
668
+ wasm.configeditor_update(retptr, this.__wbg_ptr, options);
669
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
670
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
671
+ if (r1) {
672
+ throw takeFromExternrefTable0(r0);
673
+ }
674
+ } finally {
675
+ wasm.__wbindgen_add_to_stack_pointer(16);
676
+ }
677
+ }
678
+ /**
679
+ * The document, in `language`.
680
+ * @returns {string}
681
+ */
682
+ get value() {
683
+ let deferred1_0;
684
+ let deferred1_1;
685
+ try {
686
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
687
+ wasm.configeditor_value(retptr, this.__wbg_ptr);
688
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
689
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
690
+ deferred1_0 = r0;
691
+ deferred1_1 = r1;
692
+ return getStringFromWasm0(r0, r1);
693
+ } finally {
694
+ wasm.__wbindgen_add_to_stack_pointer(16);
695
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
696
+ }
697
+ }
698
+ }
699
+ if (Symbol.dispose) ConfigEditor.prototype[Symbol.dispose] = ConfigEditor.prototype.free;
700
+
701
+ /**
702
+ * The editor of one document of a `ConfigDocuments` (an `EditorView`).
703
+ *
704
+ * ```js
705
+ * const tls = documents.editor("tls");
706
+ * tls.reveal("/cert");
707
+ * tls.fold("/ciphers");
708
+ * ```
709
+ */
710
+ export class DocumentEditorView {
711
+ static __wrap(ptr) {
712
+ const obj = Object.create(DocumentEditorView.prototype);
713
+ obj.__wbg_ptr = ptr;
714
+ DocumentEditorViewFinalization.register(obj, obj.__wbg_ptr, obj);
715
+ return obj;
716
+ }
717
+ __destroy_into_raw() {
718
+ const ptr = this.__wbg_ptr;
719
+ this.__wbg_ptr = 0;
720
+ DocumentEditorViewFinalization.unregister(this);
721
+ return ptr;
722
+ }
723
+ free() {
724
+ const ptr = this.__destroy_into_raw();
725
+ wasm.__wbg_documenteditorview_free(ptr, 0);
726
+ }
727
+ /**
728
+ * The path of what the caret is on.
729
+ * @returns {EditorPath | null}
730
+ */
731
+ get currentPath() {
732
+ const ret = wasm.documenteditorview_currentPath(this.__wbg_ptr);
733
+ return ret;
734
+ }
735
+ /**
736
+ * Focuses the editor, keeping its selection.
737
+ */
738
+ focus() {
739
+ wasm.documenteditorview_focus(this.__wbg_ptr);
740
+ }
741
+ /**
742
+ * Folds every block.
743
+ */
744
+ foldAll() {
745
+ wasm.documenteditorview_foldAll(this.__wbg_ptr);
746
+ }
747
+ /**
748
+ * Folds the block the field at `path` opens; `false` when there is none
749
+ * to fold.
750
+ * @param {FieldPath} path
751
+ * @returns {boolean}
752
+ */
753
+ fold(path) {
754
+ try {
755
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
756
+ wasm.documenteditorview_fold(retptr, this.__wbg_ptr, path);
757
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
758
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
759
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
760
+ if (r2) {
761
+ throw takeFromExternrefTable0(r1);
762
+ }
763
+ return r0 !== 0;
764
+ } finally {
765
+ wasm.__wbindgen_add_to_stack_pointer(16);
766
+ }
767
+ }
768
+ /**
769
+ * The folded blocks, as one-based `{ startLine, endLine }`.
770
+ * @returns {LineRange[]}
771
+ */
772
+ get foldedLines() {
773
+ const ret = wasm.documenteditorview_foldedLines(this.__wbg_ptr);
774
+ return ret;
775
+ }
776
+ /**
777
+ * Whether the document differs from its baseline.
778
+ * @returns {boolean}
779
+ */
780
+ get isDirty() {
781
+ const ret = wasm.documenteditorview_isDirty(this.__wbg_ptr);
782
+ return ret !== 0;
783
+ }
784
+ /**
785
+ * The path of what the text on screen holds at string index `offset`.
786
+ * @param {number} offset
787
+ * @returns {EditorPath | null}
788
+ */
789
+ pathAt(offset) {
790
+ try {
791
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
792
+ wasm.documenteditorview_pathAt(retptr, this.__wbg_ptr, offset);
793
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
794
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
795
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
796
+ if (r2) {
797
+ throw takeFromExternrefTable0(r1);
798
+ }
799
+ return takeFromExternrefTable0(r0);
800
+ } finally {
801
+ wasm.__wbindgen_add_to_stack_pointer(16);
802
+ }
803
+ }
804
+ /**
805
+ * Where the field at `path` is written in the text on screen, or `null`.
806
+ * @param {FieldPath} path
807
+ * @returns {EditorRange | null}
808
+ */
809
+ rangeOf(path) {
810
+ try {
811
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
812
+ wasm.documenteditorview_rangeOf(retptr, this.__wbg_ptr, path);
813
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
814
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
815
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
816
+ if (r2) {
817
+ throw takeFromExternrefTable0(r1);
818
+ }
819
+ return takeFromExternrefTable0(r0);
820
+ } finally {
821
+ wasm.__wbindgen_add_to_stack_pointer(16);
822
+ }
823
+ }
824
+ /**
825
+ * Selects `range` (string indices `{ start, end }` into the text on
826
+ * screen, as `rangeOf` gives them: in the `editAs` language while
827
+ * editing as another one), scrolls it into view inside the editor and
828
+ * focuses the editor without moving the page, as `reveal` does for a
829
+ * field: any stretch, comments and blank lines included. A range past
830
+ * the end is clamped to it. `false` before the editor mounts and for an
831
+ * empty document.
832
+ * @param {{ start: number; end: number }} range
833
+ * @returns {boolean}
834
+ */
835
+ revealRange(range) {
836
+ try {
837
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
838
+ wasm.documenteditorview_revealRange(retptr, this.__wbg_ptr, range);
839
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
840
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
841
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
842
+ if (r2) {
843
+ throw takeFromExternrefTable0(r1);
844
+ }
845
+ return r0 !== 0;
846
+ } finally {
847
+ wasm.__wbindgen_add_to_stack_pointer(16);
848
+ }
849
+ }
850
+ /**
851
+ * Scrolls to the field at `path`, selects it and focuses the editor;
852
+ * `false` when there is no such field (or the editor has not mounted).
853
+ * Showing the document is `documents.select(id)`.
854
+ * @param {FieldPath} path
855
+ * @returns {boolean}
856
+ */
857
+ reveal(path) {
858
+ try {
859
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
860
+ wasm.documenteditorview_reveal(retptr, this.__wbg_ptr, path);
861
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
862
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
863
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
864
+ if (r2) {
865
+ throw takeFromExternrefTable0(r1);
866
+ }
867
+ return r0 !== 0;
868
+ } finally {
869
+ wasm.__wbindgen_add_to_stack_pointer(16);
870
+ }
871
+ }
872
+ /**
873
+ * Saves the document as `Ctrl+S` in its editor does (calls the view's
874
+ * `onSave`); `false` when nothing was sent.
875
+ * @returns {boolean}
876
+ */
877
+ save() {
878
+ const ret = wasm.documenteditorview_save(this.__wbg_ptr);
879
+ return ret !== 0;
880
+ }
881
+ /**
882
+ * The settings of the document's editor: its own over the view's.
883
+ * @returns {Required<EditorSettings>}
884
+ */
885
+ get settings() {
886
+ const ret = wasm.documenteditorview_settings(this.__wbg_ptr);
887
+ return ret;
888
+ }
889
+ /**
890
+ * The text on screen (in the `editAs` language while editing as
891
+ * another one); before the editor mounts, the document's `value`;
892
+ * `null` once the document is no longer listed.
893
+ * @returns {any}
894
+ */
895
+ get text() {
896
+ const ret = wasm.documenteditorview_text(this.__wbg_ptr);
897
+ return ret;
898
+ }
899
+ /**
900
+ * Opens every fold.
901
+ */
902
+ unfoldAll() {
903
+ wasm.documenteditorview_unfoldAll(this.__wbg_ptr);
904
+ }
905
+ /**
906
+ * Opens the folds around the field at `path`; `false` when none was
907
+ * closed.
908
+ * @param {FieldPath} path
909
+ * @returns {boolean}
910
+ */
911
+ unfold(path) {
912
+ try {
913
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
914
+ wasm.documenteditorview_unfold(retptr, this.__wbg_ptr, path);
915
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
916
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
917
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
918
+ if (r2) {
919
+ throw takeFromExternrefTable0(r1);
920
+ }
921
+ return r0 !== 0;
922
+ } finally {
923
+ wasm.__wbindgen_add_to_stack_pointer(16);
924
+ }
925
+ }
926
+ /**
927
+ * The unified diff (`diff -u`) of the document's baseline against it,
928
+ * with `context` unchanged lines around each change (default 3).
929
+ * @param {number} [context]
930
+ * @returns {string}
931
+ */
932
+ unifiedDiff(context) {
933
+ let deferred2_0;
934
+ let deferred2_1;
935
+ try {
936
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
937
+ wasm.documenteditorview_unifiedDiff(retptr, this.__wbg_ptr, context);
938
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
939
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
940
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
941
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
942
+ var ptr1 = r0;
943
+ var len1 = r1;
944
+ if (r3) {
945
+ ptr1 = 0; len1 = 0;
946
+ throw takeFromExternrefTable0(r2);
947
+ }
948
+ deferred2_0 = ptr1;
949
+ deferred2_1 = len1;
950
+ return getStringFromWasm0(ptr1, len1);
951
+ } finally {
952
+ wasm.__wbindgen_add_to_stack_pointer(16);
953
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
954
+ }
955
+ }
956
+ /**
957
+ * The document, in its language: the host's `value`, then each edit;
958
+ * `null` once the document is no longer listed.
959
+ * @returns {any}
960
+ */
961
+ get value() {
962
+ const ret = wasm.documenteditorview_value(this.__wbg_ptr);
963
+ return ret;
964
+ }
965
+ }
966
+ if (Symbol.dispose) DocumentEditorView.prototype[Symbol.dispose] = DocumentEditorView.prototype.free;
967
+
968
+ /**
969
+ * An editor's channel to its host: the texts `onChange` sent that the
970
+ * host has not handed back yet, and the host's read-only ranges as given.
971
+ * A framework binding re-creating its editor (a new `language`,
972
+ * `fileName`, …) passes the old editor's `channel` to the new one, so the
973
+ * echoes still on their way are told apart there too, and none rolls
974
+ * back what was typed.
975
+ */
976
+ export class HostChannel {
977
+ static __wrap(ptr) {
978
+ const obj = Object.create(HostChannel.prototype);
979
+ obj.__wbg_ptr = ptr;
980
+ HostChannelFinalization.register(obj, obj.__wbg_ptr, obj);
981
+ return obj;
982
+ }
983
+ static __unwrap(jsValue) {
984
+ if (!(jsValue instanceof HostChannel)) {
985
+ return 0;
986
+ }
987
+ return jsValue.__destroy_into_raw();
988
+ }
989
+ __destroy_into_raw() {
990
+ const ptr = this.__wbg_ptr;
991
+ this.__wbg_ptr = 0;
992
+ HostChannelFinalization.unregister(this);
993
+ return ptr;
994
+ }
995
+ free() {
996
+ const ptr = this.__destroy_into_raw();
997
+ wasm.__wbg_hostchannel_free(ptr, 0);
998
+ }
999
+ }
1000
+ if (Symbol.dispose) HostChannel.prototype[Symbol.dispose] = HostChannel.prototype.free;
1001
+
1002
+ export class IntoUnderlyingByteSource {
1003
+ __destroy_into_raw() {
1004
+ const ptr = this.__wbg_ptr;
1005
+ this.__wbg_ptr = 0;
1006
+ IntoUnderlyingByteSourceFinalization.unregister(this);
1007
+ return ptr;
1008
+ }
1009
+ free() {
1010
+ const ptr = this.__destroy_into_raw();
1011
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
1012
+ }
1013
+ /**
1014
+ * @returns {number}
1015
+ */
1016
+ get autoAllocateChunkSize() {
1017
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
1018
+ return ret >>> 0;
1019
+ }
1020
+ cancel() {
1021
+ const ptr = this.__destroy_into_raw();
1022
+ wasm.intounderlyingbytesource_cancel(ptr);
1023
+ }
1024
+ /**
1025
+ * @param {ReadableByteStreamController} controller
1026
+ * @returns {Promise<any>}
1027
+ */
1028
+ pull(controller) {
1029
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
1030
+ return ret;
1031
+ }
1032
+ /**
1033
+ * @param {ReadableByteStreamController} controller
1034
+ */
1035
+ start(controller) {
1036
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
1037
+ }
1038
+ /**
1039
+ * @returns {ReadableStreamType}
1040
+ */
1041
+ get type() {
1042
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
1043
+ return __wbindgen_enum_ReadableStreamType[ret];
1044
+ }
1045
+ }
1046
+ if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
1047
+
1048
+ export class IntoUnderlyingSink {
1049
+ __destroy_into_raw() {
1050
+ const ptr = this.__wbg_ptr;
1051
+ this.__wbg_ptr = 0;
1052
+ IntoUnderlyingSinkFinalization.unregister(this);
1053
+ return ptr;
1054
+ }
1055
+ free() {
1056
+ const ptr = this.__destroy_into_raw();
1057
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
1058
+ }
1059
+ /**
1060
+ * @param {any} reason
1061
+ * @returns {Promise<any>}
1062
+ */
1063
+ abort(reason) {
1064
+ const ptr = this.__destroy_into_raw();
1065
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
1066
+ return ret;
1067
+ }
1068
+ /**
1069
+ * @returns {Promise<any>}
1070
+ */
1071
+ close() {
1072
+ const ptr = this.__destroy_into_raw();
1073
+ const ret = wasm.intounderlyingsink_close(ptr);
1074
+ return ret;
1075
+ }
1076
+ /**
1077
+ * @param {any} chunk
1078
+ * @returns {Promise<any>}
1079
+ */
1080
+ write(chunk) {
1081
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
1082
+ return ret;
1083
+ }
1084
+ }
1085
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
1086
+
1087
+ export class IntoUnderlyingSource {
1088
+ __destroy_into_raw() {
1089
+ const ptr = this.__wbg_ptr;
1090
+ this.__wbg_ptr = 0;
1091
+ IntoUnderlyingSourceFinalization.unregister(this);
1092
+ return ptr;
1093
+ }
1094
+ free() {
1095
+ const ptr = this.__destroy_into_raw();
1096
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
1097
+ }
1098
+ cancel() {
1099
+ const ptr = this.__destroy_into_raw();
1100
+ wasm.intounderlyingsource_cancel(ptr);
1101
+ }
1102
+ /**
1103
+ * @param {ReadableStreamDefaultController} controller
1104
+ * @returns {Promise<any>}
1105
+ */
1106
+ pull(controller) {
1107
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
1108
+ return ret;
1109
+ }
1110
+ }
1111
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
1112
+
1113
+ /**
1114
+ * How `current` differs from `baseline`, by lines, as the diff gutter and
1115
+ * `onChangeSummary` count it (line endings ignored). A final line break
1116
+ * added or removed is the empty last line added or removed, where
1117
+ * `unifiedDiff` writes it as `diff -u` does (the last line changed).
1118
+ * @param {string} baseline
1119
+ * @param {string} current
1120
+ * @returns {ChangeSummary}
1121
+ */
1122
+ export function changeSummary(baseline, current) {
1123
+ try {
1124
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1125
+ wasm.changeSummary(retptr, baseline, current);
1126
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1127
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1128
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1129
+ if (r2) {
1130
+ throw takeFromExternrefTable0(r1);
1131
+ }
1132
+ return takeFromExternrefTable0(r0);
1133
+ } finally {
1134
+ wasm.__wbindgen_add_to_stack_pointer(16);
1135
+ }
1136
+ }
1137
+
1138
+ /**
1139
+ * Converts `text` from one language to another. With a schema, lone XML
1140
+ * elements where it expects a list convert as one-item lists.
1141
+ * @param {LanguageName} from
1142
+ * @param {string} text
1143
+ * @param {LanguageName} to
1144
+ * @param {string} [schema]
1145
+ * @returns {Conversion}
1146
+ */
1147
+ export function convert(from, text, to, schema) {
1148
+ try {
1149
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1150
+ wasm.convert(retptr, from, text, to, schema);
1151
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1152
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1153
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1154
+ if (r2) {
1155
+ throw takeFromExternrefTable0(r1);
1156
+ }
1157
+ return takeFromExternrefTable0(r0);
1158
+ } finally {
1159
+ wasm.__wbindgen_add_to_stack_pointer(16);
1160
+ }
1161
+ }
1162
+
1163
+ /**
1164
+ * The language of a file, from its extension (`"config/app.yml"` →
1165
+ * `"yaml"`), registered languages included; `null` when none claims it.
1166
+ * @param {string} path
1167
+ * @returns {LanguageName | null}
1168
+ */
1169
+ export function languageForFile(path) {
1170
+ try {
1171
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1172
+ wasm.languageForFile(retptr, path);
1173
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1174
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1175
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1176
+ if (r2) {
1177
+ throw takeFromExternrefTable0(r1);
1178
+ }
1179
+ return takeFromExternrefTable0(r0);
1180
+ } finally {
1181
+ wasm.__wbindgen_add_to_stack_pointer(16);
1182
+ }
1183
+ }
1184
+
1185
+ /**
1186
+ * The built-in and registered languages, each with its canonical name
1187
+ * (what `language` and `editAs` take), label, toolbar icon, extensions and
1188
+ * the file name the toolbar shows when none is given.
1189
+ * @returns {LanguageInfo[]}
1190
+ */
1191
+ export function languages() {
1192
+ const ret = wasm.languages();
1193
+ return ret;
1194
+ }
1195
+
1196
+ /**
1197
+ * Parses `text` into plain data (objects, arrays, strings, numbers,
1198
+ * booleans, `null`): the model schema validation sees, the same for every
1199
+ * language. Throws the first syntax error, with its line and column.
1200
+ * @param {LanguageName} language
1201
+ * @param {string} text
1202
+ * @returns {unknown}
1203
+ */
1204
+ export function parse(language, text) {
1205
+ try {
1206
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1207
+ wasm.parse(retptr, language, text);
1208
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1209
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1210
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1211
+ if (r2) {
1212
+ throw takeFromExternrefTable0(r1);
1213
+ }
1214
+ return takeFromExternrefTable0(r0);
1215
+ } finally {
1216
+ wasm.__wbindgen_add_to_stack_pointer(16);
1217
+ }
1218
+ }
1219
+
1220
+ /**
1221
+ * The path of what `text` holds at string index `index` (in `text`, a
1222
+ * byte order mark counted): the key under or
1223
+ * just before it, else the value or container holding it (`""` at the top
1224
+ * level); `null` past the end of the text.
1225
+ * @param {LanguageName} language
1226
+ * @param {string} text
1227
+ * @param {number} index
1228
+ * @returns {EditorPath | null}
1229
+ */
1230
+ export function pathAt(language, text, index) {
1231
+ try {
1232
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1233
+ wasm.pathAt(retptr, language, text, index);
1234
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1235
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1236
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1237
+ if (r2) {
1238
+ throw takeFromExternrefTable0(r1);
1239
+ }
1240
+ return takeFromExternrefTable0(r0);
1241
+ } finally {
1242
+ wasm.__wbindgen_add_to_stack_pointer(16);
1243
+ }
1244
+ }
1245
+
1246
+ /**
1247
+ * The stylesheet the editor injects (layout and every bundled theme), for
1248
+ * a page that sets `styled: false` and serves or adapts it itself.
1249
+ * @returns {string}
1250
+ */
1251
+ export function presetCss() {
1252
+ let deferred1_0;
1253
+ let deferred1_1;
1254
+ try {
1255
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1256
+ wasm.presetCss(retptr);
1257
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1258
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1259
+ deferred1_0 = r0;
1260
+ deferred1_1 = r1;
1261
+ return getStringFromWasm0(r0, r1);
1262
+ } finally {
1263
+ wasm.__wbindgen_add_to_stack_pointer(16);
1264
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
1265
+ }
1266
+ }
1267
+
1268
+ /**
1269
+ * Where the field at `path` is written in `text`, or `null` when it has no
1270
+ * such field: the key and its value when they share a line, the key alone
1271
+ * when the value is a block below it, the value alone for a list item.
1272
+ * @param {LanguageName} language
1273
+ * @param {string} text
1274
+ * @param {FieldPath} path
1275
+ * @returns {EditorRange | null}
1276
+ */
1277
+ export function rangeOf(language, text, path) {
1278
+ try {
1279
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1280
+ wasm.rangeOf(retptr, language, text, path);
1281
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1282
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1283
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1284
+ if (r2) {
1285
+ throw takeFromExternrefTable0(r1);
1286
+ }
1287
+ return takeFromExternrefTable0(r0);
1288
+ } finally {
1289
+ wasm.__wbindgen_add_to_stack_pointer(16);
1290
+ }
1291
+ }
1292
+
1293
+ /**
1294
+ * [`rangeOf`](range_of) for each of `paths`, in order: the text read once
1295
+ * for all of them (each `rangeOf` reads it again, so thousands of paths
1296
+ * of a long document take seconds one by one).
1297
+ * @param {LanguageName} language
1298
+ * @param {string} text
1299
+ * @param {FieldPath[]} paths
1300
+ * @returns {(EditorRange | null)[]}
1301
+ */
1302
+ export function rangesOf(language, text, paths) {
1303
+ try {
1304
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1305
+ wasm.rangesOf(retptr, language, text, paths);
1306
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1307
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1308
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1309
+ if (r2) {
1310
+ throw takeFromExternrefTable0(r1);
1311
+ }
1312
+ return takeFromExternrefTable0(r0);
1313
+ } finally {
1314
+ wasm.__wbindgen_add_to_stack_pointer(16);
1315
+ }
1316
+ }
1317
+
1318
+ /**
1319
+ * Registers a language implemented in JavaScript and returns its name for
1320
+ * `language` / `editAs` (its label, lowercased). Registering the same label
1321
+ * again replaces its definition, in the editors already open too, and
1322
+ * takes no more memory.
1323
+ * @param {CustomLanguage} definition
1324
+ * @returns {string}
1325
+ */
1326
+ export function registerLanguage(definition) {
1327
+ let deferred2_0;
1328
+ let deferred2_1;
1329
+ try {
1330
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1331
+ wasm.registerLanguage(retptr, definition);
1332
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1333
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1334
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1335
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1336
+ var ptr1 = r0;
1337
+ var len1 = r1;
1338
+ if (r3) {
1339
+ ptr1 = 0; len1 = 0;
1340
+ throw takeFromExternrefTable0(r2);
1341
+ }
1342
+ deferred2_0 = ptr1;
1343
+ deferred2_1 = len1;
1344
+ return getStringFromWasm0(ptr1, len1);
1345
+ } finally {
1346
+ wasm.__wbindgen_add_to_stack_pointer(16);
1347
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
1348
+ }
1349
+ }
1350
+
1351
+ /**
1352
+ * What the editor cannot use in a JSON Schema, one message each, such as a
1353
+ * `patternProperties` regex its engine cannot compile. An invalid schema
1354
+ * throws.
1355
+ * @param {string} schema
1356
+ * @returns {string[]}
1357
+ */
1358
+ export function schemaWarnings(schema) {
1359
+ try {
1360
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1361
+ wasm.schemaWarnings(retptr, schema);
1362
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1363
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1364
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1365
+ if (r2) {
1366
+ throw takeFromExternrefTable0(r1);
1367
+ }
1368
+ return takeFromExternrefTable0(r0);
1369
+ } finally {
1370
+ wasm.__wbindgen_add_to_stack_pointer(16);
1371
+ }
1372
+ }
1373
+
1374
+ /**
1375
+ * Writes plain data as a document in `language`. Throws when the value is
1376
+ * not JSON data or the language cannot express it (TOML has no `null`).
1377
+ * As `JSON.stringify` does, an object member set to `undefined` is left
1378
+ * out, and an `undefined` or a hole in an array throws.
1379
+ * @param {LanguageName} language
1380
+ * @param {unknown} value
1381
+ * @returns {string}
1382
+ */
1383
+ export function serialize(language, value) {
1384
+ let deferred2_0;
1385
+ let deferred2_1;
1386
+ try {
1387
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1388
+ wasm.serialize(retptr, language, value);
1389
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1390
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1391
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1392
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1393
+ var ptr1 = r0;
1394
+ var len1 = r1;
1395
+ if (r3) {
1396
+ ptr1 = 0; len1 = 0;
1397
+ throw takeFromExternrefTable0(r2);
1398
+ }
1399
+ deferred2_0 = ptr1;
1400
+ deferred2_1 = len1;
1401
+ return getStringFromWasm0(ptr1, len1);
1402
+ } finally {
1403
+ wasm.__wbindgen_add_to_stack_pointer(16);
1404
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
1405
+ }
1406
+ }
1407
+
1408
+ export function start() {
1409
+ wasm.start();
1410
+ }
1411
+
1412
+ /**
1413
+ * The bundled themes, for a picker: each one's slug (what `theme` takes),
1414
+ * display name, and whether it is dark.
1415
+ * @returns {ThemeInfo[]}
1416
+ */
1417
+ export function themes() {
1418
+ const ret = wasm.themes();
1419
+ return ret;
1420
+ }
1421
+
1422
+ /**
1423
+ * The unified diff (`diff -u`) of `baseline` against `current`, with
1424
+ * `context` unchanged lines around each change (default 3): `--- baseline`
1425
+ * and `+++ current` headers, then `@@` hunks. Empty when they are the same.
1426
+ * @param {string} baseline
1427
+ * @param {string} current
1428
+ * @param {number} [context]
1429
+ * @returns {string}
1430
+ */
1431
+ export function unifiedDiff(baseline, current, context) {
1432
+ let deferred2_0;
1433
+ let deferred2_1;
1434
+ try {
1435
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1436
+ wasm.unifiedDiff(retptr, baseline, current, context);
1437
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1438
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1439
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1440
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1441
+ var ptr1 = r0;
1442
+ var len1 = r1;
1443
+ if (r3) {
1444
+ ptr1 = 0; len1 = 0;
1445
+ throw takeFromExternrefTable0(r2);
1446
+ }
1447
+ deferred2_0 = ptr1;
1448
+ deferred2_1 = len1;
1449
+ return getStringFromWasm0(ptr1, len1);
1450
+ } finally {
1451
+ wasm.__wbindgen_add_to_stack_pointer(16);
1452
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
1453
+ }
1454
+ }
1455
+
1456
+ /**
1457
+ * Syntax and schema problems in `text`, as the editor shows them. Without a
1458
+ * schema only syntax is checked.
1459
+ * @param {LanguageName} language
1460
+ * @param {string} text
1461
+ * @param {string} [schema]
1462
+ * @returns {Diagnostic[]}
1463
+ */
1464
+ export function validate(language, text, schema) {
1465
+ try {
1466
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1467
+ wasm.validate(retptr, language, text, schema);
1468
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1469
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1470
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1471
+ if (r2) {
1472
+ throw takeFromExternrefTable0(r1);
1473
+ }
1474
+ return takeFromExternrefTable0(r0);
1475
+ } finally {
1476
+ wasm.__wbindgen_add_to_stack_pointer(16);
1477
+ }
1478
+ }
1479
+ function __wbg_get_imports() {
1480
+ const import0 = {
1481
+ __proto__: null,
1482
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
1483
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1484
+ return ret;
1485
+ },
1486
+ __wbg_Number_ff192a72a0dcdf6d: function(arg0) {
1487
+ const ret = Number(arg0);
1488
+ return ret;
1489
+ },
1490
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
1491
+ const ret = String(arg1);
1492
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1493
+ const len1 = WASM_VECTOR_LEN;
1494
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1495
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1496
+ },
1497
+ __wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
1498
+ const v = arg1;
1499
+ const ret = typeof(v) === 'bigint' ? v : undefined;
1500
+ getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1501
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
1502
+ },
1503
+ __wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
1504
+ const v = arg0;
1505
+ const ret = typeof(v) === 'boolean' ? v : undefined;
1506
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1507
+ },
1508
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
1509
+ const ret = debugString(arg1);
1510
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1511
+ const len1 = WASM_VECTOR_LEN;
1512
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1513
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1514
+ },
1515
+ __wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
1516
+ const ret = arg0 in arg1;
1517
+ return ret;
1518
+ },
1519
+ __wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
1520
+ const ret = typeof(arg0) === 'bigint';
1521
+ return ret;
1522
+ },
1523
+ __wbg___wbindgen_is_falsy_d864b623500ae65d: function(arg0) {
1524
+ const ret = !arg0;
1525
+ return ret;
1526
+ },
1527
+ __wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
1528
+ const ret = typeof(arg0) === 'function';
1529
+ return ret;
1530
+ },
1531
+ __wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
1532
+ const ret = arg0 === null;
1533
+ return ret;
1534
+ },
1535
+ __wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
1536
+ const val = arg0;
1537
+ const ret = typeof(val) === 'object' && val !== null;
1538
+ return ret;
1539
+ },
1540
+ __wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
1541
+ const ret = typeof(arg0) === 'string';
1542
+ return ret;
1543
+ },
1544
+ __wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
1545
+ const ret = arg0 === undefined;
1546
+ return ret;
1547
+ },
1548
+ __wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
1549
+ const ret = arg0 === arg1;
1550
+ return ret;
1551
+ },
1552
+ __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
1553
+ const ret = arg0 == arg1;
1554
+ return ret;
1555
+ },
1556
+ __wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
1557
+ const obj = arg1;
1558
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1559
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1560
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
1561
+ },
1562
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
1563
+ const obj = arg1;
1564
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1565
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1566
+ var len1 = WASM_VECTOR_LEN;
1567
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1568
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1569
+ },
1570
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
1571
+ throw new Error(getStringFromWasm0(arg0, arg1));
1572
+ },
1573
+ __wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
1574
+ arg0._wbg_cb_unref();
1575
+ },
1576
+ __wbg_activeElement_6c30fe7fda33ef51: function(arg0) {
1577
+ const ret = arg0.activeElement;
1578
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1579
+ },
1580
+ __wbg_addEventListener_70e3766f6252144d: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1581
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3, arg4 !== 0);
1582
+ }, arguments); },
1583
+ __wbg_addEventListener_847fd86b8c33ec43: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1584
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
1585
+ }, arguments); },
1586
+ __wbg_add_cf82c8d153d93ae1: function() { return handleError(function (arg0, arg1, arg2) {
1587
+ arg0.add(getStringFromWasm0(arg1, arg2));
1588
+ }, arguments); },
1589
+ __wbg_addedNodes_fa6318eda0039548: function(arg0) {
1590
+ const ret = arg0.addedNodes;
1591
+ return ret;
1592
+ },
1593
+ __wbg_altKey_423da1d67b588078: function(arg0) {
1594
+ const ret = arg0.altKey;
1595
+ return ret;
1596
+ },
1597
+ __wbg_appendChild_dbf7ad2f48413560: function() { return handleError(function (arg0, arg1) {
1598
+ const ret = arg0.appendChild(arg1);
1599
+ return ret;
1600
+ }, arguments); },
1601
+ __wbg_assign_6b6bb30388088072: function(arg0, arg1) {
1602
+ const ret = Object.assign(arg0, arg1);
1603
+ return ret;
1604
+ },
1605
+ __wbg_body_5f971cbc6950ca4f: function(arg0) {
1606
+ const ret = arg0.body;
1607
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1608
+ },
1609
+ __wbg_bottom_fd840749aac1de6e: function(arg0) {
1610
+ const ret = arg0.bottom;
1611
+ return ret;
1612
+ },
1613
+ __wbg_buffer_aca05a93c046db1a: function(arg0) {
1614
+ const ret = arg0.buffer;
1615
+ return ret;
1616
+ },
1617
+ __wbg_button_653210370515dd71: function(arg0) {
1618
+ const ret = arg0.button;
1619
+ return ret;
1620
+ },
1621
+ __wbg_buttons_6c3569a451cd3176: function(arg0) {
1622
+ const ret = arg0.buttons;
1623
+ return ret;
1624
+ },
1625
+ __wbg_byobRequest_18280c78e462544c: function(arg0) {
1626
+ const ret = arg0.byobRequest;
1627
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1628
+ },
1629
+ __wbg_byteLength_c5f3c188d5252e5b: function(arg0) {
1630
+ const ret = arg0.byteLength;
1631
+ return ret;
1632
+ },
1633
+ __wbg_byteOffset_63cdc7b38f33a45e: function(arg0) {
1634
+ const ret = arg0.byteOffset;
1635
+ return ret;
1636
+ },
1637
+ __wbg_call_275b78b3b6520b92: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1638
+ const ret = arg0.call(arg1, arg2, arg3, arg4);
1639
+ return ret;
1640
+ }, arguments); },
1641
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
1642
+ const ret = arg0.call(arg1);
1643
+ return ret;
1644
+ }, arguments); },
1645
+ __wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
1646
+ const ret = arg0.call(arg1, arg2);
1647
+ return ret;
1648
+ }, arguments); },
1649
+ __wbg_call_fc92fee6137d452d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1650
+ const ret = arg0.call(arg1, arg2, arg3);
1651
+ return ret;
1652
+ }, arguments); },
1653
+ __wbg_cancelBubble_1164dd588f0c3481: function(arg0) {
1654
+ const ret = arg0.cancelBubble;
1655
+ return ret;
1656
+ },
1657
+ __wbg_children_5767547ca7e1c276: function(arg0) {
1658
+ const ret = arg0.children;
1659
+ return ret;
1660
+ },
1661
+ __wbg_classList_97e966c261669b85: function(arg0) {
1662
+ const ret = arg0.classList;
1663
+ return ret;
1664
+ },
1665
+ __wbg_clearTimeout_fd2c5dfcf4c67f84: function(arg0, arg1) {
1666
+ arg0.clearTimeout(arg1);
1667
+ },
1668
+ __wbg_clientHeight_b40e8971aed9fa2b: function(arg0) {
1669
+ const ret = arg0.clientHeight;
1670
+ return ret;
1671
+ },
1672
+ __wbg_clientTop_e30b3713fd182206: function(arg0) {
1673
+ const ret = arg0.clientTop;
1674
+ return ret;
1675
+ },
1676
+ __wbg_clientWidth_269ea87f17b863bf: function(arg0) {
1677
+ const ret = arg0.clientWidth;
1678
+ return ret;
1679
+ },
1680
+ __wbg_clientX_7207eed549b03753: function(arg0) {
1681
+ const ret = arg0.clientX;
1682
+ return ret;
1683
+ },
1684
+ __wbg_clientX_8c315b448e031608: function(arg0) {
1685
+ const ret = arg0.clientX;
1686
+ return ret;
1687
+ },
1688
+ __wbg_clientY_3371139730cd6f74: function(arg0) {
1689
+ const ret = arg0.clientY;
1690
+ return ret;
1691
+ },
1692
+ __wbg_clientY_864eb3eff334b02a: function(arg0) {
1693
+ const ret = arg0.clientY;
1694
+ return ret;
1695
+ },
1696
+ __wbg_clipboardData_40289949920202d6: function(arg0) {
1697
+ const ret = arg0.clipboardData;
1698
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1699
+ },
1700
+ __wbg_cloneNode_36b90700fd8dbbb0: function() { return handleError(function (arg0) {
1701
+ const ret = arg0.cloneNode();
1702
+ return ret;
1703
+ }, arguments); },
1704
+ __wbg_cloneNode_70249c8beed88ee3: function() { return handleError(function (arg0, arg1) {
1705
+ const ret = arg0.cloneNode(arg1 !== 0);
1706
+ return ret;
1707
+ }, arguments); },
1708
+ __wbg_close_294d3f727cb7a844: function() { return handleError(function (arg0) {
1709
+ arg0.close();
1710
+ }, arguments); },
1711
+ __wbg_close_bf94aa7e38b9a94b: function() { return handleError(function (arg0) {
1712
+ arg0.close();
1713
+ }, arguments); },
1714
+ __wbg_closest_39824b16065066bc: function() { return handleError(function (arg0, arg1, arg2) {
1715
+ const ret = arg0.closest(getStringFromWasm0(arg1, arg2));
1716
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1717
+ }, arguments); },
1718
+ __wbg_code_f0359f3273037430: function(arg0, arg1) {
1719
+ const ret = arg1.code;
1720
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1721
+ const len1 = WASM_VECTOR_LEN;
1722
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1723
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1724
+ },
1725
+ __wbg_compareDocumentPosition_3d18385277202b3c: function(arg0, arg1) {
1726
+ const ret = arg0.compareDocumentPosition(arg1);
1727
+ return ret;
1728
+ },
1729
+ __wbg_composedPath_99300fc960717ac7: function(arg0) {
1730
+ const ret = arg0.composedPath();
1731
+ return ret;
1732
+ },
1733
+ __wbg_contains_743aa7c94499c269: function(arg0, arg1) {
1734
+ const ret = arg0.contains(arg1);
1735
+ return ret;
1736
+ },
1737
+ __wbg_content_6fed93ca1fd29f06: function(arg0) {
1738
+ const ret = arg0.content;
1739
+ return ret;
1740
+ },
1741
+ __wbg_createComment_bf8f324d5ce3d460: function(arg0, arg1, arg2) {
1742
+ const ret = arg0.createComment(getStringFromWasm0(arg1, arg2));
1743
+ return ret;
1744
+ },
1745
+ __wbg_createElementNS_2f7464180077e8e4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1746
+ const ret = arg0.createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1747
+ return ret;
1748
+ }, arguments); },
1749
+ __wbg_createElement_de4a31ed2fb252be: function() { return handleError(function (arg0, arg1, arg2) {
1750
+ const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
1751
+ return ret;
1752
+ }, arguments); },
1753
+ __wbg_createRange_d94ab95f29a3c437: function() { return handleError(function (arg0) {
1754
+ const ret = arg0.createRange();
1755
+ return ret;
1756
+ }, arguments); },
1757
+ __wbg_createTextNode_2b48c3fc75dfcc67: function(arg0, arg1, arg2) {
1758
+ const ret = arg0.createTextNode(getStringFromWasm0(arg1, arg2));
1759
+ return ret;
1760
+ },
1761
+ __wbg_ctrlKey_97b77227d0599549: function(arg0) {
1762
+ const ret = arg0.ctrlKey;
1763
+ return ret;
1764
+ },
1765
+ __wbg_ctrlKey_b7978e4cf78dc62b: function(arg0) {
1766
+ const ret = arg0.ctrlKey;
1767
+ return ret;
1768
+ },
1769
+ __wbg_currentTarget_ed5964b1e5e730f0: function(arg0) {
1770
+ const ret = arg0.currentTarget;
1771
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1772
+ },
1773
+ __wbg_data_6419bc2d9a3951a4: function(arg0, arg1) {
1774
+ const ret = arg1.data;
1775
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1776
+ var len1 = WASM_VECTOR_LEN;
1777
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1778
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1779
+ },
1780
+ __wbg_data_6e394f8166463083: function(arg0, arg1) {
1781
+ const ret = arg1.data;
1782
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1783
+ const len1 = WASM_VECTOR_LEN;
1784
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1785
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1786
+ },
1787
+ __wbg_defaultPrevented_edf7dc3a28cfa603: function(arg0) {
1788
+ const ret = arg0.defaultPrevented;
1789
+ return ret;
1790
+ },
1791
+ __wbg_deleteProperty_3ad7a085da623822: function() { return handleError(function (arg0, arg1) {
1792
+ const ret = Reflect.deleteProperty(arg0, arg1);
1793
+ return ret;
1794
+ }, arguments); },
1795
+ __wbg_deltaMode_d2ba7673c0228446: function(arg0) {
1796
+ const ret = arg0.deltaMode;
1797
+ return ret;
1798
+ },
1799
+ __wbg_deltaX_6ad2483f3f4c0349: function(arg0) {
1800
+ const ret = arg0.deltaX;
1801
+ return ret;
1802
+ },
1803
+ __wbg_deltaY_37dc0a54748a91f4: function(arg0) {
1804
+ const ret = arg0.deltaY;
1805
+ return ret;
1806
+ },
1807
+ __wbg_detail_5430271f512678de: function(arg0) {
1808
+ const ret = arg0.detail;
1809
+ return ret;
1810
+ },
1811
+ __wbg_disconnect_38f3b2a6de1419ab: function(arg0) {
1812
+ arg0.disconnect();
1813
+ },
1814
+ __wbg_disconnect_cfb0d06aca1c1b50: function(arg0) {
1815
+ arg0.disconnect();
1816
+ },
1817
+ __wbg_documentElement_5e44e37dd0181a81: function(arg0) {
1818
+ const ret = arg0.documentElement;
1819
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1820
+ },
1821
+ __wbg_document_3b5c3071b43e97ee: function(arg0) {
1822
+ const ret = arg0.document;
1823
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1824
+ },
1825
+ __wbg_documenteditorview_new: function(arg0) {
1826
+ const ret = DocumentEditorView.__wrap(arg0);
1827
+ return ret;
1828
+ },
1829
+ __wbg_done_57e08d0be6e30c02: function(arg0) {
1830
+ const ret = arg0.done;
1831
+ return ret;
1832
+ },
1833
+ __wbg_enqueue_c11626eae1c54509: function() { return handleError(function (arg0, arg1) {
1834
+ arg0.enqueue(arg1);
1835
+ }, arguments); },
1836
+ __wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
1837
+ const ret = Object.entries(arg0);
1838
+ return ret;
1839
+ },
1840
+ __wbg_error_757e9472f8410341: function(arg0, arg1) {
1841
+ let deferred0_0;
1842
+ let deferred0_1;
1843
+ try {
1844
+ deferred0_0 = arg0;
1845
+ deferred0_1 = arg1;
1846
+ console.error(getStringFromWasm0(arg0, arg1));
1847
+ } finally {
1848
+ wasm.__wbindgen_export3(deferred0_0, deferred0_1, 1);
1849
+ }
1850
+ },
1851
+ __wbg_error_9b95f63d905893d2: function(arg0, arg1) {
1852
+ console.error(arg0, arg1);
1853
+ },
1854
+ __wbg_error_d1fc0193610e0e39: function(arg0) {
1855
+ console.error(arg0);
1856
+ },
1857
+ __wbg_firstElementChild_a60f6eaf7d453487: function(arg0) {
1858
+ const ret = arg0.firstElementChild;
1859
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1860
+ },
1861
+ __wbg_focus_0a8d513ea5d8338e: function() { return handleError(function (arg0, arg1) {
1862
+ arg0.focus(arg1);
1863
+ }, arguments); },
1864
+ __wbg_for_e12451d86fef973f: function(arg0, arg1) {
1865
+ const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
1866
+ return ret;
1867
+ },
1868
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
1869
+ const ret = Array.from(arg0);
1870
+ return ret;
1871
+ },
1872
+ __wbg_getAttribute_c7b80d4010284561: function(arg0, arg1, arg2, arg3) {
1873
+ const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
1874
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1875
+ var len1 = WASM_VECTOR_LEN;
1876
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1877
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1878
+ },
1879
+ __wbg_getBoundingClientRect_329ca748ec918b0c: function(arg0) {
1880
+ const ret = arg0.getBoundingClientRect();
1881
+ return ret;
1882
+ },
1883
+ __wbg_getBoundingClientRect_9f973e395d22a7dd: function(arg0) {
1884
+ const ret = arg0.getBoundingClientRect();
1885
+ return ret;
1886
+ },
1887
+ __wbg_getClientRects_f683d637a254d6a7: function(arg0) {
1888
+ const ret = arg0.getClientRects();
1889
+ return ret;
1890
+ },
1891
+ __wbg_getComputedStyle_3be93eadae0000a9: function() { return handleError(function (arg0, arg1) {
1892
+ const ret = arg0.getComputedStyle(arg1);
1893
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1894
+ }, arguments); },
1895
+ __wbg_getContext_d93f904b714852ae: function() { return handleError(function (arg0, arg1, arg2) {
1896
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
1897
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1898
+ }, arguments); },
1899
+ __wbg_getData_a7ee5645c60062ce: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1900
+ const ret = arg1.getData(getStringFromWasm0(arg2, arg3));
1901
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1902
+ const len1 = WASM_VECTOR_LEN;
1903
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1904
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1905
+ }, arguments); },
1906
+ __wbg_getPropertyValue_c0aae8b8341401f1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1907
+ const ret = arg1.getPropertyValue(getStringFromWasm0(arg2, arg3));
1908
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1909
+ const len1 = WASM_VECTOR_LEN;
1910
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1911
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1912
+ }, arguments); },
1913
+ __wbg_getPrototypeOf_684ea783c7170e41: function(arg0) {
1914
+ const ret = Object.getPrototypeOf(arg0);
1915
+ return ret;
1916
+ },
1917
+ __wbg_getRandomValues_5d8c030b527203a6: function() { return handleError(function (arg0, arg1) {
1918
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1919
+ }, arguments); },
1920
+ __wbg_getRootNode_6de097189559981d: function(arg0) {
1921
+ const ret = arg0.getRootNode();
1922
+ return ret;
1923
+ },
1924
+ __wbg_getSelection_ebbf228892c36d69: function() { return handleError(function (arg0) {
1925
+ const ret = arg0.getSelection();
1926
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1927
+ }, arguments); },
1928
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
1929
+ const ret = Reflect.get(arg0, arg1);
1930
+ return ret;
1931
+ }, arguments); },
1932
+ __wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
1933
+ const ret = Reflect.get(arg0, arg1);
1934
+ return ret;
1935
+ }, arguments); },
1936
+ __wbg_get_a1361571ec6a08ad: function(arg0, arg1) {
1937
+ const ret = arg0[arg1 >>> 0];
1938
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1939
+ },
1940
+ __wbg_get_d7176cfb76d71114: function(arg0, arg1) {
1941
+ const ret = arg0[arg1 >>> 0];
1942
+ return ret;
1943
+ },
1944
+ __wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
1945
+ const ret = arg0[arg1 >>> 0];
1946
+ return ret;
1947
+ },
1948
+ __wbg_get_with_ref_key_fc601247060b7204: function(arg0, arg1) {
1949
+ const ret = arg0[arg1];
1950
+ return ret;
1951
+ },
1952
+ __wbg_hasAttribute_3f271bd99815d507: function(arg0, arg1, arg2) {
1953
+ const ret = arg0.hasAttribute(getStringFromWasm0(arg1, arg2));
1954
+ return ret;
1955
+ },
1956
+ __wbg_hasFocus_885aa7b7cb2eb167: function() { return handleError(function (arg0) {
1957
+ const ret = arg0.hasFocus();
1958
+ return ret;
1959
+ }, arguments); },
1960
+ __wbg_head_931aef85344cb8de: function(arg0) {
1961
+ const ret = arg0.head;
1962
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1963
+ },
1964
+ __wbg_height_ce5f2b5901ba05ab: function(arg0) {
1965
+ const ret = arg0.height;
1966
+ return ret;
1967
+ },
1968
+ __wbg_host_64d73c152c626ec8: function(arg0) {
1969
+ const ret = arg0.host;
1970
+ return ret;
1971
+ },
1972
+ __wbg_hostchannel_unwrap: function(arg0) {
1973
+ const ret = HostChannel.__unwrap(arg0);
1974
+ return ret;
1975
+ },
1976
+ __wbg_innerHeight_63bad5524492f70a: function() { return handleError(function (arg0) {
1977
+ const ret = arg0.innerHeight;
1978
+ return ret;
1979
+ }, arguments); },
1980
+ __wbg_innerWidth_3bc249efddc56481: function() { return handleError(function (arg0) {
1981
+ const ret = arg0.innerWidth;
1982
+ return ret;
1983
+ }, arguments); },
1984
+ __wbg_inputType_871ec3c14b5b9f6a: function(arg0, arg1) {
1985
+ const ret = arg1.inputType;
1986
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1987
+ const len1 = WASM_VECTOR_LEN;
1988
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
1989
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
1990
+ },
1991
+ __wbg_insertBefore_10ab0c19b463c12b: function() { return handleError(function (arg0, arg1, arg2) {
1992
+ const ret = arg0.insertBefore(arg1, arg2);
1993
+ return ret;
1994
+ }, arguments); },
1995
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
1996
+ let result;
1997
+ try {
1998
+ result = arg0 instanceof ArrayBuffer;
1999
+ } catch (_) {
2000
+ result = false;
2001
+ }
2002
+ const ret = result;
2003
+ return ret;
2004
+ },
2005
+ __wbg_instanceof_CanvasRenderingContext2d_72a60be8aaadecab: function(arg0) {
2006
+ let result;
2007
+ try {
2008
+ result = arg0 instanceof CanvasRenderingContext2D;
2009
+ } catch (_) {
2010
+ result = false;
2011
+ }
2012
+ const ret = result;
2013
+ return ret;
2014
+ },
2015
+ __wbg_instanceof_Document_b3d3a5e7905b4a2f: function(arg0) {
2016
+ let result;
2017
+ try {
2018
+ result = arg0 instanceof Document;
2019
+ } catch (_) {
2020
+ result = false;
2021
+ }
2022
+ const ret = result;
2023
+ return ret;
2024
+ },
2025
+ __wbg_instanceof_Element_05dbb22ded594343: function(arg0) {
2026
+ let result;
2027
+ try {
2028
+ result = arg0 instanceof Element;
2029
+ } catch (_) {
2030
+ result = false;
2031
+ }
2032
+ const ret = result;
2033
+ return ret;
2034
+ },
2035
+ __wbg_instanceof_HtmlCanvasElement_89f280683e987b9e: function(arg0) {
2036
+ let result;
2037
+ try {
2038
+ result = arg0 instanceof HTMLCanvasElement;
2039
+ } catch (_) {
2040
+ result = false;
2041
+ }
2042
+ const ret = result;
2043
+ return ret;
2044
+ },
2045
+ __wbg_instanceof_HtmlElement_ea32ea7121e0a496: function(arg0) {
2046
+ let result;
2047
+ try {
2048
+ result = arg0 instanceof HTMLElement;
2049
+ } catch (_) {
2050
+ result = false;
2051
+ }
2052
+ const ret = result;
2053
+ return ret;
2054
+ },
2055
+ __wbg_instanceof_HtmlTextAreaElement_37c6efee878106d5: function(arg0) {
2056
+ let result;
2057
+ try {
2058
+ result = arg0 instanceof HTMLTextAreaElement;
2059
+ } catch (_) {
2060
+ result = false;
2061
+ }
2062
+ const ret = result;
2063
+ return ret;
2064
+ },
2065
+ __wbg_instanceof_InputEvent_935e9638cd72a0e6: function(arg0) {
2066
+ let result;
2067
+ try {
2068
+ result = arg0 instanceof InputEvent;
2069
+ } catch (_) {
2070
+ result = false;
2071
+ }
2072
+ const ret = result;
2073
+ return ret;
2074
+ },
2075
+ __wbg_instanceof_KeyboardEvent_c9280788b471ab5f: function(arg0) {
2076
+ let result;
2077
+ try {
2078
+ result = arg0 instanceof KeyboardEvent;
2079
+ } catch (_) {
2080
+ result = false;
2081
+ }
2082
+ const ret = result;
2083
+ return ret;
2084
+ },
2085
+ __wbg_instanceof_MutationRecord_a8237c4aa085d6d7: function(arg0) {
2086
+ let result;
2087
+ try {
2088
+ result = arg0 instanceof MutationRecord;
2089
+ } catch (_) {
2090
+ result = false;
2091
+ }
2092
+ const ret = result;
2093
+ return ret;
2094
+ },
2095
+ __wbg_instanceof_Node_01bbf5179851b46b: function(arg0) {
2096
+ let result;
2097
+ try {
2098
+ result = arg0 instanceof Node;
2099
+ } catch (_) {
2100
+ result = false;
2101
+ }
2102
+ const ret = result;
2103
+ return ret;
2104
+ },
2105
+ __wbg_instanceof_ShadowRoot_cd78159e03fed884: function(arg0) {
2106
+ let result;
2107
+ try {
2108
+ result = arg0 instanceof ShadowRoot;
2109
+ } catch (_) {
2110
+ result = false;
2111
+ }
2112
+ const ret = result;
2113
+ return ret;
2114
+ },
2115
+ __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
2116
+ let result;
2117
+ try {
2118
+ result = arg0 instanceof Uint8Array;
2119
+ } catch (_) {
2120
+ result = false;
2121
+ }
2122
+ const ret = result;
2123
+ return ret;
2124
+ },
2125
+ __wbg_instanceof_Window_5cf453f5639aa1a2: function(arg0) {
2126
+ let result;
2127
+ try {
2128
+ result = arg0 instanceof Window;
2129
+ } catch (_) {
2130
+ result = false;
2131
+ }
2132
+ const ret = result;
2133
+ return ret;
2134
+ },
2135
+ __wbg_isArray_bcf1376d0d732d08: function(arg0) {
2136
+ const ret = Array.isArray(arg0);
2137
+ return ret;
2138
+ },
2139
+ __wbg_isComposing_4b9450ae90c4e806: function(arg0) {
2140
+ const ret = arg0.isComposing;
2141
+ return ret;
2142
+ },
2143
+ __wbg_isComposing_b1e74068b6ff27e2: function(arg0) {
2144
+ const ret = arg0.isComposing;
2145
+ return ret;
2146
+ },
2147
+ __wbg_isConnected_c529655b02d009e7: function(arg0) {
2148
+ const ret = arg0.isConnected;
2149
+ return ret;
2150
+ },
2151
+ __wbg_isContentEditable_21412032d82cf771: function(arg0) {
2152
+ const ret = arg0.isContentEditable;
2153
+ return ret;
2154
+ },
2155
+ __wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
2156
+ const ret = Number.isSafeInteger(arg0);
2157
+ return ret;
2158
+ },
2159
+ __wbg_isSameNode_1eda96b84821596e: function(arg0, arg1) {
2160
+ const ret = arg0.isSameNode(arg1);
2161
+ return ret;
2162
+ },
2163
+ __wbg_is_2248ff2b575d60c7: function(arg0, arg1) {
2164
+ const ret = Object.is(arg0, arg1);
2165
+ return ret;
2166
+ },
2167
+ __wbg_item_5b70fe58b24cf84b: function(arg0, arg1) {
2168
+ const ret = arg0.item(arg1 >>> 0);
2169
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2170
+ },
2171
+ __wbg_item_66d2ef77cbc53343: function(arg0, arg1) {
2172
+ const ret = arg0.item(arg1 >>> 0);
2173
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2174
+ },
2175
+ __wbg_iterator_e4c5e8f68ada7b58: function() {
2176
+ const ret = Symbol.iterator;
2177
+ return ret;
2178
+ },
2179
+ __wbg_keyCode_8de649c9821071f4: function(arg0) {
2180
+ const ret = arg0.keyCode;
2181
+ return ret;
2182
+ },
2183
+ __wbg_key_76125a528069feff: function(arg0, arg1) {
2184
+ const ret = arg1.key;
2185
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2186
+ const len1 = WASM_VECTOR_LEN;
2187
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2188
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2189
+ },
2190
+ __wbg_keys_105f5c0857898f84: function(arg0) {
2191
+ const ret = Object.keys(arg0);
2192
+ return ret;
2193
+ },
2194
+ __wbg_left_9df47701ff317a35: function(arg0) {
2195
+ const ret = arg0.left;
2196
+ return ret;
2197
+ },
2198
+ __wbg_length_186163212ffe79c3: function(arg0) {
2199
+ const ret = arg0.length;
2200
+ return ret;
2201
+ },
2202
+ __wbg_length_9aab85334c5daf3f: function(arg0) {
2203
+ const ret = arg0.length;
2204
+ return ret;
2205
+ },
2206
+ __wbg_length_9af91c726707ec61: function(arg0) {
2207
+ const ret = arg0.length;
2208
+ return ret;
2209
+ },
2210
+ __wbg_length_9f82f041dce0ac51: function(arg0) {
2211
+ const ret = arg0.length;
2212
+ return ret;
2213
+ },
2214
+ __wbg_length_b03a0fabb109b1e9: function(arg0) {
2215
+ const ret = arg0.length;
2216
+ return ret;
2217
+ },
2218
+ __wbg_length_ee846b4d1e8404a8: function(arg0) {
2219
+ const ret = arg0.length;
2220
+ return ret;
2221
+ },
2222
+ __wbg_matchMedia_b53687d22ec43649: function() { return handleError(function (arg0, arg1, arg2) {
2223
+ const ret = arg0.matchMedia(getStringFromWasm0(arg1, arg2));
2224
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2225
+ }, arguments); },
2226
+ __wbg_matches_a47c420646498c64: function(arg0) {
2227
+ const ret = arg0.matches;
2228
+ return ret;
2229
+ },
2230
+ __wbg_matches_f3a9298a593d4ea9: function() { return handleError(function (arg0, arg1, arg2) {
2231
+ const ret = arg0.matches(getStringFromWasm0(arg1, arg2));
2232
+ return ret;
2233
+ }, arguments); },
2234
+ __wbg_measureText_d831259b682a3f7d: function() { return handleError(function (arg0, arg1, arg2) {
2235
+ const ret = arg0.measureText(getStringFromWasm0(arg1, arg2));
2236
+ return ret;
2237
+ }, arguments); },
2238
+ __wbg_message_43d8c8f1d543a349: function(arg0) {
2239
+ const ret = arg0.message;
2240
+ return ret;
2241
+ },
2242
+ __wbg_metaKey_33c588e07fd74724: function(arg0) {
2243
+ const ret = arg0.metaKey;
2244
+ return ret;
2245
+ },
2246
+ __wbg_movementX_afc28e8e2f7045f9: function(arg0) {
2247
+ const ret = arg0.movementX;
2248
+ return ret;
2249
+ },
2250
+ __wbg_movementY_1edbf6740a40c7d6: function(arg0) {
2251
+ const ret = arg0.movementY;
2252
+ return ret;
2253
+ },
2254
+ __wbg_navigator_c17f443a6fe5d38d: function(arg0) {
2255
+ const ret = arg0.navigator;
2256
+ return ret;
2257
+ },
2258
+ __wbg_new_13de428334042d26: function(arg0) {
2259
+ const ret = new Uint8Array(arg0);
2260
+ return ret;
2261
+ },
2262
+ __wbg_new_37eb45aaf5eeb820: function() {
2263
+ const ret = new Array();
2264
+ return ret;
2265
+ },
2266
+ __wbg_new_7075786089b89c5e: function() {
2267
+ const ret = new Map();
2268
+ return ret;
2269
+ },
2270
+ __wbg_new_787b9fb330d55d78: function(arg0, arg1) {
2271
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2272
+ return ret;
2273
+ },
2274
+ __wbg_new_82c0e92e45295e35: function() { return handleError(function (arg0) {
2275
+ const ret = new MutationObserver(arg0);
2276
+ return ret;
2277
+ }, arguments); },
2278
+ __wbg_new_bb74001155cb8ca8: function() {
2279
+ const ret = new Error();
2280
+ return ret;
2281
+ },
2282
+ __wbg_new_bdf613c6b0b3d702: function() { return handleError(function (arg0) {
2283
+ const ret = new ResizeObserver(arg0);
2284
+ return ret;
2285
+ }, arguments); },
2286
+ __wbg_new_cd4348290afae586: function() {
2287
+ const ret = new Object();
2288
+ return ret;
2289
+ },
2290
+ __wbg_new_typed_e09da9dae6ee5935: function(arg0, arg1) {
2291
+ try {
2292
+ var state0 = {a: arg0, b: arg1};
2293
+ var cb0 = (arg0, arg1) => {
2294
+ const a = state0.a;
2295
+ state0.a = 0;
2296
+ try {
2297
+ return __wasm_bindgen_func_elem_30075(a, state0.b, arg0, arg1);
2298
+ } finally {
2299
+ state0.a = a;
2300
+ }
2301
+ };
2302
+ const ret = new Promise(cb0);
2303
+ return ret;
2304
+ } finally {
2305
+ state0.a = 0;
2306
+ }
2307
+ },
2308
+ __wbg_new_with_byte_offset_and_length_3cd32055a417f095: function(arg0, arg1, arg2) {
2309
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
2310
+ return ret;
2311
+ },
2312
+ __wbg_next_178c1651c11432b3: function(arg0) {
2313
+ const ret = arg0.next;
2314
+ return ret;
2315
+ },
2316
+ __wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
2317
+ const ret = arg0.next();
2318
+ return ret;
2319
+ }, arguments); },
2320
+ __wbg_observe_0bd2cd721b4e32da: function(arg0, arg1) {
2321
+ arg0.observe(arg1);
2322
+ },
2323
+ __wbg_observe_a20322af4df81e46: function() { return handleError(function (arg0, arg1, arg2) {
2324
+ arg0.observe(arg1, arg2);
2325
+ }, arguments); },
2326
+ __wbg_of_4cc373bef1f715a4: function(arg0, arg1, arg2) {
2327
+ const ret = Array.of(arg0, arg1, arg2);
2328
+ return ret;
2329
+ },
2330
+ __wbg_offsetHeight_91ca9e2be23502e5: function(arg0) {
2331
+ const ret = arg0.offsetHeight;
2332
+ return ret;
2333
+ },
2334
+ __wbg_offsetLeft_92a24794573f070b: function(arg0) {
2335
+ const ret = arg0.offsetLeft;
2336
+ return ret;
2337
+ },
2338
+ __wbg_offsetTop_18b5450f7d71de7f: function(arg0) {
2339
+ const ret = arg0.offsetTop;
2340
+ return ret;
2341
+ },
2342
+ __wbg_offsetWidth_ec7d4ad6adc7e29d: function(arg0) {
2343
+ const ret = arg0.offsetWidth;
2344
+ return ret;
2345
+ },
2346
+ __wbg_open_df8f03ea7b6074f9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2347
+ const ret = arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
2348
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2349
+ }, arguments); },
2350
+ __wbg_ownerDocument_adefd47fd596fe80: function(arg0) {
2351
+ const ret = arg0.ownerDocument;
2352
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2353
+ },
2354
+ __wbg_parentElement_300cdd39ce1d95f8: function(arg0) {
2355
+ const ret = arg0.parentElement;
2356
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2357
+ },
2358
+ __wbg_parentNode_fe15bcc26df42856: function(arg0) {
2359
+ const ret = arg0.parentNode;
2360
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2361
+ },
2362
+ __wbg_parse_c3f72b5a24f83c01: function() { return handleError(function (arg0, arg1) {
2363
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2364
+ return ret;
2365
+ }, arguments); },
2366
+ __wbg_platform_52fc79c201f26d9a: function() { return handleError(function (arg0, arg1) {
2367
+ const ret = arg1.platform;
2368
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2369
+ const len1 = WASM_VECTOR_LEN;
2370
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2371
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2372
+ }, arguments); },
2373
+ __wbg_pointerId_79742963a7afa662: function(arg0) {
2374
+ const ret = arg0.pointerId;
2375
+ return ret;
2376
+ },
2377
+ __wbg_pointerType_c9fa8bdb617406a5: function(arg0, arg1) {
2378
+ const ret = arg1.pointerType;
2379
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2380
+ const len1 = WASM_VECTOR_LEN;
2381
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2382
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2383
+ },
2384
+ __wbg_preventDefault_cfb06b02e7406899: function(arg0) {
2385
+ arg0.preventDefault();
2386
+ },
2387
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
2388
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2389
+ },
2390
+ __wbg_push_c9f4893fc209f768: function(arg0, arg1) {
2391
+ const ret = arg0.push(arg1);
2392
+ return ret;
2393
+ },
2394
+ __wbg_querySelectorAll_6c1bd81d448fb480: function() { return handleError(function (arg0, arg1, arg2) {
2395
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
2396
+ return ret;
2397
+ }, arguments); },
2398
+ __wbg_querySelectorAll_bd785907acdf7800: function() { return handleError(function (arg0, arg1, arg2) {
2399
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
2400
+ return ret;
2401
+ }, arguments); },
2402
+ __wbg_querySelector_1555c239948f2bf0: function() { return handleError(function (arg0, arg1, arg2) {
2403
+ const ret = arg0.querySelector(getStringFromWasm0(arg1, arg2));
2404
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2405
+ }, arguments); },
2406
+ __wbg_queueMicrotask_1e8503a8a690f0a3: function(arg0) {
2407
+ const ret = arg0.queueMicrotask;
2408
+ return ret;
2409
+ },
2410
+ __wbg_queueMicrotask_4a1a4d8dd332373b: function(arg0) {
2411
+ queueMicrotask(arg0);
2412
+ },
2413
+ __wbg_queueMicrotask_774f38e0c6ea7c04: function(arg0) {
2414
+ queueMicrotask(arg0);
2415
+ },
2416
+ __wbg_relatedTarget_81a7fb325047c130: function(arg0) {
2417
+ const ret = arg0.relatedTarget;
2418
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2419
+ },
2420
+ __wbg_relatedTarget_ad92f7baccf4721a: function(arg0) {
2421
+ const ret = arg0.relatedTarget;
2422
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2423
+ },
2424
+ __wbg_removeAttribute_735f25a801a701e1: function() { return handleError(function (arg0, arg1, arg2) {
2425
+ arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
2426
+ }, arguments); },
2427
+ __wbg_removeEventListener_4e20bd5fac3de092: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2428
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
2429
+ }, arguments); },
2430
+ __wbg_removeEventListener_cc543e35b1012a27: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2431
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3, arg4 !== 0);
2432
+ }, arguments); },
2433
+ __wbg_removeProperty_24e2a492b137f2d7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2434
+ const ret = arg1.removeProperty(getStringFromWasm0(arg2, arg3));
2435
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2436
+ const len1 = WASM_VECTOR_LEN;
2437
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2438
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2439
+ }, arguments); },
2440
+ __wbg_remove_12e9b1deffec7d2f: function() { return handleError(function (arg0, arg1, arg2) {
2441
+ arg0.remove(getStringFromWasm0(arg1, arg2));
2442
+ }, arguments); },
2443
+ __wbg_remove_8228e91d7ddbc755: function(arg0) {
2444
+ arg0.remove();
2445
+ },
2446
+ __wbg_remove_b28d816f9e896ff9: function(arg0) {
2447
+ arg0.remove();
2448
+ },
2449
+ __wbg_removedNodes_7531f0657288e3b6: function(arg0) {
2450
+ const ret = arg0.removedNodes;
2451
+ return ret;
2452
+ },
2453
+ __wbg_requestAnimationFrame_9ba49d36a19ca83c: function() { return handleError(function (arg0, arg1) {
2454
+ const ret = arg0.requestAnimationFrame(arg1);
2455
+ return ret;
2456
+ }, arguments); },
2457
+ __wbg_resolve_dbf78ab4942478b0: function(arg0) {
2458
+ const ret = Promise.resolve(arg0);
2459
+ return ret;
2460
+ },
2461
+ __wbg_respond_d97c023ee981d1f5: function() { return handleError(function (arg0, arg1) {
2462
+ arg0.respond(arg1 >>> 0);
2463
+ }, arguments); },
2464
+ __wbg_right_87f14139bda7986d: function(arg0) {
2465
+ const ret = arg0.right;
2466
+ return ret;
2467
+ },
2468
+ __wbg_scrollBy_129d61611ac573bc: function(arg0, arg1, arg2) {
2469
+ arg0.scrollBy(arg1, arg2);
2470
+ },
2471
+ __wbg_scrollBy_2babac9bf9ebe1f7: function(arg0, arg1, arg2) {
2472
+ arg0.scrollBy(arg1, arg2);
2473
+ },
2474
+ __wbg_scrollHeight_4e4f6d0987910b5b: function(arg0) {
2475
+ const ret = arg0.scrollHeight;
2476
+ return ret;
2477
+ },
2478
+ __wbg_scrollHeight_879470691b1201b7: function(arg0) {
2479
+ const ret = arg0.scrollHeight;
2480
+ return ret;
2481
+ },
2482
+ __wbg_scrollIntoView_2d57abe5fc53ada3: function(arg0, arg1) {
2483
+ arg0.scrollIntoView(arg1);
2484
+ },
2485
+ __wbg_scrollLeft_c7e73c4d493987dd: function(arg0) {
2486
+ const ret = arg0.scrollLeft;
2487
+ return ret;
2488
+ },
2489
+ __wbg_scrollTop_23cacc894823db89: function(arg0) {
2490
+ const ret = arg0.scrollTop;
2491
+ return ret;
2492
+ },
2493
+ __wbg_scrollTop_960220fc942d86fa: function(arg0) {
2494
+ const ret = arg0.scrollTop;
2495
+ return ret;
2496
+ },
2497
+ __wbg_scrollWidth_df7cf2f91aa6ab32: function(arg0) {
2498
+ const ret = arg0.scrollWidth;
2499
+ return ret;
2500
+ },
2501
+ __wbg_scrollingElement_cab663164451aa55: function(arg0) {
2502
+ const ret = arg0.scrollingElement;
2503
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2504
+ },
2505
+ __wbg_selectAllChildren_cbf066e301355d8d: function() { return handleError(function (arg0, arg1) {
2506
+ arg0.selectAllChildren(arg1);
2507
+ }, arguments); },
2508
+ __wbg_select_6daf0a771fc1452a: function(arg0) {
2509
+ arg0.select();
2510
+ },
2511
+ __wbg_selectionDirection_ed7be9d9332c384b: function() { return handleError(function (arg0, arg1) {
2512
+ const ret = arg1.selectionDirection;
2513
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2514
+ var len1 = WASM_VECTOR_LEN;
2515
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2516
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2517
+ }, arguments); },
2518
+ __wbg_selectionEnd_4e30573dffea7048: function() { return handleError(function (arg0) {
2519
+ const ret = arg0.selectionEnd;
2520
+ return isLikeNone(ret) ? Number.MAX_SAFE_INTEGER : (ret) >>> 0;
2521
+ }, arguments); },
2522
+ __wbg_selectionStart_ad171e38a65c192d: function() { return handleError(function (arg0) {
2523
+ const ret = arg0.selectionStart;
2524
+ return isLikeNone(ret) ? Number.MAX_SAFE_INTEGER : (ret) >>> 0;
2525
+ }, arguments); },
2526
+ __wbg_setAttribute_f75317b2b5cabfb4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2527
+ arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2528
+ }, arguments); },
2529
+ __wbg_setData_ee4b069576146f33: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2530
+ arg0.setData(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2531
+ }, arguments); },
2532
+ __wbg_setEnd_bed33f84d44f7f10: function() { return handleError(function (arg0, arg1, arg2) {
2533
+ arg0.setEnd(arg1, arg2 >>> 0);
2534
+ }, arguments); },
2535
+ __wbg_setPointerCapture_49f83ce093912db8: function() { return handleError(function (arg0, arg1) {
2536
+ arg0.setPointerCapture(arg1);
2537
+ }, arguments); },
2538
+ __wbg_setProperty_3fe74e09d53acb0b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2539
+ arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2540
+ }, arguments); },
2541
+ __wbg_setRangeText_5dbddeaca8fb9b81: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2542
+ arg0.setRangeText(getStringFromWasm0(arg1, arg2), arg3 >>> 0, arg4 >>> 0);
2543
+ }, arguments); },
2544
+ __wbg_setSelectionRange_a90dc6e7097b0a15: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2545
+ arg0.setSelectionRange(arg1 >>> 0, arg2 >>> 0, getStringFromWasm0(arg3, arg4));
2546
+ }, arguments); },
2547
+ __wbg_setSelectionRange_b8e9440b4c74a17b: function() { return handleError(function (arg0, arg1, arg2) {
2548
+ arg0.setSelectionRange(arg1 >>> 0, arg2 >>> 0);
2549
+ }, arguments); },
2550
+ __wbg_setStart_274773ccee3c34af: function() { return handleError(function (arg0, arg1, arg2) {
2551
+ arg0.setStart(arg1, arg2 >>> 0);
2552
+ }, arguments); },
2553
+ __wbg_setTimeout_30e839e1441c67a5: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2554
+ const ret = arg0.setTimeout(arg1, arg2, arg3);
2555
+ return ret;
2556
+ }, arguments); },
2557
+ __wbg_set_2793479888329cb6: function() { return handleError(function (arg0, arg1, arg2) {
2558
+ const ret = Reflect.set(arg0, arg1, arg2);
2559
+ return ret;
2560
+ }, arguments); },
2561
+ __wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
2562
+ const ret = arg0.set(arg1, arg2);
2563
+ return ret;
2564
+ },
2565
+ __wbg_set_attribute_filter_9f5cbfd8fd6a1bd1: function(arg0, arg1) {
2566
+ arg0.attributeFilter = arg1;
2567
+ },
2568
+ __wbg_set_attributes_8626122d66aa7f3d: function(arg0, arg1) {
2569
+ arg0.attributes = arg1 !== 0;
2570
+ },
2571
+ __wbg_set_block_a5fb74a86e30b7a1: function(arg0, arg1) {
2572
+ arg0.block = __wbindgen_enum_ScrollLogicalPosition[arg1];
2573
+ },
2574
+ __wbg_set_child_list_44b3fe560ecc1acc: function(arg0, arg1) {
2575
+ arg0.childList = arg1 !== 0;
2576
+ },
2577
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
2578
+ arg0[arg1 >>> 0] = arg2;
2579
+ },
2580
+ __wbg_set_data_12a0400ce39f6f81: function(arg0, arg1, arg2) {
2581
+ arg0.data = getStringFromWasm0(arg1, arg2);
2582
+ },
2583
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
2584
+ arg0[arg1] = arg2;
2585
+ },
2586
+ __wbg_set_feb3714f475485ba: function(arg0, arg1, arg2) {
2587
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
2588
+ },
2589
+ __wbg_set_font_aa0c0c514c73a5fa: function(arg0, arg1, arg2) {
2590
+ arg0.font = getStringFromWasm0(arg1, arg2);
2591
+ },
2592
+ __wbg_set_hidden_7efdf3958dc524e5: function(arg0, arg1) {
2593
+ arg0.hidden = arg1 !== 0;
2594
+ },
2595
+ __wbg_set_inline_99055ea8c877c63a: function(arg0, arg1) {
2596
+ arg0.inline = __wbindgen_enum_ScrollLogicalPosition[arg1];
2597
+ },
2598
+ __wbg_set_innerHTML_a9d3a267967b5117: function(arg0, arg1, arg2) {
2599
+ arg0.innerHTML = getStringFromWasm0(arg1, arg2);
2600
+ },
2601
+ __wbg_set_nodeValue_7e9217115013d873: function(arg0, arg1, arg2) {
2602
+ arg0.nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
2603
+ },
2604
+ __wbg_set_prevent_scroll_1d8392770c4be456: function(arg0, arg1) {
2605
+ arg0.preventScroll = arg1 !== 0;
2606
+ },
2607
+ __wbg_set_scrollLeft_e19ceb8a71841d6f: function(arg0, arg1) {
2608
+ arg0.scrollLeft = arg1;
2609
+ },
2610
+ __wbg_set_scrollTop_9abe010024623249: function(arg0, arg1) {
2611
+ arg0.scrollTop = arg1;
2612
+ },
2613
+ __wbg_set_scrollTop_a01ea28563affafe: function(arg0, arg1) {
2614
+ arg0.scrollTop = arg1;
2615
+ },
2616
+ __wbg_set_subtree_f3522725b2adc9ee: function(arg0, arg1) {
2617
+ arg0.subtree = arg1 !== 0;
2618
+ },
2619
+ __wbg_set_textContent_0177b2a6d9293c2c: function(arg0, arg1, arg2) {
2620
+ arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
2621
+ },
2622
+ __wbg_set_value_651c5a714f0a7b56: function(arg0, arg1, arg2) {
2623
+ arg0.value = getStringFromWasm0(arg1, arg2);
2624
+ },
2625
+ __wbg_set_value_cb7e77c93a95e491: function(arg0, arg1, arg2) {
2626
+ arg0.value = getStringFromWasm0(arg1, arg2);
2627
+ },
2628
+ __wbg_shiftKey_6a84be2563ae8a55: function(arg0) {
2629
+ const ret = arg0.shiftKey;
2630
+ return ret;
2631
+ },
2632
+ __wbg_shiftKey_a6ce93ef743d5834: function(arg0) {
2633
+ const ret = arg0.shiftKey;
2634
+ return ret;
2635
+ },
2636
+ __wbg_stack_575c4e0918581b9c: function(arg0, arg1) {
2637
+ const ret = arg1.stack;
2638
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2639
+ const len1 = WASM_VECTOR_LEN;
2640
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2641
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2642
+ },
2643
+ __wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc: function() {
2644
+ const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
2645
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2646
+ },
2647
+ __wbg_static_accessor_GLOBAL_e4293fb22cbe77da: function() {
2648
+ const ret = typeof global === 'undefined' ? undefined : global;
2649
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2650
+ },
2651
+ __wbg_static_accessor_SELF_53bb20457401453d: function() {
2652
+ const ret = typeof self === 'undefined' ? undefined : self;
2653
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2654
+ },
2655
+ __wbg_static_accessor_WINDOW_b5e0810bfecb7feb: function() {
2656
+ const ret = typeof window === 'undefined' ? undefined : window;
2657
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2658
+ },
2659
+ __wbg_stopPropagation_e4181c041abda4c3: function(arg0) {
2660
+ arg0.stopPropagation();
2661
+ },
2662
+ __wbg_stringify_0a0fbf2ef722380a: function() { return handleError(function (arg0) {
2663
+ const ret = JSON.stringify(arg0);
2664
+ return ret;
2665
+ }, arguments); },
2666
+ __wbg_style_f499e599ac70277f: function(arg0) {
2667
+ const ret = arg0.style;
2668
+ return ret;
2669
+ },
2670
+ __wbg_supports_9de4eeb8faa83029: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2671
+ const ret = CSS.supports(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2672
+ return ret;
2673
+ }, arguments); },
2674
+ __wbg_tabIndex_411742ceb89b722b: function(arg0) {
2675
+ const ret = arg0.tabIndex;
2676
+ return ret;
2677
+ },
2678
+ __wbg_tagName_775bb05619a5c52f: function(arg0, arg1) {
2679
+ const ret = arg1.tagName;
2680
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2681
+ const len1 = WASM_VECTOR_LEN;
2682
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2683
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2684
+ },
2685
+ __wbg_target_afe79b2955c583a9: function(arg0) {
2686
+ const ret = arg0.target;
2687
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2688
+ },
2689
+ __wbg_target_e5cd9c7aa87dd8df: function(arg0) {
2690
+ const ret = arg0.target;
2691
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2692
+ },
2693
+ __wbg_then_e3f7f2d365708be8: function(arg0, arg1) {
2694
+ const ret = arg0.then(arg1);
2695
+ return ret;
2696
+ },
2697
+ __wbg_timeStamp_e394c7b3859c9fb1: function(arg0) {
2698
+ const ret = arg0.timeStamp;
2699
+ return ret;
2700
+ },
2701
+ __wbg_toString_ac62c4a5cb3e62c7: function() { return handleError(function (arg0, arg1) {
2702
+ const ret = arg0.toString(arg1);
2703
+ return ret;
2704
+ }, arguments); },
2705
+ __wbg_top_2d45cda4e060d8bf: function(arg0) {
2706
+ const ret = arg0.top;
2707
+ return ret;
2708
+ },
2709
+ __wbg_touches_3e4459518c751cbf: function(arg0) {
2710
+ const ret = arg0.touches;
2711
+ return ret;
2712
+ },
2713
+ __wbg_type_5f9ceabba7ef7a1a: function(arg0, arg1) {
2714
+ const ret = arg1.type;
2715
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2716
+ const len1 = WASM_VECTOR_LEN;
2717
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2718
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2719
+ },
2720
+ __wbg_type_f4421a4c31af5555: function(arg0, arg1) {
2721
+ const ret = arg1.type;
2722
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2723
+ const len1 = WASM_VECTOR_LEN;
2724
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2725
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2726
+ },
2727
+ __wbg_userAgent_a20b4771d027eeaa: function() { return handleError(function (arg0, arg1) {
2728
+ const ret = arg1.userAgent;
2729
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2730
+ const len1 = WASM_VECTOR_LEN;
2731
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2732
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2733
+ }, arguments); },
2734
+ __wbg_value_df0a0e29a4d182fe: function(arg0, arg1) {
2735
+ const ret = arg1.value;
2736
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2737
+ const len1 = WASM_VECTOR_LEN;
2738
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2739
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2740
+ },
2741
+ __wbg_value_e0f328965e184931: function(arg0) {
2742
+ const ret = arg0.value;
2743
+ return ret;
2744
+ },
2745
+ __wbg_value_f61036dc298faa36: function(arg0, arg1) {
2746
+ const ret = arg1.value;
2747
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2748
+ const len1 = WASM_VECTOR_LEN;
2749
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
2750
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
2751
+ },
2752
+ __wbg_view_3b708d3bdaf3fc96: function(arg0) {
2753
+ const ret = arg0.view;
2754
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2755
+ },
2756
+ __wbg_warn_228ff2257384d295: function(arg0) {
2757
+ console.warn(arg0);
2758
+ },
2759
+ __wbg_width_28f5533f1b3b5abc: function(arg0) {
2760
+ const ret = arg0.width;
2761
+ return ret;
2762
+ },
2763
+ __wbg_width_d3c8d417d821d2fd: function(arg0) {
2764
+ const ret = arg0.width;
2765
+ return ret;
2766
+ },
2767
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
2768
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5936, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2769
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_27947);
2770
+ return ret;
2771
+ },
2772
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
2773
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6007, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2774
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_30073);
2775
+ return ret;
2776
+ },
2777
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
2778
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 1290, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2779
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_10634);
2780
+ return ret;
2781
+ },
2782
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
2783
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ClipboardEvent")], shim_idx: 1290, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2784
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_10634_82);
2785
+ return ret;
2786
+ },
2787
+ __wbindgen_generic_0000000000000005: function(arg0, arg1) {
2788
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1290, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2789
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_10634_83);
2790
+ return ret;
2791
+ },
2792
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
2793
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 5936, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2794
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_27947_84);
2795
+ return ret;
2796
+ },
2797
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
2798
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 1290, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2799
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_10634_85);
2800
+ return ret;
2801
+ },
2802
+ __wbindgen_generic_0000000000000008: function(arg0, arg1) {
2803
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 1291, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2804
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_10636);
2805
+ return ret;
2806
+ },
2807
+ __wbindgen_generic_0000000000000009: function(arg0, arg1) {
2808
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5280, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2809
+ const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_25659);
2810
+ return ret;
2811
+ },
2812
+ __wbindgen_generic_000000000000000a: function(arg0, arg1) {
2813
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5935, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2814
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_27946);
2815
+ return ret;
2816
+ },
2817
+ __wbindgen_generic_000000000000000b: function(arg0) {
2818
+ // Cast intrinsic for `F64 -> Externref`.
2819
+ const ret = arg0;
2820
+ return ret;
2821
+ },
2822
+ __wbindgen_generic_000000000000000c: function(arg0) {
2823
+ // Cast intrinsic for `I64 -> Externref`.
2824
+ const ret = arg0;
2825
+ return ret;
2826
+ },
2827
+ __wbindgen_generic_000000000000000d: function(arg0, arg1) {
2828
+ // Cast intrinsic for `Ref(String) -> Externref`.
2829
+ const ret = getStringFromWasm0(arg0, arg1);
2830
+ return ret;
2831
+ },
2832
+ __wbindgen_generic_000000000000000e: function(arg0) {
2833
+ // Cast intrinsic for `U64 -> Externref`.
2834
+ const ret = BigInt.asUintN(64, arg0);
2835
+ return ret;
2836
+ },
2837
+ __wbindgen_init_externref_table: function() {
2838
+ const table = wasm.__wbindgen_externrefs;
2839
+ table.set(0, undefined);
2840
+ table.set(1024, undefined);
2841
+ table.set(1025, null);
2842
+ table.set(1026, true);
2843
+ table.set(1027, false);
2844
+ },
2845
+ };
2846
+ return {
2847
+ __proto__: null,
2848
+ "./config_editor_bg.js": import0,
2849
+ };
2850
+ }
2851
+
2852
+ function __wasm_bindgen_func_elem_25659(arg0, arg1) {
2853
+ wasm.__wasm_bindgen_func_elem_25659(arg0, arg1);
2854
+ }
2855
+
2856
+ function __wasm_bindgen_func_elem_27946(arg0, arg1) {
2857
+ wasm.__wasm_bindgen_func_elem_27946(arg0, arg1);
2858
+ }
2859
+
2860
+ function __wasm_bindgen_func_elem_27947(arg0, arg1, arg2) {
2861
+ wasm.__wasm_bindgen_func_elem_27947(arg0, arg1, arg2);
2862
+ }
2863
+
2864
+ function __wasm_bindgen_func_elem_10634(arg0, arg1, arg2) {
2865
+ wasm.__wasm_bindgen_func_elem_10634(arg0, arg1, arg2);
2866
+ }
2867
+
2868
+ function __wasm_bindgen_func_elem_10634_82(arg0, arg1, arg2) {
2869
+ wasm.__wasm_bindgen_func_elem_10634_82(arg0, arg1, arg2);
2870
+ }
2871
+
2872
+ function __wasm_bindgen_func_elem_10634_83(arg0, arg1, arg2) {
2873
+ wasm.__wasm_bindgen_func_elem_10634_83(arg0, arg1, arg2);
2874
+ }
2875
+
2876
+ function __wasm_bindgen_func_elem_27947_84(arg0, arg1, arg2) {
2877
+ wasm.__wasm_bindgen_func_elem_27947_84(arg0, arg1, arg2);
2878
+ }
2879
+
2880
+ function __wasm_bindgen_func_elem_10634_85(arg0, arg1, arg2) {
2881
+ wasm.__wasm_bindgen_func_elem_10634_85(arg0, arg1, arg2);
2882
+ }
2883
+
2884
+ function __wasm_bindgen_func_elem_30075(arg0, arg1, arg2, arg3) {
2885
+ wasm.__wasm_bindgen_func_elem_30075(arg0, arg1, arg2, arg3);
2886
+ }
2887
+
2888
+ function __wasm_bindgen_func_elem_10636(arg0, arg1, arg2) {
2889
+ wasm.__wasm_bindgen_func_elem_10636(arg0, arg1, arg2);
2890
+ }
2891
+
2892
+ function __wasm_bindgen_func_elem_30073(arg0, arg1, arg2) {
2893
+ try {
2894
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
2895
+ wasm.__wasm_bindgen_func_elem_30073(retptr, arg0, arg1, arg2);
2896
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2897
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2898
+ if (r1) {
2899
+ throw takeFromExternrefTable0(r0);
2900
+ }
2901
+ } finally {
2902
+ wasm.__wbindgen_add_to_stack_pointer(16);
2903
+ }
2904
+ }
2905
+
2906
+
2907
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
2908
+
2909
+
2910
+ const __wbindgen_enum_ScrollLogicalPosition = ["start", "center", "end", "nearest"];
2911
+ const ConfigDocumentsFinalization = (typeof FinalizationRegistry === 'undefined')
2912
+ ? { register: () => {}, unregister: () => {} }
2913
+ : new FinalizationRegistry(ptr => wasm.__wbg_configdocuments_free(ptr, 1));
2914
+ const ConfigEditorFinalization = (typeof FinalizationRegistry === 'undefined')
2915
+ ? { register: () => {}, unregister: () => {} }
2916
+ : new FinalizationRegistry(ptr => wasm.__wbg_configeditor_free(ptr, 1));
2917
+ const DocumentEditorViewFinalization = (typeof FinalizationRegistry === 'undefined')
2918
+ ? { register: () => {}, unregister: () => {} }
2919
+ : new FinalizationRegistry(ptr => wasm.__wbg_documenteditorview_free(ptr, 1));
2920
+ const HostChannelFinalization = (typeof FinalizationRegistry === 'undefined')
2921
+ ? { register: () => {}, unregister: () => {} }
2922
+ : new FinalizationRegistry(ptr => wasm.__wbg_hostchannel_free(ptr, 1));
2923
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
2924
+ ? { register: () => {}, unregister: () => {} }
2925
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
2926
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
2927
+ ? { register: () => {}, unregister: () => {} }
2928
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
2929
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
2930
+ ? { register: () => {}, unregister: () => {} }
2931
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
2932
+
2933
+ function addToExternrefTable0(obj) {
2934
+ const idx = wasm.__wbindgen_export4();
2935
+ wasm.__wbindgen_externrefs.set(idx, obj);
2936
+ return idx;
2937
+ }
2938
+
2939
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2940
+ ? { register: () => {}, unregister: () => {} }
2941
+ : new FinalizationRegistry(state => wasm.__wbindgen_export6(state.a, state.b));
2942
+
2943
+ function debugString(val) {
2944
+ switch (typeof val) {
2945
+ // primitive types
2946
+ case 'number':
2947
+ case 'boolean':
2948
+ case 'undefined':
2949
+ return `${val}`;
2950
+ case 'string':
2951
+ return JSON.stringify(val);
2952
+ case 'bigint':
2953
+ return `${val}n`;
2954
+ case 'symbol':
2955
+ return val.description !== undefined
2956
+ ? `Symbol(${val.description})`
2957
+ : 'Symbol';
2958
+ case 'function':
2959
+ return typeof val.name === 'string' && val.name !== ''
2960
+ ? `Function(${val.name})`
2961
+ : 'Function';
2962
+ case 'object': {
2963
+ if (val === null) {
2964
+ return 'null';
2965
+ }
2966
+ // objects
2967
+ if (Array.isArray(val)) {
2968
+ return '[' + Array.from(val, debugString).join(', ') + ']';
2969
+ }
2970
+ // errors
2971
+ if (val instanceof Error) {
2972
+ return `${val.name}: ${val.message}\n${val.stack}`;
2973
+ }
2974
+
2975
+ const toStringOutput = toString.call(val);
2976
+ // Test for built-in
2977
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
2978
+
2979
+ // Failed to match the standard '[object ClassName]'
2980
+ if (className === undefined) {
2981
+ return toStringOutput;
2982
+ }
2983
+ if (className === 'Object') {
2984
+ // we're a user defined class or Object
2985
+ // JSON.stringify avoids problems with cycles, and is generally much
2986
+ // easier than looping through ownProperties of `val`.
2987
+ try {
2988
+ return 'Object(' + JSON.stringify(val) + ')';
2989
+ } catch (_) {
2990
+ return 'Object';
2991
+ }
2992
+ }
2993
+ // TODO we could test for more things here, like `Set`s and `Map`s.
2994
+ return className;
2995
+ }
2996
+ // Per MDN: 'This list of values is exhaustive.'
2997
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
2998
+ }
2999
+ }
3000
+
3001
+ function getArrayJsValueFromWasm0(ptr, len) {
3002
+ ptr = ptr >>> 0;
3003
+ const mem = getDataViewMemory0();
3004
+ const result = [];
3005
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
3006
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
3007
+ }
3008
+ wasm.__wbindgen_export8(ptr, len);
3009
+ return result;
3010
+ }
3011
+
3012
+ function getArrayU8FromWasm0(ptr, len) {
3013
+ ptr = ptr >>> 0;
3014
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
3015
+ }
3016
+
3017
+ let cachedDataViewMemory0 = null;
3018
+ function getDataViewMemory0() {
3019
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
3020
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
3021
+ }
3022
+ return cachedDataViewMemory0;
3023
+ }
3024
+
3025
+ function getStringFromWasm0(ptr, len) {
3026
+ ptr = ptr >>> 0;
3027
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
3028
+ }
3029
+
3030
+ let cachedUint8ArrayMemory0 = null;
3031
+ function getUint8ArrayMemory0() {
3032
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
3033
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
3034
+ }
3035
+ return cachedUint8ArrayMemory0;
3036
+ }
3037
+
3038
+ function handleError(f, args) {
3039
+ try {
3040
+ return f.apply(this, args);
3041
+ } catch (e) {
3042
+ const idx = addToExternrefTable0(e);
3043
+ wasm.__wbindgen_export5(idx);
3044
+ }
3045
+ }
3046
+
3047
+ function isLikeNone(x) {
3048
+ return x === undefined || x === null;
3049
+ }
3050
+
3051
+ function makeClosure(arg0, arg1, f) {
3052
+ const state = { a: arg0, b: arg1, cnt: 1 };
3053
+ const real = (...args) => {
3054
+
3055
+ // First up with a closure we increment the internal reference
3056
+ // count. This ensures that the Rust closure environment won't
3057
+ // be deallocated while we're invoking it.
3058
+ state.cnt++;
3059
+ try {
3060
+ return f(state.a, state.b, ...args);
3061
+ } finally {
3062
+ real._wbg_cb_unref();
3063
+ }
3064
+ };
3065
+ real._wbg_cb_unref = () => {
3066
+ if (--state.cnt === 0) {
3067
+ wasm.__wbindgen_export6(state.a, state.b);
3068
+ state.a = 0;
3069
+ CLOSURE_DTORS.unregister(state);
3070
+ }
3071
+ };
3072
+ CLOSURE_DTORS.register(real, state, state);
3073
+ return real;
3074
+ }
3075
+
3076
+ function makeMutClosure(arg0, arg1, f) {
3077
+ const state = { a: arg0, b: arg1, cnt: 1 };
3078
+ const real = (...args) => {
3079
+
3080
+ // First up with a closure we increment the internal reference
3081
+ // count. This ensures that the Rust closure environment won't
3082
+ // be deallocated while we're invoking it.
3083
+ state.cnt++;
3084
+ const a = state.a;
3085
+ state.a = 0;
3086
+ try {
3087
+ return f(a, state.b, ...args);
3088
+ } finally {
3089
+ state.a = a;
3090
+ real._wbg_cb_unref();
3091
+ }
3092
+ };
3093
+ real._wbg_cb_unref = () => {
3094
+ if (--state.cnt === 0) {
3095
+ wasm.__wbindgen_export6(state.a, state.b);
3096
+ state.a = 0;
3097
+ CLOSURE_DTORS.unregister(state);
3098
+ }
3099
+ };
3100
+ CLOSURE_DTORS.register(real, state, state);
3101
+ return real;
3102
+ }
3103
+
3104
+ function passStringToWasm0(arg, malloc, realloc) {
3105
+ if (realloc === undefined) {
3106
+ const buf = cachedTextEncoder.encode(arg);
3107
+ const ptr = malloc(buf.length, 1) >>> 0;
3108
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
3109
+ WASM_VECTOR_LEN = buf.length;
3110
+ return ptr;
3111
+ }
3112
+
3113
+ let len = arg.length;
3114
+ let ptr = malloc(len, 1) >>> 0;
3115
+
3116
+ const mem = getUint8ArrayMemory0();
3117
+
3118
+ let offset = 0;
3119
+
3120
+ for (; offset < len; offset++) {
3121
+ const code = arg.charCodeAt(offset);
3122
+ if (code > 0x7F) break;
3123
+ mem[ptr + offset] = code;
3124
+ }
3125
+ if (offset !== len) {
3126
+ if (offset !== 0) {
3127
+ arg = arg.slice(offset);
3128
+ }
3129
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
3130
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
3131
+ const ret = cachedTextEncoder.encodeInto(arg, view);
3132
+
3133
+ offset += ret.written;
3134
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
3135
+ }
3136
+
3137
+ WASM_VECTOR_LEN = offset;
3138
+ return ptr;
3139
+ }
3140
+
3141
+ function takeFromExternrefTable0(idx) {
3142
+ const value = wasm.__wbindgen_externrefs.get(idx);
3143
+ wasm.__wbindgen_export7(idx);
3144
+ return value;
3145
+ }
3146
+
3147
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
3148
+ cachedTextDecoder.decode();
3149
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
3150
+ let numBytesDecoded = 0;
3151
+ function decodeText(bytes) {
3152
+ numBytesDecoded += bytes.length;
3153
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
3154
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
3155
+ cachedTextDecoder.decode();
3156
+ numBytesDecoded = bytes.length;
3157
+ }
3158
+ return cachedTextDecoder.decode(bytes);
3159
+ }
3160
+
3161
+ const cachedTextEncoder = new TextEncoder();
3162
+
3163
+ if (!('encodeInto' in cachedTextEncoder)) {
3164
+ cachedTextEncoder.encodeInto = function (arg, view) {
3165
+ const buf = cachedTextEncoder.encode(arg);
3166
+ view.set(buf);
3167
+ return {
3168
+ read: arg.length,
3169
+ written: buf.length
3170
+ };
3171
+ };
3172
+ }
3173
+
3174
+ let WASM_VECTOR_LEN = 0;
3175
+
3176
+ const NOT_LOADED = new Proxy({}, { get() { throw new Error("config-editor: the WebAssembly module is not loaded: await loadConfigEditor() before using the editor or the tools"); } });
3177
+ let wasmModule, wasmInstance, wasm = NOT_LOADED;
3178
+ function __wbg_finalize_init(instance, module) {
3179
+ wasmInstance = instance;
3180
+ wasm = instance.exports;
3181
+ wasmModule = module;
3182
+ cachedDataViewMemory0 = null;
3183
+ cachedUint8ArrayMemory0 = null;
3184
+ wasm.__wbindgen_start();
3185
+ return wasm;
3186
+ }
3187
+
3188
+ async function __wbg_load(module, imports) {
3189
+ if (typeof Response === 'function' && module instanceof Response) {
3190
+ if (!module.ok) {
3191
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
3192
+ }
3193
+
3194
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
3195
+ try {
3196
+ return await WebAssembly.instantiateStreaming(module, imports);
3197
+ } catch (e) {
3198
+ const validResponse = expectedResponseType(module.type);
3199
+
3200
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
3201
+ 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);
3202
+
3203
+ } else { throw e; }
3204
+ }
3205
+ }
3206
+
3207
+ const bytes = await module.arrayBuffer();
3208
+ return await WebAssembly.instantiate(bytes, imports);
3209
+ } else {
3210
+ const instance = await WebAssembly.instantiate(module, imports);
3211
+
3212
+ if (instance instanceof WebAssembly.Instance) {
3213
+ return { instance, module };
3214
+ } else {
3215
+ return instance;
3216
+ }
3217
+ }
3218
+
3219
+ function expectedResponseType(type) {
3220
+ switch (type) {
3221
+ case 'basic': case 'cors': case 'default': return true;
3222
+ }
3223
+ return false;
3224
+ }
3225
+ }
3226
+
3227
+ function initSync(module) {
3228
+ if (wasm !== NOT_LOADED) return wasm;
3229
+
3230
+
3231
+ if (module !== undefined) {
3232
+ if (Object.getPrototypeOf(module) === Object.prototype) {
3233
+ ({module} = module)
3234
+ } else {
3235
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
3236
+ }
3237
+ }
3238
+
3239
+ const imports = __wbg_get_imports();
3240
+ if (!(module instanceof WebAssembly.Module)) {
3241
+ module = new WebAssembly.Module(module);
3242
+ }
3243
+ const instance = new WebAssembly.Instance(module, imports);
3244
+ return __wbg_finalize_init(instance, module);
3245
+ }
3246
+
3247
+ let __wbg_init_promise;
3248
+ async function __wbg_init(module_or_path) {
3249
+ if (wasm !== NOT_LOADED) return wasm;
3250
+ if (__wbg_init_promise === undefined) {
3251
+ __wbg_init_promise = __wbg_init_once(module_or_path);
3252
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
3253
+ }
3254
+ return __wbg_init_promise;
3255
+ }
3256
+
3257
+ async function __wbg_init_once(module_or_path) {
3258
+
3259
+ if (module_or_path !== undefined) {
3260
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
3261
+ ({module_or_path} = module_or_path)
3262
+ } else {
3263
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
3264
+ }
3265
+ }
3266
+
3267
+ if (module_or_path === undefined) {
3268
+ module_or_path = new URL('config_editor_bg.wasm', import.meta.url);
3269
+ }
3270
+ const imports = __wbg_get_imports();
3271
+
3272
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
3273
+ module_or_path = fetch(module_or_path);
3274
+ }
3275
+
3276
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
3277
+
3278
+ return __wbg_finalize_init(instance, module);
3279
+ }
3280
+
3281
+ export { initSync, __wbg_init as default };