@diaryx/wasm 0.11.0 → 0.11.1-dev.193efc4
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.
- package/diaryx_wasm.d.ts +102 -354
- package/diaryx_wasm.js +134 -462
- package/diaryx_wasm_bg.wasm.d.ts +33 -55
- package/package.json +1 -1
- package/diaryx_wasm_bg.js +0 -1503
package/diaryx_wasm_bg.js
DELETED
|
@@ -1,1503 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified async backend with native storage.
|
|
3
|
-
*
|
|
4
|
-
* This is the main entry point for all workspace operations in WASM.
|
|
5
|
-
* It wraps either OPFS or IndexedDB storage and provides a complete
|
|
6
|
-
* async API for workspace, entry, search, and validation operations.
|
|
7
|
-
*
|
|
8
|
-
* ## Usage
|
|
9
|
-
*
|
|
10
|
-
* All operations go through `execute()` or `executeJs()`:
|
|
11
|
-
*
|
|
12
|
-
* ```javascript
|
|
13
|
-
* const backend = await DiaryxBackend.createOpfs();
|
|
14
|
-
* const response = await backend.executeJs({
|
|
15
|
-
* type: 'GetEntry',
|
|
16
|
-
* params: { path: 'workspace/notes.md' }
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export class DiaryxBackend {
|
|
21
|
-
static __wrap(ptr) {
|
|
22
|
-
ptr = ptr >>> 0;
|
|
23
|
-
const obj = Object.create(DiaryxBackend.prototype);
|
|
24
|
-
obj.__wbg_ptr = ptr;
|
|
25
|
-
DiaryxBackendFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
__destroy_into_raw() {
|
|
29
|
-
const ptr = this.__wbg_ptr;
|
|
30
|
-
this.__wbg_ptr = 0;
|
|
31
|
-
DiaryxBackendFinalization.unregister(this);
|
|
32
|
-
return ptr;
|
|
33
|
-
}
|
|
34
|
-
free() {
|
|
35
|
-
const ptr = this.__destroy_into_raw();
|
|
36
|
-
wasm.__wbg_diaryxbackend_free(ptr, 0);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Create backend with specific storage type.
|
|
40
|
-
* @param {string} storage_type
|
|
41
|
-
* @returns {Promise<DiaryxBackend>}
|
|
42
|
-
*/
|
|
43
|
-
static create(storage_type) {
|
|
44
|
-
const ptr0 = passStringToWasm0(storage_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
45
|
-
const len0 = WASM_VECTOR_LEN;
|
|
46
|
-
const ret = wasm.diaryxbackend_create(ptr0, len0);
|
|
47
|
-
return ret;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Create a new DiaryxBackend from a user-selected directory handle.
|
|
51
|
-
*
|
|
52
|
-
* This uses the File System Access API to read/write files directly
|
|
53
|
-
* on the user's filesystem. The handle must be obtained from
|
|
54
|
-
* `window.showDirectoryPicker()` in JavaScript.
|
|
55
|
-
*
|
|
56
|
-
* ## Browser Support
|
|
57
|
-
* - Chrome/Edge: ✅ Supported
|
|
58
|
-
* - Firefox: ❌ Not supported
|
|
59
|
-
* - Safari: ❌ Not supported
|
|
60
|
-
*
|
|
61
|
-
* ## Example
|
|
62
|
-
* ```javascript
|
|
63
|
-
* // User must trigger this via a gesture (click/keypress)
|
|
64
|
-
* const dirHandle = await window.showDirectoryPicker();
|
|
65
|
-
* const backend = await DiaryxBackend.createFromDirectoryHandle(dirHandle);
|
|
66
|
-
* ```
|
|
67
|
-
* @param {FileSystemDirectoryHandle} handle
|
|
68
|
-
* @returns {DiaryxBackend}
|
|
69
|
-
*/
|
|
70
|
-
static createFromDirectoryHandle(handle) {
|
|
71
|
-
const ret = wasm.diaryxbackend_createFromDirectoryHandle(handle);
|
|
72
|
-
if (ret[2]) {
|
|
73
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
74
|
-
}
|
|
75
|
-
return DiaryxBackend.__wrap(ret[0]);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Create a new DiaryxBackend with in-memory storage.
|
|
79
|
-
*
|
|
80
|
-
* This is used for guest mode in share sessions. Files are stored
|
|
81
|
-
* only in memory and are cleared when the session ends.
|
|
82
|
-
*
|
|
83
|
-
* ## Use Cases
|
|
84
|
-
* - Guest mode in share sessions (web)
|
|
85
|
-
* - Testing
|
|
86
|
-
*
|
|
87
|
-
* ## Example
|
|
88
|
-
* ```javascript
|
|
89
|
-
* const backend = DiaryxBackend.createInMemory();
|
|
90
|
-
* // Files are stored in memory only
|
|
91
|
-
* ```
|
|
92
|
-
* @returns {DiaryxBackend}
|
|
93
|
-
*/
|
|
94
|
-
static createInMemory() {
|
|
95
|
-
const ret = wasm.diaryxbackend_createInMemory();
|
|
96
|
-
if (ret[2]) {
|
|
97
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
98
|
-
}
|
|
99
|
-
return DiaryxBackend.__wrap(ret[0]);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Create a new DiaryxBackend with IndexedDB storage.
|
|
103
|
-
*
|
|
104
|
-
* This attempts to use persistent SQLite-based CRDT storage (via sql.js).
|
|
105
|
-
* If SQLite storage is not available, falls back to in-memory CRDT storage.
|
|
106
|
-
* @returns {Promise<DiaryxBackend>}
|
|
107
|
-
*/
|
|
108
|
-
static createIndexedDb() {
|
|
109
|
-
const ret = wasm.diaryxbackend_createIndexedDb();
|
|
110
|
-
return ret;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Create a new DiaryxBackend with OPFS storage.
|
|
114
|
-
*
|
|
115
|
-
* This attempts to use persistent SQLite-based CRDT storage (via sql.js).
|
|
116
|
-
* If SQLite storage is not available (JS bridge not initialized), falls back
|
|
117
|
-
* to in-memory CRDT storage.
|
|
118
|
-
*
|
|
119
|
-
* For persistent CRDT storage, call `initializeSqliteStorage()` in JavaScript
|
|
120
|
-
* before creating the backend:
|
|
121
|
-
*
|
|
122
|
-
* ```javascript
|
|
123
|
-
* import { initializeSqliteStorage } from './lib/storage/sqliteStorageBridge.js';
|
|
124
|
-
* await initializeSqliteStorage();
|
|
125
|
-
* const backend = await DiaryxBackend.createOpfs();
|
|
126
|
-
* ```
|
|
127
|
-
* @returns {Promise<DiaryxBackend>}
|
|
128
|
-
*/
|
|
129
|
-
static createOpfs() {
|
|
130
|
-
const ret = wasm.diaryxbackend_createOpfs();
|
|
131
|
-
return ret;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Emit a filesystem event.
|
|
135
|
-
*
|
|
136
|
-
* This is primarily used internally but can be called from JavaScript
|
|
137
|
-
* to manually trigger events (e.g., for testing or manual sync scenarios).
|
|
138
|
-
*
|
|
139
|
-
* The event should be a JSON string matching the FileSystemEvent format.
|
|
140
|
-
*
|
|
141
|
-
* ## Example
|
|
142
|
-
*
|
|
143
|
-
* ```javascript
|
|
144
|
-
* backend.emitFileSystemEvent(JSON.stringify({
|
|
145
|
-
* type: 'FileCreated',
|
|
146
|
-
* path: 'workspace/notes.md',
|
|
147
|
-
* frontmatter: { title: 'Notes' }
|
|
148
|
-
* }));
|
|
149
|
-
* ```
|
|
150
|
-
* @param {string} event_json
|
|
151
|
-
*/
|
|
152
|
-
emitFileSystemEvent(event_json) {
|
|
153
|
-
const ptr0 = passStringToWasm0(event_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
154
|
-
const len0 = WASM_VECTOR_LEN;
|
|
155
|
-
const ret = wasm.diaryxbackend_emitFileSystemEvent(this.__wbg_ptr, ptr0, len0);
|
|
156
|
-
if (ret[1]) {
|
|
157
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Get the number of active event subscriptions.
|
|
162
|
-
* @returns {number}
|
|
163
|
-
*/
|
|
164
|
-
eventSubscriberCount() {
|
|
165
|
-
const ret = wasm.diaryxbackend_eventSubscriberCount(this.__wbg_ptr);
|
|
166
|
-
return ret >>> 0;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Execute a command and return the response as JSON string.
|
|
170
|
-
*
|
|
171
|
-
* This is the primary unified API for all operations.
|
|
172
|
-
*
|
|
173
|
-
* ## Example
|
|
174
|
-
* ```javascript
|
|
175
|
-
* const command = { type: 'GetEntry', params: { path: 'workspace/notes.md' } };
|
|
176
|
-
* const responseJson = await backend.execute(JSON.stringify(command));
|
|
177
|
-
* const response = JSON.parse(responseJson);
|
|
178
|
-
* ```
|
|
179
|
-
* @param {string} command_json
|
|
180
|
-
* @returns {Promise<string>}
|
|
181
|
-
*/
|
|
182
|
-
execute(command_json) {
|
|
183
|
-
const ptr0 = passStringToWasm0(command_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
184
|
-
const len0 = WASM_VECTOR_LEN;
|
|
185
|
-
const ret = wasm.diaryxbackend_execute(this.__wbg_ptr, ptr0, len0);
|
|
186
|
-
return ret;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Execute a command from a JavaScript object directly.
|
|
190
|
-
*
|
|
191
|
-
* This avoids JSON serialization overhead for better performance.
|
|
192
|
-
* @param {any} command
|
|
193
|
-
* @returns {Promise<any>}
|
|
194
|
-
*/
|
|
195
|
-
executeJs(command) {
|
|
196
|
-
const ret = wasm.diaryxbackend_executeJs(this.__wbg_ptr, command);
|
|
197
|
-
return ret;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Get the current configuration from root index frontmatter.
|
|
201
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
202
|
-
* @returns {Promise<any>}
|
|
203
|
-
*/
|
|
204
|
-
getConfig() {
|
|
205
|
-
const ret = wasm.diaryxbackend_getConfig(this.__wbg_ptr);
|
|
206
|
-
return ret;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Unsubscribe from filesystem events.
|
|
210
|
-
*
|
|
211
|
-
* Returns `true` if the subscription was found and removed.
|
|
212
|
-
*
|
|
213
|
-
* ## Example
|
|
214
|
-
*
|
|
215
|
-
* ```javascript
|
|
216
|
-
* const id = backend.onFileSystemEvent(handler);
|
|
217
|
-
* // ... later ...
|
|
218
|
-
* const removed = backend.offFileSystemEvent(id);
|
|
219
|
-
* console.log('Subscription removed:', removed);
|
|
220
|
-
* ```
|
|
221
|
-
* @param {bigint} id
|
|
222
|
-
* @returns {boolean}
|
|
223
|
-
*/
|
|
224
|
-
offFileSystemEvent(id) {
|
|
225
|
-
const ret = wasm.diaryxbackend_offFileSystemEvent(this.__wbg_ptr, id);
|
|
226
|
-
return ret !== 0;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Subscribe to filesystem events.
|
|
230
|
-
*
|
|
231
|
-
* The callback will be invoked with a JSON-serialized FileSystemEvent
|
|
232
|
-
* whenever filesystem operations occur (create, delete, rename, move, etc.).
|
|
233
|
-
*
|
|
234
|
-
* Returns a subscription ID that can be used to unsubscribe later.
|
|
235
|
-
*
|
|
236
|
-
* ## Example
|
|
237
|
-
*
|
|
238
|
-
* ```javascript
|
|
239
|
-
* const id = backend.onFileSystemEvent((eventJson) => {
|
|
240
|
-
* const event = JSON.parse(eventJson);
|
|
241
|
-
* console.log('File event:', event.type, event.path);
|
|
242
|
-
* });
|
|
243
|
-
*
|
|
244
|
-
* // Later, to unsubscribe:
|
|
245
|
-
* backend.offFileSystemEvent(id);
|
|
246
|
-
* ```
|
|
247
|
-
* @param {Function} callback
|
|
248
|
-
* @returns {bigint}
|
|
249
|
-
*/
|
|
250
|
-
onFileSystemEvent(callback) {
|
|
251
|
-
const ret = wasm.diaryxbackend_onFileSystemEvent(this.__wbg_ptr, callback);
|
|
252
|
-
return BigInt.asUintN(64, ret);
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Read binary file.
|
|
256
|
-
*
|
|
257
|
-
* Returns data as Uint8Array for efficient handling without base64 encoding.
|
|
258
|
-
* @param {string} path
|
|
259
|
-
* @returns {Promise<any>}
|
|
260
|
-
*/
|
|
261
|
-
readBinary(path) {
|
|
262
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
-
const len0 = WASM_VECTOR_LEN;
|
|
264
|
-
const ret = wasm.diaryxbackend_readBinary(this.__wbg_ptr, ptr0, len0);
|
|
265
|
-
return ret;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Save configuration to root index frontmatter.
|
|
269
|
-
* Config keys are stored as `diaryx_*` properties.
|
|
270
|
-
* @param {any} config_js
|
|
271
|
-
* @returns {Promise<any>}
|
|
272
|
-
*/
|
|
273
|
-
saveConfig(config_js) {
|
|
274
|
-
const ret = wasm.diaryxbackend_saveConfig(this.__wbg_ptr, config_js);
|
|
275
|
-
return ret;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Write binary file.
|
|
279
|
-
*
|
|
280
|
-
* Accepts Uint8Array for efficient handling without base64 encoding.
|
|
281
|
-
* @param {string} path
|
|
282
|
-
* @param {Uint8Array} data
|
|
283
|
-
* @returns {Promise<any>}
|
|
284
|
-
*/
|
|
285
|
-
writeBinary(path, data) {
|
|
286
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
|
-
const len0 = WASM_VECTOR_LEN;
|
|
288
|
-
const ret = wasm.diaryxbackend_writeBinary(this.__wbg_ptr, ptr0, len0, data);
|
|
289
|
-
return ret;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (Symbol.dispose) DiaryxBackend.prototype[Symbol.dispose] = DiaryxBackend.prototype.free;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* AsyncFileSystem implementation backed by File System Access API.
|
|
296
|
-
*
|
|
297
|
-
* Allows editing files directly on the user's filesystem in a directory
|
|
298
|
-
* they select via `showDirectoryPicker()`.
|
|
299
|
-
*/
|
|
300
|
-
export class FsaFileSystem {
|
|
301
|
-
static __wrap(ptr) {
|
|
302
|
-
ptr = ptr >>> 0;
|
|
303
|
-
const obj = Object.create(FsaFileSystem.prototype);
|
|
304
|
-
obj.__wbg_ptr = ptr;
|
|
305
|
-
FsaFileSystemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
306
|
-
return obj;
|
|
307
|
-
}
|
|
308
|
-
__destroy_into_raw() {
|
|
309
|
-
const ptr = this.__wbg_ptr;
|
|
310
|
-
this.__wbg_ptr = 0;
|
|
311
|
-
FsaFileSystemFinalization.unregister(this);
|
|
312
|
-
return ptr;
|
|
313
|
-
}
|
|
314
|
-
free() {
|
|
315
|
-
const ptr = this.__destroy_into_raw();
|
|
316
|
-
wasm.__wbg_fsafilesystem_free(ptr, 0);
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Create a new FsaFileSystem from a user-selected directory handle.
|
|
320
|
-
*
|
|
321
|
-
* The handle must be obtained from `window.showDirectoryPicker()` in JavaScript.
|
|
322
|
-
* @param {FileSystemDirectoryHandle} handle
|
|
323
|
-
* @returns {FsaFileSystem}
|
|
324
|
-
*/
|
|
325
|
-
static fromHandle(handle) {
|
|
326
|
-
const ret = wasm.fsafilesystem_fromHandle(handle);
|
|
327
|
-
return FsaFileSystem.__wrap(ret);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
if (Symbol.dispose) FsaFileSystem.prototype[Symbol.dispose] = FsaFileSystem.prototype.free;
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* AsyncFileSystem implementation backed by IndexedDB.
|
|
334
|
-
*
|
|
335
|
-
* Used as a fallback for browsers that don't support OPFS or when
|
|
336
|
-
* running outside a Web Worker context (where OPFS sync access isn't available).
|
|
337
|
-
*/
|
|
338
|
-
export class IndexedDbFileSystem {
|
|
339
|
-
static __wrap(ptr) {
|
|
340
|
-
ptr = ptr >>> 0;
|
|
341
|
-
const obj = Object.create(IndexedDbFileSystem.prototype);
|
|
342
|
-
obj.__wbg_ptr = ptr;
|
|
343
|
-
IndexedDbFileSystemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
344
|
-
return obj;
|
|
345
|
-
}
|
|
346
|
-
__destroy_into_raw() {
|
|
347
|
-
const ptr = this.__wbg_ptr;
|
|
348
|
-
this.__wbg_ptr = 0;
|
|
349
|
-
IndexedDbFileSystemFinalization.unregister(this);
|
|
350
|
-
return ptr;
|
|
351
|
-
}
|
|
352
|
-
free() {
|
|
353
|
-
const ptr = this.__destroy_into_raw();
|
|
354
|
-
wasm.__wbg_indexeddbfilesystem_free(ptr, 0);
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Create a new IndexedDbFileSystem.
|
|
358
|
-
*
|
|
359
|
-
* Opens or creates the IndexedDB database with the required object stores.
|
|
360
|
-
* @returns {Promise<IndexedDbFileSystem>}
|
|
361
|
-
*/
|
|
362
|
-
static create() {
|
|
363
|
-
const ret = wasm.indexeddbfilesystem_create();
|
|
364
|
-
return ret;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
if (Symbol.dispose) IndexedDbFileSystem.prototype[Symbol.dispose] = IndexedDbFileSystem.prototype.free;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* An `AsyncFileSystem` implementation backed by JavaScript callbacks.
|
|
371
|
-
*
|
|
372
|
-
* This struct allows Rust code to use the async filesystem interface while
|
|
373
|
-
* delegating actual storage operations to JavaScript. This is useful for:
|
|
374
|
-
*
|
|
375
|
-
* - Using IndexedDB for persistent storage in browsers
|
|
376
|
-
* - Using OPFS (Origin Private File System) for better performance
|
|
377
|
-
* - Integrating with existing JavaScript storage solutions
|
|
378
|
-
* - Testing with mock filesystems
|
|
379
|
-
*
|
|
380
|
-
* ## Thread Safety
|
|
381
|
-
*
|
|
382
|
-
* This type is designed for single-threaded WASM environments. The callbacks
|
|
383
|
-
* JsValue is cloned into each async operation to satisfy Send requirements,
|
|
384
|
-
* but actual execution remains single-threaded.
|
|
385
|
-
*/
|
|
386
|
-
export class JsAsyncFileSystem {
|
|
387
|
-
__destroy_into_raw() {
|
|
388
|
-
const ptr = this.__wbg_ptr;
|
|
389
|
-
this.__wbg_ptr = 0;
|
|
390
|
-
JsAsyncFileSystemFinalization.unregister(this);
|
|
391
|
-
return ptr;
|
|
392
|
-
}
|
|
393
|
-
free() {
|
|
394
|
-
const ptr = this.__destroy_into_raw();
|
|
395
|
-
wasm.__wbg_jsasyncfilesystem_free(ptr, 0);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Check if the filesystem has a specific callback.
|
|
399
|
-
* @param {string} name
|
|
400
|
-
* @returns {boolean}
|
|
401
|
-
*/
|
|
402
|
-
has_callback(name) {
|
|
403
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
404
|
-
const len0 = WASM_VECTOR_LEN;
|
|
405
|
-
const ret = wasm.jsasyncfilesystem_has_callback(this.__wbg_ptr, ptr0, len0);
|
|
406
|
-
return ret !== 0;
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Create a new JsAsyncFileSystem with the provided callbacks.
|
|
410
|
-
*
|
|
411
|
-
* The callbacks object should implement the `JsFileSystemCallbacks` interface.
|
|
412
|
-
* All callbacks are optional - missing callbacks will cause operations to fail
|
|
413
|
-
* with appropriate errors.
|
|
414
|
-
* @param {any} callbacks
|
|
415
|
-
*/
|
|
416
|
-
constructor(callbacks) {
|
|
417
|
-
const ret = wasm.jsasyncfilesystem_new(callbacks);
|
|
418
|
-
this.__wbg_ptr = ret >>> 0;
|
|
419
|
-
JsAsyncFileSystemFinalization.register(this, this.__wbg_ptr, this);
|
|
420
|
-
return this;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
if (Symbol.dispose) JsAsyncFileSystem.prototype[Symbol.dispose] = JsAsyncFileSystem.prototype.free;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* AsyncFileSystem implementation backed by OPFS (Origin Private File System).
|
|
427
|
-
*
|
|
428
|
-
* Uses the browser's private file system for persistent storage.
|
|
429
|
-
* All operations are async and work directly with browser storage.
|
|
430
|
-
*/
|
|
431
|
-
export class OpfsFileSystem {
|
|
432
|
-
static __wrap(ptr) {
|
|
433
|
-
ptr = ptr >>> 0;
|
|
434
|
-
const obj = Object.create(OpfsFileSystem.prototype);
|
|
435
|
-
obj.__wbg_ptr = ptr;
|
|
436
|
-
OpfsFileSystemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
437
|
-
return obj;
|
|
438
|
-
}
|
|
439
|
-
__destroy_into_raw() {
|
|
440
|
-
const ptr = this.__wbg_ptr;
|
|
441
|
-
this.__wbg_ptr = 0;
|
|
442
|
-
OpfsFileSystemFinalization.unregister(this);
|
|
443
|
-
return ptr;
|
|
444
|
-
}
|
|
445
|
-
free() {
|
|
446
|
-
const ptr = this.__destroy_into_raw();
|
|
447
|
-
wasm.__wbg_opfsfilesystem_free(ptr, 0);
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Create a new OpfsFileSystem with the default app directory.
|
|
451
|
-
*
|
|
452
|
-
* This creates a "diaryx" directory in the origin-private file system.
|
|
453
|
-
* @returns {Promise<OpfsFileSystem>}
|
|
454
|
-
*/
|
|
455
|
-
static create() {
|
|
456
|
-
const ret = wasm.opfsfilesystem_create();
|
|
457
|
-
return ret;
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Create a new OpfsFileSystem with a custom root directory name.
|
|
461
|
-
* @param {string} root_name
|
|
462
|
-
* @returns {Promise<OpfsFileSystem>}
|
|
463
|
-
*/
|
|
464
|
-
static createWithName(root_name) {
|
|
465
|
-
const ptr0 = passStringToWasm0(root_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
466
|
-
const len0 = WASM_VECTOR_LEN;
|
|
467
|
-
const ret = wasm.opfsfilesystem_createWithName(ptr0, len0);
|
|
468
|
-
return ret;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
if (Symbol.dispose) OpfsFileSystem.prototype[Symbol.dispose] = OpfsFileSystem.prototype.free;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Initialize the WASM module. Called automatically on module load.
|
|
475
|
-
*/
|
|
476
|
-
export function init() {
|
|
477
|
-
wasm.init();
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Generate an ISO 8601 timestamp for the current time.
|
|
482
|
-
* @returns {string}
|
|
483
|
-
*/
|
|
484
|
-
export function now_timestamp() {
|
|
485
|
-
let deferred1_0;
|
|
486
|
-
let deferred1_1;
|
|
487
|
-
try {
|
|
488
|
-
const ret = wasm.now_timestamp();
|
|
489
|
-
deferred1_0 = ret[0];
|
|
490
|
-
deferred1_1 = ret[1];
|
|
491
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
492
|
-
} finally {
|
|
493
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Generate a formatted date string for the current date.
|
|
499
|
-
* @param {string} format
|
|
500
|
-
* @returns {string}
|
|
501
|
-
*/
|
|
502
|
-
export function today_formatted(format) {
|
|
503
|
-
let deferred2_0;
|
|
504
|
-
let deferred2_1;
|
|
505
|
-
try {
|
|
506
|
-
const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
507
|
-
const len0 = WASM_VECTOR_LEN;
|
|
508
|
-
const ret = wasm.today_formatted(ptr0, len0);
|
|
509
|
-
deferred2_0 = ret[0];
|
|
510
|
-
deferred2_1 = ret[1];
|
|
511
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
512
|
-
} finally {
|
|
513
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
|
|
517
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
518
|
-
return ret;
|
|
519
|
-
}
|
|
520
|
-
export function __wbg_Number_04624de7d0e8332d(arg0) {
|
|
521
|
-
const ret = Number(arg0);
|
|
522
|
-
return ret;
|
|
523
|
-
}
|
|
524
|
-
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
525
|
-
const ret = String(arg1);
|
|
526
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
527
|
-
const len1 = WASM_VECTOR_LEN;
|
|
528
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
529
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
530
|
-
}
|
|
531
|
-
export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
|
|
532
|
-
const v = arg1;
|
|
533
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
534
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
535
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
536
|
-
}
|
|
537
|
-
export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
|
|
538
|
-
const v = arg0;
|
|
539
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
540
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
541
|
-
}
|
|
542
|
-
export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
|
|
543
|
-
const ret = debugString(arg1);
|
|
544
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
545
|
-
const len1 = WASM_VECTOR_LEN;
|
|
546
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
547
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
548
|
-
}
|
|
549
|
-
export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
|
|
550
|
-
const ret = arg0 in arg1;
|
|
551
|
-
return ret;
|
|
552
|
-
}
|
|
553
|
-
export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
|
|
554
|
-
const ret = typeof(arg0) === 'bigint';
|
|
555
|
-
return ret;
|
|
556
|
-
}
|
|
557
|
-
export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
|
|
558
|
-
const ret = typeof(arg0) === 'function';
|
|
559
|
-
return ret;
|
|
560
|
-
}
|
|
561
|
-
export function __wbg___wbindgen_is_null_ac34f5003991759a(arg0) {
|
|
562
|
-
const ret = arg0 === null;
|
|
563
|
-
return ret;
|
|
564
|
-
}
|
|
565
|
-
export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
|
|
566
|
-
const val = arg0;
|
|
567
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
568
|
-
return ret;
|
|
569
|
-
}
|
|
570
|
-
export function __wbg___wbindgen_is_string_cd444516edc5b180(arg0) {
|
|
571
|
-
const ret = typeof(arg0) === 'string';
|
|
572
|
-
return ret;
|
|
573
|
-
}
|
|
574
|
-
export function __wbg___wbindgen_is_undefined_9e4d92534c42d778(arg0) {
|
|
575
|
-
const ret = arg0 === undefined;
|
|
576
|
-
return ret;
|
|
577
|
-
}
|
|
578
|
-
export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
|
|
579
|
-
const ret = arg0 === arg1;
|
|
580
|
-
return ret;
|
|
581
|
-
}
|
|
582
|
-
export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
|
|
583
|
-
const ret = arg0 == arg1;
|
|
584
|
-
return ret;
|
|
585
|
-
}
|
|
586
|
-
export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
|
|
587
|
-
const obj = arg1;
|
|
588
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
589
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
590
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
591
|
-
}
|
|
592
|
-
export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
|
|
593
|
-
const obj = arg1;
|
|
594
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
595
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
596
|
-
var len1 = WASM_VECTOR_LEN;
|
|
597
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
598
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
599
|
-
}
|
|
600
|
-
export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
|
|
601
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
602
|
-
}
|
|
603
|
-
export function __wbg__wbg_cb_unref_d9b87ff7982e3b21(arg0) {
|
|
604
|
-
arg0._wbg_cb_unref();
|
|
605
|
-
}
|
|
606
|
-
export function __wbg_abort_5151361027dc87df() { return handleError(function (arg0) {
|
|
607
|
-
arg0.abort();
|
|
608
|
-
}, arguments); }
|
|
609
|
-
export function __wbg_advance_92b0e42f9cd4e26b() { return handleError(function (arg0, arg1) {
|
|
610
|
-
arg0.advance(arg1 >>> 0);
|
|
611
|
-
}, arguments); }
|
|
612
|
-
export function __wbg_apply_2e22c45cb4f12415() { return handleError(function (arg0, arg1, arg2) {
|
|
613
|
-
const ret = Reflect.apply(arg0, arg1, arg2);
|
|
614
|
-
return ret;
|
|
615
|
-
}, arguments); }
|
|
616
|
-
export function __wbg_arrayBuffer_05ce1af23e9064e8(arg0) {
|
|
617
|
-
const ret = arg0.arrayBuffer();
|
|
618
|
-
return ret;
|
|
619
|
-
}
|
|
620
|
-
export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
|
|
621
|
-
const ret = arg0.call(arg1);
|
|
622
|
-
return ret;
|
|
623
|
-
}, arguments); }
|
|
624
|
-
export function __wbg_call_4708e0c13bdc8e95() { return handleError(function (arg0, arg1, arg2) {
|
|
625
|
-
const ret = arg0.call(arg1, arg2);
|
|
626
|
-
return ret;
|
|
627
|
-
}, arguments); }
|
|
628
|
-
export function __wbg_close_83fb809aca3de7f9(arg0) {
|
|
629
|
-
const ret = arg0.close();
|
|
630
|
-
return ret;
|
|
631
|
-
}
|
|
632
|
-
export function __wbg_createObjectStore_f75f59d55a549868() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
633
|
-
const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);
|
|
634
|
-
return ret;
|
|
635
|
-
}, arguments); }
|
|
636
|
-
export function __wbg_createWritable_6c6623bddc203fe6(arg0, arg1) {
|
|
637
|
-
const ret = arg0.createWritable(arg1);
|
|
638
|
-
return ret;
|
|
639
|
-
}
|
|
640
|
-
export function __wbg_crypto_86f2631e91b51511(arg0) {
|
|
641
|
-
const ret = arg0.crypto;
|
|
642
|
-
return ret;
|
|
643
|
-
}
|
|
644
|
-
export function __wbg_debug_46a93995fc6f8820(arg0, arg1, arg2, arg3) {
|
|
645
|
-
console.debug(arg0, arg1, arg2, arg3);
|
|
646
|
-
}
|
|
647
|
-
export function __wbg_delete_d6d7f750bd9ed2cd() { return handleError(function (arg0, arg1) {
|
|
648
|
-
const ret = arg0.delete(arg1);
|
|
649
|
-
return ret;
|
|
650
|
-
}, arguments); }
|
|
651
|
-
export function __wbg_diaryxbackend_new(arg0) {
|
|
652
|
-
const ret = DiaryxBackend.__wrap(arg0);
|
|
653
|
-
return ret;
|
|
654
|
-
}
|
|
655
|
-
export function __wbg_done_57b39ecd9addfe81(arg0) {
|
|
656
|
-
const ret = arg0.done;
|
|
657
|
-
return ret;
|
|
658
|
-
}
|
|
659
|
-
export function __wbg_entries_04a4b982351a717f(arg0) {
|
|
660
|
-
const ret = arg0.entries();
|
|
661
|
-
return ret;
|
|
662
|
-
}
|
|
663
|
-
export function __wbg_entries_58c7934c745daac7(arg0) {
|
|
664
|
-
const ret = Object.entries(arg0);
|
|
665
|
-
return ret;
|
|
666
|
-
}
|
|
667
|
-
export function __wbg_error_6afb95c784775817() { return handleError(function (arg0) {
|
|
668
|
-
const ret = arg0.error;
|
|
669
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
670
|
-
}, arguments); }
|
|
671
|
-
export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
672
|
-
let deferred0_0;
|
|
673
|
-
let deferred0_1;
|
|
674
|
-
try {
|
|
675
|
-
deferred0_0 = arg0;
|
|
676
|
-
deferred0_1 = arg1;
|
|
677
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
678
|
-
} finally {
|
|
679
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
export function __wbg_error_794d0ffc9d00d5c3(arg0, arg1, arg2, arg3) {
|
|
683
|
-
console.error(arg0, arg1, arg2, arg3);
|
|
684
|
-
}
|
|
685
|
-
export function __wbg_from_bddd64e7d5ff6941(arg0) {
|
|
686
|
-
const ret = Array.from(arg0);
|
|
687
|
-
return ret;
|
|
688
|
-
}
|
|
689
|
-
export function __wbg_getDirectoryHandle_87ce8ca53cf4d8dc(arg0, arg1, arg2, arg3) {
|
|
690
|
-
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
691
|
-
return ret;
|
|
692
|
-
}
|
|
693
|
-
export function __wbg_getFileHandle_ff4ab917b45affb3(arg0, arg1, arg2, arg3) {
|
|
694
|
-
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
695
|
-
return ret;
|
|
696
|
-
}
|
|
697
|
-
export function __wbg_getFile_115354fc950edc88(arg0) {
|
|
698
|
-
const ret = arg0.getFile();
|
|
699
|
-
return ret;
|
|
700
|
-
}
|
|
701
|
-
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
702
|
-
arg0.getRandomValues(arg1);
|
|
703
|
-
}, arguments); }
|
|
704
|
-
export function __wbg_getTime_1e3cd1391c5c3995(arg0) {
|
|
705
|
-
const ret = arg0.getTime();
|
|
706
|
-
return ret;
|
|
707
|
-
}
|
|
708
|
-
export function __wbg_getTimezoneOffset_81776d10a4ec18a8(arg0) {
|
|
709
|
-
const ret = arg0.getTimezoneOffset();
|
|
710
|
-
return ret;
|
|
711
|
-
}
|
|
712
|
-
export function __wbg_get_5e856edb32ac1289() { return handleError(function (arg0, arg1) {
|
|
713
|
-
const ret = arg0.get(arg1);
|
|
714
|
-
return ret;
|
|
715
|
-
}, arguments); }
|
|
716
|
-
export function __wbg_get_626204a85e34f823(arg0, arg1, arg2) {
|
|
717
|
-
const ret = arg1[arg2 >>> 0];
|
|
718
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
719
|
-
var len1 = WASM_VECTOR_LEN;
|
|
720
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
721
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
722
|
-
}
|
|
723
|
-
export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
|
|
724
|
-
const ret = arg0[arg1 >>> 0];
|
|
725
|
-
return ret;
|
|
726
|
-
}
|
|
727
|
-
export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
|
|
728
|
-
const ret = Reflect.get(arg0, arg1);
|
|
729
|
-
return ret;
|
|
730
|
-
}, arguments); }
|
|
731
|
-
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
732
|
-
const ret = arg0[arg1];
|
|
733
|
-
return ret;
|
|
734
|
-
}
|
|
735
|
-
export function __wbg_indexedDB_782f0610ea9fb144() { return handleError(function (arg0) {
|
|
736
|
-
const ret = arg0.indexedDB;
|
|
737
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
738
|
-
}, arguments); }
|
|
739
|
-
export function __wbg_indexedDB_9ddfb31df70de83b() { return handleError(function (arg0) {
|
|
740
|
-
const ret = arg0.indexedDB;
|
|
741
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
742
|
-
}, arguments); }
|
|
743
|
-
export function __wbg_indexeddbfilesystem_new(arg0) {
|
|
744
|
-
const ret = IndexedDbFileSystem.__wrap(arg0);
|
|
745
|
-
return ret;
|
|
746
|
-
}
|
|
747
|
-
export function __wbg_info_9e602cf10c5c690b(arg0, arg1, arg2, arg3) {
|
|
748
|
-
console.info(arg0, arg1, arg2, arg3);
|
|
749
|
-
}
|
|
750
|
-
export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
|
|
751
|
-
let result;
|
|
752
|
-
try {
|
|
753
|
-
result = arg0 instanceof ArrayBuffer;
|
|
754
|
-
} catch (_) {
|
|
755
|
-
result = false;
|
|
756
|
-
}
|
|
757
|
-
const ret = result;
|
|
758
|
-
return ret;
|
|
759
|
-
}
|
|
760
|
-
export function __wbg_instanceof_DomException_99c177193e554b75(arg0) {
|
|
761
|
-
let result;
|
|
762
|
-
try {
|
|
763
|
-
result = arg0 instanceof DOMException;
|
|
764
|
-
} catch (_) {
|
|
765
|
-
result = false;
|
|
766
|
-
}
|
|
767
|
-
const ret = result;
|
|
768
|
-
return ret;
|
|
769
|
-
}
|
|
770
|
-
export function __wbg_instanceof_FileSystemDirectoryHandle_56a167039d614548(arg0) {
|
|
771
|
-
let result;
|
|
772
|
-
try {
|
|
773
|
-
result = arg0 instanceof FileSystemDirectoryHandle;
|
|
774
|
-
} catch (_) {
|
|
775
|
-
result = false;
|
|
776
|
-
}
|
|
777
|
-
const ret = result;
|
|
778
|
-
return ret;
|
|
779
|
-
}
|
|
780
|
-
export function __wbg_instanceof_FileSystemFileHandle_fd8948f4bac4e78a(arg0) {
|
|
781
|
-
let result;
|
|
782
|
-
try {
|
|
783
|
-
result = arg0 instanceof FileSystemFileHandle;
|
|
784
|
-
} catch (_) {
|
|
785
|
-
result = false;
|
|
786
|
-
}
|
|
787
|
-
const ret = result;
|
|
788
|
-
return ret;
|
|
789
|
-
}
|
|
790
|
-
export function __wbg_instanceof_IdbCursor_2d04e6672d862a60(arg0) {
|
|
791
|
-
let result;
|
|
792
|
-
try {
|
|
793
|
-
result = arg0 instanceof IDBCursor;
|
|
794
|
-
} catch (_) {
|
|
795
|
-
result = false;
|
|
796
|
-
}
|
|
797
|
-
const ret = result;
|
|
798
|
-
return ret;
|
|
799
|
-
}
|
|
800
|
-
export function __wbg_instanceof_IdbDatabase_8d723b3ff4761c2d(arg0) {
|
|
801
|
-
let result;
|
|
802
|
-
try {
|
|
803
|
-
result = arg0 instanceof IDBDatabase;
|
|
804
|
-
} catch (_) {
|
|
805
|
-
result = false;
|
|
806
|
-
}
|
|
807
|
-
const ret = result;
|
|
808
|
-
return ret;
|
|
809
|
-
}
|
|
810
|
-
export function __wbg_instanceof_IdbOpenDbRequest_e476921a744b955b(arg0) {
|
|
811
|
-
let result;
|
|
812
|
-
try {
|
|
813
|
-
result = arg0 instanceof IDBOpenDBRequest;
|
|
814
|
-
} catch (_) {
|
|
815
|
-
result = false;
|
|
816
|
-
}
|
|
817
|
-
const ret = result;
|
|
818
|
-
return ret;
|
|
819
|
-
}
|
|
820
|
-
export function __wbg_instanceof_IdbRequest_6388508cc77f8da0(arg0) {
|
|
821
|
-
let result;
|
|
822
|
-
try {
|
|
823
|
-
result = arg0 instanceof IDBRequest;
|
|
824
|
-
} catch (_) {
|
|
825
|
-
result = false;
|
|
826
|
-
}
|
|
827
|
-
const ret = result;
|
|
828
|
-
return ret;
|
|
829
|
-
}
|
|
830
|
-
export function __wbg_instanceof_Map_53af74335dec57f4(arg0) {
|
|
831
|
-
let result;
|
|
832
|
-
try {
|
|
833
|
-
result = arg0 instanceof Map;
|
|
834
|
-
} catch (_) {
|
|
835
|
-
result = false;
|
|
836
|
-
}
|
|
837
|
-
const ret = result;
|
|
838
|
-
return ret;
|
|
839
|
-
}
|
|
840
|
-
export function __wbg_instanceof_Promise_0094681e3519d6ec(arg0) {
|
|
841
|
-
let result;
|
|
842
|
-
try {
|
|
843
|
-
result = arg0 instanceof Promise;
|
|
844
|
-
} catch (_) {
|
|
845
|
-
result = false;
|
|
846
|
-
}
|
|
847
|
-
const ret = result;
|
|
848
|
-
return ret;
|
|
849
|
-
}
|
|
850
|
-
export function __wbg_instanceof_TypeError_45484a0407e7f588(arg0) {
|
|
851
|
-
let result;
|
|
852
|
-
try {
|
|
853
|
-
result = arg0 instanceof TypeError;
|
|
854
|
-
} catch (_) {
|
|
855
|
-
result = false;
|
|
856
|
-
}
|
|
857
|
-
const ret = result;
|
|
858
|
-
return ret;
|
|
859
|
-
}
|
|
860
|
-
export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
|
|
861
|
-
let result;
|
|
862
|
-
try {
|
|
863
|
-
result = arg0 instanceof Uint8Array;
|
|
864
|
-
} catch (_) {
|
|
865
|
-
result = false;
|
|
866
|
-
}
|
|
867
|
-
const ret = result;
|
|
868
|
-
return ret;
|
|
869
|
-
}
|
|
870
|
-
export function __wbg_instanceof_Window_ed49b2db8df90359(arg0) {
|
|
871
|
-
let result;
|
|
872
|
-
try {
|
|
873
|
-
result = arg0 instanceof Window;
|
|
874
|
-
} catch (_) {
|
|
875
|
-
result = false;
|
|
876
|
-
}
|
|
877
|
-
const ret = result;
|
|
878
|
-
return ret;
|
|
879
|
-
}
|
|
880
|
-
export function __wbg_instanceof_WorkerGlobalScope_07b9d5514ff0156e(arg0) {
|
|
881
|
-
let result;
|
|
882
|
-
try {
|
|
883
|
-
result = arg0 instanceof WorkerGlobalScope;
|
|
884
|
-
} catch (_) {
|
|
885
|
-
result = false;
|
|
886
|
-
}
|
|
887
|
-
const ret = result;
|
|
888
|
-
return ret;
|
|
889
|
-
}
|
|
890
|
-
export function __wbg_isArray_d314bb98fcf08331(arg0) {
|
|
891
|
-
const ret = Array.isArray(arg0);
|
|
892
|
-
return ret;
|
|
893
|
-
}
|
|
894
|
-
export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
|
|
895
|
-
const ret = Number.isSafeInteger(arg0);
|
|
896
|
-
return ret;
|
|
897
|
-
}
|
|
898
|
-
export function __wbg_iterator_6ff6560ca1568e55() {
|
|
899
|
-
const ret = Symbol.iterator;
|
|
900
|
-
return ret;
|
|
901
|
-
}
|
|
902
|
-
export function __wbg_key_c27cb3b734638d81() { return handleError(function (arg0) {
|
|
903
|
-
const ret = arg0.key;
|
|
904
|
-
return ret;
|
|
905
|
-
}, arguments); }
|
|
906
|
-
export function __wbg_length_32ed9a279acd054c(arg0) {
|
|
907
|
-
const ret = arg0.length;
|
|
908
|
-
return ret;
|
|
909
|
-
}
|
|
910
|
-
export function __wbg_length_35a7bace40f36eac(arg0) {
|
|
911
|
-
const ret = arg0.length;
|
|
912
|
-
return ret;
|
|
913
|
-
}
|
|
914
|
-
export function __wbg_length_4c6eb4059a3635c9(arg0) {
|
|
915
|
-
const ret = arg0.length;
|
|
916
|
-
return ret;
|
|
917
|
-
}
|
|
918
|
-
export function __wbg_log_24aba2a6d8990b35(arg0, arg1, arg2, arg3) {
|
|
919
|
-
console.log(arg0, arg1, arg2, arg3);
|
|
920
|
-
}
|
|
921
|
-
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
922
|
-
const ret = arg0.msCrypto;
|
|
923
|
-
return ret;
|
|
924
|
-
}
|
|
925
|
-
export function __wbg_name_242753e5110cd756(arg0, arg1) {
|
|
926
|
-
const ret = arg1.name;
|
|
927
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
928
|
-
const len1 = WASM_VECTOR_LEN;
|
|
929
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
930
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
931
|
-
}
|
|
932
|
-
export function __wbg_new_0_73afc35eb544e539() {
|
|
933
|
-
const ret = new Date();
|
|
934
|
-
return ret;
|
|
935
|
-
}
|
|
936
|
-
export function __wbg_new_245cd5c49157e602(arg0) {
|
|
937
|
-
const ret = new Date(arg0);
|
|
938
|
-
return ret;
|
|
939
|
-
}
|
|
940
|
-
export function __wbg_new_361308b2356cecd0() {
|
|
941
|
-
const ret = new Object();
|
|
942
|
-
return ret;
|
|
943
|
-
}
|
|
944
|
-
export function __wbg_new_3eb36ae241fe6f44() {
|
|
945
|
-
const ret = new Array();
|
|
946
|
-
return ret;
|
|
947
|
-
}
|
|
948
|
-
export function __wbg_new_8a6f238a6ece86ea() {
|
|
949
|
-
const ret = new Error();
|
|
950
|
-
return ret;
|
|
951
|
-
}
|
|
952
|
-
export function __wbg_new_b5d9e2fb389fef91(arg0, arg1) {
|
|
953
|
-
try {
|
|
954
|
-
var state0 = {a: arg0, b: arg1};
|
|
955
|
-
var cb0 = (arg0, arg1) => {
|
|
956
|
-
const a = state0.a;
|
|
957
|
-
state0.a = 0;
|
|
958
|
-
try {
|
|
959
|
-
return wasm_bindgen__convert__closures_____invoke__h2f2d4d3fa08c2121(a, state0.b, arg0, arg1);
|
|
960
|
-
} finally {
|
|
961
|
-
state0.a = a;
|
|
962
|
-
}
|
|
963
|
-
};
|
|
964
|
-
const ret = new Promise(cb0);
|
|
965
|
-
return ret;
|
|
966
|
-
} finally {
|
|
967
|
-
state0.a = state0.b = 0;
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
export function __wbg_new_dca287b076112a51() {
|
|
971
|
-
const ret = new Map();
|
|
972
|
-
return ret;
|
|
973
|
-
}
|
|
974
|
-
export function __wbg_new_dd2b680c8bf6ae29(arg0) {
|
|
975
|
-
const ret = new Uint8Array(arg0);
|
|
976
|
-
return ret;
|
|
977
|
-
}
|
|
978
|
-
export function __wbg_new_from_slice_a3d2629dc1826784(arg0, arg1) {
|
|
979
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
980
|
-
return ret;
|
|
981
|
-
}
|
|
982
|
-
export function __wbg_new_no_args_1c7c842f08d00ebb(arg0, arg1) {
|
|
983
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
984
|
-
return ret;
|
|
985
|
-
}
|
|
986
|
-
export function __wbg_new_with_length_1763c527b2923202(arg0) {
|
|
987
|
-
const ret = new Array(arg0 >>> 0);
|
|
988
|
-
return ret;
|
|
989
|
-
}
|
|
990
|
-
export function __wbg_new_with_length_a2c39cbe88fd8ff1(arg0) {
|
|
991
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
992
|
-
return ret;
|
|
993
|
-
}
|
|
994
|
-
export function __wbg_new_with_u8_array_sequence_fd1dafbce0db92f4() { return handleError(function (arg0, arg1, arg2) {
|
|
995
|
-
const ret = new File(arg0, getStringFromWasm0(arg1, arg2));
|
|
996
|
-
return ret;
|
|
997
|
-
}, arguments); }
|
|
998
|
-
export function __wbg_next_0a5e0f8af98146aa() { return handleError(function (arg0) {
|
|
999
|
-
const ret = arg0.next();
|
|
1000
|
-
return ret;
|
|
1001
|
-
}, arguments); }
|
|
1002
|
-
export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
|
|
1003
|
-
const ret = arg0.next();
|
|
1004
|
-
return ret;
|
|
1005
|
-
}, arguments); }
|
|
1006
|
-
export function __wbg_next_418f80d8f5303233(arg0) {
|
|
1007
|
-
const ret = arg0.next;
|
|
1008
|
-
return ret;
|
|
1009
|
-
}
|
|
1010
|
-
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1011
|
-
const ret = arg0.node;
|
|
1012
|
-
return ret;
|
|
1013
|
-
}
|
|
1014
|
-
export function __wbg_objectStoreNames_d2c5d2377420ad78(arg0) {
|
|
1015
|
-
const ret = arg0.objectStoreNames;
|
|
1016
|
-
return ret;
|
|
1017
|
-
}
|
|
1018
|
-
export function __wbg_objectStore_d56e603390dcc165() { return handleError(function (arg0, arg1, arg2) {
|
|
1019
|
-
const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
|
|
1020
|
-
return ret;
|
|
1021
|
-
}, arguments); }
|
|
1022
|
-
export function __wbg_openCursor_500d2e73adae3a19() { return handleError(function (arg0, arg1, arg2) {
|
|
1023
|
-
const ret = arg0.openCursor(arg1, __wbindgen_enum_IdbCursorDirection[arg2]);
|
|
1024
|
-
return ret;
|
|
1025
|
-
}, arguments); }
|
|
1026
|
-
export function __wbg_openCursor_73adc695cace4477() { return handleError(function (arg0, arg1, arg2) {
|
|
1027
|
-
const ret = arg0.openCursor(arg1, __wbindgen_enum_IdbCursorDirection[arg2]);
|
|
1028
|
-
return ret;
|
|
1029
|
-
}, arguments); }
|
|
1030
|
-
export function __wbg_open_82db86fd5b087109() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1031
|
-
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
1032
|
-
return ret;
|
|
1033
|
-
}, arguments); }
|
|
1034
|
-
export function __wbg_opfsfilesystem_new(arg0) {
|
|
1035
|
-
const ret = OpfsFileSystem.__wrap(arg0);
|
|
1036
|
-
return ret;
|
|
1037
|
-
}
|
|
1038
|
-
export function __wbg_parse_708461a1feddfb38() { return handleError(function (arg0, arg1) {
|
|
1039
|
-
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1040
|
-
return ret;
|
|
1041
|
-
}, arguments); }
|
|
1042
|
-
export function __wbg_preventDefault_cdcfcd7e301b9702(arg0) {
|
|
1043
|
-
arg0.preventDefault();
|
|
1044
|
-
}
|
|
1045
|
-
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1046
|
-
const ret = arg0.process;
|
|
1047
|
-
return ret;
|
|
1048
|
-
}
|
|
1049
|
-
export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
|
|
1050
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1051
|
-
}
|
|
1052
|
-
export function __wbg_push_8ffdcb2063340ba5(arg0, arg1) {
|
|
1053
|
-
const ret = arg0.push(arg1);
|
|
1054
|
-
return ret;
|
|
1055
|
-
}
|
|
1056
|
-
export function __wbg_put_b34701a38436f20a() { return handleError(function (arg0, arg1, arg2) {
|
|
1057
|
-
const ret = arg0.put(arg1, arg2);
|
|
1058
|
-
return ret;
|
|
1059
|
-
}, arguments); }
|
|
1060
|
-
export function __wbg_queueMicrotask_0aa0a927f78f5d98(arg0) {
|
|
1061
|
-
const ret = arg0.queueMicrotask;
|
|
1062
|
-
return ret;
|
|
1063
|
-
}
|
|
1064
|
-
export function __wbg_queueMicrotask_5bb536982f78a56f(arg0) {
|
|
1065
|
-
queueMicrotask(arg0);
|
|
1066
|
-
}
|
|
1067
|
-
export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
|
|
1068
|
-
arg0.randomFillSync(arg1);
|
|
1069
|
-
}, arguments); }
|
|
1070
|
-
export function __wbg_removeEntry_d1cc9710704217eb(arg0, arg1, arg2) {
|
|
1071
|
-
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
1072
|
-
return ret;
|
|
1073
|
-
}
|
|
1074
|
-
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
1075
|
-
const ret = module.require;
|
|
1076
|
-
return ret;
|
|
1077
|
-
}, arguments); }
|
|
1078
|
-
export function __wbg_resolve_002c4b7d9d8f6b64(arg0) {
|
|
1079
|
-
const ret = Promise.resolve(arg0);
|
|
1080
|
-
return ret;
|
|
1081
|
-
}
|
|
1082
|
-
export function __wbg_result_233b2d68aae87a05() { return handleError(function (arg0) {
|
|
1083
|
-
const ret = arg0.result;
|
|
1084
|
-
return ret;
|
|
1085
|
-
}, arguments); }
|
|
1086
|
-
export function __wbg_set_1eb0999cf5d27fc8(arg0, arg1, arg2) {
|
|
1087
|
-
const ret = arg0.set(arg1, arg2);
|
|
1088
|
-
return ret;
|
|
1089
|
-
}
|
|
1090
|
-
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
1091
|
-
arg0[arg1] = arg2;
|
|
1092
|
-
}
|
|
1093
|
-
export function __wbg_set_cc56eefd2dd91957(arg0, arg1, arg2) {
|
|
1094
|
-
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1095
|
-
}
|
|
1096
|
-
export function __wbg_set_create_1f902c5936adde7d(arg0, arg1) {
|
|
1097
|
-
arg0.create = arg1 !== 0;
|
|
1098
|
-
}
|
|
1099
|
-
export function __wbg_set_create_c95ddca018fac9ce(arg0, arg1) {
|
|
1100
|
-
arg0.create = arg1 !== 0;
|
|
1101
|
-
}
|
|
1102
|
-
export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
|
|
1103
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1104
|
-
}
|
|
1105
|
-
export function __wbg_set_keep_existing_data_ac7fffea75f37b19(arg0, arg1) {
|
|
1106
|
-
arg0.keepExistingData = arg1 !== 0;
|
|
1107
|
-
}
|
|
1108
|
-
export function __wbg_set_onerror_dc0e606b09e1792f(arg0, arg1) {
|
|
1109
|
-
arg0.onerror = arg1;
|
|
1110
|
-
}
|
|
1111
|
-
export function __wbg_set_onsuccess_0edec1acb4124784(arg0, arg1) {
|
|
1112
|
-
arg0.onsuccess = arg1;
|
|
1113
|
-
}
|
|
1114
|
-
export function __wbg_set_onupgradeneeded_c887b74722b6ce77(arg0, arg1) {
|
|
1115
|
-
arg0.onupgradeneeded = arg1;
|
|
1116
|
-
}
|
|
1117
|
-
export function __wbg_size_e05d31cc6049815f(arg0) {
|
|
1118
|
-
const ret = arg0.size;
|
|
1119
|
-
return ret;
|
|
1120
|
-
}
|
|
1121
|
-
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
1122
|
-
const ret = arg1.stack;
|
|
1123
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1124
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1125
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1126
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1127
|
-
}
|
|
1128
|
-
export function __wbg_static_accessor_GLOBAL_12837167ad935116() {
|
|
1129
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1130
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1131
|
-
}
|
|
1132
|
-
export function __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f() {
|
|
1133
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1134
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1135
|
-
}
|
|
1136
|
-
export function __wbg_static_accessor_SELF_a621d3dfbb60d0ce() {
|
|
1137
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1138
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1139
|
-
}
|
|
1140
|
-
export function __wbg_static_accessor_WINDOW_f8727f0cf888e0bd() {
|
|
1141
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1142
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1143
|
-
}
|
|
1144
|
-
export function __wbg_stringify_8d1cc6ff383e8bae() { return handleError(function (arg0) {
|
|
1145
|
-
const ret = JSON.stringify(arg0);
|
|
1146
|
-
return ret;
|
|
1147
|
-
}, arguments); }
|
|
1148
|
-
export function __wbg_subarray_a96e1fef17ed23cb(arg0, arg1, arg2) {
|
|
1149
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1150
|
-
return ret;
|
|
1151
|
-
}
|
|
1152
|
-
export function __wbg_target_521be630ab05b11e(arg0) {
|
|
1153
|
-
const ret = arg0.target;
|
|
1154
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1155
|
-
}
|
|
1156
|
-
export function __wbg_then_0d9fe2c7b1857d32(arg0, arg1, arg2) {
|
|
1157
|
-
const ret = arg0.then(arg1, arg2);
|
|
1158
|
-
return ret;
|
|
1159
|
-
}
|
|
1160
|
-
export function __wbg_then_b9e7b3b5f1a9e1b5(arg0, arg1) {
|
|
1161
|
-
const ret = arg0.then(arg1);
|
|
1162
|
-
return ret;
|
|
1163
|
-
}
|
|
1164
|
-
export function __wbg_transaction_5124caf7db668498(arg0) {
|
|
1165
|
-
const ret = arg0.transaction;
|
|
1166
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1167
|
-
}
|
|
1168
|
-
export function __wbg_transaction_c407989db8e62119() { return handleError(function (arg0, arg1, arg2) {
|
|
1169
|
-
const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);
|
|
1170
|
-
return ret;
|
|
1171
|
-
}, arguments); }
|
|
1172
|
-
export function __wbg_value_0546255b415e96c1(arg0) {
|
|
1173
|
-
const ret = arg0.value;
|
|
1174
|
-
return ret;
|
|
1175
|
-
}
|
|
1176
|
-
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
1177
|
-
const ret = arg0.versions;
|
|
1178
|
-
return ret;
|
|
1179
|
-
}
|
|
1180
|
-
export function __wbg_warn_a40b971467b219c7(arg0, arg1, arg2, arg3) {
|
|
1181
|
-
console.warn(arg0, arg1, arg2, arg3);
|
|
1182
|
-
}
|
|
1183
|
-
export function __wbg_write_18bb6149b26694db() { return handleError(function (arg0, arg1) {
|
|
1184
|
-
const ret = arg0.write(arg1);
|
|
1185
|
-
return ret;
|
|
1186
|
-
}, arguments); }
|
|
1187
|
-
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1188
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 450, function: Function { arguments: [NamedExternref("Event")], shim_idx: 451, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1189
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3207d3de746ef5e2, wasm_bindgen__convert__closures_____invoke__hdbbb5e1beb3401d4);
|
|
1190
|
-
return ret;
|
|
1191
|
-
}
|
|
1192
|
-
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1193
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 450, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 453, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1194
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3207d3de746ef5e2, wasm_bindgen__convert__closures_____invoke__hbbc6038b24f8d152);
|
|
1195
|
-
return ret;
|
|
1196
|
-
}
|
|
1197
|
-
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1198
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 538, function: Function { arguments: [NamedExternref("Event")], shim_idx: 539, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1199
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88b3e469dade6c46, wasm_bindgen__convert__closures_____invoke__h97d0adf63bca03cc);
|
|
1200
|
-
return ret;
|
|
1201
|
-
}
|
|
1202
|
-
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1203
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 554, function: Function { arguments: [Externref], shim_idx: 555, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1204
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__haafcdc926049c11f, wasm_bindgen__convert__closures_____invoke__h843eed1c1c010975);
|
|
1205
|
-
return ret;
|
|
1206
|
-
}
|
|
1207
|
-
export function __wbindgen_cast_0000000000000005(arg0) {
|
|
1208
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
1209
|
-
const ret = arg0;
|
|
1210
|
-
return ret;
|
|
1211
|
-
}
|
|
1212
|
-
export function __wbindgen_cast_0000000000000006(arg0) {
|
|
1213
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
1214
|
-
const ret = arg0;
|
|
1215
|
-
return ret;
|
|
1216
|
-
}
|
|
1217
|
-
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1218
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1219
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1220
|
-
return ret;
|
|
1221
|
-
}
|
|
1222
|
-
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
1223
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1224
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1225
|
-
return ret;
|
|
1226
|
-
}
|
|
1227
|
-
export function __wbindgen_cast_0000000000000009(arg0) {
|
|
1228
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
1229
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1230
|
-
return ret;
|
|
1231
|
-
}
|
|
1232
|
-
export function __wbindgen_init_externref_table() {
|
|
1233
|
-
const table = wasm.__wbindgen_externrefs;
|
|
1234
|
-
const offset = table.grow(4);
|
|
1235
|
-
table.set(0, undefined);
|
|
1236
|
-
table.set(offset + 0, undefined);
|
|
1237
|
-
table.set(offset + 1, null);
|
|
1238
|
-
table.set(offset + 2, true);
|
|
1239
|
-
table.set(offset + 3, false);
|
|
1240
|
-
}
|
|
1241
|
-
function wasm_bindgen__convert__closures_____invoke__hbbc6038b24f8d152(arg0, arg1, arg2) {
|
|
1242
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hbbc6038b24f8d152(arg0, arg1, arg2);
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
function wasm_bindgen__convert__closures_____invoke__h97d0adf63bca03cc(arg0, arg1, arg2) {
|
|
1246
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h97d0adf63bca03cc(arg0, arg1, arg2);
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function wasm_bindgen__convert__closures_____invoke__h843eed1c1c010975(arg0, arg1, arg2) {
|
|
1250
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h843eed1c1c010975(arg0, arg1, arg2);
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
function wasm_bindgen__convert__closures_____invoke__hdbbb5e1beb3401d4(arg0, arg1, arg2) {
|
|
1254
|
-
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hdbbb5e1beb3401d4(arg0, arg1, arg2);
|
|
1255
|
-
if (ret[1]) {
|
|
1256
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
function wasm_bindgen__convert__closures_____invoke__h2f2d4d3fa08c2121(arg0, arg1, arg2, arg3) {
|
|
1261
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h2f2d4d3fa08c2121(arg0, arg1, arg2, arg3);
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
const __wbindgen_enum_IdbCursorDirection = ["next", "nextunique", "prev", "prevunique"];
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
1269
|
-
const DiaryxBackendFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1270
|
-
? { register: () => {}, unregister: () => {} }
|
|
1271
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_diaryxbackend_free(ptr >>> 0, 1));
|
|
1272
|
-
const FsaFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1273
|
-
? { register: () => {}, unregister: () => {} }
|
|
1274
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_fsafilesystem_free(ptr >>> 0, 1));
|
|
1275
|
-
const IndexedDbFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1276
|
-
? { register: () => {}, unregister: () => {} }
|
|
1277
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_indexeddbfilesystem_free(ptr >>> 0, 1));
|
|
1278
|
-
const JsAsyncFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1279
|
-
? { register: () => {}, unregister: () => {} }
|
|
1280
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jsasyncfilesystem_free(ptr >>> 0, 1));
|
|
1281
|
-
const OpfsFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1282
|
-
? { register: () => {}, unregister: () => {} }
|
|
1283
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_opfsfilesystem_free(ptr >>> 0, 1));
|
|
1284
|
-
|
|
1285
|
-
function addToExternrefTable0(obj) {
|
|
1286
|
-
const idx = wasm.__externref_table_alloc();
|
|
1287
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
1288
|
-
return idx;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1292
|
-
? { register: () => {}, unregister: () => {} }
|
|
1293
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
1294
|
-
|
|
1295
|
-
function debugString(val) {
|
|
1296
|
-
// primitive types
|
|
1297
|
-
const type = typeof val;
|
|
1298
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1299
|
-
return `${val}`;
|
|
1300
|
-
}
|
|
1301
|
-
if (type == 'string') {
|
|
1302
|
-
return `"${val}"`;
|
|
1303
|
-
}
|
|
1304
|
-
if (type == 'symbol') {
|
|
1305
|
-
const description = val.description;
|
|
1306
|
-
if (description == null) {
|
|
1307
|
-
return 'Symbol';
|
|
1308
|
-
} else {
|
|
1309
|
-
return `Symbol(${description})`;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
if (type == 'function') {
|
|
1313
|
-
const name = val.name;
|
|
1314
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
1315
|
-
return `Function(${name})`;
|
|
1316
|
-
} else {
|
|
1317
|
-
return 'Function';
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
// objects
|
|
1321
|
-
if (Array.isArray(val)) {
|
|
1322
|
-
const length = val.length;
|
|
1323
|
-
let debug = '[';
|
|
1324
|
-
if (length > 0) {
|
|
1325
|
-
debug += debugString(val[0]);
|
|
1326
|
-
}
|
|
1327
|
-
for(let i = 1; i < length; i++) {
|
|
1328
|
-
debug += ', ' + debugString(val[i]);
|
|
1329
|
-
}
|
|
1330
|
-
debug += ']';
|
|
1331
|
-
return debug;
|
|
1332
|
-
}
|
|
1333
|
-
// Test for built-in
|
|
1334
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1335
|
-
let className;
|
|
1336
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
1337
|
-
className = builtInMatches[1];
|
|
1338
|
-
} else {
|
|
1339
|
-
// Failed to match the standard '[object ClassName]'
|
|
1340
|
-
return toString.call(val);
|
|
1341
|
-
}
|
|
1342
|
-
if (className == 'Object') {
|
|
1343
|
-
// we're a user defined class or Object
|
|
1344
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1345
|
-
// easier than looping through ownProperties of `val`.
|
|
1346
|
-
try {
|
|
1347
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
1348
|
-
} catch (_) {
|
|
1349
|
-
return 'Object';
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
// errors
|
|
1353
|
-
if (val instanceof Error) {
|
|
1354
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1355
|
-
}
|
|
1356
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1357
|
-
return className;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
1361
|
-
ptr = ptr >>> 0;
|
|
1362
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
let cachedDataViewMemory0 = null;
|
|
1366
|
-
function getDataViewMemory0() {
|
|
1367
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1368
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1369
|
-
}
|
|
1370
|
-
return cachedDataViewMemory0;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
function getStringFromWasm0(ptr, len) {
|
|
1374
|
-
ptr = ptr >>> 0;
|
|
1375
|
-
return decodeText(ptr, len);
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
let cachedUint8ArrayMemory0 = null;
|
|
1379
|
-
function getUint8ArrayMemory0() {
|
|
1380
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1381
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1382
|
-
}
|
|
1383
|
-
return cachedUint8ArrayMemory0;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
function handleError(f, args) {
|
|
1387
|
-
try {
|
|
1388
|
-
return f.apply(this, args);
|
|
1389
|
-
} catch (e) {
|
|
1390
|
-
const idx = addToExternrefTable0(e);
|
|
1391
|
-
wasm.__wbindgen_exn_store(idx);
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
function isLikeNone(x) {
|
|
1396
|
-
return x === undefined || x === null;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
1400
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1401
|
-
const real = (...args) => {
|
|
1402
|
-
|
|
1403
|
-
// First up with a closure we increment the internal reference
|
|
1404
|
-
// count. This ensures that the Rust closure environment won't
|
|
1405
|
-
// be deallocated while we're invoking it.
|
|
1406
|
-
state.cnt++;
|
|
1407
|
-
const a = state.a;
|
|
1408
|
-
state.a = 0;
|
|
1409
|
-
try {
|
|
1410
|
-
return f(a, state.b, ...args);
|
|
1411
|
-
} finally {
|
|
1412
|
-
state.a = a;
|
|
1413
|
-
real._wbg_cb_unref();
|
|
1414
|
-
}
|
|
1415
|
-
};
|
|
1416
|
-
real._wbg_cb_unref = () => {
|
|
1417
|
-
if (--state.cnt === 0) {
|
|
1418
|
-
state.dtor(state.a, state.b);
|
|
1419
|
-
state.a = 0;
|
|
1420
|
-
CLOSURE_DTORS.unregister(state);
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
1424
|
-
return real;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
1428
|
-
if (realloc === undefined) {
|
|
1429
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1430
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1431
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1432
|
-
WASM_VECTOR_LEN = buf.length;
|
|
1433
|
-
return ptr;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
let len = arg.length;
|
|
1437
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
1438
|
-
|
|
1439
|
-
const mem = getUint8ArrayMemory0();
|
|
1440
|
-
|
|
1441
|
-
let offset = 0;
|
|
1442
|
-
|
|
1443
|
-
for (; offset < len; offset++) {
|
|
1444
|
-
const code = arg.charCodeAt(offset);
|
|
1445
|
-
if (code > 0x7F) break;
|
|
1446
|
-
mem[ptr + offset] = code;
|
|
1447
|
-
}
|
|
1448
|
-
if (offset !== len) {
|
|
1449
|
-
if (offset !== 0) {
|
|
1450
|
-
arg = arg.slice(offset);
|
|
1451
|
-
}
|
|
1452
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1453
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1454
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1455
|
-
|
|
1456
|
-
offset += ret.written;
|
|
1457
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
WASM_VECTOR_LEN = offset;
|
|
1461
|
-
return ptr;
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
function takeFromExternrefTable0(idx) {
|
|
1465
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1466
|
-
wasm.__externref_table_dealloc(idx);
|
|
1467
|
-
return value;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1471
|
-
cachedTextDecoder.decode();
|
|
1472
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1473
|
-
let numBytesDecoded = 0;
|
|
1474
|
-
function decodeText(ptr, len) {
|
|
1475
|
-
numBytesDecoded += len;
|
|
1476
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1477
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1478
|
-
cachedTextDecoder.decode();
|
|
1479
|
-
numBytesDecoded = len;
|
|
1480
|
-
}
|
|
1481
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
const cachedTextEncoder = new TextEncoder();
|
|
1485
|
-
|
|
1486
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1487
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1488
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
1489
|
-
view.set(buf);
|
|
1490
|
-
return {
|
|
1491
|
-
read: arg.length,
|
|
1492
|
-
written: buf.length
|
|
1493
|
-
};
|
|
1494
|
-
};
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
let WASM_VECTOR_LEN = 0;
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
let wasm;
|
|
1501
|
-
export function __wbg_set_wasm(val) {
|
|
1502
|
-
wasm = val;
|
|
1503
|
-
}
|