@vector-im/matrix-wysiwyg 2.37.13 → 2.38.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,1910 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TextUpdate = exports.SuggestionPattern = exports.Selection = exports.ReplaceAll = exports.PatternKeyType = exports.PatternKey = exports.MenuStateUpdate = exports.MenuState = exports.MenuActionSuggestion = exports.MenuAction = exports.LinkAction = exports.Keep = exports.Edit = exports.DomHandle = exports.DomCreationError = exports.DomChildren = exports.Disabled = exports.CreateWithText = exports.Create = exports.ComposerUpdate = exports.ComposerModel = exports.ComposerAction = exports.ActionState = void 0;
7
+ exports.__wbg_body_edb1908d3ceff3a1 = __wbg_body_edb1908d3ceff3a1;
8
+ exports.__wbg_childNodes_118168e8b23bcb9b = __wbg_childNodes_118168e8b23bcb9b;
9
+ exports.__wbg_error_f851667af71bcfc6 = __wbg_error_f851667af71bcfc6;
10
+ exports.__wbg_forEach_2be8de7347d63332 = __wbg_forEach_2be8de7347d63332;
11
+ exports.__wbg_forEach_4cee849ec749be17 = __wbg_forEach_4cee849ec749be17;
12
+ exports.__wbg_getAttribute_99bddb29274b29b9 = __wbg_getAttribute_99bddb29274b29b9;
13
+ exports.__wbg_get_8cd5eba00ab6304f = __wbg_get_8cd5eba00ab6304f;
14
+ exports.__wbg_hasAttribute_8340e1a2a46f10f3 = __wbg_hasAttribute_8340e1a2a46f10f3;
15
+ exports.__wbg_length_d0a802565d17eec4 = __wbg_length_d0a802565d17eec4;
16
+ exports.__wbg_new_abda76e883ba8a5f = __wbg_new_abda76e883ba8a5f;
17
+ exports.__wbg_new_aec969a21ad2fc71 = __wbg_new_aec969a21ad2fc71;
18
+ exports.__wbg_new_d9bc3a0147634640 = __wbg_new_d9bc3a0147634640;
19
+ exports.__wbg_nodeName_149f7e29f80d1338 = __wbg_nodeName_149f7e29f80d1338;
20
+ exports.__wbg_nodeType_9dd609af1b555b54 = __wbg_nodeType_9dd609af1b555b54;
21
+ exports.__wbg_nodeValue_0b5f7b2274265747 = __wbg_nodeValue_0b5f7b2274265747;
22
+ exports.__wbg_parseFromString_656e5773ad0b3845 = __wbg_parseFromString_656e5773ad0b3845;
23
+ exports.__wbg_set_8417257aaedc936b = __wbg_set_8417257aaedc936b;
24
+ exports.__wbg_set_wasm = __wbg_set_wasm;
25
+ exports.__wbg_stack_658279fe44541cf6 = __wbg_stack_658279fe44541cf6;
26
+ exports.__wbindgen_number_new = __wbindgen_number_new;
27
+ exports.__wbindgen_object_clone_ref = __wbindgen_object_clone_ref;
28
+ exports.__wbindgen_object_drop_ref = __wbindgen_object_drop_ref;
29
+ exports.__wbindgen_string_get = __wbindgen_string_get;
30
+ exports.__wbindgen_string_new = __wbindgen_string_new;
31
+ exports.__wbindgen_throw = __wbindgen_throw;
32
+ exports.new_composer_model = new_composer_model;
33
+ exports.new_composer_model_from_html = new_composer_model_from_html;
34
+ exports.start = start;
35
+ let wasm;
36
+ function __wbg_set_wasm(val) {
37
+ wasm = val;
38
+ }
39
+ const heap = new Array(128).fill(undefined);
40
+ heap.push(undefined, null, true, false);
41
+ function getObject(idx) {
42
+ return heap[idx];
43
+ }
44
+ let WASM_VECTOR_LEN = 0;
45
+ let cachedUint8Memory0 = null;
46
+ function getUint8Memory0() {
47
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
48
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
49
+ }
50
+ return cachedUint8Memory0;
51
+ }
52
+ const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
53
+ let cachedTextEncoder = new lTextEncoder('utf-8');
54
+ const encodeString = typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) {
55
+ return cachedTextEncoder.encodeInto(arg, view);
56
+ } : function (arg, view) {
57
+ const buf = cachedTextEncoder.encode(arg);
58
+ view.set(buf);
59
+ return {
60
+ read: arg.length,
61
+ written: buf.length
62
+ };
63
+ };
64
+ function passStringToWasm0(arg, malloc, realloc) {
65
+ if (realloc === undefined) {
66
+ const buf = cachedTextEncoder.encode(arg);
67
+ const ptr = malloc(buf.length, 1) >>> 0;
68
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
69
+ WASM_VECTOR_LEN = buf.length;
70
+ return ptr;
71
+ }
72
+ let len = arg.length;
73
+ let ptr = malloc(len, 1) >>> 0;
74
+ const mem = getUint8Memory0();
75
+ let offset = 0;
76
+ for (; offset < len; offset++) {
77
+ const code = arg.charCodeAt(offset);
78
+ if (code > 0x7F) break;
79
+ mem[ptr + offset] = code;
80
+ }
81
+ if (offset !== len) {
82
+ if (offset !== 0) {
83
+ arg = arg.slice(offset);
84
+ }
85
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
86
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
87
+ const ret = encodeString(arg, view);
88
+ offset += ret.written;
89
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
90
+ }
91
+ WASM_VECTOR_LEN = offset;
92
+ return ptr;
93
+ }
94
+ function isLikeNone(x) {
95
+ return x === undefined || x === null;
96
+ }
97
+ let cachedInt32Memory0 = null;
98
+ function getInt32Memory0() {
99
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
100
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
101
+ }
102
+ return cachedInt32Memory0;
103
+ }
104
+ let heap_next = heap.length;
105
+ function dropObject(idx) {
106
+ if (idx < 132) return;
107
+ heap[idx] = heap_next;
108
+ heap_next = idx;
109
+ }
110
+ function takeObject(idx) {
111
+ const ret = getObject(idx);
112
+ dropObject(idx);
113
+ return ret;
114
+ }
115
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
116
+ let cachedTextDecoder = new lTextDecoder('utf-8', {
117
+ ignoreBOM: true,
118
+ fatal: true
119
+ });
120
+ cachedTextDecoder.decode();
121
+ function getStringFromWasm0(ptr, len) {
122
+ ptr = ptr >>> 0;
123
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
124
+ }
125
+ function addHeapObject(obj) {
126
+ if (heap_next === heap.length) heap.push(heap.length + 1);
127
+ const idx = heap_next;
128
+ heap_next = heap[idx];
129
+ heap[idx] = obj;
130
+ return idx;
131
+ }
132
+ /**
133
+ */
134
+ function start() {
135
+ wasm.start();
136
+ }
137
+
138
+ /**
139
+ * @returns {ComposerModel}
140
+ */
141
+ function new_composer_model() {
142
+ const ret = wasm.composermodel_new();
143
+ return ComposerModel.__wrap(ret);
144
+ }
145
+
146
+ /**
147
+ * @param {string} html
148
+ * @param {number} start_utf16_codeunit
149
+ * @param {number} end_utf16_codeunit
150
+ * @returns {ComposerModel}
151
+ */
152
+ function new_composer_model_from_html(html, start_utf16_codeunit, end_utf16_codeunit) {
153
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
154
+ const len0 = WASM_VECTOR_LEN;
155
+ const ret = wasm.new_composer_model_from_html(ptr0, len0, start_utf16_codeunit, end_utf16_codeunit);
156
+ return ComposerModel.__wrap(ret);
157
+ }
158
+ function _assertClass(instance, klass) {
159
+ if (!(instance instanceof klass)) {
160
+ throw new Error(`expected instance of ${klass.name}`);
161
+ }
162
+ return instance.ptr;
163
+ }
164
+ function __wbg_adapter_121(arg0, arg1, arg2, arg3, arg4) {
165
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h755216c79df6c7d9(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
166
+ }
167
+ function __wbg_adapter_124(arg0, arg1, arg2, arg3) {
168
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h5427b2b10c47063d(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
169
+ }
170
+ function handleError(f, args) {
171
+ try {
172
+ return f.apply(this, args);
173
+ } catch (e) {
174
+ wasm.__wbindgen_exn_store(addHeapObject(e));
175
+ }
176
+ }
177
+ /**
178
+ */
179
+ const PatternKeyType = exports.PatternKeyType = Object.freeze({
180
+ At: 0,
181
+ "0": "At",
182
+ Hash: 1,
183
+ "1": "Hash",
184
+ Slash: 2,
185
+ "2": "Slash",
186
+ Custom: 3,
187
+ "3": "Custom"
188
+ });
189
+ /**
190
+ */
191
+ const DomCreationError = exports.DomCreationError = Object.freeze({
192
+ HtmlParseError: 0,
193
+ "0": "HtmlParseError",
194
+ MarkdownParseError: 1,
195
+ "1": "MarkdownParseError"
196
+ });
197
+ /**
198
+ */
199
+ const ComposerAction = exports.ComposerAction = Object.freeze({
200
+ Bold: 0,
201
+ "0": "Bold",
202
+ Italic: 1,
203
+ "1": "Italic",
204
+ StrikeThrough: 2,
205
+ "2": "StrikeThrough",
206
+ Underline: 3,
207
+ "3": "Underline",
208
+ InlineCode: 4,
209
+ "4": "InlineCode",
210
+ Link: 5,
211
+ "5": "Link",
212
+ Undo: 6,
213
+ "6": "Undo",
214
+ Redo: 7,
215
+ "7": "Redo",
216
+ OrderedList: 8,
217
+ "8": "OrderedList",
218
+ UnorderedList: 9,
219
+ "9": "UnorderedList",
220
+ Indent: 10,
221
+ "10": "Indent",
222
+ Unindent: 11,
223
+ "11": "Unindent",
224
+ CodeBlock: 12,
225
+ "12": "CodeBlock",
226
+ Quote: 13,
227
+ "13": "Quote"
228
+ });
229
+ /**
230
+ */
231
+ const ActionState = exports.ActionState = Object.freeze({
232
+ /**
233
+ * The button can be clicked, and will perform its normal action
234
+ * e.g. make something bold
235
+ */
236
+ Enabled: 0,
237
+ "0": "Enabled",
238
+ /**
239
+ * The button can be clicked, and will perform the reverse of its
240
+ * normal action e.g. stop something being bold
241
+ */
242
+ Reversed: 1,
243
+ "1": "Reversed",
244
+ /**
245
+ * The button cannot be clicked
246
+ */
247
+ Disabled: 2,
248
+ "2": "Disabled"
249
+ });
250
+ const ComposerModelFinalization = typeof FinalizationRegistry === 'undefined' ? {
251
+ register: () => {},
252
+ unregister: () => {}
253
+ } : new FinalizationRegistry(ptr => wasm.__wbg_composermodel_free(ptr >>> 0));
254
+ /**
255
+ */
256
+ class ComposerModel {
257
+ static __wrap(ptr) {
258
+ ptr = ptr >>> 0;
259
+ const obj = Object.create(ComposerModel.prototype);
260
+ obj.__wbg_ptr = ptr;
261
+ ComposerModelFinalization.register(obj, obj.__wbg_ptr, obj);
262
+ return obj;
263
+ }
264
+ __destroy_into_raw() {
265
+ const ptr = this.__wbg_ptr;
266
+ this.__wbg_ptr = 0;
267
+ ComposerModelFinalization.unregister(this);
268
+ return ptr;
269
+ }
270
+ free() {
271
+ const ptr = this.__destroy_into_raw();
272
+ wasm.__wbg_composermodel_free(ptr);
273
+ }
274
+ /**
275
+ * @returns {ComposerModel}
276
+ */
277
+ static new() {
278
+ const ret = wasm.composermodel_new();
279
+ return ComposerModel.__wrap(ret);
280
+ }
281
+ /**
282
+ * @param {string} text
283
+ * @returns {ComposerModel}
284
+ */
285
+ static from_example_format(text) {
286
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
287
+ const len0 = WASM_VECTOR_LEN;
288
+ const ret = wasm.composermodel_from_example_format(ptr0, len0);
289
+ return ComposerModel.__wrap(ret);
290
+ }
291
+ /**
292
+ * @returns {string}
293
+ */
294
+ to_example_format() {
295
+ let deferred1_0;
296
+ let deferred1_1;
297
+ try {
298
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
299
+ wasm.composermodel_to_example_format(retptr, this.__wbg_ptr);
300
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
301
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
302
+ deferred1_0 = r0;
303
+ deferred1_1 = r1;
304
+ return getStringFromWasm0(r0, r1);
305
+ } finally {
306
+ wasm.__wbindgen_add_to_stack_pointer(16);
307
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
308
+ }
309
+ }
310
+ /**
311
+ * @returns {string}
312
+ */
313
+ get_content_as_html() {
314
+ let deferred1_0;
315
+ let deferred1_1;
316
+ try {
317
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
318
+ wasm.composermodel_get_content_as_html(retptr, this.__wbg_ptr);
319
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
320
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
321
+ deferred1_0 = r0;
322
+ deferred1_1 = r1;
323
+ return getStringFromWasm0(r0, r1);
324
+ } finally {
325
+ wasm.__wbindgen_add_to_stack_pointer(16);
326
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
327
+ }
328
+ }
329
+ /**
330
+ * @returns {string}
331
+ */
332
+ get_content_as_message_html() {
333
+ let deferred1_0;
334
+ let deferred1_1;
335
+ try {
336
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
337
+ wasm.composermodel_get_content_as_message_html(retptr, this.__wbg_ptr);
338
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
339
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
340
+ deferred1_0 = r0;
341
+ deferred1_1 = r1;
342
+ return getStringFromWasm0(r0, r1);
343
+ } finally {
344
+ wasm.__wbindgen_add_to_stack_pointer(16);
345
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
346
+ }
347
+ }
348
+ /**
349
+ * @returns {string}
350
+ */
351
+ get_content_as_markdown() {
352
+ let deferred1_0;
353
+ let deferred1_1;
354
+ try {
355
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
356
+ wasm.composermodel_get_content_as_markdown(retptr, this.__wbg_ptr);
357
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
358
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
359
+ deferred1_0 = r0;
360
+ deferred1_1 = r1;
361
+ return getStringFromWasm0(r0, r1);
362
+ } finally {
363
+ wasm.__wbindgen_add_to_stack_pointer(16);
364
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
365
+ }
366
+ }
367
+ /**
368
+ * @returns {string}
369
+ */
370
+ get_content_as_message_markdown() {
371
+ let deferred1_0;
372
+ let deferred1_1;
373
+ try {
374
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
375
+ wasm.composermodel_get_content_as_message_markdown(retptr, this.__wbg_ptr);
376
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
377
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
378
+ deferred1_0 = r0;
379
+ deferred1_1 = r1;
380
+ return getStringFromWasm0(r0, r1);
381
+ } finally {
382
+ wasm.__wbindgen_add_to_stack_pointer(16);
383
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
384
+ }
385
+ }
386
+ /**
387
+ * @returns {string}
388
+ */
389
+ get_content_as_plain_text() {
390
+ let deferred1_0;
391
+ let deferred1_1;
392
+ try {
393
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
394
+ wasm.composermodel_get_content_as_plain_text(retptr, this.__wbg_ptr);
395
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
396
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
397
+ deferred1_0 = r0;
398
+ deferred1_1 = r1;
399
+ return getStringFromWasm0(r0, r1);
400
+ } finally {
401
+ wasm.__wbindgen_add_to_stack_pointer(16);
402
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
403
+ }
404
+ }
405
+ /**
406
+ * @returns {DomHandle}
407
+ */
408
+ document() {
409
+ const ret = wasm.composermodel_document(this.__wbg_ptr);
410
+ return DomHandle.__wrap(ret);
411
+ }
412
+ /**
413
+ * @returns {Map<any, any>}
414
+ */
415
+ action_states() {
416
+ const ret = wasm.composermodel_action_states(this.__wbg_ptr);
417
+ return takeObject(ret);
418
+ }
419
+ /**
420
+ * @param {number} start_utf16_codeunit
421
+ * @param {number} end_utf16_codeunit
422
+ * @returns {ComposerUpdate}
423
+ */
424
+ select(start_utf16_codeunit, end_utf16_codeunit) {
425
+ const ret = wasm.composermodel_select(this.__wbg_ptr, start_utf16_codeunit, end_utf16_codeunit);
426
+ return ComposerUpdate.__wrap(ret);
427
+ }
428
+ /**
429
+ * @returns {number}
430
+ */
431
+ selection_start() {
432
+ const ret = wasm.composermodel_selection_start(this.__wbg_ptr);
433
+ return ret >>> 0;
434
+ }
435
+ /**
436
+ * @returns {number}
437
+ */
438
+ selection_end() {
439
+ const ret = wasm.composermodel_selection_end(this.__wbg_ptr);
440
+ return ret >>> 0;
441
+ }
442
+ /**
443
+ * @param {string} new_text
444
+ * @returns {ComposerUpdate}
445
+ */
446
+ replace_text(new_text) {
447
+ const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
448
+ const len0 = WASM_VECTOR_LEN;
449
+ const ret = wasm.composermodel_replace_text(this.__wbg_ptr, ptr0, len0);
450
+ return ComposerUpdate.__wrap(ret);
451
+ }
452
+ /**
453
+ * @param {string} new_text
454
+ * @param {SuggestionPattern} suggestion
455
+ * @param {boolean} append_space
456
+ * @returns {ComposerUpdate}
457
+ */
458
+ replace_text_suggestion(new_text, suggestion, append_space) {
459
+ const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
460
+ const len0 = WASM_VECTOR_LEN;
461
+ _assertClass(suggestion, SuggestionPattern);
462
+ const ret = wasm.composermodel_replace_text_suggestion(this.__wbg_ptr, ptr0, len0, suggestion.__wbg_ptr, append_space);
463
+ return ComposerUpdate.__wrap(ret);
464
+ }
465
+ /**
466
+ * @param {string} text
467
+ * @returns {ComposerUpdate}
468
+ */
469
+ set_content_from_html(text) {
470
+ try {
471
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
472
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
473
+ const len0 = WASM_VECTOR_LEN;
474
+ wasm.composermodel_set_content_from_html(retptr, this.__wbg_ptr, ptr0, len0);
475
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
476
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
477
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
478
+ if (r2) {
479
+ throw takeObject(r1);
480
+ }
481
+ return ComposerUpdate.__wrap(r0);
482
+ } finally {
483
+ wasm.__wbindgen_add_to_stack_pointer(16);
484
+ }
485
+ }
486
+ /**
487
+ * @param {string} text
488
+ * @returns {ComposerUpdate}
489
+ */
490
+ set_content_from_markdown(text) {
491
+ try {
492
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
493
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
494
+ const len0 = WASM_VECTOR_LEN;
495
+ wasm.composermodel_set_content_from_markdown(retptr, this.__wbg_ptr, ptr0, len0);
496
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
497
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
498
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
499
+ if (r2) {
500
+ throw takeObject(r1);
501
+ }
502
+ return ComposerUpdate.__wrap(r0);
503
+ } finally {
504
+ wasm.__wbindgen_add_to_stack_pointer(16);
505
+ }
506
+ }
507
+ /**
508
+ * @returns {ComposerUpdate}
509
+ */
510
+ clear() {
511
+ const ret = wasm.composermodel_clear(this.__wbg_ptr);
512
+ return ComposerUpdate.__wrap(ret);
513
+ }
514
+ /**
515
+ * @returns {ComposerUpdate}
516
+ */
517
+ enter() {
518
+ const ret = wasm.composermodel_enter(this.__wbg_ptr);
519
+ return ComposerUpdate.__wrap(ret);
520
+ }
521
+ /**
522
+ * @returns {ComposerUpdate}
523
+ */
524
+ backspace() {
525
+ const ret = wasm.composermodel_backspace(this.__wbg_ptr);
526
+ return ComposerUpdate.__wrap(ret);
527
+ }
528
+ /**
529
+ * @returns {ComposerUpdate}
530
+ */
531
+ backspace_word() {
532
+ const ret = wasm.composermodel_backspace_word(this.__wbg_ptr);
533
+ return ComposerUpdate.__wrap(ret);
534
+ }
535
+ /**
536
+ * @returns {ComposerUpdate}
537
+ */
538
+ delete() {
539
+ const ret = wasm.composermodel_delete(this.__wbg_ptr);
540
+ return ComposerUpdate.__wrap(ret);
541
+ }
542
+ /**
543
+ * @returns {ComposerUpdate}
544
+ */
545
+ delete_word() {
546
+ const ret = wasm.composermodel_delete_word(this.__wbg_ptr);
547
+ return ComposerUpdate.__wrap(ret);
548
+ }
549
+ /**
550
+ * @returns {ComposerUpdate}
551
+ */
552
+ bold() {
553
+ const ret = wasm.composermodel_bold(this.__wbg_ptr);
554
+ return ComposerUpdate.__wrap(ret);
555
+ }
556
+ /**
557
+ * @returns {ComposerUpdate}
558
+ */
559
+ italic() {
560
+ const ret = wasm.composermodel_italic(this.__wbg_ptr);
561
+ return ComposerUpdate.__wrap(ret);
562
+ }
563
+ /**
564
+ * @returns {ComposerUpdate}
565
+ */
566
+ strike_through() {
567
+ const ret = wasm.composermodel_strike_through(this.__wbg_ptr);
568
+ return ComposerUpdate.__wrap(ret);
569
+ }
570
+ /**
571
+ * @returns {ComposerUpdate}
572
+ */
573
+ underline() {
574
+ const ret = wasm.composermodel_underline(this.__wbg_ptr);
575
+ return ComposerUpdate.__wrap(ret);
576
+ }
577
+ /**
578
+ * @returns {ComposerUpdate}
579
+ */
580
+ quote() {
581
+ const ret = wasm.composermodel_quote(this.__wbg_ptr);
582
+ return ComposerUpdate.__wrap(ret);
583
+ }
584
+ /**
585
+ * @returns {ComposerUpdate}
586
+ */
587
+ inline_code() {
588
+ const ret = wasm.composermodel_inline_code(this.__wbg_ptr);
589
+ return ComposerUpdate.__wrap(ret);
590
+ }
591
+ /**
592
+ * @returns {ComposerUpdate}
593
+ */
594
+ code_block() {
595
+ const ret = wasm.composermodel_code_block(this.__wbg_ptr);
596
+ return ComposerUpdate.__wrap(ret);
597
+ }
598
+ /**
599
+ * @returns {ComposerUpdate}
600
+ */
601
+ undo() {
602
+ const ret = wasm.composermodel_undo(this.__wbg_ptr);
603
+ return ComposerUpdate.__wrap(ret);
604
+ }
605
+ /**
606
+ * @returns {ComposerUpdate}
607
+ */
608
+ redo() {
609
+ const ret = wasm.composermodel_redo(this.__wbg_ptr);
610
+ return ComposerUpdate.__wrap(ret);
611
+ }
612
+ /**
613
+ * @returns {ComposerUpdate}
614
+ */
615
+ ordered_list() {
616
+ const ret = wasm.composermodel_ordered_list(this.__wbg_ptr);
617
+ return ComposerUpdate.__wrap(ret);
618
+ }
619
+ /**
620
+ * @returns {ComposerUpdate}
621
+ */
622
+ unordered_list() {
623
+ const ret = wasm.composermodel_unordered_list(this.__wbg_ptr);
624
+ return ComposerUpdate.__wrap(ret);
625
+ }
626
+ /**
627
+ * @returns {ComposerUpdate}
628
+ */
629
+ indent() {
630
+ const ret = wasm.composermodel_indent(this.__wbg_ptr);
631
+ return ComposerUpdate.__wrap(ret);
632
+ }
633
+ /**
634
+ * @returns {ComposerUpdate}
635
+ */
636
+ unindent() {
637
+ const ret = wasm.composermodel_unindent(this.__wbg_ptr);
638
+ return ComposerUpdate.__wrap(ret);
639
+ }
640
+ /**
641
+ * @returns {LinkAction}
642
+ */
643
+ get_link_action() {
644
+ const ret = wasm.composermodel_get_link_action(this.__wbg_ptr);
645
+ return LinkAction.__wrap(ret);
646
+ }
647
+ /**
648
+ * @param {string} url
649
+ * @param {Map<any, any>} attributes
650
+ * @returns {ComposerUpdate}
651
+ */
652
+ set_link(url, attributes) {
653
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
654
+ const len0 = WASM_VECTOR_LEN;
655
+ const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0, addHeapObject(attributes));
656
+ return ComposerUpdate.__wrap(ret);
657
+ }
658
+ /**
659
+ * @param {string} url
660
+ * @param {string} text
661
+ * @param {Map<any, any>} attributes
662
+ * @returns {ComposerUpdate}
663
+ */
664
+ set_link_with_text(url, text, attributes) {
665
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
666
+ const len0 = WASM_VECTOR_LEN;
667
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
668
+ const len1 = WASM_VECTOR_LEN;
669
+ const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(attributes));
670
+ return ComposerUpdate.__wrap(ret);
671
+ }
672
+ /**
673
+ * @param {Array<any>} custom_suggestion_patterns
674
+ */
675
+ set_custom_suggestion_patterns(custom_suggestion_patterns) {
676
+ wasm.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr, addHeapObject(custom_suggestion_patterns));
677
+ }
678
+ /**
679
+ * Creates an at-room mention node and inserts it into the composer at the current selection
680
+ * @param {Map<any, any>} attributes
681
+ * @returns {ComposerUpdate}
682
+ */
683
+ insert_at_room_mention(attributes) {
684
+ const ret = wasm.composermodel_insert_at_room_mention(this.__wbg_ptr, addHeapObject(attributes));
685
+ return ComposerUpdate.__wrap(ret);
686
+ }
687
+ /**
688
+ * Creates a mention node and inserts it into the composer at the current selection
689
+ * @param {string} url
690
+ * @param {string} text
691
+ * @param {Map<any, any>} attributes
692
+ * @returns {ComposerUpdate}
693
+ */
694
+ insert_mention(url, text, attributes) {
695
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
696
+ const len0 = WASM_VECTOR_LEN;
697
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
698
+ const len1 = WASM_VECTOR_LEN;
699
+ const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(attributes));
700
+ return ComposerUpdate.__wrap(ret);
701
+ }
702
+ /**
703
+ * Creates an at-room mention node and inserts it into the composer, replacing the
704
+ * text content defined by the suggestion
705
+ * @param {SuggestionPattern} suggestion
706
+ * @param {Map<any, any>} attributes
707
+ * @returns {ComposerUpdate}
708
+ */
709
+ insert_at_room_mention_at_suggestion(suggestion, attributes) {
710
+ _assertClass(suggestion, SuggestionPattern);
711
+ const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr, addHeapObject(attributes));
712
+ return ComposerUpdate.__wrap(ret);
713
+ }
714
+ /**
715
+ * Creates a mention node and inserts it into the composer, replacing the
716
+ * text content defined by the suggestion
717
+ * @param {string} url
718
+ * @param {string} text
719
+ * @param {SuggestionPattern} suggestion
720
+ * @param {Map<any, any>} attributes
721
+ * @returns {ComposerUpdate}
722
+ */
723
+ insert_mention_at_suggestion(url, text, suggestion, attributes) {
724
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
725
+ const len0 = WASM_VECTOR_LEN;
726
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
727
+ const len1 = WASM_VECTOR_LEN;
728
+ _assertClass(suggestion, SuggestionPattern);
729
+ const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr, addHeapObject(attributes));
730
+ return ComposerUpdate.__wrap(ret);
731
+ }
732
+ /**
733
+ * @returns {ComposerUpdate}
734
+ */
735
+ remove_links() {
736
+ const ret = wasm.composermodel_remove_links(this.__wbg_ptr);
737
+ return ComposerUpdate.__wrap(ret);
738
+ }
739
+ }
740
+ exports.ComposerModel = ComposerModel;
741
+ const ComposerUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
742
+ register: () => {},
743
+ unregister: () => {}
744
+ } : new FinalizationRegistry(ptr => wasm.__wbg_composerupdate_free(ptr >>> 0));
745
+ /**
746
+ */
747
+ class ComposerUpdate {
748
+ static __wrap(ptr) {
749
+ ptr = ptr >>> 0;
750
+ const obj = Object.create(ComposerUpdate.prototype);
751
+ obj.__wbg_ptr = ptr;
752
+ ComposerUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
753
+ return obj;
754
+ }
755
+ __destroy_into_raw() {
756
+ const ptr = this.__wbg_ptr;
757
+ this.__wbg_ptr = 0;
758
+ ComposerUpdateFinalization.unregister(this);
759
+ return ptr;
760
+ }
761
+ free() {
762
+ const ptr = this.__destroy_into_raw();
763
+ wasm.__wbg_composerupdate_free(ptr);
764
+ }
765
+ /**
766
+ * @returns {TextUpdate}
767
+ */
768
+ text_update() {
769
+ const ret = wasm.composerupdate_text_update(this.__wbg_ptr);
770
+ return TextUpdate.__wrap(ret);
771
+ }
772
+ /**
773
+ * @returns {MenuState}
774
+ */
775
+ menu_state() {
776
+ const ret = wasm.composerupdate_menu_state(this.__wbg_ptr);
777
+ return MenuState.__wrap(ret);
778
+ }
779
+ /**
780
+ * @returns {MenuAction}
781
+ */
782
+ menu_action() {
783
+ const ret = wasm.composerupdate_menu_action(this.__wbg_ptr);
784
+ return MenuAction.__wrap(ret);
785
+ }
786
+ }
787
+ exports.ComposerUpdate = ComposerUpdate;
788
+ const CreateFinalization = typeof FinalizationRegistry === 'undefined' ? {
789
+ register: () => {},
790
+ unregister: () => {}
791
+ } : new FinalizationRegistry(ptr => wasm.__wbg_create_free(ptr >>> 0));
792
+ /**
793
+ */
794
+ class Create {
795
+ static __wrap(ptr) {
796
+ ptr = ptr >>> 0;
797
+ const obj = Object.create(Create.prototype);
798
+ obj.__wbg_ptr = ptr;
799
+ CreateFinalization.register(obj, obj.__wbg_ptr, obj);
800
+ return obj;
801
+ }
802
+ __destroy_into_raw() {
803
+ const ptr = this.__wbg_ptr;
804
+ this.__wbg_ptr = 0;
805
+ CreateFinalization.unregister(this);
806
+ return ptr;
807
+ }
808
+ free() {
809
+ const ptr = this.__destroy_into_raw();
810
+ wasm.__wbg_create_free(ptr);
811
+ }
812
+ }
813
+ exports.Create = Create;
814
+ const CreateWithTextFinalization = typeof FinalizationRegistry === 'undefined' ? {
815
+ register: () => {},
816
+ unregister: () => {}
817
+ } : new FinalizationRegistry(ptr => wasm.__wbg_createwithtext_free(ptr >>> 0));
818
+ /**
819
+ */
820
+ class CreateWithText {
821
+ static __wrap(ptr) {
822
+ ptr = ptr >>> 0;
823
+ const obj = Object.create(CreateWithText.prototype);
824
+ obj.__wbg_ptr = ptr;
825
+ CreateWithTextFinalization.register(obj, obj.__wbg_ptr, obj);
826
+ return obj;
827
+ }
828
+ __destroy_into_raw() {
829
+ const ptr = this.__wbg_ptr;
830
+ this.__wbg_ptr = 0;
831
+ CreateWithTextFinalization.unregister(this);
832
+ return ptr;
833
+ }
834
+ free() {
835
+ const ptr = this.__destroy_into_raw();
836
+ wasm.__wbg_createwithtext_free(ptr);
837
+ }
838
+ }
839
+ exports.CreateWithText = CreateWithText;
840
+ const DisabledFinalization = typeof FinalizationRegistry === 'undefined' ? {
841
+ register: () => {},
842
+ unregister: () => {}
843
+ } : new FinalizationRegistry(ptr => wasm.__wbg_disabled_free(ptr >>> 0));
844
+ /**
845
+ */
846
+ class Disabled {
847
+ static __wrap(ptr) {
848
+ ptr = ptr >>> 0;
849
+ const obj = Object.create(Disabled.prototype);
850
+ obj.__wbg_ptr = ptr;
851
+ DisabledFinalization.register(obj, obj.__wbg_ptr, obj);
852
+ return obj;
853
+ }
854
+ __destroy_into_raw() {
855
+ const ptr = this.__wbg_ptr;
856
+ this.__wbg_ptr = 0;
857
+ DisabledFinalization.unregister(this);
858
+ return ptr;
859
+ }
860
+ free() {
861
+ const ptr = this.__destroy_into_raw();
862
+ wasm.__wbg_disabled_free(ptr);
863
+ }
864
+ }
865
+ exports.Disabled = Disabled;
866
+ const DomChildrenFinalization = typeof FinalizationRegistry === 'undefined' ? {
867
+ register: () => {},
868
+ unregister: () => {}
869
+ } : new FinalizationRegistry(ptr => wasm.__wbg_domchildren_free(ptr >>> 0));
870
+ /**
871
+ * An iterator-like view of a DomHandle's children, written to work around
872
+ * the lack of support for returning Vec<T> in wasm_bindgen.
873
+ */
874
+ class DomChildren {
875
+ static __wrap(ptr) {
876
+ ptr = ptr >>> 0;
877
+ const obj = Object.create(DomChildren.prototype);
878
+ obj.__wbg_ptr = ptr;
879
+ DomChildrenFinalization.register(obj, obj.__wbg_ptr, obj);
880
+ return obj;
881
+ }
882
+ __destroy_into_raw() {
883
+ const ptr = this.__wbg_ptr;
884
+ this.__wbg_ptr = 0;
885
+ DomChildrenFinalization.unregister(this);
886
+ return ptr;
887
+ }
888
+ free() {
889
+ const ptr = this.__destroy_into_raw();
890
+ wasm.__wbg_domchildren_free(ptr);
891
+ }
892
+ /**
893
+ * @returns {DomHandle | undefined}
894
+ */
895
+ next_child() {
896
+ const ret = wasm.domchildren_next_child(this.__wbg_ptr);
897
+ return ret === 0 ? undefined : DomHandle.__wrap(ret);
898
+ }
899
+ }
900
+ exports.DomChildren = DomChildren;
901
+ const DomHandleFinalization = typeof FinalizationRegistry === 'undefined' ? {
902
+ register: () => {},
903
+ unregister: () => {}
904
+ } : new FinalizationRegistry(ptr => wasm.__wbg_domhandle_free(ptr >>> 0));
905
+ /**
906
+ * Refers to a node in the composer model.
907
+ */
908
+ class DomHandle {
909
+ static __wrap(ptr) {
910
+ ptr = ptr >>> 0;
911
+ const obj = Object.create(DomHandle.prototype);
912
+ obj.__wbg_ptr = ptr;
913
+ DomHandleFinalization.register(obj, obj.__wbg_ptr, obj);
914
+ return obj;
915
+ }
916
+ __destroy_into_raw() {
917
+ const ptr = this.__wbg_ptr;
918
+ this.__wbg_ptr = 0;
919
+ DomHandleFinalization.unregister(this);
920
+ return ptr;
921
+ }
922
+ free() {
923
+ const ptr = this.__destroy_into_raw();
924
+ wasm.__wbg_domhandle_free(ptr);
925
+ }
926
+ /**
927
+ * Returns "container", "line_break", "text" or "zwsp" depending on the type of
928
+ * node we refer to.
929
+ * Panics if we are not a valid reference (because the model has changed
930
+ * since we were created, or because you passed in a different model
931
+ * from the one that created us.)
932
+ * @param {ComposerModel} model
933
+ * @returns {string}
934
+ */
935
+ node_type(model) {
936
+ let deferred1_0;
937
+ let deferred1_1;
938
+ try {
939
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
940
+ _assertClass(model, ComposerModel);
941
+ wasm.domhandle_node_type(retptr, this.__wbg_ptr, model.__wbg_ptr);
942
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
943
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
944
+ deferred1_0 = r0;
945
+ deferred1_1 = r1;
946
+ return getStringFromWasm0(r0, r1);
947
+ } finally {
948
+ wasm.__wbindgen_add_to_stack_pointer(16);
949
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
950
+ }
951
+ }
952
+ /**
953
+ * Returns a list of our children nodes, or an empty list if we refer
954
+ * to a text or line break node.
955
+ * Panics if we are not a valid reference (because the model has changed
956
+ * since we were created, or because you passed in a different model
957
+ * from the one that created us.)
958
+ * @param {ComposerModel} model
959
+ * @returns {DomChildren}
960
+ */
961
+ children(model) {
962
+ _assertClass(model, ComposerModel);
963
+ const ret = wasm.domhandle_children(this.__wbg_ptr, model.__wbg_ptr);
964
+ return DomChildren.__wrap(ret);
965
+ }
966
+ /**
967
+ * Returns the text of this node, or an empty string if this is a
968
+ * container or line break.
969
+ * Panics if we are not a valid reference (because the model has changed
970
+ * since we were created, or because you passed in a different model
971
+ * from the one that created us.)
972
+ * @param {ComposerModel} model
973
+ * @returns {string}
974
+ */
975
+ text(model) {
976
+ let deferred1_0;
977
+ let deferred1_1;
978
+ try {
979
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
980
+ _assertClass(model, ComposerModel);
981
+ wasm.domhandle_text(retptr, this.__wbg_ptr, model.__wbg_ptr);
982
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
983
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
984
+ deferred1_0 = r0;
985
+ deferred1_1 = r1;
986
+ return getStringFromWasm0(r0, r1);
987
+ } finally {
988
+ wasm.__wbindgen_add_to_stack_pointer(16);
989
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
990
+ }
991
+ }
992
+ /**
993
+ * Returns our tagname, or "-text-"/"-zwsp-" if we are a text/zwsp node.
994
+ * Panics if we are not a valid reference (because the model has changed
995
+ * since we were created, or because you passed in a different model
996
+ * from the one that created us.)
997
+ * @param {ComposerModel} model
998
+ * @returns {string}
999
+ */
1000
+ tag(model) {
1001
+ let deferred1_0;
1002
+ let deferred1_1;
1003
+ try {
1004
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1005
+ _assertClass(model, ComposerModel);
1006
+ wasm.domhandle_tag(retptr, this.__wbg_ptr, model.__wbg_ptr);
1007
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1008
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1009
+ deferred1_0 = r0;
1010
+ deferred1_1 = r1;
1011
+ return getStringFromWasm0(r0, r1);
1012
+ } finally {
1013
+ wasm.__wbindgen_add_to_stack_pointer(16);
1014
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1015
+ }
1016
+ }
1017
+ }
1018
+ exports.DomHandle = DomHandle;
1019
+ const EditFinalization = typeof FinalizationRegistry === 'undefined' ? {
1020
+ register: () => {},
1021
+ unregister: () => {}
1022
+ } : new FinalizationRegistry(ptr => wasm.__wbg_edit_free(ptr >>> 0));
1023
+ /**
1024
+ */
1025
+ class Edit {
1026
+ static __wrap(ptr) {
1027
+ ptr = ptr >>> 0;
1028
+ const obj = Object.create(Edit.prototype);
1029
+ obj.__wbg_ptr = ptr;
1030
+ EditFinalization.register(obj, obj.__wbg_ptr, obj);
1031
+ return obj;
1032
+ }
1033
+ __destroy_into_raw() {
1034
+ const ptr = this.__wbg_ptr;
1035
+ this.__wbg_ptr = 0;
1036
+ EditFinalization.unregister(this);
1037
+ return ptr;
1038
+ }
1039
+ free() {
1040
+ const ptr = this.__destroy_into_raw();
1041
+ wasm.__wbg_edit_free(ptr);
1042
+ }
1043
+ /**
1044
+ * @returns {string}
1045
+ */
1046
+ get url() {
1047
+ let deferred1_0;
1048
+ let deferred1_1;
1049
+ try {
1050
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1051
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1052
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1053
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1054
+ deferred1_0 = r0;
1055
+ deferred1_1 = r1;
1056
+ return getStringFromWasm0(r0, r1);
1057
+ } finally {
1058
+ wasm.__wbindgen_add_to_stack_pointer(16);
1059
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1060
+ }
1061
+ }
1062
+ /**
1063
+ * @param {string} arg0
1064
+ */
1065
+ set url(arg0) {
1066
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1067
+ const len0 = WASM_VECTOR_LEN;
1068
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1069
+ }
1070
+ }
1071
+ exports.Edit = Edit;
1072
+ const KeepFinalization = typeof FinalizationRegistry === 'undefined' ? {
1073
+ register: () => {},
1074
+ unregister: () => {}
1075
+ } : new FinalizationRegistry(ptr => wasm.__wbg_keep_free(ptr >>> 0));
1076
+ /**
1077
+ */
1078
+ class Keep {
1079
+ static __wrap(ptr) {
1080
+ ptr = ptr >>> 0;
1081
+ const obj = Object.create(Keep.prototype);
1082
+ obj.__wbg_ptr = ptr;
1083
+ KeepFinalization.register(obj, obj.__wbg_ptr, obj);
1084
+ return obj;
1085
+ }
1086
+ __destroy_into_raw() {
1087
+ const ptr = this.__wbg_ptr;
1088
+ this.__wbg_ptr = 0;
1089
+ KeepFinalization.unregister(this);
1090
+ return ptr;
1091
+ }
1092
+ free() {
1093
+ const ptr = this.__destroy_into_raw();
1094
+ wasm.__wbg_keep_free(ptr);
1095
+ }
1096
+ }
1097
+ exports.Keep = Keep;
1098
+ const LinkActionFinalization = typeof FinalizationRegistry === 'undefined' ? {
1099
+ register: () => {},
1100
+ unregister: () => {}
1101
+ } : new FinalizationRegistry(ptr => wasm.__wbg_linkaction_free(ptr >>> 0));
1102
+ /**
1103
+ */
1104
+ class LinkAction {
1105
+ static __wrap(ptr) {
1106
+ ptr = ptr >>> 0;
1107
+ const obj = Object.create(LinkAction.prototype);
1108
+ obj.__wbg_ptr = ptr;
1109
+ LinkActionFinalization.register(obj, obj.__wbg_ptr, obj);
1110
+ return obj;
1111
+ }
1112
+ __destroy_into_raw() {
1113
+ const ptr = this.__wbg_ptr;
1114
+ this.__wbg_ptr = 0;
1115
+ LinkActionFinalization.unregister(this);
1116
+ return ptr;
1117
+ }
1118
+ free() {
1119
+ const ptr = this.__destroy_into_raw();
1120
+ wasm.__wbg_linkaction_free(ptr);
1121
+ }
1122
+ /**
1123
+ * @returns {CreateWithText | undefined}
1124
+ */
1125
+ get create_with_text() {
1126
+ const ret = wasm.__wbg_get_linkaction_create_with_text(this.__wbg_ptr);
1127
+ return ret === 0 ? undefined : CreateWithText.__wrap(ret);
1128
+ }
1129
+ /**
1130
+ * @param {CreateWithText | undefined} [arg0]
1131
+ */
1132
+ set create_with_text(arg0) {
1133
+ let ptr0 = 0;
1134
+ if (!isLikeNone(arg0)) {
1135
+ _assertClass(arg0, CreateWithText);
1136
+ ptr0 = arg0.__destroy_into_raw();
1137
+ }
1138
+ wasm.__wbg_set_linkaction_create_with_text(this.__wbg_ptr, ptr0);
1139
+ }
1140
+ /**
1141
+ * @returns {Create | undefined}
1142
+ */
1143
+ get create() {
1144
+ const ret = wasm.__wbg_get_linkaction_create(this.__wbg_ptr);
1145
+ return ret === 0 ? undefined : Create.__wrap(ret);
1146
+ }
1147
+ /**
1148
+ * @param {Create | undefined} [arg0]
1149
+ */
1150
+ set create(arg0) {
1151
+ let ptr0 = 0;
1152
+ if (!isLikeNone(arg0)) {
1153
+ _assertClass(arg0, Create);
1154
+ ptr0 = arg0.__destroy_into_raw();
1155
+ }
1156
+ wasm.__wbg_set_linkaction_create(this.__wbg_ptr, ptr0);
1157
+ }
1158
+ /**
1159
+ * @returns {Edit | undefined}
1160
+ */
1161
+ get edit_link() {
1162
+ const ret = wasm.__wbg_get_linkaction_edit_link(this.__wbg_ptr);
1163
+ return ret === 0 ? undefined : Edit.__wrap(ret);
1164
+ }
1165
+ /**
1166
+ * @param {Edit | undefined} [arg0]
1167
+ */
1168
+ set edit_link(arg0) {
1169
+ let ptr0 = 0;
1170
+ if (!isLikeNone(arg0)) {
1171
+ _assertClass(arg0, Edit);
1172
+ ptr0 = arg0.__destroy_into_raw();
1173
+ }
1174
+ wasm.__wbg_set_linkaction_edit_link(this.__wbg_ptr, ptr0);
1175
+ }
1176
+ /**
1177
+ * @returns {Disabled | undefined}
1178
+ */
1179
+ get disabled() {
1180
+ const ret = wasm.__wbg_get_linkaction_disabled(this.__wbg_ptr);
1181
+ return ret === 0 ? undefined : Disabled.__wrap(ret);
1182
+ }
1183
+ /**
1184
+ * @param {Disabled | undefined} [arg0]
1185
+ */
1186
+ set disabled(arg0) {
1187
+ let ptr0 = 0;
1188
+ if (!isLikeNone(arg0)) {
1189
+ _assertClass(arg0, Disabled);
1190
+ ptr0 = arg0.__destroy_into_raw();
1191
+ }
1192
+ wasm.__wbg_set_linkaction_disabled(this.__wbg_ptr, ptr0);
1193
+ }
1194
+ }
1195
+ exports.LinkAction = LinkAction;
1196
+ const MenuActionFinalization = typeof FinalizationRegistry === 'undefined' ? {
1197
+ register: () => {},
1198
+ unregister: () => {}
1199
+ } : new FinalizationRegistry(ptr => wasm.__wbg_menuaction_free(ptr >>> 0));
1200
+ /**
1201
+ */
1202
+ class MenuAction {
1203
+ static __wrap(ptr) {
1204
+ ptr = ptr >>> 0;
1205
+ const obj = Object.create(MenuAction.prototype);
1206
+ obj.__wbg_ptr = ptr;
1207
+ MenuActionFinalization.register(obj, obj.__wbg_ptr, obj);
1208
+ return obj;
1209
+ }
1210
+ __destroy_into_raw() {
1211
+ const ptr = this.__wbg_ptr;
1212
+ this.__wbg_ptr = 0;
1213
+ MenuActionFinalization.unregister(this);
1214
+ return ptr;
1215
+ }
1216
+ free() {
1217
+ const ptr = this.__destroy_into_raw();
1218
+ wasm.__wbg_menuaction_free(ptr);
1219
+ }
1220
+ /**
1221
+ * @returns {boolean}
1222
+ */
1223
+ keep() {
1224
+ const ret = wasm.menuaction_keep(this.__wbg_ptr);
1225
+ return ret !== 0;
1226
+ }
1227
+ /**
1228
+ * @returns {boolean}
1229
+ */
1230
+ none() {
1231
+ const ret = wasm.menuaction_none(this.__wbg_ptr);
1232
+ return ret !== 0;
1233
+ }
1234
+ /**
1235
+ * @returns {MenuActionSuggestion | undefined}
1236
+ */
1237
+ suggestion() {
1238
+ const ret = wasm.menuaction_suggestion(this.__wbg_ptr);
1239
+ return ret === 0 ? undefined : MenuActionSuggestion.__wrap(ret);
1240
+ }
1241
+ }
1242
+ exports.MenuAction = MenuAction;
1243
+ const MenuActionSuggestionFinalization = typeof FinalizationRegistry === 'undefined' ? {
1244
+ register: () => {},
1245
+ unregister: () => {}
1246
+ } : new FinalizationRegistry(ptr => wasm.__wbg_menuactionsuggestion_free(ptr >>> 0));
1247
+ /**
1248
+ */
1249
+ class MenuActionSuggestion {
1250
+ static __wrap(ptr) {
1251
+ ptr = ptr >>> 0;
1252
+ const obj = Object.create(MenuActionSuggestion.prototype);
1253
+ obj.__wbg_ptr = ptr;
1254
+ MenuActionSuggestionFinalization.register(obj, obj.__wbg_ptr, obj);
1255
+ return obj;
1256
+ }
1257
+ __destroy_into_raw() {
1258
+ const ptr = this.__wbg_ptr;
1259
+ this.__wbg_ptr = 0;
1260
+ MenuActionSuggestionFinalization.unregister(this);
1261
+ return ptr;
1262
+ }
1263
+ free() {
1264
+ const ptr = this.__destroy_into_raw();
1265
+ wasm.__wbg_menuactionsuggestion_free(ptr);
1266
+ }
1267
+ /**
1268
+ * @returns {SuggestionPattern}
1269
+ */
1270
+ get suggestion_pattern() {
1271
+ const ret = wasm.__wbg_get_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr);
1272
+ return SuggestionPattern.__wrap(ret);
1273
+ }
1274
+ /**
1275
+ * @param {SuggestionPattern} arg0
1276
+ */
1277
+ set suggestion_pattern(arg0) {
1278
+ _assertClass(arg0, SuggestionPattern);
1279
+ var ptr0 = arg0.__destroy_into_raw();
1280
+ wasm.__wbg_set_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr, ptr0);
1281
+ }
1282
+ }
1283
+ exports.MenuActionSuggestion = MenuActionSuggestion;
1284
+ const MenuStateFinalization = typeof FinalizationRegistry === 'undefined' ? {
1285
+ register: () => {},
1286
+ unregister: () => {}
1287
+ } : new FinalizationRegistry(ptr => wasm.__wbg_menustate_free(ptr >>> 0));
1288
+ /**
1289
+ */
1290
+ class MenuState {
1291
+ static __wrap(ptr) {
1292
+ ptr = ptr >>> 0;
1293
+ const obj = Object.create(MenuState.prototype);
1294
+ obj.__wbg_ptr = ptr;
1295
+ MenuStateFinalization.register(obj, obj.__wbg_ptr, obj);
1296
+ return obj;
1297
+ }
1298
+ __destroy_into_raw() {
1299
+ const ptr = this.__wbg_ptr;
1300
+ this.__wbg_ptr = 0;
1301
+ MenuStateFinalization.unregister(this);
1302
+ return ptr;
1303
+ }
1304
+ free() {
1305
+ const ptr = this.__destroy_into_raw();
1306
+ wasm.__wbg_menustate_free(ptr);
1307
+ }
1308
+ /**
1309
+ * @returns {boolean}
1310
+ */
1311
+ keep() {
1312
+ const ret = wasm.menustate_keep(this.__wbg_ptr);
1313
+ return ret !== 0;
1314
+ }
1315
+ /**
1316
+ * @returns {MenuStateUpdate | undefined}
1317
+ */
1318
+ update() {
1319
+ const ret = wasm.menustate_update(this.__wbg_ptr);
1320
+ return ret === 0 ? undefined : MenuStateUpdate.__wrap(ret);
1321
+ }
1322
+ }
1323
+ exports.MenuState = MenuState;
1324
+ const MenuStateUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
1325
+ register: () => {},
1326
+ unregister: () => {}
1327
+ } : new FinalizationRegistry(ptr => wasm.__wbg_menustateupdate_free(ptr >>> 0));
1328
+ /**
1329
+ */
1330
+ class MenuStateUpdate {
1331
+ static __wrap(ptr) {
1332
+ ptr = ptr >>> 0;
1333
+ const obj = Object.create(MenuStateUpdate.prototype);
1334
+ obj.__wbg_ptr = ptr;
1335
+ MenuStateUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
1336
+ return obj;
1337
+ }
1338
+ __destroy_into_raw() {
1339
+ const ptr = this.__wbg_ptr;
1340
+ this.__wbg_ptr = 0;
1341
+ MenuStateUpdateFinalization.unregister(this);
1342
+ return ptr;
1343
+ }
1344
+ free() {
1345
+ const ptr = this.__destroy_into_raw();
1346
+ wasm.__wbg_menustateupdate_free(ptr);
1347
+ }
1348
+ /**
1349
+ * @returns {Map<any, any>}
1350
+ */
1351
+ get action_states() {
1352
+ const ret = wasm.__wbg_get_menustateupdate_action_states(this.__wbg_ptr);
1353
+ return takeObject(ret);
1354
+ }
1355
+ /**
1356
+ * @param {Map<any, any>} arg0
1357
+ */
1358
+ set action_states(arg0) {
1359
+ wasm.__wbg_set_menustateupdate_action_states(this.__wbg_ptr, addHeapObject(arg0));
1360
+ }
1361
+ }
1362
+ exports.MenuStateUpdate = MenuStateUpdate;
1363
+ const PatternKeyFinalization = typeof FinalizationRegistry === 'undefined' ? {
1364
+ register: () => {},
1365
+ unregister: () => {}
1366
+ } : new FinalizationRegistry(ptr => wasm.__wbg_patternkey_free(ptr >>> 0));
1367
+ /**
1368
+ */
1369
+ class PatternKey {
1370
+ static __wrap(ptr) {
1371
+ ptr = ptr >>> 0;
1372
+ const obj = Object.create(PatternKey.prototype);
1373
+ obj.__wbg_ptr = ptr;
1374
+ PatternKeyFinalization.register(obj, obj.__wbg_ptr, obj);
1375
+ return obj;
1376
+ }
1377
+ __destroy_into_raw() {
1378
+ const ptr = this.__wbg_ptr;
1379
+ this.__wbg_ptr = 0;
1380
+ PatternKeyFinalization.unregister(this);
1381
+ return ptr;
1382
+ }
1383
+ free() {
1384
+ const ptr = this.__destroy_into_raw();
1385
+ wasm.__wbg_patternkey_free(ptr);
1386
+ }
1387
+ /**
1388
+ * @returns {PatternKeyType}
1389
+ */
1390
+ get key_type() {
1391
+ const ret = wasm.__wbg_get_patternkey_key_type(this.__wbg_ptr);
1392
+ return ret;
1393
+ }
1394
+ /**
1395
+ * @param {PatternKeyType} arg0
1396
+ */
1397
+ set key_type(arg0) {
1398
+ wasm.__wbg_set_patternkey_key_type(this.__wbg_ptr, arg0);
1399
+ }
1400
+ /**
1401
+ * @returns {string | undefined}
1402
+ */
1403
+ get custom_key_value() {
1404
+ try {
1405
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1406
+ wasm.__wbg_get_patternkey_custom_key_value(retptr, this.__wbg_ptr);
1407
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1408
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1409
+ let v1;
1410
+ if (r0 !== 0) {
1411
+ v1 = getStringFromWasm0(r0, r1).slice();
1412
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1413
+ }
1414
+ return v1;
1415
+ } finally {
1416
+ wasm.__wbindgen_add_to_stack_pointer(16);
1417
+ }
1418
+ }
1419
+ /**
1420
+ * @param {string | undefined} [arg0]
1421
+ */
1422
+ set custom_key_value(arg0) {
1423
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1424
+ var len0 = WASM_VECTOR_LEN;
1425
+ wasm.__wbg_set_patternkey_custom_key_value(this.__wbg_ptr, ptr0, len0);
1426
+ }
1427
+ }
1428
+ exports.PatternKey = PatternKey;
1429
+ const ReplaceAllFinalization = typeof FinalizationRegistry === 'undefined' ? {
1430
+ register: () => {},
1431
+ unregister: () => {}
1432
+ } : new FinalizationRegistry(ptr => wasm.__wbg_replaceall_free(ptr >>> 0));
1433
+ /**
1434
+ */
1435
+ class ReplaceAll {
1436
+ static __wrap(ptr) {
1437
+ ptr = ptr >>> 0;
1438
+ const obj = Object.create(ReplaceAll.prototype);
1439
+ obj.__wbg_ptr = ptr;
1440
+ ReplaceAllFinalization.register(obj, obj.__wbg_ptr, obj);
1441
+ return obj;
1442
+ }
1443
+ __destroy_into_raw() {
1444
+ const ptr = this.__wbg_ptr;
1445
+ this.__wbg_ptr = 0;
1446
+ ReplaceAllFinalization.unregister(this);
1447
+ return ptr;
1448
+ }
1449
+ free() {
1450
+ const ptr = this.__destroy_into_raw();
1451
+ wasm.__wbg_replaceall_free(ptr);
1452
+ }
1453
+ /**
1454
+ * @returns {string}
1455
+ */
1456
+ get replacement_html() {
1457
+ let deferred1_0;
1458
+ let deferred1_1;
1459
+ try {
1460
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1461
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1462
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1463
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1464
+ deferred1_0 = r0;
1465
+ deferred1_1 = r1;
1466
+ return getStringFromWasm0(r0, r1);
1467
+ } finally {
1468
+ wasm.__wbindgen_add_to_stack_pointer(16);
1469
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1470
+ }
1471
+ }
1472
+ /**
1473
+ * @param {string} arg0
1474
+ */
1475
+ set replacement_html(arg0) {
1476
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1477
+ const len0 = WASM_VECTOR_LEN;
1478
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1479
+ }
1480
+ /**
1481
+ * @returns {number}
1482
+ */
1483
+ get start_utf16_codeunit() {
1484
+ const ret = wasm.__wbg_get_replaceall_start_utf16_codeunit(this.__wbg_ptr);
1485
+ return ret >>> 0;
1486
+ }
1487
+ /**
1488
+ * @param {number} arg0
1489
+ */
1490
+ set start_utf16_codeunit(arg0) {
1491
+ wasm.__wbg_set_replaceall_start_utf16_codeunit(this.__wbg_ptr, arg0);
1492
+ }
1493
+ /**
1494
+ * @returns {number}
1495
+ */
1496
+ get end_utf16_codeunit() {
1497
+ const ret = wasm.__wbg_get_replaceall_end_utf16_codeunit(this.__wbg_ptr);
1498
+ return ret >>> 0;
1499
+ }
1500
+ /**
1501
+ * @param {number} arg0
1502
+ */
1503
+ set end_utf16_codeunit(arg0) {
1504
+ wasm.__wbg_set_replaceall_end_utf16_codeunit(this.__wbg_ptr, arg0);
1505
+ }
1506
+ }
1507
+ exports.ReplaceAll = ReplaceAll;
1508
+ const SelectionFinalization = typeof FinalizationRegistry === 'undefined' ? {
1509
+ register: () => {},
1510
+ unregister: () => {}
1511
+ } : new FinalizationRegistry(ptr => wasm.__wbg_selection_free(ptr >>> 0));
1512
+ /**
1513
+ */
1514
+ class Selection {
1515
+ static __wrap(ptr) {
1516
+ ptr = ptr >>> 0;
1517
+ const obj = Object.create(Selection.prototype);
1518
+ obj.__wbg_ptr = ptr;
1519
+ SelectionFinalization.register(obj, obj.__wbg_ptr, obj);
1520
+ return obj;
1521
+ }
1522
+ __destroy_into_raw() {
1523
+ const ptr = this.__wbg_ptr;
1524
+ this.__wbg_ptr = 0;
1525
+ SelectionFinalization.unregister(this);
1526
+ return ptr;
1527
+ }
1528
+ free() {
1529
+ const ptr = this.__destroy_into_raw();
1530
+ wasm.__wbg_selection_free(ptr);
1531
+ }
1532
+ /**
1533
+ * @returns {number}
1534
+ */
1535
+ get start_utf16_codeunit() {
1536
+ const ret = wasm.__wbg_get_selection_start_utf16_codeunit(this.__wbg_ptr);
1537
+ return ret >>> 0;
1538
+ }
1539
+ /**
1540
+ * @param {number} arg0
1541
+ */
1542
+ set start_utf16_codeunit(arg0) {
1543
+ wasm.__wbg_set_selection_start_utf16_codeunit(this.__wbg_ptr, arg0);
1544
+ }
1545
+ /**
1546
+ * @returns {number}
1547
+ */
1548
+ get end_utf16_codeunit() {
1549
+ const ret = wasm.__wbg_get_selection_end_utf16_codeunit(this.__wbg_ptr);
1550
+ return ret >>> 0;
1551
+ }
1552
+ /**
1553
+ * @param {number} arg0
1554
+ */
1555
+ set end_utf16_codeunit(arg0) {
1556
+ wasm.__wbg_set_selection_end_utf16_codeunit(this.__wbg_ptr, arg0);
1557
+ }
1558
+ }
1559
+ exports.Selection = Selection;
1560
+ const SuggestionPatternFinalization = typeof FinalizationRegistry === 'undefined' ? {
1561
+ register: () => {},
1562
+ unregister: () => {}
1563
+ } : new FinalizationRegistry(ptr => wasm.__wbg_suggestionpattern_free(ptr >>> 0));
1564
+ /**
1565
+ */
1566
+ class SuggestionPattern {
1567
+ static __wrap(ptr) {
1568
+ ptr = ptr >>> 0;
1569
+ const obj = Object.create(SuggestionPattern.prototype);
1570
+ obj.__wbg_ptr = ptr;
1571
+ SuggestionPatternFinalization.register(obj, obj.__wbg_ptr, obj);
1572
+ return obj;
1573
+ }
1574
+ __destroy_into_raw() {
1575
+ const ptr = this.__wbg_ptr;
1576
+ this.__wbg_ptr = 0;
1577
+ SuggestionPatternFinalization.unregister(this);
1578
+ return ptr;
1579
+ }
1580
+ free() {
1581
+ const ptr = this.__destroy_into_raw();
1582
+ wasm.__wbg_suggestionpattern_free(ptr);
1583
+ }
1584
+ /**
1585
+ * @returns {PatternKey}
1586
+ */
1587
+ get key() {
1588
+ const ret = wasm.__wbg_get_suggestionpattern_key(this.__wbg_ptr);
1589
+ return PatternKey.__wrap(ret);
1590
+ }
1591
+ /**
1592
+ * @param {PatternKey} arg0
1593
+ */
1594
+ set key(arg0) {
1595
+ _assertClass(arg0, PatternKey);
1596
+ var ptr0 = arg0.__destroy_into_raw();
1597
+ wasm.__wbg_set_suggestionpattern_key(this.__wbg_ptr, ptr0);
1598
+ }
1599
+ /**
1600
+ * @returns {string}
1601
+ */
1602
+ get text() {
1603
+ let deferred1_0;
1604
+ let deferred1_1;
1605
+ try {
1606
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1607
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1608
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1609
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1610
+ deferred1_0 = r0;
1611
+ deferred1_1 = r1;
1612
+ return getStringFromWasm0(r0, r1);
1613
+ } finally {
1614
+ wasm.__wbindgen_add_to_stack_pointer(16);
1615
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1616
+ }
1617
+ }
1618
+ /**
1619
+ * @param {string} arg0
1620
+ */
1621
+ set text(arg0) {
1622
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1623
+ const len0 = WASM_VECTOR_LEN;
1624
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1625
+ }
1626
+ /**
1627
+ * @returns {number}
1628
+ */
1629
+ get start() {
1630
+ const ret = wasm.__wbg_get_suggestionpattern_start(this.__wbg_ptr);
1631
+ return ret >>> 0;
1632
+ }
1633
+ /**
1634
+ * @param {number} arg0
1635
+ */
1636
+ set start(arg0) {
1637
+ wasm.__wbg_set_suggestionpattern_start(this.__wbg_ptr, arg0);
1638
+ }
1639
+ /**
1640
+ * @returns {number}
1641
+ */
1642
+ get end() {
1643
+ const ret = wasm.__wbg_get_suggestionpattern_end(this.__wbg_ptr);
1644
+ return ret >>> 0;
1645
+ }
1646
+ /**
1647
+ * @param {number} arg0
1648
+ */
1649
+ set end(arg0) {
1650
+ wasm.__wbg_set_suggestionpattern_end(this.__wbg_ptr, arg0);
1651
+ }
1652
+ }
1653
+ exports.SuggestionPattern = SuggestionPattern;
1654
+ const TextUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
1655
+ register: () => {},
1656
+ unregister: () => {}
1657
+ } : new FinalizationRegistry(ptr => wasm.__wbg_textupdate_free(ptr >>> 0));
1658
+ /**
1659
+ */
1660
+ class TextUpdate {
1661
+ static __wrap(ptr) {
1662
+ ptr = ptr >>> 0;
1663
+ const obj = Object.create(TextUpdate.prototype);
1664
+ obj.__wbg_ptr = ptr;
1665
+ TextUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
1666
+ return obj;
1667
+ }
1668
+ __destroy_into_raw() {
1669
+ const ptr = this.__wbg_ptr;
1670
+ this.__wbg_ptr = 0;
1671
+ TextUpdateFinalization.unregister(this);
1672
+ return ptr;
1673
+ }
1674
+ free() {
1675
+ const ptr = this.__destroy_into_raw();
1676
+ wasm.__wbg_textupdate_free(ptr);
1677
+ }
1678
+ /**
1679
+ * @returns {Keep | undefined}
1680
+ */
1681
+ get keep() {
1682
+ const ret = wasm.__wbg_get_textupdate_keep(this.__wbg_ptr);
1683
+ return ret === 0 ? undefined : Keep.__wrap(ret);
1684
+ }
1685
+ /**
1686
+ * @param {Keep | undefined} [arg0]
1687
+ */
1688
+ set keep(arg0) {
1689
+ let ptr0 = 0;
1690
+ if (!isLikeNone(arg0)) {
1691
+ _assertClass(arg0, Keep);
1692
+ ptr0 = arg0.__destroy_into_raw();
1693
+ }
1694
+ wasm.__wbg_set_textupdate_keep(this.__wbg_ptr, ptr0);
1695
+ }
1696
+ /**
1697
+ * @returns {ReplaceAll | undefined}
1698
+ */
1699
+ get replace_all() {
1700
+ const ret = wasm.__wbg_get_textupdate_replace_all(this.__wbg_ptr);
1701
+ return ret === 0 ? undefined : ReplaceAll.__wrap(ret);
1702
+ }
1703
+ /**
1704
+ * @param {ReplaceAll | undefined} [arg0]
1705
+ */
1706
+ set replace_all(arg0) {
1707
+ let ptr0 = 0;
1708
+ if (!isLikeNone(arg0)) {
1709
+ _assertClass(arg0, ReplaceAll);
1710
+ ptr0 = arg0.__destroy_into_raw();
1711
+ }
1712
+ wasm.__wbg_set_textupdate_replace_all(this.__wbg_ptr, ptr0);
1713
+ }
1714
+ /**
1715
+ * @returns {Selection | undefined}
1716
+ */
1717
+ get select() {
1718
+ const ret = wasm.__wbg_get_textupdate_select(this.__wbg_ptr);
1719
+ return ret === 0 ? undefined : Selection.__wrap(ret);
1720
+ }
1721
+ /**
1722
+ * @param {Selection | undefined} [arg0]
1723
+ */
1724
+ set select(arg0) {
1725
+ let ptr0 = 0;
1726
+ if (!isLikeNone(arg0)) {
1727
+ _assertClass(arg0, Selection);
1728
+ ptr0 = arg0.__destroy_into_raw();
1729
+ }
1730
+ wasm.__wbg_set_textupdate_select(this.__wbg_ptr, ptr0);
1731
+ }
1732
+ }
1733
+ exports.TextUpdate = TextUpdate;
1734
+ function __wbindgen_string_get(arg0, arg1) {
1735
+ const obj = getObject(arg1);
1736
+ const ret = typeof obj === 'string' ? obj : undefined;
1737
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1738
+ var len1 = WASM_VECTOR_LEN;
1739
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1740
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1741
+ }
1742
+ ;
1743
+ function __wbindgen_object_drop_ref(arg0) {
1744
+ takeObject(arg0);
1745
+ }
1746
+ ;
1747
+ function __wbg_new_d9bc3a0147634640() {
1748
+ const ret = new Map();
1749
+ return addHeapObject(ret);
1750
+ }
1751
+ ;
1752
+ function __wbindgen_string_new(arg0, arg1) {
1753
+ const ret = getStringFromWasm0(arg0, arg1);
1754
+ return addHeapObject(ret);
1755
+ }
1756
+ ;
1757
+ function __wbg_set_8417257aaedc936b(arg0, arg1, arg2) {
1758
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1759
+ return addHeapObject(ret);
1760
+ }
1761
+ ;
1762
+ function __wbg_forEach_4cee849ec749be17(arg0, arg1, arg2) {
1763
+ try {
1764
+ var state0 = {
1765
+ a: arg1,
1766
+ b: arg2
1767
+ };
1768
+ var cb0 = (arg0, arg1) => {
1769
+ const a = state0.a;
1770
+ state0.a = 0;
1771
+ try {
1772
+ return __wbg_adapter_124(a, state0.b, arg0, arg1);
1773
+ } finally {
1774
+ state0.a = a;
1775
+ }
1776
+ };
1777
+ getObject(arg0).forEach(cb0);
1778
+ } finally {
1779
+ state0.a = state0.b = 0;
1780
+ }
1781
+ }
1782
+ ;
1783
+ function __wbindgen_number_new(arg0) {
1784
+ const ret = arg0;
1785
+ return addHeapObject(ret);
1786
+ }
1787
+ ;
1788
+ function __wbg_forEach_2be8de7347d63332(arg0, arg1, arg2) {
1789
+ try {
1790
+ var state0 = {
1791
+ a: arg1,
1792
+ b: arg2
1793
+ };
1794
+ var cb0 = (arg0, arg1, arg2) => {
1795
+ const a = state0.a;
1796
+ state0.a = 0;
1797
+ try {
1798
+ return __wbg_adapter_121(a, state0.b, arg0, arg1, arg2);
1799
+ } finally {
1800
+ state0.a = a;
1801
+ }
1802
+ };
1803
+ getObject(arg0).forEach(cb0);
1804
+ } finally {
1805
+ state0.a = state0.b = 0;
1806
+ }
1807
+ }
1808
+ ;
1809
+ function __wbindgen_object_clone_ref(arg0) {
1810
+ const ret = getObject(arg0);
1811
+ return addHeapObject(ret);
1812
+ }
1813
+ ;
1814
+ function __wbg_new_abda76e883ba8a5f() {
1815
+ const ret = new Error();
1816
+ return addHeapObject(ret);
1817
+ }
1818
+ ;
1819
+ function __wbg_stack_658279fe44541cf6(arg0, arg1) {
1820
+ const ret = getObject(arg1).stack;
1821
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1822
+ const len1 = WASM_VECTOR_LEN;
1823
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1824
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1825
+ }
1826
+ ;
1827
+ function __wbg_error_f851667af71bcfc6(arg0, arg1) {
1828
+ let deferred0_0;
1829
+ let deferred0_1;
1830
+ try {
1831
+ deferred0_0 = arg0;
1832
+ deferred0_1 = arg1;
1833
+ console.error(getStringFromWasm0(arg0, arg1));
1834
+ } finally {
1835
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1836
+ }
1837
+ }
1838
+ ;
1839
+ function __wbindgen_throw(arg0, arg1) {
1840
+ throw new Error(getStringFromWasm0(arg0, arg1));
1841
+ }
1842
+ ;
1843
+ function __wbg_getAttribute_99bddb29274b29b9(arg0, arg1, arg2, arg3) {
1844
+ const ret = getObject(arg1).getAttribute(getStringFromWasm0(arg2, arg3));
1845
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1846
+ var len1 = WASM_VECTOR_LEN;
1847
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1848
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1849
+ }
1850
+ ;
1851
+ function __wbg_nodeValue_0b5f7b2274265747(arg0, arg1) {
1852
+ const ret = getObject(arg1).nodeValue;
1853
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1854
+ var len1 = WASM_VECTOR_LEN;
1855
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1856
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1857
+ }
1858
+ ;
1859
+ function __wbg_new_aec969a21ad2fc71() {
1860
+ return handleError(function () {
1861
+ const ret = new DOMParser();
1862
+ return addHeapObject(ret);
1863
+ }, arguments);
1864
+ }
1865
+ ;
1866
+ function __wbg_parseFromString_656e5773ad0b3845() {
1867
+ return handleError(function (arg0, arg1, arg2, arg3) {
1868
+ const ret = getObject(arg0).parseFromString(getStringFromWasm0(arg1, arg2), takeObject(arg3));
1869
+ return addHeapObject(ret);
1870
+ }, arguments);
1871
+ }
1872
+ ;
1873
+ function __wbg_body_edb1908d3ceff3a1(arg0) {
1874
+ const ret = getObject(arg0).body;
1875
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1876
+ }
1877
+ ;
1878
+ function __wbg_childNodes_118168e8b23bcb9b(arg0) {
1879
+ const ret = getObject(arg0).childNodes;
1880
+ return addHeapObject(ret);
1881
+ }
1882
+ ;
1883
+ function __wbg_length_d0a802565d17eec4(arg0) {
1884
+ const ret = getObject(arg0).length;
1885
+ return ret;
1886
+ }
1887
+ ;
1888
+ function __wbg_get_8cd5eba00ab6304f(arg0, arg1) {
1889
+ const ret = getObject(arg0)[arg1 >>> 0];
1890
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1891
+ }
1892
+ ;
1893
+ function __wbg_nodeName_149f7e29f80d1338(arg0, arg1) {
1894
+ const ret = getObject(arg1).nodeName;
1895
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1896
+ const len1 = WASM_VECTOR_LEN;
1897
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1898
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1899
+ }
1900
+ ;
1901
+ function __wbg_hasAttribute_8340e1a2a46f10f3(arg0, arg1, arg2) {
1902
+ const ret = getObject(arg0).hasAttribute(getStringFromWasm0(arg1, arg2));
1903
+ return ret;
1904
+ }
1905
+ ;
1906
+ function __wbg_nodeType_9dd609af1b555b54(arg0) {
1907
+ const ret = getObject(arg0).nodeType;
1908
+ return ret;
1909
+ }
1910
+ ;