indexeddbshim 19.0.1 → 19.0.3
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/README.md +12 -0
- package/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/dist/DOMException.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +2 -1
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +158 -140
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +187 -173
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +158 -140
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +187 -173
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +3 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +187 -173
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +3 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/unicode-regex.d.ts +1 -1
- package/dist/unicode-regex.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/DOMException.js +1 -0
- package/src/unicode-regex.js +1 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v19.0.
|
|
1
|
+
/*! indexeddbshim - v19.0.3 - 9/15/2026 */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -1565,19 +1565,7 @@ val => {
|
|
|
1565
1565
|
|
|
1566
1566
|
// @ts-nocheck
|
|
1567
1567
|
|
|
1568
|
-
|
|
1569
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1570
|
-
}
|
|
1571
|
-
var regex$1;
|
|
1572
|
-
var hasRequiredRegex;
|
|
1573
|
-
function requireRegex() {
|
|
1574
|
-
if (hasRequiredRegex) return regex$1;
|
|
1575
|
-
hasRequiredRegex = 1;
|
|
1576
|
-
regex$1 = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
1577
|
-
return regex$1;
|
|
1578
|
-
}
|
|
1579
|
-
var regexExports = requireRegex();
|
|
1580
|
-
var regex = /*@__PURE__*/getDefaultExportFromCjs(regexExports);
|
|
1568
|
+
var regex = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
1581
1569
|
|
|
1582
1570
|
/* eslint-disable new-cap -- ToString is how it is defined */
|
|
1583
1571
|
|
|
@@ -2271,6 +2259,7 @@ Object.defineProperty(IDBVersionChangeEvent, Symbol.hasInstance, {
|
|
|
2271
2259
|
*/
|
|
2272
2260
|
function createNativeDOMException(name, message) {
|
|
2273
2261
|
// @ts-expect-error It's ok
|
|
2262
|
+
// eslint-disable-next-line new-cap -- Ok
|
|
2274
2263
|
return new DOMException.prototype.constructor(message, name || 'DOMException');
|
|
2275
2264
|
}
|
|
2276
2265
|
|
|
@@ -6218,28 +6207,28 @@ class Typeson {
|
|
|
6218
6207
|
{
|
|
6219
6208
|
sync: l
|
|
6220
6209
|
} = c,
|
|
6221
|
-
y = {},
|
|
6222
6210
|
u = {},
|
|
6211
|
+
y = {},
|
|
6223
6212
|
p = [],
|
|
6224
6213
|
f = [],
|
|
6225
|
-
|
|
6226
|
-
|
|
6214
|
+
m = [],
|
|
6215
|
+
d = !("cyclic" in c) || c.cyclic,
|
|
6227
6216
|
{
|
|
6228
6217
|
encapsulateObserver: h,
|
|
6229
6218
|
encapsulateError: b
|
|
6230
6219
|
} = c,
|
|
6231
6220
|
finish = e => {
|
|
6232
|
-
const t = Object.values(
|
|
6221
|
+
const t = Object.values(u);
|
|
6233
6222
|
if (c.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
6234
6223
|
if (c.returnTypeNames) return !!t.length && [...new Set(t)];
|
|
6235
|
-
const r = Object.keys(
|
|
6224
|
+
const r = Object.keys(y).length > 0,
|
|
6236
6225
|
o = isObject(e) && (n(e, "$types") || n(e, "$symbolKeys"));
|
|
6237
|
-
return r || t.length ? (!o && e && isPlainObject(e) ? t.length && (e.$types =
|
|
6226
|
+
return r || t.length ? (!o && e && isPlainObject(e) ? t.length && (e.$types = u) : e = {
|
|
6238
6227
|
$: e,
|
|
6239
6228
|
$types: {
|
|
6240
|
-
$:
|
|
6229
|
+
$: u
|
|
6241
6230
|
}
|
|
6242
|
-
}, r && (e.$symbolKeys =
|
|
6231
|
+
}, r && (e.$symbolKeys = y)) : o && (e = {
|
|
6243
6232
|
$: e,
|
|
6244
6233
|
$types: true
|
|
6245
6234
|
}), e;
|
|
@@ -6249,10 +6238,10 @@ class Typeson {
|
|
|
6249
6238
|
return await Promise.all(r.map(async function (r) {
|
|
6250
6239
|
const n = [],
|
|
6251
6240
|
[o] = t.splice(0, 1),
|
|
6252
|
-
[a,, s, i, c, l,
|
|
6253
|
-
|
|
6254
|
-
p = hasConstructorOf(
|
|
6255
|
-
return a && p ? (setOwnEnumerable(c, l, await
|
|
6241
|
+
[a,, s, i, c, l, u] = o,
|
|
6242
|
+
y = _encapsulate(a, r, s, i, n, true, u),
|
|
6243
|
+
p = hasConstructorOf(y, TypesonPromise);
|
|
6244
|
+
return a && p ? (setOwnEnumerable(c, l, await y.p), checkPromises(e, n)) : (a ? setOwnEnumerable(c, l, y) : e = p ? y.p : y, checkPromises(e, n));
|
|
6256
6245
|
})), e;
|
|
6257
6246
|
},
|
|
6258
6247
|
_adaptBuiltinStateObjectProperties = (e, t, r) => {
|
|
@@ -6265,18 +6254,18 @@ class Typeson {
|
|
|
6265
6254
|
e[t] = n[r];
|
|
6266
6255
|
});
|
|
6267
6256
|
},
|
|
6268
|
-
_encapsulate = (e, t, a, i, l,
|
|
6257
|
+
_encapsulate = (e, t, a, i, l, m, d) => {
|
|
6269
6258
|
let g,
|
|
6270
6259
|
v = {};
|
|
6271
6260
|
const w = h ? function (r) {
|
|
6272
|
-
const n =
|
|
6261
|
+
const n = d ?? i.type ?? getJSONType(t);
|
|
6273
6262
|
h(Object.assign(r ?? v, {
|
|
6274
6263
|
keypath: e,
|
|
6275
6264
|
value: t,
|
|
6276
6265
|
cyclic: a,
|
|
6277
6266
|
stateObj: i,
|
|
6278
6267
|
promisesData: l,
|
|
6279
|
-
resolvingTypesonPromise:
|
|
6268
|
+
resolvingTypesonPromise: m,
|
|
6280
6269
|
awaitingTypesonPromise: hasConstructorOf(t, TypesonPromise)
|
|
6281
6270
|
}, {
|
|
6282
6271
|
type: n
|
|
@@ -6285,11 +6274,11 @@ class Typeson {
|
|
|
6285
6274
|
getEncapsulatedValue = (e, t, r) => {
|
|
6286
6275
|
try {
|
|
6287
6276
|
return {
|
|
6288
|
-
value: _encapsulate(e, t[r], Boolean(a), i, l,
|
|
6277
|
+
value: _encapsulate(e, t[r], Boolean(a), i, l, m)
|
|
6289
6278
|
};
|
|
6290
6279
|
} catch (n) {
|
|
6291
6280
|
if (!b) throw n;
|
|
6292
|
-
const o =
|
|
6281
|
+
const o = d ?? i.type ?? getJSONType(t),
|
|
6293
6282
|
a = b({
|
|
6294
6283
|
keypath: e,
|
|
6295
6284
|
error: n,
|
|
@@ -6307,13 +6296,13 @@ class Typeson {
|
|
|
6307
6296
|
throw n;
|
|
6308
6297
|
}
|
|
6309
6298
|
};
|
|
6310
|
-
if (["string", "boolean", "number", "undefined"].includes(typeof t)) return void 0 === t || t === 1 / 0 || 0 === t || t === -1 / 0 || Number.isNaN(t) ? (g = i.replaced ? t : replace(e, t, i, l, false,
|
|
6299
|
+
if (["string", "boolean", "number", "undefined"].includes(typeof t)) return void 0 === t || t === 1 / 0 || 0 === t || t === -1 / 0 || Number.isNaN(t) ? (g = i.replaced ? t : replace(e, t, i, l, false, m, w), g !== t && (v = {
|
|
6311
6300
|
replaced: g
|
|
6312
6301
|
})) : g = t, w && w(), g;
|
|
6313
6302
|
if (null === t) return w && w(), t;
|
|
6314
6303
|
if (a && t && "object" == typeof t && !i.iterateIn && !i.iterateUnsetNumeric) {
|
|
6315
6304
|
const r = p.indexOf(t);
|
|
6316
|
-
if (-1 !== r) return
|
|
6305
|
+
if (-1 !== r) return u[e] = "#", w && w({
|
|
6317
6306
|
cyclicKeypath: f[r]
|
|
6318
6307
|
}), "#" + f[r];
|
|
6319
6308
|
true === a && (p.push(t), f.push(e));
|
|
@@ -6377,22 +6366,22 @@ class Typeson {
|
|
|
6377
6366
|
if (c.throwOnUnregisteredSymbol) throw new TypeError("Cannot serialize a Symbol-keyed property whose Symbol has no portable identity (not global, not well-known, and not in the `symbols` option): " + String(r));
|
|
6378
6367
|
return;
|
|
6379
6368
|
}
|
|
6380
|
-
const o =
|
|
6381
|
-
|
|
6369
|
+
const o = y[e] ??= [],
|
|
6370
|
+
u = {
|
|
6382
6371
|
key: n
|
|
6383
6372
|
};
|
|
6384
|
-
o.push(
|
|
6373
|
+
o.push(u);
|
|
6385
6374
|
const p = o.length - 1,
|
|
6386
6375
|
f = `$symbolKeys.${escapeKeyPathComponent(e)}.${String(p)}.value`,
|
|
6387
|
-
|
|
6376
|
+
m = {
|
|
6388
6377
|
value: t[r]
|
|
6389
6378
|
};
|
|
6390
6379
|
_adaptBuiltinStateObjectProperties(i, {
|
|
6391
6380
|
ownKeys: true
|
|
6392
6381
|
}, () => {
|
|
6393
|
-
const e = getEncapsulatedValue(f,
|
|
6382
|
+
const e = getEncapsulatedValue(f, m, "value"),
|
|
6394
6383
|
t = e && e.value;
|
|
6395
|
-
hasConstructorOf(t, TypesonPromise) ? l.push([f, t, Boolean(a), i,
|
|
6384
|
+
hasConstructorOf(t, TypesonPromise) ? l.push([f, t, Boolean(a), i, u, "value", i.type]) : e && (void 0 !== t || "substitute" in e) && setOwnEnumerable(u, "value", t);
|
|
6396
6385
|
});
|
|
6397
6386
|
}), w && w({
|
|
6398
6387
|
endIterateSymbols: true,
|
|
@@ -6406,7 +6395,7 @@ class Typeson {
|
|
|
6406
6395
|
_adaptBuiltinStateObjectProperties(i, {
|
|
6407
6396
|
ownKeys: false
|
|
6408
6397
|
}, () => {
|
|
6409
|
-
const e = _encapsulate(r, void 0, Boolean(a), i, l,
|
|
6398
|
+
const e = _encapsulate(r, void 0, Boolean(a), i, l, m);
|
|
6410
6399
|
hasConstructorOf(e, TypesonPromise) ? l.push([r, e, Boolean(a), i, S, n, i.type]) : void 0 !== e && setOwnEnumerable(S, n, e);
|
|
6411
6400
|
});
|
|
6412
6401
|
}
|
|
@@ -6427,15 +6416,15 @@ class Typeson {
|
|
|
6427
6416
|
type: i
|
|
6428
6417
|
} = o;
|
|
6429
6418
|
if (Object.hasOwn(this.revivers, i)) {
|
|
6430
|
-
const t =
|
|
6431
|
-
|
|
6419
|
+
const t = u[e];
|
|
6420
|
+
u[e] = t ? [i].concat(t) : i;
|
|
6432
6421
|
}
|
|
6433
6422
|
if (Object.assign(r, {
|
|
6434
6423
|
type: i,
|
|
6435
6424
|
replaced: true
|
|
6436
6425
|
}), (l || !o.replaceAsync) && !o.replace) return s && s({
|
|
6437
6426
|
typeDetected: true
|
|
6438
|
-
}), _encapsulate(e, t,
|
|
6427
|
+
}), _encapsulate(e, t, d && "readonly", r, n, a, i);
|
|
6439
6428
|
let c;
|
|
6440
6429
|
if (s && s({
|
|
6441
6430
|
replacing: true
|
|
@@ -6443,15 +6432,15 @@ class Typeson {
|
|
|
6443
6432
|
if (void 0 === o.replace) throw new TypeError("Missing replacer");
|
|
6444
6433
|
c = o.replace(t, r);
|
|
6445
6434
|
} else c = o.replaceAsync(t, r);
|
|
6446
|
-
return _encapsulate(e, c,
|
|
6435
|
+
return _encapsulate(e, c, d && "readonly", r, n, a, i);
|
|
6447
6436
|
}
|
|
6448
6437
|
}
|
|
6449
6438
|
return t;
|
|
6450
6439
|
},
|
|
6451
|
-
g = _encapsulate("", e,
|
|
6452
|
-
if (
|
|
6440
|
+
g = _encapsulate("", e, d, t ?? {}, m);
|
|
6441
|
+
if (m.length) return l && c.throwOnBadSyncType ? (() => {
|
|
6453
6442
|
throw new TypeError("Sync method requested but async result obtained");
|
|
6454
|
-
})() : Promise.resolve(checkPromises(g,
|
|
6443
|
+
})() : Promise.resolve(checkPromises(g, m)).then(finish);
|
|
6455
6444
|
if (!l && c.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
6456
6445
|
return l && c.stringification ? [finish(g)] : l ? finish(g) : Promise.resolve(finish(g));
|
|
6457
6446
|
}
|
|
@@ -6487,16 +6476,16 @@ class Typeson {
|
|
|
6487
6476
|
let c = e.$types;
|
|
6488
6477
|
if (true === c) return finishRevival(e.$);
|
|
6489
6478
|
const l = e.$symbolKeys;
|
|
6490
|
-
let
|
|
6479
|
+
let u = void 0 !== l;
|
|
6491
6480
|
if (!c || "object" != typeof c || Array.isArray(c)) {
|
|
6492
6481
|
if (!l) return finishRevival(e);
|
|
6493
6482
|
c = {};
|
|
6494
6483
|
}
|
|
6495
|
-
const
|
|
6484
|
+
const y = [],
|
|
6496
6485
|
p = Object.create(null),
|
|
6497
6486
|
f = {};
|
|
6498
|
-
let
|
|
6499
|
-
c.$ && isPlainObject(c.$) && (e = e.$, c = c.$,
|
|
6487
|
+
let m = true;
|
|
6488
|
+
c.$ && isPlainObject(c.$) && (e = e.$, c = c.$, m = false, u = false, void 0 !== l && isObject(e) && !n(e, "$symbolKeys") && (e.$symbolKeys = l, u = true));
|
|
6500
6489
|
const executeReviver = (e, t) => {
|
|
6501
6490
|
const [r] = this.revivers[e] ?? [];
|
|
6502
6491
|
if (!r) throw new Error("Unregistered type: " + e);
|
|
@@ -6505,13 +6494,13 @@ class Typeson {
|
|
|
6505
6494
|
if (r.revive) return r.revive(t, f);
|
|
6506
6495
|
throw new Error("Missing reviver");
|
|
6507
6496
|
},
|
|
6508
|
-
|
|
6497
|
+
d = [];
|
|
6509
6498
|
function checkUndefined(e) {
|
|
6510
6499
|
return hasConstructorOf(e, Undefined) ? void 0 : e;
|
|
6511
6500
|
}
|
|
6512
6501
|
const reHomeSymbolKeys = e => {
|
|
6513
6502
|
if (!isObject(e)) return;
|
|
6514
|
-
const t =
|
|
6503
|
+
const t = u ? e.$symbolKeys : l;
|
|
6515
6504
|
t && (Object.entries(t).forEach(([t, r]) => {
|
|
6516
6505
|
const o = getByKeyPath(e, t);
|
|
6517
6506
|
isObject(o) && r.forEach(e => {
|
|
@@ -6535,7 +6524,7 @@ class Typeson {
|
|
|
6535
6524
|
value: r
|
|
6536
6525
|
}) : o[t] = r;
|
|
6537
6526
|
});
|
|
6538
|
-
}),
|
|
6527
|
+
}), u && delete e.$symbolKeys);
|
|
6539
6528
|
},
|
|
6540
6529
|
h = (() => {
|
|
6541
6530
|
if (!c) throw new Error("Found bad `types`");
|
|
@@ -6569,8 +6558,8 @@ class Typeson {
|
|
|
6569
6558
|
})();
|
|
6570
6559
|
let b;
|
|
6571
6560
|
return hasConstructorOf(h, TypesonPromise) ? b = h.then(() => e) : (b = function _revive(e, t, a, s, l) {
|
|
6572
|
-
if (
|
|
6573
|
-
const
|
|
6561
|
+
if (m && "$types" === e) return;
|
|
6562
|
+
const u = d.length,
|
|
6574
6563
|
f = n(c, e) ? c[e] : void 0,
|
|
6575
6564
|
h = o(t);
|
|
6576
6565
|
if (h || isPlainObject(t)) {
|
|
@@ -6578,13 +6567,13 @@ class Typeson {
|
|
|
6578
6567
|
for (r(t).forEach(r => {
|
|
6579
6568
|
const n = _revive(e + (e ? "." : "") + escapeKeyPathComponent(r), t[r], a ?? o, o, r),
|
|
6580
6569
|
set = e => (hasConstructorOf(e, Undefined) ? setOwnEnumerable(o, r, void 0) : void 0 !== e && setOwnEnumerable(o, r, e), e);
|
|
6581
|
-
hasConstructorOf(n, TypesonPromise) ?
|
|
6582
|
-
}), t = o;
|
|
6583
|
-
const [[e, t, r, o]] =
|
|
6570
|
+
hasConstructorOf(n, TypesonPromise) ? d.push(n.then(e => set(e))) : set(n);
|
|
6571
|
+
}), t = o; y.length;) {
|
|
6572
|
+
const [[e, t, r, o]] = y,
|
|
6584
6573
|
a = n(p, t),
|
|
6585
6574
|
s = a ? p[t] : getByKeyPath(e, t);
|
|
6586
6575
|
if (!a && void 0 === s) break;
|
|
6587
|
-
setOwnEnumerable(r, o, s),
|
|
6576
|
+
setOwnEnumerable(r, o, s), y.shift();
|
|
6588
6577
|
}
|
|
6589
6578
|
}
|
|
6590
6579
|
if (!f) return p[e] = t, t;
|
|
@@ -6592,7 +6581,7 @@ class Typeson {
|
|
|
6592
6581
|
const e = t.slice(1),
|
|
6593
6582
|
r = n(p, e),
|
|
6594
6583
|
o = r ? p[e] : getByKeyPath(a, e);
|
|
6595
|
-
return r || void 0 !== o ||
|
|
6584
|
+
return r || void 0 !== o || y.push([a, e, s, l]), o;
|
|
6596
6585
|
}
|
|
6597
6586
|
const applyType = t => {
|
|
6598
6587
|
const r = [].concat(f).reduce(function reducer(e, t) {
|
|
@@ -6602,8 +6591,8 @@ class Typeson {
|
|
|
6602
6591
|
}, t);
|
|
6603
6592
|
return hasConstructorOf(r, TypesonPromise) ? r.then(t => (p[e] = t, t)) : (p[e] = r, r);
|
|
6604
6593
|
};
|
|
6605
|
-
return !i &&
|
|
6606
|
-
}("", e, null),
|
|
6594
|
+
return !i && d.length > u ? TypesonPromise.all(d.slice(u)).then(() => applyType(t)) : applyType(t);
|
|
6595
|
+
}("", e, null), d.length && (b = TypesonPromise.resolve(b).then(e => TypesonPromise.all([e, ...d])).then(([e]) => e))), l && (isThenable(b) ? b = b.then(e => (reHomeSymbolKeys(e), e)) : reHomeSymbolKeys(b)), isThenable(b) ? i && a.throwOnBadSyncType ? (() => {
|
|
6607
6596
|
throw new TypeError("Sync method requested but async result obtained");
|
|
6608
6597
|
})() : hasConstructorOf(b, TypesonPromise) ? b.p.then(checkUndefined) : b : !i && a.throwOnBadSyncType ? (() => {
|
|
6609
6598
|
throw new TypeError("Async method requested but sync result obtained");
|
|
@@ -6676,8 +6665,8 @@ class Typeson {
|
|
|
6676
6665
|
class Undefined {}
|
|
6677
6666
|
Undefined.__typeson__type__ = "TypesonUndefined";
|
|
6678
6667
|
const i = ["null", "boolean", "number", "string", "array", "object"];
|
|
6679
|
-
for (var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = new Uint8Array(256),
|
|
6680
|
-
var
|
|
6668
|
+
for (var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = new Uint8Array(256), u = 0; u < 64; u++) l[c.codePointAt(u)] = u;
|
|
6669
|
+
var y = function encode(e, t, r) {
|
|
6681
6670
|
null == r && (r = e.byteLength);
|
|
6682
6671
|
for (var n = new Uint8Array(e, 0, r), o = n.length, a = "", s = 0; s < o; s += 3) a += c[n[s] >> 2], a += c[(3 & n[s]) << 4 | n[s + 1] >> 4], a += c[(15 & n[s + 1]) << 2 | n[s + 2] >> 6], a += c[63 & n[s + 2]];
|
|
6683
6672
|
return o % 3 == 2 ? a = a.slice(0, -1) + "=" : o % 3 == 1 && (a = a.slice(0, -2) + "=="), a;
|
|
@@ -6692,8 +6681,8 @@ var u = function encode(e, t, r) {
|
|
|
6692
6681
|
i = .75 * e.length,
|
|
6693
6682
|
c = 0;
|
|
6694
6683
|
"=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
|
|
6695
|
-
for (var
|
|
6696
|
-
return
|
|
6684
|
+
for (var u = new ArrayBuffer(i, t), y = new Uint8Array(u), p = 0; p < r; p += 4) n = l[e.codePointAt(p)], o = l[e.codePointAt(p + 1)], a = l[e.codePointAt(p + 2)], s = l[e.codePointAt(p + 3)], y[c++] = n << 2 | o >> 4, y[c++] = (15 & o) << 4 | a >> 2, y[c++] = (3 & a) << 6 | 63 & s;
|
|
6685
|
+
return u;
|
|
6697
6686
|
};
|
|
6698
6687
|
const f = {
|
|
6699
6688
|
arraybuffer: {
|
|
@@ -6704,7 +6693,7 @@ const f = {
|
|
|
6704
6693
|
return -1 !== r ? {
|
|
6705
6694
|
index: r
|
|
6706
6695
|
} : (t.buffers.push(e), {
|
|
6707
|
-
s:
|
|
6696
|
+
s: y(e),
|
|
6708
6697
|
maxByteLength: e.maxByteLength,
|
|
6709
6698
|
resizable: e.resizable
|
|
6710
6699
|
});
|
|
@@ -6718,7 +6707,7 @@ const f = {
|
|
|
6718
6707
|
}
|
|
6719
6708
|
}
|
|
6720
6709
|
},
|
|
6721
|
-
|
|
6710
|
+
m = {
|
|
6722
6711
|
audiodata: {
|
|
6723
6712
|
test: e => "AudioData" === toStringTag(e),
|
|
6724
6713
|
replace(e) {
|
|
@@ -6739,12 +6728,12 @@ const f = {
|
|
|
6739
6728
|
i.push(r), c += r;
|
|
6740
6729
|
}
|
|
6741
6730
|
const l = new ArrayBuffer(c);
|
|
6742
|
-
let
|
|
6731
|
+
let u = 0;
|
|
6743
6732
|
for (let t = 0; t < s; t++) {
|
|
6744
|
-
const r = new Uint8Array(l,
|
|
6733
|
+
const r = new Uint8Array(l, u, i[t]);
|
|
6745
6734
|
e.copyTo(r, {
|
|
6746
6735
|
planeIndex: t
|
|
6747
|
-
}),
|
|
6736
|
+
}), u += i[t];
|
|
6748
6737
|
}
|
|
6749
6738
|
return {
|
|
6750
6739
|
format: t,
|
|
@@ -6772,7 +6761,7 @@ const f = {
|
|
|
6772
6761
|
})
|
|
6773
6762
|
}
|
|
6774
6763
|
},
|
|
6775
|
-
|
|
6764
|
+
d = {
|
|
6776
6765
|
bigintObject: {
|
|
6777
6766
|
test: e => "object" == typeof e && hasConstructorOf(e, BigInt),
|
|
6778
6767
|
replace: String,
|
|
@@ -6868,7 +6857,7 @@ const w = {
|
|
|
6868
6857
|
byteOffset: t,
|
|
6869
6858
|
byteLength: r
|
|
6870
6859
|
} : (n.buffers.push(e), {
|
|
6871
|
-
encoded:
|
|
6860
|
+
encoded: y(e),
|
|
6872
6861
|
maxByteLength: e.maxByteLength,
|
|
6873
6862
|
resizable: e.resizable,
|
|
6874
6863
|
byteOffset: t,
|
|
@@ -6984,9 +6973,9 @@ const E = {
|
|
|
6984
6973
|
}) => new DOMQuad(e, t, r, n)
|
|
6985
6974
|
}
|
|
6986
6975
|
},
|
|
6987
|
-
|
|
6976
|
+
N = {};
|
|
6988
6977
|
function create$3(e) {
|
|
6989
|
-
|
|
6978
|
+
N[e.name.toLowerCase()] = {
|
|
6990
6979
|
test: t => toStringTag(t) === e.name,
|
|
6991
6980
|
replace: e => ({
|
|
6992
6981
|
x: e.x,
|
|
@@ -7003,7 +6992,7 @@ function create$3(e) {
|
|
|
7003
6992
|
};
|
|
7004
6993
|
}
|
|
7005
6994
|
"undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
|
|
7006
|
-
const
|
|
6995
|
+
const x = {
|
|
7007
6996
|
encodedaudiochunk: {
|
|
7008
6997
|
test: e => "EncodedAudioChunk" === toStringTag(e),
|
|
7009
6998
|
replace(e) {
|
|
@@ -7036,7 +7025,7 @@ const j = {
|
|
|
7036
7025
|
}
|
|
7037
7026
|
}
|
|
7038
7027
|
},
|
|
7039
|
-
|
|
7028
|
+
j = {
|
|
7040
7029
|
encodedvideochunk: {
|
|
7041
7030
|
test: e => "EncodedVideoChunk" === toStringTag(e),
|
|
7042
7031
|
replace(e) {
|
|
@@ -7069,7 +7058,7 @@ const j = {
|
|
|
7069
7058
|
}
|
|
7070
7059
|
}
|
|
7071
7060
|
},
|
|
7072
|
-
|
|
7061
|
+
I = {
|
|
7073
7062
|
error: {
|
|
7074
7063
|
test: e => "Error" === toStringTag(e),
|
|
7075
7064
|
replace: ({
|
|
@@ -7095,9 +7084,9 @@ const j = {
|
|
|
7095
7084
|
}
|
|
7096
7085
|
}
|
|
7097
7086
|
},
|
|
7098
|
-
|
|
7087
|
+
B = {};
|
|
7099
7088
|
function create$2(e) {
|
|
7100
|
-
|
|
7089
|
+
B[e.name.toLowerCase()] = {
|
|
7101
7090
|
test: t => hasConstructorOf(t, e),
|
|
7102
7091
|
replace: ({
|
|
7103
7092
|
name: e,
|
|
@@ -7125,7 +7114,7 @@ function create$2(e) {
|
|
|
7125
7114
|
};
|
|
7126
7115
|
}
|
|
7127
7116
|
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(e => create$2(e)), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
|
|
7128
|
-
const
|
|
7117
|
+
const C = {
|
|
7129
7118
|
file: {
|
|
7130
7119
|
test: e => "File" === toStringTag(e),
|
|
7131
7120
|
replace(e) {
|
|
@@ -7163,7 +7152,7 @@ const I = {
|
|
|
7163
7152
|
}
|
|
7164
7153
|
},
|
|
7165
7154
|
U = {
|
|
7166
|
-
file:
|
|
7155
|
+
file: C.file,
|
|
7167
7156
|
filelist: {
|
|
7168
7157
|
test: e => "FileList" === toStringTag(e),
|
|
7169
7158
|
replace(e) {
|
|
@@ -7187,9 +7176,9 @@ const I = {
|
|
|
7187
7176
|
}
|
|
7188
7177
|
}
|
|
7189
7178
|
},
|
|
7190
|
-
|
|
7179
|
+
k = {
|
|
7191
7180
|
imagebitmap: {
|
|
7192
|
-
test: e => "ImageBitmap" === toStringTag(e)
|
|
7181
|
+
test: e => "ImageBitmap" === toStringTag(e),
|
|
7193
7182
|
replace(e) {
|
|
7194
7183
|
const t = document.createElement("canvas");
|
|
7195
7184
|
return t.getContext("2d").drawImage(e, 0, 0), {
|
|
@@ -7203,7 +7192,9 @@ const I = {
|
|
|
7203
7192
|
r = t.getContext("2d"),
|
|
7204
7193
|
n = document.createElement("img");
|
|
7205
7194
|
return n.addEventListener("load", function () {
|
|
7206
|
-
|
|
7195
|
+
try {
|
|
7196
|
+
r.drawImage(n, 0, 0);
|
|
7197
|
+
} catch {}
|
|
7207
7198
|
}), n.src = e.dataURL, "undefined" == typeof OffscreenCanvas ? t : t.transferToImageBitmap();
|
|
7208
7199
|
},
|
|
7209
7200
|
reviveAsync(e) {
|
|
@@ -7222,7 +7213,7 @@ const I = {
|
|
|
7222
7213
|
}
|
|
7223
7214
|
}
|
|
7224
7215
|
},
|
|
7225
|
-
|
|
7216
|
+
R = {
|
|
7226
7217
|
imagedata: {
|
|
7227
7218
|
test: e => "ImageData" === toStringTag(e),
|
|
7228
7219
|
replace(e) {
|
|
@@ -7267,28 +7258,28 @@ const I = {
|
|
|
7267
7258
|
revive: e => new Map(e)
|
|
7268
7259
|
}
|
|
7269
7260
|
},
|
|
7270
|
-
|
|
7261
|
+
K = {
|
|
7271
7262
|
nan: {
|
|
7272
7263
|
test: e => Number.isNaN(e),
|
|
7273
7264
|
replace: () => "NaN",
|
|
7274
7265
|
revive: () => NaN
|
|
7275
7266
|
}
|
|
7276
7267
|
},
|
|
7277
|
-
|
|
7268
|
+
$ = {
|
|
7278
7269
|
negativeInfinity: {
|
|
7279
7270
|
test: e => e === -1 / 0,
|
|
7280
7271
|
replace: () => "-Infinity",
|
|
7281
7272
|
revive: () => -1 / 0
|
|
7282
7273
|
}
|
|
7283
7274
|
},
|
|
7284
|
-
|
|
7275
|
+
W = {
|
|
7285
7276
|
negativeZero: {
|
|
7286
7277
|
test: e => Object.is(e, -0),
|
|
7287
7278
|
replace: () => 0,
|
|
7288
7279
|
revive: () => -0
|
|
7289
7280
|
}
|
|
7290
7281
|
},
|
|
7291
|
-
|
|
7282
|
+
z = {
|
|
7292
7283
|
StringObject: {
|
|
7293
7284
|
test: e => "String" === toStringTag(e) && "object" == typeof e,
|
|
7294
7285
|
replace: String,
|
|
@@ -7308,29 +7299,42 @@ const I = {
|
|
|
7308
7299
|
revive: e => new Number("NaN" === e ? NaN : "Infinity" === e ? 1 / 0 : "-Infinity" === e ? -1 / 0 : "-0" === e ? -0 : e)
|
|
7309
7300
|
}
|
|
7310
7301
|
},
|
|
7311
|
-
|
|
7302
|
+
J = {
|
|
7312
7303
|
quotaexceedederror: {
|
|
7313
7304
|
test: e => "QuotaExceededError" === toStringTag(e),
|
|
7314
7305
|
replace: ({
|
|
7315
7306
|
message: e,
|
|
7316
7307
|
quota: t,
|
|
7317
|
-
requested: r
|
|
7308
|
+
requested: r,
|
|
7309
|
+
cause: n,
|
|
7310
|
+
stack: o,
|
|
7311
|
+
fileName: a,
|
|
7312
|
+
lineNumber: s,
|
|
7313
|
+
columnNumber: i
|
|
7318
7314
|
}) => ({
|
|
7319
7315
|
message: e,
|
|
7320
7316
|
quota: t,
|
|
7321
|
-
requested: r
|
|
7317
|
+
requested: r,
|
|
7318
|
+
cause: n,
|
|
7319
|
+
stack: o,
|
|
7320
|
+
fileName: a,
|
|
7321
|
+
lineNumber: s,
|
|
7322
|
+
columnNumber: i
|
|
7322
7323
|
}),
|
|
7323
|
-
revive({
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7324
|
+
revive(e) {
|
|
7325
|
+
const {
|
|
7326
|
+
message: t,
|
|
7327
|
+
quota: r,
|
|
7328
|
+
requested: n
|
|
7329
|
+
} = e,
|
|
7330
|
+
o = {};
|
|
7331
|
+
null != r && (o.quota = r), null != n && (o.requested = n);
|
|
7332
|
+
const a = new QuotaExceededError(t, o);
|
|
7333
|
+
return a.cause = e.cause, a.stack = e.stack, a.fileName = e.fileName, a.lineNumber = e.lineNumber, a.columnNumber = e.columnNumber, a;
|
|
7330
7334
|
}
|
|
7331
7335
|
}
|
|
7332
7336
|
},
|
|
7333
|
-
|
|
7337
|
+
H = {
|
|
7334
7338
|
regexp: {
|
|
7335
7339
|
test: e => "RegExp" === toStringTag(e),
|
|
7336
7340
|
replace: e => ({
|
|
@@ -7343,26 +7347,26 @@ const I = {
|
|
|
7343
7347
|
}) => new RegExp(e, t)
|
|
7344
7348
|
}
|
|
7345
7349
|
},
|
|
7346
|
-
|
|
7350
|
+
X = {
|
|
7347
7351
|
set: {
|
|
7348
7352
|
test: e => "Set" === toStringTag(e),
|
|
7349
7353
|
replace: e => e.values().toArray(),
|
|
7350
7354
|
revive: e => new Set(e)
|
|
7351
7355
|
}
|
|
7352
7356
|
},
|
|
7353
|
-
|
|
7357
|
+
Z = {};
|
|
7354
7358
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, ...("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : []), ...("function" == typeof Float16Array ? [Float16Array] : [])].forEach(e => function create$1(e) {
|
|
7355
7359
|
const t = e.name;
|
|
7356
|
-
|
|
7360
|
+
Z[t.toLowerCase()] = {
|
|
7357
7361
|
test: e => toStringTag(e) === t,
|
|
7358
7362
|
replace: e => (0 === e.byteOffset && e.byteLength === e.buffer.byteLength ? e : e.slice(0)).buffer,
|
|
7359
7363
|
revive: t => "ArrayBuffer" === toStringTag(t) ? new e(t) : t
|
|
7360
7364
|
};
|
|
7361
7365
|
}(e));
|
|
7362
|
-
const
|
|
7366
|
+
const ee = {};
|
|
7363
7367
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, ...("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : []), ...("function" == typeof Float16Array ? [Float16Array] : [])].forEach(e => function create(e) {
|
|
7364
7368
|
const t = e.name;
|
|
7365
|
-
|
|
7369
|
+
ee[t.toLowerCase()] = {
|
|
7366
7370
|
test: e => toStringTag(e) === t,
|
|
7367
7371
|
replace({
|
|
7368
7372
|
buffer: e,
|
|
@@ -7378,7 +7382,7 @@ const Z = {};
|
|
|
7378
7382
|
} : (n.buffers.push(e), {
|
|
7379
7383
|
maxByteLength: e.maxByteLength,
|
|
7380
7384
|
resizable: e.resizable,
|
|
7381
|
-
encoded:
|
|
7385
|
+
encoded: y(e),
|
|
7382
7386
|
byteOffset: t,
|
|
7383
7387
|
length: r
|
|
7384
7388
|
});
|
|
@@ -7400,14 +7404,14 @@ const Z = {};
|
|
|
7400
7404
|
}
|
|
7401
7405
|
};
|
|
7402
7406
|
}(e));
|
|
7403
|
-
const
|
|
7407
|
+
const te = {
|
|
7404
7408
|
undef: {
|
|
7405
7409
|
test: (e, t) => void 0 === e && (t.ownKeys || !("ownKeys" in t)),
|
|
7406
7410
|
replace: () => 0,
|
|
7407
7411
|
revive: () => new Undefined()
|
|
7408
7412
|
}
|
|
7409
7413
|
},
|
|
7410
|
-
|
|
7414
|
+
re = {
|
|
7411
7415
|
userObject: {
|
|
7412
7416
|
test: e => isUserObject(e),
|
|
7413
7417
|
replace: e => ({
|
|
@@ -7416,7 +7420,7 @@ const ee = {
|
|
|
7416
7420
|
revive: e => e
|
|
7417
7421
|
}
|
|
7418
7422
|
},
|
|
7419
|
-
|
|
7423
|
+
ne = {
|
|
7420
7424
|
videoframe: {
|
|
7421
7425
|
test: e => "VideoFrame" === toStringTag(e),
|
|
7422
7426
|
replaceAsync: e => new TypesonPromise(async (t, r) => {
|
|
@@ -7430,10 +7434,10 @@ const ee = {
|
|
|
7430
7434
|
visibleRect: i,
|
|
7431
7435
|
displayWidth: c,
|
|
7432
7436
|
displayHeight: l,
|
|
7433
|
-
colorSpace:
|
|
7437
|
+
colorSpace: u
|
|
7434
7438
|
} = e,
|
|
7435
|
-
|
|
7436
|
-
await e.copyTo(
|
|
7439
|
+
y = new ArrayBuffer(e.allocationSize());
|
|
7440
|
+
await e.copyTo(y), t({
|
|
7437
7441
|
format: r,
|
|
7438
7442
|
codedWidth: n,
|
|
7439
7443
|
codedHeight: o,
|
|
@@ -7448,12 +7452,12 @@ const ee = {
|
|
|
7448
7452
|
displayWidth: c,
|
|
7449
7453
|
displayHeight: l,
|
|
7450
7454
|
colorSpace: {
|
|
7451
|
-
primaries:
|
|
7452
|
-
transfer:
|
|
7453
|
-
matrix:
|
|
7454
|
-
fullRange:
|
|
7455
|
+
primaries: u.primaries,
|
|
7456
|
+
transfer: u.transfer,
|
|
7457
|
+
matrix: u.matrix,
|
|
7458
|
+
fullRange: u.fullRange
|
|
7455
7459
|
},
|
|
7456
|
-
data:
|
|
7460
|
+
data: y
|
|
7457
7461
|
});
|
|
7458
7462
|
} catch (e) {
|
|
7459
7463
|
r(e);
|
|
@@ -7471,7 +7475,7 @@ const ee = {
|
|
|
7471
7475
|
colorSpace: c,
|
|
7472
7476
|
data: l
|
|
7473
7477
|
}) {
|
|
7474
|
-
const
|
|
7478
|
+
const u = {
|
|
7475
7479
|
format: e,
|
|
7476
7480
|
codedWidth: t,
|
|
7477
7481
|
codedHeight: r,
|
|
@@ -7481,30 +7485,44 @@ const ee = {
|
|
|
7481
7485
|
displayHeight: i,
|
|
7482
7486
|
colorSpace: c
|
|
7483
7487
|
};
|
|
7484
|
-
return null != o && (
|
|
7488
|
+
return null != o && (u.duration = o), new VideoFrame(new Uint8Array(l), u);
|
|
7485
7489
|
}
|
|
7486
7490
|
}
|
|
7487
7491
|
},
|
|
7488
|
-
|
|
7492
|
+
oe = {
|
|
7489
7493
|
webtransporterror: {
|
|
7490
7494
|
test: e => "WebTransportError" === toStringTag(e),
|
|
7491
7495
|
replace: ({
|
|
7492
7496
|
message: e,
|
|
7493
|
-
streamErrorCode: t
|
|
7497
|
+
streamErrorCode: t,
|
|
7498
|
+
cause: r,
|
|
7499
|
+
stack: n,
|
|
7500
|
+
fileName: o,
|
|
7501
|
+
lineNumber: a,
|
|
7502
|
+
columnNumber: s
|
|
7494
7503
|
}) => ({
|
|
7495
7504
|
message: e,
|
|
7496
|
-
streamErrorCode: t
|
|
7505
|
+
streamErrorCode: t,
|
|
7506
|
+
cause: r,
|
|
7507
|
+
stack: n,
|
|
7508
|
+
fileName: o,
|
|
7509
|
+
lineNumber: a,
|
|
7510
|
+
columnNumber: s
|
|
7497
7511
|
}),
|
|
7498
|
-
revive
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7512
|
+
revive(e) {
|
|
7513
|
+
const {
|
|
7514
|
+
message: t,
|
|
7515
|
+
streamErrorCode: r
|
|
7516
|
+
} = e,
|
|
7517
|
+
n = new WebTransportError({
|
|
7518
|
+
message: t,
|
|
7519
|
+
streamErrorCode: r
|
|
7520
|
+
});
|
|
7521
|
+
return n.cause = e.cause, n.stack = e.stack, n.fileName = e.fileName, n.lineNumber = e.lineNumber, n.columnNumber = e.columnNumber, n;
|
|
7522
|
+
}
|
|
7505
7523
|
}
|
|
7506
7524
|
},
|
|
7507
|
-
|
|
7525
|
+
ae = [{
|
|
7508
7526
|
arrayNonindexKeys: {
|
|
7509
7527
|
testPlainObjects: true,
|
|
7510
7528
|
test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number(e)) !== e) && (t.iterateIn = "object", t.addLength = true), true),
|
|
@@ -7524,13 +7542,13 @@ const ee = {
|
|
|
7524
7542
|
revive() {}
|
|
7525
7543
|
}
|
|
7526
7544
|
}],
|
|
7527
|
-
|
|
7528
|
-
ye = [
|
|
7529
|
-
const
|
|
7545
|
+
se = [K, M, $, W],
|
|
7546
|
+
ye = [re, te, ae, z, se, A, H, R, k, C, U, b, I, B].concat("function" == typeof Map ? L : [], "function" == typeof Set ? X : [], "function" == typeof ArrayBuffer ? f : [], "function" == typeof Uint8Array ? ee : [], "function" == typeof DataView ? O : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [h, d] : [], "undefined" != typeof DOMException ? T : [], "undefined" != typeof QuotaExceededError ? J : [], "undefined" != typeof WebTransportError ? oe : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? P : [], "undefined" != typeof DOMQuad ? E : [], "undefined" != typeof DOMMatrix ? S : [], "undefined" != typeof AudioData ? m : [], "undefined" != typeof EncodedAudioChunk ? x : [], "undefined" != typeof EncodedVideoChunk ? j : [], "undefined" != typeof VideoFrame ? ne : []);
|
|
7547
|
+
const pe = ye.concat({
|
|
7530
7548
|
checkDataCloneException: {
|
|
7531
7549
|
test(e) {
|
|
7532
7550
|
const t = {}.toString.call(e).slice(8, -1);
|
|
7533
|
-
if (["symbol", "function"].includes(typeof e) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel", "MessagePort"].includes(t) || e && e.constructor && ["MessageChannel", "MessagePort"].includes(e.constructor.name) || ["ArrayBuffer", "DataView", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"].includes(t) && function isBufferDetached(e) {
|
|
7551
|
+
if (["symbol", "function"].includes(typeof e) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "WeakRef", "FinalizationRegistry", "Generator", "AsyncGenerator", "String Iterator", "Array Iterator", "Map Iterator", "Set Iterator", "RegExp String Iterator", "Intl.Collator", "Intl.DateTimeFormat", "Intl.DisplayNames", "Intl.DurationFormat", "Intl.ListFormat", "Intl.Locale", "Intl.NumberFormat", "Intl.PluralRules", "Intl.RelativeTimeFormat", "Intl.Segmenter", "Event", "MessageChannel", "MessagePort", "ReadableStream", "WritableStream", "TransformStream", "OffscreenCanvas"].includes(t) || e && e.constructor && ["MessageChannel", "MessagePort"].includes(e.constructor.name) || ["ArrayBuffer", "DataView", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"].includes(t) && function isBufferDetached(e) {
|
|
7534
7552
|
if ("boolean" == typeof e.detached) return e.detached;
|
|
7535
7553
|
if (0 !== e.byteLength) return false;
|
|
7536
7554
|
try {
|
|
@@ -7543,7 +7561,7 @@ const ue = ye.concat({
|
|
|
7543
7561
|
}
|
|
7544
7562
|
}
|
|
7545
7563
|
}),
|
|
7546
|
-
|
|
7564
|
+
fe = pe.concat({
|
|
7547
7565
|
checkSharedArrayBufferException: {
|
|
7548
7566
|
test(e) {
|
|
7549
7567
|
if ("SharedArrayBuffer" === {}.toString.call(e).slice(8, -1)) throw new DOMException("The object cannot be cloned.", "DataCloneError");
|
|
@@ -7557,7 +7575,7 @@ const ue = ye.concat({
|
|
|
7557
7575
|
// Although typeson-registry already has a FileList type in its structured cloning presets,
|
|
7558
7576
|
// we need to override it so it works with our tests
|
|
7559
7577
|
|
|
7560
|
-
const specSet =
|
|
7578
|
+
const specSet = fe.flatMap(preset => Array.isArray(preset) ? preset : [preset]).find(preset => preset && !Array.isArray(preset) && 'filelist' in preset);
|
|
7561
7579
|
const origFileList = specSet && !Array.isArray(specSet) && 'filelist' in specSet ? specSet.filelist : undefined;
|
|
7562
7580
|
const origTest = origFileList && typeof origFileList === 'object' && 'test' in origFileList && typeof origFileList.test === 'function' ? origFileList.test : undefined;
|
|
7563
7581
|
const origRevive = origFileList && typeof origFileList === 'object' && 'revive' in origFileList && typeof origFileList.revive === 'function' ? origFileList.revive : undefined;
|
|
@@ -7586,7 +7604,7 @@ const customFileList = origFileList ? {
|
|
|
7586
7604
|
return typeof origRevive === 'function' ? origRevive(x, state) : undefined;
|
|
7587
7605
|
}
|
|
7588
7606
|
} : undefined;
|
|
7589
|
-
let typeson = new Typeson().register([
|
|
7607
|
+
let typeson = new Typeson().register([fe, customFileList ? {
|
|
7590
7608
|
filelist: customFileList
|
|
7591
7609
|
} : {}]);
|
|
7592
7610
|
|
|
@@ -7597,7 +7615,7 @@ let typeson = new Typeson().register([pe, customFileList ? {
|
|
|
7597
7615
|
*/
|
|
7598
7616
|
function register(func) {
|
|
7599
7617
|
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Should be one-time cache
|
|
7600
|
-
typeson = new Typeson().register(func(
|
|
7618
|
+
typeson = new Typeson().register(func(fe));
|
|
7601
7619
|
}
|
|
7602
7620
|
|
|
7603
7621
|
/**
|