@applemusic-like-lyrics/lyric 0.3.0 → 0.4.1

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,196 +1,3 @@
1
- let wasm;
2
- export function __wbg_set_wasm(val) {
3
- wasm = val;
4
- }
5
-
6
-
7
- function addToExternrefTable0(obj) {
8
- const idx = wasm.__externref_table_alloc();
9
- wasm.__wbindgen_export_2.set(idx, obj);
10
- return idx;
11
- }
12
-
13
- function handleError(f, args) {
14
- try {
15
- return f.apply(this, args);
16
- } catch (e) {
17
- const idx = addToExternrefTable0(e);
18
- wasm.__wbindgen_exn_store(idx);
19
- }
20
- }
21
-
22
- function isLikeNone(x) {
23
- return x === undefined || x === null;
24
- }
25
-
26
- let cachedDataViewMemory0 = null;
27
-
28
- function getDataViewMemory0() {
29
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
30
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
31
- }
32
- return cachedDataViewMemory0;
33
- }
34
-
35
- function debugString(val) {
36
- // primitive types
37
- const type = typeof val;
38
- if (type == 'number' || type == 'boolean' || val == null) {
39
- return `${val}`;
40
- }
41
- if (type == 'string') {
42
- return `"${val}"`;
43
- }
44
- if (type == 'symbol') {
45
- const description = val.description;
46
- if (description == null) {
47
- return 'Symbol';
48
- } else {
49
- return `Symbol(${description})`;
50
- }
51
- }
52
- if (type == 'function') {
53
- const name = val.name;
54
- if (typeof name == 'string' && name.length > 0) {
55
- return `Function(${name})`;
56
- } else {
57
- return 'Function';
58
- }
59
- }
60
- // objects
61
- if (Array.isArray(val)) {
62
- const length = val.length;
63
- let debug = '[';
64
- if (length > 0) {
65
- debug += debugString(val[0]);
66
- }
67
- for(let i = 1; i < length; i++) {
68
- debug += ', ' + debugString(val[i]);
69
- }
70
- debug += ']';
71
- return debug;
72
- }
73
- // Test for built-in
74
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
75
- let className;
76
- if (builtInMatches && builtInMatches.length > 1) {
77
- className = builtInMatches[1];
78
- } else {
79
- // Failed to match the standard '[object ClassName]'
80
- return toString.call(val);
81
- }
82
- if (className == 'Object') {
83
- // we're a user defined class or Object
84
- // JSON.stringify avoids problems with cycles, and is generally much
85
- // easier than looping through ownProperties of `val`.
86
- try {
87
- return 'Object(' + JSON.stringify(val) + ')';
88
- } catch (_) {
89
- return 'Object';
90
- }
91
- }
92
- // errors
93
- if (val instanceof Error) {
94
- return `${val.name}: ${val.message}\n${val.stack}`;
95
- }
96
- // TODO we could test for more things here, like `Set`s and `Map`s.
97
- return className;
98
- }
99
-
100
- let WASM_VECTOR_LEN = 0;
101
-
102
- let cachedUint8ArrayMemory0 = null;
103
-
104
- function getUint8ArrayMemory0() {
105
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
106
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
107
- }
108
- return cachedUint8ArrayMemory0;
109
- }
110
-
111
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
112
-
113
- let cachedTextEncoder = new lTextEncoder('utf-8');
114
-
115
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
116
- ? function (arg, view) {
117
- return cachedTextEncoder.encodeInto(arg, view);
118
- }
119
- : function (arg, view) {
120
- const buf = cachedTextEncoder.encode(arg);
121
- view.set(buf);
122
- return {
123
- read: arg.length,
124
- written: buf.length
125
- };
126
- });
127
-
128
- function passStringToWasm0(arg, malloc, realloc) {
129
-
130
- if (realloc === undefined) {
131
- const buf = cachedTextEncoder.encode(arg);
132
- const ptr = malloc(buf.length, 1) >>> 0;
133
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
134
- WASM_VECTOR_LEN = buf.length;
135
- return ptr;
136
- }
137
-
138
- let len = arg.length;
139
- let ptr = malloc(len, 1) >>> 0;
140
-
141
- const mem = getUint8ArrayMemory0();
142
-
143
- let offset = 0;
144
-
145
- for (; offset < len; offset++) {
146
- const code = arg.charCodeAt(offset);
147
- if (code > 0x7F) break;
148
- mem[ptr + offset] = code;
149
- }
150
-
151
- if (offset !== len) {
152
- if (offset !== 0) {
153
- arg = arg.slice(offset);
154
- }
155
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
156
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
157
- const ret = encodeString(arg, view);
158
-
159
- offset += ret.written;
160
- ptr = realloc(ptr, len, offset, 1) >>> 0;
161
- }
162
-
163
- WASM_VECTOR_LEN = offset;
164
- return ptr;
165
- }
166
-
167
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
168
-
169
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
170
-
171
- cachedTextDecoder.decode();
172
-
173
- function getStringFromWasm0(ptr, len) {
174
- ptr = ptr >>> 0;
175
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
176
- }
177
- /**
178
- * @param {any} lrc
179
- * @returns {string}
180
- */
181
- export function stringifyAss(lrc) {
182
- let deferred1_0;
183
- let deferred1_1;
184
- try {
185
- const ret = wasm.stringifyAss(lrc);
186
- deferred1_0 = ret[0];
187
- deferred1_1 = ret[1];
188
- return getStringFromWasm0(ret[0], ret[1]);
189
- } finally {
190
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
191
- }
192
- }
193
-
194
1
  /**
195
2
  * @param {string} hex_data
196
3
  * @returns {string}
@@ -221,23 +28,6 @@ export function parseEslrc(src) {
221
28
  return ret;
222
29
  }
223
30
 
224
- /**
225
- * @param {any} lrc
226
- * @returns {string}
227
- */
228
- export function stringifyEslrc(lrc) {
229
- let deferred1_0;
230
- let deferred1_1;
231
- try {
232
- const ret = wasm.stringifyEslrc(lrc);
233
- deferred1_0 = ret[0];
234
- deferred1_1 = ret[1];
235
- return getStringFromWasm0(ret[0], ret[1]);
236
- } finally {
237
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
238
- }
239
- }
240
-
241
31
  /**
242
32
  * @param {string} src
243
33
  * @returns {any}
@@ -249,23 +39,6 @@ export function parseLrc(src) {
249
39
  return ret;
250
40
  }
251
41
 
252
- /**
253
- * @param {any} lrc
254
- * @returns {string}
255
- */
256
- export function stringifyLrc(lrc) {
257
- let deferred1_0;
258
- let deferred1_1;
259
- try {
260
- const ret = wasm.stringifyLrc(lrc);
261
- deferred1_0 = ret[0];
262
- deferred1_1 = ret[1];
263
- return getStringFromWasm0(ret[0], ret[1]);
264
- } finally {
265
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
266
- }
267
- }
268
-
269
42
  /**
270
43
  * @param {string} src
271
44
  * @returns {any}
@@ -277,23 +50,6 @@ export function parseLys(src) {
277
50
  return ret;
278
51
  }
279
52
 
280
- /**
281
- * @param {any} lrc
282
- * @returns {string}
283
- */
284
- export function stringifyLys(lrc) {
285
- let deferred1_0;
286
- let deferred1_1;
287
- try {
288
- const ret = wasm.stringifyLys(lrc);
289
- deferred1_0 = ret[0];
290
- deferred1_1 = ret[1];
291
- return getStringFromWasm0(ret[0], ret[1]);
292
- } finally {
293
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
294
- }
295
- }
296
-
297
53
  /**
298
54
  * @param {string} src
299
55
  * @returns {any}
@@ -306,30 +62,24 @@ export function parseQrc(src) {
306
62
  }
307
63
 
308
64
  /**
309
- * @param {any} lrc
310
- * @returns {string}
65
+ * @param {string} src
66
+ * @returns {any}
311
67
  */
312
- export function stringifyQrc(lrc) {
313
- let deferred1_0;
314
- let deferred1_1;
315
- try {
316
- const ret = wasm.stringifyQrc(lrc);
317
- deferred1_0 = ret[0];
318
- deferred1_1 = ret[1];
319
- return getStringFromWasm0(ret[0], ret[1]);
320
- } finally {
321
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
322
- }
68
+ export function parseTTML(src) {
69
+ const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
70
+ const len0 = WASM_VECTOR_LEN;
71
+ const ret = wasm.parseTTML(ptr0, len0);
72
+ return ret;
323
73
  }
324
74
 
325
75
  /**
326
76
  * @param {string} src
327
77
  * @returns {any}
328
78
  */
329
- export function parseTTML(src) {
79
+ export function parseYrc(src) {
330
80
  const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
331
81
  const len0 = WASM_VECTOR_LEN;
332
- const ret = wasm.parseTTML(ptr0, len0);
82
+ const ret = wasm.parseYrc(ptr0, len0);
333
83
  return ret;
334
84
  }
335
85
 
@@ -337,11 +87,11 @@ export function parseTTML(src) {
337
87
  * @param {any} lrc
338
88
  * @returns {string}
339
89
  */
340
- export function stringifyTTML(lrc) {
90
+ export function stringifyAss(lrc) {
341
91
  let deferred1_0;
342
92
  let deferred1_1;
343
93
  try {
344
- const ret = wasm.stringifyTTML(lrc);
94
+ const ret = wasm.stringifyAss(lrc);
345
95
  deferred1_0 = ret[0];
346
96
  deferred1_1 = ret[1];
347
97
  return getStringFromWasm0(ret[0], ret[1]);
@@ -351,14 +101,88 @@ export function stringifyTTML(lrc) {
351
101
  }
352
102
 
353
103
  /**
354
- * @param {string} src
355
- * @returns {any}
104
+ * @param {any} lrc
105
+ * @returns {string}
356
106
  */
357
- export function parseYrc(src) {
358
- const ptr0 = passStringToWasm0(src, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
359
- const len0 = WASM_VECTOR_LEN;
360
- const ret = wasm.parseYrc(ptr0, len0);
361
- return ret;
107
+ export function stringifyEslrc(lrc) {
108
+ let deferred1_0;
109
+ let deferred1_1;
110
+ try {
111
+ const ret = wasm.stringifyEslrc(lrc);
112
+ deferred1_0 = ret[0];
113
+ deferred1_1 = ret[1];
114
+ return getStringFromWasm0(ret[0], ret[1]);
115
+ } finally {
116
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
117
+ }
118
+ }
119
+
120
+ /**
121
+ * @param {any} lrc
122
+ * @returns {string}
123
+ */
124
+ export function stringifyLrc(lrc) {
125
+ let deferred1_0;
126
+ let deferred1_1;
127
+ try {
128
+ const ret = wasm.stringifyLrc(lrc);
129
+ deferred1_0 = ret[0];
130
+ deferred1_1 = ret[1];
131
+ return getStringFromWasm0(ret[0], ret[1]);
132
+ } finally {
133
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
134
+ }
135
+ }
136
+
137
+ /**
138
+ * @param {any} lrc
139
+ * @returns {string}
140
+ */
141
+ export function stringifyLys(lrc) {
142
+ let deferred1_0;
143
+ let deferred1_1;
144
+ try {
145
+ const ret = wasm.stringifyLys(lrc);
146
+ deferred1_0 = ret[0];
147
+ deferred1_1 = ret[1];
148
+ return getStringFromWasm0(ret[0], ret[1]);
149
+ } finally {
150
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
151
+ }
152
+ }
153
+
154
+ /**
155
+ * @param {any} lrc
156
+ * @returns {string}
157
+ */
158
+ export function stringifyQrc(lrc) {
159
+ let deferred1_0;
160
+ let deferred1_1;
161
+ try {
162
+ const ret = wasm.stringifyQrc(lrc);
163
+ deferred1_0 = ret[0];
164
+ deferred1_1 = ret[1];
165
+ return getStringFromWasm0(ret[0], ret[1]);
166
+ } finally {
167
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
168
+ }
169
+ }
170
+
171
+ /**
172
+ * @param {any} lrc
173
+ * @returns {string}
174
+ */
175
+ export function stringifyTTML(lrc) {
176
+ let deferred1_0;
177
+ let deferred1_1;
178
+ try {
179
+ const ret = wasm.stringifyTTML(lrc);
180
+ deferred1_0 = ret[0];
181
+ deferred1_1 = ret[1];
182
+ return getStringFromWasm0(ret[0], ret[1]);
183
+ } finally {
184
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
185
+ }
362
186
  }
363
187
 
364
188
  /**
@@ -389,38 +213,99 @@ export function stringifyYrc(lrc) {
389
213
  export function wasm_start() {
390
214
  wasm.wasm_start();
391
215
  }
392
-
393
- export function __wbg_buffer_609cc3eee51ed158(arg0) {
394
- const ret = arg0.buffer;
216
+ export function __wbg_Error_2e59b1b37a9a34c3(arg0, arg1) {
217
+ const ret = Error(getStringFromWasm0(arg0, arg1));
395
218
  return ret;
396
- };
397
-
398
- export function __wbg_call_672a4d21634d4a24() { return handleError(function (arg0, arg1) {
219
+ }
220
+ export function __wbg_Number_e6ffdb596c888833(arg0) {
221
+ const ret = Number(arg0);
222
+ return ret;
223
+ }
224
+ export function __wbg___wbindgen_bigint_get_as_i64_2c5082002e4826e2(arg0, arg1) {
225
+ const v = arg1;
226
+ const ret = typeof(v) === 'bigint' ? v : undefined;
227
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
228
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
229
+ }
230
+ export function __wbg___wbindgen_boolean_get_a86c216575a75c30(arg0) {
231
+ const v = arg0;
232
+ const ret = typeof(v) === 'boolean' ? v : undefined;
233
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
234
+ }
235
+ export function __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57(arg0, arg1) {
236
+ const ret = debugString(arg1);
237
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
238
+ const len1 = WASM_VECTOR_LEN;
239
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
240
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
241
+ }
242
+ export function __wbg___wbindgen_in_4bd7a57e54337366(arg0, arg1) {
243
+ const ret = arg0 in arg1;
244
+ return ret;
245
+ }
246
+ export function __wbg___wbindgen_is_bigint_6c98f7e945dacdde(arg0) {
247
+ const ret = typeof(arg0) === 'bigint';
248
+ return ret;
249
+ }
250
+ export function __wbg___wbindgen_is_function_49868bde5eb1e745(arg0) {
251
+ const ret = typeof(arg0) === 'function';
252
+ return ret;
253
+ }
254
+ export function __wbg___wbindgen_is_object_40c5a80572e8f9d3(arg0) {
255
+ const val = arg0;
256
+ const ret = typeof(val) === 'object' && val !== null;
257
+ return ret;
258
+ }
259
+ export function __wbg___wbindgen_is_undefined_c0cca72b82b86f4d(arg0) {
260
+ const ret = arg0 === undefined;
261
+ return ret;
262
+ }
263
+ export function __wbg___wbindgen_jsval_eq_7d430e744a913d26(arg0, arg1) {
264
+ const ret = arg0 === arg1;
265
+ return ret;
266
+ }
267
+ export function __wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944(arg0, arg1) {
268
+ const ret = arg0 == arg1;
269
+ return ret;
270
+ }
271
+ export function __wbg___wbindgen_number_get_7579aab02a8a620c(arg0, arg1) {
272
+ const obj = arg1;
273
+ const ret = typeof(obj) === 'number' ? obj : undefined;
274
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
275
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
276
+ }
277
+ export function __wbg___wbindgen_string_get_914df97fcfa788f2(arg0, arg1) {
278
+ const obj = arg1;
279
+ const ret = typeof(obj) === 'string' ? obj : undefined;
280
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
281
+ var len1 = WASM_VECTOR_LEN;
282
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
283
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
284
+ }
285
+ export function __wbg___wbindgen_throw_81fc77679af83bc6(arg0, arg1) {
286
+ throw new Error(getStringFromWasm0(arg0, arg1));
287
+ }
288
+ export function __wbg_call_7f2987183bb62793() { return handleError(function (arg0, arg1) {
399
289
  const ret = arg0.call(arg1);
400
290
  return ret;
401
- }, arguments) };
402
-
403
- export function __wbg_done_769e5ede4b31c67b(arg0) {
291
+ }, arguments); }
292
+ export function __wbg_done_547d467e97529006(arg0) {
404
293
  const ret = arg0.done;
405
294
  return ret;
406
- };
407
-
408
- export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) {
295
+ }
296
+ export function __wbg_get_ed0642c4b9d31ddf() { return handleError(function (arg0, arg1) {
409
297
  const ret = Reflect.get(arg0, arg1);
410
298
  return ret;
411
- }, arguments) };
412
-
413
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
299
+ }, arguments); }
300
+ export function __wbg_get_unchecked_7d7babe32e9e6a54(arg0, arg1) {
414
301
  const ret = arg0[arg1 >>> 0];
415
302
  return ret;
416
- };
417
-
418
- export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
303
+ }
304
+ export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
419
305
  const ret = arg0[arg1];
420
306
  return ret;
421
- };
422
-
423
- export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
307
+ }
308
+ export function __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a(arg0) {
424
309
  let result;
425
310
  try {
426
311
  result = arg0 instanceof ArrayBuffer;
@@ -429,9 +314,8 @@ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
429
314
  }
430
315
  const ret = result;
431
316
  return ret;
432
- };
433
-
434
- export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
317
+ }
318
+ export function __wbg_instanceof_Uint8Array_4b8da683deb25d72(arg0) {
435
319
  let result;
436
320
  try {
437
321
  result = arg0 instanceof Uint8Array;
@@ -440,190 +324,262 @@ export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
440
324
  }
441
325
  const ret = result;
442
326
  return ret;
443
- };
444
-
445
- export function __wbg_isArray_a1eab7e0d067391b(arg0) {
327
+ }
328
+ export function __wbg_isArray_db61795ad004c139(arg0) {
446
329
  const ret = Array.isArray(arg0);
447
330
  return ret;
448
- };
449
-
450
- export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
331
+ }
332
+ export function __wbg_isSafeInteger_ea83862ba994770c(arg0) {
451
333
  const ret = Number.isSafeInteger(arg0);
452
334
  return ret;
453
- };
454
-
455
- export function __wbg_iterator_9a24c88df860dc65() {
335
+ }
336
+ export function __wbg_iterator_de403ef31815a3e6() {
456
337
  const ret = Symbol.iterator;
457
338
  return ret;
458
- };
459
-
460
- export function __wbg_length_a446193dc22c12f8(arg0) {
339
+ }
340
+ export function __wbg_length_0c32cb8543c8e4c8(arg0) {
461
341
  const ret = arg0.length;
462
342
  return ret;
463
- };
464
-
465
- export function __wbg_length_e2d2a49132c1b256(arg0) {
343
+ }
344
+ export function __wbg_length_6e821edde497a532(arg0) {
466
345
  const ret = arg0.length;
467
346
  return ret;
468
- };
469
-
470
- export function __wbg_new_405e22f390576ce2() {
347
+ }
348
+ export function __wbg_new_4f9fafbb3909af72() {
471
349
  const ret = new Object();
472
350
  return ret;
473
- };
474
-
475
- export function __wbg_new_78feb108b6472713() {
476
- const ret = new Array();
477
- return ret;
478
- };
479
-
480
- export function __wbg_new_a12002a7f91c75be(arg0) {
351
+ }
352
+ export function __wbg_new_a560378ea1240b14(arg0) {
481
353
  const ret = new Uint8Array(arg0);
482
354
  return ret;
483
- };
484
-
485
- export function __wbg_next_25feadfc0913fea9(arg0) {
355
+ }
356
+ export function __wbg_new_f3c9df4f38f3f798() {
357
+ const ret = new Array();
358
+ return ret;
359
+ }
360
+ export function __wbg_next_01132ed6134b8ef5(arg0) {
486
361
  const ret = arg0.next;
487
362
  return ret;
488
- };
489
-
490
- export function __wbg_next_6574e1a8a62d1055() { return handleError(function (arg0) {
363
+ }
364
+ export function __wbg_next_b3713ec761a9dbfd() { return handleError(function (arg0) {
491
365
  const ret = arg0.next();
492
366
  return ret;
493
- }, arguments) };
494
-
495
- export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
496
- arg0[arg1 >>> 0] = arg2;
497
- };
498
-
499
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
367
+ }, arguments); }
368
+ export function __wbg_prototypesetcall_3e05eb9545565046(arg0, arg1, arg2) {
369
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
370
+ }
371
+ export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
500
372
  arg0[arg1] = arg2;
501
- };
502
-
503
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
504
- arg0.set(arg1, arg2 >>> 0);
505
- };
506
-
507
- export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
373
+ }
374
+ export function __wbg_set_6c60b2e8ad0e9383(arg0, arg1, arg2) {
375
+ arg0[arg1 >>> 0] = arg2;
376
+ }
377
+ export function __wbg_value_7f6052747ccf940f(arg0) {
508
378
  const ret = arg0.value;
509
379
  return ret;
510
- };
511
-
512
- export function __wbindgen_as_number(arg0) {
513
- const ret = +arg0;
514
- return ret;
515
- };
516
-
517
- export function __wbindgen_bigint_from_u64(arg0) {
518
- const ret = BigInt.asUintN(64, arg0);
519
- return ret;
520
- };
521
-
522
- export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
523
- const v = arg1;
524
- const ret = typeof(v) === 'bigint' ? v : undefined;
525
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
526
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
527
- };
528
-
529
- export function __wbindgen_boolean_get(arg0) {
530
- const v = arg0;
531
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
380
+ }
381
+ export function __wbindgen_cast_0000000000000001(arg0) {
382
+ // Cast intrinsic for `F64 -> Externref`.
383
+ const ret = arg0;
532
384
  return ret;
533
- };
534
-
535
- export function __wbindgen_debug_string(arg0, arg1) {
536
- const ret = debugString(arg1);
537
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
538
- const len1 = WASM_VECTOR_LEN;
539
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
540
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
541
- };
542
-
543
- export function __wbindgen_error_new(arg0, arg1) {
544
- const ret = new Error(getStringFromWasm0(arg0, arg1));
385
+ }
386
+ export function __wbindgen_cast_0000000000000002(arg0, arg1) {
387
+ // Cast intrinsic for `Ref(String) -> Externref`.
388
+ const ret = getStringFromWasm0(arg0, arg1);
545
389
  return ret;
546
- };
547
-
548
- export function __wbindgen_in(arg0, arg1) {
549
- const ret = arg0 in arg1;
390
+ }
391
+ export function __wbindgen_cast_0000000000000003(arg0) {
392
+ // Cast intrinsic for `U64 -> Externref`.
393
+ const ret = BigInt.asUintN(64, arg0);
550
394
  return ret;
551
- };
552
-
395
+ }
553
396
  export function __wbindgen_init_externref_table() {
554
- const table = wasm.__wbindgen_export_2;
397
+ const table = wasm.__wbindgen_externrefs;
555
398
  const offset = table.grow(4);
556
399
  table.set(0, undefined);
557
400
  table.set(offset + 0, undefined);
558
401
  table.set(offset + 1, null);
559
402
  table.set(offset + 2, true);
560
403
  table.set(offset + 3, false);
561
- ;
562
- };
404
+ }
405
+ function addToExternrefTable0(obj) {
406
+ const idx = wasm.__externref_table_alloc();
407
+ wasm.__wbindgen_externrefs.set(idx, obj);
408
+ return idx;
409
+ }
563
410
 
564
- export function __wbindgen_is_bigint(arg0) {
565
- const ret = typeof(arg0) === 'bigint';
566
- return ret;
567
- };
411
+ function debugString(val) {
412
+ // primitive types
413
+ const type = typeof val;
414
+ if (type == 'number' || type == 'boolean' || val == null) {
415
+ return `${val}`;
416
+ }
417
+ if (type == 'string') {
418
+ return `"${val}"`;
419
+ }
420
+ if (type == 'symbol') {
421
+ const description = val.description;
422
+ if (description == null) {
423
+ return 'Symbol';
424
+ } else {
425
+ return `Symbol(${description})`;
426
+ }
427
+ }
428
+ if (type == 'function') {
429
+ const name = val.name;
430
+ if (typeof name == 'string' && name.length > 0) {
431
+ return `Function(${name})`;
432
+ } else {
433
+ return 'Function';
434
+ }
435
+ }
436
+ // objects
437
+ if (Array.isArray(val)) {
438
+ const length = val.length;
439
+ let debug = '[';
440
+ if (length > 0) {
441
+ debug += debugString(val[0]);
442
+ }
443
+ for(let i = 1; i < length; i++) {
444
+ debug += ', ' + debugString(val[i]);
445
+ }
446
+ debug += ']';
447
+ return debug;
448
+ }
449
+ // Test for built-in
450
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
451
+ let className;
452
+ if (builtInMatches && builtInMatches.length > 1) {
453
+ className = builtInMatches[1];
454
+ } else {
455
+ // Failed to match the standard '[object ClassName]'
456
+ return toString.call(val);
457
+ }
458
+ if (className == 'Object') {
459
+ // we're a user defined class or Object
460
+ // JSON.stringify avoids problems with cycles, and is generally much
461
+ // easier than looping through ownProperties of `val`.
462
+ try {
463
+ return 'Object(' + JSON.stringify(val) + ')';
464
+ } catch (_) {
465
+ return 'Object';
466
+ }
467
+ }
468
+ // errors
469
+ if (val instanceof Error) {
470
+ return `${val.name}: ${val.message}\n${val.stack}`;
471
+ }
472
+ // TODO we could test for more things here, like `Set`s and `Map`s.
473
+ return className;
474
+ }
568
475
 
569
- export function __wbindgen_is_function(arg0) {
570
- const ret = typeof(arg0) === 'function';
571
- return ret;
572
- };
476
+ function getArrayU8FromWasm0(ptr, len) {
477
+ ptr = ptr >>> 0;
478
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
479
+ }
573
480
 
574
- export function __wbindgen_is_object(arg0) {
575
- const val = arg0;
576
- const ret = typeof(val) === 'object' && val !== null;
577
- return ret;
578
- };
481
+ let cachedDataViewMemory0 = null;
482
+ function getDataViewMemory0() {
483
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
484
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
485
+ }
486
+ return cachedDataViewMemory0;
487
+ }
579
488
 
580
- export function __wbindgen_is_undefined(arg0) {
581
- const ret = arg0 === undefined;
582
- return ret;
583
- };
489
+ function getStringFromWasm0(ptr, len) {
490
+ ptr = ptr >>> 0;
491
+ return decodeText(ptr, len);
492
+ }
584
493
 
585
- export function __wbindgen_jsval_eq(arg0, arg1) {
586
- const ret = arg0 === arg1;
587
- return ret;
588
- };
494
+ let cachedUint8ArrayMemory0 = null;
495
+ function getUint8ArrayMemory0() {
496
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
497
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
498
+ }
499
+ return cachedUint8ArrayMemory0;
500
+ }
589
501
 
590
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
591
- const ret = arg0 == arg1;
592
- return ret;
593
- };
502
+ function handleError(f, args) {
503
+ try {
504
+ return f.apply(this, args);
505
+ } catch (e) {
506
+ const idx = addToExternrefTable0(e);
507
+ wasm.__wbindgen_exn_store(idx);
508
+ }
509
+ }
594
510
 
595
- export function __wbindgen_memory() {
596
- const ret = wasm.memory;
597
- return ret;
598
- };
511
+ function isLikeNone(x) {
512
+ return x === undefined || x === null;
513
+ }
599
514
 
600
- export function __wbindgen_number_get(arg0, arg1) {
601
- const obj = arg1;
602
- const ret = typeof(obj) === 'number' ? obj : undefined;
603
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
604
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
605
- };
515
+ function passStringToWasm0(arg, malloc, realloc) {
516
+ if (realloc === undefined) {
517
+ const buf = cachedTextEncoder.encode(arg);
518
+ const ptr = malloc(buf.length, 1) >>> 0;
519
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
520
+ WASM_VECTOR_LEN = buf.length;
521
+ return ptr;
522
+ }
606
523
 
607
- export function __wbindgen_number_new(arg0) {
608
- const ret = arg0;
609
- return ret;
610
- };
524
+ let len = arg.length;
525
+ let ptr = malloc(len, 1) >>> 0;
611
526
 
612
- export function __wbindgen_string_get(arg0, arg1) {
613
- const obj = arg1;
614
- const ret = typeof(obj) === 'string' ? obj : undefined;
615
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
616
- var len1 = WASM_VECTOR_LEN;
617
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
618
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
619
- };
527
+ const mem = getUint8ArrayMemory0();
620
528
 
621
- export function __wbindgen_string_new(arg0, arg1) {
622
- const ret = getStringFromWasm0(arg0, arg1);
623
- return ret;
624
- };
529
+ let offset = 0;
625
530
 
626
- export function __wbindgen_throw(arg0, arg1) {
627
- throw new Error(getStringFromWasm0(arg0, arg1));
628
- };
531
+ for (; offset < len; offset++) {
532
+ const code = arg.charCodeAt(offset);
533
+ if (code > 0x7F) break;
534
+ mem[ptr + offset] = code;
535
+ }
536
+ if (offset !== len) {
537
+ if (offset !== 0) {
538
+ arg = arg.slice(offset);
539
+ }
540
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
541
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
542
+ const ret = cachedTextEncoder.encodeInto(arg, view);
543
+
544
+ offset += ret.written;
545
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
546
+ }
547
+
548
+ WASM_VECTOR_LEN = offset;
549
+ return ptr;
550
+ }
551
+
552
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
553
+ cachedTextDecoder.decode();
554
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
555
+ let numBytesDecoded = 0;
556
+ function decodeText(ptr, len) {
557
+ numBytesDecoded += len;
558
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
559
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
560
+ cachedTextDecoder.decode();
561
+ numBytesDecoded = len;
562
+ }
563
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
564
+ }
629
565
 
566
+ const cachedTextEncoder = new TextEncoder();
567
+
568
+ if (!('encodeInto' in cachedTextEncoder)) {
569
+ cachedTextEncoder.encodeInto = function (arg, view) {
570
+ const buf = cachedTextEncoder.encode(arg);
571
+ view.set(buf);
572
+ return {
573
+ read: arg.length,
574
+ written: buf.length
575
+ };
576
+ };
577
+ }
578
+
579
+ let WASM_VECTOR_LEN = 0;
580
+
581
+
582
+ let wasm;
583
+ export function __wbg_set_wasm(val) {
584
+ wasm = val;
585
+ }