@lix-js/sdk 0.16.1 → 0.17.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.
Files changed (71) hide show
  1. package/README.md +162 -44
  2. package/dist/binding-types.d.ts +15 -5
  3. package/dist/binding.browser.d.ts +2 -0
  4. package/dist/binding.browser.js +14 -4
  5. package/dist/binding.node-wasm.d.ts +1 -1
  6. package/dist/binding.node-wasm.js +5 -3
  7. package/dist/binding.node.d.ts +2 -0
  8. package/dist/binding.node.js +34 -8
  9. package/dist/bundled-plugins/plugin_csv.lixplugin +0 -0
  10. package/dist/bundled-plugins/plugin_markdown.lixplugin +0 -0
  11. package/dist/compatibility.d.ts +6 -0
  12. package/dist/compatibility.js +6 -0
  13. package/dist/component-host/dispatch.d.ts +12 -0
  14. package/dist/component-host/dispatch.js +364 -0
  15. package/dist/component-host/index.d.ts +15 -0
  16. package/dist/component-host/index.js +84 -0
  17. package/dist/component-host/instrument.d.ts +6 -0
  18. package/dist/component-host/instrument.js +260 -0
  19. package/dist/conversion-provider.d.ts +4 -0
  20. package/dist/conversion-provider.js +20 -0
  21. package/dist/hosted-lix.js +1 -1
  22. package/dist/http-transport.d.ts +25 -0
  23. package/dist/http-transport.js +162 -0
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.js +1 -0
  26. package/dist/lix.d.ts +14 -9
  27. package/dist/lix.js +44 -9
  28. package/dist/migration-binding.browser.d.ts +33 -0
  29. package/dist/migration-binding.browser.js +46 -0
  30. package/dist/migration-binding.node.d.ts +6 -0
  31. package/dist/migration-binding.node.js +5 -0
  32. package/dist/migration-wasm/lix_js_sdk.d.ts +271 -0
  33. package/dist/migration-wasm/lix_js_sdk.js +1852 -0
  34. package/dist/migration-wasm/lix_js_sdk_bg.wasm +4 -0
  35. package/dist/migration-wasm/lix_js_sdk_bg.wasm.d.ts +101 -0
  36. package/dist/migration.d.ts +23 -0
  37. package/dist/migration.js +55 -0
  38. package/dist/open-lix.js +29 -18
  39. package/dist/open-progress.d.ts +10 -0
  40. package/dist/open-progress.js +59 -0
  41. package/dist/remote/client.d.ts +2 -1
  42. package/dist/remote/client.js +11 -1
  43. package/dist/result.d.ts +4 -3
  44. package/dist/result.js +3 -4
  45. package/dist/storage-adapter.d.ts +7 -1
  46. package/dist/storage-ownership.d.ts +5 -0
  47. package/dist/storage-ownership.js +4 -0
  48. package/dist/types.d.ts +65 -31
  49. package/dist/wasm/lix_js_sdk.d.ts +45 -16
  50. package/dist/wasm/lix_js_sdk.js +214 -60
  51. package/dist/wasm/lix_js_sdk_bg.wasm +2 -2
  52. package/dist/wasm/lix_js_sdk_bg.wasm.d.ts +17 -9
  53. package/dist/worker/client.d.ts +12 -3
  54. package/dist/worker/client.js +95 -81
  55. package/dist/worker/durable-local-admission.d.ts +20 -0
  56. package/dist/worker/durable-local-admission.js +87 -0
  57. package/dist/worker/entry.shared.browser.d.ts +1 -0
  58. package/dist/worker/entry.shared.browser.js +211 -0
  59. package/dist/worker/factory.browser.d.ts +2 -0
  60. package/dist/worker/factory.browser.js +65 -1
  61. package/dist/worker/factory.node.d.ts +1 -0
  62. package/dist/worker/factory.node.js +3 -0
  63. package/dist/worker/host.d.ts +4 -2
  64. package/dist/worker/host.js +86 -32
  65. package/dist/worker/protocol.d.ts +25 -8
  66. package/dist/worker/protocol.js +25 -7
  67. package/dist/worker/shared-admission.d.ts +26 -0
  68. package/dist/worker/shared-admission.js +116 -0
  69. package/dist/worker/shared-engine.d.ts +34 -0
  70. package/dist/worker/shared-engine.js +194 -0
  71. package/package.json +21 -9
@@ -0,0 +1,1852 @@
1
+ /* @ts-self-types="./lix_js_sdk.d.ts" */
2
+
3
+ export class BrowserComponentHost {
4
+ static __wrap(ptr) {
5
+ const obj = Object.create(BrowserComponentHost.prototype);
6
+ obj.__wbg_ptr = ptr;
7
+ BrowserComponentHostFinalization.register(obj, obj.__wbg_ptr, obj);
8
+ return obj;
9
+ }
10
+ __destroy_into_raw() {
11
+ const ptr = this.__wbg_ptr;
12
+ this.__wbg_ptr = 0;
13
+ BrowserComponentHostFinalization.unregister(this);
14
+ return ptr;
15
+ }
16
+ free() {
17
+ const ptr = this.__destroy_into_raw();
18
+ wasm.__wbg_browsercomponenthost_free(ptr, 0);
19
+ }
20
+ /**
21
+ * @param {string} method
22
+ * @param {string} _arguments
23
+ * @returns {string}
24
+ */
25
+ call(method, _arguments) {
26
+ let deferred4_0;
27
+ let deferred4_1;
28
+ try {
29
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
30
+ const ptr0 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
31
+ const len0 = WASM_VECTOR_LEN;
32
+ const ptr1 = passStringToWasm0(_arguments, wasm.__wbindgen_export, wasm.__wbindgen_export2);
33
+ const len1 = WASM_VECTOR_LEN;
34
+ wasm.browsercomponenthost_call(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
35
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
36
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
37
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
38
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
39
+ var ptr3 = r0;
40
+ var len3 = r1;
41
+ if (r3) {
42
+ ptr3 = 0; len3 = 0;
43
+ throw takeObject(r2);
44
+ }
45
+ deferred4_0 = ptr3;
46
+ deferred4_1 = len3;
47
+ return getStringFromWasm0(ptr3, len3);
48
+ } finally {
49
+ wasm.__wbindgen_add_to_stack_pointer(16);
50
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
51
+ }
52
+ }
53
+ }
54
+ if (Symbol.dispose) BrowserComponentHost.prototype[Symbol.dispose] = BrowserComponentHost.prototype.free;
55
+
56
+ export class WasmLix {
57
+ static __wrap(ptr) {
58
+ const obj = Object.create(WasmLix.prototype);
59
+ obj.__wbg_ptr = ptr;
60
+ WasmLixFinalization.register(obj, obj.__wbg_ptr, obj);
61
+ return obj;
62
+ }
63
+ __destroy_into_raw() {
64
+ const ptr = this.__wbg_ptr;
65
+ this.__wbg_ptr = 0;
66
+ WasmLixFinalization.unregister(this);
67
+ return ptr;
68
+ }
69
+ free() {
70
+ const ptr = this.__destroy_into_raw();
71
+ wasm.__wbg_wasmlix_free(ptr, 0);
72
+ }
73
+ /**
74
+ * @returns {Promise<string>}
75
+ */
76
+ activeAccountId() {
77
+ const ret = wasm.wasmlix_activeAccountId(this.__wbg_ptr);
78
+ return takeObject(ret);
79
+ }
80
+ /**
81
+ * @returns {Promise<string>}
82
+ */
83
+ activeBranchId() {
84
+ const ret = wasm.wasmlix_activeBranchId(this.__wbg_ptr);
85
+ return takeObject(ret);
86
+ }
87
+ /**
88
+ * @returns {Promise<WasmLixTransaction>}
89
+ */
90
+ beginTransaction() {
91
+ const ret = wasm.wasmlix_beginTransaction(this.__wbg_ptr);
92
+ return takeObject(ret);
93
+ }
94
+ /**
95
+ * @returns {Promise<void>}
96
+ */
97
+ close() {
98
+ const ret = wasm.wasmlix_close(this.__wbg_ptr);
99
+ return takeObject(ret);
100
+ }
101
+ /**
102
+ * @param {any} options
103
+ * @returns {Promise<any>}
104
+ */
105
+ createBranch(options) {
106
+ const ret = wasm.wasmlix_createBranch(this.__wbg_ptr, addHeapObject(options));
107
+ return takeObject(ret);
108
+ }
109
+ /**
110
+ * @param {any} server
111
+ * @returns {Promise<any>}
112
+ */
113
+ createHosted(server) {
114
+ const ret = wasm.wasmlix_createHosted(this.__wbg_ptr, addHeapObject(server));
115
+ return takeObject(ret);
116
+ }
117
+ /**
118
+ * @param {string} sql
119
+ * @param {any} params
120
+ * @param {any | null} [options]
121
+ * @returns {Promise<any>}
122
+ */
123
+ execute(sql, params, options) {
124
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
125
+ const len0 = WASM_VECTOR_LEN;
126
+ const ret = wasm.wasmlix_execute(this.__wbg_ptr, ptr0, len0, addHeapObject(params), isLikeNone(options) ? 0 : addHeapObject(options));
127
+ return takeObject(ret);
128
+ }
129
+ /**
130
+ * @param {any} statements
131
+ * @param {any | null} [options]
132
+ * @returns {Promise<any>}
133
+ */
134
+ executeBatch(statements, options) {
135
+ const ret = wasm.wasmlix_executeBatch(this.__wbg_ptr, addHeapObject(statements), isLikeNone(options) ? 0 : addHeapObject(options));
136
+ return takeObject(ret);
137
+ }
138
+ /**
139
+ * @param {string} id
140
+ * @returns {Promise<any>}
141
+ */
142
+ exportReplicaRecovery(id) {
143
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
144
+ const len0 = WASM_VECTOR_LEN;
145
+ const ret = wasm.wasmlix_exportReplicaRecovery(this.__wbg_ptr, ptr0, len0);
146
+ return takeObject(ret);
147
+ }
148
+ /**
149
+ * @returns {WasmSnapshotExport}
150
+ */
151
+ exportSnapshot() {
152
+ const ret = wasm.wasmlix_exportSnapshot(this.__wbg_ptr);
153
+ return WasmSnapshotExport.__wrap(ret);
154
+ }
155
+ /**
156
+ * @param {any} _paths
157
+ * @returns {Promise<void>}
158
+ */
159
+ importFilesystemPaths(_paths) {
160
+ const ret = wasm.wasmlix_importFilesystemPaths(this.__wbg_ptr, addHeapObject(_paths));
161
+ return takeObject(ret);
162
+ }
163
+ /**
164
+ * @param {any} options
165
+ * @returns {Promise<any>}
166
+ */
167
+ mergeBranch(options) {
168
+ const ret = wasm.wasmlix_mergeBranch(this.__wbg_ptr, addHeapObject(options));
169
+ return takeObject(ret);
170
+ }
171
+ /**
172
+ * @param {any} options
173
+ * @returns {Promise<any>}
174
+ */
175
+ mergeBranchPreview(options) {
176
+ const ret = wasm.wasmlix_mergeBranchPreview(this.__wbg_ptr, addHeapObject(options));
177
+ return takeObject(ret);
178
+ }
179
+ /**
180
+ * @param {string} sql
181
+ * @param {any} params
182
+ * @returns {Promise<WasmObserveEvents>}
183
+ */
184
+ observe(sql, params) {
185
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
186
+ const len0 = WASM_VECTOR_LEN;
187
+ const ret = wasm.wasmlix_observe(this.__wbg_ptr, ptr0, len0, addHeapObject(params));
188
+ return takeObject(ret);
189
+ }
190
+ /**
191
+ * @param {any} options
192
+ * @param {Function | null} [telemetry_dispatch]
193
+ * @returns {Promise<WasmLix>}
194
+ */
195
+ openAnotherSession(options, telemetry_dispatch) {
196
+ const ret = wasm.wasmlix_openAnotherSession(this.__wbg_ptr, addHeapObject(options), isLikeNone(telemetry_dispatch) ? 0 : addHeapObject(telemetry_dispatch));
197
+ return takeObject(ret);
198
+ }
199
+ /**
200
+ * @returns {any}
201
+ */
202
+ openReport() {
203
+ try {
204
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
205
+ wasm.wasmlix_openReport(retptr, this.__wbg_ptr);
206
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
207
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
208
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
209
+ if (r2) {
210
+ throw takeObject(r1);
211
+ }
212
+ return takeObject(r0);
213
+ } finally {
214
+ wasm.__wbindgen_add_to_stack_pointer(16);
215
+ }
216
+ }
217
+ /**
218
+ * @param {string} id
219
+ * @returns {Promise<any>}
220
+ */
221
+ recoverReplica(id) {
222
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
223
+ const len0 = WASM_VECTOR_LEN;
224
+ const ret = wasm.wasmlix_recoverReplica(this.__wbg_ptr, ptr0, len0);
225
+ return takeObject(ret);
226
+ }
227
+ /**
228
+ * @param {string} id
229
+ * @param {any} server
230
+ * @returns {Promise<any>}
231
+ */
232
+ recoverReplicaWithServer(id, server) {
233
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ const ret = wasm.wasmlix_recoverReplicaWithServer(this.__wbg_ptr, ptr0, len0, addHeapObject(server));
236
+ return takeObject(ret);
237
+ }
238
+ /**
239
+ * @returns {Promise<any>}
240
+ */
241
+ redo() {
242
+ const ret = wasm.wasmlix_redo(this.__wbg_ptr);
243
+ return takeObject(ret);
244
+ }
245
+ /**
246
+ * @returns {Promise<any>}
247
+ */
248
+ replicaRecoverySources() {
249
+ const ret = wasm.wasmlix_replicaRecoverySources(this.__wbg_ptr);
250
+ return takeObject(ret);
251
+ }
252
+ /**
253
+ * @param {any | null} [parent]
254
+ */
255
+ setTelemetryParent(parent) {
256
+ try {
257
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
258
+ wasm.wasmlix_setTelemetryParent(retptr, this.__wbg_ptr, isLikeNone(parent) ? 0 : addHeapObject(parent));
259
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
260
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
261
+ if (r1) {
262
+ throw takeObject(r0);
263
+ }
264
+ } finally {
265
+ wasm.__wbindgen_add_to_stack_pointer(16);
266
+ }
267
+ }
268
+ /**
269
+ * @param {any} options
270
+ * @returns {Promise<any>}
271
+ */
272
+ switchBranch(options) {
273
+ const ret = wasm.wasmlix_switchBranch(this.__wbg_ptr, addHeapObject(options));
274
+ return takeObject(ret);
275
+ }
276
+ /**
277
+ * @returns {Promise<void>}
278
+ */
279
+ syncDiskToLix() {
280
+ const ret = wasm.wasmlix_syncDiskToLix(this.__wbg_ptr);
281
+ return takeObject(ret);
282
+ }
283
+ /**
284
+ * @returns {Promise<any>}
285
+ */
286
+ syncHealth() {
287
+ const ret = wasm.wasmlix_syncHealth(this.__wbg_ptr);
288
+ return takeObject(ret);
289
+ }
290
+ /**
291
+ * @returns {Promise<any>}
292
+ */
293
+ undo() {
294
+ const ret = wasm.wasmlix_undo(this.__wbg_ptr);
295
+ return takeObject(ret);
296
+ }
297
+ }
298
+ if (Symbol.dispose) WasmLix.prototype[Symbol.dispose] = WasmLix.prototype.free;
299
+
300
+ export class WasmLixTransaction {
301
+ static __wrap(ptr) {
302
+ const obj = Object.create(WasmLixTransaction.prototype);
303
+ obj.__wbg_ptr = ptr;
304
+ WasmLixTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
305
+ return obj;
306
+ }
307
+ __destroy_into_raw() {
308
+ const ptr = this.__wbg_ptr;
309
+ this.__wbg_ptr = 0;
310
+ WasmLixTransactionFinalization.unregister(this);
311
+ return ptr;
312
+ }
313
+ free() {
314
+ const ptr = this.__destroy_into_raw();
315
+ wasm.__wbg_wasmlixtransaction_free(ptr, 0);
316
+ }
317
+ /**
318
+ * @returns {Promise<any>}
319
+ */
320
+ commit() {
321
+ const ret = wasm.wasmlixtransaction_commit(this.__wbg_ptr);
322
+ return takeObject(ret);
323
+ }
324
+ /**
325
+ * @param {string} sql
326
+ * @param {any} params
327
+ * @param {any | null} [options]
328
+ * @returns {Promise<any>}
329
+ */
330
+ execute(sql, params, options) {
331
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
332
+ const len0 = WASM_VECTOR_LEN;
333
+ const ret = wasm.wasmlixtransaction_execute(this.__wbg_ptr, ptr0, len0, addHeapObject(params), isLikeNone(options) ? 0 : addHeapObject(options));
334
+ return takeObject(ret);
335
+ }
336
+ /**
337
+ * @returns {Promise<void>}
338
+ */
339
+ rollback() {
340
+ const ret = wasm.wasmlixtransaction_rollback(this.__wbg_ptr);
341
+ return takeObject(ret);
342
+ }
343
+ }
344
+ if (Symbol.dispose) WasmLixTransaction.prototype[Symbol.dispose] = WasmLixTransaction.prototype.free;
345
+
346
+ export class WasmObserveEvents {
347
+ static __wrap(ptr) {
348
+ const obj = Object.create(WasmObserveEvents.prototype);
349
+ obj.__wbg_ptr = ptr;
350
+ WasmObserveEventsFinalization.register(obj, obj.__wbg_ptr, obj);
351
+ return obj;
352
+ }
353
+ __destroy_into_raw() {
354
+ const ptr = this.__wbg_ptr;
355
+ this.__wbg_ptr = 0;
356
+ WasmObserveEventsFinalization.unregister(this);
357
+ return ptr;
358
+ }
359
+ free() {
360
+ const ptr = this.__destroy_into_raw();
361
+ wasm.__wbg_wasmobserveevents_free(ptr, 0);
362
+ }
363
+ close() {
364
+ wasm.wasmobserveevents_close(this.__wbg_ptr);
365
+ }
366
+ /**
367
+ * @returns {Promise<any>}
368
+ */
369
+ next() {
370
+ const ret = wasm.wasmobserveevents_next(this.__wbg_ptr);
371
+ return takeObject(ret);
372
+ }
373
+ /**
374
+ * @param {any | null} [parent]
375
+ */
376
+ setTelemetryParent(parent) {
377
+ try {
378
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
379
+ wasm.wasmobserveevents_setTelemetryParent(retptr, this.__wbg_ptr, isLikeNone(parent) ? 0 : addHeapObject(parent));
380
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
381
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
382
+ if (r1) {
383
+ throw takeObject(r0);
384
+ }
385
+ } finally {
386
+ wasm.__wbindgen_add_to_stack_pointer(16);
387
+ }
388
+ }
389
+ }
390
+ if (Symbol.dispose) WasmObserveEvents.prototype[Symbol.dispose] = WasmObserveEvents.prototype.free;
391
+
392
+ export class WasmRemoteLix {
393
+ static __wrap(ptr) {
394
+ const obj = Object.create(WasmRemoteLix.prototype);
395
+ obj.__wbg_ptr = ptr;
396
+ WasmRemoteLixFinalization.register(obj, obj.__wbg_ptr, obj);
397
+ return obj;
398
+ }
399
+ __destroy_into_raw() {
400
+ const ptr = this.__wbg_ptr;
401
+ this.__wbg_ptr = 0;
402
+ WasmRemoteLixFinalization.unregister(this);
403
+ return ptr;
404
+ }
405
+ free() {
406
+ const ptr = this.__destroy_into_raw();
407
+ wasm.__wbg_wasmremotelix_free(ptr, 0);
408
+ }
409
+ /**
410
+ * @returns {Promise<string>}
411
+ */
412
+ activeAccountId() {
413
+ const ret = wasm.wasmremotelix_activeAccountId(this.__wbg_ptr);
414
+ return takeObject(ret);
415
+ }
416
+ /**
417
+ * @returns {Promise<string>}
418
+ */
419
+ activeBranchId() {
420
+ const ret = wasm.wasmremotelix_activeBranchId(this.__wbg_ptr);
421
+ return takeObject(ret);
422
+ }
423
+ /**
424
+ * @returns {Promise<WasmRemoteLixTransaction>}
425
+ */
426
+ beginTransaction() {
427
+ const ret = wasm.wasmremotelix_beginTransaction(this.__wbg_ptr);
428
+ return takeObject(ret);
429
+ }
430
+ /**
431
+ * @returns {Promise<void>}
432
+ */
433
+ close() {
434
+ const ret = wasm.wasmremotelix_close(this.__wbg_ptr);
435
+ return takeObject(ret);
436
+ }
437
+ /**
438
+ * @param {any} options
439
+ * @returns {Promise<any>}
440
+ */
441
+ createBranch(options) {
442
+ const ret = wasm.wasmremotelix_createBranch(this.__wbg_ptr, addHeapObject(options));
443
+ return takeObject(ret);
444
+ }
445
+ /**
446
+ * @param {string} sql
447
+ * @param {any} params
448
+ * @param {any | null} [options]
449
+ * @returns {Promise<any>}
450
+ */
451
+ execute(sql, params, options) {
452
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
453
+ const len0 = WASM_VECTOR_LEN;
454
+ const ret = wasm.wasmremotelix_execute(this.__wbg_ptr, ptr0, len0, addHeapObject(params), isLikeNone(options) ? 0 : addHeapObject(options));
455
+ return takeObject(ret);
456
+ }
457
+ /**
458
+ * @param {any} statements
459
+ * @param {any | null} [options]
460
+ * @returns {Promise<any>}
461
+ */
462
+ executeBatch(statements, options) {
463
+ const ret = wasm.wasmremotelix_executeBatch(this.__wbg_ptr, addHeapObject(statements), isLikeNone(options) ? 0 : addHeapObject(options));
464
+ return takeObject(ret);
465
+ }
466
+ /**
467
+ * @param {string} _id
468
+ * @returns {Promise<any>}
469
+ */
470
+ exportReplicaRecovery(_id) {
471
+ const ptr0 = passStringToWasm0(_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
472
+ const len0 = WASM_VECTOR_LEN;
473
+ const ret = wasm.wasmremotelix_exportReplicaRecovery(this.__wbg_ptr, ptr0, len0);
474
+ return takeObject(ret);
475
+ }
476
+ /**
477
+ * @returns {WasmSnapshotExport}
478
+ */
479
+ exportSnapshot() {
480
+ const ret = wasm.wasmremotelix_exportSnapshot(this.__wbg_ptr);
481
+ return WasmSnapshotExport.__wrap(ret);
482
+ }
483
+ /**
484
+ * @param {any} _paths
485
+ * @returns {Promise<void>}
486
+ */
487
+ importFilesystemPaths(_paths) {
488
+ const ret = wasm.wasmremotelix_importFilesystemPaths(this.__wbg_ptr, addHeapObject(_paths));
489
+ return takeObject(ret);
490
+ }
491
+ /**
492
+ * @param {any} options
493
+ * @returns {Promise<any>}
494
+ */
495
+ mergeBranch(options) {
496
+ const ret = wasm.wasmremotelix_mergeBranch(this.__wbg_ptr, addHeapObject(options));
497
+ return takeObject(ret);
498
+ }
499
+ /**
500
+ * @param {any} options
501
+ * @returns {Promise<any>}
502
+ */
503
+ mergeBranchPreview(options) {
504
+ const ret = wasm.wasmremotelix_mergeBranchPreview(this.__wbg_ptr, addHeapObject(options));
505
+ return takeObject(ret);
506
+ }
507
+ /**
508
+ * @param {string} sql
509
+ * @param {any} params
510
+ * @returns {Promise<WasmRemoteObserveEvents>}
511
+ */
512
+ observe(sql, params) {
513
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
514
+ const len0 = WASM_VECTOR_LEN;
515
+ const ret = wasm.wasmremotelix_observe(this.__wbg_ptr, ptr0, len0, addHeapObject(params));
516
+ return takeObject(ret);
517
+ }
518
+ /**
519
+ * @param {any} options
520
+ * @returns {Promise<WasmRemoteLix>}
521
+ */
522
+ openAnotherSession(options) {
523
+ const ret = wasm.wasmremotelix_openAnotherSession(this.__wbg_ptr, addHeapObject(options));
524
+ return takeObject(ret);
525
+ }
526
+ /**
527
+ * @param {string} _id
528
+ * @returns {Promise<any>}
529
+ */
530
+ recoverReplica(_id) {
531
+ const ptr0 = passStringToWasm0(_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
532
+ const len0 = WASM_VECTOR_LEN;
533
+ const ret = wasm.wasmremotelix_recoverReplica(this.__wbg_ptr, ptr0, len0);
534
+ return takeObject(ret);
535
+ }
536
+ /**
537
+ * @param {string} _id
538
+ * @param {any} _server
539
+ * @returns {Promise<any>}
540
+ */
541
+ recoverReplicaWithServer(_id, _server) {
542
+ const ptr0 = passStringToWasm0(_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
543
+ const len0 = WASM_VECTOR_LEN;
544
+ const ret = wasm.wasmremotelix_recoverReplicaWithServer(this.__wbg_ptr, ptr0, len0, addHeapObject(_server));
545
+ return takeObject(ret);
546
+ }
547
+ /**
548
+ * @returns {Promise<any>}
549
+ */
550
+ redo() {
551
+ const ret = wasm.wasmremotelix_redo(this.__wbg_ptr);
552
+ return takeObject(ret);
553
+ }
554
+ /**
555
+ * @returns {Promise<any>}
556
+ */
557
+ replicaRecoverySources() {
558
+ const ret = wasm.wasmremotelix_replicaRecoverySources(this.__wbg_ptr);
559
+ return takeObject(ret);
560
+ }
561
+ /**
562
+ * @param {any | null} [_parent]
563
+ */
564
+ setTelemetryParent(_parent) {
565
+ wasm.wasmremotelix_setTelemetryParent(this.__wbg_ptr, isLikeNone(_parent) ? 0 : addHeapObject(_parent));
566
+ }
567
+ /**
568
+ * @param {any} options
569
+ * @returns {Promise<any>}
570
+ */
571
+ switchBranch(options) {
572
+ const ret = wasm.wasmremotelix_switchBranch(this.__wbg_ptr, addHeapObject(options));
573
+ return takeObject(ret);
574
+ }
575
+ /**
576
+ * @returns {Promise<void>}
577
+ */
578
+ syncDiskToLix() {
579
+ const ret = wasm.wasmremotelix_syncDiskToLix(this.__wbg_ptr);
580
+ return takeObject(ret);
581
+ }
582
+ /**
583
+ * @returns {Promise<any>}
584
+ */
585
+ syncHealth() {
586
+ const ret = wasm.wasmremotelix_syncHealth(this.__wbg_ptr);
587
+ return takeObject(ret);
588
+ }
589
+ /**
590
+ * @returns {Promise<any>}
591
+ */
592
+ undo() {
593
+ const ret = wasm.wasmremotelix_undo(this.__wbg_ptr);
594
+ return takeObject(ret);
595
+ }
596
+ }
597
+ if (Symbol.dispose) WasmRemoteLix.prototype[Symbol.dispose] = WasmRemoteLix.prototype.free;
598
+
599
+ export class WasmRemoteLixTransaction {
600
+ static __wrap(ptr) {
601
+ const obj = Object.create(WasmRemoteLixTransaction.prototype);
602
+ obj.__wbg_ptr = ptr;
603
+ WasmRemoteLixTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
604
+ return obj;
605
+ }
606
+ __destroy_into_raw() {
607
+ const ptr = this.__wbg_ptr;
608
+ this.__wbg_ptr = 0;
609
+ WasmRemoteLixTransactionFinalization.unregister(this);
610
+ return ptr;
611
+ }
612
+ free() {
613
+ const ptr = this.__destroy_into_raw();
614
+ wasm.__wbg_wasmremotelixtransaction_free(ptr, 0);
615
+ }
616
+ /**
617
+ * @returns {Promise<any>}
618
+ */
619
+ commit() {
620
+ const ret = wasm.wasmremotelixtransaction_commit(this.__wbg_ptr);
621
+ return takeObject(ret);
622
+ }
623
+ /**
624
+ * @param {string} sql
625
+ * @param {any} params
626
+ * @param {any | null} [options]
627
+ * @returns {Promise<any>}
628
+ */
629
+ execute(sql, params, options) {
630
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
631
+ const len0 = WASM_VECTOR_LEN;
632
+ const ret = wasm.wasmremotelixtransaction_execute(this.__wbg_ptr, ptr0, len0, addHeapObject(params), isLikeNone(options) ? 0 : addHeapObject(options));
633
+ return takeObject(ret);
634
+ }
635
+ /**
636
+ * @returns {Promise<void>}
637
+ */
638
+ rollback() {
639
+ const ret = wasm.wasmremotelixtransaction_rollback(this.__wbg_ptr);
640
+ return takeObject(ret);
641
+ }
642
+ }
643
+ if (Symbol.dispose) WasmRemoteLixTransaction.prototype[Symbol.dispose] = WasmRemoteLixTransaction.prototype.free;
644
+
645
+ export class WasmRemoteObserveEvents {
646
+ static __wrap(ptr) {
647
+ const obj = Object.create(WasmRemoteObserveEvents.prototype);
648
+ obj.__wbg_ptr = ptr;
649
+ WasmRemoteObserveEventsFinalization.register(obj, obj.__wbg_ptr, obj);
650
+ return obj;
651
+ }
652
+ __destroy_into_raw() {
653
+ const ptr = this.__wbg_ptr;
654
+ this.__wbg_ptr = 0;
655
+ WasmRemoteObserveEventsFinalization.unregister(this);
656
+ return ptr;
657
+ }
658
+ free() {
659
+ const ptr = this.__destroy_into_raw();
660
+ wasm.__wbg_wasmremoteobserveevents_free(ptr, 0);
661
+ }
662
+ close() {
663
+ wasm.wasmremoteobserveevents_close(this.__wbg_ptr);
664
+ }
665
+ /**
666
+ * @returns {Promise<any>}
667
+ */
668
+ next() {
669
+ const ret = wasm.wasmremoteobserveevents_next(this.__wbg_ptr);
670
+ return takeObject(ret);
671
+ }
672
+ /**
673
+ * @param {any | null} [_parent]
674
+ */
675
+ setTelemetryParent(_parent) {
676
+ wasm.wasmremoteobserveevents_setTelemetryParent(this.__wbg_ptr, isLikeNone(_parent) ? 0 : addHeapObject(_parent));
677
+ }
678
+ }
679
+ if (Symbol.dispose) WasmRemoteObserveEvents.prototype[Symbol.dispose] = WasmRemoteObserveEvents.prototype.free;
680
+
681
+ export class WasmSnapshotExport {
682
+ static __wrap(ptr) {
683
+ const obj = Object.create(WasmSnapshotExport.prototype);
684
+ obj.__wbg_ptr = ptr;
685
+ WasmSnapshotExportFinalization.register(obj, obj.__wbg_ptr, obj);
686
+ return obj;
687
+ }
688
+ __destroy_into_raw() {
689
+ const ptr = this.__wbg_ptr;
690
+ this.__wbg_ptr = 0;
691
+ WasmSnapshotExportFinalization.unregister(this);
692
+ return ptr;
693
+ }
694
+ free() {
695
+ const ptr = this.__destroy_into_raw();
696
+ wasm.__wbg_wasmsnapshotexport_free(ptr, 0);
697
+ }
698
+ /**
699
+ * @returns {Promise<void>}
700
+ */
701
+ cancel() {
702
+ const ret = wasm.wasmsnapshotexport_cancel(this.__wbg_ptr);
703
+ return takeObject(ret);
704
+ }
705
+ /**
706
+ * @returns {Promise<Uint8Array | undefined>}
707
+ */
708
+ next() {
709
+ const ret = wasm.wasmsnapshotexport_next(this.__wbg_ptr);
710
+ return takeObject(ret);
711
+ }
712
+ }
713
+ if (Symbol.dispose) WasmSnapshotExport.prototype[Symbol.dispose] = WasmSnapshotExport.prototype.free;
714
+
715
+ export class WasmSnapshotRestore {
716
+ static __wrap(ptr) {
717
+ const obj = Object.create(WasmSnapshotRestore.prototype);
718
+ obj.__wbg_ptr = ptr;
719
+ WasmSnapshotRestoreFinalization.register(obj, obj.__wbg_ptr, obj);
720
+ return obj;
721
+ }
722
+ __destroy_into_raw() {
723
+ const ptr = this.__wbg_ptr;
724
+ this.__wbg_ptr = 0;
725
+ WasmSnapshotRestoreFinalization.unregister(this);
726
+ return ptr;
727
+ }
728
+ free() {
729
+ const ptr = this.__destroy_into_raw();
730
+ wasm.__wbg_wasmsnapshotrestore_free(ptr, 0);
731
+ }
732
+ /**
733
+ * @returns {Promise<void>}
734
+ */
735
+ cancel() {
736
+ const ret = wasm.wasmsnapshotrestore_cancel(this.__wbg_ptr);
737
+ return takeObject(ret);
738
+ }
739
+ /**
740
+ * @returns {Promise<WasmLix>}
741
+ */
742
+ finish() {
743
+ const ret = wasm.wasmsnapshotrestore_finish(this.__wbg_ptr);
744
+ return takeObject(ret);
745
+ }
746
+ /**
747
+ * @returns {boolean}
748
+ */
749
+ isComplete() {
750
+ const ret = wasm.wasmsnapshotrestore_isComplete(this.__wbg_ptr);
751
+ return ret !== 0;
752
+ }
753
+ /**
754
+ * @param {Uint8Array} chunk
755
+ * @returns {Promise<void>}
756
+ */
757
+ write(chunk) {
758
+ const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_export);
759
+ const len0 = WASM_VECTOR_LEN;
760
+ const ret = wasm.wasmsnapshotrestore_write(this.__wbg_ptr, ptr0, len0);
761
+ return takeObject(ret);
762
+ }
763
+ }
764
+ if (Symbol.dispose) WasmSnapshotRestore.prototype[Symbol.dispose] = WasmSnapshotRestore.prototype.free;
765
+
766
+ /**
767
+ * @param {any} provider
768
+ * @param {any} server
769
+ * @param {string | null} [branch_id]
770
+ * @returns {Promise<void>}
771
+ */
772
+ export function convertJsStorageReplicaToPartial(provider, server, branch_id) {
773
+ var ptr0 = isLikeNone(branch_id) ? 0 : passStringToWasm0(branch_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
774
+ var len0 = WASM_VECTOR_LEN;
775
+ const ret = wasm.convertJsStorageReplicaToPartial(addHeapObject(provider), addHeapObject(server), ptr0, len0);
776
+ return takeObject(ret);
777
+ }
778
+
779
+ /**
780
+ * @param {any} server
781
+ * @returns {Promise<any>}
782
+ */
783
+ export function createHosted(server) {
784
+ const ret = wasm.createHosted(addHeapObject(server));
785
+ return takeObject(ret);
786
+ }
787
+
788
+ /**
789
+ * @param {any} server
790
+ * @returns {Promise<void>}
791
+ */
792
+ export function deleteHosted(server) {
793
+ const ret = wasm.deleteHosted(addHeapObject(server));
794
+ return takeObject(ret);
795
+ }
796
+
797
+ /**
798
+ * Read-only routing metadata; available in the current-format runtime.
799
+ * @param {any} provider
800
+ * @returns {Promise<any>}
801
+ */
802
+ export function inspectJsStorageRepository(provider) {
803
+ const ret = wasm.inspectJsStorageRepository(addHeapObject(provider));
804
+ return takeObject(ret);
805
+ }
806
+
807
+ /**
808
+ * Detached migration artifact only. Caller owns the physical source lock and
809
+ * destination publication/recovery lifecycle.
810
+ * @param {any} provider
811
+ * @param {any | null} [limits]
812
+ * @returns {Promise<any>}
813
+ */
814
+ export function migrateJsStorageRepository(provider, limits) {
815
+ const ret = wasm.migrateJsStorageRepository(addHeapObject(provider), isLikeNone(limits) ? 0 : addHeapObject(limits));
816
+ return takeObject(ret);
817
+ }
818
+
819
+ /**
820
+ * @param {any} provider
821
+ * @param {Function | null | undefined} telemetry_dispatch
822
+ * @param {any | null | undefined} telemetry_parent
823
+ * @param {any | null | undefined} server
824
+ * @param {Function | null | undefined} open_progress_dispatch
825
+ * @param {Function} component_dispatch
826
+ * @param {string | null} [durability]
827
+ * @returns {Promise<WasmLix>}
828
+ */
829
+ export function openJsStorage(provider, telemetry_dispatch, telemetry_parent, server, open_progress_dispatch, component_dispatch, durability) {
830
+ var ptr0 = isLikeNone(durability) ? 0 : passStringToWasm0(durability, wasm.__wbindgen_export, wasm.__wbindgen_export2);
831
+ var len0 = WASM_VECTOR_LEN;
832
+ const ret = wasm.openJsStorage(addHeapObject(provider), isLikeNone(telemetry_dispatch) ? 0 : addHeapObject(telemetry_dispatch), isLikeNone(telemetry_parent) ? 0 : addHeapObject(telemetry_parent), isLikeNone(server) ? 0 : addHeapObject(server), isLikeNone(open_progress_dispatch) ? 0 : addHeapObject(open_progress_dispatch), addHeapObject(component_dispatch), ptr0, len0);
833
+ return takeObject(ret);
834
+ }
835
+
836
+ /**
837
+ * @param {any} provider
838
+ * @param {Function | null | undefined} telemetry_dispatch
839
+ * @param {any | null | undefined} telemetry_parent
840
+ * @param {Function | null | undefined} open_progress_dispatch
841
+ * @param {Function} component_dispatch
842
+ * @param {string | null} [durability]
843
+ * @returns {WasmSnapshotRestore}
844
+ */
845
+ export function openJsStorageFromSnapshot(provider, telemetry_dispatch, telemetry_parent, open_progress_dispatch, component_dispatch, durability) {
846
+ var ptr0 = isLikeNone(durability) ? 0 : passStringToWasm0(durability, wasm.__wbindgen_export, wasm.__wbindgen_export2);
847
+ var len0 = WASM_VECTOR_LEN;
848
+ const ret = wasm.openJsStorageFromSnapshot(addHeapObject(provider), isLikeNone(telemetry_dispatch) ? 0 : addHeapObject(telemetry_dispatch), isLikeNone(telemetry_parent) ? 0 : addHeapObject(telemetry_parent), isLikeNone(open_progress_dispatch) ? 0 : addHeapObject(open_progress_dispatch), addHeapObject(component_dispatch), ptr0, len0);
849
+ return WasmSnapshotRestore.__wrap(ret);
850
+ }
851
+
852
+ /**
853
+ * @param {Function | null | undefined} telemetry_dispatch
854
+ * @param {any | null | undefined} telemetry_parent
855
+ * @param {any | null | undefined} server
856
+ * @param {Function | null | undefined} open_progress_dispatch
857
+ * @param {Function} component_dispatch
858
+ * @param {string | null} [durability]
859
+ * @returns {Promise<WasmLix>}
860
+ */
861
+ export function openMemory(telemetry_dispatch, telemetry_parent, server, open_progress_dispatch, component_dispatch, durability) {
862
+ var ptr0 = isLikeNone(durability) ? 0 : passStringToWasm0(durability, wasm.__wbindgen_export, wasm.__wbindgen_export2);
863
+ var len0 = WASM_VECTOR_LEN;
864
+ const ret = wasm.openMemory(isLikeNone(telemetry_dispatch) ? 0 : addHeapObject(telemetry_dispatch), isLikeNone(telemetry_parent) ? 0 : addHeapObject(telemetry_parent), isLikeNone(server) ? 0 : addHeapObject(server), isLikeNone(open_progress_dispatch) ? 0 : addHeapObject(open_progress_dispatch), addHeapObject(component_dispatch), ptr0, len0);
865
+ return takeObject(ret);
866
+ }
867
+
868
+ /**
869
+ * @param {Function | null | undefined} telemetry_dispatch
870
+ * @param {any | null | undefined} telemetry_parent
871
+ * @param {Function | null | undefined} open_progress_dispatch
872
+ * @param {Function} component_dispatch
873
+ * @param {string | null} [durability]
874
+ * @returns {WasmSnapshotRestore}
875
+ */
876
+ export function openMemoryFromSnapshot(telemetry_dispatch, telemetry_parent, open_progress_dispatch, component_dispatch, durability) {
877
+ var ptr0 = isLikeNone(durability) ? 0 : passStringToWasm0(durability, wasm.__wbindgen_export, wasm.__wbindgen_export2);
878
+ var len0 = WASM_VECTOR_LEN;
879
+ const ret = wasm.openMemoryFromSnapshot(isLikeNone(telemetry_dispatch) ? 0 : addHeapObject(telemetry_dispatch), isLikeNone(telemetry_parent) ? 0 : addHeapObject(telemetry_parent), isLikeNone(open_progress_dispatch) ? 0 : addHeapObject(open_progress_dispatch), addHeapObject(component_dispatch), ptr0, len0);
880
+ return WasmSnapshotRestore.__wrap(ret);
881
+ }
882
+
883
+ /**
884
+ * @param {string} url
885
+ * @param {Function} fetch
886
+ * @param {any} headers
887
+ * @param {string | null} [initial_active_branch_id]
888
+ * @returns {Promise<WasmRemoteLix>}
889
+ */
890
+ export function openRemote(url, fetch, headers, initial_active_branch_id) {
891
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
892
+ const len0 = WASM_VECTOR_LEN;
893
+ var ptr1 = isLikeNone(initial_active_branch_id) ? 0 : passStringToWasm0(initial_active_branch_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
894
+ var len1 = WASM_VECTOR_LEN;
895
+ const ret = wasm.openRemote(ptr0, len0, addHeapObject(fetch), addHeapObject(headers), ptr1, len1);
896
+ return takeObject(ret);
897
+ }
898
+
899
+ /**
900
+ * Parse the engine SQL dialect for hosts that authorize public SQL.
901
+ * @param {string} sql
902
+ * @param {number} provided_param_count
903
+ * @returns {any}
904
+ */
905
+ export function parseSqlScript(sql, provided_param_count) {
906
+ try {
907
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
908
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_export, wasm.__wbindgen_export2);
909
+ const len0 = WASM_VECTOR_LEN;
910
+ wasm.parseSqlScript(retptr, ptr0, len0, provided_param_count);
911
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
912
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
913
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
914
+ if (r2) {
915
+ throw takeObject(r1);
916
+ }
917
+ return takeObject(r0);
918
+ } finally {
919
+ wasm.__wbindgen_add_to_stack_pointer(16);
920
+ }
921
+ }
922
+
923
+ /**
924
+ * @param {any} provider
925
+ * @param {any} server
926
+ * @returns {Promise<number>}
927
+ */
928
+ export function retryJsStorageReplicaMigrationCleanup(provider, server) {
929
+ const ret = wasm.retryJsStorageReplicaMigrationCleanup(addHeapObject(provider), addHeapObject(server));
930
+ return takeObject(ret);
931
+ }
932
+ function __wbg_get_imports() {
933
+ const import0 = {
934
+ __proto__: null,
935
+ __wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
936
+ const ret = Error(getStringFromWasm0(arg0, arg1));
937
+ return addHeapObject(ret);
938
+ },
939
+ __wbg_Number_6b506e6536831eaa: function(arg0) {
940
+ const ret = Number(getObject(arg0));
941
+ return ret;
942
+ },
943
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
944
+ const ret = String(getObject(arg1));
945
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
946
+ const len1 = WASM_VECTOR_LEN;
947
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
948
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
949
+ },
950
+ __wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(arg0, arg1) {
951
+ const v = getObject(arg1);
952
+ const ret = typeof(v) === 'bigint' ? v : undefined;
953
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
954
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
955
+ },
956
+ __wbg___wbindgen_boolean_get_1a45e2c38d4d41b9: function(arg0) {
957
+ const v = getObject(arg0);
958
+ const ret = typeof(v) === 'boolean' ? v : undefined;
959
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
960
+ },
961
+ __wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) {
962
+ const ret = debugString(getObject(arg1));
963
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
964
+ const len1 = WASM_VECTOR_LEN;
965
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
966
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
967
+ },
968
+ __wbg___wbindgen_in_70a403a56e771704: function(arg0, arg1) {
969
+ const ret = getObject(arg0) in getObject(arg1);
970
+ return ret;
971
+ },
972
+ __wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(arg0) {
973
+ const ret = typeof(getObject(arg0)) === 'bigint';
974
+ return ret;
975
+ },
976
+ __wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
977
+ const ret = typeof(getObject(arg0)) === 'function';
978
+ return ret;
979
+ },
980
+ __wbg___wbindgen_is_null_87c3bfe968c6a5ad: function(arg0) {
981
+ const ret = getObject(arg0) === null;
982
+ return ret;
983
+ },
984
+ __wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
985
+ const val = getObject(arg0);
986
+ const ret = typeof(val) === 'object' && val !== null;
987
+ return ret;
988
+ },
989
+ __wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
990
+ const ret = typeof(getObject(arg0)) === 'string';
991
+ return ret;
992
+ },
993
+ __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
994
+ const ret = getObject(arg0) === undefined;
995
+ return ret;
996
+ },
997
+ __wbg___wbindgen_jsval_eq_1068e624fa87f6ab: function(arg0, arg1) {
998
+ const ret = getObject(arg0) === getObject(arg1);
999
+ return ret;
1000
+ },
1001
+ __wbg___wbindgen_jsval_loose_eq_2c56564c75129511: function(arg0, arg1) {
1002
+ const ret = getObject(arg0) == getObject(arg1);
1003
+ return ret;
1004
+ },
1005
+ __wbg___wbindgen_number_get_9bb1761122181af2: function(arg0, arg1) {
1006
+ const obj = getObject(arg1);
1007
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1008
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1009
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1010
+ },
1011
+ __wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
1012
+ const obj = getObject(arg1);
1013
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1014
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1015
+ var len1 = WASM_VECTOR_LEN;
1016
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1017
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1018
+ },
1019
+ __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
1020
+ throw new Error(getStringFromWasm0(arg0, arg1));
1021
+ },
1022
+ __wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) {
1023
+ getObject(arg0)._wbg_cb_unref();
1024
+ },
1025
+ __wbg_acquirePartialReplicaOwner_eec421a6abd55550: function() { return handleError(function (arg0, arg1, arg2) {
1026
+ const ret = getObject(arg0).acquirePartialReplicaOwner(getStringFromWasm0(arg1, arg2));
1027
+ return addHeapObject(ret);
1028
+ }, arguments); },
1029
+ __wbg_acquireSession_efd474d194c89c7c: function(arg0) {
1030
+ const ret = getObject(arg0).acquireSession();
1031
+ return addHeapObject(ret);
1032
+ },
1033
+ __wbg_beginRead_c29ba5aceee12f65: function(arg0, arg1) {
1034
+ const ret = getObject(arg0).beginRead(takeObject(arg1));
1035
+ return addHeapObject(ret);
1036
+ },
1037
+ __wbg_beginScan_0a623d7363773a8c: function(arg0, arg1, arg2, arg3) {
1038
+ const ret = getObject(arg0).beginScan(takeObject(arg1), takeObject(arg2), takeObject(arg3));
1039
+ return addHeapObject(ret);
1040
+ },
1041
+ __wbg_beginWrite_243047d9cbfeca9e: function(arg0, arg1) {
1042
+ const ret = getObject(arg0).beginWrite(takeObject(arg1));
1043
+ return addHeapObject(ret);
1044
+ },
1045
+ __wbg_browsercomponenthost_new: function(arg0) {
1046
+ const ret = BrowserComponentHost.__wrap(arg0);
1047
+ return addHeapObject(ret);
1048
+ },
1049
+ __wbg_call_40e4174f169eaca7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1050
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
1051
+ return addHeapObject(ret);
1052
+ }, arguments); },
1053
+ __wbg_call_8a89609d89f6608a: function() { return handleError(function (arg0, arg1) {
1054
+ const ret = getObject(arg0).call(getObject(arg1));
1055
+ return addHeapObject(ret);
1056
+ }, arguments); },
1057
+ __wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) {
1058
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1059
+ return addHeapObject(ret);
1060
+ }, arguments); },
1061
+ __wbg_changed_09a2471dfa033a65: function(arg0) {
1062
+ const ret = getObject(arg0).changed();
1063
+ return addHeapObject(ret);
1064
+ },
1065
+ __wbg_close_037c736acbd898fe: function(arg0) {
1066
+ getObject(arg0).close();
1067
+ },
1068
+ __wbg_close_84f9cb63f6cabe57: function(arg0) {
1069
+ getObject(arg0).close();
1070
+ },
1071
+ __wbg_close_9f2d9c9e61b826ae: function(arg0) {
1072
+ const ret = getObject(arg0).close();
1073
+ return addHeapObject(ret);
1074
+ },
1075
+ __wbg_commit_0426d36d5c3467bd: function(arg0) {
1076
+ const ret = getObject(arg0).commit();
1077
+ return addHeapObject(ret);
1078
+ },
1079
+ __wbg_construct_e0f002bb615dbba1: function() { return handleError(function (arg0, arg1) {
1080
+ const ret = Reflect.construct(getObject(arg0), getObject(arg1));
1081
+ return addHeapObject(ret);
1082
+ }, arguments); },
1083
+ __wbg_deleteMany_592dee42b3e47e6b: function(arg0, arg1, arg2) {
1084
+ const ret = getObject(arg0).deleteMany(takeObject(arg1), takeObject(arg2));
1085
+ return addHeapObject(ret);
1086
+ },
1087
+ __wbg_deleteRange_e742782bb7dd946f: function(arg0, arg1, arg2) {
1088
+ const ret = getObject(arg0).deleteRange(takeObject(arg1), takeObject(arg2));
1089
+ return addHeapObject(ret);
1090
+ },
1091
+ __wbg_done_60cf307fcc680536: function(arg0) {
1092
+ const ret = getObject(arg0).done;
1093
+ return ret;
1094
+ },
1095
+ __wbg_entries_04b37a02507f1713: function(arg0) {
1096
+ const ret = Object.entries(getObject(arg0));
1097
+ return addHeapObject(ret);
1098
+ },
1099
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
1100
+ let deferred0_0;
1101
+ let deferred0_1;
1102
+ try {
1103
+ deferred0_0 = arg0;
1104
+ deferred0_1 = arg1;
1105
+ console.error(getStringFromWasm0(arg0, arg1));
1106
+ } finally {
1107
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
1108
+ }
1109
+ },
1110
+ __wbg_from_d300fe49deab18f5: function(arg0) {
1111
+ const ret = Array.from(getObject(arg0));
1112
+ return addHeapObject(ret);
1113
+ },
1114
+ __wbg_getMany_954f9ded5c747f31: function(arg0, arg1) {
1115
+ const ret = getObject(arg0).getMany(takeObject(arg1));
1116
+ return addHeapObject(ret);
1117
+ },
1118
+ __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
1119
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1120
+ }, arguments); },
1121
+ __wbg_getRandomValues_ef12552bf5acd2fe: function() { return handleError(function (arg0, arg1) {
1122
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1123
+ }, arguments); },
1124
+ __wbg_getTime_00b3f7db575e4ef5: function(arg0) {
1125
+ const ret = getObject(arg0).getTime();
1126
+ return ret;
1127
+ },
1128
+ __wbg_get_1f8f054ddbaa7db2: function() { return handleError(function (arg0, arg1) {
1129
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1130
+ return addHeapObject(ret);
1131
+ }, arguments); },
1132
+ __wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
1133
+ const ret = getObject(arg0)[arg1 >>> 0];
1134
+ return addHeapObject(ret);
1135
+ },
1136
+ __wbg_get_de6a0f7d4d18a304: function() { return handleError(function (arg0, arg1) {
1137
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1138
+ return addHeapObject(ret);
1139
+ }, arguments); },
1140
+ __wbg_get_unchecked_33f6e5c9e2f2d6b2: function(arg0, arg1) {
1141
+ const ret = getObject(arg0)[arg1 >>> 0];
1142
+ return addHeapObject(ret);
1143
+ },
1144
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
1145
+ const ret = getObject(arg0)[getObject(arg1)];
1146
+ return addHeapObject(ret);
1147
+ },
1148
+ __wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
1149
+ let result;
1150
+ try {
1151
+ result = getObject(arg0) instanceof ArrayBuffer;
1152
+ } catch (_) {
1153
+ result = false;
1154
+ }
1155
+ const ret = result;
1156
+ return ret;
1157
+ },
1158
+ __wbg_instanceof_Map_9fc06d9a951bcee6: function(arg0) {
1159
+ let result;
1160
+ try {
1161
+ result = getObject(arg0) instanceof Map;
1162
+ } catch (_) {
1163
+ result = false;
1164
+ }
1165
+ const ret = result;
1166
+ return ret;
1167
+ },
1168
+ __wbg_instanceof_Promise_d0db99486956c8e8: function(arg0) {
1169
+ let result;
1170
+ try {
1171
+ result = getObject(arg0) instanceof Promise;
1172
+ } catch (_) {
1173
+ result = false;
1174
+ }
1175
+ const ret = result;
1176
+ return ret;
1177
+ },
1178
+ __wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(arg0) {
1179
+ let result;
1180
+ try {
1181
+ result = getObject(arg0) instanceof Uint8Array;
1182
+ } catch (_) {
1183
+ result = false;
1184
+ }
1185
+ const ret = result;
1186
+ return ret;
1187
+ },
1188
+ __wbg_isArray_67c2c9c4313f4448: function(arg0) {
1189
+ const ret = Array.isArray(getObject(arg0));
1190
+ return ret;
1191
+ },
1192
+ __wbg_isSafeInteger_66acec27e09e99a7: function(arg0) {
1193
+ const ret = Number.isSafeInteger(getObject(arg0));
1194
+ return ret;
1195
+ },
1196
+ __wbg_iterator_8732428d309e270e: function() {
1197
+ const ret = Symbol.iterator;
1198
+ return addHeapObject(ret);
1199
+ },
1200
+ __wbg_length_4a591ecaa01354d9: function(arg0) {
1201
+ const ret = getObject(arg0).length;
1202
+ return ret;
1203
+ },
1204
+ __wbg_length_66f1a4b2e9026940: function(arg0) {
1205
+ const ret = getObject(arg0).length;
1206
+ return ret;
1207
+ },
1208
+ __wbg_message_40300ed2d1f8bdc6: function(arg0) {
1209
+ const ret = getObject(arg0).message;
1210
+ return addHeapObject(ret);
1211
+ },
1212
+ __wbg_new_0_445c13a750296eb6: function() {
1213
+ const ret = new Date();
1214
+ return addHeapObject(ret);
1215
+ },
1216
+ __wbg_new_227d7c05414eb861: function() {
1217
+ const ret = new Error();
1218
+ return addHeapObject(ret);
1219
+ },
1220
+ __wbg_new_50bb5ebeecef71a8: function(arg0, arg1) {
1221
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1222
+ return addHeapObject(ret);
1223
+ },
1224
+ __wbg_new_578aeef4b6b94378: function(arg0) {
1225
+ const ret = new Uint8Array(getObject(arg0));
1226
+ return addHeapObject(ret);
1227
+ },
1228
+ __wbg_new_622fc80556be2e26: function() {
1229
+ const ret = new Map();
1230
+ return addHeapObject(ret);
1231
+ },
1232
+ __wbg_new_b682b81e8eaaf027: function(arg0, arg1) {
1233
+ try {
1234
+ var state0 = {a: arg0, b: arg1};
1235
+ var cb0 = (arg0, arg1) => {
1236
+ const a = state0.a;
1237
+ state0.a = 0;
1238
+ try {
1239
+ return __wasm_bindgen_func_elem_105800(a, state0.b, arg0, arg1);
1240
+ } finally {
1241
+ state0.a = a;
1242
+ }
1243
+ };
1244
+ const ret = new Promise(cb0);
1245
+ return addHeapObject(ret);
1246
+ } finally {
1247
+ state0.a = 0;
1248
+ }
1249
+ },
1250
+ __wbg_new_ce1ab61c1c2b300d: function() {
1251
+ const ret = new Object();
1252
+ return addHeapObject(ret);
1253
+ },
1254
+ __wbg_new_d90091b82fdf5b91: function() {
1255
+ const ret = new Array();
1256
+ return addHeapObject(ret);
1257
+ },
1258
+ __wbg_new_from_slice_18fa1f71286d66b8: function(arg0, arg1) {
1259
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1260
+ return addHeapObject(ret);
1261
+ },
1262
+ __wbg_new_typed_bf31d18f92484486: function(arg0, arg1) {
1263
+ try {
1264
+ var state0 = {a: arg0, b: arg1};
1265
+ var cb0 = (arg0, arg1) => {
1266
+ const a = state0.a;
1267
+ state0.a = 0;
1268
+ try {
1269
+ return __wasm_bindgen_func_elem_105800(a, state0.b, arg0, arg1);
1270
+ } finally {
1271
+ state0.a = a;
1272
+ }
1273
+ };
1274
+ const ret = new Promise(cb0);
1275
+ return addHeapObject(ret);
1276
+ } finally {
1277
+ state0.a = 0;
1278
+ }
1279
+ },
1280
+ __wbg_nextPage_0f9d04d46afb4abb: function(arg0, arg1) {
1281
+ const ret = getObject(arg0).nextPage(arg1 >>> 0);
1282
+ return addHeapObject(ret);
1283
+ },
1284
+ __wbg_next_9e03acdf51c4960d: function(arg0) {
1285
+ const ret = getObject(arg0).next;
1286
+ return addHeapObject(ret);
1287
+ },
1288
+ __wbg_next_eb8ca7351fa27906: function() { return handleError(function (arg0) {
1289
+ const ret = getObject(arg0).next();
1290
+ return addHeapObject(ret);
1291
+ }, arguments); },
1292
+ __wbg_now_0cce8c6798af1870: function() { return handleError(function () {
1293
+ const ret = Date.now();
1294
+ return ret;
1295
+ }, arguments); },
1296
+ __wbg_now_190933fa139cc119: function() {
1297
+ const ret = Date.now();
1298
+ return ret;
1299
+ },
1300
+ __wbg_now_e7c6795a7f81e10f: function(arg0) {
1301
+ const ret = getObject(arg0).now();
1302
+ return ret;
1303
+ },
1304
+ __wbg_of_57145fdec12d159f: function(arg0) {
1305
+ const ret = Array.of(getObject(arg0));
1306
+ return addHeapObject(ret);
1307
+ },
1308
+ __wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
1309
+ const ret = getObject(arg0).performance;
1310
+ return addHeapObject(ret);
1311
+ },
1312
+ __wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
1313
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1314
+ },
1315
+ __wbg_push_a6822215aa43e71c: function(arg0, arg1) {
1316
+ const ret = getObject(arg0).push(getObject(arg1));
1317
+ return ret;
1318
+ },
1319
+ __wbg_putMany_ee434f7186403754: function(arg0, arg1, arg2) {
1320
+ const ret = getObject(arg0).putMany(takeObject(arg1), takeObject(arg2));
1321
+ return addHeapObject(ret);
1322
+ },
1323
+ __wbg_queueMicrotask_35c611f4a14830b2: function(arg0) {
1324
+ queueMicrotask(getObject(arg0));
1325
+ },
1326
+ __wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) {
1327
+ const ret = getObject(arg0).queueMicrotask;
1328
+ return addHeapObject(ret);
1329
+ },
1330
+ __wbg_ready_6d4eba7d7a164914: function() { return handleError(function (arg0) {
1331
+ const ret = getObject(arg0).ready;
1332
+ return addHeapObject(ret);
1333
+ }, arguments); },
1334
+ __wbg_replaceMany_3375b6d8b0c844b6: function(arg0, arg1, arg2) {
1335
+ const ret = getObject(arg0).replaceMany(takeObject(arg1), takeObject(arg2));
1336
+ return addHeapObject(ret);
1337
+ },
1338
+ __wbg_resolve_25a7e548d5881dca: function(arg0) {
1339
+ const ret = Promise.resolve(getObject(arg0));
1340
+ return addHeapObject(ret);
1341
+ },
1342
+ __wbg_rollback_4951ba72d8d65007: function(arg0) {
1343
+ const ret = getObject(arg0).rollback();
1344
+ return addHeapObject(ret);
1345
+ },
1346
+ __wbg_set_52b1e1eb5bed906a: function(arg0, arg1, arg2) {
1347
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1348
+ return addHeapObject(ret);
1349
+ },
1350
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1351
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1352
+ },
1353
+ __wbg_set_6e30c9374c26414c: function() { return handleError(function (arg0, arg1, arg2) {
1354
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1355
+ return ret;
1356
+ }, arguments); },
1357
+ __wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
1358
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1359
+ },
1360
+ __wbg_set_name_3c3fc49c8f747e56: function(arg0, arg1, arg2) {
1361
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1362
+ },
1363
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
1364
+ const ret = getObject(arg1).stack;
1365
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1366
+ const len1 = WASM_VECTOR_LEN;
1367
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1368
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1369
+ },
1370
+ __wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
1371
+ const ret = typeof global === 'undefined' ? null : global;
1372
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1373
+ },
1374
+ __wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
1375
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1376
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1377
+ },
1378
+ __wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
1379
+ const ret = typeof self === 'undefined' ? null : self;
1380
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1381
+ },
1382
+ __wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
1383
+ const ret = typeof window === 'undefined' ? null : window;
1384
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1385
+ },
1386
+ __wbg_stringify_8286df6dcc591521: function() { return handleError(function (arg0) {
1387
+ const ret = JSON.stringify(getObject(arg0));
1388
+ return addHeapObject(ret);
1389
+ }, arguments); },
1390
+ __wbg_then_18f476d590e58992: function(arg0, arg1, arg2) {
1391
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1392
+ return addHeapObject(ret);
1393
+ },
1394
+ __wbg_then_ac7b025999b52837: function(arg0, arg1) {
1395
+ const ret = getObject(arg0).then(getObject(arg1));
1396
+ return addHeapObject(ret);
1397
+ },
1398
+ __wbg_value_f3625092ee4b37f4: function(arg0) {
1399
+ const ret = getObject(arg0).value;
1400
+ return addHeapObject(ret);
1401
+ },
1402
+ __wbg_wasmlix_new: function(arg0) {
1403
+ const ret = WasmLix.__wrap(arg0);
1404
+ return addHeapObject(ret);
1405
+ },
1406
+ __wbg_wasmlixtransaction_new: function(arg0) {
1407
+ const ret = WasmLixTransaction.__wrap(arg0);
1408
+ return addHeapObject(ret);
1409
+ },
1410
+ __wbg_wasmobserveevents_new: function(arg0) {
1411
+ const ret = WasmObserveEvents.__wrap(arg0);
1412
+ return addHeapObject(ret);
1413
+ },
1414
+ __wbg_wasmremotelix_new: function(arg0) {
1415
+ const ret = WasmRemoteLix.__wrap(arg0);
1416
+ return addHeapObject(ret);
1417
+ },
1418
+ __wbg_wasmremotelixtransaction_new: function(arg0) {
1419
+ const ret = WasmRemoteLixTransaction.__wrap(arg0);
1420
+ return addHeapObject(ret);
1421
+ },
1422
+ __wbg_wasmremoteobserveevents_new: function(arg0) {
1423
+ const ret = WasmRemoteObserveEvents.__wrap(arg0);
1424
+ return addHeapObject(ret);
1425
+ },
1426
+ __wbg_watchForChanges_aadd2b8cd4d55844: function(arg0) {
1427
+ const ret = getObject(arg0).watchForChanges();
1428
+ return addHeapObject(ret);
1429
+ },
1430
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1431
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 22536, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1432
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_105798);
1433
+ return addHeapObject(ret);
1434
+ },
1435
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1436
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2510, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: true }) -> Externref`.
1437
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_26031);
1438
+ return addHeapObject(ret);
1439
+ },
1440
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1441
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2509, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1442
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_26030);
1443
+ return addHeapObject(ret);
1444
+ },
1445
+ __wbindgen_cast_0000000000000004: function(arg0) {
1446
+ // Cast intrinsic for `F64 -> Externref`.
1447
+ const ret = arg0;
1448
+ return addHeapObject(ret);
1449
+ },
1450
+ __wbindgen_cast_0000000000000005: function(arg0) {
1451
+ // Cast intrinsic for `I64 -> Externref`.
1452
+ const ret = arg0;
1453
+ return addHeapObject(ret);
1454
+ },
1455
+ __wbindgen_cast_0000000000000006: function(arg0, arg1) {
1456
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1457
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1458
+ return addHeapObject(ret);
1459
+ },
1460
+ __wbindgen_cast_0000000000000007: function(arg0, arg1) {
1461
+ // Cast intrinsic for `Ref(String) -> Externref`.
1462
+ const ret = getStringFromWasm0(arg0, arg1);
1463
+ return addHeapObject(ret);
1464
+ },
1465
+ __wbindgen_cast_0000000000000008: function(arg0) {
1466
+ // Cast intrinsic for `U64 -> Externref`.
1467
+ const ret = BigInt.asUintN(64, arg0);
1468
+ return addHeapObject(ret);
1469
+ },
1470
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
1471
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1472
+ wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
1473
+ // Cast intrinsic for `Vector(U8) -> Externref`.
1474
+ const ret = v0;
1475
+ return addHeapObject(ret);
1476
+ },
1477
+ __wbindgen_object_clone_ref: function(arg0) {
1478
+ const ret = getObject(arg0);
1479
+ return addHeapObject(ret);
1480
+ },
1481
+ __wbindgen_object_drop_ref: function(arg0) {
1482
+ takeObject(arg0);
1483
+ },
1484
+ };
1485
+ return {
1486
+ __proto__: null,
1487
+ "./lix_js_sdk_bg.js": import0,
1488
+ };
1489
+ }
1490
+
1491
+ function __wasm_bindgen_func_elem_26030(arg0, arg1) {
1492
+ wasm.__wasm_bindgen_func_elem_26030(arg0, arg1);
1493
+ }
1494
+
1495
+ function __wasm_bindgen_func_elem_26031(arg0, arg1, arg2) {
1496
+ const ret = wasm.__wasm_bindgen_func_elem_26031(arg0, arg1, addHeapObject(arg2));
1497
+ return takeObject(ret);
1498
+ }
1499
+
1500
+ function __wasm_bindgen_func_elem_105798(arg0, arg1, arg2) {
1501
+ try {
1502
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1503
+ wasm.__wasm_bindgen_func_elem_105798(retptr, arg0, arg1, addHeapObject(arg2));
1504
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1505
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1506
+ if (r1) {
1507
+ throw takeObject(r0);
1508
+ }
1509
+ } finally {
1510
+ wasm.__wbindgen_add_to_stack_pointer(16);
1511
+ }
1512
+ }
1513
+
1514
+ function __wasm_bindgen_func_elem_105800(arg0, arg1, arg2, arg3) {
1515
+ wasm.__wasm_bindgen_func_elem_105800(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1516
+ }
1517
+
1518
+ const BrowserComponentHostFinalization = (typeof FinalizationRegistry === 'undefined')
1519
+ ? { register: () => {}, unregister: () => {} }
1520
+ : new FinalizationRegistry(ptr => wasm.__wbg_browsercomponenthost_free(ptr, 1));
1521
+ const WasmLixFinalization = (typeof FinalizationRegistry === 'undefined')
1522
+ ? { register: () => {}, unregister: () => {} }
1523
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmlix_free(ptr, 1));
1524
+ const WasmLixTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1525
+ ? { register: () => {}, unregister: () => {} }
1526
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmlixtransaction_free(ptr, 1));
1527
+ const WasmObserveEventsFinalization = (typeof FinalizationRegistry === 'undefined')
1528
+ ? { register: () => {}, unregister: () => {} }
1529
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmobserveevents_free(ptr, 1));
1530
+ const WasmRemoteLixFinalization = (typeof FinalizationRegistry === 'undefined')
1531
+ ? { register: () => {}, unregister: () => {} }
1532
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmremotelix_free(ptr, 1));
1533
+ const WasmRemoteLixTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1534
+ ? { register: () => {}, unregister: () => {} }
1535
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmremotelixtransaction_free(ptr, 1));
1536
+ const WasmRemoteObserveEventsFinalization = (typeof FinalizationRegistry === 'undefined')
1537
+ ? { register: () => {}, unregister: () => {} }
1538
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmremoteobserveevents_free(ptr, 1));
1539
+ const WasmSnapshotExportFinalization = (typeof FinalizationRegistry === 'undefined')
1540
+ ? { register: () => {}, unregister: () => {} }
1541
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsnapshotexport_free(ptr, 1));
1542
+ const WasmSnapshotRestoreFinalization = (typeof FinalizationRegistry === 'undefined')
1543
+ ? { register: () => {}, unregister: () => {} }
1544
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsnapshotrestore_free(ptr, 1));
1545
+
1546
+ function addHeapObject(obj) {
1547
+ if (heap_next === heap.length) heap.push(heap.length + 1);
1548
+ const idx = heap_next;
1549
+ heap_next = heap[idx];
1550
+
1551
+ heap[idx] = obj;
1552
+ return idx;
1553
+ }
1554
+
1555
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1556
+ ? { register: () => {}, unregister: () => {} }
1557
+ : new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
1558
+
1559
+ function debugString(val) {
1560
+ // primitive types
1561
+ const type = typeof val;
1562
+ if (type == 'number' || type == 'boolean' || val == null) {
1563
+ return `${val}`;
1564
+ }
1565
+ if (type == 'string') {
1566
+ return `"${val}"`;
1567
+ }
1568
+ if (type == 'symbol') {
1569
+ const description = val.description;
1570
+ if (description == null) {
1571
+ return 'Symbol';
1572
+ } else {
1573
+ return `Symbol(${description})`;
1574
+ }
1575
+ }
1576
+ if (type == 'function') {
1577
+ const name = val.name;
1578
+ if (typeof name == 'string' && name.length > 0) {
1579
+ return `Function(${name})`;
1580
+ } else {
1581
+ return 'Function';
1582
+ }
1583
+ }
1584
+ // objects
1585
+ if (Array.isArray(val)) {
1586
+ const length = val.length;
1587
+ let debug = '[';
1588
+ if (length > 0) {
1589
+ debug += debugString(val[0]);
1590
+ }
1591
+ for(let i = 1; i < length; i++) {
1592
+ debug += ', ' + debugString(val[i]);
1593
+ }
1594
+ debug += ']';
1595
+ return debug;
1596
+ }
1597
+ // Test for built-in
1598
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1599
+ let className;
1600
+ if (builtInMatches && builtInMatches.length > 1) {
1601
+ className = builtInMatches[1];
1602
+ } else {
1603
+ // Failed to match the standard '[object ClassName]'
1604
+ return toString.call(val);
1605
+ }
1606
+ if (className == 'Object') {
1607
+ // we're a user defined class or Object
1608
+ // JSON.stringify avoids problems with cycles, and is generally much
1609
+ // easier than looping through ownProperties of `val`.
1610
+ try {
1611
+ return 'Object(' + JSON.stringify(val) + ')';
1612
+ } catch (_) {
1613
+ return 'Object';
1614
+ }
1615
+ }
1616
+ // errors
1617
+ if (val instanceof Error) {
1618
+ return `${val.name}: ${val.message}\n${val.stack}`;
1619
+ }
1620
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1621
+ return className;
1622
+ }
1623
+
1624
+ function dropObject(idx) {
1625
+ if (idx < 1028) return;
1626
+ heap[idx] = heap_next;
1627
+ heap_next = idx;
1628
+ }
1629
+
1630
+ function getArrayU8FromWasm0(ptr, len) {
1631
+ ptr = ptr >>> 0;
1632
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1633
+ }
1634
+
1635
+ let cachedDataViewMemory0 = null;
1636
+ function getDataViewMemory0() {
1637
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1638
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1639
+ }
1640
+ return cachedDataViewMemory0;
1641
+ }
1642
+
1643
+ function getStringFromWasm0(ptr, len) {
1644
+ return decodeText(ptr >>> 0, len);
1645
+ }
1646
+
1647
+ let cachedUint8ArrayMemory0 = null;
1648
+ function getUint8ArrayMemory0() {
1649
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1650
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1651
+ }
1652
+ return cachedUint8ArrayMemory0;
1653
+ }
1654
+
1655
+ function getObject(idx) { return heap[idx]; }
1656
+
1657
+ function handleError(f, args) {
1658
+ try {
1659
+ return f.apply(this, args);
1660
+ } catch (e) {
1661
+ wasm.__wbindgen_export3(addHeapObject(e));
1662
+ }
1663
+ }
1664
+
1665
+ let heap = new Array(1024).fill(undefined);
1666
+ heap.push(undefined, null, true, false);
1667
+
1668
+ let heap_next = heap.length;
1669
+
1670
+ function isLikeNone(x) {
1671
+ return x === undefined || x === null;
1672
+ }
1673
+
1674
+ function makeMutClosure(arg0, arg1, f) {
1675
+ const state = { a: arg0, b: arg1, cnt: 1 };
1676
+ const real = (...args) => {
1677
+
1678
+ // First up with a closure we increment the internal reference
1679
+ // count. This ensures that the Rust closure environment won't
1680
+ // be deallocated while we're invoking it.
1681
+ state.cnt++;
1682
+ const a = state.a;
1683
+ state.a = 0;
1684
+ try {
1685
+ return f(a, state.b, ...args);
1686
+ } finally {
1687
+ state.a = a;
1688
+ real._wbg_cb_unref();
1689
+ }
1690
+ };
1691
+ real._wbg_cb_unref = () => {
1692
+ if (--state.cnt === 0) {
1693
+ wasm.__wbindgen_export5(state.a, state.b);
1694
+ state.a = 0;
1695
+ CLOSURE_DTORS.unregister(state);
1696
+ }
1697
+ };
1698
+ CLOSURE_DTORS.register(real, state, state);
1699
+ return real;
1700
+ }
1701
+
1702
+ function passArray8ToWasm0(arg, malloc) {
1703
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
1704
+ getUint8ArrayMemory0().set(arg, ptr / 1);
1705
+ WASM_VECTOR_LEN = arg.length;
1706
+ return ptr;
1707
+ }
1708
+
1709
+ function passStringToWasm0(arg, malloc, realloc) {
1710
+ if (realloc === undefined) {
1711
+ const buf = cachedTextEncoder.encode(arg);
1712
+ const ptr = malloc(buf.length, 1) >>> 0;
1713
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1714
+ WASM_VECTOR_LEN = buf.length;
1715
+ return ptr;
1716
+ }
1717
+
1718
+ let len = arg.length;
1719
+ let ptr = malloc(len, 1) >>> 0;
1720
+
1721
+ const mem = getUint8ArrayMemory0();
1722
+
1723
+ let offset = 0;
1724
+
1725
+ for (; offset < len; offset++) {
1726
+ const code = arg.charCodeAt(offset);
1727
+ if (code > 0x7F) break;
1728
+ mem[ptr + offset] = code;
1729
+ }
1730
+ if (offset !== len) {
1731
+ if (offset !== 0) {
1732
+ arg = arg.slice(offset);
1733
+ }
1734
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1735
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1736
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1737
+
1738
+ offset += ret.written;
1739
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1740
+ }
1741
+
1742
+ WASM_VECTOR_LEN = offset;
1743
+ return ptr;
1744
+ }
1745
+
1746
+ function takeObject(idx) {
1747
+ const ret = getObject(idx);
1748
+ dropObject(idx);
1749
+ return ret;
1750
+ }
1751
+
1752
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1753
+ cachedTextDecoder.decode();
1754
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1755
+ let numBytesDecoded = 0;
1756
+ function decodeText(ptr, len) {
1757
+ numBytesDecoded += len;
1758
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1759
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1760
+ cachedTextDecoder.decode();
1761
+ numBytesDecoded = len;
1762
+ }
1763
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1764
+ }
1765
+
1766
+ const cachedTextEncoder = new TextEncoder();
1767
+
1768
+ if (!('encodeInto' in cachedTextEncoder)) {
1769
+ cachedTextEncoder.encodeInto = function (arg, view) {
1770
+ const buf = cachedTextEncoder.encode(arg);
1771
+ view.set(buf);
1772
+ return {
1773
+ read: arg.length,
1774
+ written: buf.length
1775
+ };
1776
+ };
1777
+ }
1778
+
1779
+ let WASM_VECTOR_LEN = 0;
1780
+
1781
+ let wasmModule, wasmInstance, wasm;
1782
+ function __wbg_finalize_init(instance, module) {
1783
+ wasmInstance = instance;
1784
+ wasm = instance.exports;
1785
+ wasmModule = module;
1786
+ cachedDataViewMemory0 = null;
1787
+ cachedUint8ArrayMemory0 = null;
1788
+ return wasm;
1789
+ }
1790
+
1791
+ async function __wbg_load(module, imports) {
1792
+ if (typeof Response === 'function' && module instanceof Response) {
1793
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1794
+ try {
1795
+ return await WebAssembly.instantiateStreaming(module, imports);
1796
+ } catch (e) {
1797
+ const validResponse = module.ok && expectedResponseType(module.type);
1798
+
1799
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1800
+ 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);
1801
+
1802
+ } else { throw e; }
1803
+ }
1804
+ }
1805
+
1806
+ const bytes = await module.arrayBuffer();
1807
+ return await WebAssembly.instantiate(bytes, imports);
1808
+ } else {
1809
+ const instance = await WebAssembly.instantiate(module, imports);
1810
+
1811
+ if (instance instanceof WebAssembly.Instance) {
1812
+ return { instance, module };
1813
+ } else {
1814
+ return instance;
1815
+ }
1816
+ }
1817
+
1818
+ function expectedResponseType(type) {
1819
+ switch (type) {
1820
+ case 'basic': case 'cors': case 'default': return true;
1821
+ }
1822
+ return false;
1823
+ }
1824
+ }
1825
+
1826
+ async function __wbg_init(module_or_path) {
1827
+ if (wasm !== undefined) return wasm;
1828
+
1829
+
1830
+ if (module_or_path !== undefined) {
1831
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1832
+ ({module_or_path} = module_or_path)
1833
+ } else {
1834
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1835
+ }
1836
+ }
1837
+
1838
+ if (module_or_path === undefined) {
1839
+ module_or_path = new URL('lix_js_sdk_bg.wasm', import.meta.url);
1840
+ }
1841
+ const imports = __wbg_get_imports();
1842
+
1843
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1844
+ module_or_path = fetch(module_or_path);
1845
+ }
1846
+
1847
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1848
+
1849
+ return __wbg_finalize_init(instance, module);
1850
+ }
1851
+
1852
+ export { __wbg_init as default };