@rivetkit/rivetkit-wasm 0.0.0-sqlite-sync-3x-release.a00b07f → 0.0.0-sqlite-query-metrics-v2.f5d3605

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.
@@ -1,227 +1,412 @@
1
- /* @ts-self-types="./rivetkit_wasm.d.ts" */
1
+ let wasm;
2
2
 
3
- export class ActorContext {
4
- static __wrap(ptr) {
5
- const obj = Object.create(ActorContext.prototype);
6
- obj.__wbg_ptr = ptr;
7
- ActorContextFinalization.register(obj, obj.__wbg_ptr, obj);
8
- return obj;
3
+ let WASM_VECTOR_LEN = 0;
4
+
5
+ let cachedUint8ArrayMemory0 = null;
6
+
7
+ function getUint8ArrayMemory0() {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
9
10
  }
10
- __destroy_into_raw() {
11
- const ptr = this.__wbg_ptr;
12
- this.__wbg_ptr = 0;
13
- ActorContextFinalization.unregister(this);
11
+ return cachedUint8ArrayMemory0;
12
+ }
13
+
14
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
15
+
16
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
17
+ ? function (arg, view) {
18
+ return cachedTextEncoder.encodeInto(arg, view);
19
+ }
20
+ : function (arg, view) {
21
+ const buf = cachedTextEncoder.encode(arg);
22
+ view.set(buf);
23
+ return {
24
+ read: arg.length,
25
+ written: buf.length
26
+ };
27
+ });
28
+
29
+ function passStringToWasm0(arg, malloc, realloc) {
30
+
31
+ if (realloc === undefined) {
32
+ const buf = cachedTextEncoder.encode(arg);
33
+ const ptr = malloc(buf.length, 1) >>> 0;
34
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
35
+ WASM_VECTOR_LEN = buf.length;
14
36
  return ptr;
15
37
  }
16
- free() {
17
- const ptr = this.__destroy_into_raw();
18
- wasm.__wbg_actorcontext_free(ptr, 0);
38
+
39
+ let len = arg.length;
40
+ let ptr = malloc(len, 1) >>> 0;
41
+
42
+ const mem = getUint8ArrayMemory0();
43
+
44
+ let offset = 0;
45
+
46
+ for (; offset < len; offset++) {
47
+ const code = arg.charCodeAt(offset);
48
+ if (code > 0x7F) break;
49
+ mem[ptr + offset] = code;
19
50
  }
20
- /**
21
- * @returns {any}
22
- */
23
- abortSignal() {
24
- const ret = wasm.actorcontext_abortSignal(this.__wbg_ptr);
25
- if (ret[2]) {
26
- throw takeFromExternrefTable0(ret[1]);
51
+
52
+ if (offset !== len) {
53
+ if (offset !== 0) {
54
+ arg = arg.slice(offset);
27
55
  }
28
- return takeFromExternrefTable0(ret[0]);
56
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
57
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
58
+ const ret = encodeString(arg, view);
59
+
60
+ offset += ret.written;
61
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
29
62
  }
30
- /**
31
- * @returns {string}
32
- */
33
- actorId() {
34
- let deferred1_0;
35
- let deferred1_1;
63
+
64
+ WASM_VECTOR_LEN = offset;
65
+ return ptr;
66
+ }
67
+
68
+ let cachedDataViewMemory0 = null;
69
+
70
+ function getDataViewMemory0() {
71
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
72
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
73
+ }
74
+ return cachedDataViewMemory0;
75
+ }
76
+
77
+ function addToExternrefTable0(obj) {
78
+ const idx = wasm.__externref_table_alloc();
79
+ wasm.__wbindgen_export_4.set(idx, obj);
80
+ return idx;
81
+ }
82
+
83
+ function handleError(f, args) {
84
+ try {
85
+ return f.apply(this, args);
86
+ } catch (e) {
87
+ const idx = addToExternrefTable0(e);
88
+ wasm.__wbindgen_exn_store(idx);
89
+ }
90
+ }
91
+
92
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
93
+
94
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
95
+
96
+ function getStringFromWasm0(ptr, len) {
97
+ ptr = ptr >>> 0;
98
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
99
+ }
100
+
101
+ function getArrayU8FromWasm0(ptr, len) {
102
+ ptr = ptr >>> 0;
103
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
104
+ }
105
+
106
+ function isLikeNone(x) {
107
+ return x === undefined || x === null;
108
+ }
109
+
110
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
111
+ ? { register: () => {}, unregister: () => {} }
112
+ : new FinalizationRegistry(state => {
113
+ wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b)
114
+ });
115
+
116
+ function makeMutClosure(arg0, arg1, dtor, f) {
117
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
118
+ const real = (...args) => {
119
+ // First up with a closure we increment the internal reference
120
+ // count. This ensures that the Rust closure environment won't
121
+ // be deallocated while we're invoking it.
122
+ state.cnt++;
123
+ const a = state.a;
124
+ state.a = 0;
36
125
  try {
37
- const ret = wasm.actorcontext_actorId(this.__wbg_ptr);
38
- deferred1_0 = ret[0];
39
- deferred1_1 = ret[1];
40
- return getStringFromWasm0(ret[0], ret[1]);
126
+ return f(a, state.b, ...args);
41
127
  } finally {
42
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
128
+ if (--state.cnt === 0) {
129
+ wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
130
+ CLOSURE_DTORS.unregister(state);
131
+ } else {
132
+ state.a = a;
133
+ }
43
134
  }
135
+ };
136
+ real.original = state;
137
+ CLOSURE_DTORS.register(real, state, state);
138
+ return real;
139
+ }
140
+
141
+ function debugString(val) {
142
+ // primitive types
143
+ const type = typeof val;
144
+ if (type == 'number' || type == 'boolean' || val == null) {
145
+ return `${val}`;
44
146
  }
45
- /**
46
- * @returns {number}
47
- */
48
- beginKeepAwake() {
49
- const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
50
- return ret >>> 0;
51
- }
52
- beginOnStateChange() {
53
- wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
54
- }
55
- /**
56
- * @param {number | null} [timeout_ms]
57
- * @returns {Promise<ActorStateTransaction>}
58
- */
59
- beginStateTransaction(timeout_ms) {
60
- const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
61
- return ret;
62
- }
63
- /**
64
- * @returns {number}
65
- */
66
- beginWebsocketCallback() {
67
- const ret = wasm.actorcontext_beginWebsocketCallback(this.__wbg_ptr);
68
- return ret >>> 0;
69
- }
70
- /**
71
- * @param {string} name
72
- * @param {Uint8Array} args
73
- */
74
- broadcast(name, args) {
75
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
76
- const len0 = WASM_VECTOR_LEN;
77
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
78
- const len1 = WASM_VECTOR_LEN;
79
- wasm.actorcontext_broadcast(this.__wbg_ptr, ptr0, len0, ptr1, len1);
147
+ if (type == 'string') {
148
+ return `"${val}"`;
80
149
  }
81
- /**
82
- * @param {Uint8Array} params
83
- * @param {any} request
84
- * @returns {Promise<ConnHandle>}
85
- */
86
- connectConn(params, request) {
87
- const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
88
- const len0 = WASM_VECTOR_LEN;
89
- const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
90
- return ret;
150
+ if (type == 'symbol') {
151
+ const description = val.description;
152
+ if (description == null) {
153
+ return 'Symbol';
154
+ } else {
155
+ return `Symbol(${description})`;
156
+ }
91
157
  }
92
- /**
93
- * @returns {Array<any>}
94
- */
95
- conns() {
96
- const ret = wasm.actorcontext_conns(this.__wbg_ptr);
97
- return ret;
158
+ if (type == 'function') {
159
+ const name = val.name;
160
+ if (typeof name == 'string' && name.length > 0) {
161
+ return `Function(${name})`;
162
+ } else {
163
+ return 'Function';
164
+ }
98
165
  }
99
- destroy() {
100
- const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
101
- if (ret[1]) {
102
- throw takeFromExternrefTable0(ret[0]);
166
+ // objects
167
+ if (Array.isArray(val)) {
168
+ const length = val.length;
169
+ let debug = '[';
170
+ if (length > 0) {
171
+ debug += debugString(val[0]);
172
+ }
173
+ for(let i = 1; i < length; i++) {
174
+ debug += ', ' + debugString(val[i]);
103
175
  }
176
+ debug += ']';
177
+ return debug;
104
178
  }
105
- /**
106
- * @returns {Array<any>}
107
- */
108
- dirtyHibernatableConns() {
109
- const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
110
- return ret;
179
+ // Test for built-in
180
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
181
+ let className;
182
+ if (builtInMatches && builtInMatches.length > 1) {
183
+ className = builtInMatches[1];
184
+ } else {
185
+ // Failed to match the standard '[object ClassName]'
186
+ return toString.call(val);
111
187
  }
112
- /**
113
- * @param {number} region_id
114
- */
115
- endKeepAwake(region_id) {
116
- wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
188
+ if (className == 'Object') {
189
+ // we're a user defined class or Object
190
+ // JSON.stringify avoids problems with cycles, and is generally much
191
+ // easier than looping through ownProperties of `val`.
192
+ try {
193
+ return 'Object(' + JSON.stringify(val) + ')';
194
+ } catch (_) {
195
+ return 'Object';
196
+ }
117
197
  }
118
- endOnStateChange() {
119
- wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
198
+ // errors
199
+ if (val instanceof Error) {
200
+ return `${val.name}: ${val.message}\n${val.stack}`;
201
+ }
202
+ // TODO we could test for more things here, like `Set`s and `Map`s.
203
+ return className;
204
+ }
205
+
206
+ function passArray8ToWasm0(arg, malloc) {
207
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
208
+ getUint8ArrayMemory0().set(arg, ptr / 1);
209
+ WASM_VECTOR_LEN = arg.length;
210
+ return ptr;
211
+ }
212
+
213
+ function takeFromExternrefTable0(idx) {
214
+ const value = wasm.__wbindgen_export_4.get(idx);
215
+ wasm.__externref_table_dealloc(idx);
216
+ return value;
217
+ }
218
+
219
+ function _assertClass(instance, klass) {
220
+ if (!(instance instanceof klass)) {
221
+ throw new Error(`expected instance of ${klass.name}`);
222
+ }
223
+ }
224
+
225
+ export function start() {
226
+ wasm.start();
227
+ }
228
+
229
+ /**
230
+ * @param {Uint8Array} bytes
231
+ * @returns {Uint8Array}
232
+ */
233
+ export function roundTripBytes(bytes) {
234
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
235
+ const len0 = WASM_VECTOR_LEN;
236
+ const ret = wasm.roundTripBytes(ptr0, len0);
237
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
238
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
239
+ return v2;
240
+ }
241
+
242
+ /**
243
+ * @returns {string}
244
+ */
245
+ export function bridgeRivetErrorPrefix() {
246
+ let deferred1_0;
247
+ let deferred1_1;
248
+ try {
249
+ const ret = wasm.bridgeRivetErrorPrefix();
250
+ deferred1_0 = ret[0];
251
+ deferred1_1 = ret[1];
252
+ return getStringFromWasm0(ret[0], ret[1]);
253
+ } finally {
254
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
255
+ }
256
+ }
257
+
258
+ /**
259
+ * @param {Promise<any>} promise
260
+ * @returns {Promise<any>}
261
+ */
262
+ export function awaitPromise(promise) {
263
+ const ret = wasm.awaitPromise(promise);
264
+ return ret;
265
+ }
266
+
267
+ /**
268
+ * @param {Uint8Array} bytes
269
+ * @returns {Uint8Array}
270
+ */
271
+ export function uint8ArrayFromBytes(bytes) {
272
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
273
+ const len0 = WASM_VECTOR_LEN;
274
+ const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
275
+ return ret;
276
+ }
277
+
278
+ function __wbg_adapter_50(arg0, arg1, arg2) {
279
+ wasm.closure1976_externref_shim(arg0, arg1, arg2);
280
+ }
281
+
282
+ function __wbg_adapter_59(arg0, arg1, arg2) {
283
+ wasm.closure2335_externref_shim(arg0, arg1, arg2);
284
+ }
285
+
286
+ function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
287
+ wasm.closure2572_externref_shim(arg0, arg1, arg2, arg3);
288
+ }
289
+
290
+ const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
291
+
292
+ const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
293
+ ? { register: () => {}, unregister: () => {} }
294
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr >>> 0, 1));
295
+
296
+ export class ActorContext {
297
+
298
+ static __wrap(ptr) {
299
+ ptr = ptr >>> 0;
300
+ const obj = Object.create(ActorContext.prototype);
301
+ obj.__wbg_ptr = ptr;
302
+ ActorContextFinalization.register(obj, obj.__wbg_ptr, obj);
303
+ return obj;
304
+ }
305
+
306
+ __destroy_into_raw() {
307
+ const ptr = this.__wbg_ptr;
308
+ this.__wbg_ptr = 0;
309
+ ActorContextFinalization.unregister(this);
310
+ return ptr;
311
+ }
312
+
313
+ free() {
314
+ const ptr = this.__destroy_into_raw();
315
+ wasm.__wbg_actorcontext_free(ptr, 0);
120
316
  }
121
317
  /**
122
- * @param {number} region_id
318
+ * @param {Promise<any>} promise
123
319
  */
124
- endWebsocketCallback(region_id) {
125
- wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
320
+ keepAwake(promise) {
321
+ wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
126
322
  }
127
323
  /**
128
- * @returns {object}
324
+ * @param {any} payload
325
+ * @returns {Promise<void>}
129
326
  */
130
- inspectorSnapshot() {
131
- const ret = wasm.actorcontext_inspectorSnapshot(this.__wbg_ptr);
132
- if (ret[2]) {
133
- throw takeFromExternrefTable0(ret[1]);
134
- }
135
- return takeFromExternrefTable0(ret[0]);
327
+ saveState(payload) {
328
+ const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
329
+ return ret;
136
330
  }
137
331
  /**
138
332
  * @param {Promise<any>} promise
139
333
  */
140
- keepAwake(promise) {
141
- wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
334
+ waitUntil(promise) {
335
+ wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
142
336
  }
143
337
  /**
144
338
  * @returns {any}
145
339
  */
146
- key() {
147
- const ret = wasm.actorcontext_key(this.__wbg_ptr);
340
+ abortSignal() {
341
+ const ret = wasm.actorcontext_abortSignal(this.__wbg_ptr);
148
342
  if (ret[2]) {
149
343
  throw takeFromExternrefTable0(ret[1]);
150
344
  }
151
345
  return takeFromExternrefTable0(ret[0]);
152
346
  }
153
347
  /**
154
- * @returns {Kv}
348
+ * @param {Uint8Array} params
349
+ * @param {any} request
350
+ * @returns {Promise<ConnHandle>}
155
351
  */
156
- kv() {
157
- const ret = wasm.actorcontext_kv(this.__wbg_ptr);
158
- return Kv.__wrap(ret);
352
+ connectConn(params, request) {
353
+ const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
354
+ const len0 = WASM_VECTOR_LEN;
355
+ const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
356
+ return ret;
159
357
  }
160
358
  /**
161
- * @returns {string}
359
+ * @param {any} opts
162
360
  */
163
- name() {
164
- let deferred1_0;
165
- let deferred1_1;
166
- try {
167
- const ret = wasm.actorcontext_name(this.__wbg_ptr);
168
- deferred1_0 = ret[0];
169
- deferred1_1 = ret[1];
170
- return getStringFromWasm0(ret[0], ret[1]);
171
- } finally {
172
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
173
- }
174
- }
175
- constructor() {
176
- const ret = wasm.actorcontext_new();
177
- if (ret[2]) {
178
- throw takeFromExternrefTable0(ret[1]);
179
- }
180
- this.__wbg_ptr = ret[0];
181
- ActorContextFinalization.register(this, this.__wbg_ptr, this);
182
- return this;
361
+ requestSave(opts) {
362
+ wasm.actorcontext_requestSave(this.__wbg_ptr, opts);
183
363
  }
184
364
  /**
185
- * @returns {Queue}
365
+ * @param {Promise<any>} promise
186
366
  */
187
- queue() {
188
- const ret = wasm.actorcontext_queue(this.__wbg_ptr);
189
- return Queue.__wrap(ret);
367
+ registerTask(promise) {
368
+ wasm.actorcontext_registerTask(this.__wbg_ptr, promise);
190
369
  }
191
370
  /**
192
- * @returns {string}
371
+ * @returns {any}
193
372
  */
194
- region() {
195
- let deferred1_0;
196
- let deferred1_1;
197
- try {
198
- const ret = wasm.actorcontext_region(this.__wbg_ptr);
199
- deferred1_0 = ret[0];
200
- deferred1_1 = ret[1];
201
- return getStringFromWasm0(ret[0], ret[1]);
202
- } finally {
203
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
204
- }
373
+ runtimeState() {
374
+ const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
375
+ return ret;
205
376
  }
206
377
  /**
207
- * @param {Promise<any>} promise
378
+ * @param {number} region_id
208
379
  */
209
- registerTask(promise) {
210
- wasm.actorcontext_registerTask(this.__wbg_ptr, promise);
380
+ endKeepAwake(region_id) {
381
+ wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
211
382
  }
212
383
  /**
213
- * @param {any} opts
384
+ * @param {number | null} [timestamp_ms]
214
385
  * @returns {Promise<void>}
215
386
  */
216
- requestSaveAndWait(opts) {
217
- const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
387
+ setRunWakeAt(timestamp_ms) {
388
+ const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
218
389
  return ret;
219
390
  }
220
391
  /**
221
- * @param {any} opts
392
+ * @returns {number}
222
393
  */
223
- requestSave(opts) {
224
- wasm.actorcontext_requestSave(this.__wbg_ptr, opts);
394
+ beginKeepAwake() {
395
+ const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
396
+ return ret >>> 0;
397
+ }
398
+ /**
399
+ * @returns {object}
400
+ */
401
+ inspectorSnapshot() {
402
+ const ret = wasm.actorcontext_inspectorSnapshot(this.__wbg_ptr);
403
+ if (ret[2]) {
404
+ throw takeFromExternrefTable0(ret[1]);
405
+ }
406
+ return takeFromExternrefTable0(ret[0]);
407
+ }
408
+ endOnStateChange() {
409
+ wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
225
410
  }
226
411
  restartRunHandler() {
227
412
  const ret = wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
@@ -229,58 +414,102 @@ export class ActorContext {
229
414
  throw takeFromExternrefTable0(ret[0]);
230
415
  }
231
416
  }
232
- /**
233
- * @returns {any}
234
- */
235
- runtimeState() {
236
- const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
237
- return ret;
417
+ beginOnStateChange() {
418
+ wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
238
419
  }
239
420
  /**
240
- * @param {any} writes
421
+ * @param {any} opts
241
422
  * @returns {Promise<void>}
242
423
  */
243
- saveStateAndWorkflowBatch(writes) {
244
- const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
424
+ requestSaveAndWait(opts) {
425
+ const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
245
426
  return ret;
246
427
  }
247
428
  /**
248
- * @param {any} payload
429
+ * @param {string | null} [bearer_token]
249
430
  * @returns {Promise<void>}
250
431
  */
251
- saveState(payload) {
252
- const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
432
+ verifyInspectorAuth(bearer_token) {
433
+ var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
434
+ var len0 = WASM_VECTOR_LEN;
435
+ const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
253
436
  return ret;
254
437
  }
255
438
  /**
256
- * @returns {Schedule}
439
+ * @param {number} region_id
257
440
  */
258
- schedule() {
259
- const ret = wasm.actorcontext_schedule(this.__wbg_ptr);
260
- return Schedule.__wrap(ret);
441
+ endWebsocketCallback(region_id) {
442
+ wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
261
443
  }
262
444
  /**
263
- * @param {number | null} [timestamp_ms]
445
+ * @param {number | null} [timeout_ms]
446
+ * @returns {Promise<ActorStateTransaction>}
264
447
  */
265
- setAlarm(timestamp_ms) {
266
- const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
267
- if (ret[1]) {
268
- throw takeFromExternrefTable0(ret[0]);
269
- }
448
+ beginStateTransaction(timeout_ms) {
449
+ const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
450
+ return ret;
270
451
  }
271
452
  /**
272
- * @param {number | null} [timestamp_ms]
453
+ * @returns {number}
454
+ */
455
+ beginWebsocketCallback() {
456
+ const ret = wasm.actorcontext_beginWebsocketCallback(this.__wbg_ptr);
457
+ return ret >>> 0;
458
+ }
459
+ /**
460
+ * @returns {Array<any>}
461
+ */
462
+ dirtyHibernatableConns() {
463
+ const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
464
+ return ret;
465
+ }
466
+ /**
467
+ * @param {any} writes
273
468
  * @returns {Promise<void>}
274
469
  */
275
- setRunWakeAt(timestamp_ms) {
276
- const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
470
+ saveStateAndWorkflowBatch(writes) {
471
+ const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
277
472
  return ret;
278
473
  }
279
- sleep() {
280
- const ret = wasm.actorcontext_sleep(this.__wbg_ptr);
281
- if (ret[1]) {
282
- throw takeFromExternrefTable0(ret[0]);
474
+ /**
475
+ * @returns {Kv}
476
+ */
477
+ kv() {
478
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
479
+ return Kv.__wrap(ret);
480
+ }
481
+ /**
482
+ * @returns {Promise<boolean>}
483
+ */
484
+ waitForTrackedShutdownWork() {
485
+ const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
486
+ return ret;
487
+ }
488
+ /**
489
+ * @returns {Array<any>}
490
+ */
491
+ takePendingHibernationChanges() {
492
+ const ret = wasm.actorcontext_takePendingHibernationChanges(this.__wbg_ptr);
493
+ return ret;
494
+ }
495
+ /**
496
+ * @returns {any}
497
+ */
498
+ key() {
499
+ const ret = wasm.actorcontext_key(this.__wbg_ptr);
500
+ if (ret[2]) {
501
+ throw takeFromExternrefTable0(ret[1]);
283
502
  }
503
+ return takeFromExternrefTable0(ret[0]);
504
+ }
505
+ constructor() {
506
+ const ret = wasm.actorcontext_new();
507
+ if (ret[2]) {
508
+ throw takeFromExternrefTable0(ret[1]);
509
+ }
510
+ this.__wbg_ptr = ret[0] >>> 0;
511
+ ActorContextFinalization.register(this, this.__wbg_ptr, this);
512
+ return this;
284
513
  }
285
514
  /**
286
515
  * @returns {SqliteDb}
@@ -289,6 +518,48 @@ export class ActorContext {
289
518
  const ret = wasm.actorcontext_sql(this.__wbg_ptr);
290
519
  return SqliteDb.__wrap(ret);
291
520
  }
521
+ /**
522
+ * @returns {Promise<void>}
523
+ */
524
+ waitForTrackedShutdownWorkUnbounded() {
525
+ const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
526
+ return ret;
527
+ }
528
+ /**
529
+ * @returns {string}
530
+ */
531
+ name() {
532
+ let deferred1_0;
533
+ let deferred1_1;
534
+ try {
535
+ const ret = wasm.actorcontext_name(this.__wbg_ptr);
536
+ deferred1_0 = ret[0];
537
+ deferred1_1 = ret[1];
538
+ return getStringFromWasm0(ret[0], ret[1]);
539
+ } finally {
540
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
541
+ }
542
+ }
543
+ /**
544
+ * @returns {Array<any>}
545
+ */
546
+ conns() {
547
+ const ret = wasm.actorcontext_conns(this.__wbg_ptr);
548
+ return ret;
549
+ }
550
+ /**
551
+ * @returns {Queue}
552
+ */
553
+ queue() {
554
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
555
+ return Queue.__wrap(ret);
556
+ }
557
+ sleep() {
558
+ const ret = wasm.actorcontext_sleep(this.__wbg_ptr);
559
+ if (ret[1]) {
560
+ throw takeFromExternrefTable0(ret[0]);
561
+ }
562
+ }
292
563
  /**
293
564
  * @returns {Uint8Array}
294
565
  */
@@ -299,52 +570,83 @@ export class ActorContext {
299
570
  return v1;
300
571
  }
301
572
  /**
302
- * @returns {Array<any>}
573
+ * @returns {string}
303
574
  */
304
- takePendingHibernationChanges() {
305
- const ret = wasm.actorcontext_takePendingHibernationChanges(this.__wbg_ptr);
306
- return ret;
575
+ region() {
576
+ let deferred1_0;
577
+ let deferred1_1;
578
+ try {
579
+ const ret = wasm.actorcontext_region(this.__wbg_ptr);
580
+ deferred1_0 = ret[0];
581
+ deferred1_1 = ret[1];
582
+ return getStringFromWasm0(ret[0], ret[1]);
583
+ } finally {
584
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
585
+ }
586
+ }
587
+ destroy() {
588
+ const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
589
+ if (ret[1]) {
590
+ throw takeFromExternrefTable0(ret[0]);
591
+ }
307
592
  }
308
593
  /**
309
- * @param {string | null} [bearer_token]
310
- * @returns {Promise<void>}
594
+ * @returns {string}
311
595
  */
312
- verifyInspectorAuth(bearer_token) {
313
- var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
314
- var len0 = WASM_VECTOR_LEN;
315
- const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
316
- return ret;
596
+ actorId() {
597
+ let deferred1_0;
598
+ let deferred1_1;
599
+ try {
600
+ const ret = wasm.actorcontext_actorId(this.__wbg_ptr);
601
+ deferred1_0 = ret[0];
602
+ deferred1_1 = ret[1];
603
+ return getStringFromWasm0(ret[0], ret[1]);
604
+ } finally {
605
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
606
+ }
317
607
  }
318
608
  /**
319
- * @returns {Promise<void>}
609
+ * @returns {Schedule}
320
610
  */
321
- waitForTrackedShutdownWorkUnbounded() {
322
- const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
323
- return ret;
611
+ schedule() {
612
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
613
+ return Schedule.__wrap(ret);
324
614
  }
325
615
  /**
326
- * @returns {Promise<boolean>}
616
+ * @param {string} name
617
+ * @param {Uint8Array} args
327
618
  */
328
- waitForTrackedShutdownWork() {
329
- const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
330
- return ret;
619
+ broadcast(name, args) {
620
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
621
+ const len0 = WASM_VECTOR_LEN;
622
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
623
+ const len1 = WASM_VECTOR_LEN;
624
+ wasm.actorcontext_broadcast(this.__wbg_ptr, ptr0, len0, ptr1, len1);
331
625
  }
332
626
  /**
333
- * @param {Promise<any>} promise
627
+ * @param {number | null} [timestamp_ms]
334
628
  */
335
- waitUntil(promise) {
336
- wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
629
+ setAlarm(timestamp_ms) {
630
+ const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
631
+ if (ret[1]) {
632
+ throw takeFromExternrefTable0(ret[0]);
633
+ }
337
634
  }
338
635
  }
339
- if (Symbol.dispose) ActorContext.prototype[Symbol.dispose] = ActorContext.prototype.free;
636
+
637
+ const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
638
+ ? { register: () => {}, unregister: () => {} }
639
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr >>> 0, 1));
340
640
 
341
641
  export class ActorFactory {
642
+
342
643
  __destroy_into_raw() {
343
644
  const ptr = this.__wbg_ptr;
344
645
  this.__wbg_ptr = 0;
345
646
  ActorFactoryFinalization.unregister(this);
346
647
  return ptr;
347
648
  }
649
+
348
650
  free() {
349
651
  const ptr = this.__destroy_into_raw();
350
652
  wasm.__wbg_actorfactory_free(ptr, 0);
@@ -358,26 +660,33 @@ export class ActorFactory {
358
660
  if (ret[2]) {
359
661
  throw takeFromExternrefTable0(ret[1]);
360
662
  }
361
- this.__wbg_ptr = ret[0];
663
+ this.__wbg_ptr = ret[0] >>> 0;
362
664
  ActorFactoryFinalization.register(this, this.__wbg_ptr, this);
363
665
  return this;
364
666
  }
365
667
  }
366
- if (Symbol.dispose) ActorFactory.prototype[Symbol.dispose] = ActorFactory.prototype.free;
668
+
669
+ const ActorStateTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
670
+ ? { register: () => {}, unregister: () => {} }
671
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorstatetransaction_free(ptr >>> 0, 1));
367
672
 
368
673
  export class ActorStateTransaction {
674
+
369
675
  static __wrap(ptr) {
676
+ ptr = ptr >>> 0;
370
677
  const obj = Object.create(ActorStateTransaction.prototype);
371
678
  obj.__wbg_ptr = ptr;
372
679
  ActorStateTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
373
680
  return obj;
374
681
  }
682
+
375
683
  __destroy_into_raw() {
376
684
  const ptr = this.__wbg_ptr;
377
685
  this.__wbg_ptr = 0;
378
686
  ActorStateTransactionFinalization.unregister(this);
379
687
  return ptr;
380
688
  }
689
+
381
690
  free() {
382
691
  const ptr = this.__destroy_into_raw();
383
692
  wasm.__wbg_actorstatetransaction_free(ptr, 0);
@@ -409,97 +718,77 @@ export class ActorStateTransaction {
409
718
  return ret;
410
719
  }
411
720
  }
412
- if (Symbol.dispose) ActorStateTransaction.prototype[Symbol.dispose] = ActorStateTransaction.prototype.free;
413
721
 
414
- /**
415
- * Registration returned by `CancellationToken.onCancelled`.
416
- */
417
- export class CancellationListener {
418
- static __wrap(ptr) {
419
- const obj = Object.create(CancellationListener.prototype);
420
- obj.__wbg_ptr = ptr;
421
- CancellationListenerFinalization.register(obj, obj.__wbg_ptr, obj);
422
- return obj;
423
- }
424
- __destroy_into_raw() {
425
- const ptr = this.__wbg_ptr;
426
- this.__wbg_ptr = 0;
427
- CancellationListenerFinalization.unregister(this);
428
- return ptr;
429
- }
430
- free() {
431
- const ptr = this.__destroy_into_raw();
432
- wasm.__wbg_cancellationlistener_free(ptr, 0);
433
- }
434
- /**
435
- * Stops waiting for cancellation without calling the callback.
436
- */
437
- release() {
438
- wasm.cancellationlistener_release(this.__wbg_ptr);
439
- }
440
- }
441
- if (Symbol.dispose) CancellationListener.prototype[Symbol.dispose] = CancellationListener.prototype.free;
722
+ const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
723
+ ? { register: () => {}, unregister: () => {} }
724
+ : new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr >>> 0, 1));
442
725
 
443
726
  export class CancellationToken {
727
+
444
728
  static __wrap(ptr) {
729
+ ptr = ptr >>> 0;
445
730
  const obj = Object.create(CancellationToken.prototype);
446
731
  obj.__wbg_ptr = ptr;
447
732
  CancellationTokenFinalization.register(obj, obj.__wbg_ptr, obj);
448
733
  return obj;
449
734
  }
735
+
450
736
  __destroy_into_raw() {
451
737
  const ptr = this.__wbg_ptr;
452
738
  this.__wbg_ptr = 0;
453
739
  CancellationTokenFinalization.unregister(this);
454
740
  return ptr;
455
741
  }
742
+
456
743
  free() {
457
744
  const ptr = this.__destroy_into_raw();
458
745
  wasm.__wbg_cancellationtoken_free(ptr, 0);
459
746
  }
460
747
  /**
461
- * @returns {boolean}
748
+ * @param {Function} callback
462
749
  */
463
- aborted() {
464
- const ret = wasm.cancellationtoken_aborted(this.__wbg_ptr);
465
- return ret !== 0;
466
- }
467
- cancel() {
468
- wasm.cancellationtoken_cancel(this.__wbg_ptr);
750
+ onCancelled(callback) {
751
+ wasm.cancellationtoken_onCancelled(this.__wbg_ptr, callback);
469
752
  }
470
753
  constructor() {
471
754
  const ret = wasm.cancellationtoken_new();
472
- this.__wbg_ptr = ret;
755
+ this.__wbg_ptr = ret >>> 0;
473
756
  CancellationTokenFinalization.register(this, this.__wbg_ptr, this);
474
757
  return this;
475
758
  }
759
+ cancel() {
760
+ wasm.cancellationtoken_cancel(this.__wbg_ptr);
761
+ }
476
762
  /**
477
- * Calls `callback` once when the token is cancelled. Release the returned
478
- * listener when cancellation no longer matters; otherwise the waiting task
479
- * and the callback stay alive until the token is cancelled.
480
- * @param {Function} callback
481
- * @returns {CancellationListener}
763
+ * @returns {boolean}
482
764
  */
483
- onCancelled(callback) {
484
- const ret = wasm.cancellationtoken_onCancelled(this.__wbg_ptr, callback);
485
- return CancellationListener.__wrap(ret);
765
+ aborted() {
766
+ const ret = wasm.cancellationtoken_aborted(this.__wbg_ptr);
767
+ return ret !== 0;
486
768
  }
487
769
  }
488
- if (Symbol.dispose) CancellationToken.prototype[Symbol.dispose] = CancellationToken.prototype.free;
770
+
771
+ const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
772
+ ? { register: () => {}, unregister: () => {} }
773
+ : new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr >>> 0, 1));
489
774
 
490
775
  export class ConnHandle {
776
+
491
777
  static __wrap(ptr) {
778
+ ptr = ptr >>> 0;
492
779
  const obj = Object.create(ConnHandle.prototype);
493
780
  obj.__wbg_ptr = ptr;
494
781
  ConnHandleFinalization.register(obj, obj.__wbg_ptr, obj);
495
782
  return obj;
496
783
  }
784
+
497
785
  __destroy_into_raw() {
498
786
  const ptr = this.__wbg_ptr;
499
787
  this.__wbg_ptr = 0;
500
788
  ConnHandleFinalization.unregister(this);
501
789
  return ptr;
502
790
  }
791
+
503
792
  free() {
504
793
  const ptr = this.__destroy_into_raw();
505
794
  wasm.__wbg_connhandle_free(ptr, 0);
@@ -514,6 +803,13 @@ export class ConnHandle {
514
803
  const ret = wasm.connhandle_disconnect(this.__wbg_ptr, ptr0, len0);
515
804
  return ret;
516
805
  }
806
+ /**
807
+ * @returns {boolean}
808
+ */
809
+ isHibernatable() {
810
+ const ret = wasm.connhandle_isHibernatable(this.__wbg_ptr);
811
+ return ret !== 0;
812
+ }
517
813
  /**
518
814
  * @returns {string}
519
815
  */
@@ -530,31 +826,33 @@ export class ConnHandle {
530
826
  }
531
827
  }
532
828
  /**
533
- * @returns {boolean}
829
+ * @param {string} name
830
+ * @param {Uint8Array} args
534
831
  */
535
- isHibernatable() {
536
- const ret = wasm.connhandle_isHibernatable(this.__wbg_ptr);
537
- return ret !== 0;
832
+ send(name, args) {
833
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
834
+ const len0 = WASM_VECTOR_LEN;
835
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
836
+ const len1 = WASM_VECTOR_LEN;
837
+ wasm.connhandle_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
538
838
  }
539
839
  /**
540
840
  * @returns {Uint8Array}
541
841
  */
542
- params() {
543
- const ret = wasm.connhandle_params(this.__wbg_ptr);
842
+ state() {
843
+ const ret = wasm.connhandle_state(this.__wbg_ptr);
544
844
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
545
845
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
546
846
  return v1;
547
847
  }
548
848
  /**
549
- * @param {string} name
550
- * @param {Uint8Array} args
849
+ * @returns {Uint8Array}
551
850
  */
552
- send(name, args) {
553
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
554
- const len0 = WASM_VECTOR_LEN;
555
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
556
- const len1 = WASM_VECTOR_LEN;
557
- wasm.connhandle_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
851
+ params() {
852
+ const ret = wasm.connhandle_params(this.__wbg_ptr);
853
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
854
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
855
+ return v1;
558
856
  }
559
857
  /**
560
858
  * @param {Uint8Array} state
@@ -564,25 +862,21 @@ export class ConnHandle {
564
862
  const len0 = WASM_VECTOR_LEN;
565
863
  wasm.connhandle_setState(this.__wbg_ptr, ptr0, len0);
566
864
  }
567
- /**
568
- * @returns {Uint8Array}
569
- */
570
- state() {
571
- const ret = wasm.connhandle_state(this.__wbg_ptr);
572
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
573
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
574
- return v1;
575
- }
576
865
  }
577
- if (Symbol.dispose) ConnHandle.prototype[Symbol.dispose] = ConnHandle.prototype.free;
866
+
867
+ const CoreRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
868
+ ? { register: () => {}, unregister: () => {} }
869
+ : new FinalizationRegistry(ptr => wasm.__wbg_coreregistry_free(ptr >>> 0, 1));
578
870
 
579
871
  export class CoreRegistry {
872
+
580
873
  __destroy_into_raw() {
581
874
  const ptr = this.__wbg_ptr;
582
875
  this.__wbg_ptr = 0;
583
876
  CoreRegistryFinalization.unregister(this);
584
877
  return ptr;
585
878
  }
879
+
586
880
  free() {
587
881
  const ptr = this.__destroy_into_raw();
588
882
  wasm.__wbg_coreregistry_free(ptr, 0);
@@ -601,10 +895,18 @@ export class CoreRegistry {
601
895
  }
602
896
  constructor() {
603
897
  const ret = wasm.coreregistry_new();
604
- this.__wbg_ptr = ret;
898
+ this.__wbg_ptr = ret >>> 0;
605
899
  CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
606
900
  return this;
607
901
  }
902
+ /**
903
+ * @param {any} config
904
+ * @returns {Promise<void>}
905
+ */
906
+ serve(config) {
907
+ const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
908
+ return ret;
909
+ }
608
910
  /**
609
911
  * @param {string} name
610
912
  * @param {ActorFactory} factory
@@ -618,14 +920,6 @@ export class CoreRegistry {
618
920
  throw takeFromExternrefTable0(ret[0]);
619
921
  }
620
922
  }
621
- /**
622
- * @param {any} config
623
- * @returns {Promise<void>}
624
- */
625
- serve(config) {
626
- const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
627
- return ret;
628
- }
629
923
  /**
630
924
  * @returns {Promise<void>}
631
925
  */
@@ -634,47 +928,73 @@ export class CoreRegistry {
634
928
  return ret;
635
929
  }
636
930
  }
637
- if (Symbol.dispose) CoreRegistry.prototype[Symbol.dispose] = CoreRegistry.prototype.free;
931
+
932
+ const KvFinalization = (typeof FinalizationRegistry === 'undefined')
933
+ ? { register: () => {}, unregister: () => {} }
934
+ : new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr >>> 0, 1));
638
935
 
639
936
  export class Kv {
937
+
640
938
  static __wrap(ptr) {
939
+ ptr = ptr >>> 0;
641
940
  const obj = Object.create(Kv.prototype);
642
941
  obj.__wbg_ptr = ptr;
643
942
  KvFinalization.register(obj, obj.__wbg_ptr, obj);
644
943
  return obj;
645
944
  }
945
+
646
946
  __destroy_into_raw() {
647
947
  const ptr = this.__wbg_ptr;
648
948
  this.__wbg_ptr = 0;
649
949
  KvFinalization.unregister(this);
650
950
  return ptr;
651
951
  }
952
+
652
953
  free() {
653
954
  const ptr = this.__destroy_into_raw();
654
955
  wasm.__wbg_kv_free(ptr, 0);
655
956
  }
656
957
  /**
657
- * @param {Array<any>} keys
958
+ * @param {Uint8Array} key
658
959
  * @returns {Promise<void>}
659
960
  */
660
- batchDelete(keys) {
661
- const ret = wasm.kv_batchDelete(this.__wbg_ptr, keys);
961
+ delete(key) {
962
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
963
+ const len0 = WASM_VECTOR_LEN;
964
+ const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
662
965
  return ret;
663
966
  }
664
967
  /**
665
- * @param {Array<any>} keys
968
+ * @param {Uint8Array} start
969
+ * @param {Uint8Array} end
970
+ * @param {any} options
666
971
  * @returns {Promise<any>}
667
972
  */
668
- batchGet(keys) {
669
- const ret = wasm.kv_batchGet(this.__wbg_ptr, keys);
973
+ listRange(start, end, options) {
974
+ const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
975
+ const len0 = WASM_VECTOR_LEN;
976
+ const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
977
+ const len1 = WASM_VECTOR_LEN;
978
+ const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
670
979
  return ret;
671
980
  }
672
981
  /**
673
- * @param {Array<any>} entries
982
+ * @param {Uint8Array} prefix
983
+ * @param {any} options
984
+ * @returns {Promise<any>}
985
+ */
986
+ listPrefix(prefix, options) {
987
+ const ptr0 = passArray8ToWasm0(prefix, wasm.__wbindgen_malloc);
988
+ const len0 = WASM_VECTOR_LEN;
989
+ const ret = wasm.kv_listPrefix(this.__wbg_ptr, ptr0, len0, options);
990
+ return ret;
991
+ }
992
+ /**
993
+ * @param {Array<any>} keys
674
994
  * @returns {Promise<void>}
675
995
  */
676
- batchPut(entries) {
677
- const ret = wasm.kv_batchPut(this.__wbg_ptr, entries);
996
+ batchDelete(keys) {
997
+ const ret = wasm.kv_batchDelete(this.__wbg_ptr, keys);
678
998
  return ret;
679
999
  }
680
1000
  /**
@@ -690,16 +1010,6 @@ export class Kv {
690
1010
  const ret = wasm.kv_deleteRange(this.__wbg_ptr, ptr0, len0, ptr1, len1);
691
1011
  return ret;
692
1012
  }
693
- /**
694
- * @param {Uint8Array} key
695
- * @returns {Promise<void>}
696
- */
697
- delete(key) {
698
- const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
699
- const len0 = WASM_VECTOR_LEN;
700
- const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
701
- return ret;
702
- }
703
1013
  /**
704
1014
  * @param {Uint8Array} key
705
1015
  * @returns {Promise<any>}
@@ -711,75 +1021,99 @@ export class Kv {
711
1021
  return ret;
712
1022
  }
713
1023
  /**
714
- * @param {Uint8Array} prefix
715
- * @param {any} options
716
- * @returns {Promise<any>}
1024
+ * @param {Uint8Array} key
1025
+ * @param {Uint8Array} value
1026
+ * @returns {Promise<void>}
717
1027
  */
718
- listPrefix(prefix, options) {
719
- const ptr0 = passArray8ToWasm0(prefix, wasm.__wbindgen_malloc);
1028
+ put(key, value) {
1029
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
720
1030
  const len0 = WASM_VECTOR_LEN;
721
- const ret = wasm.kv_listPrefix(this.__wbg_ptr, ptr0, len0, options);
1031
+ const ptr1 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
1032
+ const len1 = WASM_VECTOR_LEN;
1033
+ const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
722
1034
  return ret;
723
1035
  }
724
1036
  /**
725
- * @param {Uint8Array} start
726
- * @param {Uint8Array} end
727
- * @param {any} options
1037
+ * @param {Array<any>} keys
728
1038
  * @returns {Promise<any>}
729
1039
  */
730
- listRange(start, end, options) {
731
- const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
732
- const len0 = WASM_VECTOR_LEN;
733
- const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
734
- const len1 = WASM_VECTOR_LEN;
735
- const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
1040
+ batchGet(keys) {
1041
+ const ret = wasm.kv_batchGet(this.__wbg_ptr, keys);
736
1042
  return ret;
737
1043
  }
738
1044
  /**
739
- * @param {Uint8Array} key
740
- * @param {Uint8Array} value
1045
+ * @param {Array<any>} entries
741
1046
  * @returns {Promise<void>}
742
1047
  */
743
- put(key, value) {
744
- const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
745
- const len0 = WASM_VECTOR_LEN;
746
- const ptr1 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
747
- const len1 = WASM_VECTOR_LEN;
748
- const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1048
+ batchPut(entries) {
1049
+ const ret = wasm.kv_batchPut(this.__wbg_ptr, entries);
749
1050
  return ret;
750
1051
  }
751
1052
  }
752
- if (Symbol.dispose) Kv.prototype[Symbol.dispose] = Kv.prototype.free;
1053
+
1054
+ const QueueFinalization = (typeof FinalizationRegistry === 'undefined')
1055
+ ? { register: () => {}, unregister: () => {} }
1056
+ : new FinalizationRegistry(ptr => wasm.__wbg_queue_free(ptr >>> 0, 1));
753
1057
 
754
1058
  export class Queue {
1059
+
755
1060
  static __wrap(ptr) {
1061
+ ptr = ptr >>> 0;
756
1062
  const obj = Object.create(Queue.prototype);
757
1063
  obj.__wbg_ptr = ptr;
758
1064
  QueueFinalization.register(obj, obj.__wbg_ptr, obj);
759
1065
  return obj;
760
1066
  }
1067
+
761
1068
  __destroy_into_raw() {
762
1069
  const ptr = this.__wbg_ptr;
763
1070
  this.__wbg_ptr = 0;
764
1071
  QueueFinalization.unregister(this);
765
1072
  return ptr;
766
1073
  }
1074
+
767
1075
  free() {
768
1076
  const ptr = this.__destroy_into_raw();
769
1077
  wasm.__wbg_queue_free(ptr, 0);
770
1078
  }
771
1079
  /**
772
- * @param {bigint} message_id
773
- * @param {string} expected_name
774
- * @param {Uint8Array | null} [response]
775
- * @returns {Promise<boolean>}
1080
+ * @param {any} options
1081
+ * @param {CancellationToken | null} [signal]
1082
+ * @returns {Promise<Array<any>>}
776
1083
  */
777
- completePersisted(message_id, expected_name, response) {
778
- const ptr0 = passStringToWasm0(expected_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
779
- const len0 = WASM_VECTOR_LEN;
780
- var ptr1 = isLikeNone(response) ? 0 : passArray8ToWasm0(response, wasm.__wbindgen_malloc);
781
- var len1 = WASM_VECTOR_LEN;
782
- const ret = wasm.queue_completePersisted(this.__wbg_ptr, message_id, ptr0, len0, ptr1, len1);
1084
+ nextBatch(options, signal) {
1085
+ let ptr0 = 0;
1086
+ if (!isLikeNone(signal)) {
1087
+ _assertClass(signal, CancellationToken);
1088
+ ptr0 = signal.__destroy_into_raw();
1089
+ }
1090
+ const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
1091
+ return ret;
1092
+ }
1093
+ /**
1094
+ * @param {any} options
1095
+ * @returns {Array<any>}
1096
+ */
1097
+ tryNextBatch(options) {
1098
+ const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
1099
+ if (ret[2]) {
1100
+ throw takeFromExternrefTable0(ret[1]);
1101
+ }
1102
+ return takeFromExternrefTable0(ret[0]);
1103
+ }
1104
+ /**
1105
+ * @param {any} names
1106
+ * @param {any} options
1107
+ * @param {CancellationToken | null} [signal]
1108
+ * @returns {Promise<QueueMessage>}
1109
+ */
1110
+ waitForNames(names, options, signal) {
1111
+ let ptr0 = 0;
1112
+ if (!isLikeNone(signal)) {
1113
+ _assertClass(signal, CancellationToken);
1114
+ ptr0 = signal.__destroy_into_raw();
1115
+ }
1116
+ const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
783
1117
  return ret;
784
1118
  }
785
1119
  /**
@@ -810,31 +1144,26 @@ export class Queue {
810
1144
  return ret;
811
1145
  }
812
1146
  /**
813
- * @returns {number}
814
- */
815
- maxSize() {
816
- const ret = wasm.queue_maxSize(this.__wbg_ptr);
817
- return ret >>> 0;
818
- }
819
- /**
820
- * @param {any} options
821
- * @param {CancellationToken | null} [signal]
822
- * @returns {Promise<Array<any>>}
1147
+ * @param {bigint} message_id
1148
+ * @param {string} expected_name
1149
+ * @param {Uint8Array | null} [response]
1150
+ * @returns {Promise<boolean>}
823
1151
  */
824
- nextBatch(options, signal) {
825
- let ptr0 = 0;
826
- if (!isLikeNone(signal)) {
827
- _assertClass(signal, CancellationToken);
828
- ptr0 = signal.__destroy_into_raw();
829
- }
830
- const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
1152
+ completePersisted(message_id, expected_name, response) {
1153
+ const ptr0 = passStringToWasm0(expected_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1154
+ const len0 = WASM_VECTOR_LEN;
1155
+ var ptr1 = isLikeNone(response) ? 0 : passArray8ToWasm0(response, wasm.__wbindgen_malloc);
1156
+ var len1 = WASM_VECTOR_LEN;
1157
+ const ret = wasm.queue_completePersisted(this.__wbg_ptr, message_id, ptr0, len0, ptr1, len1);
831
1158
  return ret;
832
1159
  }
833
1160
  /**
1161
+ * @param {any} names
1162
+ * @param {any} options
834
1163
  * @returns {Promise<void>}
835
1164
  */
836
- reset() {
837
- const ret = wasm.queue_reset(this.__wbg_ptr);
1165
+ waitForNamesAvailable(names, options) {
1166
+ const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
838
1167
  return ret;
839
1168
  }
840
1169
  /**
@@ -851,77 +1180,46 @@ export class Queue {
851
1180
  return ret;
852
1181
  }
853
1182
  /**
854
- * @param {any} options
855
- * @returns {Array<any>}
856
- */
857
- tryNextBatch(options) {
858
- const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
859
- if (ret[2]) {
860
- throw takeFromExternrefTable0(ret[1]);
861
- }
862
- return takeFromExternrefTable0(ret[0]);
863
- }
864
- /**
865
- * @param {any} names
866
- * @param {any} options
867
1183
  * @returns {Promise<void>}
868
1184
  */
869
- waitForNamesAvailable(names, options) {
870
- const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
1185
+ reset() {
1186
+ const ret = wasm.queue_reset(this.__wbg_ptr);
871
1187
  return ret;
872
1188
  }
873
1189
  /**
874
- * @param {any} names
875
- * @param {any} options
876
- * @param {CancellationToken | null} [signal]
877
- * @returns {Promise<QueueMessage>}
1190
+ * @returns {number}
878
1191
  */
879
- waitForNames(names, options, signal) {
880
- let ptr0 = 0;
881
- if (!isLikeNone(signal)) {
882
- _assertClass(signal, CancellationToken);
883
- ptr0 = signal.__destroy_into_raw();
884
- }
885
- const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
886
- return ret;
1192
+ maxSize() {
1193
+ const ret = wasm.queue_maxSize(this.__wbg_ptr);
1194
+ return ret >>> 0;
887
1195
  }
888
1196
  }
889
- if (Symbol.dispose) Queue.prototype[Symbol.dispose] = Queue.prototype.free;
890
1197
 
891
- export class QueueMessage {
892
- static __wrap(ptr) {
1198
+ const QueueMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1199
+ ? { register: () => {}, unregister: () => {} }
1200
+ : new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr >>> 0, 1));
1201
+
1202
+ export class QueueMessage {
1203
+
1204
+ static __wrap(ptr) {
1205
+ ptr = ptr >>> 0;
893
1206
  const obj = Object.create(QueueMessage.prototype);
894
1207
  obj.__wbg_ptr = ptr;
895
1208
  QueueMessageFinalization.register(obj, obj.__wbg_ptr, obj);
896
1209
  return obj;
897
1210
  }
1211
+
898
1212
  __destroy_into_raw() {
899
1213
  const ptr = this.__wbg_ptr;
900
1214
  this.__wbg_ptr = 0;
901
1215
  QueueMessageFinalization.unregister(this);
902
1216
  return ptr;
903
1217
  }
1218
+
904
1219
  free() {
905
1220
  const ptr = this.__destroy_into_raw();
906
1221
  wasm.__wbg_queuemessage_free(ptr, 0);
907
1222
  }
908
- /**
909
- * @returns {Uint8Array}
910
- */
911
- body() {
912
- const ret = wasm.queuemessage_body(this.__wbg_ptr);
913
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
914
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
915
- return v1;
916
- }
917
- /**
918
- * @param {any} response
919
- * @returns {Promise<void>}
920
- */
921
- complete(response) {
922
- const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
923
- return ret;
924
- }
925
1223
  /**
926
1224
  * @returns {number}
927
1225
  */
@@ -929,6 +1227,13 @@ export class QueueMessage {
929
1227
  const ret = wasm.queuemessage_createdAt(this.__wbg_ptr);
930
1228
  return ret;
931
1229
  }
1230
+ /**
1231
+ * @returns {boolean}
1232
+ */
1233
+ isCompletable() {
1234
+ const ret = wasm.queuemessage_isCompletable(this.__wbg_ptr);
1235
+ return ret !== 0;
1236
+ }
932
1237
  /**
933
1238
  * @returns {bigint}
934
1239
  */
@@ -937,11 +1242,13 @@ export class QueueMessage {
937
1242
  return BigInt.asUintN(64, ret);
938
1243
  }
939
1244
  /**
940
- * @returns {boolean}
1245
+ * @returns {Uint8Array}
941
1246
  */
942
- isCompletable() {
943
- const ret = wasm.queuemessage_isCompletable(this.__wbg_ptr);
944
- return ret !== 0;
1247
+ body() {
1248
+ const ret = wasm.queuemessage_body(this.__wbg_ptr);
1249
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1250
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1251
+ return v1;
945
1252
  }
946
1253
  /**
947
1254
  * @returns {string}
@@ -958,38 +1265,78 @@ export class QueueMessage {
958
1265
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
959
1266
  }
960
1267
  }
1268
+ /**
1269
+ * @param {any} response
1270
+ * @returns {Promise<void>}
1271
+ */
1272
+ complete(response) {
1273
+ const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1274
+ return ret;
1275
+ }
961
1276
  }
962
- if (Symbol.dispose) QueueMessage.prototype[Symbol.dispose] = QueueMessage.prototype.free;
1277
+
1278
+ const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
1279
+ ? { register: () => {}, unregister: () => {} }
1280
+ : new FinalizationRegistry(ptr => wasm.__wbg_schedule_free(ptr >>> 0, 1));
963
1281
 
964
1282
  export class Schedule {
1283
+
965
1284
  static __wrap(ptr) {
1285
+ ptr = ptr >>> 0;
966
1286
  const obj = Object.create(Schedule.prototype);
967
1287
  obj.__wbg_ptr = ptr;
968
1288
  ScheduleFinalization.register(obj, obj.__wbg_ptr, obj);
969
1289
  return obj;
970
1290
  }
1291
+
971
1292
  __destroy_into_raw() {
972
1293
  const ptr = this.__wbg_ptr;
973
1294
  this.__wbg_ptr = 0;
974
1295
  ScheduleFinalization.unregister(this);
975
1296
  return ptr;
976
1297
  }
1298
+
977
1299
  free() {
978
1300
  const ptr = this.__destroy_into_raw();
979
1301
  wasm.__wbg_schedule_free(ptr, 0);
980
1302
  }
981
1303
  /**
982
- * @param {number} duration_ms
1304
+ * @param {string} name
1305
+ * @param {number} interval_ms
983
1306
  * @param {string} action_name
984
1307
  * @param {Uint8Array} args
985
- * @returns {Promise<string>}
1308
+ * @param {number | null} [max_history]
1309
+ * @returns {Promise<void>}
986
1310
  */
987
- after(duration_ms, action_name, args) {
988
- const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1311
+ cronEvery(name, interval_ms, action_name, args, max_history) {
1312
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
989
1313
  const len0 = WASM_VECTOR_LEN;
990
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1314
+ const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
991
1315
  const len1 = WASM_VECTOR_LEN;
992
- const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1316
+ const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1317
+ const len2 = WASM_VECTOR_LEN;
1318
+ const ret = wasm.schedule_cronEvery(this.__wbg_ptr, ptr0, len0, interval_ms, ptr1, len1, ptr2, len2, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1319
+ return ret;
1320
+ }
1321
+ /**
1322
+ * @param {string} name
1323
+ * @returns {Promise<boolean>}
1324
+ */
1325
+ cronDelete(name) {
1326
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1327
+ const len0 = WASM_VECTOR_LEN;
1328
+ const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
1329
+ return ret;
1330
+ }
1331
+ /**
1332
+ * @param {string} name
1333
+ * @param {number | null} [limit]
1334
+ * @returns {Promise<any>}
1335
+ */
1336
+ cronHistory(name, limit) {
1337
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1338
+ const len0 = WASM_VECTOR_LEN;
1339
+ const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
993
1340
  return ret;
994
1341
  }
995
1342
  /**
@@ -1008,68 +1355,53 @@ export class Schedule {
1008
1355
  }
1009
1356
  /**
1010
1357
  * @param {string} id
1011
- * @returns {Promise<boolean>}
1358
+ * @returns {Promise<any>}
1012
1359
  */
1013
- cancel(id) {
1360
+ get(id) {
1014
1361
  const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1015
1362
  const len0 = WASM_VECTOR_LEN;
1016
- const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
1363
+ const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
1017
1364
  return ret;
1018
1365
  }
1019
1366
  /**
1020
- * @param {string} name
1021
- * @returns {Promise<boolean>}
1367
+ * @returns {Promise<any>}
1022
1368
  */
1023
- cronDelete(name) {
1024
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1025
- const len0 = WASM_VECTOR_LEN;
1026
- const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
1369
+ list() {
1370
+ const ret = wasm.schedule_list(this.__wbg_ptr);
1027
1371
  return ret;
1028
1372
  }
1029
1373
  /**
1030
- * @param {string} name
1031
- * @param {number} interval_ms
1374
+ * @param {number} duration_ms
1032
1375
  * @param {string} action_name
1033
1376
  * @param {Uint8Array} args
1034
- * @param {number | null} [max_history]
1035
- * @returns {Promise<void>}
1377
+ * @returns {Promise<string>}
1036
1378
  */
1037
- cronEvery(name, interval_ms, action_name, args, max_history) {
1038
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1379
+ after(duration_ms, action_name, args) {
1380
+ const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1039
1381
  const len0 = WASM_VECTOR_LEN;
1040
- const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1382
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1041
1383
  const len1 = WASM_VECTOR_LEN;
1042
- const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1043
- const len2 = WASM_VECTOR_LEN;
1044
- const ret = wasm.schedule_cronEvery(this.__wbg_ptr, ptr0, len0, interval_ms, ptr1, len1, ptr2, len2, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1384
+ const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1045
1385
  return ret;
1046
1386
  }
1047
1387
  /**
1048
- * @param {string} name
1049
- * @returns {Promise<any>}
1388
+ * @param {string} id
1389
+ * @returns {Promise<boolean>}
1050
1390
  */
1051
- cronGet(name) {
1052
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1391
+ cancel(id) {
1392
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1053
1393
  const len0 = WASM_VECTOR_LEN;
1054
- const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
1394
+ const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
1055
1395
  return ret;
1056
1396
  }
1057
1397
  /**
1058
1398
  * @param {string} name
1059
- * @param {number | null} [limit]
1060
1399
  * @returns {Promise<any>}
1061
1400
  */
1062
- cronHistory(name, limit) {
1401
+ cronGet(name) {
1063
1402
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1064
1403
  const len0 = WASM_VECTOR_LEN;
1065
- const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
1066
- return ret;
1067
- }
1068
- /**
1069
- * @returns {Promise<any>}
1070
- */
1071
- cronList() {
1072
- const ret = wasm.schedule_cronList(this.__wbg_ptr);
1404
+ const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
1073
1405
  return ret;
1074
1406
  }
1075
1407
  /**
@@ -1095,71 +1427,40 @@ export class Schedule {
1095
1427
  const ret = wasm.schedule_cronSet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1096
1428
  return ret;
1097
1429
  }
1098
- /**
1099
- * @param {string} id
1100
- * @returns {Promise<any>}
1101
- */
1102
- get(id) {
1103
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1104
- const len0 = WASM_VECTOR_LEN;
1105
- const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
1106
- return ret;
1107
- }
1108
1430
  /**
1109
1431
  * @returns {Promise<any>}
1110
1432
  */
1111
- list() {
1112
- const ret = wasm.schedule_list(this.__wbg_ptr);
1433
+ cronList() {
1434
+ const ret = wasm.schedule_cronList(this.__wbg_ptr);
1113
1435
  return ret;
1114
1436
  }
1115
1437
  }
1116
- if (Symbol.dispose) Schedule.prototype[Symbol.dispose] = Schedule.prototype.free;
1438
+
1439
+ const SqliteDbFinalization = (typeof FinalizationRegistry === 'undefined')
1440
+ ? { register: () => {}, unregister: () => {} }
1441
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitedb_free(ptr >>> 0, 1));
1117
1442
 
1118
1443
  export class SqliteDb {
1444
+
1119
1445
  static __wrap(ptr) {
1446
+ ptr = ptr >>> 0;
1120
1447
  const obj = Object.create(SqliteDb.prototype);
1121
1448
  obj.__wbg_ptr = ptr;
1122
1449
  SqliteDbFinalization.register(obj, obj.__wbg_ptr, obj);
1123
1450
  return obj;
1124
1451
  }
1452
+
1125
1453
  __destroy_into_raw() {
1126
1454
  const ptr = this.__wbg_ptr;
1127
1455
  this.__wbg_ptr = 0;
1128
1456
  SqliteDbFinalization.unregister(this);
1129
1457
  return ptr;
1130
1458
  }
1459
+
1131
1460
  free() {
1132
1461
  const ptr = this.__destroy_into_raw();
1133
1462
  wasm.__wbg_sqlitedb_free(ptr, 0);
1134
1463
  }
1135
- /**
1136
- * @param {number | null} [timeout_ms]
1137
- * @param {string | null} [name]
1138
- * @returns {Promise<SqliteTransaction>}
1139
- */
1140
- beginTransaction(timeout_ms, name) {
1141
- var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1142
- var len0 = WASM_VECTOR_LEN;
1143
- const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms, ptr0, len0);
1144
- return ret;
1145
- }
1146
- /**
1147
- * @returns {Promise<void>}
1148
- */
1149
- close() {
1150
- const ret = wasm.sqlitedb_close(this.__wbg_ptr);
1151
- return ret;
1152
- }
1153
- /**
1154
- * @param {string} sql
1155
- * @returns {Promise<any>}
1156
- */
1157
- exec(sql) {
1158
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1159
- const len0 = WASM_VECTOR_LEN;
1160
- const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
1161
- return ret;
1162
- }
1163
1464
  /**
1164
1465
  * @param {any} statements
1165
1466
  * @returns {Promise<any>}
@@ -1169,14 +1470,14 @@ export class SqliteDb {
1169
1470
  return ret;
1170
1471
  }
1171
1472
  /**
1172
- * @param {string} sql
1173
- * @param {any} params
1174
- * @returns {Promise<any>}
1473
+ * @param {number | null} [timeout_ms]
1474
+ * @param {string | null} [name]
1475
+ * @returns {Promise<SqliteTransaction>}
1175
1476
  */
1176
- execute(sql, params) {
1177
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1178
- const len0 = WASM_VECTOR_LEN;
1179
- const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
1477
+ beginTransaction(timeout_ms, name) {
1478
+ var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1479
+ var len0 = WASM_VECTOR_LEN;
1480
+ const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms, ptr0, len0);
1180
1481
  return ret;
1181
1482
  }
1182
1483
  /**
@@ -1184,58 +1485,27 @@ export class SqliteDb {
1184
1485
  * @param {any} params
1185
1486
  * @returns {Promise<any>}
1186
1487
  */
1187
- query(sql, params) {
1488
+ run(sql, params) {
1188
1489
  const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1189
1490
  const len0 = WASM_VECTOR_LEN;
1190
- const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
1491
+ const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
1191
1492
  return ret;
1192
1493
  }
1193
1494
  /**
1194
1495
  * @param {string} sql
1195
- * @param {any} params
1196
1496
  * @returns {Promise<any>}
1197
1497
  */
1198
- run(sql, params) {
1498
+ exec(sql) {
1199
1499
  const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1200
1500
  const len0 = WASM_VECTOR_LEN;
1201
- const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
1501
+ const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
1202
1502
  return ret;
1203
1503
  }
1204
- }
1205
- if (Symbol.dispose) SqliteDb.prototype[Symbol.dispose] = SqliteDb.prototype.free;
1206
-
1207
- export class SqliteTransaction {
1208
- static __wrap(ptr) {
1209
- const obj = Object.create(SqliteTransaction.prototype);
1210
- obj.__wbg_ptr = ptr;
1211
- SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
1212
- return obj;
1213
- }
1214
- __destroy_into_raw() {
1215
- const ptr = this.__wbg_ptr;
1216
- this.__wbg_ptr = 0;
1217
- SqliteTransactionFinalization.unregister(this);
1218
- return ptr;
1219
- }
1220
- free() {
1221
- const ptr = this.__destroy_into_raw();
1222
- wasm.__wbg_sqlitetransaction_free(ptr, 0);
1223
- }
1224
1504
  /**
1225
1505
  * @returns {Promise<void>}
1226
1506
  */
1227
- commit() {
1228
- const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
1229
- return ret;
1230
- }
1231
- /**
1232
- * @param {string} sql
1233
- * @returns {Promise<any>}
1234
- */
1235
- exec(sql) {
1236
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1237
- const len0 = WASM_VECTOR_LEN;
1238
- const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
1507
+ close() {
1508
+ const ret = wasm.sqlitedb_close(this.__wbg_ptr);
1239
1509
  return ret;
1240
1510
  }
1241
1511
  /**
@@ -1243,1043 +1513,736 @@ export class SqliteTransaction {
1243
1513
  * @param {any} params
1244
1514
  * @returns {Promise<any>}
1245
1515
  */
1246
- execute(sql, params) {
1516
+ query(sql, params) {
1247
1517
  const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1248
1518
  const len0 = WASM_VECTOR_LEN;
1249
- const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
1519
+ const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
1250
1520
  return ret;
1251
1521
  }
1252
1522
  /**
1253
- * @returns {Promise<void>}
1254
- */
1255
- rollback() {
1256
- const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
1257
- return ret;
1258
- }
1259
- }
1260
- if (Symbol.dispose) SqliteTransaction.prototype[Symbol.dispose] = SqliteTransaction.prototype.free;
1261
-
1262
- export class WebSocketHandle {
1263
- static __wrap(ptr) {
1264
- const obj = Object.create(WebSocketHandle.prototype);
1265
- obj.__wbg_ptr = ptr;
1266
- WebSocketHandleFinalization.register(obj, obj.__wbg_ptr, obj);
1267
- return obj;
1268
- }
1269
- __destroy_into_raw() {
1270
- const ptr = this.__wbg_ptr;
1271
- this.__wbg_ptr = 0;
1272
- WebSocketHandleFinalization.unregister(this);
1273
- return ptr;
1274
- }
1275
- free() {
1276
- const ptr = this.__destroy_into_raw();
1277
- wasm.__wbg_websockethandle_free(ptr, 0);
1278
- }
1279
- /**
1280
- * @param {number | null} [code]
1281
- * @param {string | null} [reason]
1282
- * @returns {Promise<void>}
1283
- */
1284
- close(code, reason) {
1285
- var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1286
- var len0 = WASM_VECTOR_LEN;
1287
- const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1288
- return ret;
1289
- }
1290
- /**
1291
- * @param {Uint8Array} data
1292
- * @param {boolean} binary
1293
- */
1294
- send(data, binary) {
1295
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
1296
- const len0 = WASM_VECTOR_LEN;
1297
- const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
1298
- if (ret[1]) {
1299
- throw takeFromExternrefTable0(ret[0]);
1300
- }
1301
- }
1302
- /**
1303
- * @param {Function} callback
1304
- */
1305
- setEventCallback(callback) {
1306
- wasm.websockethandle_setEventCallback(this.__wbg_ptr, callback);
1307
- }
1308
- }
1309
- if (Symbol.dispose) WebSocketHandle.prototype[Symbol.dispose] = WebSocketHandle.prototype.free;
1310
-
1311
- /**
1312
- * @param {Promise<any>} promise
1313
- * @returns {Promise<any>}
1314
- */
1315
- export function awaitPromise(promise) {
1316
- const ret = wasm.awaitPromise(promise);
1317
- return ret;
1318
- }
1319
-
1320
- /**
1321
- * @returns {string}
1322
- */
1323
- export function bridgeRivetErrorPrefix() {
1324
- let deferred1_0;
1325
- let deferred1_1;
1326
- try {
1327
- const ret = wasm.bridgeRivetErrorPrefix();
1328
- deferred1_0 = ret[0];
1329
- deferred1_1 = ret[1];
1330
- return getStringFromWasm0(ret[0], ret[1]);
1331
- } finally {
1332
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1333
- }
1334
- }
1335
-
1336
- /**
1337
- * @param {Uint8Array} bytes
1338
- * @returns {Uint8Array}
1339
- */
1340
- export function roundTripBytes(bytes) {
1341
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1342
- const len0 = WASM_VECTOR_LEN;
1343
- const ret = wasm.roundTripBytes(ptr0, len0);
1344
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1345
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1346
- return v2;
1347
- }
1348
-
1349
- export function start() {
1350
- wasm.start();
1351
- }
1352
-
1353
- /**
1354
- * @param {Uint8Array} bytes
1355
- * @returns {Uint8Array}
1356
- */
1357
- export function uint8ArrayFromBytes(bytes) {
1358
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1359
- const len0 = WASM_VECTOR_LEN;
1360
- const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
1361
- return ret;
1362
- }
1363
- function __wbg_get_imports() {
1364
- const import0 = {
1365
- __proto__: null,
1366
- __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
1367
- const ret = Error(getStringFromWasm0(arg0, arg1));
1368
- return ret;
1369
- },
1370
- __wbg_Number_14af1003b8dd5ead: function(arg0) {
1371
- const ret = Number(arg0);
1372
- return ret;
1373
- },
1374
- __wbg_String_8564e559799eccda: function(arg0, arg1) {
1375
- const ret = String(arg1);
1376
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1377
- const len1 = WASM_VECTOR_LEN;
1378
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1379
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1380
- },
1381
- __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
1382
- const v = arg0;
1383
- const ret = typeof(v) === 'boolean' ? v : undefined;
1384
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1385
- },
1386
- __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
1387
- const ret = debugString(arg1);
1388
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1389
- const len1 = WASM_VECTOR_LEN;
1390
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1391
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1392
- },
1393
- __wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
1394
- const ret = arg0 in arg1;
1395
- return ret;
1396
- },
1397
- __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
1398
- const ret = typeof(arg0) === 'function';
1399
- return ret;
1400
- },
1401
- __wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
1402
- const ret = arg0 === null;
1403
- return ret;
1404
- },
1405
- __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
1406
- const val = arg0;
1407
- const ret = typeof(val) === 'object' && val !== null;
1408
- return ret;
1409
- },
1410
- __wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
1411
- const ret = typeof(arg0) === 'string';
1412
- return ret;
1413
- },
1414
- __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
1415
- const ret = arg0 === undefined;
1416
- return ret;
1417
- },
1418
- __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
1419
- const ret = arg0 == arg1;
1420
- return ret;
1421
- },
1422
- __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
1423
- const obj = arg1;
1424
- const ret = typeof(obj) === 'number' ? obj : undefined;
1425
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1426
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1427
- },
1428
- __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
1429
- const obj = arg1;
1430
- const ret = typeof(obj) === 'string' ? obj : undefined;
1431
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1432
- var len1 = WASM_VECTOR_LEN;
1433
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1434
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1435
- },
1436
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
1437
- throw new Error(getStringFromWasm0(arg0, arg1));
1438
- },
1439
- __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
1440
- arg0._wbg_cb_unref();
1441
- },
1442
- __wbg_actorcontext_new: function(arg0) {
1443
- const ret = ActorContext.__wrap(arg0);
1444
- return ret;
1445
- },
1446
- __wbg_actorstatetransaction_new: function(arg0) {
1447
- const ret = ActorStateTransaction.__wrap(arg0);
1448
- return ret;
1449
- },
1450
- __wbg_buffer_56ec2905a66f58b9: function(arg0) {
1451
- const ret = arg0.buffer;
1452
- return ret;
1453
- },
1454
- __wbg_bufferedAmount_64b8a4229f549d4b: function(arg0) {
1455
- const ret = arg0.bufferedAmount;
1456
- return ret;
1457
- },
1458
- __wbg_call_1875a20c43a36133: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1459
- const ret = arg0.call(arg1, arg2, arg3);
1460
- return ret;
1461
- }, arguments); },
1462
- __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
1463
- const ret = arg0.call(arg1, arg2);
1464
- return ret;
1465
- }, arguments); },
1466
- __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
1467
- const ret = arg0.call(arg1);
1468
- return ret;
1469
- }, arguments); },
1470
- __wbg_cancellationtoken_new: function(arg0) {
1471
- const ret = CancellationToken.__wrap(arg0);
1472
- return ret;
1473
- },
1474
- __wbg_close_150f701b1a60e0ac: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1475
- arg0.close(arg1, getStringFromWasm0(arg2, arg3));
1476
- }, arguments); },
1477
- __wbg_close_d3ed56b5763be5ae: function() { return handleError(function (arg0) {
1478
- arg0.close();
1479
- }, arguments); },
1480
- __wbg_code_4cb6dbcfceec1eac: function(arg0) {
1481
- const ret = arg0.code;
1482
- return ret;
1483
- },
1484
- __wbg_connhandle_new: function(arg0) {
1485
- const ret = ConnHandle.__wrap(arg0);
1486
- return ret;
1487
- },
1488
- __wbg_construct_2cc135b78387ed16: function() { return handleError(function (arg0, arg1) {
1489
- const ret = Reflect.construct(arg0, arg1);
1490
- return ret;
1491
- }, arguments); },
1492
- __wbg_crypto_38df2bab126b63dc: function(arg0) {
1493
- const ret = arg0.crypto;
1494
- return ret;
1495
- },
1496
- __wbg_data_522f7abc70721269: function(arg0) {
1497
- const ret = arg0.data;
1498
- return ret;
1499
- },
1500
- __wbg_done_b41a1d26cdb37fb6: function(arg0) {
1501
- const ret = arg0.done;
1502
- return ret;
1503
- },
1504
- __wbg_error_757e9472f8410341: function(arg0, arg1) {
1505
- let deferred0_0;
1506
- let deferred0_1;
1507
- try {
1508
- deferred0_0 = arg0;
1509
- deferred0_1 = arg1;
1510
- console.error(getStringFromWasm0(arg0, arg1));
1511
- } finally {
1512
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1513
- }
1514
- },
1515
- __wbg_getRandomValues_973dabfb0ad1769f: function() { return handleError(function (arg0, arg1) {
1516
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1517
- }, arguments); },
1518
- __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
1519
- arg0.getRandomValues(arg1);
1520
- }, arguments); },
1521
- __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
1522
- const ret = Reflect.get(arg0, arg1);
1523
- return ret;
1524
- }, arguments); },
1525
- __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
1526
- const ret = Reflect.get(arg0, arg1);
1527
- return ret;
1528
- }, arguments); },
1529
- __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
1530
- const ret = arg0[arg1 >>> 0];
1531
- return ret;
1532
- },
1533
- __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
1534
- const ret = arg0[arg1 >>> 0];
1535
- return ret;
1536
- },
1537
- __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
1538
- const ret = arg0[arg1];
1539
- return ret;
1540
- },
1541
- __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
1542
- let result;
1543
- try {
1544
- result = arg0 instanceof ArrayBuffer;
1545
- } catch (_) {
1546
- result = false;
1547
- }
1548
- const ret = result;
1549
- return ret;
1550
- },
1551
- __wbg_instanceof_Error_80a725f81f2e102d: function(arg0) {
1552
- let result;
1553
- try {
1554
- result = arg0 instanceof Error;
1555
- } catch (_) {
1556
- result = false;
1557
- }
1558
- const ret = result;
1559
- return ret;
1560
- },
1561
- __wbg_instanceof_Object_67a83cdc00c5d141: function(arg0) {
1562
- let result;
1563
- try {
1564
- result = arg0 instanceof Object;
1565
- } catch (_) {
1566
- result = false;
1567
- }
1568
- const ret = result;
1569
- return ret;
1570
- },
1571
- __wbg_instanceof_Promise_e1dc6893aa1ece28: function(arg0) {
1572
- let result;
1573
- try {
1574
- result = arg0 instanceof Promise;
1575
- } catch (_) {
1576
- result = false;
1577
- }
1578
- const ret = result;
1579
- return ret;
1580
- },
1581
- __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
1582
- let result;
1583
- try {
1584
- result = arg0 instanceof Uint8Array;
1585
- } catch (_) {
1586
- result = false;
1587
- }
1588
- const ret = result;
1589
- return ret;
1590
- },
1591
- __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
1592
- const ret = Array.isArray(arg0);
1593
- return ret;
1594
- },
1595
- __wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
1596
- const ret = Number.isSafeInteger(arg0);
1597
- return ret;
1598
- },
1599
- __wbg_iterator_e3c31c892080e444: function() {
1600
- const ret = Symbol.iterator;
1601
- return ret;
1602
- },
1603
- __wbg_keys_440be172f17c0265: function(arg0) {
1604
- const ret = Object.keys(arg0);
1605
- return ret;
1606
- },
1607
- __wbg_length_7f3c00c40364105e: function(arg0) {
1608
- const ret = arg0.length;
1609
- return ret;
1610
- },
1611
- __wbg_length_d4bdea10311bd9cf: function(arg0) {
1612
- const ret = arg0.length;
1613
- return ret;
1614
- },
1615
- __wbg_message_49f5412048473de5: function(arg0, arg1) {
1616
- const ret = arg1.message;
1617
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1618
- const len1 = WASM_VECTOR_LEN;
1619
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1620
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1621
- },
1622
- __wbg_message_5f8387f0c32b90a7: function(arg0) {
1623
- const ret = arg0.message;
1624
- return ret;
1625
- },
1626
- __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
1627
- const ret = arg0.msCrypto;
1628
- return ret;
1629
- },
1630
- __wbg_new_1dbf7428bba60a42: function(arg0) {
1631
- const ret = new Uint8Array(arg0);
1632
- return ret;
1633
- },
1634
- __wbg_new_227d7c05414eb861: function() {
1635
- const ret = new Error();
1636
- return ret;
1637
- },
1638
- __wbg_new_28744009d011f847: function() {
1639
- const ret = new Map();
1640
- return ret;
1641
- },
1642
- __wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
1643
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1644
- return ret;
1645
- },
1646
- __wbg_new_5502aad30c185fc8: function(arg0, arg1) {
1647
- try {
1648
- var state0 = {a: arg0, b: arg1};
1649
- var cb0 = (arg0, arg1) => {
1650
- const a = state0.a;
1651
- state0.a = 0;
1652
- try {
1653
- return wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1654
- } finally {
1655
- state0.a = a;
1656
- }
1657
- };
1658
- const ret = new Promise(cb0);
1659
- return ret;
1660
- } finally {
1661
- state0.a = 0;
1662
- }
1663
- },
1664
- __wbg_new_617a8cdb8bb1130e: function() {
1665
- const ret = new Object();
1666
- return ret;
1667
- },
1668
- __wbg_new_ee2291f50781bf1d: function() {
1669
- const ret = new Array();
1670
- return ret;
1671
- },
1672
- __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
1673
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1674
- return ret;
1675
- },
1676
- __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
1677
- try {
1678
- var state0 = {a: arg0, b: arg1};
1679
- var cb0 = (arg0, arg1) => {
1680
- const a = state0.a;
1681
- state0.a = 0;
1682
- try {
1683
- return wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(a, state0.b, arg0, arg1);
1684
- } finally {
1685
- state0.a = a;
1686
- }
1687
- };
1688
- const ret = new Promise(cb0);
1689
- return ret;
1690
- } finally {
1691
- state0.a = 0;
1692
- }
1693
- },
1694
- __wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
1695
- const ret = new Uint8Array(arg0 >>> 0);
1696
- return ret;
1697
- },
1698
- __wbg_new_with_str_sequence_f79e461d58fdeacc: function() { return handleError(function (arg0, arg1, arg2) {
1699
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
1700
- return ret;
1701
- }, arguments); },
1702
- __wbg_next_33784799010f1bbe: function(arg0) {
1703
- const ret = arg0.next;
1704
- return ret;
1705
- },
1706
- __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
1707
- const ret = arg0.next();
1708
- return ret;
1709
- }, arguments); },
1710
- __wbg_node_84ea875411254db1: function(arg0) {
1711
- const ret = arg0.node;
1712
- return ret;
1713
- },
1714
- __wbg_now_aa4ccb83129e9e55: function() {
1715
- const ret = Date.now();
1716
- return ret;
1717
- },
1718
- __wbg_now_e7c6795a7f81e10f: function(arg0) {
1719
- const ret = arg0.now();
1720
- return ret;
1721
- },
1722
- __wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
1723
- const ret = arg0.performance;
1724
- return ret;
1725
- },
1726
- __wbg_process_44c7a14e11e9f69e: function(arg0) {
1727
- const ret = arg0.process;
1728
- return ret;
1729
- },
1730
- __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
1731
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1732
- },
1733
- __wbg_push_2baf45db356cf468: function(arg0, arg1) {
1734
- const ret = arg0.push(arg1);
1735
- return ret;
1736
- },
1737
- __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
1738
- const ret = arg0.queueMicrotask;
1739
- return ret;
1740
- },
1741
- __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
1742
- queueMicrotask(arg0);
1743
- },
1744
- __wbg_queuemessage_new: function(arg0) {
1745
- const ret = QueueMessage.__wrap(arg0);
1746
- return ret;
1747
- },
1748
- __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
1749
- arg0.randomFillSync(arg1);
1750
- }, arguments); },
1751
- __wbg_readyState_d8514376867e415b: function(arg0) {
1752
- const ret = arg0.readyState;
1753
- return ret;
1754
- },
1755
- __wbg_reason_832acaf5f4083b7b: function(arg0, arg1) {
1756
- const ret = arg1.reason;
1757
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1758
- const len1 = WASM_VECTOR_LEN;
1759
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1760
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1761
- },
1762
- __wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
1763
- const ret = module.require;
1764
- return ret;
1765
- }, arguments); },
1766
- __wbg_resolve_0076e10020304ede: function(arg0) {
1767
- const ret = Promise.resolve(arg0);
1768
- return ret;
1769
- },
1770
- __wbg_send_797960c7a6a0270d: function() { return handleError(function (arg0, arg1) {
1771
- arg0.send(arg1);
1772
- }, arguments); },
1773
- __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
1774
- const ret = Reflect.set(arg0, arg1, arg2);
1775
- return ret;
1776
- }, arguments); },
1777
- __wbg_set_6ae97e73113c4f0b: function(arg0, arg1, arg2) {
1778
- const ret = arg0.set(arg1, arg2);
1779
- return ret;
1780
- },
1781
- __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1782
- arg0[arg1] = arg2;
1783
- },
1784
- __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
1785
- arg0[arg1 >>> 0] = arg2;
1786
- },
1787
- __wbg_set_binaryType_21835bf0df8f70aa: function(arg0, arg1) {
1788
- arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
1789
- },
1790
- __wbg_set_onclose_a84370531f3d2948: function(arg0, arg1) {
1791
- arg0.onclose = arg1;
1792
- },
1793
- __wbg_set_onerror_94ee307653399172: function(arg0, arg1) {
1794
- arg0.onerror = arg1;
1795
- },
1796
- __wbg_set_onmessage_cb6f77d2d8e0402a: function(arg0, arg1) {
1797
- arg0.onmessage = arg1;
1798
- },
1799
- __wbg_set_onopen_c914147e8a2db4b0: function(arg0, arg1) {
1800
- arg0.onopen = arg1;
1801
- },
1802
- __wbg_sqlitetransaction_new: function(arg0) {
1803
- const ret = SqliteTransaction.__wrap(arg0);
1804
- return ret;
1805
- },
1806
- __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
1807
- const ret = arg1.stack;
1808
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1809
- const len1 = WASM_VECTOR_LEN;
1810
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1811
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1812
- },
1813
- __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
1814
- const ret = typeof global === 'undefined' ? null : global;
1815
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1816
- },
1817
- __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
1818
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1819
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1820
- },
1821
- __wbg_static_accessor_SELF_0b583911f537483a: function() {
1822
- const ret = typeof self === 'undefined' ? null : self;
1823
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1824
- },
1825
- __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
1826
- const ret = typeof window === 'undefined' ? null : window;
1827
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1828
- },
1829
- __wbg_stringify_52ff602c1cc4fbb6: function() { return handleError(function (arg0) {
1830
- const ret = JSON.stringify(arg0);
1831
- return ret;
1832
- }, arguments); },
1833
- __wbg_subarray_002b94d5e13d1411: function(arg0, arg1, arg2) {
1834
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1835
- return ret;
1836
- },
1837
- __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
1838
- const ret = arg0.then(arg1, arg2);
1839
- return ret;
1840
- },
1841
- __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
1842
- const ret = arg0.then(arg1);
1843
- return ret;
1844
- },
1845
- __wbg_value_f3c585ee8f5ba40c: function(arg0) {
1846
- const ret = arg0.value;
1847
- return ret;
1848
- },
1849
- __wbg_versions_276b2795b1c6a219: function(arg0) {
1850
- const ret = arg0.versions;
1851
- return ret;
1852
- },
1853
- __wbg_websockethandle_new: function(arg0) {
1854
- const ret = WebSocketHandle.__wrap(arg0);
1855
- return ret;
1856
- },
1857
- __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1858
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2665, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1859
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_);
1860
- return ret;
1861
- },
1862
- __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1863
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1864
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_);
1865
- return ret;
1866
- },
1867
- __wbindgen_generic_0000000000000003: function(arg0, arg1) {
1868
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1869
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119);
1870
- return ret;
1871
- },
1872
- __wbindgen_generic_0000000000000004: function(arg0, arg1) {
1873
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1874
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120);
1875
- return ret;
1876
- },
1877
- __wbindgen_generic_0000000000000005: function(arg0, arg1) {
1878
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1879
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121);
1880
- return ret;
1881
- },
1882
- __wbindgen_generic_0000000000000006: function(arg0) {
1883
- // Cast intrinsic for `F64 -> Externref`.
1884
- const ret = arg0;
1885
- return ret;
1886
- },
1887
- __wbindgen_generic_0000000000000007: function(arg0) {
1888
- // Cast intrinsic for `I64 -> Externref`.
1889
- const ret = arg0;
1890
- return ret;
1891
- },
1892
- __wbindgen_generic_0000000000000008: function(arg0, arg1) {
1893
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1894
- const ret = getArrayU8FromWasm0(arg0, arg1);
1895
- return ret;
1896
- },
1897
- __wbindgen_generic_0000000000000009: function(arg0, arg1) {
1898
- // Cast intrinsic for `Ref(String) -> Externref`.
1899
- const ret = getStringFromWasm0(arg0, arg1);
1900
- return ret;
1901
- },
1902
- __wbindgen_generic_000000000000000a: function(arg0) {
1903
- // Cast intrinsic for `U64 -> Externref`.
1904
- const ret = BigInt.asUintN(64, arg0);
1905
- return ret;
1906
- },
1907
- __wbindgen_generic_000000000000000b: function(arg0, arg1) {
1908
- var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1909
- wasm.__wbindgen_free(arg0, arg1 * 1, 1);
1910
- // Cast intrinsic for `Vector(U8) -> Externref`.
1911
- const ret = v0;
1912
- return ret;
1913
- },
1914
- __wbindgen_init_externref_table: function() {
1915
- const table = wasm.__wbindgen_externrefs;
1916
- const offset = table.grow(4);
1917
- table.set(0, undefined);
1918
- table.set(offset + 0, undefined);
1919
- table.set(offset + 1, null);
1920
- table.set(offset + 2, true);
1921
- table.set(offset + 3, false);
1922
- },
1923
- };
1924
- return {
1925
- __proto__: null,
1926
- "./rivetkit_wasm_bg.js": import0,
1927
- };
1928
- }
1929
-
1930
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
1931
- wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
1932
- }
1933
-
1934
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119(arg0, arg1, arg2) {
1935
- wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119(arg0, arg1, arg2);
1936
- }
1937
-
1938
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120(arg0, arg1, arg2) {
1939
- wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120(arg0, arg1, arg2);
1940
- }
1941
-
1942
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121(arg0, arg1, arg2) {
1943
- wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121(arg0, arg1, arg2);
1944
- }
1945
-
1946
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_(arg0, arg1, arg2) {
1947
- const ret = wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_(arg0, arg1, arg2);
1948
- if (ret[1]) {
1949
- throw takeFromExternrefTable0(ret[0]);
1950
- }
1951
- }
1952
-
1953
- function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
1954
- wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
1955
- }
1956
-
1957
-
1958
- const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
1959
- const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
1960
- ? { register: () => {}, unregister: () => {} }
1961
- : new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr, 1));
1962
- const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
1963
- ? { register: () => {}, unregister: () => {} }
1964
- : new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr, 1));
1965
- const ActorStateTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1966
- ? { register: () => {}, unregister: () => {} }
1967
- : new FinalizationRegistry(ptr => wasm.__wbg_actorstatetransaction_free(ptr, 1));
1968
- const CancellationListenerFinalization = (typeof FinalizationRegistry === 'undefined')
1969
- ? { register: () => {}, unregister: () => {} }
1970
- : new FinalizationRegistry(ptr => wasm.__wbg_cancellationlistener_free(ptr, 1));
1971
- const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
1972
- ? { register: () => {}, unregister: () => {} }
1973
- : new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr, 1));
1974
- const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1975
- ? { register: () => {}, unregister: () => {} }
1976
- : new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr, 1));
1977
- const CoreRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
1978
- ? { register: () => {}, unregister: () => {} }
1979
- : new FinalizationRegistry(ptr => wasm.__wbg_coreregistry_free(ptr, 1));
1980
- const KvFinalization = (typeof FinalizationRegistry === 'undefined')
1981
- ? { register: () => {}, unregister: () => {} }
1982
- : new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr, 1));
1983
- const QueueFinalization = (typeof FinalizationRegistry === 'undefined')
1984
- ? { register: () => {}, unregister: () => {} }
1985
- : new FinalizationRegistry(ptr => wasm.__wbg_queue_free(ptr, 1));
1986
- const QueueMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1987
- ? { register: () => {}, unregister: () => {} }
1988
- : new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr, 1));
1989
- const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
1990
- ? { register: () => {}, unregister: () => {} }
1991
- : new FinalizationRegistry(ptr => wasm.__wbg_schedule_free(ptr, 1));
1992
- const SqliteDbFinalization = (typeof FinalizationRegistry === 'undefined')
1993
- ? { register: () => {}, unregister: () => {} }
1994
- : new FinalizationRegistry(ptr => wasm.__wbg_sqlitedb_free(ptr, 1));
1995
- const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1996
- ? { register: () => {}, unregister: () => {} }
1997
- : new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr, 1));
1998
- const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1999
- ? { register: () => {}, unregister: () => {} }
2000
- : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr, 1));
2001
-
2002
- function addToExternrefTable0(obj) {
2003
- const idx = wasm.__externref_table_alloc();
2004
- wasm.__wbindgen_externrefs.set(idx, obj);
2005
- return idx;
2006
- }
2007
-
2008
- function _assertClass(instance, klass) {
2009
- if (!(instance instanceof klass)) {
2010
- throw new Error(`expected instance of ${klass.name}`);
1523
+ * @param {string} sql
1524
+ * @param {any} params
1525
+ * @returns {Promise<any>}
1526
+ */
1527
+ execute(sql, params) {
1528
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1529
+ const len0 = WASM_VECTOR_LEN;
1530
+ const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
1531
+ return ret;
2011
1532
  }
2012
1533
  }
2013
1534
 
2014
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1535
+ const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
2015
1536
  ? { register: () => {}, unregister: () => {} }
2016
- : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1537
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr >>> 0, 1));
2017
1538
 
2018
- function debugString(val) {
2019
- // primitive types
2020
- const type = typeof val;
2021
- if (type == 'number' || type == 'boolean' || val == null) {
2022
- return `${val}`;
2023
- }
2024
- if (type == 'string') {
2025
- return `"${val}"`;
2026
- }
2027
- if (type == 'symbol') {
2028
- const description = val.description;
2029
- if (description == null) {
2030
- return 'Symbol';
2031
- } else {
2032
- return `Symbol(${description})`;
2033
- }
1539
+ export class SqliteTransaction {
1540
+
1541
+ static __wrap(ptr) {
1542
+ ptr = ptr >>> 0;
1543
+ const obj = Object.create(SqliteTransaction.prototype);
1544
+ obj.__wbg_ptr = ptr;
1545
+ SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
1546
+ return obj;
2034
1547
  }
2035
- if (type == 'function') {
2036
- const name = val.name;
2037
- if (typeof name == 'string' && name.length > 0) {
2038
- return `Function(${name})`;
2039
- } else {
2040
- return 'Function';
2041
- }
1548
+
1549
+ __destroy_into_raw() {
1550
+ const ptr = this.__wbg_ptr;
1551
+ this.__wbg_ptr = 0;
1552
+ SqliteTransactionFinalization.unregister(this);
1553
+ return ptr;
2042
1554
  }
2043
- // objects
2044
- if (Array.isArray(val)) {
2045
- const length = val.length;
2046
- let debug = '[';
2047
- if (length > 0) {
2048
- debug += debugString(val[0]);
2049
- }
2050
- for(let i = 1; i < length; i++) {
2051
- debug += ', ' + debugString(val[i]);
2052
- }
2053
- debug += ']';
2054
- return debug;
1555
+
1556
+ free() {
1557
+ const ptr = this.__destroy_into_raw();
1558
+ wasm.__wbg_sqlitetransaction_free(ptr, 0);
2055
1559
  }
2056
- // Test for built-in
2057
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
2058
- let className;
2059
- if (builtInMatches && builtInMatches.length > 1) {
2060
- className = builtInMatches[1];
2061
- } else {
2062
- // Failed to match the standard '[object ClassName]'
2063
- return toString.call(val);
1560
+ /**
1561
+ * @param {string} sql
1562
+ * @returns {Promise<any>}
1563
+ */
1564
+ exec(sql) {
1565
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1566
+ const len0 = WASM_VECTOR_LEN;
1567
+ const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
1568
+ return ret;
2064
1569
  }
2065
- if (className == 'Object') {
2066
- // we're a user defined class or Object
2067
- // JSON.stringify avoids problems with cycles, and is generally much
2068
- // easier than looping through ownProperties of `val`.
2069
- try {
2070
- return 'Object(' + JSON.stringify(val) + ')';
2071
- } catch (_) {
2072
- return 'Object';
2073
- }
1570
+ /**
1571
+ * @returns {Promise<void>}
1572
+ */
1573
+ commit() {
1574
+ const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
1575
+ return ret;
2074
1576
  }
2075
- // errors
2076
- if (val instanceof Error) {
2077
- return `${val.name}: ${val.message}\n${val.stack}`;
1577
+ /**
1578
+ * @param {string} sql
1579
+ * @param {any} params
1580
+ * @returns {Promise<any>}
1581
+ */
1582
+ execute(sql, params) {
1583
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1584
+ const len0 = WASM_VECTOR_LEN;
1585
+ const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
1586
+ return ret;
2078
1587
  }
2079
- // TODO we could test for more things here, like `Set`s and `Map`s.
2080
- return className;
2081
- }
2082
-
2083
- function getArrayU8FromWasm0(ptr, len) {
2084
- ptr = ptr >>> 0;
2085
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2086
- }
2087
-
2088
- let cachedDataViewMemory0 = null;
2089
- function getDataViewMemory0() {
2090
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2091
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1588
+ /**
1589
+ * @returns {Promise<void>}
1590
+ */
1591
+ rollback() {
1592
+ const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
1593
+ return ret;
2092
1594
  }
2093
- return cachedDataViewMemory0;
2094
1595
  }
2095
1596
 
2096
- function getStringFromWasm0(ptr, len) {
2097
- return decodeText(ptr >>> 0, len);
2098
- }
1597
+ const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1598
+ ? { register: () => {}, unregister: () => {} }
1599
+ : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
2099
1600
 
2100
- let cachedUint8ArrayMemory0 = null;
2101
- function getUint8ArrayMemory0() {
2102
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2103
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2104
- }
2105
- return cachedUint8ArrayMemory0;
2106
- }
1601
+ export class WebSocketHandle {
2107
1602
 
2108
- function handleError(f, args) {
2109
- try {
2110
- return f.apply(this, args);
2111
- } catch (e) {
2112
- const idx = addToExternrefTable0(e);
2113
- wasm.__wbindgen_exn_store(idx);
1603
+ static __wrap(ptr) {
1604
+ ptr = ptr >>> 0;
1605
+ const obj = Object.create(WebSocketHandle.prototype);
1606
+ obj.__wbg_ptr = ptr;
1607
+ WebSocketHandleFinalization.register(obj, obj.__wbg_ptr, obj);
1608
+ return obj;
2114
1609
  }
2115
- }
2116
-
2117
- function isLikeNone(x) {
2118
- return x === undefined || x === null;
2119
- }
2120
-
2121
- function makeMutClosure(arg0, arg1, f) {
2122
- const state = { a: arg0, b: arg1, cnt: 1 };
2123
- const real = (...args) => {
2124
-
2125
- // First up with a closure we increment the internal reference
2126
- // count. This ensures that the Rust closure environment won't
2127
- // be deallocated while we're invoking it.
2128
- state.cnt++;
2129
- const a = state.a;
2130
- state.a = 0;
2131
- try {
2132
- return f(a, state.b, ...args);
2133
- } finally {
2134
- state.a = a;
2135
- real._wbg_cb_unref();
2136
- }
2137
- };
2138
- real._wbg_cb_unref = () => {
2139
- if (--state.cnt === 0) {
2140
- wasm.__wbindgen_destroy_closure(state.a, state.b);
2141
- state.a = 0;
2142
- CLOSURE_DTORS.unregister(state);
2143
- }
2144
- };
2145
- CLOSURE_DTORS.register(real, state, state);
2146
- return real;
2147
- }
2148
-
2149
- function passArray8ToWasm0(arg, malloc) {
2150
- const ptr = malloc(arg.length * 1, 1) >>> 0;
2151
- getUint8ArrayMemory0().set(arg, ptr / 1);
2152
- WASM_VECTOR_LEN = arg.length;
2153
- return ptr;
2154
- }
2155
1610
 
2156
- function passStringToWasm0(arg, malloc, realloc) {
2157
- if (realloc === undefined) {
2158
- const buf = cachedTextEncoder.encode(arg);
2159
- const ptr = malloc(buf.length, 1) >>> 0;
2160
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2161
- WASM_VECTOR_LEN = buf.length;
1611
+ __destroy_into_raw() {
1612
+ const ptr = this.__wbg_ptr;
1613
+ this.__wbg_ptr = 0;
1614
+ WebSocketHandleFinalization.unregister(this);
2162
1615
  return ptr;
2163
1616
  }
2164
1617
 
2165
- let len = arg.length;
2166
- let ptr = malloc(len, 1) >>> 0;
2167
-
2168
- const mem = getUint8ArrayMemory0();
2169
-
2170
- let offset = 0;
2171
-
2172
- for (; offset < len; offset++) {
2173
- const code = arg.charCodeAt(offset);
2174
- if (code > 0x7F) break;
2175
- mem[ptr + offset] = code;
2176
- }
2177
- if (offset !== len) {
2178
- if (offset !== 0) {
2179
- arg = arg.slice(offset);
2180
- }
2181
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2182
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2183
- const ret = cachedTextEncoder.encodeInto(arg, view);
2184
-
2185
- offset += ret.written;
2186
- ptr = realloc(ptr, len, offset, 1) >>> 0;
1618
+ free() {
1619
+ const ptr = this.__destroy_into_raw();
1620
+ wasm.__wbg_websockethandle_free(ptr, 0);
2187
1621
  }
2188
-
2189
- WASM_VECTOR_LEN = offset;
2190
- return ptr;
2191
- }
2192
-
2193
- function takeFromExternrefTable0(idx) {
2194
- const value = wasm.__wbindgen_externrefs.get(idx);
2195
- wasm.__externref_table_dealloc(idx);
2196
- return value;
2197
- }
2198
-
2199
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2200
- cachedTextDecoder.decode();
2201
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
2202
- let numBytesDecoded = 0;
2203
- function decodeText(ptr, len) {
2204
- numBytesDecoded += len;
2205
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2206
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2207
- cachedTextDecoder.decode();
2208
- numBytesDecoded = len;
1622
+ /**
1623
+ * @param {Function} callback
1624
+ */
1625
+ setEventCallback(callback) {
1626
+ wasm.websockethandle_setEventCallback(this.__wbg_ptr, callback);
1627
+ }
1628
+ /**
1629
+ * @param {Uint8Array} data
1630
+ * @param {boolean} binary
1631
+ */
1632
+ send(data, binary) {
1633
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
1634
+ const len0 = WASM_VECTOR_LEN;
1635
+ const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
1636
+ if (ret[1]) {
1637
+ throw takeFromExternrefTable0(ret[0]);
1638
+ }
1639
+ }
1640
+ /**
1641
+ * @param {number | null} [code]
1642
+ * @param {string | null} [reason]
1643
+ * @returns {Promise<void>}
1644
+ */
1645
+ close(code, reason) {
1646
+ var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1647
+ var len0 = WASM_VECTOR_LEN;
1648
+ const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1649
+ return ret;
2209
1650
  }
2210
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2211
- }
2212
-
2213
- const cachedTextEncoder = new TextEncoder();
2214
-
2215
- if (!('encodeInto' in cachedTextEncoder)) {
2216
- cachedTextEncoder.encodeInto = function (arg, view) {
2217
- const buf = cachedTextEncoder.encode(arg);
2218
- view.set(buf);
2219
- return {
2220
- read: arg.length,
2221
- written: buf.length
2222
- };
2223
- };
2224
- }
2225
-
2226
- let WASM_VECTOR_LEN = 0;
2227
-
2228
- let wasmModule, wasmInstance, wasm;
2229
- function __wbg_finalize_init(instance, module) {
2230
- wasmInstance = instance;
2231
- wasm = instance.exports;
2232
- wasmModule = module;
2233
- cachedDataViewMemory0 = null;
2234
- cachedUint8ArrayMemory0 = null;
2235
- wasm.__wbindgen_start();
2236
- return wasm;
2237
1651
  }
2238
1652
 
2239
1653
  async function __wbg_load(module, imports) {
2240
1654
  if (typeof Response === 'function' && module instanceof Response) {
2241
- if (!module.ok) {
2242
- throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
2243
- }
2244
-
2245
1655
  if (typeof WebAssembly.instantiateStreaming === 'function') {
2246
1656
  try {
2247
1657
  return await WebAssembly.instantiateStreaming(module, imports);
2248
- } catch (e) {
2249
- const validResponse = expectedResponseType(module.type);
2250
1658
 
2251
- if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1659
+ } catch (e) {
1660
+ if (module.headers.get('Content-Type') != 'application/wasm') {
2252
1661
  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);
2253
1662
 
2254
- } else { throw e; }
1663
+ } else {
1664
+ throw e;
1665
+ }
2255
1666
  }
2256
1667
  }
2257
1668
 
2258
1669
  const bytes = await module.arrayBuffer();
2259
1670
  return await WebAssembly.instantiate(bytes, imports);
1671
+
2260
1672
  } else {
2261
1673
  const instance = await WebAssembly.instantiate(module, imports);
2262
1674
 
2263
1675
  if (instance instanceof WebAssembly.Instance) {
2264
1676
  return { instance, module };
1677
+
2265
1678
  } else {
2266
1679
  return instance;
2267
1680
  }
2268
1681
  }
1682
+ }
2269
1683
 
2270
- function expectedResponseType(type) {
2271
- switch (type) {
2272
- case 'basic': case 'cors': case 'default': return true;
1684
+ function __wbg_get_imports() {
1685
+ const imports = {};
1686
+ imports.wbg = {};
1687
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1688
+ const ret = String(arg1);
1689
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1690
+ const len1 = WASM_VECTOR_LEN;
1691
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1692
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1693
+ };
1694
+ imports.wbg.__wbg_actorcontext_new = function(arg0) {
1695
+ const ret = ActorContext.__wrap(arg0);
1696
+ return ret;
1697
+ };
1698
+ imports.wbg.__wbg_actorstatetransaction_new = function(arg0) {
1699
+ const ret = ActorStateTransaction.__wrap(arg0);
1700
+ return ret;
1701
+ };
1702
+ imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
1703
+ const ret = arg0.buffer;
1704
+ return ret;
1705
+ };
1706
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
1707
+ const ret = arg0.buffer;
1708
+ return ret;
1709
+ };
1710
+ imports.wbg.__wbg_bufferedAmount_a482960ac51b25e8 = function(arg0) {
1711
+ const ret = arg0.bufferedAmount;
1712
+ return ret;
1713
+ };
1714
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1715
+ const ret = arg0.call(arg1);
1716
+ return ret;
1717
+ }, arguments) };
1718
+ imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
1719
+ const ret = arg0.call(arg1, arg2);
1720
+ return ret;
1721
+ }, arguments) };
1722
+ imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1723
+ const ret = arg0.call(arg1, arg2, arg3);
1724
+ return ret;
1725
+ }, arguments) };
1726
+ imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
1727
+ const ret = CancellationToken.__wrap(arg0);
1728
+ return ret;
1729
+ };
1730
+ imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1731
+ arg0.close();
1732
+ }, arguments) };
1733
+ imports.wbg.__wbg_close_e1253d480ed93ce3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1734
+ arg0.close(arg1, getStringFromWasm0(arg2, arg3));
1735
+ }, arguments) };
1736
+ imports.wbg.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
1737
+ const ret = arg0.code;
1738
+ return ret;
1739
+ };
1740
+ imports.wbg.__wbg_connhandle_new = function(arg0) {
1741
+ const ret = ConnHandle.__wrap(arg0);
1742
+ return ret;
1743
+ };
1744
+ imports.wbg.__wbg_construct_b91ff0e53b60c0c3 = function() { return handleError(function (arg0, arg1) {
1745
+ const ret = Reflect.construct(arg0, arg1);
1746
+ return ret;
1747
+ }, arguments) };
1748
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1749
+ const ret = arg0.crypto;
1750
+ return ret;
1751
+ };
1752
+ imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
1753
+ const ret = arg0.data;
1754
+ return ret;
1755
+ };
1756
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
1757
+ const ret = arg0.done;
1758
+ return ret;
1759
+ };
1760
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
1761
+ let deferred0_0;
1762
+ let deferred0_1;
1763
+ try {
1764
+ deferred0_0 = arg0;
1765
+ deferred0_1 = arg1;
1766
+ console.error(getStringFromWasm0(arg0, arg1));
1767
+ } finally {
1768
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2273
1769
  }
2274
- return false;
2275
- }
1770
+ };
1771
+ imports.wbg.__wbg_getRandomValues_430b4ece0366b997 = function() { return handleError(function (arg0, arg1) {
1772
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1773
+ }, arguments) };
1774
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1775
+ arg0.getRandomValues(arg1);
1776
+ }, arguments) };
1777
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
1778
+ const ret = Reflect.get(arg0, arg1);
1779
+ return ret;
1780
+ }, arguments) };
1781
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
1782
+ const ret = arg0[arg1 >>> 0];
1783
+ return ret;
1784
+ };
1785
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
1786
+ const ret = arg0[arg1];
1787
+ return ret;
1788
+ };
1789
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
1790
+ let result;
1791
+ try {
1792
+ result = arg0 instanceof ArrayBuffer;
1793
+ } catch (_) {
1794
+ result = false;
1795
+ }
1796
+ const ret = result;
1797
+ return ret;
1798
+ };
1799
+ imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
1800
+ let result;
1801
+ try {
1802
+ result = arg0 instanceof Error;
1803
+ } catch (_) {
1804
+ result = false;
1805
+ }
1806
+ const ret = result;
1807
+ return ret;
1808
+ };
1809
+ imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
1810
+ let result;
1811
+ try {
1812
+ result = arg0 instanceof Object;
1813
+ } catch (_) {
1814
+ result = false;
1815
+ }
1816
+ const ret = result;
1817
+ return ret;
1818
+ };
1819
+ imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
1820
+ let result;
1821
+ try {
1822
+ result = arg0 instanceof Promise;
1823
+ } catch (_) {
1824
+ result = false;
1825
+ }
1826
+ const ret = result;
1827
+ return ret;
1828
+ };
1829
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
1830
+ let result;
1831
+ try {
1832
+ result = arg0 instanceof Uint8Array;
1833
+ } catch (_) {
1834
+ result = false;
1835
+ }
1836
+ const ret = result;
1837
+ return ret;
1838
+ };
1839
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
1840
+ const ret = Array.isArray(arg0);
1841
+ return ret;
1842
+ };
1843
+ imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
1844
+ const ret = Number.isSafeInteger(arg0);
1845
+ return ret;
1846
+ };
1847
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
1848
+ const ret = Symbol.iterator;
1849
+ return ret;
1850
+ };
1851
+ imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
1852
+ const ret = Object.keys(arg0);
1853
+ return ret;
1854
+ };
1855
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
1856
+ const ret = arg0.length;
1857
+ return ret;
1858
+ };
1859
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
1860
+ const ret = arg0.length;
1861
+ return ret;
1862
+ };
1863
+ imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
1864
+ const ret = arg0.message;
1865
+ return ret;
1866
+ };
1867
+ imports.wbg.__wbg_message_d1685a448ba00178 = function(arg0, arg1) {
1868
+ const ret = arg1.message;
1869
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1870
+ const len1 = WASM_VECTOR_LEN;
1871
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1872
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1873
+ };
1874
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1875
+ const ret = arg0.msCrypto;
1876
+ return ret;
1877
+ };
1878
+ imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
1879
+ try {
1880
+ var state0 = {a: arg0, b: arg1};
1881
+ var cb0 = (arg0, arg1) => {
1882
+ const a = state0.a;
1883
+ state0.a = 0;
1884
+ try {
1885
+ return __wbg_adapter_273(a, state0.b, arg0, arg1);
1886
+ } finally {
1887
+ state0.a = a;
1888
+ }
1889
+ };
1890
+ const ret = new Promise(cb0);
1891
+ return ret;
1892
+ } finally {
1893
+ state0.a = state0.b = 0;
1894
+ }
1895
+ };
1896
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
1897
+ const ret = new Object();
1898
+ return ret;
1899
+ };
1900
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
1901
+ const ret = new Map();
1902
+ return ret;
1903
+ };
1904
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
1905
+ const ret = new Array();
1906
+ return ret;
1907
+ };
1908
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1909
+ const ret = new Error();
1910
+ return ret;
1911
+ };
1912
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
1913
+ const ret = new Uint8Array(arg0);
1914
+ return ret;
1915
+ };
1916
+ imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
1917
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1918
+ return ret;
1919
+ };
1920
+ imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
1921
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1922
+ return ret;
1923
+ };
1924
+ imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
1925
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1926
+ return ret;
1927
+ };
1928
+ imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
1929
+ const ret = new Uint8Array(arg0 >>> 0);
1930
+ return ret;
1931
+ };
1932
+ imports.wbg.__wbg_newwithstrsequence_6e9d6479e1cf978d = function() { return handleError(function (arg0, arg1, arg2) {
1933
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
1934
+ return ret;
1935
+ }, arguments) };
1936
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
1937
+ const ret = arg0.next;
1938
+ return ret;
1939
+ };
1940
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
1941
+ const ret = arg0.next();
1942
+ return ret;
1943
+ }, arguments) };
1944
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1945
+ const ret = arg0.node;
1946
+ return ret;
1947
+ };
1948
+ imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
1949
+ const ret = arg0.now();
1950
+ return ret;
1951
+ };
1952
+ imports.wbg.__wbg_now_807e54c39636c349 = function() {
1953
+ const ret = Date.now();
1954
+ return ret;
1955
+ };
1956
+ imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
1957
+ const ret = arg0.performance;
1958
+ return ret;
1959
+ };
1960
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1961
+ const ret = arg0.process;
1962
+ return ret;
1963
+ };
1964
+ imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
1965
+ const ret = arg0.push(arg1);
1966
+ return ret;
1967
+ };
1968
+ imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
1969
+ queueMicrotask(arg0);
1970
+ };
1971
+ imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
1972
+ const ret = arg0.queueMicrotask;
1973
+ return ret;
1974
+ };
1975
+ imports.wbg.__wbg_queuemessage_new = function(arg0) {
1976
+ const ret = QueueMessage.__wrap(arg0);
1977
+ return ret;
1978
+ };
1979
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1980
+ arg0.randomFillSync(arg1);
1981
+ }, arguments) };
1982
+ imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
1983
+ const ret = arg0.readyState;
1984
+ return ret;
1985
+ };
1986
+ imports.wbg.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
1987
+ const ret = arg1.reason;
1988
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1989
+ const len1 = WASM_VECTOR_LEN;
1990
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1991
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1992
+ };
1993
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1994
+ const ret = module.require;
1995
+ return ret;
1996
+ }, arguments) };
1997
+ imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
1998
+ const ret = Promise.resolve(arg0);
1999
+ return ret;
2000
+ };
2001
+ imports.wbg.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
2002
+ arg0.send(arg1);
2003
+ }, arguments) };
2004
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
2005
+ arg0[arg1 >>> 0] = arg2;
2006
+ };
2007
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2008
+ arg0[arg1] = arg2;
2009
+ };
2010
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
2011
+ arg0.set(arg1, arg2 >>> 0);
2012
+ };
2013
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
2014
+ const ret = arg0.set(arg1, arg2);
2015
+ return ret;
2016
+ };
2017
+ imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
2018
+ const ret = Reflect.set(arg0, arg1, arg2);
2019
+ return ret;
2020
+ }, arguments) };
2021
+ imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
2022
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
2023
+ };
2024
+ imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
2025
+ arg0.onclose = arg1;
2026
+ };
2027
+ imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
2028
+ arg0.onerror = arg1;
2029
+ };
2030
+ imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
2031
+ arg0.onmessage = arg1;
2032
+ };
2033
+ imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
2034
+ arg0.onopen = arg1;
2035
+ };
2036
+ imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
2037
+ const ret = SqliteTransaction.__wrap(arg0);
2038
+ return ret;
2039
+ };
2040
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2041
+ const ret = arg1.stack;
2042
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2043
+ const len1 = WASM_VECTOR_LEN;
2044
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2045
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2046
+ };
2047
+ imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
2048
+ const ret = typeof global === 'undefined' ? null : global;
2049
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2050
+ };
2051
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
2052
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2053
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2054
+ };
2055
+ imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
2056
+ const ret = typeof self === 'undefined' ? null : self;
2057
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2058
+ };
2059
+ imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
2060
+ const ret = typeof window === 'undefined' ? null : window;
2061
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2062
+ };
2063
+ imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
2064
+ const ret = JSON.stringify(arg0);
2065
+ return ret;
2066
+ }, arguments) };
2067
+ imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
2068
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2069
+ return ret;
2070
+ };
2071
+ imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
2072
+ const ret = arg0.then(arg1);
2073
+ return ret;
2074
+ };
2075
+ imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
2076
+ const ret = arg0.then(arg1, arg2);
2077
+ return ret;
2078
+ };
2079
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
2080
+ const ret = arg0.value;
2081
+ return ret;
2082
+ };
2083
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
2084
+ const ret = arg0.versions;
2085
+ return ret;
2086
+ };
2087
+ imports.wbg.__wbg_websockethandle_new = function(arg0) {
2088
+ const ret = WebSocketHandle.__wrap(arg0);
2089
+ return ret;
2090
+ };
2091
+ imports.wbg.__wbindgen_as_number = function(arg0) {
2092
+ const ret = +arg0;
2093
+ return ret;
2094
+ };
2095
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
2096
+ const ret = arg0;
2097
+ return ret;
2098
+ };
2099
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2100
+ const ret = BigInt.asUintN(64, arg0);
2101
+ return ret;
2102
+ };
2103
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
2104
+ const v = arg0;
2105
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
2106
+ return ret;
2107
+ };
2108
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
2109
+ const obj = arg0.original;
2110
+ if (obj.cnt-- == 1) {
2111
+ obj.a = 0;
2112
+ return true;
2113
+ }
2114
+ const ret = false;
2115
+ return ret;
2116
+ };
2117
+ imports.wbg.__wbindgen_closure_wrapper4747 = function(arg0, arg1, arg2) {
2118
+ const ret = makeMutClosure(arg0, arg1, 1977, __wbg_adapter_50);
2119
+ return ret;
2120
+ };
2121
+ imports.wbg.__wbindgen_closure_wrapper4749 = function(arg0, arg1, arg2) {
2122
+ const ret = makeMutClosure(arg0, arg1, 1977, __wbg_adapter_50);
2123
+ return ret;
2124
+ };
2125
+ imports.wbg.__wbindgen_closure_wrapper4751 = function(arg0, arg1, arg2) {
2126
+ const ret = makeMutClosure(arg0, arg1, 1977, __wbg_adapter_50);
2127
+ return ret;
2128
+ };
2129
+ imports.wbg.__wbindgen_closure_wrapper4753 = function(arg0, arg1, arg2) {
2130
+ const ret = makeMutClosure(arg0, arg1, 1977, __wbg_adapter_50);
2131
+ return ret;
2132
+ };
2133
+ imports.wbg.__wbindgen_closure_wrapper5717 = function(arg0, arg1, arg2) {
2134
+ const ret = makeMutClosure(arg0, arg1, 2336, __wbg_adapter_59);
2135
+ return ret;
2136
+ };
2137
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
2138
+ const ret = debugString(arg1);
2139
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2140
+ const len1 = WASM_VECTOR_LEN;
2141
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2142
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2143
+ };
2144
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2145
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2146
+ return ret;
2147
+ };
2148
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
2149
+ const ret = arg0 in arg1;
2150
+ return ret;
2151
+ };
2152
+ imports.wbg.__wbindgen_init_externref_table = function() {
2153
+ const table = wasm.__wbindgen_export_4;
2154
+ const offset = table.grow(4);
2155
+ table.set(0, undefined);
2156
+ table.set(offset + 0, undefined);
2157
+ table.set(offset + 1, null);
2158
+ table.set(offset + 2, true);
2159
+ table.set(offset + 3, false);
2160
+ ;
2161
+ };
2162
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2163
+ const ret = typeof(arg0) === 'function';
2164
+ return ret;
2165
+ };
2166
+ imports.wbg.__wbindgen_is_null = function(arg0) {
2167
+ const ret = arg0 === null;
2168
+ return ret;
2169
+ };
2170
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2171
+ const val = arg0;
2172
+ const ret = typeof(val) === 'object' && val !== null;
2173
+ return ret;
2174
+ };
2175
+ imports.wbg.__wbindgen_is_string = function(arg0) {
2176
+ const ret = typeof(arg0) === 'string';
2177
+ return ret;
2178
+ };
2179
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2180
+ const ret = arg0 === undefined;
2181
+ return ret;
2182
+ };
2183
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2184
+ const ret = arg0 == arg1;
2185
+ return ret;
2186
+ };
2187
+ imports.wbg.__wbindgen_memory = function() {
2188
+ const ret = wasm.memory;
2189
+ return ret;
2190
+ };
2191
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2192
+ const obj = arg1;
2193
+ const ret = typeof(obj) === 'number' ? obj : undefined;
2194
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2195
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2196
+ };
2197
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2198
+ const ret = arg0;
2199
+ return ret;
2200
+ };
2201
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2202
+ const obj = arg1;
2203
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2204
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2205
+ var len1 = WASM_VECTOR_LEN;
2206
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2207
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2208
+ };
2209
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2210
+ const ret = getStringFromWasm0(arg0, arg1);
2211
+ return ret;
2212
+ };
2213
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
2214
+ throw new Error(getStringFromWasm0(arg0, arg1));
2215
+ };
2216
+ imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
2217
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2218
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2219
+ const ret = v0;
2220
+ return ret;
2221
+ };
2222
+
2223
+ return imports;
2224
+ }
2225
+
2226
+ function __wbg_init_memory(imports, memory) {
2227
+
2228
+ }
2229
+
2230
+ function __wbg_finalize_init(instance, module) {
2231
+ wasm = instance.exports;
2232
+ __wbg_init.__wbindgen_wasm_module = module;
2233
+ cachedDataViewMemory0 = null;
2234
+ cachedUint8ArrayMemory0 = null;
2235
+
2236
+
2237
+ wasm.__wbindgen_start();
2238
+ return wasm;
2276
2239
  }
2277
2240
 
2278
2241
  function initSync(module) {
2279
2242
  if (wasm !== undefined) return wasm;
2280
2243
 
2281
2244
 
2282
- if (module !== undefined) {
2245
+ if (typeof module !== 'undefined') {
2283
2246
  if (Object.getPrototypeOf(module) === Object.prototype) {
2284
2247
  ({module} = module)
2285
2248
  } else {
@@ -2288,10 +2251,15 @@ function initSync(module) {
2288
2251
  }
2289
2252
 
2290
2253
  const imports = __wbg_get_imports();
2254
+
2255
+ __wbg_init_memory(imports);
2256
+
2291
2257
  if (!(module instanceof WebAssembly.Module)) {
2292
2258
  module = new WebAssembly.Module(module);
2293
2259
  }
2260
+
2294
2261
  const instance = new WebAssembly.Instance(module, imports);
2262
+
2295
2263
  return __wbg_finalize_init(instance, module);
2296
2264
  }
2297
2265
 
@@ -2299,7 +2267,7 @@ async function __wbg_init(module_or_path) {
2299
2267
  if (wasm !== undefined) return wasm;
2300
2268
 
2301
2269
 
2302
- if (module_or_path !== undefined) {
2270
+ if (typeof module_or_path !== 'undefined') {
2303
2271
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2304
2272
  ({module_or_path} = module_or_path)
2305
2273
  } else {
@@ -2307,7 +2275,7 @@ async function __wbg_init(module_or_path) {
2307
2275
  }
2308
2276
  }
2309
2277
 
2310
- if (module_or_path === undefined) {
2278
+ if (typeof module_or_path === 'undefined') {
2311
2279
  module_or_path = new URL('rivetkit_wasm_bg.wasm', import.meta.url);
2312
2280
  }
2313
2281
  const imports = __wbg_get_imports();
@@ -2316,9 +2284,12 @@ async function __wbg_init(module_or_path) {
2316
2284
  module_or_path = fetch(module_or_path);
2317
2285
  }
2318
2286
 
2287
+ __wbg_init_memory(imports);
2288
+
2319
2289
  const { instance, module } = await __wbg_load(await module_or_path, imports);
2320
2290
 
2321
2291
  return __wbg_finalize_init(instance, module);
2322
2292
  }
2323
2293
 
2324
- export { initSync, __wbg_init as default };
2294
+ export { initSync };
2295
+ export default __wbg_init;