indexeddbshim 16.0.0 → 17.0.0
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 +4 -4
- package/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/dist/CFG.d.ts.map +1 -1
- package/dist/DOMException.d.ts.map +1 -1
- package/dist/DOMStringList.d.ts.map +1 -1
- package/dist/IDBCursor.d.ts +5 -2
- package/dist/IDBCursor.d.ts.map +1 -1
- package/dist/IDBDatabase.d.ts +2 -1
- package/dist/IDBDatabase.d.ts.map +1 -1
- package/dist/IDBFactory.d.ts +2 -1
- package/dist/IDBFactory.d.ts.map +1 -1
- package/dist/IDBIndex.d.ts +2 -1
- package/dist/IDBIndex.d.ts.map +1 -1
- package/dist/IDBKeyRange.d.ts +1 -1
- package/dist/IDBKeyRange.d.ts.map +1 -1
- package/dist/IDBObjectStore.d.ts +2 -1
- package/dist/IDBObjectStore.d.ts.map +1 -1
- package/dist/IDBRequest.d.ts +5 -3
- package/dist/IDBRequest.d.ts.map +1 -1
- package/dist/IDBTransaction.d.ts +2 -1
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/Key.d.ts.map +1 -1
- package/dist/Sca.d.ts.map +1 -1
- package/dist/UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/browser-noninvasive.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +32 -27
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +2 -2
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +984 -1092
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +1220 -1233
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +8 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +984 -1092
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +1219 -1232
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +8 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +1219 -1232
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +8 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts +2 -2
- package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.d.ts.map +1 -1
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/dist/util.d.ts.map +1 -1
- package/package.json +112 -105
- package/src/CFG.js +2 -3
- package/src/DOMException.js +11 -9
- package/src/DOMStringList.js +8 -3
- package/src/Event.js +2 -0
- package/src/IDBCursor.js +22 -11
- package/src/IDBDatabase.js +9 -6
- package/src/IDBFactory.js +21 -15
- package/src/IDBIndex.js +82 -77
- package/src/IDBKeyRange.js +42 -35
- package/src/IDBObjectStore.js +83 -77
- package/src/IDBRequest.js +28 -15
- package/src/IDBTransaction.js +8 -4
- package/src/IDBVersionChangeEvent.js +2 -0
- package/src/Key.js +22 -12
- package/src/Sca.js +2 -1
- package/src/UnicodeIdentifiers.js +2 -2
- package/src/browser-UnicodeIdentifiers.js +1 -2
- package/src/browser-noninvasive.js +0 -1
- package/src/browser.js +0 -1
- package/src/node-UnicodeIdentifiers.js +1 -1
- package/src/node.js +1 -1
- package/src/setGlobalVars.js +13 -15
- package/src/unicode-regex.js +1 -1
- package/src/util.js +13 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v17.0.0 - 7/28/2026 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.setGlobalVars = factory());
|
|
7
7
|
})(this, (function () { 'use strict';
|
|
8
8
|
|
|
9
|
-
function _arrayLikeToArray
|
|
9
|
+
function _arrayLikeToArray(r, a) {
|
|
10
10
|
(null == a || a > r.length) && (a = r.length);
|
|
11
11
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
12
12
|
return n;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
if (Array.isArray(r)) return r;
|
|
16
16
|
}
|
|
17
17
|
function _arrayWithoutHoles(r) {
|
|
18
|
-
if (Array.isArray(r)) return _arrayLikeToArray
|
|
18
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
19
19
|
}
|
|
20
20
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
21
21
|
try {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function _classCallCheck
|
|
45
|
+
function _classCallCheck(a, n) {
|
|
46
46
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
47
47
|
}
|
|
48
48
|
function _construct(t, e, r) {
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
function _defineProperties(e, r) {
|
|
56
56
|
for (var t = 0; t < r.length; t++) {
|
|
57
57
|
var o = r[t];
|
|
58
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey
|
|
58
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function _createClass
|
|
61
|
+
function _createClass(e, r, t) {
|
|
62
62
|
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
63
63
|
writable: false
|
|
64
64
|
}), e;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
function _createForOfIteratorHelper(r, e) {
|
|
67
67
|
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
68
68
|
if (!t) {
|
|
69
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray
|
|
69
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
70
70
|
t && (r = t);
|
|
71
71
|
var n = 0,
|
|
72
72
|
F = function () {};
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
};
|
|
119
119
|
return c[e] = t, Object.defineProperty(r, n, c);
|
|
120
120
|
}
|
|
121
|
-
function _defineProperty
|
|
122
|
-
return (r = _toPropertyKey
|
|
121
|
+
function _defineProperty(e, r, t) {
|
|
122
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
123
123
|
value: t,
|
|
124
124
|
enumerable: true,
|
|
125
125
|
configurable: true,
|
|
@@ -148,7 +148,10 @@
|
|
|
148
148
|
f = true,
|
|
149
149
|
o = false;
|
|
150
150
|
try {
|
|
151
|
-
if (i = (t = t.call(r)).next, 0 === l)
|
|
151
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
152
|
+
if (Object(t) !== t) return;
|
|
153
|
+
f = !1;
|
|
154
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
152
155
|
} catch (r) {
|
|
153
156
|
o = true, n = r;
|
|
154
157
|
} finally {
|
|
@@ -167,7 +170,7 @@
|
|
|
167
170
|
function _nonIterableSpread() {
|
|
168
171
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
169
172
|
}
|
|
170
|
-
function ownKeys
|
|
173
|
+
function ownKeys(e, r) {
|
|
171
174
|
var t = Object.keys(e);
|
|
172
175
|
if (Object.getOwnPropertySymbols) {
|
|
173
176
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -177,12 +180,12 @@
|
|
|
177
180
|
}
|
|
178
181
|
return t;
|
|
179
182
|
}
|
|
180
|
-
function _objectSpread2
|
|
183
|
+
function _objectSpread2(e) {
|
|
181
184
|
for (var r = 1; r < arguments.length; r++) {
|
|
182
185
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
183
|
-
r % 2 ? ownKeys
|
|
184
|
-
_defineProperty
|
|
185
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys
|
|
186
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
187
|
+
_defineProperty(e, r, t[r]);
|
|
188
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
186
189
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
187
190
|
});
|
|
188
191
|
}
|
|
@@ -283,23 +286,21 @@
|
|
|
283
286
|
i = 0;
|
|
284
287
|
}
|
|
285
288
|
_regeneratorDefine = function (e, r, n, t) {
|
|
286
|
-
|
|
289
|
+
function o(r, n) {
|
|
290
|
+
_regeneratorDefine(e, r, function (e) {
|
|
291
|
+
return this._invoke(r, n, e);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
r ? i ? i(e, r, {
|
|
287
295
|
value: n,
|
|
288
296
|
enumerable: !t,
|
|
289
297
|
configurable: !t,
|
|
290
298
|
writable: !t
|
|
291
|
-
}) : e[r] = n;
|
|
292
|
-
function o(r, n) {
|
|
293
|
-
_regeneratorDefine(e, r, function (e) {
|
|
294
|
-
return this._invoke(r, n, e);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
o("next", 0), o("throw", 1), o("return", 2);
|
|
298
|
-
}
|
|
299
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
299
300
|
}, _regeneratorDefine(e, r, n, t);
|
|
300
301
|
}
|
|
301
|
-
function _slicedToArray
|
|
302
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray
|
|
302
|
+
function _slicedToArray(r, e) {
|
|
303
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
303
304
|
}
|
|
304
305
|
function _taggedTemplateLiteral(e, t) {
|
|
305
306
|
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
@@ -309,7 +310,7 @@
|
|
|
309
310
|
}));
|
|
310
311
|
}
|
|
311
312
|
function _toConsumableArray(r) {
|
|
312
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray
|
|
313
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
313
314
|
}
|
|
314
315
|
function _toPrimitive(t, r) {
|
|
315
316
|
if ("object" != typeof t || !t) return t;
|
|
@@ -321,24 +322,24 @@
|
|
|
321
322
|
}
|
|
322
323
|
return ("string" === r ? String : Number)(t);
|
|
323
324
|
}
|
|
324
|
-
function _toPropertyKey
|
|
325
|
+
function _toPropertyKey(t) {
|
|
325
326
|
var i = _toPrimitive(t, "string");
|
|
326
327
|
return "symbol" == typeof i ? i : i + "";
|
|
327
328
|
}
|
|
328
|
-
function _typeof$
|
|
329
|
+
function _typeof$1(o) {
|
|
329
330
|
"@babel/helpers - typeof";
|
|
330
331
|
|
|
331
|
-
return _typeof$
|
|
332
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
332
333
|
return typeof o;
|
|
333
334
|
} : function (o) {
|
|
334
335
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
335
|
-
}, _typeof$
|
|
336
|
+
}, _typeof$1(o);
|
|
336
337
|
}
|
|
337
|
-
function _unsupportedIterableToArray
|
|
338
|
+
function _unsupportedIterableToArray(r, a) {
|
|
338
339
|
if (r) {
|
|
339
|
-
if ("string" == typeof r) return _arrayLikeToArray
|
|
340
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
340
341
|
var t = {}.toString.call(r).slice(8, -1);
|
|
341
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray
|
|
342
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
|
|
@@ -349,14 +350,14 @@
|
|
|
349
350
|
// ID_Continue (includes Other_ID_Continue)
|
|
350
351
|
var UnicodeIDContinue = String.raw(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])"], ["(?:[$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF30-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDCA-\\uDDCC\\uDDD0-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3C-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9\\uDF00-\\uDF19\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF])"])));
|
|
351
352
|
|
|
352
|
-
function _typeof
|
|
353
|
+
function _typeof(obj) {
|
|
353
354
|
"@babel/helpers - typeof";
|
|
354
355
|
|
|
355
|
-
return _typeof
|
|
356
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
356
357
|
return typeof obj;
|
|
357
358
|
} : function (obj) {
|
|
358
359
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
359
|
-
}, _typeof
|
|
360
|
+
}, _typeof(obj);
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
/* eslint-disable n/no-sync -- Want sync naming */
|
|
@@ -1184,7 +1185,7 @@
|
|
|
1184
1185
|
}
|
|
1185
1186
|
var triggerGlobalErrorEvent;
|
|
1186
1187
|
var useNodeImpl = false;
|
|
1187
|
-
if (typeof window === 'undefined' || typeof ErrorEvent === 'undefined' || window && (typeof window === "undefined" ? "undefined" : _typeof
|
|
1188
|
+
if (typeof window === 'undefined' || typeof ErrorEvent === 'undefined' || window && (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && !window.dispatchEvent) {
|
|
1188
1189
|
useNodeImpl = true;
|
|
1189
1190
|
triggerGlobalErrorEvent = function triggerGlobalErrorEvent() {
|
|
1190
1191
|
setTimeout(function () {
|
|
@@ -1277,12 +1278,10 @@
|
|
|
1277
1278
|
Object.setPrototypeOf(ShimCustomEvent.prototype, ShimEvent.prototype);
|
|
1278
1279
|
}
|
|
1279
1280
|
|
|
1280
|
-
/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/147 */
|
|
1281
1281
|
/**
|
|
1282
1282
|
* @typedef {T[keyof T]} ValueOf<T>
|
|
1283
1283
|
* @template T
|
|
1284
1284
|
*/
|
|
1285
|
-
/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/147 */
|
|
1286
1285
|
|
|
1287
1286
|
/**
|
|
1288
1287
|
* @typedef {{unlink: (path: string, cb: import('fs').NoParamCallback) => void}} FSApi
|
|
@@ -1344,6 +1343,7 @@
|
|
|
1344
1343
|
*/
|
|
1345
1344
|
|
|
1346
1345
|
/** @type {Config} */
|
|
1346
|
+
// eslint-disable-next-line unicorn/no-top-level-side-effects -- Would be good
|
|
1347
1347
|
[
|
|
1348
1348
|
// Boolean for verbose reporting
|
|
1349
1349
|
'DEBUG',
|
|
@@ -1361,7 +1361,7 @@
|
|
|
1361
1361
|
// calls required for full WebIDL compliance will be used. Probably
|
|
1362
1362
|
// only needed for testing or environments where full introspection
|
|
1363
1363
|
// on class relationships is required; see
|
|
1364
|
-
//
|
|
1364
|
+
// https://stackoverflow.com/questions/41927589/rationales-consequences-of-webidl-class-inheritance-requirements
|
|
1365
1365
|
'fullIDLSupport',
|
|
1366
1366
|
// Effectively defaults to false (ignored unless `true`)
|
|
1367
1367
|
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
var validator;
|
|
1483
1483
|
if (Array.isArray(prop)) {
|
|
1484
1484
|
var _prop = prop;
|
|
1485
|
-
var _prop2 = _slicedToArray
|
|
1485
|
+
var _prop2 = _slicedToArray(_prop, 2);
|
|
1486
1486
|
prop = _prop2[0];
|
|
1487
1487
|
validator = _prop2[1];
|
|
1488
1488
|
}
|
|
@@ -1509,7 +1509,7 @@
|
|
|
1509
1509
|
function requireRegex() {
|
|
1510
1510
|
if (hasRequiredRegex) return regex$1;
|
|
1511
1511
|
hasRequiredRegex = 1;
|
|
1512
|
-
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]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
1512
|
+
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]/;
|
|
1513
1513
|
return regex$1;
|
|
1514
1514
|
}
|
|
1515
1515
|
var regexExports = requireRegex();
|
|
@@ -1524,9 +1524,9 @@
|
|
|
1524
1524
|
* @returns {string}
|
|
1525
1525
|
*/
|
|
1526
1526
|
function escapeUnmatchedSurrogates(arg) {
|
|
1527
|
-
//
|
|
1527
|
+
// https://stackoverflow.com/a/6701665/271577
|
|
1528
1528
|
return arg.replaceAll(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))((?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g, function (_, unmatchedHighSurrogate, precedingLow, unmatchedLowSurrogate) {
|
|
1529
|
-
// Could add a corresponding surrogate for compatibility with `node-sqlite3`:
|
|
1529
|
+
// Could add a corresponding surrogate for compatibility with `node-sqlite3`: https://bugs.python.org/issue12569 and https://stackoverflow.com/a/6701665/271577
|
|
1530
1530
|
// but Chrome having problems
|
|
1531
1531
|
if (unmatchedHighSurrogate) {
|
|
1532
1532
|
return '^2' + unmatchedHighSurrogate.codePointAt().toString(16).padStart(4, '0');
|
|
@@ -1540,14 +1540,14 @@
|
|
|
1540
1540
|
* @returns {string}
|
|
1541
1541
|
*/
|
|
1542
1542
|
function escapeNameForSQLiteIdentifier(arg) {
|
|
1543
|
-
//
|
|
1543
|
+
// https://stackoverflow.com/a/6701665/271577
|
|
1544
1544
|
return '_' +
|
|
1545
1545
|
// Prevent empty string
|
|
1546
1546
|
escapeUnmatchedSurrogates(arg.replaceAll('^', '^^') // Escape our escape
|
|
1547
|
-
//
|
|
1547
|
+
// https://www.sqlite.org/src/tktview?name=57c971fc74
|
|
1548
1548
|
.replaceAll('\0', '^0')
|
|
1549
1549
|
// We need to avoid identifiers being treated as duplicates based on SQLite's ASCII-only case-insensitive table and column names
|
|
1550
|
-
// (For SQL in general, however, see
|
|
1550
|
+
// (For SQL in general, however, see https://stackoverflow.com/a/17215009/271577
|
|
1551
1551
|
// See also https://www.sqlite.org/faq.html#q18 re: Unicode (non-ASCII) case-insensitive not working
|
|
1552
1552
|
.replaceAll(/([A-Z])/g, '^$1'));
|
|
1553
1553
|
}
|
|
@@ -1577,7 +1577,7 @@
|
|
|
1577
1577
|
*/
|
|
1578
1578
|
function sqlEscape(arg) {
|
|
1579
1579
|
// https://www.sqlite.org/lang_keywords.html
|
|
1580
|
-
//
|
|
1580
|
+
// https://stackoverflow.com/a/6701665/271577
|
|
1581
1581
|
// There is no need to escape ', `, or [], as
|
|
1582
1582
|
// we should always be within double quotes
|
|
1583
1583
|
// NUL should have already been stripped
|
|
@@ -1693,7 +1693,7 @@
|
|
|
1693
1693
|
* @returns {obj is object}
|
|
1694
1694
|
*/
|
|
1695
1695
|
function isObj(obj) {
|
|
1696
|
-
return obj !== null && _typeof$
|
|
1696
|
+
return obj !== null && _typeof$1(obj) === 'object';
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
1699
|
/**
|
|
@@ -1741,7 +1741,9 @@
|
|
|
1741
1741
|
* @returns {boolean}
|
|
1742
1742
|
*/
|
|
1743
1743
|
function isIterable(obj) {
|
|
1744
|
-
return isObj(obj) &&
|
|
1744
|
+
return isObj(obj) &&
|
|
1745
|
+
// eslint-disable-next-line unicorn/no-computed-property-existence-check -- May not be "own"
|
|
1746
|
+
Symbol.iterator in obj && typeof obj[Symbol.iterator] === 'function';
|
|
1745
1747
|
}
|
|
1746
1748
|
|
|
1747
1749
|
/**
|
|
@@ -1821,7 +1823,7 @@
|
|
|
1821
1823
|
props = typeof props === 'string' ? [props] : props;
|
|
1822
1824
|
props.forEach(function (prop) {
|
|
1823
1825
|
var o;
|
|
1824
|
-
if (getter && prop
|
|
1826
|
+
if (getter && Object.hasOwn(getter, prop)) {
|
|
1825
1827
|
o = getter[prop];
|
|
1826
1828
|
} else {
|
|
1827
1829
|
Object.defineProperty(obj, '__' + prop, {
|
|
@@ -1879,7 +1881,7 @@
|
|
|
1879
1881
|
*/
|
|
1880
1882
|
function isValidKeyPath(keyPath) {
|
|
1881
1883
|
return isValidKeyPathString(keyPath) || Array.isArray(keyPath) && Boolean(keyPath.length) &&
|
|
1882
|
-
// Convert array from sparse to dense
|
|
1884
|
+
// Convert array from sparse to dense https://www.2ality.com/2012/06/dense-arrays.html
|
|
1883
1885
|
// See also https://heycam.github.io/webidl/#idl-DOMString
|
|
1884
1886
|
_toConsumableArray(keyPath).every(function (pathComponent) {
|
|
1885
1887
|
return isValidKeyPathString(pathComponent);
|
|
@@ -1985,8 +1987,10 @@
|
|
|
1985
1987
|
return ev;
|
|
1986
1988
|
}
|
|
1987
1989
|
|
|
1990
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
1988
1991
|
// We don't add within polyfill repo as might not always be the desired implementation
|
|
1989
1992
|
Object.defineProperty(ShimEvent, Symbol.hasInstance, {
|
|
1993
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
1990
1994
|
/**
|
|
1991
1995
|
* @typedef {any} AnyValue
|
|
1992
1996
|
*/
|
|
@@ -2028,6 +2032,7 @@
|
|
|
2028
2032
|
* @typedef {number} Integer
|
|
2029
2033
|
*/
|
|
2030
2034
|
|
|
2035
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
2031
2036
|
readonlyProperties$6.forEach(function (prop) {
|
|
2032
2037
|
// Ensure for proper interface testing that "get <name>" is the function name
|
|
2033
2038
|
var o = _defineAccessor("get", {}, prop, function () {
|
|
@@ -2178,7 +2183,7 @@
|
|
|
2178
2183
|
function DOMException(message, name) {
|
|
2179
2184
|
// const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
|
|
2180
2185
|
this[Symbol.toStringTag] = 'DOMException';
|
|
2181
|
-
this._code = name
|
|
2186
|
+
this._code = Object.hasOwn(codes, name) ? codes[(/** @type {Code} */name)] : legacyCodes[(/** @type {LegacyCode} */name)] || 0;
|
|
2182
2187
|
this._name = name || 'Error';
|
|
2183
2188
|
// We avoid `String()` in this next line as it converts Symbols
|
|
2184
2189
|
this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion -- Don't convert symbols
|
|
@@ -2314,13 +2319,14 @@
|
|
|
2314
2319
|
* @returns {void}
|
|
2315
2320
|
*/
|
|
2316
2321
|
function logError(name, message, error) {
|
|
2317
|
-
if (CFG.DEBUG) {
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2322
|
+
if (!CFG.DEBUG) {
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
var msg = error && _typeof$1(error) === 'object' && error.message ? error.message : (/** @type {string} */error);
|
|
2326
|
+
var method = typeof console.error === 'function' ? 'error' : 'log';
|
|
2327
|
+
console[method](name + ': ' + message + '. ' + (msg || ''));
|
|
2328
|
+
if (console.trace) {
|
|
2329
|
+
console.trace();
|
|
2324
2330
|
}
|
|
2325
2331
|
}
|
|
2326
2332
|
|
|
@@ -2333,7 +2339,7 @@
|
|
|
2333
2339
|
* @returns {boolean}
|
|
2334
2340
|
*/
|
|
2335
2341
|
function isErrorOrDOMErrorOrDOMException(obj) {
|
|
2336
|
-
return obj && _typeof$
|
|
2342
|
+
return obj && _typeof$1(obj) === 'object' &&
|
|
2337
2343
|
// We don't use util.isObj here as mutual dependency causing problems in Babel with browser
|
|
2338
2344
|
typeof obj.name === 'string';
|
|
2339
2345
|
}
|
|
@@ -2460,8 +2466,9 @@
|
|
|
2460
2466
|
|
|
2461
2467
|
/**
|
|
2462
2468
|
* The IDBRequest Object that is returns for all async calls.
|
|
2463
|
-
* @see
|
|
2469
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#request-api
|
|
2464
2470
|
* @class
|
|
2471
|
+
* @throws {TypeError}
|
|
2465
2472
|
*/
|
|
2466
2473
|
function IDBRequest() {
|
|
2467
2474
|
throw new TypeError('Illegal constructor');
|
|
@@ -2501,12 +2508,11 @@
|
|
|
2501
2508
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
2502
2509
|
});
|
|
2503
2510
|
doneFlagGetters.forEach(function (prop) {
|
|
2504
|
-
Object.
|
|
2511
|
+
Object.defineProperties(_this, _defineProperty(_defineProperty({}, '__' + prop, {
|
|
2505
2512
|
enumerable: false,
|
|
2506
2513
|
configurable: false,
|
|
2507
2514
|
writable: true
|
|
2508
|
-
})
|
|
2509
|
-
Object.defineProperty(_this, prop, {
|
|
2515
|
+
}), prop, {
|
|
2510
2516
|
enumerable: true,
|
|
2511
2517
|
configurable: true,
|
|
2512
2518
|
get: function get() {
|
|
@@ -2515,7 +2521,7 @@
|
|
|
2515
2521
|
}
|
|
2516
2522
|
return this['__' + prop];
|
|
2517
2523
|
}
|
|
2518
|
-
});
|
|
2524
|
+
}));
|
|
2519
2525
|
});
|
|
2520
2526
|
defineReadonlyProperties(this, readonlyProperties$5, {
|
|
2521
2527
|
readyState: {
|
|
@@ -2560,6 +2566,7 @@
|
|
|
2560
2566
|
return this.__transaction;
|
|
2561
2567
|
};
|
|
2562
2568
|
|
|
2569
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
2563
2570
|
// Illegal invocations
|
|
2564
2571
|
defineReadonlyOuterInterface(IDBRequest.prototype, readonlyProperties$5);
|
|
2565
2572
|
defineReadonlyOuterInterface(IDBRequest.prototype, doneFlagGetters);
|
|
@@ -2574,15 +2581,18 @@
|
|
|
2574
2581
|
Object.defineProperty(IDBRequest, 'prototype', {
|
|
2575
2582
|
writable: false
|
|
2576
2583
|
});
|
|
2584
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
2585
|
+
|
|
2577
2586
|
var openListeners = ['onblocked', 'onupgradeneeded'];
|
|
2578
2587
|
|
|
2579
2588
|
/**
|
|
2580
|
-
* @typedef {IDBRequestFull & IDBOpenDBRequest
|
|
2589
|
+
* @typedef {IDBRequestFull & IDBOpenDBRequest} IDBOpenDBRequestFull
|
|
2581
2590
|
*/
|
|
2582
2591
|
|
|
2583
2592
|
/**
|
|
2584
2593
|
* The IDBOpenDBRequest called when a database is opened.
|
|
2585
2594
|
* @class
|
|
2595
|
+
* @throws {TypeError}
|
|
2586
2596
|
*/
|
|
2587
2597
|
function IDBOpenDBRequest() {
|
|
2588
2598
|
throw new TypeError('Illegal constructor');
|
|
@@ -2590,12 +2600,16 @@
|
|
|
2590
2600
|
|
|
2591
2601
|
// @ts-expect-error It's ok
|
|
2592
2602
|
IDBOpenDBRequest.prototype = Object.create(IDBRequest.prototype);
|
|
2603
|
+
|
|
2604
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
2593
2605
|
Object.defineProperty(IDBOpenDBRequest.prototype, 'constructor', {
|
|
2594
2606
|
enumerable: false,
|
|
2595
2607
|
writable: true,
|
|
2596
2608
|
configurable: true,
|
|
2597
2609
|
value: IDBOpenDBRequest
|
|
2598
2610
|
});
|
|
2611
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
2612
|
+
|
|
2599
2613
|
var IDBOpenDBRequestAlias = IDBOpenDBRequest;
|
|
2600
2614
|
/**
|
|
2601
2615
|
* @returns {IDBRequestFull & IDBOpenDBRequest}
|
|
@@ -2623,6 +2637,8 @@
|
|
|
2623
2637
|
// @ts-expect-error It's ok
|
|
2624
2638
|
return new IDBOpenDBRequest();
|
|
2625
2639
|
};
|
|
2640
|
+
|
|
2641
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
2626
2642
|
defineOuterInterface(IDBOpenDBRequest.prototype, openListeners);
|
|
2627
2643
|
IDBOpenDBRequest.prototype[Symbol.toStringTag] = 'IDBOpenDBRequestPrototype';
|
|
2628
2644
|
Object.defineProperty(IDBOpenDBRequest, 'prototype', {
|
|
@@ -2801,7 +2817,7 @@
|
|
|
2801
2817
|
* @param {(reason: any) => PromiseLike<never>|null|undefined} cb
|
|
2802
2818
|
* @returns {SyncPromise}
|
|
2803
2819
|
*/
|
|
2804
|
-
SyncPromise.prototype
|
|
2820
|
+
SyncPromise.prototype.catch = function (cb) {
|
|
2805
2821
|
var that = this;
|
|
2806
2822
|
return new SyncPromise(/** @type {ResolveReject} */
|
|
2807
2823
|
function (resolve, reject) {
|
|
@@ -2919,11 +2935,11 @@
|
|
|
2919
2935
|
// verify that the keys encoded correctly
|
|
2920
2936
|
var decodedKey1 = _decode(encodedKey1);
|
|
2921
2937
|
var decodedKey2 = _decode(encodedKey2);
|
|
2922
|
-
if (_typeof$
|
|
2938
|
+
if (_typeof$1(first) === 'object') {
|
|
2923
2939
|
first = JSON.stringify(first);
|
|
2924
2940
|
decodedKey1 = JSON.stringify(decodedKey1);
|
|
2925
2941
|
}
|
|
2926
|
-
if (_typeof$
|
|
2942
|
+
if (_typeof$1(second) === 'object') {
|
|
2927
2943
|
second = JSON.stringify(second);
|
|
2928
2944
|
decodedKey2 = JSON.stringify(decodedKey2);
|
|
2929
2945
|
}
|
|
@@ -3001,10 +3017,14 @@
|
|
|
3001
3017
|
binary: 500,
|
|
3002
3018
|
array: 600
|
|
3003
3019
|
};
|
|
3020
|
+
|
|
3021
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
3004
3022
|
var keyTypes = /** @type {(KeyType|"invalid")[]} */Object.keys(keyTypeToEncodedChar);
|
|
3005
3023
|
keyTypes.forEach(function (k) {
|
|
3006
3024
|
keyTypeToEncodedChar[k] = String.fromCodePoint(/** @type {number} */keyTypeToEncodedChar[k]);
|
|
3007
3025
|
});
|
|
3026
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
3027
|
+
|
|
3008
3028
|
var encodedCharToKeyType = keyTypes.reduce(function (o, k) {
|
|
3009
3029
|
o[keyTypeToEncodedChar[k]] = k;
|
|
3010
3030
|
return o;
|
|
@@ -3090,13 +3110,12 @@
|
|
|
3090
3110
|
if (key > -1) {
|
|
3091
3111
|
sign = signValues.indexOf('smallNegative');
|
|
3092
3112
|
exponent = padBase32Exponent(significantDigitIndex);
|
|
3093
|
-
mantissa = flipBase32(padBase32Mantissa(key32));
|
|
3094
3113
|
// Non-negative exponent case:
|
|
3095
3114
|
} else {
|
|
3096
3115
|
sign = signValues.indexOf('bigNegative');
|
|
3097
3116
|
exponent = flipBase32(padBase32Exponent(decimalIndex !== -1 ? decimalIndex : key32.length));
|
|
3098
|
-
mantissa = flipBase32(padBase32Mantissa(key32));
|
|
3099
3117
|
}
|
|
3118
|
+
mantissa = flipBase32(padBase32Mantissa(key32));
|
|
3100
3119
|
// Non-negative cases:
|
|
3101
3120
|
// Negative exponent case:
|
|
3102
3121
|
} else if (key < 1) {
|
|
@@ -3130,9 +3149,9 @@
|
|
|
3130
3149
|
var mantissa = key.slice(5, 16);
|
|
3131
3150
|
switch (signValues[sign]) {
|
|
3132
3151
|
case 'negativeInfinity':
|
|
3133
|
-
return
|
|
3152
|
+
return -Infinity;
|
|
3134
3153
|
case 'positiveInfinity':
|
|
3135
|
-
return
|
|
3154
|
+
return Infinity;
|
|
3136
3155
|
case 'bigPositive':
|
|
3137
3156
|
return pow32(mantissa, exponent);
|
|
3138
3157
|
case 'smallPositive':
|
|
@@ -3200,7 +3219,7 @@
|
|
|
3200
3219
|
_step;
|
|
3201
3220
|
try {
|
|
3202
3221
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3203
|
-
var _step$value = _slicedToArray
|
|
3222
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
3204
3223
|
i = _step$value[0],
|
|
3205
3224
|
item = _step$value[1];
|
|
3206
3225
|
var encodedItem = _encode(item, true); // encode the array item
|
|
@@ -3265,9 +3284,7 @@
|
|
|
3265
3284
|
decode: function decode(key) {
|
|
3266
3285
|
// Set the entries in buffer's [[ArrayBufferData]] to those in `value`
|
|
3267
3286
|
var k = key.slice(2);
|
|
3268
|
-
var arr = k.length ? k.split(',').map(
|
|
3269
|
-
return Number.parseInt(s);
|
|
3270
|
-
}) : [];
|
|
3287
|
+
var arr = k.length ? k.split(',').map(Number) : [];
|
|
3271
3288
|
var buffer = new ArrayBuffer(arr.length);
|
|
3272
3289
|
var uint8 = new Uint8Array(buffer);
|
|
3273
3290
|
uint8.set(arr);
|
|
@@ -3356,7 +3373,7 @@
|
|
|
3356
3373
|
*/
|
|
3357
3374
|
function roundToPrecision(num) {
|
|
3358
3375
|
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
|
|
3359
|
-
return Number
|
|
3376
|
+
return Number(num.toPrecision(precision));
|
|
3360
3377
|
}
|
|
3361
3378
|
|
|
3362
3379
|
/**
|
|
@@ -3391,7 +3408,7 @@
|
|
|
3391
3408
|
if (isBinary(key)) {
|
|
3392
3409
|
return 'binary';
|
|
3393
3410
|
}
|
|
3394
|
-
var keyType = _typeof$
|
|
3411
|
+
var keyType = _typeof$1(key);
|
|
3395
3412
|
return ['string', 'number'].includes(keyType) ? (/** @type {"string"|"number"} */keyType) : 'invalid';
|
|
3396
3413
|
}
|
|
3397
3414
|
|
|
@@ -3424,7 +3441,7 @@
|
|
|
3424
3441
|
*/
|
|
3425
3442
|
function getCopyBytesHeldByBufferSource(O) {
|
|
3426
3443
|
var offset = 0;
|
|
3427
|
-
var length
|
|
3444
|
+
var length;
|
|
3428
3445
|
if (ArrayBuffer.isView(O)) {
|
|
3429
3446
|
// Has [[ViewedArrayBuffer]] internal slot
|
|
3430
3447
|
var arrayBuffer = O.buffer;
|
|
@@ -3457,7 +3474,7 @@
|
|
|
3457
3474
|
* @returns {KeyValueObject}
|
|
3458
3475
|
*/
|
|
3459
3476
|
function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
|
|
3460
|
-
seen
|
|
3477
|
+
seen || (seen = []);
|
|
3461
3478
|
if (seen.includes(input)) {
|
|
3462
3479
|
return {
|
|
3463
3480
|
type: 'array',
|
|
@@ -3589,7 +3606,7 @@
|
|
|
3589
3606
|
{
|
|
3590
3607
|
// Other `typeof` types which are not valid keys:
|
|
3591
3608
|
// 'undefined', 'boolean', 'object' (including `null`), 'symbol', 'function'
|
|
3592
|
-
var _type = input === null ? 'null' : _typeof$
|
|
3609
|
+
var _type = input === null ? 'null' : _typeof$1(input); // Convert `null` for convenience of consumers in reporting errors
|
|
3593
3610
|
return {
|
|
3594
3611
|
type: _type,
|
|
3595
3612
|
invalid: true,
|
|
@@ -3861,7 +3878,6 @@
|
|
|
3861
3878
|
continue;
|
|
3862
3879
|
}
|
|
3863
3880
|
if (key.length === 1) {
|
|
3864
|
-
// eslint-disable-next-line sonarjs/updated-loop-counter -- Convenient
|
|
3865
3881
|
key = key[0];
|
|
3866
3882
|
} else {
|
|
3867
3883
|
var nested = findMultiEntryMatches(key, range);
|
|
@@ -4044,8 +4060,13 @@
|
|
|
4044
4060
|
* @returns {void}
|
|
4045
4061
|
*/
|
|
4046
4062
|
function setCurrentNumber(tx, store, num, successCb, failCb) {
|
|
4047
|
-
num = num === MAX_ALLOWED_CURRENT_NUMBER
|
|
4048
|
-
|
|
4063
|
+
num = 1 + (num === MAX_ALLOWED_CURRENT_NUMBER
|
|
4064
|
+
// Since incrementing by one will have no effect in JavaScript on this
|
|
4065
|
+
// unsafe max, we represent the max as a number incremented by two.
|
|
4066
|
+
// The getting of the current number is never returned to the user and
|
|
4067
|
+
// is only used in safe comparisons, so it is safe for us to represent
|
|
4068
|
+
// it in this manner
|
|
4069
|
+
? num + 1 : num);
|
|
4049
4070
|
return assignCurrentNumber(tx, store, num, successCb, failCb);
|
|
4050
4071
|
}
|
|
4051
4072
|
|
|
@@ -4158,7 +4179,7 @@
|
|
|
4158
4179
|
|
|
4159
4180
|
/**
|
|
4160
4181
|
* The IndexedDB KeyRange object.
|
|
4161
|
-
* @see
|
|
4182
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-key-range
|
|
4162
4183
|
* @throws {TypeError}
|
|
4163
4184
|
* @class
|
|
4164
4185
|
*/
|
|
@@ -4179,6 +4200,7 @@
|
|
|
4179
4200
|
IDBKeyRange.__createInstance = function (lower, upper, lowerOpen, upperOpen) {
|
|
4180
4201
|
/**
|
|
4181
4202
|
* @class
|
|
4203
|
+
* @throws {DOMException|Error}
|
|
4182
4204
|
*/
|
|
4183
4205
|
function IDBKeyRange() {
|
|
4184
4206
|
this[Symbol.toStringTag] = 'IDBKeyRange';
|
|
@@ -4275,6 +4297,8 @@
|
|
|
4275
4297
|
return IDBKeyRange.__createInstance(lower, upper, arguments[2], arguments[3]);
|
|
4276
4298
|
};
|
|
4277
4299
|
IDBKeyRange.prototype[Symbol.toStringTag] = 'IDBKeyRangePrototype';
|
|
4300
|
+
|
|
4301
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
4278
4302
|
readonlyProperties$4.forEach(function (prop) {
|
|
4279
4303
|
Object.defineProperty(IDBKeyRange.prototype, '__' + prop, {
|
|
4280
4304
|
enumerable: false,
|
|
@@ -4295,7 +4319,7 @@
|
|
|
4295
4319
|
// desc.configurable = true; // Default
|
|
4296
4320
|
Object.defineProperty(IDBKeyRange.prototype, prop, desc);
|
|
4297
4321
|
});
|
|
4298
|
-
Object.
|
|
4322
|
+
Object.defineProperties(IDBKeyRange, _defineProperty(_defineProperty({}, Symbol.hasInstance, {
|
|
4299
4323
|
value:
|
|
4300
4324
|
/**
|
|
4301
4325
|
* @param {object} obj
|
|
@@ -4304,10 +4328,11 @@
|
|
|
4304
4328
|
function value(obj) {
|
|
4305
4329
|
return isObj(obj) && 'upper' in obj && 'lowerOpen' in obj && typeof obj.lowerOpen === 'boolean';
|
|
4306
4330
|
}
|
|
4307
|
-
})
|
|
4308
|
-
Object.defineProperty(IDBKeyRange, 'prototype', {
|
|
4331
|
+
}), "prototype", {
|
|
4309
4332
|
writable: false
|
|
4310
|
-
});
|
|
4333
|
+
}));
|
|
4334
|
+
|
|
4335
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
4311
4336
|
|
|
4312
4337
|
/**
|
|
4313
4338
|
* @param {IDBKeyRangeFull|undefined} range
|
|
@@ -4319,34 +4344,35 @@
|
|
|
4319
4344
|
* @returns {void}
|
|
4320
4345
|
*/
|
|
4321
4346
|
function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, checkCached) {
|
|
4322
|
-
if (range && (range.lower !== undefined || range.upper !== undefined)) {
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
}
|
|
4343
|
-
if (hasLower && hasUpper) {
|
|
4344
|
-
sql.push('AND');
|
|
4345
|
-
}
|
|
4346
|
-
if (hasUpper) {
|
|
4347
|
-
sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
|
|
4348
|
-
sqlValues.push(escapeSQLiteStatement(/** @type {string} */encodedUpperKey));
|
|
4347
|
+
if (!(range && (range.lower !== undefined || range.upper !== undefined))) {
|
|
4348
|
+
return;
|
|
4349
|
+
}
|
|
4350
|
+
if (addAnd) {
|
|
4351
|
+
sql.push('AND');
|
|
4352
|
+
}
|
|
4353
|
+
var encodedLowerKey, encodedUpperKey;
|
|
4354
|
+
var hasLower = range.lower !== undefined;
|
|
4355
|
+
var hasUpper = range.upper !== undefined;
|
|
4356
|
+
if (hasLower) {
|
|
4357
|
+
encodedLowerKey = checkCached ? range.__lowerCached : _encode(range.lower);
|
|
4358
|
+
}
|
|
4359
|
+
if (hasUpper) {
|
|
4360
|
+
encodedUpperKey = checkCached ? range.__upperCached : _encode(range.upper);
|
|
4361
|
+
}
|
|
4362
|
+
if (hasLower) {
|
|
4363
|
+
sqlValues.push(escapeSQLiteStatement(/** @type {string} */encodedLowerKey));
|
|
4364
|
+
if (hasUpper && encodedLowerKey === encodedUpperKey && !range.lowerOpen && !range.upperOpen) {
|
|
4365
|
+
sql.push(quotedKeyColumnName, '=', '?');
|
|
4366
|
+
return;
|
|
4349
4367
|
}
|
|
4368
|
+
sql.push(quotedKeyColumnName, range.lowerOpen ? '>' : '>=', '?');
|
|
4369
|
+
}
|
|
4370
|
+
if (hasLower && hasUpper) {
|
|
4371
|
+
sql.push('AND');
|
|
4372
|
+
}
|
|
4373
|
+
if (hasUpper) {
|
|
4374
|
+
sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
|
|
4375
|
+
sqlValues.push(escapeSQLiteStatement(/** @type {string} */encodedUpperKey));
|
|
4350
4376
|
}
|
|
4351
4377
|
}
|
|
4352
4378
|
|
|
@@ -4426,7 +4452,7 @@
|
|
|
4426
4452
|
};
|
|
4427
4453
|
|
|
4428
4454
|
// @ts-expect-error It's ok
|
|
4429
|
-
DOMStringList.prototype = _defineProperty
|
|
4455
|
+
DOMStringList.prototype = _defineProperty(_defineProperty({
|
|
4430
4456
|
constructor: DOMStringList,
|
|
4431
4457
|
// Interface.
|
|
4432
4458
|
/**
|
|
@@ -4447,7 +4473,9 @@
|
|
|
4447
4473
|
if (!arguments.length) {
|
|
4448
4474
|
throw new TypeError('DOMStringList.item must be supplied a value');
|
|
4449
4475
|
}
|
|
4450
|
-
if (key < 0 || key >= this.length ||
|
|
4476
|
+
if (key < 0 || key >= this.length ||
|
|
4477
|
+
// eslint-disable-next-line unicorn/prefer-number-is-safe-integer -- We want all
|
|
4478
|
+
!Number.isInteger(key)) {
|
|
4451
4479
|
return null;
|
|
4452
4480
|
}
|
|
4453
4481
|
return this._items[key];
|
|
@@ -4477,8 +4505,9 @@
|
|
|
4477
4505
|
* @returns {string[]}
|
|
4478
4506
|
*/
|
|
4479
4507
|
sortList: function sortList() {
|
|
4480
|
-
//
|
|
4508
|
+
// https://w3c.github.io/IndexedDB/#sorted-list
|
|
4481
4509
|
// https://tc39.github.io/ecma262/#sec-abstract-relational-comparison
|
|
4510
|
+
// eslint-disable-next-line unicorn/require-array-sort-compare -- IndexedDB requires code unit comparison (default behavior)
|
|
4482
4511
|
this._items.sort();
|
|
4483
4512
|
this.addIndexes();
|
|
4484
4513
|
return this._items;
|
|
@@ -4531,7 +4560,7 @@
|
|
|
4531
4560
|
(_this$_items = this._items).splice.apply(_this$_items, arguments);
|
|
4532
4561
|
this._length = this._items.length;
|
|
4533
4562
|
for (var i in this) {
|
|
4534
|
-
if (i === String(
|
|
4563
|
+
if (i === String(Math.trunc(Number(i)))) {
|
|
4535
4564
|
delete this[i];
|
|
4536
4565
|
}
|
|
4537
4566
|
}
|
|
@@ -4559,6 +4588,7 @@
|
|
|
4559
4588
|
}, _callee, this);
|
|
4560
4589
|
}));
|
|
4561
4590
|
|
|
4591
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
4562
4592
|
/**
|
|
4563
4593
|
* @typedef {any} AnyValue
|
|
4564
4594
|
*/
|
|
@@ -4573,6 +4603,7 @@
|
|
|
4573
4603
|
});
|
|
4574
4604
|
var DOMStringListAlias = DOMStringList;
|
|
4575
4605
|
Object.defineProperty(DOMStringList, '__createInstance', {
|
|
4606
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
4576
4607
|
/**
|
|
4577
4608
|
* @returns {DOMStringListFull}
|
|
4578
4609
|
*/
|
|
@@ -4706,8 +4737,9 @@
|
|
|
4706
4737
|
|
|
4707
4738
|
/**
|
|
4708
4739
|
* The IndexedDB Transaction.
|
|
4709
|
-
* @see
|
|
4740
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
|
|
4710
4741
|
* @class
|
|
4742
|
+
* @throws {TypeError}
|
|
4711
4743
|
*/
|
|
4712
4744
|
function IDBTransaction() {
|
|
4713
4745
|
throw new TypeError('Illegal constructor');
|
|
@@ -4730,6 +4762,7 @@
|
|
|
4730
4762
|
// @ts-expect-error It's ok
|
|
4731
4763
|
me[Symbol.toStringTag] = 'IDBTransaction';
|
|
4732
4764
|
defineReadonlyProperties(me, readonlyProperties$3);
|
|
4765
|
+
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Debugging only
|
|
4733
4766
|
me.__id = ++uniqueID; // for debugging simultaneous transactions
|
|
4734
4767
|
me.__active = true;
|
|
4735
4768
|
me.__running = false;
|
|
@@ -5140,7 +5173,7 @@
|
|
|
5140
5173
|
if (!store) {
|
|
5141
5174
|
throw createDOMException('NotFoundError', objectStoreName + ' does not exist in ' + me.db.name);
|
|
5142
5175
|
}
|
|
5143
|
-
if (!me.__storeHandles
|
|
5176
|
+
if (!Object.hasOwn(me.__storeHandles, objectStoreName) ||
|
|
5144
5177
|
// These latter conditions are to allow store
|
|
5145
5178
|
// recreation to create new clone object
|
|
5146
5179
|
me.__storeHandles[objectStoreName].__pendingDelete || me.__storeHandles[objectStoreName].__deleted) {
|
|
@@ -5248,7 +5281,7 @@
|
|
|
5248
5281
|
}
|
|
5249
5282
|
q.req.dispatchEvent(reqEvt); // No need to catch errors
|
|
5250
5283
|
resolve();
|
|
5251
|
-
});
|
|
5284
|
+
}, 0);
|
|
5252
5285
|
});
|
|
5253
5286
|
});
|
|
5254
5287
|
}, SyncPromise.resolve(undefined)).then(function () {
|
|
@@ -5262,9 +5295,9 @@
|
|
|
5262
5295
|
me.dispatchEvent(evt);
|
|
5263
5296
|
me.__storeHandles = {};
|
|
5264
5297
|
me.dispatchEvent(createEvent('__abort'));
|
|
5265
|
-
});
|
|
5298
|
+
}, 0);
|
|
5266
5299
|
return undefined;
|
|
5267
|
-
})
|
|
5300
|
+
}).catch(function (err) {
|
|
5268
5301
|
console.log('Abort error');
|
|
5269
5302
|
throw err;
|
|
5270
5303
|
});
|
|
@@ -5385,6 +5418,8 @@
|
|
|
5385
5418
|
IDBTransaction.prototype.__getParent = function () {
|
|
5386
5419
|
return this.db;
|
|
5387
5420
|
};
|
|
5421
|
+
|
|
5422
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
5388
5423
|
defineOuterInterface(IDBTransaction.prototype, listeners$1);
|
|
5389
5424
|
defineReadonlyOuterInterface(IDBTransaction.prototype, readonlyProperties$3);
|
|
5390
5425
|
Object.defineProperty(IDBTransaction.prototype, 'constructor', {
|
|
@@ -5397,183 +5432,77 @@
|
|
|
5397
5432
|
writable: false
|
|
5398
5433
|
});
|
|
5399
5434
|
|
|
5400
|
-
function
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
5404
|
-
t && (n = n.filter(function (t) {
|
|
5405
|
-
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
5406
|
-
})), r.push.apply(r, n);
|
|
5407
|
-
}
|
|
5408
|
-
return r;
|
|
5409
|
-
}
|
|
5410
|
-
function _objectSpread2(e) {
|
|
5411
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
5412
|
-
var r = null != arguments[t] ? arguments[t] : {};
|
|
5413
|
-
t % 2 ? ownKeys(Object(r), true).forEach(function (t) {
|
|
5414
|
-
_defineProperty(e, t, r[t]);
|
|
5415
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function (t) {
|
|
5416
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
5417
|
-
});
|
|
5418
|
-
}
|
|
5419
|
-
return e;
|
|
5420
|
-
}
|
|
5421
|
-
function _typeof(e) {
|
|
5422
|
-
return _typeof = "function" == typeof Symbol && "symbol" == _typeof$2(Symbol.iterator) ? function (e) {
|
|
5423
|
-
return _typeof$2(e);
|
|
5424
|
-
} : function (e) {
|
|
5425
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$2(e);
|
|
5426
|
-
}, _typeof(e);
|
|
5427
|
-
}
|
|
5428
|
-
function _classCallCheck(e, t) {
|
|
5429
|
-
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
5430
|
-
}
|
|
5431
|
-
function _createClass(e, t, r) {
|
|
5432
|
-
return t && function _defineProperties(e, t) {
|
|
5433
|
-
for (var r = 0; r < t.length; r++) {
|
|
5434
|
-
var n = t[r];
|
|
5435
|
-
n.enumerable = n.enumerable || false, n.configurable = true, "value" in n && (n.writable = true), Object.defineProperty(e, _toPropertyKey(n.key), n);
|
|
5436
|
-
}
|
|
5437
|
-
}(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
5438
|
-
writable: false
|
|
5439
|
-
}), e;
|
|
5440
|
-
}
|
|
5441
|
-
function _defineProperty(e, t, r) {
|
|
5442
|
-
return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
|
|
5443
|
-
value: r,
|
|
5444
|
-
enumerable: true,
|
|
5445
|
-
configurable: true,
|
|
5446
|
-
writable: true
|
|
5447
|
-
}) : e[t] = r, e;
|
|
5448
|
-
}
|
|
5449
|
-
function _slicedToArray(e, t) {
|
|
5450
|
-
return function _arrayWithHoles(e) {
|
|
5451
|
-
if (Array.isArray(e)) return e;
|
|
5452
|
-
}(e) || function _iterableToArrayLimit(e, t) {
|
|
5453
|
-
var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
5454
|
-
if (null != r) {
|
|
5455
|
-
var n,
|
|
5456
|
-
a,
|
|
5457
|
-
o,
|
|
5458
|
-
i,
|
|
5459
|
-
c = [],
|
|
5460
|
-
s = true,
|
|
5461
|
-
u = false;
|
|
5462
|
-
try {
|
|
5463
|
-
if (o = (r = r.call(e)).next, 0 === t) {
|
|
5464
|
-
if (Object(r) !== r) return;
|
|
5465
|
-
s = !1;
|
|
5466
|
-
} else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
|
|
5467
|
-
} catch (e) {
|
|
5468
|
-
u = true, a = e;
|
|
5469
|
-
} finally {
|
|
5470
|
-
try {
|
|
5471
|
-
if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
|
|
5472
|
-
} finally {
|
|
5473
|
-
if (u) throw a;
|
|
5474
|
-
}
|
|
5475
|
-
}
|
|
5476
|
-
return c;
|
|
5477
|
-
}
|
|
5478
|
-
}(e, t) || _unsupportedIterableToArray(e, t) || function _nonIterableRest() {
|
|
5479
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5480
|
-
}();
|
|
5481
|
-
}
|
|
5482
|
-
function _unsupportedIterableToArray(e, t) {
|
|
5483
|
-
if (e) {
|
|
5484
|
-
if ("string" == typeof e) return _arrayLikeToArray(e, t);
|
|
5485
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
5486
|
-
return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? _arrayLikeToArray(e, t) : void 0;
|
|
5487
|
-
}
|
|
5488
|
-
}
|
|
5489
|
-
function _arrayLikeToArray(e, t) {
|
|
5490
|
-
(null == t || t > e.length) && (t = e.length);
|
|
5491
|
-
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
5492
|
-
return n;
|
|
5493
|
-
}
|
|
5494
|
-
function _toPropertyKey(e) {
|
|
5495
|
-
var t = function _toPrimitive(e, t) {
|
|
5496
|
-
if ("object" != _typeof$2(e) || null === e) return e;
|
|
5497
|
-
var r = e[Symbol.toPrimitive];
|
|
5498
|
-
if (void 0 !== r) {
|
|
5499
|
-
var n = r.call(e, t);
|
|
5500
|
-
if ("object" != _typeof$2(n)) return n;
|
|
5501
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5502
|
-
}
|
|
5503
|
-
return (String )(e);
|
|
5504
|
-
}(e, "string");
|
|
5505
|
-
return "symbol" == _typeof$2(t) ? t : String(t);
|
|
5506
|
-
}
|
|
5507
|
-
var e = _createClass(function TypesonPromise(e) {
|
|
5508
|
-
_classCallCheck(this, TypesonPromise), this.p = new Promise(e);
|
|
5435
|
+
var TypesonPromise = /*#__PURE__*/_createClass(function TypesonPromise(e) {
|
|
5436
|
+
_classCallCheck(this, TypesonPromise);
|
|
5437
|
+
this.p = new Promise(e);
|
|
5509
5438
|
});
|
|
5510
|
-
|
|
5439
|
+
TypesonPromise.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && Object.defineProperty(TypesonPromise.prototype, Symbol.toStringTag, {
|
|
5511
5440
|
get: function get() {
|
|
5512
5441
|
return "TypesonPromise";
|
|
5513
5442
|
}
|
|
5514
|
-
}),
|
|
5515
|
-
var
|
|
5516
|
-
return new
|
|
5517
|
-
|
|
5518
|
-
e
|
|
5519
|
-
})
|
|
5520
|
-
return
|
|
5521
|
-
}).then(
|
|
5443
|
+
}), TypesonPromise.prototype.then = function (e, t) {
|
|
5444
|
+
var _this = this;
|
|
5445
|
+
return new TypesonPromise(function (r, n) {
|
|
5446
|
+
_this.p.then(function (t) {
|
|
5447
|
+
r(e ? e(t) : t);
|
|
5448
|
+
}).catch(function (e) {
|
|
5449
|
+
return t ? t(e) : Promise.reject(e);
|
|
5450
|
+
}).then(r, n);
|
|
5522
5451
|
});
|
|
5523
|
-
},
|
|
5452
|
+
}, TypesonPromise.prototype.catch = function (e) {
|
|
5524
5453
|
return this.then(function () {}, e);
|
|
5525
|
-
},
|
|
5526
|
-
return new
|
|
5527
|
-
e
|
|
5454
|
+
}, TypesonPromise.resolve = function (e) {
|
|
5455
|
+
return new TypesonPromise(function (t) {
|
|
5456
|
+
t(e);
|
|
5528
5457
|
});
|
|
5529
|
-
},
|
|
5530
|
-
return new
|
|
5531
|
-
r(
|
|
5458
|
+
}, TypesonPromise.reject = function (e) {
|
|
5459
|
+
return new TypesonPromise(function (t, r) {
|
|
5460
|
+
r(e);
|
|
5532
5461
|
});
|
|
5533
|
-
},
|
|
5534
|
-
return new
|
|
5535
|
-
Promise.all(
|
|
5536
|
-
return null
|
|
5537
|
-
})).then(
|
|
5462
|
+
}, TypesonPromise.all = function (e) {
|
|
5463
|
+
return new TypesonPromise(function (t, r) {
|
|
5464
|
+
Promise.all(e.map(function (e) {
|
|
5465
|
+
return e !== null && e !== void 0 && e.constructor && "__typeson__type__" in e.constructor && "TypesonPromise" === e.constructor.__typeson__type__ ? e.p : e;
|
|
5466
|
+
})).then(t, r);
|
|
5538
5467
|
});
|
|
5539
|
-
},
|
|
5540
|
-
return new
|
|
5541
|
-
Promise.race(
|
|
5542
|
-
return null
|
|
5543
|
-
})).then(
|
|
5468
|
+
}, TypesonPromise.race = function (e) {
|
|
5469
|
+
return new TypesonPromise(function (t, r) {
|
|
5470
|
+
Promise.race(e.map(function (e) {
|
|
5471
|
+
return e !== null && e !== void 0 && e.constructor && "__typeson__type__" in e.constructor && "TypesonPromise" === e.constructor.__typeson__type__ ? e.p : e;
|
|
5472
|
+
})).then(t, r);
|
|
5544
5473
|
});
|
|
5545
|
-
},
|
|
5546
|
-
return new
|
|
5547
|
-
Promise.allSettled(
|
|
5548
|
-
return null
|
|
5549
|
-
})).then(
|
|
5474
|
+
}, TypesonPromise.allSettled = function (e) {
|
|
5475
|
+
return new TypesonPromise(function (t, r) {
|
|
5476
|
+
Promise.allSettled(e.map(function (e) {
|
|
5477
|
+
return e !== null && e !== void 0 && e.constructor && "__typeson__type__" in e.constructor && "TypesonPromise" === e.constructor.__typeson__type__ ? e.p : e;
|
|
5478
|
+
})).then(t, r);
|
|
5550
5479
|
});
|
|
5551
5480
|
};
|
|
5552
|
-
var
|
|
5553
|
-
|
|
5481
|
+
var e = Object.hasOwn,
|
|
5482
|
+
t = Object.getPrototypeOf;
|
|
5554
5483
|
function isThenable(e, t) {
|
|
5555
|
-
return isObject(e) && "function" == typeof e.then && (true || "function" == typeof e
|
|
5484
|
+
return isObject(e) && "function" == typeof e.then && (true || "function" == typeof e.catch);
|
|
5556
5485
|
}
|
|
5557
5486
|
function toStringTag(e) {
|
|
5558
5487
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
5559
5488
|
}
|
|
5560
|
-
function hasConstructorOf(
|
|
5561
|
-
if (!
|
|
5562
|
-
var
|
|
5563
|
-
if (!
|
|
5564
|
-
var
|
|
5565
|
-
return "function" != typeof
|
|
5489
|
+
function hasConstructorOf(r, n) {
|
|
5490
|
+
if (!r || "object" != _typeof$1(r)) return false;
|
|
5491
|
+
var o = t(r);
|
|
5492
|
+
if (!o) return null === n;
|
|
5493
|
+
var s = e(o, "constructor") && o.constructor;
|
|
5494
|
+
return "function" != typeof s ? null === n : n === s || null !== n && Function.prototype.toString.call(s) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof s.__typeson__type__ && s.__typeson__type__ === n.__typeson__type__;
|
|
5566
5495
|
}
|
|
5567
5496
|
function isPlainObject(e) {
|
|
5568
|
-
return !(!e || "Object" !== toStringTag(e)) && (!
|
|
5497
|
+
return !(!e || "Object" !== toStringTag(e)) && (!t(e) || hasConstructorOf(e, Object));
|
|
5569
5498
|
}
|
|
5570
5499
|
function isUserObject(e) {
|
|
5571
5500
|
if (!e || "Object" !== toStringTag(e)) return false;
|
|
5572
|
-
var
|
|
5573
|
-
return !
|
|
5501
|
+
var r = t(e);
|
|
5502
|
+
return !r || hasConstructorOf(e, Object) || isUserObject(r);
|
|
5574
5503
|
}
|
|
5575
5504
|
function isObject(e) {
|
|
5576
|
-
return null !== e && "object"
|
|
5505
|
+
return null !== e && "object" == _typeof$1(e);
|
|
5577
5506
|
}
|
|
5578
5507
|
function escapeKeyPathComponent(e) {
|
|
5579
5508
|
return e.replaceAll("''", "''''").replace(/^$/, "''").replaceAll("~", "~0").replaceAll(".", "~1");
|
|
@@ -5583,563 +5512,595 @@
|
|
|
5583
5512
|
}
|
|
5584
5513
|
function getByKeyPath(e, t) {
|
|
5585
5514
|
if ("" === t) return e;
|
|
5586
|
-
if (null === e || "object"
|
|
5515
|
+
if (null === e || "object" != _typeof$1(e)) throw new TypeError("Unexpected non-object type");
|
|
5587
5516
|
var r = t.indexOf(".");
|
|
5588
|
-
if (
|
|
5589
|
-
var
|
|
5590
|
-
return void 0 ===
|
|
5517
|
+
if (-1 !== r) {
|
|
5518
|
+
var _n = e[unescapeKeyPathComponent(t.slice(0, r))];
|
|
5519
|
+
return void 0 === _n ? void 0 : getByKeyPath(_n, t.slice(r + 1));
|
|
5591
5520
|
}
|
|
5592
5521
|
return e[unescapeKeyPathComponent(t)];
|
|
5593
5522
|
}
|
|
5594
5523
|
function setAtKeyPath(e, t, r) {
|
|
5595
5524
|
if ("" === t) return r;
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5525
|
+
var n = e,
|
|
5526
|
+
o = t;
|
|
5527
|
+
for (;;) {
|
|
5528
|
+
if (!n || "object" != _typeof$1(n)) throw new TypeError("Unexpected non-object type");
|
|
5529
|
+
if ("__proto__" === o) throw new TypeError("Invalid property");
|
|
5530
|
+
var _t = o.indexOf(".");
|
|
5531
|
+
if (-1 === _t) return n[unescapeKeyPathComponent(o)] = r, e;
|
|
5532
|
+
n = n[unescapeKeyPathComponent(o.slice(0, _t))], o = o.slice(_t + 1);
|
|
5533
|
+
}
|
|
5599
5534
|
}
|
|
5600
5535
|
function getJSONType(e) {
|
|
5601
|
-
return null === e ? "null" : Array.isArray(e) ? "array" : _typeof(e);
|
|
5602
|
-
}
|
|
5603
|
-
function _await(e, t, r) {
|
|
5604
|
-
return e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e;
|
|
5536
|
+
return null === e ? "null" : Array.isArray(e) ? "array" : _typeof$1(e);
|
|
5605
5537
|
}
|
|
5606
|
-
|
|
5607
|
-
|
|
5538
|
+
/**
|
|
5539
|
+
* @file Typeson - JSON with types.
|
|
5540
|
+
* @license The MIT License (MIT)
|
|
5541
|
+
* @copyright (c) 2016-2018 David Fahlander, Brett Zamir
|
|
5542
|
+
*/
|
|
5543
|
+
var r = Object.keys,
|
|
5544
|
+
n = Object.hasOwn,
|
|
5608
5545
|
o = Array.isArray,
|
|
5609
|
-
|
|
5610
|
-
function _async(e) {
|
|
5611
|
-
return function () {
|
|
5612
|
-
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
|
|
5613
|
-
try {
|
|
5614
|
-
return Promise.resolve(e.apply(this, t));
|
|
5615
|
-
} catch (e) {
|
|
5616
|
-
return Promise.reject(e);
|
|
5617
|
-
}
|
|
5618
|
-
};
|
|
5619
|
-
}
|
|
5546
|
+
s = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
|
|
5620
5547
|
function nestedPathsFirst(e, t) {
|
|
5621
|
-
var
|
|
5548
|
+
var _e$keypath$match, _t$keypath$match;
|
|
5622
5549
|
if ("" === e.keypath) return -1;
|
|
5623
|
-
var
|
|
5624
|
-
|
|
5625
|
-
return
|
|
5626
|
-
}
|
|
5627
|
-
var
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
}
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
}
|
|
5642
|
-
}
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
}
|
|
5651
|
-
}
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
}
|
|
5660
|
-
}
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
}
|
|
5667
|
-
}
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5550
|
+
var r = (_e$keypath$match = e.keypath.match(/\./g)) !== null && _e$keypath$match !== void 0 ? _e$keypath$match : 0,
|
|
5551
|
+
n = (_t$keypath$match = t.keypath.match(/\./g)) !== null && _t$keypath$match !== void 0 ? _t$keypath$match : 0;
|
|
5552
|
+
return r && (r = r.length), n && (n = n.length), r > n ? -1 : r < n ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
|
|
5553
|
+
}
|
|
5554
|
+
var Typeson = /*#__PURE__*/function () {
|
|
5555
|
+
function Typeson(e) {
|
|
5556
|
+
_classCallCheck(this, Typeson);
|
|
5557
|
+
this.options = e, this.plainObjectReplacers = [], this.nonplainObjectReplacers = [], this.revivers = {}, this.types = {};
|
|
5558
|
+
}
|
|
5559
|
+
return _createClass(Typeson, [{
|
|
5560
|
+
key: "stringify",
|
|
5561
|
+
value: function stringify(e, t, r, n) {
|
|
5562
|
+
n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
|
|
5563
|
+
stringification: true
|
|
5564
|
+
});
|
|
5565
|
+
var s = this.encapsulate(e, null, n);
|
|
5566
|
+
return o(s) ? JSON.stringify(s[0], t, r) : s.then(function (e) {
|
|
5567
|
+
return JSON.stringify(e, t, r);
|
|
5568
|
+
});
|
|
5569
|
+
}
|
|
5570
|
+
}, {
|
|
5571
|
+
key: "stringifySync",
|
|
5572
|
+
value: function stringifySync(e, t, r, n) {
|
|
5573
|
+
return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
|
|
5574
|
+
throwOnBadSyncType: true
|
|
5575
|
+
}, n), {}, {
|
|
5576
|
+
sync: true
|
|
5577
|
+
}));
|
|
5578
|
+
}
|
|
5579
|
+
}, {
|
|
5580
|
+
key: "stringifyAsync",
|
|
5581
|
+
value: function stringifyAsync(e, t, r, n) {
|
|
5582
|
+
return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
|
|
5583
|
+
throwOnBadSyncType: true
|
|
5584
|
+
}, n), {}, {
|
|
5585
|
+
sync: false
|
|
5586
|
+
}));
|
|
5587
|
+
}
|
|
5588
|
+
}, {
|
|
5589
|
+
key: "parse",
|
|
5590
|
+
value: function parse(e, t, r) {
|
|
5591
|
+
return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
|
|
5592
|
+
parse: true
|
|
5593
|
+
}), this.revive(JSON.parse(e, t), r);
|
|
5594
|
+
}
|
|
5595
|
+
}, {
|
|
5596
|
+
key: "parseSync",
|
|
5597
|
+
value: function parseSync(e, t, r) {
|
|
5598
|
+
return this.parse(e, t, _objectSpread2(_objectSpread2({
|
|
5599
|
+
throwOnBadSyncType: true
|
|
5600
|
+
}, r), {}, {
|
|
5601
|
+
sync: true
|
|
5602
|
+
}));
|
|
5603
|
+
}
|
|
5604
|
+
}, {
|
|
5605
|
+
key: "parseAsync",
|
|
5606
|
+
value: function parseAsync(e, t, r) {
|
|
5607
|
+
return this.parse(e, t, _objectSpread2(_objectSpread2({
|
|
5608
|
+
throwOnBadSyncType: true
|
|
5609
|
+
}, r), {}, {
|
|
5610
|
+
sync: false
|
|
5611
|
+
}));
|
|
5612
|
+
}
|
|
5613
|
+
}, {
|
|
5614
|
+
key: "specialTypeNames",
|
|
5615
|
+
value: function specialTypeNames(e, t) {
|
|
5616
|
+
var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
5617
|
+
return r.returnTypeNames = true, this.encapsulate(e, t, r);
|
|
5618
|
+
}
|
|
5619
|
+
}, {
|
|
5620
|
+
key: "rootTypeName",
|
|
5621
|
+
value: function rootTypeName(e, t) {
|
|
5622
|
+
var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
5623
|
+
return r.iterateNone = true, this.encapsulate(e, t, r);
|
|
5624
|
+
}
|
|
5625
|
+
}, {
|
|
5626
|
+
key: "encapsulate",
|
|
5627
|
+
value: function encapsulate(e, t, a) {
|
|
5628
|
+
var _this2 = this;
|
|
5629
|
+
var i = _objectSpread2(_objectSpread2({
|
|
5673
5630
|
sync: true
|
|
5674
|
-
}))
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
5689
|
-
return r.returnTypeNames = true, this.encapsulate(e, t, r);
|
|
5690
|
-
}
|
|
5691
|
-
}, {
|
|
5692
|
-
key: "rootTypeName",
|
|
5693
|
-
value: function rootTypeName(e, t) {
|
|
5694
|
-
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
5695
|
-
return r.iterateNone = true, this.encapsulate(e, t, r);
|
|
5696
|
-
}
|
|
5697
|
-
}, {
|
|
5698
|
-
key: "encapsulate",
|
|
5699
|
-
value: function encapsulate(t, r, c) {
|
|
5700
|
-
var s = this,
|
|
5701
|
-
u = _objectSpread2(_objectSpread2({
|
|
5702
|
-
sync: true
|
|
5703
|
-
}, this.options), c),
|
|
5704
|
-
l = u.sync,
|
|
5705
|
-
f = {},
|
|
5706
|
-
y = [],
|
|
5707
|
-
p = [],
|
|
5708
|
-
d = [],
|
|
5709
|
-
v = !("cyclic" in u) || u.cyclic,
|
|
5710
|
-
b = u.encapsulateObserver,
|
|
5711
|
-
m = function finish(e) {
|
|
5712
|
-
var t = Object.values(f);
|
|
5713
|
-
if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5714
|
-
if (t.length) {
|
|
5715
|
-
if (u.returnTypeNames) return function _toConsumableArray(e) {
|
|
5716
|
-
return function _arrayWithoutHoles(e) {
|
|
5717
|
-
if (Array.isArray(e)) return _arrayLikeToArray(e);
|
|
5718
|
-
}(e) || function _iterableToArray(e) {
|
|
5719
|
-
if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
|
|
5720
|
-
}(e) || _unsupportedIterableToArray(e) || function _nonIterableSpread() {
|
|
5721
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5722
|
-
}();
|
|
5723
|
-
}(new Set(t));
|
|
5724
|
-
e && isPlainObject(e) && !a(e, "$types") ? e.$types = f : e = {
|
|
5725
|
-
$: e,
|
|
5726
|
-
$types: {
|
|
5727
|
-
$: f
|
|
5728
|
-
}
|
|
5729
|
-
};
|
|
5730
|
-
} else isObject(e) && a(e, "$types") && (e = {
|
|
5631
|
+
}, this.options), a),
|
|
5632
|
+
c = i.sync,
|
|
5633
|
+
y = {},
|
|
5634
|
+
l = [],
|
|
5635
|
+
u = [],
|
|
5636
|
+
p = [],
|
|
5637
|
+
f = !("cyclic" in i) || i.cyclic,
|
|
5638
|
+
d = i.encapsulateObserver,
|
|
5639
|
+
finish = function finish(e) {
|
|
5640
|
+
var t = Object.values(y);
|
|
5641
|
+
if (i.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5642
|
+
if (t.length) {
|
|
5643
|
+
if (i.returnTypeNames) return _toConsumableArray(new Set(t));
|
|
5644
|
+
e && isPlainObject(e) && !n(e, "$types") ? e.$types = y : e = {
|
|
5731
5645
|
$: e,
|
|
5732
|
-
$types:
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
return
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5646
|
+
$types: {
|
|
5647
|
+
$: y
|
|
5648
|
+
}
|
|
5649
|
+
};
|
|
5650
|
+
} else isObject(e) && n(e, "$types") && (e = {
|
|
5651
|
+
$: e,
|
|
5652
|
+
$types: true
|
|
5653
|
+
});
|
|
5654
|
+
return !i.returnTypeNames && e;
|
|
5655
|
+
},
|
|
5656
|
+
_checkPromises = /*#__PURE__*/function () {
|
|
5657
|
+
var _checkPromises2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e, t) {
|
|
5658
|
+
var r;
|
|
5659
|
+
return _regenerator().w(function (_context2) {
|
|
5660
|
+
while (1) switch (_context2.n) {
|
|
5661
|
+
case 0:
|
|
5662
|
+
_context2.n = 1;
|
|
5663
|
+
return Promise.all(t.map(function (e) {
|
|
5664
|
+
return e[1].p;
|
|
5665
|
+
}));
|
|
5666
|
+
case 1:
|
|
5667
|
+
r = _context2.v;
|
|
5668
|
+
_context2.n = 2;
|
|
5669
|
+
return Promise.all(r.map(/*#__PURE__*/function () {
|
|
5670
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(r) {
|
|
5671
|
+
var n, _t$splice, _t$splice2, o, _o, s, a, i, c, y, l, u, p, _t2;
|
|
5672
|
+
return _regenerator().w(function (_context) {
|
|
5673
|
+
while (1) switch (_context.n) {
|
|
5674
|
+
case 0:
|
|
5675
|
+
n = [], _t$splice = t.splice(0, 1), _t$splice2 = _slicedToArray(_t$splice, 1), o = _t$splice2[0], _o = _slicedToArray(o, 7), s = _o[0], a = _o[2], i = _o[3], c = _o[4], y = _o[5], l = _o[6], u = _encapsulate2(s, r, a, i, n, true, l), p = hasConstructorOf(u, TypesonPromise);
|
|
5676
|
+
if (!(s && p)) {
|
|
5677
|
+
_context.n = 2;
|
|
5678
|
+
break;
|
|
5679
|
+
}
|
|
5680
|
+
_context.n = 1;
|
|
5681
|
+
return u.p;
|
|
5682
|
+
case 1:
|
|
5683
|
+
_t2 = _context.v;
|
|
5684
|
+
return _context.a(2, (c[y] = _t2, _checkPromises(e, n)));
|
|
5685
|
+
case 2:
|
|
5686
|
+
return _context.a(2, (s ? c[y] = u : e = p ? u.p : u, _checkPromises(e, n)));
|
|
5687
|
+
}
|
|
5688
|
+
}, _callee);
|
|
5689
|
+
}));
|
|
5690
|
+
return function (_x3) {
|
|
5691
|
+
return _ref.apply(this, arguments);
|
|
5692
|
+
};
|
|
5693
|
+
}()));
|
|
5694
|
+
case 2:
|
|
5695
|
+
return _context2.a(2, e);
|
|
5696
|
+
}
|
|
5697
|
+
}, _callee2);
|
|
5698
|
+
}));
|
|
5699
|
+
function checkPromises(_x, _x2) {
|
|
5700
|
+
return _checkPromises2.apply(this, arguments);
|
|
5701
|
+
}
|
|
5702
|
+
return checkPromises;
|
|
5703
|
+
}(),
|
|
5704
|
+
_adaptBuiltinStateObjectProperties = function _adaptBuiltinStateObjectProperties(e, t, r) {
|
|
5705
|
+
Object.assign(e, t);
|
|
5706
|
+
var n = s.map(function (t) {
|
|
5707
|
+
var r = e[t];
|
|
5708
|
+
return delete e[t], r;
|
|
5709
|
+
});
|
|
5710
|
+
r(), s.forEach(function (t, r) {
|
|
5711
|
+
e[t] = n[r];
|
|
5712
|
+
});
|
|
5713
|
+
},
|
|
5714
|
+
_encapsulate2 = function _encapsulate(e, t, s, a, c, p, f) {
|
|
5715
|
+
var m,
|
|
5716
|
+
h = {};
|
|
5717
|
+
var g = d ? function (r) {
|
|
5718
|
+
var _ref2;
|
|
5719
|
+
var n = (_ref2 = f !== null && f !== void 0 ? f : a.type) !== null && _ref2 !== void 0 ? _ref2 : getJSONType(t);
|
|
5720
|
+
d(Object.assign(r !== null && r !== void 0 ? r : h, {
|
|
5721
|
+
keypath: e,
|
|
5722
|
+
value: t,
|
|
5723
|
+
cyclic: s,
|
|
5724
|
+
stateObj: a,
|
|
5725
|
+
promisesData: c,
|
|
5726
|
+
resolvingTypesonPromise: p,
|
|
5727
|
+
awaitingTypesonPromise: hasConstructorOf(t, TypesonPromise)
|
|
5728
|
+
}, {
|
|
5729
|
+
type: n
|
|
5730
|
+
}));
|
|
5731
|
+
} : null;
|
|
5732
|
+
if (["string", "boolean", "number", "undefined"].includes(_typeof$1(t))) return void 0 === t || t === 1 / 0 || 0 === t || t === -1 / 0 || Number.isNaN(t) ? (m = a.replaced ? t : replace(e, t, a, c, false, p, g), m !== t && (h = {
|
|
5733
|
+
replaced: m
|
|
5734
|
+
})) : m = t, g && g(), m;
|
|
5735
|
+
if (null === t) return g && g(), t;
|
|
5736
|
+
if (s && t && "object" == _typeof$1(t) && !a.iterateIn && !a.iterateUnsetNumeric) {
|
|
5737
|
+
var _r = l.indexOf(t);
|
|
5738
|
+
if (-1 !== _r) return y[e] = "#", g && g({
|
|
5739
|
+
cyclicKeypath: u[_r]
|
|
5740
|
+
}), "#" + u[_r];
|
|
5741
|
+
true === s && (l.push(t), u.push(e));
|
|
5742
|
+
}
|
|
5743
|
+
var b = isPlainObject(t),
|
|
5744
|
+
v = o(t),
|
|
5745
|
+
O = (b || v) && (!_this2.plainObjectReplacers.length || a.replaced) || a.iterateIn ? t : replace(e, t, a, c, b || v, null, g);
|
|
5746
|
+
var w;
|
|
5747
|
+
if (O !== t ? (m = O, h = {
|
|
5748
|
+
replaced: O
|
|
5749
|
+
}) : "" === e && hasConstructorOf(t, TypesonPromise) ? (c.push([e, t, s, a, void 0, void 0, a.type]), m = t) : v && "object" !== a.iterateIn || "array" === a.iterateIn ? (w = new Array(t.length), h = {
|
|
5750
|
+
clone: w
|
|
5751
|
+
}) : !b && (["function", "symbol"].includes(_typeof$1(t)) || "toJSON" in t || hasConstructorOf(t, TypesonPromise) || hasConstructorOf(t, Promise) || hasConstructorOf(t, ArrayBuffer)) && "object" !== a.iterateIn ? m = t : (w = {}, a.addLength && (w.length = t.length), h = {
|
|
5752
|
+
clone: w
|
|
5753
|
+
}), g && g(), i.iterateNone) return w !== null && w !== void 0 ? w : m;
|
|
5754
|
+
if (!w) return m;
|
|
5755
|
+
if (a.iterateIn) {
|
|
5756
|
+
var _loop = function _loop(_r2) {
|
|
5757
|
+
var o = {
|
|
5758
|
+
ownKeys: n(t, _r2)
|
|
5759
|
+
};
|
|
5760
|
+
_adaptBuiltinStateObjectProperties(a, o, function () {
|
|
5761
|
+
var n = e + (e ? "." : "") + escapeKeyPathComponent(_r2),
|
|
5762
|
+
o = _encapsulate2(n, t[_r2], Boolean(s), a, c, p);
|
|
5763
|
+
hasConstructorOf(o, TypesonPromise) ? c.push([n, o, Boolean(s), a, w, _r2, a.type]) : void 0 !== o && (w[_r2] = o);
|
|
5767
5764
|
});
|
|
5765
|
+
};
|
|
5766
|
+
for (var _r2 in t) {
|
|
5767
|
+
_loop(_r2);
|
|
5768
|
+
}
|
|
5769
|
+
g && g({
|
|
5770
|
+
endIterateIn: true,
|
|
5771
|
+
end: true
|
|
5768
5772
|
});
|
|
5769
|
-
})
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
r(), i.forEach(function (t, r) {
|
|
5777
|
-
e[t] = n[r];
|
|
5773
|
+
} else r(t).forEach(function (r) {
|
|
5774
|
+
var n = e + (e ? "." : "") + escapeKeyPathComponent(r);
|
|
5775
|
+
_adaptBuiltinStateObjectProperties(a, {
|
|
5776
|
+
ownKeys: true
|
|
5777
|
+
}, function () {
|
|
5778
|
+
var e = _encapsulate2(n, t[r], Boolean(s), a, c, p);
|
|
5779
|
+
hasConstructorOf(e, TypesonPromise) ? c.push([n, e, Boolean(s), a, w, r, a.type]) : void 0 !== e && (w[r] = e);
|
|
5778
5780
|
});
|
|
5779
|
-
},
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
cyclic: i,
|
|
5791
|
-
stateObj: c,
|
|
5792
|
-
promisesData: l,
|
|
5793
|
-
resolvingTypesonPromise: d,
|
|
5794
|
-
awaitingTypesonPromise: hasConstructorOf(r, e)
|
|
5795
|
-
}, {
|
|
5796
|
-
type: o
|
|
5797
|
-
}));
|
|
5798
|
-
} : null;
|
|
5799
|
-
if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (m = c.replaced ? r : w(t, r, c, l, false, d, _)) !== r && (h = {
|
|
5800
|
-
replaced: m
|
|
5801
|
-
}) : m = r, _ && _(), m;
|
|
5802
|
-
if (null === r) return _ && _(), r;
|
|
5803
|
-
if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
|
|
5804
|
-
var A = y.indexOf(r);
|
|
5805
|
-
if (!(A < 0)) return f[t] = "#", _ && _({
|
|
5806
|
-
cyclicKeypath: p[A]
|
|
5807
|
-
}), "#" + p[A];
|
|
5808
|
-
true === i && (y.push(r), p.push(t));
|
|
5809
|
-
}
|
|
5810
|
-
var S,
|
|
5811
|
-
j,
|
|
5812
|
-
T = isPlainObject(r),
|
|
5813
|
-
I = o(r),
|
|
5814
|
-
N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
|
|
5815
|
-
if (N !== r ? (m = N, h = {
|
|
5816
|
-
replaced: N
|
|
5817
|
-
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), m = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
|
|
5818
|
-
clone: S
|
|
5819
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? m = r : (S = {}, c.addLength && (S.length = r.length), h = {
|
|
5820
|
-
clone: S
|
|
5821
|
-
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
|
|
5822
|
-
if (!S) return m;
|
|
5823
|
-
if (c.iterateIn) {
|
|
5824
|
-
var P = function _loop(n) {
|
|
5825
|
-
var o = {
|
|
5826
|
-
ownKeys: a(r, n)
|
|
5827
|
-
};
|
|
5828
|
-
g(c, o, function () {
|
|
5829
|
-
var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
|
|
5830
|
-
o = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
5831
|
-
hasConstructorOf(o, e) ? l.push([a, o, Boolean(i), c, S, n, c.type]) : void 0 !== o && (S[n] = o);
|
|
5832
|
-
});
|
|
5833
|
-
};
|
|
5834
|
-
for (var x in r) P(x);
|
|
5835
|
-
_ && _({
|
|
5836
|
-
endIterateIn: true,
|
|
5837
|
-
end: true
|
|
5838
|
-
});
|
|
5839
|
-
} else n(r).forEach(function (n) {
|
|
5840
|
-
var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
|
|
5841
|
-
g(c, {
|
|
5842
|
-
ownKeys: true
|
|
5781
|
+
}), g && g({
|
|
5782
|
+
endIterateOwn: true,
|
|
5783
|
+
end: true
|
|
5784
|
+
});
|
|
5785
|
+
if (a.iterateUnsetNumeric) {
|
|
5786
|
+
var _r3 = t.length;
|
|
5787
|
+
var _loop2 = function _loop2(_n2) {
|
|
5788
|
+
if (_n2 in t) return 1; // continue
|
|
5789
|
+
var r = "".concat(e).concat(e ? "." : "").concat(String(_n2));
|
|
5790
|
+
_adaptBuiltinStateObjectProperties(a, {
|
|
5791
|
+
ownKeys: false
|
|
5843
5792
|
}, function () {
|
|
5844
|
-
var
|
|
5845
|
-
hasConstructorOf(
|
|
5793
|
+
var e = _encapsulate2(r, void 0, Boolean(s), a, c, p);
|
|
5794
|
+
hasConstructorOf(e, TypesonPromise) ? c.push([r, e, Boolean(s), a, w, _n2, a.type]) : void 0 !== e && (w[_n2] = e);
|
|
5846
5795
|
});
|
|
5847
|
-
}
|
|
5848
|
-
|
|
5796
|
+
};
|
|
5797
|
+
for (var _n2 = 0; _n2 < _r3; _n2++) {
|
|
5798
|
+
if (_loop2(_n2)) continue;
|
|
5799
|
+
}
|
|
5800
|
+
g && g({
|
|
5801
|
+
endIterateUnsetNumeric: true,
|
|
5849
5802
|
end: true
|
|
5850
5803
|
});
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
endIterateUnsetNumeric: true,
|
|
5865
|
-
end: true
|
|
5866
|
-
});
|
|
5867
|
-
}
|
|
5868
|
-
return S;
|
|
5869
|
-
},
|
|
5870
|
-
w = function replace(e, t, r, n, a, o, i) {
|
|
5871
|
-
for (var c = a ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
|
|
5872
|
-
var y = c[u];
|
|
5873
|
-
if (y.test(t, r)) {
|
|
5874
|
-
var p = y.type;
|
|
5875
|
-
if (s.revivers[p]) {
|
|
5876
|
-
var d = f[e];
|
|
5877
|
-
f[e] = d ? [p].concat(d) : p;
|
|
5878
|
-
}
|
|
5879
|
-
if (Object.assign(r, {
|
|
5880
|
-
type: p,
|
|
5881
|
-
replaced: true
|
|
5882
|
-
}), (l || !y.replaceAsync) && !y.replace) return i && i({
|
|
5883
|
-
typeDetected: true
|
|
5884
|
-
}), O(e, t, v && "readonly", r, n, o, p);
|
|
5885
|
-
i && i({
|
|
5886
|
-
replacing: true
|
|
5887
|
-
});
|
|
5888
|
-
var b = void 0;
|
|
5889
|
-
if (l || !y.replaceAsync) {
|
|
5890
|
-
if (void 0 === y.replace) throw new TypeError("Missing replacer");
|
|
5891
|
-
b = y.replace(t, r);
|
|
5892
|
-
} else b = y.replaceAsync(t, r);
|
|
5893
|
-
return O(e, b, v && "readonly", r, n, o, p);
|
|
5804
|
+
}
|
|
5805
|
+
return w;
|
|
5806
|
+
},
|
|
5807
|
+
replace = function replace(e, t, r, n, o, s, a) {
|
|
5808
|
+
var i = o ? _this2.plainObjectReplacers : _this2.nonplainObjectReplacers;
|
|
5809
|
+
var l = i.length;
|
|
5810
|
+
for (; l--;) {
|
|
5811
|
+
var _o2 = i[l];
|
|
5812
|
+
if (_o2.test(t, r)) {
|
|
5813
|
+
var _i = _o2.type;
|
|
5814
|
+
if (Object.hasOwn(_this2.revivers, _i)) {
|
|
5815
|
+
var _t3 = y[e];
|
|
5816
|
+
y[e] = _t3 ? [_i].concat(_t3) : _i;
|
|
5894
5817
|
}
|
|
5818
|
+
if (Object.assign(r, {
|
|
5819
|
+
type: _i,
|
|
5820
|
+
replaced: true
|
|
5821
|
+
}), (c || !_o2.replaceAsync) && !_o2.replace) return a && a({
|
|
5822
|
+
typeDetected: true
|
|
5823
|
+
}), _encapsulate2(e, t, f && "readonly", r, n, s, _i);
|
|
5824
|
+
var _l = void 0;
|
|
5825
|
+
if (a && a({
|
|
5826
|
+
replacing: true
|
|
5827
|
+
}), c || !_o2.replaceAsync) {
|
|
5828
|
+
if (void 0 === _o2.replace) throw new TypeError("Missing replacer");
|
|
5829
|
+
_l = _o2.replace(t, r);
|
|
5830
|
+
} else _l = _o2.replaceAsync(t, r);
|
|
5831
|
+
return _encapsulate2(e, _l, f && "readonly", r, n, s, _i);
|
|
5895
5832
|
}
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
}
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5833
|
+
}
|
|
5834
|
+
return t;
|
|
5835
|
+
},
|
|
5836
|
+
m = _encapsulate2("", e, f, t !== null && t !== void 0 ? t : {}, p);
|
|
5837
|
+
if (p.length) return c && i.throwOnBadSyncType ? function () {
|
|
5838
|
+
throw new TypeError("Sync method requested but async result obtained");
|
|
5839
|
+
}() : Promise.resolve(_checkPromises(m, p)).then(finish);
|
|
5840
|
+
if (!c && i.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
5841
|
+
return c && i.stringification ? [finish(m)] : c ? finish(m) : Promise.resolve(finish(m));
|
|
5842
|
+
}
|
|
5843
|
+
}, {
|
|
5844
|
+
key: "encapsulateSync",
|
|
5845
|
+
value: function encapsulateSync(e, t, r) {
|
|
5846
|
+
return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
|
|
5847
|
+
throwOnBadSyncType: true
|
|
5848
|
+
}, r), {}, {
|
|
5849
|
+
sync: true
|
|
5850
|
+
}));
|
|
5851
|
+
}
|
|
5852
|
+
}, {
|
|
5853
|
+
key: "encapsulateAsync",
|
|
5854
|
+
value: function encapsulateAsync(e, t, r) {
|
|
5855
|
+
return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
|
|
5856
|
+
throwOnBadSyncType: true
|
|
5857
|
+
}, r), {}, {
|
|
5858
|
+
sync: false
|
|
5859
|
+
}));
|
|
5860
|
+
}
|
|
5861
|
+
}, {
|
|
5862
|
+
key: "revive",
|
|
5863
|
+
value: function revive(e, t) {
|
|
5864
|
+
var _this3 = this;
|
|
5865
|
+
var s = _objectSpread2(_objectSpread2({
|
|
5911
5866
|
sync: true
|
|
5912
|
-
}))
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
return
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
if (
|
|
5934
|
-
|
|
5867
|
+
}, this.options), t),
|
|
5868
|
+
a = s.sync;
|
|
5869
|
+
function finishRevival(e) {
|
|
5870
|
+
if (a) return e;
|
|
5871
|
+
if (s.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
5872
|
+
return Promise.resolve(e);
|
|
5873
|
+
}
|
|
5874
|
+
if (!e || "object" != _typeof$1(e) || Array.isArray(e)) return finishRevival(e);
|
|
5875
|
+
var i = e.$types;
|
|
5876
|
+
if (true === i) return finishRevival(e.$);
|
|
5877
|
+
if (!i || "object" != _typeof$1(i) || Array.isArray(i)) return finishRevival(e);
|
|
5878
|
+
var c = [],
|
|
5879
|
+
y = Object.create(null),
|
|
5880
|
+
l = {};
|
|
5881
|
+
var u = true;
|
|
5882
|
+
i.$ && isPlainObject(i.$) && (e = e.$, i = i.$, u = false);
|
|
5883
|
+
var executeReviver = function executeReviver(e, t) {
|
|
5884
|
+
var _this3$revivers$e;
|
|
5885
|
+
var _ref3 = (_this3$revivers$e = _this3.revivers[e]) !== null && _this3$revivers$e !== void 0 ? _this3$revivers$e : [],
|
|
5886
|
+
_ref4 = _slicedToArray(_ref3, 1),
|
|
5887
|
+
r = _ref4[0];
|
|
5888
|
+
if (!r) throw new Error("Unregistered type: " + e);
|
|
5889
|
+
if (a && !("revive" in r)) return t;
|
|
5890
|
+
if (!a && r.reviveAsync) return r.reviveAsync(t, l);
|
|
5891
|
+
if (r.revive) return r.revive(t, l);
|
|
5892
|
+
throw new Error("Missing reviver");
|
|
5893
|
+
},
|
|
5894
|
+
p = [];
|
|
5895
|
+
function checkUndefined(e) {
|
|
5896
|
+
return hasConstructorOf(e, Undefined) ? void 0 : e;
|
|
5897
|
+
}
|
|
5898
|
+
var f = function () {
|
|
5899
|
+
if (!i) throw new Error("Found bad `types`");
|
|
5900
|
+
var t = [];
|
|
5901
|
+
if (Object.entries(i).forEach(function (_ref5) {
|
|
5902
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
5903
|
+
e = _ref6[0],
|
|
5904
|
+
r = _ref6[1];
|
|
5905
|
+
"#" !== r && [].concat(r).forEach(function (r) {
|
|
5906
|
+
var _this3$revivers$r;
|
|
5907
|
+
var _ref7 = (_this3$revivers$r = _this3.revivers[r]) !== null && _this3$revivers$r !== void 0 ? _this3$revivers$r : [null, {}],
|
|
5908
|
+
_ref8 = _slicedToArray(_ref7, 2),
|
|
5909
|
+
n = _ref8[1].plain;
|
|
5910
|
+
n && (t.push({
|
|
5911
|
+
keypath: e,
|
|
5912
|
+
type: r
|
|
5913
|
+
}), delete i[e]);
|
|
5914
|
+
});
|
|
5915
|
+
}), t.length) return t.sort(nestedPathsFirst), t.reduce(function reducer(t, _ref9) {
|
|
5916
|
+
var r = _ref9.keypath,
|
|
5917
|
+
n = _ref9.type;
|
|
5918
|
+
if (isThenable(t)) return t.then(function (e) {
|
|
5919
|
+
return reducer(e, {
|
|
5920
|
+
keypath: r,
|
|
5921
|
+
type: n
|
|
5922
|
+
});
|
|
5923
|
+
});
|
|
5924
|
+
var o = getByKeyPath(e, r);
|
|
5925
|
+
if (o = executeReviver(n, o), hasConstructorOf(o, TypesonPromise)) return o.then(function (t) {
|
|
5926
|
+
var n = setAtKeyPath(e, r, t);
|
|
5927
|
+
n === t && (e = n);
|
|
5928
|
+
});
|
|
5929
|
+
var s = setAtKeyPath(e, r, o);
|
|
5930
|
+
s === o && (e = s);
|
|
5931
|
+
}, void 0);
|
|
5932
|
+
}();
|
|
5933
|
+
var d;
|
|
5934
|
+
return hasConstructorOf(f, TypesonPromise) ? d = f.then(function () {
|
|
5935
|
+
return e;
|
|
5936
|
+
}) : (d = function _revive(e, t, s, l, f) {
|
|
5937
|
+
if (u && "$types" === e) return;
|
|
5938
|
+
var d = p.length,
|
|
5939
|
+
m = i[e],
|
|
5940
|
+
h = o(t);
|
|
5941
|
+
if (h || isPlainObject(t)) {
|
|
5942
|
+
var _o3 = h ? new Array(t.length) : {};
|
|
5943
|
+
for (r(t).forEach(function (r) {
|
|
5944
|
+
var n = _revive(e + (e ? "." : "") + escapeKeyPathComponent(r), t[r], s !== null && s !== void 0 ? s : _o3, _o3, r),
|
|
5945
|
+
set = function set(e) {
|
|
5946
|
+
return hasConstructorOf(e, Undefined) ? _o3[r] = void 0 : void 0 !== e && (_o3[r] = e), e;
|
|
5947
|
+
};
|
|
5948
|
+
hasConstructorOf(n, TypesonPromise) ? p.push(n.then(function (e) {
|
|
5949
|
+
return set(e);
|
|
5950
|
+
})) : set(n);
|
|
5951
|
+
}), t = _o3; c.length;) {
|
|
5952
|
+
var _c$ = _slicedToArray(c[0], 4),
|
|
5953
|
+
_e = _c$[0],
|
|
5954
|
+
_t4 = _c$[1],
|
|
5955
|
+
_r4 = _c$[2],
|
|
5956
|
+
_o4 = _c$[3],
|
|
5957
|
+
_s = n(y, _t4),
|
|
5958
|
+
_a = _s ? y[_t4] : getByKeyPath(_e, _t4);
|
|
5959
|
+
if (!_s && void 0 === _a) break;
|
|
5960
|
+
_r4[_o4] = _a, c.shift();
|
|
5961
|
+
}
|
|
5935
5962
|
}
|
|
5936
|
-
if (!
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
y = true;
|
|
5943
|
-
u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = false);
|
|
5944
|
-
var p = function executeReviver(e, t) {
|
|
5945
|
-
var r,
|
|
5946
|
-
n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
|
|
5947
|
-
if (!n) throw new Error("Unregistered type: " + e);
|
|
5948
|
-
if (c && !("revive" in n)) return t;
|
|
5949
|
-
if (!c && n.reviveAsync) return n.reviveAsync(t, f);
|
|
5950
|
-
if (n.revive) return n.revive(t, f);
|
|
5951
|
-
throw new Error("Missing reviver");
|
|
5952
|
-
},
|
|
5953
|
-
d = [];
|
|
5954
|
-
function checkUndefined(e) {
|
|
5955
|
-
return hasConstructorOf(e, s) ? void 0 : e;
|
|
5963
|
+
if (!m) return y[e] = t, t;
|
|
5964
|
+
if ("#" === m) {
|
|
5965
|
+
var _e2 = t.slice(1),
|
|
5966
|
+
_r5 = n(y, _e2),
|
|
5967
|
+
_o5 = _r5 ? y[_e2] : getByKeyPath(s, _e2);
|
|
5968
|
+
return _r5 || void 0 !== _o5 || c.push([s, _e2, l, f]), _o5;
|
|
5956
5969
|
}
|
|
5957
|
-
var
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5970
|
+
var applyType = function applyType(t) {
|
|
5971
|
+
var r = [].concat(m).reduce(function reducer(e, t) {
|
|
5972
|
+
if (hasConstructorOf(e, TypesonPromise)) return e.then(function (e) {
|
|
5973
|
+
return reducer(e, t);
|
|
5974
|
+
});
|
|
5975
|
+
if ("string" != typeof t) throw new TypeError("Bad type JSON");
|
|
5976
|
+
return executeReviver(t, e);
|
|
5977
|
+
}, t);
|
|
5978
|
+
return hasConstructorOf(r, TypesonPromise) ? r.then(function (t) {
|
|
5979
|
+
return y[e] = t, t;
|
|
5980
|
+
}) : (y[e] = r, r);
|
|
5981
|
+
};
|
|
5982
|
+
return !a && p.length > d ? TypesonPromise.all(p.slice(d)).then(function () {
|
|
5983
|
+
return applyType(t);
|
|
5984
|
+
}) : applyType(t);
|
|
5985
|
+
}("", e, null), p.length && (d = TypesonPromise.resolve(d).then(function (e) {
|
|
5986
|
+
return TypesonPromise.all([e].concat(p));
|
|
5987
|
+
}).then(function (_ref0) {
|
|
5988
|
+
var _ref1 = _slicedToArray(_ref0, 1),
|
|
5989
|
+
e = _ref1[0];
|
|
5990
|
+
return e;
|
|
5991
|
+
}))), isThenable(d) ? a && s.throwOnBadSyncType ? function () {
|
|
5992
|
+
throw new TypeError("Sync method requested but async result obtained");
|
|
5993
|
+
}() : hasConstructorOf(d, TypesonPromise) ? d.p.then(checkUndefined) : d : !a && s.throwOnBadSyncType ? function () {
|
|
5994
|
+
throw new TypeError("Async method requested but sync result obtained");
|
|
5995
|
+
}() : a ? checkUndefined(d) : Promise.resolve(checkUndefined(d));
|
|
5996
|
+
}
|
|
5997
|
+
}, {
|
|
5998
|
+
key: "reviveSync",
|
|
5999
|
+
value: function reviveSync(e, t) {
|
|
6000
|
+
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
6001
|
+
throwOnBadSyncType: true
|
|
6002
|
+
}, t), {}, {
|
|
6003
|
+
sync: true
|
|
6004
|
+
}));
|
|
6005
|
+
}
|
|
6006
|
+
}, {
|
|
6007
|
+
key: "reviveAsync",
|
|
6008
|
+
value: function reviveAsync(e, t) {
|
|
6009
|
+
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
6010
|
+
throwOnBadSyncType: true
|
|
6011
|
+
}, t), {}, {
|
|
6012
|
+
sync: false
|
|
6013
|
+
}));
|
|
6014
|
+
}
|
|
6015
|
+
}, {
|
|
6016
|
+
key: "register",
|
|
6017
|
+
value: function register(e, t) {
|
|
6018
|
+
var _this4 = this;
|
|
6019
|
+
var n = t !== null && t !== void 0 ? t : {},
|
|
6020
|
+
_reg = function reg(e) {
|
|
6021
|
+
o(e) ? e.forEach(function (e) {
|
|
6022
|
+
_reg(e);
|
|
6023
|
+
}) : r(e).forEach(function (t) {
|
|
6024
|
+
var _r8;
|
|
6025
|
+
if ("#" === t) throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");
|
|
6026
|
+
if (a.includes(t)) throw new TypeError("Plain JSON object types are reserved as type names");
|
|
6027
|
+
var r = e[t];
|
|
6028
|
+
var s = r && "function" != typeof r && !Array.isArray(r) && r.testPlainObjects ? _this4.plainObjectReplacers : _this4.nonplainObjectReplacers,
|
|
6029
|
+
i = s.filter(function (e) {
|
|
6030
|
+
return e.type === t;
|
|
5985
6031
|
});
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
O = m[2],
|
|
6011
|
-
w = m[3],
|
|
6012
|
-
_ = getByKeyPath(h, g);
|
|
6013
|
-
if (void 0 === _) break;
|
|
6014
|
-
O[w] = _, l.splice(0, 1);
|
|
6015
|
-
}
|
|
6032
|
+
if (i.length && (s.splice(s.indexOf(i[0]), 1), delete _this4.revivers[t], delete _this4.types[t]), "function" == typeof r) {
|
|
6033
|
+
var _e3 = r;
|
|
6034
|
+
r = {
|
|
6035
|
+
test: function test(t) {
|
|
6036
|
+
return t && t.constructor === _e3;
|
|
6037
|
+
},
|
|
6038
|
+
replace: function replace(e) {
|
|
6039
|
+
return _objectSpread2({}, e);
|
|
6040
|
+
},
|
|
6041
|
+
revive: function revive(t) {
|
|
6042
|
+
return Object.assign(Object.create(_e3.prototype), t);
|
|
6043
|
+
}
|
|
6044
|
+
};
|
|
6045
|
+
} else if (o(r)) {
|
|
6046
|
+
var _r6 = r,
|
|
6047
|
+
_r7 = _slicedToArray(_r6, 3),
|
|
6048
|
+
_e4 = _r7[0],
|
|
6049
|
+
_t5 = _r7[1],
|
|
6050
|
+
_n3 = _r7[2];
|
|
6051
|
+
r = {
|
|
6052
|
+
test: _e4,
|
|
6053
|
+
replace: _t5,
|
|
6054
|
+
revive: _n3
|
|
6055
|
+
};
|
|
6016
6056
|
}
|
|
6017
|
-
if (!
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6057
|
+
if (!((_r8 = r) !== null && _r8 !== void 0 && _r8.test)) return;
|
|
6058
|
+
var c = {
|
|
6059
|
+
type: t,
|
|
6060
|
+
test: r.test.bind(r)
|
|
6061
|
+
};
|
|
6062
|
+
r.replace && (c.replace = r.replace.bind(r)), r.replaceAsync && (c.replaceAsync = r.replaceAsync.bind(r));
|
|
6063
|
+
var y = "number" == typeof n.fallback ? n.fallback : n.fallback ? 0 : 1 / 0;
|
|
6064
|
+
if (r.testPlainObjects ? _this4.plainObjectReplacers.splice(y, 0, c) : _this4.nonplainObjectReplacers.splice(y, 0, c), r.revive || r.reviveAsync) {
|
|
6065
|
+
var _e5 = {};
|
|
6066
|
+
r.revive && (_e5.revive = r.revive.bind(r)), r.reviveAsync && (_e5.reviveAsync = r.reviveAsync.bind(r)), _this4.revivers[t] = [_e5, {
|
|
6067
|
+
plain: r.testPlainObjects
|
|
6068
|
+
}];
|
|
6021
6069
|
}
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
}() : c ? checkUndefined(v) : Promise.resolve(checkUndefined(v));
|
|
6039
|
-
}
|
|
6040
|
-
}, {
|
|
6041
|
-
key: "reviveSync",
|
|
6042
|
-
value: function reviveSync(e, t) {
|
|
6043
|
-
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
6044
|
-
throwOnBadSyncType: true
|
|
6045
|
-
}, t), {}, {
|
|
6046
|
-
sync: true
|
|
6047
|
-
}));
|
|
6048
|
-
}
|
|
6049
|
-
}, {
|
|
6050
|
-
key: "reviveAsync",
|
|
6051
|
-
value: function reviveAsync(e, t) {
|
|
6052
|
-
return this.revive(e, _objectSpread2(_objectSpread2({
|
|
6053
|
-
throwOnBadSyncType: true
|
|
6054
|
-
}, t), {}, {
|
|
6055
|
-
sync: false
|
|
6056
|
-
}));
|
|
6057
|
-
}
|
|
6058
|
-
}, {
|
|
6059
|
-
key: "register",
|
|
6060
|
-
value: function register(e, t) {
|
|
6061
|
-
var r = this,
|
|
6062
|
-
a = null != t ? t : {},
|
|
6063
|
-
i = function R(e) {
|
|
6064
|
-
o(e) ? e.forEach(function (e) {
|
|
6065
|
-
return R(e);
|
|
6066
|
-
}) : n(e).forEach(function (t) {
|
|
6067
|
-
var n;
|
|
6068
|
-
if ("#" === t) throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");
|
|
6069
|
-
if (u.includes(t)) throw new TypeError("Plain JSON object types are reserved as type names");
|
|
6070
|
-
var i = e[t],
|
|
6071
|
-
c = i && "function" != typeof i && !Array.isArray(i) && i.testPlainObjects ? r.plainObjectReplacers : r.nonplainObjectReplacers,
|
|
6072
|
-
s = c.filter(function (e) {
|
|
6073
|
-
return e.type === t;
|
|
6074
|
-
});
|
|
6075
|
-
if (s.length && (c.splice(c.indexOf(s[0]), 1), delete r.revivers[t], delete r.types[t]), "function" == typeof i) {
|
|
6076
|
-
var l = i;
|
|
6077
|
-
i = {
|
|
6078
|
-
test: function test(e) {
|
|
6079
|
-
return e && e.constructor === l;
|
|
6080
|
-
},
|
|
6081
|
-
replace: function replace(e) {
|
|
6082
|
-
return _objectSpread2({}, e);
|
|
6083
|
-
},
|
|
6084
|
-
revive: function revive(e) {
|
|
6085
|
-
return Object.assign(Object.create(l.prototype), e);
|
|
6086
|
-
}
|
|
6087
|
-
};
|
|
6088
|
-
} else if (o(i)) {
|
|
6089
|
-
var f = _slicedToArray(i, 3);
|
|
6090
|
-
i = {
|
|
6091
|
-
test: f[0],
|
|
6092
|
-
replace: f[1],
|
|
6093
|
-
revive: f[2]
|
|
6094
|
-
};
|
|
6095
|
-
}
|
|
6096
|
-
if (null !== (n = i) && void 0 !== n && n.test) {
|
|
6097
|
-
var y = {
|
|
6098
|
-
type: t,
|
|
6099
|
-
test: i.test.bind(i)
|
|
6100
|
-
};
|
|
6101
|
-
i.replace && (y.replace = i.replace.bind(i)), i.replaceAsync && (y.replaceAsync = i.replaceAsync.bind(i));
|
|
6102
|
-
var p = "number" == typeof a.fallback ? a.fallback : a.fallback ? 0 : Number.POSITIVE_INFINITY;
|
|
6103
|
-
if (i.testPlainObjects ? r.plainObjectReplacers.splice(p, 0, y) : r.nonplainObjectReplacers.splice(p, 0, y), i.revive || i.reviveAsync) {
|
|
6104
|
-
var d = {};
|
|
6105
|
-
i.revive && (d.revive = i.revive.bind(i)), i.reviveAsync && (d.reviveAsync = i.reviveAsync.bind(i)), r.revivers[t] = [d, {
|
|
6106
|
-
plain: i.testPlainObjects
|
|
6107
|
-
}];
|
|
6108
|
-
}
|
|
6109
|
-
r.types[t] = i;
|
|
6110
|
-
}
|
|
6111
|
-
});
|
|
6112
|
-
};
|
|
6113
|
-
return [].concat(e).forEach(function (e) {
|
|
6114
|
-
return i(e);
|
|
6115
|
-
}), this;
|
|
6116
|
-
}
|
|
6117
|
-
}]), Typeson;
|
|
6118
|
-
}(),
|
|
6119
|
-
s = _createClass(function Undefined() {
|
|
6120
|
-
_classCallCheck(this, Undefined);
|
|
6121
|
-
});
|
|
6122
|
-
s.__typeson__type__ = "TypesonUndefined";
|
|
6123
|
-
for (var u = ["null", "boolean", "number", "string", "array", "object"], l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", f = new Uint8Array(256), y = 0; y < 64; y++) f[l.codePointAt(y)] = y;
|
|
6124
|
-
var p = function encode(e, t, r) {
|
|
6070
|
+
_this4.types[t] = r;
|
|
6071
|
+
});
|
|
6072
|
+
};
|
|
6073
|
+
return [].concat(e).forEach(function (e) {
|
|
6074
|
+
_reg(e);
|
|
6075
|
+
}), this;
|
|
6076
|
+
}
|
|
6077
|
+
}]);
|
|
6078
|
+
}();
|
|
6079
|
+
var Undefined = /*#__PURE__*/_createClass(function Undefined() {
|
|
6080
|
+
_classCallCheck(this, Undefined);
|
|
6081
|
+
});
|
|
6082
|
+
Undefined.__typeson__type__ = "TypesonUndefined";
|
|
6083
|
+
var a = ["null", "boolean", "number", "string", "array", "object"];
|
|
6084
|
+
for (var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = new Uint8Array(256), y = 0; y < 64; y++) c[i.codePointAt(y)] = y;
|
|
6085
|
+
var l = function encode(e, t, r) {
|
|
6125
6086
|
null == r && (r = e.byteLength);
|
|
6126
|
-
for (var n = new Uint8Array(e, 0, r),
|
|
6127
|
-
return
|
|
6087
|
+
for (var n = new Uint8Array(e, 0, r), o = n.length, s = "", a = 0; a < o; a += 3) s += i[n[a] >> 2], s += i[(3 & n[a]) << 4 | n[a + 1] >> 4], s += i[(15 & n[a + 1]) << 2 | n[a + 2] >> 6], s += i[63 & n[a + 2]];
|
|
6088
|
+
return o % 3 == 2 ? s = s.slice(0, -1) + "=" : o % 3 == 1 && (s = s.slice(0, -2) + "=="), s;
|
|
6128
6089
|
},
|
|
6129
|
-
|
|
6090
|
+
u = function decode(e, t) {
|
|
6130
6091
|
var r = e.length;
|
|
6131
6092
|
if (r % 4) throw new Error("Bad base64 length: not divisible by four");
|
|
6132
6093
|
var n,
|
|
6133
|
-
a,
|
|
6134
6094
|
o,
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6095
|
+
s,
|
|
6096
|
+
a,
|
|
6097
|
+
i = .75 * e.length,
|
|
6098
|
+
y = 0;
|
|
6099
|
+
"=" === e[e.length - 1] && (i--, "=" === e[e.length - 2] && i--);
|
|
6100
|
+
for (var l = new ArrayBuffer(i, t), u = new Uint8Array(l), p = 0; p < r; p += 4) n = c[e.codePointAt(p)], o = c[e.codePointAt(p + 1)], s = c[e.codePointAt(p + 2)], a = c[e.codePointAt(p + 3)], u[y++] = n << 2 | o >> 4, u[y++] = (15 & o) << 4 | s >> 2, u[y++] = (3 & s) << 6 | 63 & a;
|
|
6101
|
+
return l;
|
|
6141
6102
|
};
|
|
6142
|
-
var
|
|
6103
|
+
var p = {
|
|
6143
6104
|
arraybuffer: {
|
|
6144
6105
|
test: function test(e) {
|
|
6145
6106
|
return "ArrayBuffer" === toStringTag(e);
|
|
@@ -6147,27 +6108,27 @@
|
|
|
6147
6108
|
replace: function replace(e, t) {
|
|
6148
6109
|
t.buffers || (t.buffers = []);
|
|
6149
6110
|
var r = t.buffers.indexOf(e);
|
|
6150
|
-
return
|
|
6111
|
+
return -1 !== r ? {
|
|
6151
6112
|
index: r
|
|
6152
6113
|
} : (t.buffers.push(e), {
|
|
6153
|
-
s:
|
|
6114
|
+
s: l(e),
|
|
6154
6115
|
maxByteLength: e.maxByteLength,
|
|
6155
6116
|
resizable: e.resizable
|
|
6156
6117
|
});
|
|
6157
6118
|
},
|
|
6158
6119
|
revive: function revive(e, t) {
|
|
6159
6120
|
if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
|
|
6160
|
-
var r =
|
|
6121
|
+
var r = u(e.s, e.resizable ? {
|
|
6161
6122
|
maxByteLength: e.maxByteLength
|
|
6162
6123
|
} : void 0);
|
|
6163
6124
|
return t.buffers.push(r), r;
|
|
6164
6125
|
}
|
|
6165
6126
|
}
|
|
6166
6127
|
},
|
|
6167
|
-
|
|
6128
|
+
f = {
|
|
6168
6129
|
bigintObject: {
|
|
6169
6130
|
test: function test(e) {
|
|
6170
|
-
return "object" == _typeof$
|
|
6131
|
+
return "object" == _typeof$1(e) && hasConstructorOf(e, BigInt);
|
|
6171
6132
|
},
|
|
6172
6133
|
replace: String,
|
|
6173
6134
|
revive: function revive(e) {
|
|
@@ -6175,7 +6136,7 @@
|
|
|
6175
6136
|
}
|
|
6176
6137
|
}
|
|
6177
6138
|
},
|
|
6178
|
-
|
|
6139
|
+
d = {
|
|
6179
6140
|
bigint: {
|
|
6180
6141
|
test: function test(e) {
|
|
6181
6142
|
return "bigint" == typeof e;
|
|
@@ -6193,10 +6154,10 @@
|
|
|
6193
6154
|
}
|
|
6194
6155
|
function string2arraybuffer(e) {
|
|
6195
6156
|
var t = new Uint8Array(e.length);
|
|
6196
|
-
for (var
|
|
6157
|
+
for (var _r9 = 0; _r9 < e.length; _r9++) t[_r9] = e.charCodeAt(_r9);
|
|
6197
6158
|
return t.buffer;
|
|
6198
6159
|
}
|
|
6199
|
-
var
|
|
6160
|
+
var m = {
|
|
6200
6161
|
blob: {
|
|
6201
6162
|
test: function test(e) {
|
|
6202
6163
|
return "Blob" === toStringTag(e);
|
|
@@ -6216,57 +6177,57 @@
|
|
|
6216
6177
|
type: t
|
|
6217
6178
|
});
|
|
6218
6179
|
},
|
|
6219
|
-
replaceAsync: function replaceAsync(
|
|
6220
|
-
return new
|
|
6180
|
+
replaceAsync: function replaceAsync(e) {
|
|
6181
|
+
return new TypesonPromise(function (t, r) {
|
|
6221
6182
|
var n = new FileReader();
|
|
6222
6183
|
n.addEventListener("load", function () {
|
|
6223
|
-
|
|
6224
|
-
type:
|
|
6184
|
+
t({
|
|
6185
|
+
type: e.type,
|
|
6225
6186
|
stringContents: arraybuffer2string(n.result)
|
|
6226
6187
|
});
|
|
6227
6188
|
}), n.addEventListener("error", function () {
|
|
6228
6189
|
r(n.error);
|
|
6229
|
-
}), n.readAsArrayBuffer(
|
|
6190
|
+
}), n.readAsArrayBuffer(e);
|
|
6230
6191
|
});
|
|
6231
6192
|
}
|
|
6232
6193
|
}
|
|
6233
6194
|
};
|
|
6234
|
-
var
|
|
6195
|
+
var b = {
|
|
6235
6196
|
cryptokey: {
|
|
6236
6197
|
test: function test(e) {
|
|
6237
6198
|
return "CryptoKey" === toStringTag(e) && e.extractable;
|
|
6238
6199
|
},
|
|
6239
|
-
replaceAsync: function replaceAsync(
|
|
6240
|
-
return new
|
|
6241
|
-
var
|
|
6242
|
-
var n,
|
|
6243
|
-
return _regenerator().w(function (
|
|
6244
|
-
while (1) switch (
|
|
6200
|
+
replaceAsync: function replaceAsync(e) {
|
|
6201
|
+
return new TypesonPromise(/*#__PURE__*/function () {
|
|
6202
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(t, r) {
|
|
6203
|
+
var n, _t6;
|
|
6204
|
+
return _regenerator().w(function (_context3) {
|
|
6205
|
+
while (1) switch (_context3.p = _context3.n) {
|
|
6245
6206
|
case 0:
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
return crypto.subtle.exportKey("jwk",
|
|
6207
|
+
_context3.p = 0;
|
|
6208
|
+
_context3.n = 1;
|
|
6209
|
+
return crypto.subtle.exportKey("jwk", e);
|
|
6249
6210
|
case 1:
|
|
6250
|
-
n =
|
|
6251
|
-
|
|
6211
|
+
n = _context3.v;
|
|
6212
|
+
_context3.n = 3;
|
|
6252
6213
|
break;
|
|
6253
6214
|
case 2:
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
return
|
|
6215
|
+
_context3.p = 2;
|
|
6216
|
+
_t6 = _context3.v;
|
|
6217
|
+
return _context3.a(2, void r(_t6));
|
|
6257
6218
|
case 3:
|
|
6258
|
-
|
|
6219
|
+
t({
|
|
6259
6220
|
jwk: n,
|
|
6260
|
-
algorithm:
|
|
6261
|
-
usages:
|
|
6221
|
+
algorithm: e.algorithm,
|
|
6222
|
+
usages: e.usages
|
|
6262
6223
|
});
|
|
6263
6224
|
case 4:
|
|
6264
|
-
return
|
|
6225
|
+
return _context3.a(2);
|
|
6265
6226
|
}
|
|
6266
|
-
},
|
|
6227
|
+
}, _callee3, null, [[0, 2]]);
|
|
6267
6228
|
}));
|
|
6268
|
-
return function (
|
|
6269
|
-
return
|
|
6229
|
+
return function (_x4, _x5) {
|
|
6230
|
+
return _ref10.apply(this, arguments);
|
|
6270
6231
|
};
|
|
6271
6232
|
}());
|
|
6272
6233
|
},
|
|
@@ -6278,23 +6239,23 @@
|
|
|
6278
6239
|
}
|
|
6279
6240
|
}
|
|
6280
6241
|
},
|
|
6281
|
-
|
|
6242
|
+
v = {
|
|
6282
6243
|
dataview: {
|
|
6283
6244
|
test: function test(e) {
|
|
6284
6245
|
return "DataView" === toStringTag(e);
|
|
6285
6246
|
},
|
|
6286
|
-
replace: function replace(
|
|
6287
|
-
var e =
|
|
6288
|
-
t =
|
|
6289
|
-
r =
|
|
6247
|
+
replace: function replace(_ref11, n) {
|
|
6248
|
+
var e = _ref11.buffer,
|
|
6249
|
+
t = _ref11.byteOffset,
|
|
6250
|
+
r = _ref11.byteLength;
|
|
6290
6251
|
n.buffers || (n.buffers = []);
|
|
6291
|
-
var
|
|
6292
|
-
return
|
|
6293
|
-
index:
|
|
6252
|
+
var o = n.buffers.indexOf(e);
|
|
6253
|
+
return -1 !== o ? {
|
|
6254
|
+
index: o,
|
|
6294
6255
|
byteOffset: t,
|
|
6295
6256
|
byteLength: r
|
|
6296
6257
|
} : (n.buffers.push(e), {
|
|
6297
|
-
encoded:
|
|
6258
|
+
encoded: l(e),
|
|
6298
6259
|
maxByteLength: e.maxByteLength,
|
|
6299
6260
|
resizable: e.resizable,
|
|
6300
6261
|
byteOffset: t,
|
|
@@ -6305,18 +6266,18 @@
|
|
|
6305
6266
|
t.buffers || (t.buffers = []);
|
|
6306
6267
|
var r = e.byteOffset,
|
|
6307
6268
|
n = e.byteLength,
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
var
|
|
6313
|
-
return "index" in e ?
|
|
6314
|
-
maxByteLength:
|
|
6315
|
-
} :
|
|
6269
|
+
o = e.encoded,
|
|
6270
|
+
s = e.index,
|
|
6271
|
+
a = e.maxByteLength,
|
|
6272
|
+
i = e.resizable;
|
|
6273
|
+
var c;
|
|
6274
|
+
return "index" in e ? c = t.buffers[s] : (c = u(o, i ? {
|
|
6275
|
+
maxByteLength: a
|
|
6276
|
+
} : a), t.buffers.push(c)), new DataView(c, r, n);
|
|
6316
6277
|
}
|
|
6317
6278
|
}
|
|
6318
6279
|
},
|
|
6319
|
-
|
|
6280
|
+
O = {
|
|
6320
6281
|
date: {
|
|
6321
6282
|
test: function test(e) {
|
|
6322
6283
|
return "Date" === toStringTag(e);
|
|
@@ -6326,11 +6287,11 @@
|
|
|
6326
6287
|
return Number.isNaN(t) ? "NaN" : t;
|
|
6327
6288
|
},
|
|
6328
6289
|
revive: function revive(e) {
|
|
6329
|
-
return "NaN" === e ? new Date(
|
|
6290
|
+
return "NaN" === e ? new Date(NaN) : new Date(e);
|
|
6330
6291
|
}
|
|
6331
6292
|
}
|
|
6332
6293
|
},
|
|
6333
|
-
|
|
6294
|
+
w = {
|
|
6334
6295
|
domexception: {
|
|
6335
6296
|
test: function test(e) {
|
|
6336
6297
|
return "DOMException" === toStringTag(e);
|
|
@@ -6341,16 +6302,16 @@
|
|
|
6341
6302
|
message: e.message
|
|
6342
6303
|
};
|
|
6343
6304
|
},
|
|
6344
|
-
revive: function revive(
|
|
6345
|
-
var e =
|
|
6346
|
-
t =
|
|
6305
|
+
revive: function revive(_ref12) {
|
|
6306
|
+
var e = _ref12.message,
|
|
6307
|
+
t = _ref12.name;
|
|
6347
6308
|
return new DOMException(e, t);
|
|
6348
6309
|
}
|
|
6349
6310
|
}
|
|
6350
6311
|
},
|
|
6351
|
-
|
|
6312
|
+
T = {};
|
|
6352
6313
|
function create$5(e) {
|
|
6353
|
-
|
|
6314
|
+
T[e.name.toLowerCase()] = {
|
|
6354
6315
|
test: function test(t) {
|
|
6355
6316
|
return toStringTag(t) === e.name;
|
|
6356
6317
|
},
|
|
@@ -6387,9 +6348,9 @@
|
|
|
6387
6348
|
};
|
|
6388
6349
|
}
|
|
6389
6350
|
"undefined" != typeof DOMMatrix && create$5(DOMMatrix), "undefined" != typeof DOMMatrixReadOnly && create$5(DOMMatrixReadOnly);
|
|
6390
|
-
var
|
|
6351
|
+
var A = {};
|
|
6391
6352
|
function create$4(e) {
|
|
6392
|
-
|
|
6353
|
+
A[e.name.toLowerCase()] = {
|
|
6393
6354
|
test: function test(t) {
|
|
6394
6355
|
return toStringTag(t) === e.name;
|
|
6395
6356
|
},
|
|
@@ -6401,17 +6362,17 @@
|
|
|
6401
6362
|
w: e.w
|
|
6402
6363
|
};
|
|
6403
6364
|
},
|
|
6404
|
-
revive: function revive(
|
|
6405
|
-
var t =
|
|
6406
|
-
r =
|
|
6407
|
-
n =
|
|
6408
|
-
|
|
6409
|
-
return new e(t, r, n,
|
|
6365
|
+
revive: function revive(_ref13) {
|
|
6366
|
+
var t = _ref13.x,
|
|
6367
|
+
r = _ref13.y,
|
|
6368
|
+
n = _ref13.z,
|
|
6369
|
+
o = _ref13.w;
|
|
6370
|
+
return new e(t, r, n, o);
|
|
6410
6371
|
}
|
|
6411
6372
|
};
|
|
6412
6373
|
}
|
|
6413
6374
|
"undefined" != typeof DOMPoint && create$4(DOMPoint), "undefined" != typeof DOMPointReadOnly && create$4(DOMPointReadOnly);
|
|
6414
|
-
var
|
|
6375
|
+
var P = {
|
|
6415
6376
|
domquad: {
|
|
6416
6377
|
test: function test(e) {
|
|
6417
6378
|
return "DOMQuad" === toStringTag(e);
|
|
@@ -6424,18 +6385,18 @@
|
|
|
6424
6385
|
p4: e.p4
|
|
6425
6386
|
};
|
|
6426
6387
|
},
|
|
6427
|
-
revive: function revive(
|
|
6428
|
-
var e =
|
|
6429
|
-
t =
|
|
6430
|
-
r =
|
|
6431
|
-
n =
|
|
6388
|
+
revive: function revive(_ref14) {
|
|
6389
|
+
var e = _ref14.p1,
|
|
6390
|
+
t = _ref14.p2,
|
|
6391
|
+
r = _ref14.p3,
|
|
6392
|
+
n = _ref14.p4;
|
|
6432
6393
|
return new DOMQuad(e, t, r, n);
|
|
6433
6394
|
}
|
|
6434
6395
|
}
|
|
6435
6396
|
},
|
|
6436
|
-
|
|
6397
|
+
S = {};
|
|
6437
6398
|
function create$3(e) {
|
|
6438
|
-
|
|
6399
|
+
S[e.name.toLowerCase()] = {
|
|
6439
6400
|
test: function test(t) {
|
|
6440
6401
|
return toStringTag(t) === e.name;
|
|
6441
6402
|
},
|
|
@@ -6447,37 +6408,37 @@
|
|
|
6447
6408
|
height: e.height
|
|
6448
6409
|
};
|
|
6449
6410
|
},
|
|
6450
|
-
revive: function revive(
|
|
6451
|
-
var t =
|
|
6452
|
-
r =
|
|
6453
|
-
n =
|
|
6454
|
-
|
|
6455
|
-
return new e(t, r, n,
|
|
6411
|
+
revive: function revive(_ref15) {
|
|
6412
|
+
var t = _ref15.x,
|
|
6413
|
+
r = _ref15.y,
|
|
6414
|
+
n = _ref15.width,
|
|
6415
|
+
o = _ref15.height;
|
|
6416
|
+
return new e(t, r, n, o);
|
|
6456
6417
|
}
|
|
6457
6418
|
};
|
|
6458
6419
|
}
|
|
6459
6420
|
"undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
|
|
6460
|
-
var
|
|
6421
|
+
var x = {
|
|
6461
6422
|
error: {
|
|
6462
6423
|
test: function test(e) {
|
|
6463
6424
|
return "Error" === toStringTag(e);
|
|
6464
6425
|
},
|
|
6465
|
-
replace: function replace(
|
|
6466
|
-
var e =
|
|
6467
|
-
t =
|
|
6468
|
-
r =
|
|
6469
|
-
n =
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6426
|
+
replace: function replace(_ref16) {
|
|
6427
|
+
var e = _ref16.name,
|
|
6428
|
+
t = _ref16.message,
|
|
6429
|
+
r = _ref16.cause,
|
|
6430
|
+
n = _ref16.stack,
|
|
6431
|
+
o = _ref16.fileName,
|
|
6432
|
+
s = _ref16.lineNumber,
|
|
6433
|
+
a = _ref16.columnNumber;
|
|
6473
6434
|
return {
|
|
6474
6435
|
name: e,
|
|
6475
6436
|
message: t,
|
|
6476
6437
|
cause: r,
|
|
6477
6438
|
stack: n,
|
|
6478
|
-
fileName:
|
|
6479
|
-
lineNumber:
|
|
6480
|
-
columnNumber:
|
|
6439
|
+
fileName: o,
|
|
6440
|
+
lineNumber: s,
|
|
6441
|
+
columnNumber: a
|
|
6481
6442
|
};
|
|
6482
6443
|
},
|
|
6483
6444
|
revive: function revive(e) {
|
|
@@ -6486,30 +6447,30 @@
|
|
|
6486
6447
|
}
|
|
6487
6448
|
}
|
|
6488
6449
|
},
|
|
6489
|
-
|
|
6450
|
+
j = {};
|
|
6490
6451
|
function create$2(e) {
|
|
6491
|
-
|
|
6452
|
+
j[e.name.toLowerCase()] = {
|
|
6492
6453
|
test: function test(t) {
|
|
6493
6454
|
return hasConstructorOf(t, e);
|
|
6494
6455
|
},
|
|
6495
|
-
replace: function replace(
|
|
6496
|
-
var e =
|
|
6497
|
-
t =
|
|
6498
|
-
r =
|
|
6499
|
-
n =
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6456
|
+
replace: function replace(_ref17) {
|
|
6457
|
+
var e = _ref17.name,
|
|
6458
|
+
t = _ref17.message,
|
|
6459
|
+
r = _ref17.cause,
|
|
6460
|
+
n = _ref17.stack,
|
|
6461
|
+
o = _ref17.fileName,
|
|
6462
|
+
s = _ref17.lineNumber,
|
|
6463
|
+
a = _ref17.columnNumber,
|
|
6464
|
+
i = _ref17.errors;
|
|
6504
6465
|
return {
|
|
6505
6466
|
name: e,
|
|
6506
6467
|
message: t,
|
|
6507
6468
|
cause: r,
|
|
6508
6469
|
stack: n,
|
|
6509
|
-
fileName:
|
|
6510
|
-
lineNumber:
|
|
6511
|
-
columnNumber:
|
|
6512
|
-
errors:
|
|
6470
|
+
fileName: o,
|
|
6471
|
+
lineNumber: s,
|
|
6472
|
+
columnNumber: a,
|
|
6473
|
+
errors: i
|
|
6513
6474
|
};
|
|
6514
6475
|
},
|
|
6515
6476
|
revive: function revive(t) {
|
|
@@ -6521,7 +6482,7 @@
|
|
|
6521
6482
|
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
|
|
6522
6483
|
return create$2(e);
|
|
6523
6484
|
}), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
|
|
6524
|
-
var
|
|
6485
|
+
var N = {
|
|
6525
6486
|
file: {
|
|
6526
6487
|
test: function test(e) {
|
|
6527
6488
|
return "File" === toStringTag(e);
|
|
@@ -6536,51 +6497,51 @@
|
|
|
6536
6497
|
lastModified: e.lastModified
|
|
6537
6498
|
};
|
|
6538
6499
|
},
|
|
6539
|
-
revive: function revive(
|
|
6540
|
-
var e =
|
|
6541
|
-
t =
|
|
6542
|
-
r =
|
|
6543
|
-
n =
|
|
6500
|
+
revive: function revive(_ref18) {
|
|
6501
|
+
var e = _ref18.name,
|
|
6502
|
+
t = _ref18.type,
|
|
6503
|
+
r = _ref18.stringContents,
|
|
6504
|
+
n = _ref18.lastModified;
|
|
6544
6505
|
return new File([string2arraybuffer(r)], e, {
|
|
6545
6506
|
type: t,
|
|
6546
6507
|
lastModified: n
|
|
6547
6508
|
});
|
|
6548
6509
|
},
|
|
6549
|
-
replaceAsync: function replaceAsync(
|
|
6550
|
-
return new
|
|
6510
|
+
replaceAsync: function replaceAsync(e) {
|
|
6511
|
+
return new TypesonPromise(function (t, r) {
|
|
6551
6512
|
var n = new FileReader();
|
|
6552
6513
|
n.addEventListener("load", function () {
|
|
6553
|
-
|
|
6554
|
-
type:
|
|
6514
|
+
t({
|
|
6515
|
+
type: e.type,
|
|
6555
6516
|
stringContents: arraybuffer2string(n.result),
|
|
6556
|
-
name:
|
|
6557
|
-
lastModified:
|
|
6517
|
+
name: e.name,
|
|
6518
|
+
lastModified: e.lastModified
|
|
6558
6519
|
});
|
|
6559
6520
|
}), n.addEventListener("error", function () {
|
|
6560
6521
|
r(n.error);
|
|
6561
|
-
}), n.readAsArrayBuffer(
|
|
6522
|
+
}), n.readAsArrayBuffer(e);
|
|
6562
6523
|
});
|
|
6563
6524
|
}
|
|
6564
6525
|
}
|
|
6565
6526
|
},
|
|
6566
|
-
|
|
6567
|
-
file:
|
|
6527
|
+
_ = {
|
|
6528
|
+
file: N.file,
|
|
6568
6529
|
filelist: {
|
|
6569
6530
|
test: function test(e) {
|
|
6570
6531
|
return "FileList" === toStringTag(e);
|
|
6571
6532
|
},
|
|
6572
6533
|
replace: function replace(e) {
|
|
6573
6534
|
var t = [];
|
|
6574
|
-
for (var
|
|
6535
|
+
for (var _r0 = 0; _r0 < e.length; _r0++) t[_r0] = e.item(_r0);
|
|
6575
6536
|
return t;
|
|
6576
6537
|
},
|
|
6577
6538
|
revive: function revive(e) {
|
|
6578
6539
|
var FileList = /*#__PURE__*/function () {
|
|
6579
6540
|
function FileList() {
|
|
6580
|
-
_classCallCheck
|
|
6541
|
+
_classCallCheck(this, FileList);
|
|
6581
6542
|
this._files = arguments[0], this.length = this._files.length;
|
|
6582
6543
|
}
|
|
6583
|
-
return _createClass
|
|
6544
|
+
return _createClass(FileList, [{
|
|
6584
6545
|
key: "item",
|
|
6585
6546
|
value: function item(e) {
|
|
6586
6547
|
return this._files[e];
|
|
@@ -6617,44 +6578,43 @@
|
|
|
6617
6578
|
r.drawImage(n, 0, 0);
|
|
6618
6579
|
}), n.src = e.dataURL, "undefined" == typeof OffscreenCanvas ? t : t.transferToImageBitmap();
|
|
6619
6580
|
},
|
|
6620
|
-
reviveAsync: function reviveAsync(
|
|
6621
|
-
var
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
return
|
|
6625
|
-
|
|
6626
|
-
}),
|
|
6627
|
-
var
|
|
6628
|
-
var
|
|
6629
|
-
return _regenerator().w(function (
|
|
6630
|
-
while (1) switch (
|
|
6581
|
+
reviveAsync: function reviveAsync(e) {
|
|
6582
|
+
var t = document.createElement("canvas"),
|
|
6583
|
+
r = t.getContext("2d"),
|
|
6584
|
+
n = document.createElement("img");
|
|
6585
|
+
return n.addEventListener("load", function () {
|
|
6586
|
+
r.drawImage(n, 0, 0);
|
|
6587
|
+
}), n.src = e.dataURL, new TypesonPromise(/*#__PURE__*/function () {
|
|
6588
|
+
var _ref19 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(e, r) {
|
|
6589
|
+
var _t7, _t8;
|
|
6590
|
+
return _regenerator().w(function (_context4) {
|
|
6591
|
+
while (1) switch (_context4.p = _context4.n) {
|
|
6631
6592
|
case 0:
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
return createImageBitmap(
|
|
6593
|
+
_context4.p = 0;
|
|
6594
|
+
_t7 = e;
|
|
6595
|
+
_context4.n = 1;
|
|
6596
|
+
return createImageBitmap(t);
|
|
6636
6597
|
case 1:
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
_context2.n = 3;
|
|
6598
|
+
_t7(_context4.v);
|
|
6599
|
+
_context4.n = 3;
|
|
6640
6600
|
break;
|
|
6641
6601
|
case 2:
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6602
|
+
_context4.p = 2;
|
|
6603
|
+
_t8 = _context4.v;
|
|
6604
|
+
r(_t8);
|
|
6645
6605
|
case 3:
|
|
6646
|
-
return
|
|
6606
|
+
return _context4.a(2);
|
|
6647
6607
|
}
|
|
6648
|
-
},
|
|
6608
|
+
}, _callee4, null, [[0, 2]]);
|
|
6649
6609
|
}));
|
|
6650
|
-
return function (
|
|
6651
|
-
return
|
|
6610
|
+
return function (_x6, _x7) {
|
|
6611
|
+
return _ref19.apply(this, arguments);
|
|
6652
6612
|
};
|
|
6653
6613
|
}());
|
|
6654
6614
|
}
|
|
6655
6615
|
}
|
|
6656
6616
|
},
|
|
6657
|
-
|
|
6617
|
+
E = {
|
|
6658
6618
|
imagedata: {
|
|
6659
6619
|
test: function test(e) {
|
|
6660
6620
|
return "ImageData" === toStringTag(e);
|
|
@@ -6671,33 +6631,33 @@
|
|
|
6671
6631
|
}
|
|
6672
6632
|
}
|
|
6673
6633
|
},
|
|
6674
|
-
|
|
6634
|
+
C = {
|
|
6675
6635
|
infinity: {
|
|
6676
6636
|
test: function test(e) {
|
|
6677
|
-
return e ===
|
|
6637
|
+
return e === 1 / 0;
|
|
6678
6638
|
},
|
|
6679
6639
|
replace: function replace() {
|
|
6680
6640
|
return "Infinity";
|
|
6681
6641
|
},
|
|
6682
6642
|
revive: function revive() {
|
|
6683
|
-
return
|
|
6643
|
+
return 1 / 0;
|
|
6684
6644
|
}
|
|
6685
6645
|
}
|
|
6686
6646
|
},
|
|
6687
|
-
|
|
6647
|
+
U = {
|
|
6688
6648
|
map: {
|
|
6689
6649
|
test: function test(e) {
|
|
6690
6650
|
return "Map" === toStringTag(e);
|
|
6691
6651
|
},
|
|
6692
6652
|
replace: function replace(e) {
|
|
6693
|
-
return
|
|
6653
|
+
return e.entries().toArray();
|
|
6694
6654
|
},
|
|
6695
6655
|
revive: function revive(e) {
|
|
6696
6656
|
return new Map(e);
|
|
6697
6657
|
}
|
|
6698
6658
|
}
|
|
6699
6659
|
},
|
|
6700
|
-
|
|
6660
|
+
M = {
|
|
6701
6661
|
nan: {
|
|
6702
6662
|
test: function test(e) {
|
|
6703
6663
|
return Number.isNaN(e);
|
|
@@ -6706,24 +6666,24 @@
|
|
|
6706
6666
|
return "NaN";
|
|
6707
6667
|
},
|
|
6708
6668
|
revive: function revive() {
|
|
6709
|
-
return
|
|
6669
|
+
return NaN;
|
|
6710
6670
|
}
|
|
6711
6671
|
}
|
|
6712
6672
|
},
|
|
6713
|
-
|
|
6673
|
+
L = {
|
|
6714
6674
|
negativeInfinity: {
|
|
6715
6675
|
test: function test(e) {
|
|
6716
|
-
return e ===
|
|
6676
|
+
return e === -1 / 0;
|
|
6717
6677
|
},
|
|
6718
6678
|
replace: function replace() {
|
|
6719
6679
|
return "-Infinity";
|
|
6720
6680
|
},
|
|
6721
6681
|
revive: function revive() {
|
|
6722
|
-
return
|
|
6682
|
+
return -1 / 0;
|
|
6723
6683
|
}
|
|
6724
6684
|
}
|
|
6725
6685
|
},
|
|
6726
|
-
|
|
6686
|
+
D = {
|
|
6727
6687
|
negativeZero: {
|
|
6728
6688
|
test: function test(e) {
|
|
6729
6689
|
return Object.is(e, -0);
|
|
@@ -6736,10 +6696,10 @@
|
|
|
6736
6696
|
}
|
|
6737
6697
|
}
|
|
6738
6698
|
},
|
|
6739
|
-
|
|
6699
|
+
k = {
|
|
6740
6700
|
StringObject: {
|
|
6741
6701
|
test: function test(e) {
|
|
6742
|
-
return "String" === toStringTag(e) && "object" == _typeof$
|
|
6702
|
+
return "String" === toStringTag(e) && "object" == _typeof$1(e);
|
|
6743
6703
|
},
|
|
6744
6704
|
replace: String,
|
|
6745
6705
|
revive: function revive(e) {
|
|
@@ -6748,7 +6708,7 @@
|
|
|
6748
6708
|
},
|
|
6749
6709
|
BooleanObject: {
|
|
6750
6710
|
test: function test(e) {
|
|
6751
|
-
return "Boolean" === toStringTag(e) && "object" == _typeof$
|
|
6711
|
+
return "Boolean" === toStringTag(e) && "object" == _typeof$1(e);
|
|
6752
6712
|
},
|
|
6753
6713
|
replace: function replace(e) {
|
|
6754
6714
|
return e.valueOf();
|
|
@@ -6759,7 +6719,7 @@
|
|
|
6759
6719
|
},
|
|
6760
6720
|
NumberObject: {
|
|
6761
6721
|
test: function test(e) {
|
|
6762
|
-
return "Number" === toStringTag(e) && "object" == _typeof$
|
|
6722
|
+
return "Number" === toStringTag(e) && "object" == _typeof$1(e);
|
|
6763
6723
|
},
|
|
6764
6724
|
replace: Number,
|
|
6765
6725
|
revive: function revive(e) {
|
|
@@ -6767,7 +6727,7 @@
|
|
|
6767
6727
|
}
|
|
6768
6728
|
}
|
|
6769
6729
|
},
|
|
6770
|
-
|
|
6730
|
+
$ = {
|
|
6771
6731
|
regexp: {
|
|
6772
6732
|
test: function test(e) {
|
|
6773
6733
|
return "RegExp" === toStringTag(e);
|
|
@@ -6775,34 +6735,34 @@
|
|
|
6775
6735
|
replace: function replace(e) {
|
|
6776
6736
|
return {
|
|
6777
6737
|
source: e.source,
|
|
6778
|
-
flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
|
|
6738
|
+
flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "") + (e.unicodeSets ? "v" : "") + (e.hasIndices ? "d" : "") + (e.dotAll ? "s" : "")
|
|
6779
6739
|
};
|
|
6780
6740
|
},
|
|
6781
|
-
revive: function revive(
|
|
6782
|
-
var e =
|
|
6783
|
-
t =
|
|
6741
|
+
revive: function revive(_ref21) {
|
|
6742
|
+
var e = _ref21.source,
|
|
6743
|
+
t = _ref21.flags;
|
|
6784
6744
|
return new RegExp(e, t);
|
|
6785
6745
|
}
|
|
6786
6746
|
}
|
|
6787
6747
|
},
|
|
6788
|
-
|
|
6748
|
+
J = {
|
|
6789
6749
|
set: {
|
|
6790
6750
|
test: function test(e) {
|
|
6791
6751
|
return "Set" === toStringTag(e);
|
|
6792
6752
|
},
|
|
6793
6753
|
replace: function replace(e) {
|
|
6794
|
-
return
|
|
6754
|
+
return e.values().toArray();
|
|
6795
6755
|
},
|
|
6796
6756
|
revive: function revive(e) {
|
|
6797
6757
|
return new Set(e);
|
|
6798
6758
|
}
|
|
6799
6759
|
}
|
|
6800
6760
|
},
|
|
6801
|
-
|
|
6761
|
+
V = {};
|
|
6802
6762
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6803
6763
|
return function create$1(e) {
|
|
6804
6764
|
var t = e.name;
|
|
6805
|
-
|
|
6765
|
+
V[t.toLowerCase()] = {
|
|
6806
6766
|
test: function test(e) {
|
|
6807
6767
|
return toStringTag(e) === t;
|
|
6808
6768
|
},
|
|
@@ -6815,28 +6775,28 @@
|
|
|
6815
6775
|
};
|
|
6816
6776
|
}(e);
|
|
6817
6777
|
});
|
|
6818
|
-
var
|
|
6778
|
+
var W = {};
|
|
6819
6779
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6820
6780
|
return function create(e) {
|
|
6821
6781
|
var t = e.name;
|
|
6822
|
-
|
|
6782
|
+
W[t.toLowerCase()] = {
|
|
6823
6783
|
test: function test(e) {
|
|
6824
6784
|
return toStringTag(e) === t;
|
|
6825
6785
|
},
|
|
6826
|
-
replace: function replace(
|
|
6827
|
-
var e =
|
|
6828
|
-
t =
|
|
6829
|
-
r =
|
|
6786
|
+
replace: function replace(_ref22, n) {
|
|
6787
|
+
var e = _ref22.buffer,
|
|
6788
|
+
t = _ref22.byteOffset,
|
|
6789
|
+
r = _ref22.length;
|
|
6830
6790
|
n.buffers || (n.buffers = []);
|
|
6831
|
-
var
|
|
6832
|
-
return
|
|
6833
|
-
index:
|
|
6791
|
+
var o = n.buffers.indexOf(e);
|
|
6792
|
+
return -1 !== o ? {
|
|
6793
|
+
index: o,
|
|
6834
6794
|
byteOffset: t,
|
|
6835
6795
|
length: r
|
|
6836
6796
|
} : (n.buffers.push(e), {
|
|
6837
6797
|
maxByteLength: e.maxByteLength,
|
|
6838
6798
|
resizable: e.resizable,
|
|
6839
|
-
encoded:
|
|
6799
|
+
encoded: l(e),
|
|
6840
6800
|
byteOffset: t,
|
|
6841
6801
|
length: r
|
|
6842
6802
|
});
|
|
@@ -6844,20 +6804,20 @@
|
|
|
6844
6804
|
revive: function revive(t, r) {
|
|
6845
6805
|
r.buffers || (r.buffers = []);
|
|
6846
6806
|
var n = t.byteOffset,
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
var
|
|
6853
|
-
return "index" in t ?
|
|
6854
|
-
maxByteLength:
|
|
6855
|
-
} : void 0), r.buffers.push(
|
|
6807
|
+
o = t.length,
|
|
6808
|
+
s = t.encoded,
|
|
6809
|
+
a = t.index,
|
|
6810
|
+
i = t.maxByteLength,
|
|
6811
|
+
c = t.resizable;
|
|
6812
|
+
var y;
|
|
6813
|
+
return "index" in t ? y = r.buffers[a] : (y = u(s, c ? {
|
|
6814
|
+
maxByteLength: i
|
|
6815
|
+
} : void 0), r.buffers.push(y)), new e(y, n, o);
|
|
6856
6816
|
}
|
|
6857
6817
|
};
|
|
6858
6818
|
}(e);
|
|
6859
6819
|
});
|
|
6860
|
-
var
|
|
6820
|
+
var Q = {
|
|
6861
6821
|
undef: {
|
|
6862
6822
|
test: function test(e, t) {
|
|
6863
6823
|
return void 0 === e && (t.ownKeys || !("ownKeys" in t));
|
|
@@ -6866,29 +6826,29 @@
|
|
|
6866
6826
|
return 0;
|
|
6867
6827
|
},
|
|
6868
6828
|
revive: function revive() {
|
|
6869
|
-
return new
|
|
6829
|
+
return new Undefined();
|
|
6870
6830
|
}
|
|
6871
6831
|
}
|
|
6872
6832
|
},
|
|
6873
|
-
|
|
6833
|
+
G = {
|
|
6874
6834
|
userObject: {
|
|
6875
6835
|
test: function test(e) {
|
|
6876
6836
|
return isUserObject(e);
|
|
6877
6837
|
},
|
|
6878
6838
|
replace: function replace(e) {
|
|
6879
|
-
return _objectSpread2
|
|
6839
|
+
return _objectSpread2({}, e);
|
|
6880
6840
|
},
|
|
6881
6841
|
revive: function revive(e) {
|
|
6882
6842
|
return e;
|
|
6883
6843
|
}
|
|
6884
6844
|
}
|
|
6885
6845
|
},
|
|
6886
|
-
|
|
6846
|
+
H = [{
|
|
6887
6847
|
arrayNonindexKeys: {
|
|
6888
6848
|
testPlainObjects: true,
|
|
6889
6849
|
test: function test(e, t) {
|
|
6890
6850
|
return !!Array.isArray(e) && (Object.keys(e).some(function (e) {
|
|
6891
|
-
return String(Number
|
|
6851
|
+
return String(Number(e)) !== e;
|
|
6892
6852
|
}) && (t.iterateIn = "object", t.addLength = true), true);
|
|
6893
6853
|
},
|
|
6894
6854
|
replace: function replace(e, t) {
|
|
@@ -6897,10 +6857,10 @@
|
|
|
6897
6857
|
revive: function revive(e) {
|
|
6898
6858
|
if (Array.isArray(e)) return e;
|
|
6899
6859
|
var t = [];
|
|
6900
|
-
return Object.entries(e).forEach(function (
|
|
6901
|
-
var
|
|
6902
|
-
e =
|
|
6903
|
-
r =
|
|
6860
|
+
return Object.entries(e).forEach(function (_ref23) {
|
|
6861
|
+
var _ref24 = _slicedToArray(_ref23, 2),
|
|
6862
|
+
e = _ref24[0],
|
|
6863
|
+
r = _ref24[1];
|
|
6904
6864
|
t[e] = r;
|
|
6905
6865
|
}), t;
|
|
6906
6866
|
}
|
|
@@ -6916,21 +6876,21 @@
|
|
|
6916
6876
|
revive: function revive() {}
|
|
6917
6877
|
}
|
|
6918
6878
|
}],
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6879
|
+
X = [M, C, L, D],
|
|
6880
|
+
re = [G, Q, H, k, X, O, $, E, B, N, _, m, x, j].concat("function" == typeof Map ? U : [], "function" == typeof Set ? J : [], "function" == typeof ArrayBuffer ? p : [], "function" == typeof Uint8Array ? W : [], "function" == typeof DataView ? v : [], "undefined" != typeof crypto ? b : [], "undefined" != typeof BigInt ? [d, f] : [], "undefined" != typeof DOMException ? w : [], "undefined" != typeof DOMRect ? S : [], "undefined" != typeof DOMPoint ? A : [], "undefined" != typeof DOMQuad ? P : [], "undefined" != typeof DOMMatrix ? T : []),
|
|
6881
|
+
ne = re.concat({
|
|
6922
6882
|
checkDataCloneException: {
|
|
6923
6883
|
test: function test(e) {
|
|
6924
6884
|
var t = {}.toString.call(e).slice(8, -1);
|
|
6925
|
-
if (["symbol", "function"].includes(_typeof$
|
|
6885
|
+
if (["symbol", "function"].includes(_typeof$1(e)) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$1(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
|
|
6926
6886
|
return false;
|
|
6927
6887
|
}
|
|
6928
6888
|
}
|
|
6929
6889
|
});
|
|
6930
6890
|
|
|
6931
|
-
// See:
|
|
6891
|
+
// See: https://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
|
|
6932
6892
|
|
|
6933
|
-
var typeson = new
|
|
6893
|
+
var typeson = new Typeson().register(ne);
|
|
6934
6894
|
|
|
6935
6895
|
/**
|
|
6936
6896
|
* @param {(preset: import('typeson-registry').Preset) =>
|
|
@@ -6938,7 +6898,8 @@
|
|
|
6938
6898
|
* @returns {void}
|
|
6939
6899
|
*/
|
|
6940
6900
|
function register(func) {
|
|
6941
|
-
|
|
6901
|
+
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Should be one-time cache
|
|
6902
|
+
typeson = new Typeson().register(func(ne));
|
|
6942
6903
|
}
|
|
6943
6904
|
|
|
6944
6905
|
/**
|
|
@@ -7026,7 +6987,8 @@
|
|
|
7026
6987
|
|
|
7027
6988
|
/**
|
|
7028
6989
|
* IDB Index.
|
|
7029
|
-
* @see
|
|
6990
|
+
* @see https://www.w3.org/TR/IndexedDB/#idl-def-IDBIndex
|
|
6991
|
+
* @throws {TypeError}
|
|
7030
6992
|
* @class
|
|
7031
6993
|
*/
|
|
7032
6994
|
function IDBIndex() {
|
|
@@ -7080,67 +7042,69 @@
|
|
|
7080
7042
|
me.__unique = Boolean(optionalParams && optionalParams.unique);
|
|
7081
7043
|
me.__deleted = Boolean(indexProperties.__deleted);
|
|
7082
7044
|
me.__objectStore.__cursors = indexProperties.cursors || [];
|
|
7083
|
-
Object.
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
});
|
|
7092
|
-
Object.defineProperty(me, 'name', {
|
|
7093
|
-
enumerable: false,
|
|
7094
|
-
configurable: false,
|
|
7095
|
-
/**
|
|
7096
|
-
* @this {IDBIndexFull}
|
|
7097
|
-
* @returns {string}
|
|
7098
|
-
*/
|
|
7099
|
-
get: function get() {
|
|
7100
|
-
return this.__name;
|
|
7101
|
-
},
|
|
7102
|
-
/**
|
|
7103
|
-
* @param {string} newName
|
|
7104
|
-
* @this {IDBIndexFull}
|
|
7105
|
-
* @returns {void}
|
|
7106
|
-
*/
|
|
7107
|
-
set: function set(newName) {
|
|
7108
|
-
var me = this;
|
|
7109
|
-
newName = convertToDOMString(newName);
|
|
7110
|
-
var oldName = me.name;
|
|
7111
|
-
IDBTransaction.__assertVersionChange(me.objectStore.transaction);
|
|
7112
|
-
IDBTransaction.__assertActive(me.objectStore.transaction);
|
|
7113
|
-
IDBIndexAlias.__invalidStateIfDeleted(me);
|
|
7114
|
-
IDBObjectStore.__invalidStateIfDeleted(me);
|
|
7115
|
-
if (newName === oldName) {
|
|
7116
|
-
return;
|
|
7117
|
-
}
|
|
7118
|
-
if (me.objectStore.__indexes[newName] && !me.objectStore.__indexes[newName].__deleted && !me.objectStore.__indexes[newName].__pendingDelete) {
|
|
7119
|
-
throw createDOMException('ConstraintError', 'Index "' + newName + '" already exists on ' + me.objectStore.__currentName);
|
|
7045
|
+
Object.defineProperties(me, {
|
|
7046
|
+
__currentName: {
|
|
7047
|
+
/**
|
|
7048
|
+
* @this {IDBIndexFull}
|
|
7049
|
+
* @returns {string}
|
|
7050
|
+
*/
|
|
7051
|
+
get: function get() {
|
|
7052
|
+
return '__pendingName' in me ? (/** @type {string} */me.__pendingName) : me.name;
|
|
7120
7053
|
}
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7054
|
+
},
|
|
7055
|
+
name: {
|
|
7056
|
+
enumerable: false,
|
|
7057
|
+
configurable: false,
|
|
7058
|
+
/**
|
|
7059
|
+
* @this {IDBIndexFull}
|
|
7060
|
+
* @returns {string}
|
|
7061
|
+
*/
|
|
7062
|
+
get: function get() {
|
|
7063
|
+
return this.__name;
|
|
7064
|
+
},
|
|
7065
|
+
/**
|
|
7066
|
+
* @param {string} newName
|
|
7067
|
+
* @this {IDBIndexFull}
|
|
7068
|
+
* @returns {void}
|
|
7069
|
+
*/
|
|
7070
|
+
set: function set(newName) {
|
|
7071
|
+
var me = this;
|
|
7072
|
+
newName = convertToDOMString(newName);
|
|
7073
|
+
var oldName = me.name;
|
|
7074
|
+
IDBTransaction.__assertVersionChange(me.objectStore.transaction);
|
|
7075
|
+
IDBTransaction.__assertActive(me.objectStore.transaction);
|
|
7076
|
+
IDBIndexAlias.__invalidStateIfDeleted(me);
|
|
7077
|
+
IDBObjectStore.__invalidStateIfDeleted(me);
|
|
7078
|
+
if (newName === oldName) {
|
|
7079
|
+
return;
|
|
7080
|
+
}
|
|
7081
|
+
if (Object.hasOwn(me.objectStore.__indexes, newName) && !me.objectStore.__indexes[newName].__deleted && !me.objectStore.__indexes[newName].__pendingDelete) {
|
|
7082
|
+
throw createDOMException('ConstraintError', 'Index "' + newName + '" already exists on ' + me.objectStore.__currentName);
|
|
7083
|
+
}
|
|
7084
|
+
me.__name = newName;
|
|
7085
|
+
var objectStore = me.objectStore;
|
|
7086
|
+
delete objectStore.__indexes[oldName];
|
|
7087
|
+
objectStore.__indexes[newName] = me;
|
|
7088
|
+
objectStore.indexNames.splice(objectStore.indexNames.indexOf(oldName), 1, newName);
|
|
7089
|
+
var storeHandle = /** @type {import('./IDBTransaction.js').IDBTransactionFull} */objectStore.transaction.__storeHandles[objectStore.name];
|
|
7090
|
+
var oldIndexHandle = storeHandle.__indexHandles[oldName];
|
|
7091
|
+
oldIndexHandle.__name = newName; // Fix old references
|
|
7092
|
+
storeHandle.__indexHandles[newName] = oldIndexHandle; // Ensure new reference accessible
|
|
7093
|
+
me.__pendingName = oldName;
|
|
7094
|
+
var colInfoToPreserveArr = [['key', 'BLOB ' + (objectStore.autoIncrement ? 'UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT' : 'PRIMARY KEY')], ['value', 'BLOB']].concat(
|
|
7095
|
+
// @ts-expect-error Has numeric indexes instead of iterator
|
|
7096
|
+
_toConsumableArray(objectStore.indexNames).filter(function (indexName) {
|
|
7097
|
+
return indexName !== newName;
|
|
7098
|
+
}).map(function (indexName) {
|
|
7099
|
+
return [escapeIndexNameForSQL(indexName), 'BLOB'];
|
|
7100
|
+
}));
|
|
7101
|
+
me.__renameIndex(objectStore, oldName, newName, colInfoToPreserveArr, function (tx, success) {
|
|
7102
|
+
IDBIndexAlias.__updateIndexList(store, tx, function (store) {
|
|
7103
|
+
delete storeHandle.__pendingName;
|
|
7104
|
+
success(store);
|
|
7105
|
+
});
|
|
7142
7106
|
});
|
|
7143
|
-
}
|
|
7107
|
+
}
|
|
7144
7108
|
}
|
|
7145
7109
|
});
|
|
7146
7110
|
}
|
|
@@ -7255,7 +7219,7 @@
|
|
|
7255
7219
|
var indexKeyStr = /** @type {string} */
|
|
7256
7220
|
_encode(indexKey.value, index.multiEntry);
|
|
7257
7221
|
if (index.unique) {
|
|
7258
|
-
if (indexValues
|
|
7222
|
+
if (Object.hasOwn(indexValues, indexKeyStr)) {
|
|
7259
7223
|
indexValues = {};
|
|
7260
7224
|
failure(createDOMException('ConstraintError', 'Duplicate values already exist within the store'));
|
|
7261
7225
|
return;
|
|
@@ -7587,7 +7551,7 @@
|
|
|
7587
7551
|
var listColInfoToPreserve = colInfoToPreserve.length ? colInfoToPreserve.join(', ') + ', ' : '';
|
|
7588
7552
|
var listColsToPreserve = colNamesToPreserve.length ? colNamesToPreserve.join(', ') + ', ' : '';
|
|
7589
7553
|
|
|
7590
|
-
// We could adapt the approach at
|
|
7554
|
+
// We could adapt the approach at https://stackoverflow.com/a/8430746/271577
|
|
7591
7555
|
// to make the approach reusable without passing column names, but it is a bit fragile
|
|
7592
7556
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
7593
7557
|
store.transaction.__addNonRequestToTransactionQueue(function renameIndex(tx, args, success, error) {
|
|
@@ -7678,7 +7642,7 @@
|
|
|
7678
7642
|
});
|
|
7679
7643
|
}));
|
|
7680
7644
|
SyncPromise.all(indexCreations).then(finish, /** @type {(reason: any) => PromiseLike<never>} */
|
|
7681
|
-
error)
|
|
7645
|
+
error).catch(function (err) {
|
|
7682
7646
|
console.log('Index rename error');
|
|
7683
7647
|
throw err;
|
|
7684
7648
|
});
|
|
@@ -7693,6 +7657,7 @@
|
|
|
7693
7657
|
* @typedef {any} AnyValue
|
|
7694
7658
|
*/
|
|
7695
7659
|
|
|
7660
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
7696
7661
|
Object.defineProperty(IDBIndex, Symbol.hasInstance, {
|
|
7697
7662
|
/**
|
|
7698
7663
|
* @param {AnyValue} obj
|
|
@@ -7708,6 +7673,7 @@
|
|
|
7708
7673
|
Object.defineProperty(IDBIndex, 'prototype', {
|
|
7709
7674
|
writable: false
|
|
7710
7675
|
});
|
|
7676
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
7711
7677
|
|
|
7712
7678
|
/**
|
|
7713
7679
|
* @param {number|null} count
|
|
@@ -7884,8 +7850,9 @@
|
|
|
7884
7850
|
|
|
7885
7851
|
/**
|
|
7886
7852
|
* IndexedDB Object Store.
|
|
7887
|
-
* @see
|
|
7853
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStore
|
|
7888
7854
|
* @class
|
|
7855
|
+
* @throws {TypeError}
|
|
7889
7856
|
*/
|
|
7890
7857
|
function IDBObjectStore() {
|
|
7891
7858
|
throw new TypeError('Illegal constructor');
|
|
@@ -7950,84 +7917,87 @@
|
|
|
7950
7917
|
me.__indexNames = DOMStringList.__createInstance();
|
|
7951
7918
|
var indexList = storeProperties.indexList;
|
|
7952
7919
|
for (var indexName in indexList) {
|
|
7953
|
-
if (Object.hasOwn(indexList, indexName)) {
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7920
|
+
if (!Object.hasOwn(indexList, indexName)) {
|
|
7921
|
+
continue;
|
|
7922
|
+
}
|
|
7923
|
+
var index = IDBIndex.__createInstance(me, indexList[indexName]);
|
|
7924
|
+
me.__indexes[index.name] = index;
|
|
7925
|
+
if (!index.__deleted) {
|
|
7926
|
+
me.indexNames.push(index.name);
|
|
7959
7927
|
}
|
|
7960
7928
|
}
|
|
7961
7929
|
me.__oldIndexNames = me.indexNames.clone();
|
|
7962
|
-
Object.
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
});
|
|
7967
|
-
Object.defineProperty(this, 'name', {
|
|
7968
|
-
enumerable: false,
|
|
7969
|
-
configurable: false,
|
|
7970
|
-
/**
|
|
7971
|
-
* @this {IDBObjectStoreFull}
|
|
7972
|
-
* @returns {string}
|
|
7973
|
-
*/
|
|
7974
|
-
get: function get() {
|
|
7975
|
-
return this.__name;
|
|
7976
|
-
},
|
|
7977
|
-
/**
|
|
7978
|
-
* @param {string} name
|
|
7979
|
-
* @this {IDBObjectStoreFull}
|
|
7980
|
-
* @returns {void}
|
|
7981
|
-
*/
|
|
7982
|
-
set: function set(name) {
|
|
7983
|
-
var me = this;
|
|
7984
|
-
name = convertToDOMString(name);
|
|
7985
|
-
var oldName = me.name;
|
|
7986
|
-
IDBObjectStoreAlias.__invalidStateIfDeleted(me);
|
|
7987
|
-
IDBTransaction.__assertVersionChange(me.transaction);
|
|
7988
|
-
IDBTransaction.__assertActive(me.transaction);
|
|
7989
|
-
if (oldName === name) {
|
|
7990
|
-
return;
|
|
7991
|
-
}
|
|
7992
|
-
if (me.__idbdb.__objectStores[name] && !me.__idbdb.__objectStores[name].__pendingDelete) {
|
|
7993
|
-
throw createDOMException('ConstraintError', 'Object store "' + name + '" already exists in ' + me.__idbdb.name);
|
|
7994
|
-
}
|
|
7995
|
-
me.__name = name;
|
|
7996
|
-
var oldStore = me.__idbdb.__objectStores[oldName];
|
|
7997
|
-
oldStore.__name = name; // Fix old references
|
|
7998
|
-
me.__idbdb.__objectStores[name] = oldStore; // Ensure new reference accessible
|
|
7999
|
-
delete me.__idbdb.__objectStores[oldName]; // Ensure won't be found
|
|
8000
|
-
|
|
8001
|
-
me.__idbdb.objectStoreNames.splice(me.__idbdb.objectStoreNames.indexOf(oldName), 1, name);
|
|
8002
|
-
var oldHandle = /** @type {IDBObjectStoreFull} */
|
|
8003
|
-
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__storeHandles[oldName];
|
|
8004
|
-
oldHandle.__name = name; // Fix old references
|
|
8005
|
-
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8006
|
-
me.transaction.__storeHandles[name] = oldHandle; // Ensure new reference accessible
|
|
8007
|
-
|
|
8008
|
-
me.__pendingName = oldName;
|
|
8009
|
-
var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
|
|
8010
|
-
var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
|
|
8011
|
-
if (CFG.DEBUG) {
|
|
8012
|
-
console.log(sql, sqlValues);
|
|
7930
|
+
Object.defineProperties(this, {
|
|
7931
|
+
__currentName: {
|
|
7932
|
+
get: function get() {
|
|
7933
|
+
return '__pendingName' in this ? this.__pendingName : this.name;
|
|
8013
7934
|
}
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
7935
|
+
},
|
|
7936
|
+
name: {
|
|
7937
|
+
enumerable: false,
|
|
7938
|
+
configurable: false,
|
|
7939
|
+
/**
|
|
7940
|
+
* @this {IDBObjectStoreFull}
|
|
7941
|
+
* @returns {string}
|
|
7942
|
+
*/
|
|
7943
|
+
get: function get() {
|
|
7944
|
+
return this.__name;
|
|
7945
|
+
},
|
|
7946
|
+
/**
|
|
7947
|
+
* @param {string} name
|
|
7948
|
+
* @this {IDBObjectStoreFull}
|
|
7949
|
+
* @returns {void}
|
|
7950
|
+
*/
|
|
7951
|
+
set: function set(name) {
|
|
7952
|
+
var me = this;
|
|
7953
|
+
name = convertToDOMString(name);
|
|
7954
|
+
var oldName = me.name;
|
|
7955
|
+
IDBObjectStoreAlias.__invalidStateIfDeleted(me);
|
|
7956
|
+
IDBTransaction.__assertVersionChange(me.transaction);
|
|
7957
|
+
IDBTransaction.__assertActive(me.transaction);
|
|
7958
|
+
if (oldName === name) {
|
|
7959
|
+
return;
|
|
7960
|
+
}
|
|
7961
|
+
if (Object.hasOwn(me.__idbdb.__objectStores, name) && !me.__idbdb.__objectStores[name].__pendingDelete) {
|
|
7962
|
+
throw createDOMException('ConstraintError', 'Object store "' + name + '" already exists in ' + me.__idbdb.name);
|
|
7963
|
+
}
|
|
7964
|
+
me.__name = name;
|
|
7965
|
+
var oldStore = me.__idbdb.__objectStores[oldName];
|
|
7966
|
+
oldStore.__name = name; // Fix old references
|
|
7967
|
+
me.__idbdb.__objectStores[name] = oldStore; // Ensure new reference accessible
|
|
7968
|
+
delete me.__idbdb.__objectStores[oldName]; // Ensure won't be found
|
|
7969
|
+
|
|
7970
|
+
me.__idbdb.objectStoreNames.splice(me.__idbdb.objectStoreNames.indexOf(oldName), 1, name);
|
|
7971
|
+
var oldHandle = /** @type {IDBObjectStoreFull} */
|
|
7972
|
+
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__storeHandles[oldName];
|
|
7973
|
+
oldHandle.__name = name; // Fix old references
|
|
7974
|
+
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
7975
|
+
me.transaction.__storeHandles[name] = oldHandle; // Ensure new reference accessible
|
|
7976
|
+
|
|
7977
|
+
me.__pendingName = oldName;
|
|
7978
|
+
var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
|
|
7979
|
+
var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
|
|
7980
|
+
if (CFG.DEBUG) {
|
|
7981
|
+
console.log(sql, sqlValues);
|
|
7982
|
+
}
|
|
7983
|
+
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
7984
|
+
me.transaction.__addNonRequestToTransactionQueue(function objectStoreClear(tx, args, success, error) {
|
|
7985
|
+
tx.executeSql(sql, sqlValues, function (tx) {
|
|
7986
|
+
// This SQL preserves indexes per https://www.sqlite.org/lang_altertable.html
|
|
7987
|
+
var sql = 'ALTER TABLE ' + escapeStoreNameForSQL(oldName) + ' RENAME TO ' + escapeStoreNameForSQL(name);
|
|
7988
|
+
if (CFG.DEBUG) {
|
|
7989
|
+
console.log(sql);
|
|
7990
|
+
}
|
|
7991
|
+
tx.executeSql(sql, [], function () {
|
|
7992
|
+
delete me.__pendingName;
|
|
7993
|
+
success();
|
|
7994
|
+
});
|
|
7995
|
+
}, function (tx, err) {
|
|
7996
|
+
error(err);
|
|
7997
|
+
return false;
|
|
8025
7998
|
});
|
|
8026
|
-
}, function (tx, err) {
|
|
8027
|
-
error(err);
|
|
8028
|
-
return false;
|
|
8029
7999
|
});
|
|
8030
|
-
}
|
|
8000
|
+
}
|
|
8031
8001
|
}
|
|
8032
8002
|
});
|
|
8033
8003
|
}
|
|
@@ -8091,7 +8061,7 @@
|
|
|
8091
8061
|
var transaction = /** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8092
8062
|
db.__versionTransaction;
|
|
8093
8063
|
var storeHandles = transaction.__storeHandles;
|
|
8094
|
-
if (!storeHandles
|
|
8064
|
+
if (!Object.hasOwn(storeHandles, storeName) ||
|
|
8095
8065
|
// These latter conditions are to allow store
|
|
8096
8066
|
// recreation to create new clone object
|
|
8097
8067
|
storeHandles[storeName].__pendingDelete || storeHandles[storeName].__deleted) {
|
|
@@ -8414,7 +8384,7 @@
|
|
|
8414
8384
|
insertSqlValues.push(escapeSQLiteStatement(/** @type {string} */_encode(clonedKeyOrCurrentNumber)));
|
|
8415
8385
|
}
|
|
8416
8386
|
Object.entries(paramMap).forEach(function (_ref) {
|
|
8417
|
-
var _ref2 = _slicedToArray
|
|
8387
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
8418
8388
|
key = _ref2[0],
|
|
8419
8389
|
stmt = _ref2[1];
|
|
8420
8390
|
sqlStart.push(escapeIndexNameForSQL(key) + ',');
|
|
@@ -8437,8 +8407,7 @@
|
|
|
8437
8407
|
return false;
|
|
8438
8408
|
});
|
|
8439
8409
|
return undefined;
|
|
8440
|
-
|
|
8441
|
-
})["catch"](function (err) {
|
|
8410
|
+
}).catch(function (err) {
|
|
8442
8411
|
/**
|
|
8443
8412
|
* @returns {void}
|
|
8444
8413
|
*/
|
|
@@ -8478,7 +8447,7 @@
|
|
|
8478
8447
|
me.transaction.__assertWritable();
|
|
8479
8448
|
var request = /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__createRequest(me);
|
|
8480
8449
|
var _me$__validateKeyAndV = me.__validateKeyAndValueAndCloneValue(value, key, false),
|
|
8481
|
-
_me$__validateKeyAndV2 = _slicedToArray
|
|
8450
|
+
_me$__validateKeyAndV2 = _slicedToArray(_me$__validateKeyAndV, 2),
|
|
8482
8451
|
ky = _me$__validateKeyAndV2[0],
|
|
8483
8452
|
clonedValue = _me$__validateKeyAndV2[1];
|
|
8484
8453
|
IDBObjectStore.__storingRecordObjectStore(request, me, true, clonedValue, true, ky);
|
|
@@ -8508,7 +8477,7 @@
|
|
|
8508
8477
|
me.transaction.__assertWritable();
|
|
8509
8478
|
var request = /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__createRequest(me);
|
|
8510
8479
|
var _me$__validateKeyAndV3 = me.__validateKeyAndValueAndCloneValue(value, key, false),
|
|
8511
|
-
_me$__validateKeyAndV4 = _slicedToArray
|
|
8480
|
+
_me$__validateKeyAndV4 = _slicedToArray(_me$__validateKeyAndV3, 2),
|
|
8512
8481
|
ky = _me$__validateKeyAndV4[0],
|
|
8513
8482
|
clonedValue = _me$__validateKeyAndV4[1];
|
|
8514
8483
|
IDBObjectStore.__storingRecordObjectStore(request, me, true, clonedValue, false, ky);
|
|
@@ -8723,7 +8692,7 @@
|
|
|
8723
8692
|
* @this {IDBObjectStoreFull}
|
|
8724
8693
|
* @returns {import('./IDBRequest.js').IDBRequestFull}
|
|
8725
8694
|
*/
|
|
8726
|
-
IDBObjectStore.prototype
|
|
8695
|
+
IDBObjectStore.prototype.delete = function (query) {
|
|
8727
8696
|
var me = this;
|
|
8728
8697
|
if (!(this instanceof IDBObjectStore)) {
|
|
8729
8698
|
throw new TypeError('Illegal invocation');
|
|
@@ -8868,7 +8837,7 @@
|
|
|
8868
8837
|
if (!index || index.__deleted) {
|
|
8869
8838
|
throw createDOMException('NotFoundError', 'Index "' + indexName + '" does not exist on ' + me.__currentName);
|
|
8870
8839
|
}
|
|
8871
|
-
if (!me.__indexHandles
|
|
8840
|
+
if (!Object.hasOwn(me.__indexHandles, indexName) || me.__indexes[indexName].__pendingDelete || me.__indexes[indexName].__deleted) {
|
|
8872
8841
|
me.__indexHandles[indexName] = IDBIndex.__clone(index, me);
|
|
8873
8842
|
}
|
|
8874
8843
|
return me.__indexHandles[indexName];
|
|
@@ -8898,7 +8867,7 @@
|
|
|
8898
8867
|
IDBTransaction.__assertVersionChange(me.transaction);
|
|
8899
8868
|
IDBObjectStore.__invalidStateIfDeleted(me);
|
|
8900
8869
|
IDBTransaction.__assertActive(me.transaction);
|
|
8901
|
-
if (me.__indexes
|
|
8870
|
+
if (Object.hasOwn(me.__indexes, indexName) && !me.__indexes[indexName].__deleted && !me.__indexes[indexName].__pendingDelete) {
|
|
8902
8871
|
throw createDOMException('ConstraintError', 'Index "' + indexName + '" already exists on ' + me.__currentName);
|
|
8903
8872
|
}
|
|
8904
8873
|
keyPath = convertToSequenceDOMString(keyPath);
|
|
@@ -8908,7 +8877,7 @@
|
|
|
8908
8877
|
if (Array.isArray(keyPath) && optionalParameters && optionalParameters.multiEntry) {
|
|
8909
8878
|
throw createDOMException('InvalidAccessError', 'The keyPath argument was an array and the multiEntry option is true.');
|
|
8910
8879
|
}
|
|
8911
|
-
optionalParameters
|
|
8880
|
+
optionalParameters || (optionalParameters = {});
|
|
8912
8881
|
/** @type {import('./IDBIndex.js').IDBIndexProperties} */
|
|
8913
8882
|
var indexProperties = {
|
|
8914
8883
|
columnName: indexName,
|
|
@@ -8946,6 +8915,8 @@
|
|
|
8946
8915
|
}
|
|
8947
8916
|
IDBIndex.__deleteIndex(me, index);
|
|
8948
8917
|
};
|
|
8918
|
+
|
|
8919
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
8949
8920
|
defineReadonlyOuterInterface(IDBObjectStore.prototype, readonlyProperties$1);
|
|
8950
8921
|
defineOuterInterface(IDBObjectStore.prototype, ['name']);
|
|
8951
8922
|
IDBObjectStore.prototype[Symbol.toStringTag] = 'IDBObjectStorePrototype';
|
|
@@ -9180,8 +9151,9 @@
|
|
|
9180
9151
|
|
|
9181
9152
|
/**
|
|
9182
9153
|
* IDB Database Object.
|
|
9183
|
-
* @see
|
|
9154
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface
|
|
9184
9155
|
* @class
|
|
9156
|
+
* @throws {TypeError}
|
|
9185
9157
|
*/
|
|
9186
9158
|
function IDBDatabase() {
|
|
9187
9159
|
this.__versionTransaction = null;
|
|
@@ -9318,14 +9290,14 @@
|
|
|
9318
9290
|
IDBTransaction.__assertVersionChange(this.__versionTransaction); // this.__versionTransaction may not exist if called mistakenly by user in onsuccess
|
|
9319
9291
|
this.throwIfUpgradeTransactionNull();
|
|
9320
9292
|
IDBTransaction.__assertActive(this.__versionTransaction);
|
|
9321
|
-
createOptions = _objectSpread2
|
|
9293
|
+
createOptions = _objectSpread2({}, createOptions);
|
|
9322
9294
|
var _createOptions = createOptions,
|
|
9323
9295
|
keyPath = _createOptions.keyPath;
|
|
9324
9296
|
keyPath = keyPath === undefined ? null : convertToSequenceDOMString(keyPath);
|
|
9325
9297
|
if (keyPath !== null && !isValidKeyPath(keyPath)) {
|
|
9326
9298
|
throw createDOMException('SyntaxError', 'The keyPath argument contains an invalid key path.');
|
|
9327
9299
|
}
|
|
9328
|
-
if (this.__objectStores
|
|
9300
|
+
if (Object.hasOwn(this.__objectStores, storeName) && !this.__objectStores[storeName].__pendingDelete) {
|
|
9329
9301
|
throw createDOMException('ConstraintError', 'Object store "' + storeName + '" already exists in ' + this.name);
|
|
9330
9302
|
}
|
|
9331
9303
|
var autoInc = createOptions.autoIncrement;
|
|
@@ -9403,7 +9375,8 @@
|
|
|
9403
9375
|
? _toConsumableArray(new Set(
|
|
9404
9376
|
// to be unique
|
|
9405
9377
|
convertToSequenceDOMString(storeNames) // iterables have `ToString` applied (and we convert to array for convenience)
|
|
9406
|
-
|
|
9378
|
+
// eslint-disable-next-line unicorn/require-array-sort-compare -- IndexedDB requires code unit comparison (default behavior)
|
|
9379
|
+
)).toSorted() // must be sorted
|
|
9407
9380
|
: [convertToDOMString(storeNames)];
|
|
9408
9381
|
|
|
9409
9382
|
/* (function () {
|
|
@@ -9417,7 +9390,7 @@
|
|
|
9417
9390
|
// prioritizing readonly but not starving readwrite).
|
|
9418
9391
|
// Even for readonly transactions, due to [issue 17](https://github.com/nolanlawson/node-websql/issues/17),
|
|
9419
9392
|
// we're not currently actually running the SQL requests in parallel.
|
|
9420
|
-
mode
|
|
9393
|
+
mode || (mode = 'readonly');
|
|
9421
9394
|
IDBTransaction.__assertNotVersionChange(this.__versionTransaction);
|
|
9422
9395
|
if (this.__closePending) {
|
|
9423
9396
|
throw createDOMException('InvalidStateError', 'An attempt was made to start a new transaction on a database connection that is not open');
|
|
@@ -9476,13 +9449,14 @@
|
|
|
9476
9449
|
var evt = createEvent('close');
|
|
9477
9450
|
setTimeout(function () {
|
|
9478
9451
|
me.dispatchEvent(evt);
|
|
9479
|
-
});
|
|
9452
|
+
}, 0);
|
|
9480
9453
|
}
|
|
9481
9454
|
};
|
|
9482
9455
|
trans.__abortTransaction(createDOMException('AbortError', 'The connection was force-closed: ' + (msg || '')));
|
|
9483
9456
|
});
|
|
9484
9457
|
me.__transactions = [];
|
|
9485
9458
|
};
|
|
9459
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
9486
9460
|
defineOuterInterface(IDBDatabase.prototype, listeners);
|
|
9487
9461
|
defineReadonlyOuterInterface(IDBDatabase.prototype, readonlyProperties);
|
|
9488
9462
|
Object.defineProperty(IDBDatabase.prototype, 'constructor', {
|
|
@@ -9512,6 +9486,7 @@
|
|
|
9512
9486
|
* @returns {void}
|
|
9513
9487
|
*/
|
|
9514
9488
|
var setFS = function setFS(_fs) {
|
|
9489
|
+
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Necessary?
|
|
9515
9490
|
fs = _fs;
|
|
9516
9491
|
};
|
|
9517
9492
|
|
|
@@ -9519,8 +9494,7 @@
|
|
|
9519
9494
|
* @returns {string}
|
|
9520
9495
|
*/
|
|
9521
9496
|
var getOrigin = function getOrigin() {
|
|
9522
|
-
|
|
9523
|
-
return (typeof location === "undefined" ? "undefined" : _typeof$2(location)) !== 'object' || !location ? 'null' : location.origin;
|
|
9497
|
+
return (typeof location === "undefined" ? "undefined" : _typeof$1(location)) !== 'object' || !location ? 'null' : location.origin;
|
|
9524
9498
|
};
|
|
9525
9499
|
var hasNullOrigin = function hasNullOrigin() {
|
|
9526
9500
|
return CFG.checkOrigin !== false && getOrigin() === 'null';
|
|
@@ -9583,7 +9557,7 @@
|
|
|
9583
9557
|
var origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getOrigin();
|
|
9584
9558
|
var cb = arguments.length > 3 ? arguments[3] : undefined;
|
|
9585
9559
|
/* eslint-enable default-param-last -- Keep cb at end */
|
|
9586
|
-
if (!connectionQueue[origin]
|
|
9560
|
+
if (!Object.hasOwn(connectionQueue[origin], name)) {
|
|
9587
9561
|
connectionQueue[origin][name] = [];
|
|
9588
9562
|
}
|
|
9589
9563
|
connectionQueue[origin][name].push({
|
|
@@ -9638,7 +9612,7 @@
|
|
|
9638
9612
|
setTimeout(function () {
|
|
9639
9613
|
entry.dispatchEvent(e); // No need to catch errors
|
|
9640
9614
|
resolve(undefined);
|
|
9641
|
-
});
|
|
9615
|
+
}, 0);
|
|
9642
9616
|
});
|
|
9643
9617
|
});
|
|
9644
9618
|
}, SyncPromise.resolve(undefined)).then(function () {
|
|
@@ -9669,7 +9643,7 @@
|
|
|
9669
9643
|
} else {
|
|
9670
9644
|
resolve(undefined);
|
|
9671
9645
|
}
|
|
9672
|
-
});
|
|
9646
|
+
}, 0);
|
|
9673
9647
|
});
|
|
9674
9648
|
});
|
|
9675
9649
|
}
|
|
@@ -9726,7 +9700,7 @@
|
|
|
9726
9700
|
function cleanupDatabaseResources(__openDatabase, name, escapedDatabaseName, databaseDeleted, dbError) {
|
|
9727
9701
|
var useMemoryDatabase = typeof CFG.memoryDatabase === 'string';
|
|
9728
9702
|
if (useMemoryDatabase) {
|
|
9729
|
-
var latestSQLiteDBCached = websqlDBCache
|
|
9703
|
+
var latestSQLiteDBCached = Object.hasOwn(websqlDBCache, name) ? getLatestCachedWebSQLDB(name) : null;
|
|
9730
9704
|
if (!latestSQLiteDBCached) {
|
|
9731
9705
|
console.warn('Could not find a memory database instance to delete.');
|
|
9732
9706
|
databaseDeleted();
|
|
@@ -9824,6 +9798,7 @@
|
|
|
9824
9798
|
if (sysdb) {
|
|
9825
9799
|
success();
|
|
9826
9800
|
} else {
|
|
9801
|
+
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Necessary?
|
|
9827
9802
|
sysdb = __openDatabase(typeof CFG.memoryDatabase === 'string' ? CFG.memoryDatabase : path.join(typeof CFG.sysDatabaseBasePath === 'string' ? CFG.sysDatabaseBasePath : CFG.databaseBasePath || '', '__sysdb__' + (CFG.addSQLiteExtension !== false ? '.sqlite' : '')), '1', 'System Database', CFG.DEFAULT_DB_SIZE);
|
|
9828
9803
|
sysdb.transaction(function (systx) {
|
|
9829
9804
|
systx.executeSql('CREATE TABLE IF NOT EXISTS dbVersions (name BLOB, version INT);', [], function (systx) {
|
|
@@ -9840,6 +9815,7 @@
|
|
|
9840
9815
|
/**
|
|
9841
9816
|
* IDBFactory Class.
|
|
9842
9817
|
* @see https://w3c.github.io/IndexedDB/#idl-def-IDBFactory
|
|
9818
|
+
* @throws {TypeError}
|
|
9843
9819
|
* @class
|
|
9844
9820
|
*/
|
|
9845
9821
|
function IDBFactory() {
|
|
@@ -9908,6 +9884,7 @@
|
|
|
9908
9884
|
var req = IDBOpenDBRequest.__createInstance();
|
|
9909
9885
|
var calledDbCreateError = false;
|
|
9910
9886
|
if (CFG.autoName && name === '') {
|
|
9887
|
+
// eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- Necessary?
|
|
9911
9888
|
name = 'autoNamedDatabase_' + nameCounter++;
|
|
9912
9889
|
}
|
|
9913
9890
|
name = String(name); // cast to a string
|
|
@@ -9966,7 +9943,7 @@
|
|
|
9966
9943
|
req.__done = true;
|
|
9967
9944
|
}
|
|
9968
9945
|
var connection = IDBDatabase.__createInstance(db, name, oldVersion, version, data);
|
|
9969
|
-
if (!me.__connections
|
|
9946
|
+
if (!Object.hasOwn(me.__connections, name)) {
|
|
9970
9947
|
me.__connections[name] = [];
|
|
9971
9948
|
}
|
|
9972
9949
|
me.__connections[name].push(connection);
|
|
@@ -10061,7 +10038,7 @@
|
|
|
10061
10038
|
connection.__upgradeTransaction = null;
|
|
10062
10039
|
// We ensure any cache is deleted before any request error events fire and try to reopen
|
|
10063
10040
|
if (useDatabaseCache) {
|
|
10064
|
-
if (name
|
|
10041
|
+
if (Object.hasOwn(websqlDBCache, name)) {
|
|
10065
10042
|
delete websqlDBCache[name][version];
|
|
10066
10043
|
}
|
|
10067
10044
|
}
|
|
@@ -10086,7 +10063,7 @@
|
|
|
10086
10063
|
dbCreateError(err);
|
|
10087
10064
|
return false;
|
|
10088
10065
|
});
|
|
10089
|
-
});
|
|
10066
|
+
}, 0);
|
|
10090
10067
|
};
|
|
10091
10068
|
|
|
10092
10069
|
// eslint-disable-next-line camelcase -- Clear API
|
|
@@ -10139,7 +10116,7 @@
|
|
|
10139
10116
|
return false;
|
|
10140
10117
|
});
|
|
10141
10118
|
return undefined;
|
|
10142
|
-
})
|
|
10119
|
+
}).catch(function (err) {
|
|
10143
10120
|
console.log('Error within `triggerAnyVersionChangeAndBlockedEvents`');
|
|
10144
10121
|
throw err;
|
|
10145
10122
|
});
|
|
@@ -10159,12 +10136,12 @@
|
|
|
10159
10136
|
function openDB(oldVersion) {
|
|
10160
10137
|
/** @type {DatabaseFull} */
|
|
10161
10138
|
var db;
|
|
10162
|
-
if ((useMemoryDatabase || useDatabaseCache) && name
|
|
10139
|
+
if ((useMemoryDatabase || useDatabaseCache) && Object.hasOwn(websqlDBCache, name) && Object.hasOwn(websqlDBCache[name], version)) {
|
|
10163
10140
|
db = websqlDBCache[name][version];
|
|
10164
10141
|
} else {
|
|
10165
10142
|
db = me.__openDatabase(useMemoryDatabase ? CFG.memoryDatabase : path.join(CFG.databaseBasePath || '', escapedDatabaseName), '1', name, CFG.DEFAULT_DB_SIZE);
|
|
10166
10143
|
if (useDatabaseCache) {
|
|
10167
|
-
if (!(name
|
|
10144
|
+
if (!Object.hasOwn(websqlDBCache, name)) {
|
|
10168
10145
|
websqlDBCache[name] = {};
|
|
10169
10146
|
}
|
|
10170
10147
|
websqlDBCache[name][version] = db;
|
|
@@ -10178,7 +10155,7 @@
|
|
|
10178
10155
|
if (useDatabaseCache) {
|
|
10179
10156
|
setTimeout(function () {
|
|
10180
10157
|
dbCreateError(err);
|
|
10181
|
-
});
|
|
10158
|
+
}, 0);
|
|
10182
10159
|
} else {
|
|
10183
10160
|
dbCreateError(err);
|
|
10184
10161
|
}
|
|
@@ -10203,7 +10180,7 @@
|
|
|
10203
10180
|
addRequestToConnectionQueue(req, name, /* origin */undefined, function () {
|
|
10204
10181
|
var latestCachedVersion;
|
|
10205
10182
|
if (useDatabaseCache) {
|
|
10206
|
-
if (!(name
|
|
10183
|
+
if (!Object.hasOwn(websqlDBCache, name)) {
|
|
10207
10184
|
websqlDBCache[name] = {};
|
|
10208
10185
|
}
|
|
10209
10186
|
latestCachedVersion = getLatestCachedWebSQLVersion(name);
|
|
@@ -10323,7 +10300,7 @@
|
|
|
10323
10300
|
/** @type {DatabaseDeleted} */
|
|
10324
10301
|
function databaseDeleted() {
|
|
10325
10302
|
sysdbFinishedCbDelete(false, function () {
|
|
10326
|
-
if (useDatabaseCache && name
|
|
10303
|
+
if (useDatabaseCache && Object.hasOwn(websqlDBCache, name)) {
|
|
10327
10304
|
delete websqlDBCache[name]; // New calls will treat as though never existed
|
|
10328
10305
|
}
|
|
10329
10306
|
delete me.__connections[name];
|
|
@@ -10458,7 +10435,7 @@
|
|
|
10458
10435
|
* @todo forceClose: Test
|
|
10459
10436
|
* This is provided to facilitate unit-testing of the
|
|
10460
10437
|
* closing of a database connection with a forced flag:
|
|
10461
|
-
* <
|
|
10438
|
+
* <https://w3c.github.io/IndexedDB/#steps-for-closing-a-database-connection>
|
|
10462
10439
|
* @param {string} dbName
|
|
10463
10440
|
* @param {Integer} connIdx
|
|
10464
10441
|
* @param {string} msg
|
|
@@ -10482,12 +10459,13 @@
|
|
|
10482
10459
|
forceClose(connection);
|
|
10483
10460
|
});
|
|
10484
10461
|
});
|
|
10485
|
-
} else if (!me.__connections
|
|
10462
|
+
} else if (!Object.hasOwn(me.__connections, dbName)) {
|
|
10486
10463
|
console.log('No database connections with that name to force close');
|
|
10487
10464
|
} else if (isNullish(connIdx)) {
|
|
10488
10465
|
me.__connections[dbName].forEach(function (conn) {
|
|
10489
10466
|
forceClose(conn);
|
|
10490
10467
|
});
|
|
10468
|
+
// eslint-disable-next-line unicorn/prefer-number-is-safe-integer -- Ok
|
|
10491
10469
|
} else if (!Number.isInteger(connIdx) || connIdx < 0 || connIdx > me.__connections[dbName].length - 1) {
|
|
10492
10470
|
throw new TypeError('If providing an argument, __forceClose must be called with a ' + 'numeric index to indicate a specific connection to close');
|
|
10493
10471
|
} else {
|
|
@@ -10505,9 +10483,13 @@
|
|
|
10505
10483
|
connectionQueue[origin] = {};
|
|
10506
10484
|
};
|
|
10507
10485
|
IDBFactory.prototype[Symbol.toStringTag] = 'IDBFactoryPrototype';
|
|
10486
|
+
|
|
10487
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
10508
10488
|
Object.defineProperty(IDBFactory, 'prototype', {
|
|
10509
10489
|
writable: false
|
|
10510
10490
|
});
|
|
10491
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
10492
|
+
|
|
10511
10493
|
var shimIndexedDB = IDBFactory.__createInstance();
|
|
10512
10494
|
|
|
10513
10495
|
/**
|
|
@@ -10558,6 +10540,7 @@
|
|
|
10558
10540
|
|
|
10559
10541
|
/**
|
|
10560
10542
|
* @class
|
|
10543
|
+
* @throws {TypeError}
|
|
10561
10544
|
*/
|
|
10562
10545
|
function IDBCursor() {
|
|
10563
10546
|
throw new TypeError('Illegal constructor');
|
|
@@ -10567,7 +10550,7 @@
|
|
|
10567
10550
|
/* eslint-disable func-name-matching -- API */
|
|
10568
10551
|
/**
|
|
10569
10552
|
* The IndexedDB Cursor Object.
|
|
10570
|
-
* @see
|
|
10553
|
+
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBCursor
|
|
10571
10554
|
* @param {IDBKeyRange} query
|
|
10572
10555
|
* @param {string} direction
|
|
10573
10556
|
* @param {import('./IDBObjectStore.js').IDBObjectStoreFull} store
|
|
@@ -10627,7 +10610,7 @@
|
|
|
10627
10610
|
range.__upperCached = range.upper !== undefined && _encode(range.upper, this.__multiEntryIndex);
|
|
10628
10611
|
}
|
|
10629
10612
|
this.__gotValue = true;
|
|
10630
|
-
this
|
|
10613
|
+
this.continue();
|
|
10631
10614
|
};
|
|
10632
10615
|
|
|
10633
10616
|
/**
|
|
@@ -10656,21 +10639,16 @@
|
|
|
10656
10639
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
10657
10640
|
args[_key2] = arguments[_key2];
|
|
10658
10641
|
}
|
|
10642
|
+
var key = args[0],
|
|
10643
|
+
primaryKey = args[1],
|
|
10644
|
+
tx = args[2],
|
|
10645
|
+
success = args[3],
|
|
10646
|
+
error = args[4],
|
|
10647
|
+
recordsToLoad = args[5];
|
|
10659
10648
|
if (this.__multiEntryIndex) {
|
|
10660
|
-
|
|
10661
|
-
primaryKey = args[1],
|
|
10662
|
-
tx = args[2],
|
|
10663
|
-
success = args[3],
|
|
10664
|
-
error = args[4];
|
|
10665
|
-
this.__findMultiEntry(key, primaryKey, tx, success, error);
|
|
10649
|
+
this.__findMultiEntry(key, primaryKey, tx, success, error, recordsToLoad);
|
|
10666
10650
|
} else {
|
|
10667
|
-
|
|
10668
|
-
_primaryKey = args[1],
|
|
10669
|
-
_tx = args[2],
|
|
10670
|
-
_success = args[3],
|
|
10671
|
-
_error = args[4],
|
|
10672
|
-
recordsToLoad = args[5];
|
|
10673
|
-
this.__findBasic(_key3, _primaryKey, _tx, _success, _error, recordsToLoad);
|
|
10651
|
+
this.__findBasic(key, primaryKey, tx, success, error, recordsToLoad);
|
|
10674
10652
|
}
|
|
10675
10653
|
};
|
|
10676
10654
|
|
|
@@ -10699,7 +10677,7 @@
|
|
|
10699
10677
|
*/
|
|
10700
10678
|
IDBCursor.prototype.__findBasic = function (key, primaryKey, tx, success, error, recordsToLoad) {
|
|
10701
10679
|
var continueCall = recordsToLoad !== undefined;
|
|
10702
|
-
recordsToLoad
|
|
10680
|
+
recordsToLoad || (recordsToLoad = 1);
|
|
10703
10681
|
var me = this;
|
|
10704
10682
|
var quotedKeyColumnName = sqlQuote(me.__keyColumnName);
|
|
10705
10683
|
var quotedKey = sqlQuote('key');
|
|
@@ -10786,10 +10764,11 @@
|
|
|
10786
10764
|
* @param {SQLTransaction} tx
|
|
10787
10765
|
* @param {KeySuccess} success
|
|
10788
10766
|
* @param {FindError} error
|
|
10767
|
+
* @param {Integer|undefined} recordsToLoad
|
|
10789
10768
|
* @this {IDBCursorFull}
|
|
10790
10769
|
* @returns {void}
|
|
10791
10770
|
*/
|
|
10792
|
-
IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
|
|
10771
|
+
IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error, recordsToLoad) {
|
|
10793
10772
|
var me = this;
|
|
10794
10773
|
if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
|
|
10795
10774
|
if (CFG.DEBUG) {
|
|
@@ -10844,6 +10823,7 @@
|
|
|
10844
10823
|
// 4. Sort by object store position (if defined and not unique)
|
|
10845
10824
|
sql.push(',', sqlQuote(me.__valueColumnName), direction);
|
|
10846
10825
|
}
|
|
10826
|
+
sql.push('LIMIT', String(recordsToLoad));
|
|
10847
10827
|
}
|
|
10848
10828
|
var sqlStr = sql.join(' ');
|
|
10849
10829
|
if (CFG.DEBUG) {
|
|
@@ -10876,13 +10856,11 @@
|
|
|
10876
10856
|
/**
|
|
10877
10857
|
* @type {RowItemNonNull}
|
|
10878
10858
|
*/
|
|
10879
|
-
var clone = {
|
|
10859
|
+
var clone = _defineProperty(_defineProperty({
|
|
10880
10860
|
matchingKey: (/** @type {string} */
|
|
10881
10861
|
_encode(matchingKey, true)),
|
|
10882
10862
|
key: _rowItem.key
|
|
10883
|
-
};
|
|
10884
|
-
clone[me.__keyColumnName] = _rowItem[me.__keyColumnName];
|
|
10885
|
-
clone[me.__valueColumnName] = _rowItem[me.__valueColumnName];
|
|
10863
|
+
}, me.__keyColumnName, _rowItem[me.__keyColumnName]), me.__valueColumnName, _rowItem[me.__valueColumnName]);
|
|
10886
10864
|
rows.push(clone);
|
|
10887
10865
|
}
|
|
10888
10866
|
} catch (err) {
|
|
@@ -11023,7 +11001,7 @@
|
|
|
11023
11001
|
if (!me.__matchedKeys) {
|
|
11024
11002
|
me.__matchedKeys = {};
|
|
11025
11003
|
}
|
|
11026
|
-
if (me.__matchedKeys[rowItem.matchingKey]) {
|
|
11004
|
+
if (me.__matchedKeys[rowItem.matchingKey] === true) {
|
|
11027
11005
|
callback(undefined, undefined, undefined);
|
|
11028
11006
|
return;
|
|
11029
11007
|
}
|
|
@@ -11133,9 +11111,11 @@
|
|
|
11133
11111
|
triggerSuccess(k, val, primKey);
|
|
11134
11112
|
return;
|
|
11135
11113
|
}
|
|
11114
|
+
// @ts-expect-error Todo: Our bug to fix
|
|
11136
11115
|
cursorContinue(tx, args, success, error);
|
|
11137
11116
|
}
|
|
11138
11117
|
if (me.__unique && !me.__multiEntryIndex && encKey === _encode(me.key, me.__multiEntryIndex)) {
|
|
11118
|
+
// @ts-expect-error Todo: Our bug to fix
|
|
11139
11119
|
cursorContinue(tx, args, success, error);
|
|
11140
11120
|
return;
|
|
11141
11121
|
}
|
|
@@ -11149,8 +11129,8 @@
|
|
|
11149
11129
|
me.__find(key, primaryKey, tx, triggerSuccess, /** @type {FindError} */
|
|
11150
11130
|
function () {
|
|
11151
11131
|
me.__advanceCount = undefined;
|
|
11152
|
-
for (var _len3 = arguments.length, args = new Array(_len3),
|
|
11153
|
-
args[
|
|
11132
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
11133
|
+
args[_key3] = arguments[_key3];
|
|
11154
11134
|
}
|
|
11155
11135
|
var t = args[0],
|
|
11156
11136
|
err = args[1];
|
|
@@ -11163,7 +11143,7 @@
|
|
|
11163
11143
|
* @this {IDBCursorFull}
|
|
11164
11144
|
* @returns {void}
|
|
11165
11145
|
*/
|
|
11166
|
-
IDBCursor.prototype
|
|
11146
|
+
IDBCursor.prototype.continue = function /* key */
|
|
11167
11147
|
() {
|
|
11168
11148
|
// eslint-disable-next-line prefer-rest-params -- API
|
|
11169
11149
|
this.__continue(arguments[0]);
|
|
@@ -11273,12 +11253,13 @@
|
|
|
11273
11253
|
}
|
|
11274
11254
|
if (me.__store.keyPath !== null) {
|
|
11275
11255
|
var _me$__store$__validat = me.__store.__validateKeyAndValueAndCloneValue(valueToUpdate, undefined, true),
|
|
11276
|
-
_me$__store$__validat2 = _slicedToArray
|
|
11256
|
+
_me$__store$__validat2 = _slicedToArray(_me$__store$__validat, 2),
|
|
11277
11257
|
evaluatedKey = _me$__store$__validat2[0],
|
|
11278
11258
|
clonedValue = _me$__store$__validat2[1];
|
|
11279
11259
|
if (cmp(me.primaryKey, evaluatedKey) !== 0) {
|
|
11280
11260
|
throw createDOMException('DataError', 'The key of the supplied value to `update` is not equal to the cursor\'s effective key');
|
|
11281
11261
|
}
|
|
11262
|
+
// eslint-disable-next-line unicorn/prefer-hoisting-branch-code -- Different
|
|
11282
11263
|
addToQueue(clonedValue);
|
|
11283
11264
|
} else {
|
|
11284
11265
|
var _clonedValue = clone(valueToUpdate);
|
|
@@ -11291,7 +11272,7 @@
|
|
|
11291
11272
|
* @this {IDBCursorFull}
|
|
11292
11273
|
* @returns {IDBRequest}
|
|
11293
11274
|
*/
|
|
11294
|
-
IDBCursor.prototype
|
|
11275
|
+
IDBCursor.prototype.delete = function () {
|
|
11295
11276
|
var me = this;
|
|
11296
11277
|
IDBTransaction.__assertActive(me.__store.transaction);
|
|
11297
11278
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
@@ -11328,18 +11309,23 @@
|
|
|
11328
11309
|
}, undefined, me);
|
|
11329
11310
|
};
|
|
11330
11311
|
IDBCursor.prototype[Symbol.toStringTag] = 'IDBCursorPrototype';
|
|
11312
|
+
|
|
11313
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
11331
11314
|
defineReadonlyOuterInterface(IDBCursor.prototype, ['source', 'direction', 'key', 'primaryKey', 'request']);
|
|
11332
11315
|
Object.defineProperty(IDBCursor, 'prototype', {
|
|
11333
11316
|
writable: false
|
|
11334
11317
|
});
|
|
11318
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
11335
11319
|
|
|
11336
11320
|
/**
|
|
11337
11321
|
* @class
|
|
11322
|
+
* @throws {TypeError}
|
|
11338
11323
|
*/
|
|
11339
11324
|
function IDBCursorWithValue() {
|
|
11340
11325
|
throw new TypeError('Illegal constructor');
|
|
11341
11326
|
}
|
|
11342
11327
|
|
|
11328
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
11343
11329
|
// @ts-expect-error It's ok
|
|
11344
11330
|
IDBCursorWithValue.prototype = Object.create(IDBCursor.prototype);
|
|
11345
11331
|
Object.defineProperty(IDBCursorWithValue.prototype, 'constructor', {
|
|
@@ -11348,6 +11334,8 @@
|
|
|
11348
11334
|
configurable: true,
|
|
11349
11335
|
value: IDBCursorWithValue
|
|
11350
11336
|
});
|
|
11337
|
+
/* eslint-enable unicorn/no-top-level-side-effects -- Would be good */
|
|
11338
|
+
|
|
11351
11339
|
var IDBCursorWithValueAlias = IDBCursorWithValue;
|
|
11352
11340
|
/**
|
|
11353
11341
|
*
|
|
@@ -11355,8 +11343,8 @@
|
|
|
11355
11343
|
* @returns {IDBCursorWithValueFull}
|
|
11356
11344
|
*/
|
|
11357
11345
|
IDBCursorWithValue.__createInstance = function () {
|
|
11358
|
-
for (var _len4 = arguments.length, args = new Array(_len4),
|
|
11359
|
-
args[
|
|
11346
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
11347
|
+
args[_key4] = arguments[_key4];
|
|
11360
11348
|
}
|
|
11361
11349
|
/**
|
|
11362
11350
|
* @class
|
|
@@ -11380,6 +11368,8 @@
|
|
|
11380
11368
|
// @ts-expect-error It's ok
|
|
11381
11369
|
return new IDBCursorWithValue();
|
|
11382
11370
|
};
|
|
11371
|
+
|
|
11372
|
+
/* eslint-disable unicorn/no-top-level-side-effects -- Would be good */
|
|
11383
11373
|
defineReadonlyOuterInterface(IDBCursorWithValue.prototype, ['value']);
|
|
11384
11374
|
IDBCursorWithValue.prototype[Symbol.toStringTag] = 'IDBCursorWithValuePrototype';
|
|
11385
11375
|
Object.defineProperty(IDBCursorWithValue, 'prototype', {
|
|
@@ -11401,9 +11391,9 @@
|
|
|
11401
11391
|
|
|
11402
11392
|
/** @type {SetConfig} */
|
|
11403
11393
|
function setConfig(prop, val) {
|
|
11404
|
-
if (prop && _typeof$
|
|
11394
|
+
if (prop && _typeof$1(prop) === 'object') {
|
|
11405
11395
|
Object.entries(prop).forEach(function (_ref) {
|
|
11406
|
-
var _ref2 = _slicedToArray
|
|
11396
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
11407
11397
|
p = _ref2[0],
|
|
11408
11398
|
val = _ref2[1];
|
|
11409
11399
|
setConfig(/** @type {import('./CFG.js').KeyofConfigValues} */
|
|
@@ -11411,7 +11401,7 @@
|
|
|
11411
11401
|
});
|
|
11412
11402
|
return;
|
|
11413
11403
|
}
|
|
11414
|
-
if (!(prop
|
|
11404
|
+
if (!Object.hasOwn(CFG, prop)) {
|
|
11415
11405
|
throw new Error(prop + ' is not a valid configuration property');
|
|
11416
11406
|
}
|
|
11417
11407
|
// @ts-expect-error Should not be `never` here!
|
|
@@ -11601,7 +11591,7 @@
|
|
|
11601
11591
|
});
|
|
11602
11592
|
/** @type {[string, any][]} */
|
|
11603
11593
|
[['IDBFactory', shimIDBFactory], ['IDBDatabase', IDBDatabase], ['IDBObjectStore', IDBObjectStore], ['IDBIndex', IDBIndex], ['IDBTransaction', IDBTransaction], ['IDBCursor', IDBCursor], ['IDBCursorWithValue', IDBCursorWithValue], ['IDBKeyRange', IDBKeyRange], ['IDBRequest', IDBRequest], ['IDBOpenDBRequest', IDBOpenDBRequest], ['IDBVersionChangeEvent', IDBVersionChangeEvent]].forEach(function (_ref3) {
|
|
11604
|
-
var _ref4 = _slicedToArray
|
|
11594
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
11605
11595
|
prop = _ref4[0],
|
|
11606
11596
|
obj = _ref4[1];
|
|
11607
11597
|
shim(prop, obj, {
|
|
@@ -11614,7 +11604,7 @@
|
|
|
11614
11604
|
setFS(CFG.fs);
|
|
11615
11605
|
}
|
|
11616
11606
|
if (CFG.fullIDLSupport) {
|
|
11617
|
-
// Slow per MDN so off by default! Though apparently needed for WebIDL:
|
|
11607
|
+
// Slow per MDN so off by default! Though apparently needed for WebIDL: https://stackoverflow.com/questions/41927589/rationales-consequences-of-webidl-class-inheritance-requirements
|
|
11618
11608
|
|
|
11619
11609
|
Object.setPrototypeOf(IDB.IDBOpenDBRequest, IDB.IDBRequest);
|
|
11620
11610
|
Object.setPrototypeOf(IDB.IDBCursorWithValue, IDB.IDBCursor);
|
|
@@ -11651,7 +11641,7 @@
|
|
|
11651
11641
|
|
|
11652
11642
|
/** @type {GetConfig} */
|
|
11653
11643
|
IDB.shimIndexedDB.__getConfig = function (prop) {
|
|
11654
|
-
if (!(prop
|
|
11644
|
+
if (!Object.hasOwn(CFG, prop)) {
|
|
11655
11645
|
throw new Error(prop + ' is not a valid configuration property');
|
|
11656
11646
|
}
|
|
11657
11647
|
return CFG[prop];
|
|
@@ -11682,12 +11672,12 @@
|
|
|
11682
11672
|
// Workaround to prevent an error in Firefox
|
|
11683
11673
|
if (!('indexedDB' in IDB) && typeof window !== 'undefined') {
|
|
11684
11674
|
// 2nd condition avoids problems in Node
|
|
11685
|
-
IDB.indexedDB = /** @type {IDBFactory} */
|
|
11675
|
+
IDB.indexedDB || (IDB.indexedDB = /** @type {IDBFactory} */
|
|
11676
|
+
'webkitIndexedDB' in IDB && IDB.webkitIndexedDB || 'mozIndexedDB' in IDB && IDB.mozIndexedDB || 'oIndexedDB' in IDB && IDB.oIndexedDB || 'msIndexedDB' in IDB && IDB.msIndexedDB);
|
|
11686
11677
|
}
|
|
11687
11678
|
|
|
11688
11679
|
// Detect browsers with known IndexedDB issues (e.g. Android pre-4.4)
|
|
11689
|
-
var poorIndexedDbSupport =
|
|
11690
|
-
if (typeof navigator !== 'undefined' &&
|
|
11680
|
+
var poorIndexedDbSupport = typeof navigator !== 'undefined' &&
|
|
11691
11681
|
// Not apparently defined in React Native
|
|
11692
11682
|
navigator.userAgent && (
|
|
11693
11683
|
// Ignore Node or other environments
|
|
@@ -11695,15 +11685,11 @@
|
|
|
11695
11685
|
/Android (?:2|3|4\.[0-3])/.test(navigator.userAgent) && !navigator.userAgent.includes('Chrome') ||
|
|
11696
11686
|
// Bad non-Safari iOS9 support (see <https://github.com/axemclion/IndexedDBShim/issues/252>)
|
|
11697
11687
|
(!navigator.userAgent.includes('Safari') || navigator.userAgent.includes('Chrome')) &&
|
|
11698
|
-
// Exclude genuine Safari:
|
|
11699
|
-
// Detect iOS:
|
|
11700
|
-
// and detect version 9:
|
|
11701
|
-
/(iPad|iPhone|iPod)(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])* o[s\u017F] 9_/i.test(navigator.userAgent) && typeof window !== 'undefined' &&
|
|
11702
|
-
|
|
11703
|
-
!('MSStream' in window) // But avoid IE11
|
|
11704
|
-
)) {
|
|
11705
|
-
poorIndexedDbSupport = true;
|
|
11706
|
-
}
|
|
11688
|
+
// Exclude genuine Safari: https://stackoverflow.com/a/7768006/271577
|
|
11689
|
+
// Detect iOS: https://stackoverflow.com/questions/9038625/detect-if-device-is-ios/9039885#9039885
|
|
11690
|
+
// and detect version 9: https://stackoverflow.com/a/26363560/271577
|
|
11691
|
+
/(iPad|iPhone|iPod)(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])* o[s\u017F] 9_/i.test(navigator.userAgent) && typeof window !== 'undefined' && !('MSStream' in window) // But avoid IE11
|
|
11692
|
+
);
|
|
11707
11693
|
if (!CFG.DEFAULT_DB_SIZE) {
|
|
11708
11694
|
CFG.DEFAULT_DB_SIZE = (
|
|
11709
11695
|
// Safari currently requires larger size: (We don't need a larger size for Node as node-websql doesn't use this info)
|
|
@@ -11716,15 +11702,16 @@
|
|
|
11716
11702
|
if (!CFG.avoidAutoShim && (!IDB.indexedDB || poorIndexedDbSupport) && CFG.win.openDatabase !== undefined) {
|
|
11717
11703
|
IDB.shimIndexedDB.__useShim();
|
|
11718
11704
|
} else {
|
|
11705
|
+
/* eslint-disable unicorn/logical-assignment-operators -- TS */
|
|
11719
11706
|
IDB.IDBDatabase = IDB.IDBDatabase || 'webkitIDBDatabase' in IDB && IDB.webkitIDBDatabase;
|
|
11720
11707
|
IDB.IDBTransaction = IDB.IDBTransaction || 'webkitIDBTransaction' in IDB && IDB.webkitIDBTransaction || {};
|
|
11721
11708
|
IDB.IDBCursor = IDB.IDBCursor || 'webkitIDBCursor' in IDB && IDB.webkitIDBCursor;
|
|
11722
11709
|
IDB.IDBKeyRange = IDB.IDBKeyRange || 'webkitIDBKeyRange' in IDB && IDB.webkitIDBKeyRange;
|
|
11710
|
+
/* eslint-enable unicorn/logical-assignment-operators -- TS */
|
|
11723
11711
|
}
|
|
11724
11712
|
return /** @type {ShimmedObject} */IDB;
|
|
11725
11713
|
}
|
|
11726
11714
|
|
|
11727
|
-
/* eslint-env browser, worker */
|
|
11728
11715
|
CFG.win = typeof window !== 'undefined' ? window : self; // For Web Workers
|
|
11729
11716
|
// END: Same code as in browser.js
|
|
11730
11717
|
|