@band-ai/band-sdk-core 6.2.0 → 7.0.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.
- package/band_sdk_core.js +137 -144
- package/band_sdk_core_bg.wasm +0 -0
- package/package.json +1 -1
package/band_sdk_core.js
CHANGED
|
@@ -2170,15 +2170,15 @@ exports.validateMemoryTypeForSystem = validateMemoryTypeForSystem;
|
|
|
2170
2170
|
function __wbg_get_imports() {
|
|
2171
2171
|
const import0 = {
|
|
2172
2172
|
__proto__: null,
|
|
2173
|
-
|
|
2173
|
+
__wbg_0_2cd161c7dff05ea8: function(arg0) {
|
|
2174
2174
|
const ret = arg0["0"];
|
|
2175
2175
|
return ret;
|
|
2176
2176
|
},
|
|
2177
|
-
|
|
2177
|
+
__wbg_1_626c9787ea801183: function(arg0) {
|
|
2178
2178
|
const ret = arg0["1"];
|
|
2179
2179
|
return ret;
|
|
2180
2180
|
},
|
|
2181
|
-
|
|
2181
|
+
__wbg_Error_208446807d0d1e30: function(arg0, arg1) {
|
|
2182
2182
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2183
2183
|
return ret;
|
|
2184
2184
|
},
|
|
@@ -2186,138 +2186,138 @@ function __wbg_get_imports() {
|
|
|
2186
2186
|
const ret = String(arg1);
|
|
2187
2187
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2188
2188
|
const len1 = WASM_VECTOR_LEN;
|
|
2189
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2190
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2189
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
2190
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
2191
2191
|
},
|
|
2192
|
-
|
|
2192
|
+
__wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
|
|
2193
2193
|
const v = arg1;
|
|
2194
2194
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
2195
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2196
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2195
|
+
getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2196
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
|
|
2197
2197
|
},
|
|
2198
|
-
|
|
2198
|
+
__wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
|
|
2199
2199
|
const v = arg0;
|
|
2200
2200
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
2201
2201
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
2202
2202
|
},
|
|
2203
|
-
|
|
2203
|
+
__wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
|
|
2204
2204
|
const ret = debugString(arg1);
|
|
2205
2205
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2206
2206
|
const len1 = WASM_VECTOR_LEN;
|
|
2207
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2208
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2207
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
2208
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
2209
2209
|
},
|
|
2210
|
-
|
|
2210
|
+
__wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
|
|
2211
2211
|
const ret = arg0 in arg1;
|
|
2212
2212
|
return ret;
|
|
2213
2213
|
},
|
|
2214
|
-
|
|
2214
|
+
__wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
|
|
2215
2215
|
const ret = typeof(arg0) === 'bigint';
|
|
2216
2216
|
return ret;
|
|
2217
2217
|
},
|
|
2218
|
-
|
|
2218
|
+
__wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
|
|
2219
2219
|
const ret = typeof(arg0) === 'function';
|
|
2220
2220
|
return ret;
|
|
2221
2221
|
},
|
|
2222
|
-
|
|
2222
|
+
__wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
|
|
2223
2223
|
const ret = arg0 === null;
|
|
2224
2224
|
return ret;
|
|
2225
2225
|
},
|
|
2226
|
-
|
|
2226
|
+
__wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
|
|
2227
2227
|
const val = arg0;
|
|
2228
2228
|
const ret = typeof(val) === 'object' && val !== null;
|
|
2229
2229
|
return ret;
|
|
2230
2230
|
},
|
|
2231
|
-
|
|
2231
|
+
__wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
|
|
2232
2232
|
const ret = typeof(arg0) === 'string';
|
|
2233
2233
|
return ret;
|
|
2234
2234
|
},
|
|
2235
|
-
|
|
2235
|
+
__wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
|
|
2236
2236
|
const ret = arg0 === undefined;
|
|
2237
2237
|
return ret;
|
|
2238
2238
|
},
|
|
2239
|
-
|
|
2239
|
+
__wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
|
|
2240
2240
|
const ret = arg0 === arg1;
|
|
2241
2241
|
return ret;
|
|
2242
2242
|
},
|
|
2243
|
-
|
|
2243
|
+
__wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
|
|
2244
2244
|
const ret = arg0 == arg1;
|
|
2245
2245
|
return ret;
|
|
2246
2246
|
},
|
|
2247
|
-
|
|
2247
|
+
__wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
|
|
2248
2248
|
const obj = arg1;
|
|
2249
2249
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2250
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2251
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2250
|
+
getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2251
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
|
|
2252
2252
|
},
|
|
2253
|
-
|
|
2253
|
+
__wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
|
|
2254
2254
|
const obj = arg1;
|
|
2255
2255
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2256
2256
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2257
2257
|
var len1 = WASM_VECTOR_LEN;
|
|
2258
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2259
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2258
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
2259
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
2260
2260
|
},
|
|
2261
|
-
|
|
2261
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
2262
2262
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2263
2263
|
},
|
|
2264
|
-
|
|
2264
|
+
__wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
|
|
2265
2265
|
const ret = arg0.call(arg1);
|
|
2266
2266
|
return ret;
|
|
2267
2267
|
}, arguments); },
|
|
2268
|
-
|
|
2268
|
+
__wbg_charCodeAt_851946d8f1279e11: function(arg0, arg1) {
|
|
2269
2269
|
const ret = arg0.charCodeAt(arg1 >>> 0);
|
|
2270
2270
|
return ret;
|
|
2271
2271
|
},
|
|
2272
|
-
|
|
2272
|
+
__wbg_done_57e08d0be6e30c02: function(arg0) {
|
|
2273
2273
|
const ret = arg0.done;
|
|
2274
2274
|
return ret;
|
|
2275
2275
|
},
|
|
2276
|
-
|
|
2276
|
+
__wbg_entries_05f1f9eff36af492: function() { return handleError(function (arg0) {
|
|
2277
2277
|
const ret = Object.entries(arg0);
|
|
2278
2278
|
return ret;
|
|
2279
2279
|
}, arguments); },
|
|
2280
|
-
|
|
2280
|
+
__wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
|
|
2281
2281
|
const ret = Object.entries(arg0);
|
|
2282
2282
|
return ret;
|
|
2283
2283
|
},
|
|
2284
|
-
|
|
2284
|
+
__wbg_from_eac91875c8a5ffa4: function(arg0) {
|
|
2285
2285
|
const ret = Array.from(arg0);
|
|
2286
2286
|
return ret;
|
|
2287
2287
|
},
|
|
2288
|
-
|
|
2288
|
+
__wbg_getOwnPropertyDescriptor_bde8c48ab22edbff: function() { return handleError(function (arg0, arg1) {
|
|
2289
2289
|
const ret = Reflect.getOwnPropertyDescriptor(arg0, arg1);
|
|
2290
2290
|
return ret;
|
|
2291
2291
|
}, arguments); },
|
|
2292
|
-
|
|
2292
|
+
__wbg_getPrototypeOf_8fbf04523e13de29: function() { return handleError(function (arg0) {
|
|
2293
2293
|
const ret = Reflect.getPrototypeOf(arg0);
|
|
2294
2294
|
return ret;
|
|
2295
2295
|
}, arguments); },
|
|
2296
|
-
|
|
2296
|
+
__wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
|
|
2297
2297
|
const ret = Reflect.get(arg0, arg1);
|
|
2298
2298
|
return ret;
|
|
2299
2299
|
}, arguments); },
|
|
2300
|
-
|
|
2300
|
+
__wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
|
|
2301
2301
|
const ret = Reflect.get(arg0, arg1);
|
|
2302
2302
|
return ret;
|
|
2303
2303
|
}, arguments); },
|
|
2304
|
-
|
|
2304
|
+
__wbg_get_d7176cfb76d71114: function(arg0, arg1) {
|
|
2305
2305
|
const ret = arg0[arg1 >>> 0];
|
|
2306
2306
|
return ret;
|
|
2307
2307
|
},
|
|
2308
|
-
|
|
2308
|
+
__wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
|
|
2309
2309
|
const ret = arg0[arg1 >>> 0];
|
|
2310
2310
|
return ret;
|
|
2311
2311
|
},
|
|
2312
|
-
|
|
2312
|
+
__wbg_get_with_ref_key_fc601247060b7204: function(arg0, arg1) {
|
|
2313
2313
|
const ret = arg0[arg1];
|
|
2314
2314
|
return ret;
|
|
2315
2315
|
},
|
|
2316
|
-
|
|
2316
|
+
__wbg_has_2c4d5cf25ec8c1cf: function() { return handleError(function (arg0, arg1) {
|
|
2317
2317
|
const ret = Reflect.has(arg0, arg1);
|
|
2318
2318
|
return ret;
|
|
2319
2319
|
}, arguments); },
|
|
2320
|
-
|
|
2320
|
+
__wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
|
|
2321
2321
|
let result;
|
|
2322
2322
|
try {
|
|
2323
2323
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -2327,7 +2327,7 @@ function __wbg_get_imports() {
|
|
|
2327
2327
|
const ret = result;
|
|
2328
2328
|
return ret;
|
|
2329
2329
|
},
|
|
2330
|
-
|
|
2330
|
+
__wbg_instanceof_Map_0b4fc8b62e73f163: function(arg0) {
|
|
2331
2331
|
let result;
|
|
2332
2332
|
try {
|
|
2333
2333
|
result = arg0 instanceof Map;
|
|
@@ -2337,7 +2337,7 @@ function __wbg_get_imports() {
|
|
|
2337
2337
|
const ret = result;
|
|
2338
2338
|
return ret;
|
|
2339
2339
|
},
|
|
2340
|
-
|
|
2340
|
+
__wbg_instanceof_Set_7768a118d44ac511: function(arg0) {
|
|
2341
2341
|
let result;
|
|
2342
2342
|
try {
|
|
2343
2343
|
result = arg0 instanceof Set;
|
|
@@ -2347,7 +2347,7 @@ function __wbg_get_imports() {
|
|
|
2347
2347
|
const ret = result;
|
|
2348
2348
|
return ret;
|
|
2349
2349
|
},
|
|
2350
|
-
|
|
2350
|
+
__wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
|
|
2351
2351
|
let result;
|
|
2352
2352
|
try {
|
|
2353
2353
|
result = arg0 instanceof Uint8Array;
|
|
@@ -2357,96 +2357,96 @@ function __wbg_get_imports() {
|
|
|
2357
2357
|
const ret = result;
|
|
2358
2358
|
return ret;
|
|
2359
2359
|
},
|
|
2360
|
-
|
|
2360
|
+
__wbg_isArray_ad1e4f0f767cddc8: function() { return handleError(function (arg0) {
|
|
2361
2361
|
const ret = Array.isArray(arg0);
|
|
2362
2362
|
return ret;
|
|
2363
2363
|
}, arguments); },
|
|
2364
|
-
|
|
2364
|
+
__wbg_isArray_bcf1376d0d732d08: function(arg0) {
|
|
2365
2365
|
const ret = Array.isArray(arg0);
|
|
2366
2366
|
return ret;
|
|
2367
2367
|
},
|
|
2368
|
-
|
|
2368
|
+
__wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
|
|
2369
2369
|
const ret = Number.isSafeInteger(arg0);
|
|
2370
2370
|
return ret;
|
|
2371
2371
|
},
|
|
2372
|
-
|
|
2372
|
+
__wbg_iterator_e4c5e8f68ada7b58: function() {
|
|
2373
2373
|
const ret = Symbol.iterator;
|
|
2374
2374
|
return ret;
|
|
2375
2375
|
},
|
|
2376
|
-
|
|
2376
|
+
__wbg_length_186163212ffe79c3: function(arg0) {
|
|
2377
2377
|
const ret = arg0.length;
|
|
2378
2378
|
return ret;
|
|
2379
2379
|
},
|
|
2380
|
-
|
|
2380
|
+
__wbg_length_b03a0fabb109b1e9: function(arg0) {
|
|
2381
2381
|
const ret = arg0.length;
|
|
2382
2382
|
return ret;
|
|
2383
2383
|
},
|
|
2384
|
-
|
|
2384
|
+
__wbg_length_e83e819f48c774e4: function(arg0) {
|
|
2385
2385
|
const ret = arg0.length;
|
|
2386
2386
|
return ret;
|
|
2387
2387
|
},
|
|
2388
|
-
|
|
2388
|
+
__wbg_new_13de428334042d26: function(arg0) {
|
|
2389
2389
|
const ret = new Uint8Array(arg0);
|
|
2390
2390
|
return ret;
|
|
2391
2391
|
},
|
|
2392
|
-
|
|
2392
|
+
__wbg_new_37eb45aaf5eeb820: function() {
|
|
2393
|
+
const ret = new Array();
|
|
2394
|
+
return ret;
|
|
2395
|
+
},
|
|
2396
|
+
__wbg_new_7075786089b89c5e: function() {
|
|
2393
2397
|
const ret = new Map();
|
|
2394
2398
|
return ret;
|
|
2395
2399
|
},
|
|
2396
|
-
|
|
2400
|
+
__wbg_new_787b9fb330d55d78: function(arg0, arg1) {
|
|
2397
2401
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2398
2402
|
return ret;
|
|
2399
2403
|
},
|
|
2400
|
-
|
|
2404
|
+
__wbg_new_cd4348290afae586: function() {
|
|
2401
2405
|
const ret = new Object();
|
|
2402
2406
|
return ret;
|
|
2403
2407
|
},
|
|
2404
|
-
|
|
2405
|
-
const ret = new Array();
|
|
2406
|
-
return ret;
|
|
2407
|
-
},
|
|
2408
|
-
__wbg_next_33784799010f1bbe: function(arg0) {
|
|
2408
|
+
__wbg_next_178c1651c11432b3: function(arg0) {
|
|
2409
2409
|
const ret = arg0.next;
|
|
2410
2410
|
return ret;
|
|
2411
2411
|
},
|
|
2412
|
-
|
|
2412
|
+
__wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
|
|
2413
2413
|
const ret = arg0.next();
|
|
2414
2414
|
return ret;
|
|
2415
2415
|
}, arguments); },
|
|
2416
|
-
|
|
2416
|
+
__wbg_of_e7ea0fcd535c1444: function(arg0, arg1) {
|
|
2417
2417
|
const ret = Array.of(arg0, arg1);
|
|
2418
2418
|
return ret;
|
|
2419
2419
|
},
|
|
2420
|
-
|
|
2420
|
+
__wbg_ownKeys_c9890d5405932253: function() { return handleError(function (arg0) {
|
|
2421
2421
|
const ret = Reflect.ownKeys(arg0);
|
|
2422
2422
|
return ret;
|
|
2423
2423
|
}, arguments); },
|
|
2424
|
-
|
|
2424
|
+
__wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
|
|
2425
2425
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
2426
2426
|
},
|
|
2427
|
-
|
|
2427
|
+
__wbg_push_c9f4893fc209f768: function(arg0, arg1) {
|
|
2428
2428
|
const ret = arg0.push(arg1);
|
|
2429
2429
|
return ret;
|
|
2430
2430
|
},
|
|
2431
|
-
|
|
2431
|
+
__wbg_random_df36b90cd78a7d54: function() {
|
|
2432
2432
|
const ret = Math.random();
|
|
2433
2433
|
return ret;
|
|
2434
2434
|
},
|
|
2435
|
-
|
|
2435
|
+
__wbg_set_2793479888329cb6: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2436
2436
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
2437
2437
|
return ret;
|
|
2438
2438
|
}, arguments); },
|
|
2439
|
-
|
|
2439
|
+
__wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
|
|
2440
2440
|
const ret = arg0.set(arg1, arg2);
|
|
2441
2441
|
return ret;
|
|
2442
2442
|
},
|
|
2443
|
-
|
|
2444
|
-
arg0[arg1] = arg2;
|
|
2445
|
-
},
|
|
2446
|
-
__wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
|
|
2443
|
+
__wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
|
|
2447
2444
|
arg0[arg1 >>> 0] = arg2;
|
|
2448
2445
|
},
|
|
2449
|
-
|
|
2446
|
+
__wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
|
|
2447
|
+
arg0[arg1] = arg2;
|
|
2448
|
+
},
|
|
2449
|
+
__wbg_value_e0f328965e184931: function(arg0) {
|
|
2450
2450
|
const ret = arg0.value;
|
|
2451
2451
|
return ret;
|
|
2452
2452
|
},
|
|
@@ -2472,12 +2472,11 @@ function __wbg_get_imports() {
|
|
|
2472
2472
|
},
|
|
2473
2473
|
__wbindgen_init_externref_table: function() {
|
|
2474
2474
|
const table = wasm.__wbindgen_externrefs;
|
|
2475
|
-
const offset = table.grow(4);
|
|
2476
2475
|
table.set(0, undefined);
|
|
2477
|
-
table.set(
|
|
2478
|
-
table.set(
|
|
2479
|
-
table.set(
|
|
2480
|
-
table.set(
|
|
2476
|
+
table.set(1024, undefined);
|
|
2477
|
+
table.set(1025, null);
|
|
2478
|
+
table.set(1026, true);
|
|
2479
|
+
table.set(1027, false);
|
|
2481
2480
|
},
|
|
2482
2481
|
};
|
|
2483
2482
|
return {
|
|
@@ -2539,68 +2538,61 @@ function _assertClass(instance, klass) {
|
|
|
2539
2538
|
}
|
|
2540
2539
|
|
|
2541
2540
|
function debugString(val) {
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
2594
|
-
} catch (_) {
|
|
2595
|
-
return 'Object';
|
|
2541
|
+
switch (typeof val) {
|
|
2542
|
+
// primitive types
|
|
2543
|
+
case 'number':
|
|
2544
|
+
case 'boolean':
|
|
2545
|
+
case 'undefined':
|
|
2546
|
+
return `${val}`;
|
|
2547
|
+
case 'string':
|
|
2548
|
+
return JSON.stringify(val);
|
|
2549
|
+
case 'bigint':
|
|
2550
|
+
return `${val}n`;
|
|
2551
|
+
case 'symbol':
|
|
2552
|
+
return val.description !== undefined
|
|
2553
|
+
? `Symbol(${val.description})`
|
|
2554
|
+
: 'Symbol';
|
|
2555
|
+
case 'function':
|
|
2556
|
+
return typeof val.name === 'string' && val.name !== ''
|
|
2557
|
+
? `Function(${val.name})`
|
|
2558
|
+
: 'Function';
|
|
2559
|
+
case 'object': {
|
|
2560
|
+
if (val === null) {
|
|
2561
|
+
return 'null';
|
|
2562
|
+
}
|
|
2563
|
+
// objects
|
|
2564
|
+
if (Array.isArray(val)) {
|
|
2565
|
+
return '[' + Array.from(val, debugString).join(', ') + ']';
|
|
2566
|
+
}
|
|
2567
|
+
// errors
|
|
2568
|
+
if (val instanceof Error) {
|
|
2569
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
const toStringOutput = toString.call(val);
|
|
2573
|
+
// Test for built-in
|
|
2574
|
+
const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
|
|
2575
|
+
|
|
2576
|
+
// Failed to match the standard '[object ClassName]'
|
|
2577
|
+
if (className === undefined) {
|
|
2578
|
+
return toStringOutput;
|
|
2579
|
+
}
|
|
2580
|
+
if (className === 'Object') {
|
|
2581
|
+
// we're a user defined class or Object
|
|
2582
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
2583
|
+
// easier than looping through ownProperties of `val`.
|
|
2584
|
+
try {
|
|
2585
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
2586
|
+
} catch (_) {
|
|
2587
|
+
return 'Object';
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
2591
|
+
return className;
|
|
2596
2592
|
}
|
|
2593
|
+
// Per MDN: 'This list of values is exhaustive.'
|
|
2594
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
|
|
2597
2595
|
}
|
|
2598
|
-
// errors
|
|
2599
|
-
if (val instanceof Error) {
|
|
2600
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
2601
|
-
}
|
|
2602
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
2603
|
-
return className;
|
|
2604
2596
|
}
|
|
2605
2597
|
|
|
2606
2598
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
@@ -2628,7 +2620,8 @@ function getDataViewMemory0() {
|
|
|
2628
2620
|
}
|
|
2629
2621
|
|
|
2630
2622
|
function getStringFromWasm0(ptr, len) {
|
|
2631
|
-
|
|
2623
|
+
ptr = ptr >>> 0;
|
|
2624
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2632
2625
|
}
|
|
2633
2626
|
|
|
2634
2627
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -2695,10 +2688,10 @@ function takeFromExternrefTable0(idx) {
|
|
|
2695
2688
|
return value;
|
|
2696
2689
|
}
|
|
2697
2690
|
|
|
2698
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
2691
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
2699
2692
|
cachedTextDecoder.decode();
|
|
2700
|
-
function decodeText(
|
|
2701
|
-
return cachedTextDecoder.decode(
|
|
2693
|
+
function decodeText(bytes) {
|
|
2694
|
+
return cachedTextDecoder.decode(bytes);
|
|
2702
2695
|
}
|
|
2703
2696
|
|
|
2704
2697
|
const cachedTextEncoder = new TextEncoder();
|
package/band_sdk_core_bg.wasm
CHANGED
|
Binary file
|