indexeddbshim 15.2.0 → 16.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.
Files changed (64) hide show
  1. package/badges/licenses-badge-dev.svg +1 -1
  2. package/badges/licenses-badge.svg +1 -1
  3. package/dist/DOMException.d.ts +2 -2
  4. package/dist/DOMException.d.ts.map +1 -1
  5. package/dist/DOMStringList.d.ts.map +1 -1
  6. package/dist/Event.d.ts +1 -1
  7. package/dist/Event.d.ts.map +1 -1
  8. package/dist/IDBCursor.d.ts +1 -1
  9. package/dist/IDBCursor.d.ts.map +1 -1
  10. package/dist/IDBDatabase.d.ts.map +1 -1
  11. package/dist/IDBFactory.d.ts +1 -1
  12. package/dist/IDBFactory.d.ts.map +1 -1
  13. package/dist/IDBIndex.d.ts +3 -3
  14. package/dist/IDBIndex.d.ts.map +1 -1
  15. package/dist/IDBKeyRange.d.ts +2 -2
  16. package/dist/IDBKeyRange.d.ts.map +1 -1
  17. package/dist/IDBObjectStore.d.ts +3 -3
  18. package/dist/IDBObjectStore.d.ts.map +1 -1
  19. package/dist/IDBTransaction.d.ts.map +1 -1
  20. package/dist/Key.d.ts +7 -7
  21. package/dist/Key.d.ts.map +1 -1
  22. package/dist/Sca.d.ts +1 -1
  23. package/dist/Sca.d.ts.map +1 -1
  24. package/dist/indexeddbshim-Key.js +11 -12
  25. package/dist/indexeddbshim-Key.js.map +1 -1
  26. package/dist/indexeddbshim-Key.min.js +2 -2
  27. package/dist/indexeddbshim-Key.min.js.map +1 -1
  28. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +794 -696
  29. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  30. package/dist/indexeddbshim-UnicodeIdentifiers.js +301 -489
  31. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  32. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +4 -2
  33. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  34. package/dist/indexeddbshim-node.cjs +794 -696
  35. package/dist/indexeddbshim-node.cjs.map +1 -1
  36. package/dist/indexeddbshim-noninvasive.js +301 -489
  37. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  38. package/dist/indexeddbshim-noninvasive.min.js +4 -2
  39. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  40. package/dist/indexeddbshim.js +301 -489
  41. package/dist/indexeddbshim.js.map +1 -1
  42. package/dist/indexeddbshim.min.js +4 -2
  43. package/dist/indexeddbshim.min.js.map +1 -1
  44. package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
  45. package/dist/node.d.ts.map +1 -1
  46. package/dist/setGlobalVars.d.ts +1 -1
  47. package/dist/setGlobalVars.d.ts.map +1 -1
  48. package/dist/unicode-regex.d.ts +2 -2
  49. package/dist/unicode-regex.d.ts.map +1 -1
  50. package/dist/util.d.ts +1 -1
  51. package/dist/util.d.ts.map +1 -1
  52. package/package.json +27 -27
  53. package/src/DOMException.js +0 -1
  54. package/src/DOMStringList.js +0 -1
  55. package/src/IDBCursor.js +1 -1
  56. package/src/IDBFactory.js +2 -3
  57. package/src/IDBIndex.js +1 -2
  58. package/src/IDBKeyRange.js +1 -0
  59. package/src/IDBObjectStore.js +0 -1
  60. package/src/IDBTransaction.js +0 -1
  61. package/src/Key.js +1 -1
  62. package/src/setGlobalVars.js +1 -1
  63. package/src/unicode-regex.js +12 -3
  64. package/src/util.js +1 -0
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v15.2.0 - 9/11/2024 */
1
+ /*! indexeddbshim - v16.0.0 - 6/14/2025 */
2
2
 
3
3
  'use strict';
4
4
 
@@ -1160,10 +1160,19 @@ val => {
1160
1160
  function getDefaultExportFromCjs$1(x) {
1161
1161
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1162
1162
  }
1163
- var regex = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
1164
- var regex$1 = /*@__PURE__*/getDefaultExportFromCjs$1(regex);
1163
+ var regex$1;
1164
+ var hasRequiredRegex;
1165
+ function requireRegex() {
1166
+ if (hasRequiredRegex) return regex$1;
1167
+ hasRequiredRegex = 1;
1168
+ 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]/;
1169
+ return regex$1;
1170
+ }
1171
+ var regexExports = requireRegex();
1172
+ var regex = /*@__PURE__*/getDefaultExportFromCjs$1(regexExports);
1165
1173
 
1166
1174
  /* eslint-disable new-cap -- ToString is how it is defined */
1175
+ /* eslint-disable sonarjs/no-control-regex -- Needed */
1167
1176
 
1168
1177
  /**
1169
1178
  * @typedef {number} Integer
@@ -1258,7 +1267,7 @@ function escapeDatabaseNameForSQLAndFiles(db) {
1258
1267
  db = 'D' + escapeNameForSQLiteIdentifier(db);
1259
1268
  if (CFG.escapeNFDForDatabaseNames !== false) {
1260
1269
  // ES6 copying of regex with different flags
1261
- db = db.replaceAll(new RegExp(regex$1, 'gu'), function (expandable) {
1270
+ db = db.replaceAll(new RegExp(regex, 'gu'), function (expandable) {
1262
1271
  return '^4' + /** @type {Integer} */expandable.codePointAt(0).toString(16).padStart(6, '0');
1263
1272
  });
1264
1273
  }
@@ -2082,7 +2091,6 @@ try {
2082
2091
  // Native DOMException works as expected
2083
2092
  useNativeDOMException = true;
2084
2093
  }
2085
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
2086
2094
  } catch (err) {}
2087
2095
  const createDOMException = useNativeDOMException
2088
2096
  // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
@@ -2689,7 +2697,7 @@ const signValues = ['negativeInfinity', 'bigNegative', 'smallNegative', 'smallPo
2689
2697
  * }
2690
2698
  * }}
2691
2699
  */
2692
- const types$1 = {
2700
+ const types = {
2693
2701
  invalid: {
2694
2702
  /**
2695
2703
  * @returns {string}
@@ -3191,7 +3199,7 @@ function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
3191
3199
  value: date.getTime()
3192
3200
  } : {
3193
3201
  type,
3194
- value: new Date(date.getTime())
3202
+ value: new Date(date)
3195
3203
  };
3196
3204
  }
3197
3205
  return {
@@ -3545,7 +3553,7 @@ function encode$1(key, inArray) {
3545
3553
  return null;
3546
3554
  }
3547
3555
  // array, date, number, string, binary (should already have detected "invalid")
3548
- return types$1[getKeyType(key)].encode(key, inArray);
3556
+ return types[getKeyType(key)].encode(key, inArray);
3549
3557
  }
3550
3558
 
3551
3559
  /**
@@ -3559,7 +3567,7 @@ function decode$1(key, inArray) {
3559
3567
  if (typeof key !== 'string') {
3560
3568
  return undefined;
3561
3569
  }
3562
- return types$1[encodedCharToKeyType[key.slice(0, 1)]].decode(key, inArray);
3570
+ return types[encodedCharToKeyType[key.slice(0, 1)]].decode(key, inArray);
3563
3571
  }
3564
3572
 
3565
3573
  /**
@@ -4011,7 +4019,6 @@ if (Object.defineProperty) {
4011
4019
  if (testObject.test) {
4012
4020
  cleanInterface = true;
4013
4021
  }
4014
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
4015
4022
  } catch (err) {
4016
4023
  // Object.defineProperty does not work as intended.
4017
4024
  }
@@ -4875,7 +4882,6 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
4875
4882
  }
4876
4883
  try {
4877
4884
  me.__tx.executeSql('ROLLBACK', [], abort, /** @type {SQLStatementErrorCallback} */abort); // Not working in some circumstances, even in Node
4878
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
4879
4885
  } catch (err) {
4880
4886
  // Browser errs when transaction has ended and since it most likely already erred here,
4881
4887
  // we call to abort
@@ -5002,7 +5008,7 @@ function ownKeys(e, t) {
5002
5008
  function _objectSpread2(e) {
5003
5009
  for (var t = 1; t < arguments.length; t++) {
5004
5010
  var r = null != arguments[t] ? arguments[t] : {};
5005
- t % 2 ? ownKeys(Object(r), !0).forEach(function (t) {
5011
+ t % 2 ? ownKeys(Object(r), true).forEach(function (t) {
5006
5012
  _defineProperty(e, t, r[t]);
5007
5013
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function (t) {
5008
5014
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
@@ -5024,18 +5030,18 @@ function _createClass(e, t, r) {
5024
5030
  return t && function _defineProperties(e, t) {
5025
5031
  for (var r = 0; r < t.length; r++) {
5026
5032
  var n = t[r];
5027
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
5033
+ n.enumerable = n.enumerable || false, n.configurable = true, "value" in n && (n.writable = true), Object.defineProperty(e, _toPropertyKey(n.key), n);
5028
5034
  }
5029
5035
  }(e.prototype, t), Object.defineProperty(e, "prototype", {
5030
- writable: !1
5036
+ writable: false
5031
5037
  }), e;
5032
5038
  }
5033
5039
  function _defineProperty(e, t, r) {
5034
5040
  return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
5035
5041
  value: r,
5036
- enumerable: !0,
5037
- configurable: !0,
5038
- writable: !0
5042
+ enumerable: true,
5043
+ configurable: true,
5044
+ writable: true
5039
5045
  }) : e[t] = r, e;
5040
5046
  }
5041
5047
  function _slicedToArray(e, t) {
@@ -5049,15 +5055,15 @@ function _slicedToArray(e, t) {
5049
5055
  o,
5050
5056
  i,
5051
5057
  c = [],
5052
- s = !0,
5053
- u = !1;
5058
+ s = true,
5059
+ u = false;
5054
5060
  try {
5055
5061
  if (o = (r = r.call(e)).next, 0 === t) {
5056
5062
  if (Object(r) !== r) return;
5057
5063
  s = !1;
5058
5064
  } else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5059
5065
  } catch (e) {
5060
- u = !0, a = e;
5066
+ u = true, a = e;
5061
5067
  } finally {
5062
5068
  try {
5063
5069
  if (!s && null != r.return && (i = r.return(), Object(i) !== i)) return;
@@ -5144,13 +5150,13 @@ e.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && Object.d
5144
5150
  var t = Object.hasOwn,
5145
5151
  r = Object.getPrototypeOf;
5146
5152
  function isThenable(e, t) {
5147
- return isObject(e) && "function" == typeof e.then && (!t);
5153
+ return isObject(e) && "function" == typeof e.then && (true || "function" == typeof e.catch);
5148
5154
  }
5149
5155
  function toStringTag(e) {
5150
5156
  return Object.prototype.toString.call(e).slice(8, -1);
5151
5157
  }
5152
5158
  function hasConstructorOf(e, n) {
5153
- if (!e || "object" !== _typeof(e)) return !1;
5159
+ if (!e || "object" !== _typeof(e)) return false;
5154
5160
  var a = r(e);
5155
5161
  if (!a) return null === n;
5156
5162
  var o = t(a, "constructor") && a.constructor;
@@ -5160,7 +5166,7 @@ function isPlainObject(e) {
5160
5166
  return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
5161
5167
  }
5162
5168
  function isUserObject(e) {
5163
- if (!e || "Object" !== toStringTag(e)) return !1;
5169
+ if (!e || "Object" !== toStringTag(e)) return false;
5164
5170
  var t = r(e);
5165
5171
  return !t || hasConstructorOf(e, Object) || isUserObject(t);
5166
5172
  }
@@ -5198,7 +5204,7 @@ function _await(e, t, r) {
5198
5204
  var n = Object.keys,
5199
5205
  a = Object.hasOwn,
5200
5206
  o = Array.isArray,
5201
- i$1 = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5207
+ i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5202
5208
  function _async(e) {
5203
5209
  return function () {
5204
5210
  for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
@@ -5224,7 +5230,7 @@ var c = function () {
5224
5230
  key: "stringify",
5225
5231
  value: function stringify(e, t, r, n) {
5226
5232
  n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
5227
- stringification: !0
5233
+ stringification: true
5228
5234
  });
5229
5235
  var a = this.encapsulate(e, null, n);
5230
5236
  return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
@@ -5235,63 +5241,63 @@ var c = function () {
5235
5241
  key: "stringifySync",
5236
5242
  value: function stringifySync(e, t, r, n) {
5237
5243
  return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
5238
- throwOnBadSyncType: !0
5244
+ throwOnBadSyncType: true
5239
5245
  }, n), {}, {
5240
- sync: !0
5246
+ sync: true
5241
5247
  }));
5242
5248
  }
5243
5249
  }, {
5244
5250
  key: "stringifyAsync",
5245
5251
  value: function stringifyAsync(e, t, r, n) {
5246
5252
  return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
5247
- throwOnBadSyncType: !0
5253
+ throwOnBadSyncType: true
5248
5254
  }, n), {}, {
5249
- sync: !1
5255
+ sync: false
5250
5256
  }));
5251
5257
  }
5252
5258
  }, {
5253
5259
  key: "parse",
5254
5260
  value: function parse(e, t, r) {
5255
5261
  return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
5256
- parse: !0
5262
+ parse: true
5257
5263
  }), this.revive(JSON.parse(e, t), r);
5258
5264
  }
5259
5265
  }, {
5260
5266
  key: "parseSync",
5261
5267
  value: function parseSync(e, t, r) {
5262
5268
  return this.parse(e, t, _objectSpread2(_objectSpread2({
5263
- throwOnBadSyncType: !0
5269
+ throwOnBadSyncType: true
5264
5270
  }, r), {}, {
5265
- sync: !0
5271
+ sync: true
5266
5272
  }));
5267
5273
  }
5268
5274
  }, {
5269
5275
  key: "parseAsync",
5270
5276
  value: function parseAsync(e, t, r) {
5271
5277
  return this.parse(e, t, _objectSpread2(_objectSpread2({
5272
- throwOnBadSyncType: !0
5278
+ throwOnBadSyncType: true
5273
5279
  }, r), {}, {
5274
- sync: !1
5280
+ sync: false
5275
5281
  }));
5276
5282
  }
5277
5283
  }, {
5278
5284
  key: "specialTypeNames",
5279
5285
  value: function specialTypeNames(e, t) {
5280
5286
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
5281
- return r.returnTypeNames = !0, this.encapsulate(e, t, r);
5287
+ return r.returnTypeNames = true, this.encapsulate(e, t, r);
5282
5288
  }
5283
5289
  }, {
5284
5290
  key: "rootTypeName",
5285
5291
  value: function rootTypeName(e, t) {
5286
5292
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
5287
- return r.iterateNone = !0, this.encapsulate(e, t, r);
5293
+ return r.iterateNone = true, this.encapsulate(e, t, r);
5288
5294
  }
5289
5295
  }, {
5290
5296
  key: "encapsulate",
5291
5297
  value: function encapsulate(t, r, c) {
5292
5298
  var s = this,
5293
5299
  u = _objectSpread2(_objectSpread2({
5294
- sync: !0
5300
+ sync: true
5295
5301
  }, this.options), c),
5296
5302
  l = u.sync,
5297
5303
  f = {},
@@ -5299,8 +5305,8 @@ var c = function () {
5299
5305
  p = [],
5300
5306
  d = [],
5301
5307
  v = !("cyclic" in u) || u.cyclic,
5302
- m = u.encapsulateObserver,
5303
- b = function finish(e) {
5308
+ b = u.encapsulateObserver,
5309
+ m = function finish(e) {
5304
5310
  var t = Object.values(f);
5305
5311
  if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
5306
5312
  if (t.length) {
@@ -5321,7 +5327,7 @@ var c = function () {
5321
5327
  };
5322
5328
  } else isObject(e) && a(e, "$types") && (e = {
5323
5329
  $: e,
5324
- $types: !0
5330
+ $types: true
5325
5331
  });
5326
5332
  return !u.returnTypeNames && e;
5327
5333
  },
@@ -5330,7 +5336,7 @@ var c = function () {
5330
5336
  return e[1].p;
5331
5337
  })), function (n) {
5332
5338
  return _await(Promise.all(n.map(_async(function (n) {
5333
- var a = !1,
5339
+ var a = false,
5334
5340
  o = [],
5335
5341
  i = _slicedToArray(r.splice(0, 1), 1),
5336
5342
  c = _slicedToArray(i[0], 7),
@@ -5340,7 +5346,7 @@ var c = function () {
5340
5346
  f = c[4],
5341
5347
  y = c[5],
5342
5348
  p = c[6],
5343
- d = O(s, n, u, l, o, !0, p),
5349
+ d = O(s, n, u, l, o, true, p),
5344
5350
  v = hasConstructorOf(d, e);
5345
5351
  return function _invoke(e, t) {
5346
5352
  var r = e();
@@ -5349,7 +5355,7 @@ var c = function () {
5349
5355
  if (s && v) return _await(d.p, function (e) {
5350
5356
  f[y] = e;
5351
5357
  var r = h(t, o);
5352
- return a = !0, r;
5358
+ return a = true, r;
5353
5359
  });
5354
5360
  }, function (e) {
5355
5361
  return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
@@ -5361,22 +5367,22 @@ var c = function () {
5361
5367
  }),
5362
5368
  g = function _adaptBuiltinStateObjectProperties(e, t, r) {
5363
5369
  Object.assign(e, t);
5364
- var n = i$1.map(function (t) {
5370
+ var n = i.map(function (t) {
5365
5371
  var r = e[t];
5366
5372
  return delete e[t], r;
5367
5373
  });
5368
- r(), i$1.forEach(function (t, r) {
5374
+ r(), i.forEach(function (t, r) {
5369
5375
  e[t] = n[r];
5370
5376
  });
5371
5377
  },
5372
5378
  O = function _encapsulate(t, r, i, c, l, d, v) {
5373
- var b,
5379
+ var m,
5374
5380
  h = {},
5375
5381
  O = _typeof(r),
5376
- _ = m ? function (n) {
5382
+ _ = b ? function (n) {
5377
5383
  var a,
5378
5384
  o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
5379
- m(Object.assign(null != n ? n : h, {
5385
+ b(Object.assign(null != n ? n : h, {
5380
5386
  keypath: t,
5381
5387
  value: r,
5382
5388
  cyclic: i,
@@ -5388,30 +5394,30 @@ var c = function () {
5388
5394
  type: o
5389
5395
  }));
5390
5396
  } : null;
5391
- if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (b = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (h = {
5392
- replaced: b
5393
- }) : b = r, _ && _(), b;
5397
+ 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 = {
5398
+ replaced: m
5399
+ }) : m = r, _ && _(), m;
5394
5400
  if (null === r) return _ && _(), r;
5395
5401
  if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
5396
5402
  var A = y.indexOf(r);
5397
5403
  if (!(A < 0)) return f[t] = "#", _ && _({
5398
5404
  cyclicKeypath: p[A]
5399
5405
  }), "#" + p[A];
5400
- !0 === i && (y.push(r), p.push(t));
5406
+ true === i && (y.push(r), p.push(t));
5401
5407
  }
5402
5408
  var S,
5403
5409
  j,
5404
5410
  T = isPlainObject(r),
5405
5411
  I = o(r),
5406
5412
  N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
5407
- if (N !== r ? (b = N, h = {
5413
+ if (N !== r ? (m = N, h = {
5408
5414
  replaced: N
5409
- }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), b = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
5415
+ }) : "" === 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 = {
5410
5416
  clone: S
5411
- }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? b = r : (S = {}, c.addLength && (S.length = r.length), h = {
5417
+ }) : (["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 = {
5412
5418
  clone: S
5413
- }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
5414
- if (!S) return b;
5419
+ }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
5420
+ if (!S) return m;
5415
5421
  if (c.iterateIn) {
5416
5422
  var P = function _loop(n) {
5417
5423
  var o = {
@@ -5425,27 +5431,27 @@ var c = function () {
5425
5431
  };
5426
5432
  for (var x in r) P(x);
5427
5433
  _ && _({
5428
- endIterateIn: !0,
5429
- end: !0
5434
+ endIterateIn: true,
5435
+ end: true
5430
5436
  });
5431
5437
  } else n(r).forEach(function (n) {
5432
5438
  var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
5433
5439
  g(c, {
5434
- ownKeys: !0
5440
+ ownKeys: true
5435
5441
  }, function () {
5436
5442
  var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
5437
5443
  hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
5438
5444
  });
5439
5445
  }), _ && _({
5440
- endIterateOwn: !0,
5441
- end: !0
5446
+ endIterateOwn: true,
5447
+ end: true
5442
5448
  });
5443
5449
  if (c.iterateUnsetNumeric) {
5444
5450
  for (var E = r.length, C = function _loop2(n) {
5445
5451
  if (!(n in r)) {
5446
5452
  var a = "".concat(t).concat(t ? "." : "").concat(n);
5447
5453
  g(c, {
5448
- ownKeys: !1
5454
+ ownKeys: false
5449
5455
  }, function () {
5450
5456
  var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
5451
5457
  hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
@@ -5453,8 +5459,8 @@ var c = function () {
5453
5459
  }
5454
5460
  }, B = 0; B < E; B++) C(B);
5455
5461
  _ && _({
5456
- endIterateUnsetNumeric: !0,
5457
- end: !0
5462
+ endIterateUnsetNumeric: true,
5463
+ end: true
5458
5464
  });
5459
5465
  }
5460
5466
  return S;
@@ -5470,19 +5476,19 @@ var c = function () {
5470
5476
  }
5471
5477
  if (Object.assign(r, {
5472
5478
  type: p,
5473
- replaced: !0
5479
+ replaced: true
5474
5480
  }), (l || !y.replaceAsync) && !y.replace) return i && i({
5475
- typeDetected: !0
5481
+ typeDetected: true
5476
5482
  }), O(e, t, v && "readonly", r, n, o, p);
5477
5483
  i && i({
5478
- replacing: !0
5484
+ replacing: true
5479
5485
  });
5480
- var m = void 0;
5486
+ var b = void 0;
5481
5487
  if (l || !y.replaceAsync) {
5482
5488
  if (void 0 === y.replace) throw new TypeError("Missing replacer");
5483
- m = y.replace(t, r);
5484
- } else m = y.replaceAsync(t, r);
5485
- return O(e, m, v && "readonly", r, n, o, p);
5489
+ b = y.replace(t, r);
5490
+ } else b = y.replaceAsync(t, r);
5491
+ return O(e, b, v && "readonly", r, n, o, p);
5486
5492
  }
5487
5493
  }
5488
5494
  return t;
@@ -5490,26 +5496,26 @@ var c = function () {
5490
5496
  _ = O("", t, v, null != r ? r : {}, d);
5491
5497
  if (d.length) return l && u.throwOnBadSyncType ? function () {
5492
5498
  throw new TypeError("Sync method requested but async result obtained");
5493
- }() : Promise.resolve(h(_, d)).then(b);
5499
+ }() : Promise.resolve(h(_, d)).then(m);
5494
5500
  if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
5495
- return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
5501
+ return u.stringification && l ? [m(_)] : l ? m(_) : Promise.resolve(m(_));
5496
5502
  }
5497
5503
  }, {
5498
5504
  key: "encapsulateSync",
5499
5505
  value: function encapsulateSync(e, t, r) {
5500
5506
  return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
5501
- throwOnBadSyncType: !0
5507
+ throwOnBadSyncType: true
5502
5508
  }, r), {}, {
5503
- sync: !0
5509
+ sync: true
5504
5510
  }));
5505
5511
  }
5506
5512
  }, {
5507
5513
  key: "encapsulateAsync",
5508
5514
  value: function encapsulateAsync(e, t, r) {
5509
5515
  return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
5510
- throwOnBadSyncType: !0
5516
+ throwOnBadSyncType: true
5511
5517
  }, r), {}, {
5512
- sync: !1
5518
+ sync: false
5513
5519
  }));
5514
5520
  }
5515
5521
  }, {
@@ -5517,7 +5523,7 @@ var c = function () {
5517
5523
  value: function revive(t, r) {
5518
5524
  var a = this,
5519
5525
  i = _objectSpread2(_objectSpread2({
5520
- sync: !0
5526
+ sync: true
5521
5527
  }, this.options), r),
5522
5528
  c = i.sync;
5523
5529
  function finishRevival(e) {
@@ -5527,12 +5533,12 @@ var c = function () {
5527
5533
  }
5528
5534
  if (!t || "object" !== _typeof(t) || Array.isArray(t)) return finishRevival(t);
5529
5535
  var u = t.$types;
5530
- if (!0 === u) return finishRevival(t.$);
5536
+ if (true === u) return finishRevival(t.$);
5531
5537
  if (!u || "object" !== _typeof(u) || Array.isArray(u)) return finishRevival(t);
5532
5538
  var l = [],
5533
5539
  f = {},
5534
- y = !0;
5535
- u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
5540
+ y = true;
5541
+ u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = false);
5536
5542
  var p = function executeReviver(e, t) {
5537
5543
  var r,
5538
5544
  n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
@@ -5547,7 +5553,7 @@ var c = function () {
5547
5553
  return hasConstructorOf(e, s) ? void 0 : e;
5548
5554
  }
5549
5555
  var v,
5550
- m = function revivePlainObjects() {
5556
+ b = function revivePlainObjects() {
5551
5557
  var r = [];
5552
5558
  if (!u) throw new Error("Found bad `types`");
5553
5559
  if (Object.entries(u).forEach(function (e) {
@@ -5579,28 +5585,28 @@ var c = function () {
5579
5585
  c === i && (t = c);
5580
5586
  }, void 0);
5581
5587
  }();
5582
- return hasConstructorOf(m, e) ? v = m.then(function () {
5588
+ return hasConstructorOf(b, e) ? v = b.then(function () {
5583
5589
  return t;
5584
5590
  }) : (v = function _revive(t, r, a, i, c) {
5585
5591
  if (!y || "$types" !== t) {
5586
5592
  var f = u[t],
5587
5593
  v = o(r);
5588
5594
  if (v || isPlainObject(r)) {
5589
- var m = v ? new Array(r.length) : {};
5595
+ var b = v ? new Array(r.length) : {};
5590
5596
  for (n(r).forEach(function (n) {
5591
- var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : m, m, n),
5597
+ var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : b, b, n),
5592
5598
  i = function set(e) {
5593
- return hasConstructorOf(e, s) ? m[n] = void 0 : void 0 !== e && (m[n] = e), e;
5599
+ return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
5594
5600
  };
5595
5601
  hasConstructorOf(o, e) ? d.push(o.then(function (e) {
5596
5602
  return i(e);
5597
5603
  })) : i(o);
5598
- }), r = m; l.length;) {
5599
- var b = _slicedToArray(l[0], 4),
5600
- h = b[0],
5601
- g = b[1],
5602
- O = b[2],
5603
- w = b[3],
5604
+ }), r = b; l.length;) {
5605
+ var m = _slicedToArray(l[0], 4),
5606
+ h = m[0],
5607
+ g = m[1],
5608
+ O = m[2],
5609
+ w = m[3],
5604
5610
  _ = getByKeyPath(h, g);
5605
5611
  if (void 0 === _) break;
5606
5612
  O[w] = _, l.splice(0, 1);
@@ -5633,18 +5639,18 @@ var c = function () {
5633
5639
  key: "reviveSync",
5634
5640
  value: function reviveSync(e, t) {
5635
5641
  return this.revive(e, _objectSpread2(_objectSpread2({
5636
- throwOnBadSyncType: !0
5642
+ throwOnBadSyncType: true
5637
5643
  }, t), {}, {
5638
- sync: !0
5644
+ sync: true
5639
5645
  }));
5640
5646
  }
5641
5647
  }, {
5642
5648
  key: "reviveAsync",
5643
5649
  value: function reviveAsync(e, t) {
5644
5650
  return this.revive(e, _objectSpread2(_objectSpread2({
5645
- throwOnBadSyncType: !0
5651
+ throwOnBadSyncType: true
5646
5652
  }, t), {}, {
5647
- sync: !1
5653
+ sync: false
5648
5654
  }));
5649
5655
  }
5650
5656
  }, {
@@ -5741,26 +5747,27 @@ const v = {
5741
5747
  index: r
5742
5748
  } : (t.buffers.push(e), {
5743
5749
  s: p(e),
5744
- maxByteLength: e.maxByteLength
5750
+ maxByteLength: e.maxByteLength,
5751
+ resizable: e.resizable
5745
5752
  });
5746
5753
  },
5747
5754
  revive(e, t) {
5748
5755
  if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
5749
- const r = d(e.s, {
5756
+ const r = d(e.s, e.resizable ? {
5750
5757
  maxByteLength: e.maxByteLength
5751
- });
5758
+ } : void 0);
5752
5759
  return t.buffers.push(r), r;
5753
5760
  }
5754
5761
  }
5755
5762
  },
5756
- m = {
5763
+ b = {
5757
5764
  bigintObject: {
5758
5765
  test: e => "object" == typeof e && hasConstructorOf(e, BigInt),
5759
5766
  replace: String,
5760
5767
  revive: e => new Object(BigInt(e))
5761
5768
  }
5762
5769
  },
5763
- b = {
5770
+ m = {
5764
5771
  bigint: {
5765
5772
  test: e => "bigint" == typeof e,
5766
5773
  replace: String,
@@ -5780,7 +5787,7 @@ const h = {
5780
5787
  test: e => "Blob" === toStringTag(e),
5781
5788
  replace(e) {
5782
5789
  const t = new XMLHttpRequest();
5783
- if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), !1), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad Blob access: " + t.status);
5790
+ if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), false), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad Blob access: " + t.status);
5784
5791
  return {
5785
5792
  type: e.type,
5786
5793
  stringContents: t.responseText
@@ -5830,7 +5837,7 @@ const w = {
5830
5837
  algorithm: r,
5831
5838
  usages: n
5832
5839
  } = e;
5833
- return crypto.subtle.importKey("jwk", t, r, !0, n);
5840
+ return crypto.subtle.importKey("jwk", t, r, true, n);
5834
5841
  }
5835
5842
  }
5836
5843
  },
@@ -5851,6 +5858,7 @@ const w = {
5851
5858
  } : (n.buffers.push(e), {
5852
5859
  encoded: p(e),
5853
5860
  maxByteLength: e.maxByteLength,
5861
+ resizable: e.resizable,
5854
5862
  byteOffset: t,
5855
5863
  byteLength: r
5856
5864
  });
@@ -5862,12 +5870,13 @@ const w = {
5862
5870
  byteLength: n,
5863
5871
  encoded: a,
5864
5872
  index: o,
5865
- maxByteLength: i
5873
+ maxByteLength: i,
5874
+ resizable: c
5866
5875
  } = e;
5867
- let c;
5868
- return "index" in e ? c = t.buffers[o] : (c = d(a, void 0 === i ? i : {
5876
+ let s;
5877
+ return "index" in e ? s = t.buffers[o] : (s = d(a, c ? {
5869
5878
  maxByteLength: i
5870
- }), t.buffers.push(c)), new DataView(c, r, n);
5879
+ } : i), t.buffers.push(s)), new DataView(s, r, n);
5871
5880
  }
5872
5881
  }
5873
5882
  },
@@ -6043,7 +6052,7 @@ const E = {
6043
6052
  test: e => "File" === toStringTag(e),
6044
6053
  replace(e) {
6045
6054
  const t = new XMLHttpRequest();
6046
- if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), !1), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad File access: " + t.status);
6055
+ if (t.overrideMimeType("text/plain; charset=x-user-defined"), t.open("GET", URL.createObjectURL(e), false), t.send(), 200 !== t.status && 0 !== t.status) throw new Error("Bad File access: " + t.status);
6047
6056
  return {
6048
6057
  type: e.type,
6049
6058
  stringContents: t.responseText,
@@ -6181,7 +6190,7 @@ const E = {
6181
6190
  revive: () => -0
6182
6191
  }
6183
6192
  },
6184
- V = {
6193
+ J = {
6185
6194
  StringObject: {
6186
6195
  test: e => "String" === toStringTag(e) && "object" == typeof e,
6187
6196
  replace: String,
@@ -6198,7 +6207,7 @@ const E = {
6198
6207
  revive: e => new Number(e)
6199
6208
  }
6200
6209
  },
6201
- Y = {
6210
+ q = {
6202
6211
  regexp: {
6203
6212
  test: e => "RegExp" === toStringTag(e),
6204
6213
  replace: e => ({
@@ -6211,7 +6220,7 @@ const E = {
6211
6220
  }) => new RegExp(e, t)
6212
6221
  }
6213
6222
  },
6214
- H = {
6223
+ G = {
6215
6224
  set: {
6216
6225
  test: e => "Set" === toStringTag(e),
6217
6226
  replace: e => [...e.values()],
@@ -6245,6 +6254,7 @@ const X = {};
6245
6254
  length: r
6246
6255
  } : (n.buffers.push(e), {
6247
6256
  maxByteLength: e.maxByteLength,
6257
+ resizable: e.resizable,
6248
6258
  encoded: p(e),
6249
6259
  byteOffset: t,
6250
6260
  length: r
@@ -6257,12 +6267,13 @@ const X = {};
6257
6267
  length: a,
6258
6268
  encoded: o,
6259
6269
  index: i,
6260
- maxByteLength: c
6270
+ maxByteLength: c,
6271
+ resizable: s
6261
6272
  } = t;
6262
- let s;
6263
- return "index" in t ? s = r.buffers[i] : (s = d(o, void 0 === c ? void 0 : {
6273
+ let u;
6274
+ return "index" in t ? u = r.buffers[i] : (u = d(o, s ? {
6264
6275
  maxByteLength: c
6265
- }), r.buffers.push(s)), new e(s, n, a);
6276
+ } : void 0), r.buffers.push(u)), new e(u, n, a);
6266
6277
  }
6267
6278
  };
6268
6279
  }(e));
@@ -6284,9 +6295,9 @@ const Z = {
6284
6295
  },
6285
6296
  te = [{
6286
6297
  arrayNonindexKeys: {
6287
- testPlainObjects: !0,
6288
- test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = !0), !0),
6289
- replace: (e, t) => (t.iterateUnsetNumeric = !0, e),
6298
+ testPlainObjects: true,
6299
+ test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = true), true),
6300
+ replace: (e, t) => (t.iterateUnsetNumeric = true, e),
6290
6301
  revive(e) {
6291
6302
  if (Array.isArray(e)) return e;
6292
6303
  const t = [];
@@ -6297,19 +6308,19 @@ const Z = {
6297
6308
  }
6298
6309
  }, {
6299
6310
  sparseUndefined: {
6300
- test: (e, t) => void 0 === e && !1 === t.ownKeys,
6311
+ test: (e, t) => void 0 === e && false === t.ownKeys,
6301
6312
  replace: () => 0,
6302
6313
  revive() {}
6303
6314
  }
6304
6315
  }],
6305
6316
  re = [K, U, F, $],
6306
- ce = [ee, Z, te, V, re, A, Y, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? H : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? X : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [b, m] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
6317
+ ce = [ee, Z, te, J, re, A, q, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? X : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [m, b] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
6307
6318
  se = ce.concat({
6308
6319
  checkDataCloneException: {
6309
6320
  test(e) {
6310
6321
  const t = {}.toString.call(e).slice(8, -1);
6311
6322
  if (["symbol", "function"].includes(typeof e) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == typeof e && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
6312
- return !1;
6323
+ return false;
6313
6324
  }
6314
6325
  }
6315
6326
  });
@@ -6653,7 +6664,6 @@ IDBIndex.__createIndex = function (store, index) {
6653
6664
  tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
6654
6665
  addIndexEntry(i + 1);
6655
6666
  }, /** @type {SQLStatementErrorCallback} */error);
6656
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
6657
6667
  } catch (err) {
6658
6668
  // Not a valid value to insert into index, so just continue
6659
6669
  addIndexEntry(i + 1);
@@ -6780,7 +6790,6 @@ IDBIndex.__deleteIndex = function (store, index) {
6780
6790
  IDBIndex.__updateIndexList = function (store, tx, success, failure) {
6781
6791
  /** @type {IndexList} **/
6782
6792
  const indexList = {};
6783
- // eslint-disable-next-line sonarjs/prefer-for-of -- Implement iterability?
6784
6793
  for (let i = 0; i < store.indexNames.length; i++) {
6785
6794
  const idx = store.__indexes[store.indexNames[i]];
6786
6795
  indexList[idx.name] = {
@@ -7740,7 +7749,6 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
7740
7749
  if ('invalid' in indexKey && indexKey.invalid || 'failure' in indexKey && indexKey.failure) {
7741
7750
  throw new Error('Go to catch');
7742
7751
  }
7743
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
7744
7752
  } catch (err) {
7745
7753
  resolve(undefined);
7746
7754
  return;
@@ -8840,7 +8848,7 @@ let nameCounter = 0;
8840
8848
  */
8841
8849
  function getLatestCachedWebSQLVersion(name) {
8842
8850
  return Object.keys(websqlDBCache[name]).map(Number).reduce((prev, curr) => {
8843
- return curr > prev ? curr : prev;
8851
+ return Math.max(curr, prev);
8844
8852
  }, 0);
8845
8853
  }
8846
8854
 
@@ -9122,7 +9130,6 @@ IDBFactory.prototype.open = function (name /* , version */) {
9122
9130
  if (err) {
9123
9131
  try {
9124
9132
  systx.executeSql('ROLLBACK', [], cb, cb);
9125
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
9126
9133
  } catch (err) {
9127
9134
  // Browser may fail with expired transaction above so
9128
9135
  // no choice but to manually revert
@@ -9230,7 +9237,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
9230
9237
  // eslint-disable-next-line camelcase -- Clear API
9231
9238
  req.transaction.on__complete = function () {
9232
9239
  const pos = connection.__transactions.indexOf(req.transaction);
9233
- if (pos > -1) {
9240
+ if (pos !== -1) {
9234
9241
  connection.__transactions.splice(pos, 1);
9235
9242
  }
9236
9243
  if (/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
@@ -10485,6 +10492,8 @@ Object.defineProperty(IDBCursorWithValue, 'prototype', {
10485
10492
  writable: false
10486
10493
  });
10487
10494
 
10495
+ /* eslint-disable unicorn/prefer-global-this -- Older browsers? */
10496
+
10488
10497
  /**
10489
10498
  * @typedef {any} AnyValue
10490
10499
  */
@@ -10630,7 +10639,6 @@ function setGlobalVars(idb, initialConfig) {
10630
10639
  Object.getOwnPropertyDescriptor(o, name);
10631
10640
  }
10632
10641
  Object.defineProperty(IDB, name, desc);
10633
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
10634
10642
  } catch (err) {
10635
10643
  // With `indexedDB`, PhantomJS fails here and below but
10636
10644
  // not above, while Chrome is reverse (and Firefox doesn't
@@ -10829,237 +10837,301 @@ function getDefaultExportFromCjs (x) {
10829
10837
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10830
10838
  }
10831
10839
 
10832
- var nextTick$1 = {};
10840
+ var nextTick = {};
10833
10841
 
10834
- nextTick$1.test = function () {
10835
- // Don't get fooled by e.g. browserify environments.
10836
- return typeof process !== 'undefined' && !process.browser;
10837
- };
10838
- nextTick$1.install = function (func) {
10839
- return function () {
10840
- process.nextTick(func);
10842
+ var hasRequiredNextTick;
10843
+ function requireNextTick() {
10844
+ if (hasRequiredNextTick) return nextTick;
10845
+ hasRequiredNextTick = 1;
10846
+ nextTick.test = function () {
10847
+ // Don't get fooled by e.g. browserify environments.
10848
+ return typeof process !== 'undefined' && !process.browser;
10841
10849
  };
10842
- };
10850
+ nextTick.install = function (func) {
10851
+ return function () {
10852
+ process.nextTick(func);
10853
+ };
10854
+ };
10855
+ return nextTick;
10856
+ }
10843
10857
 
10844
10858
  var queueMicrotask = {};
10845
10859
 
10846
- queueMicrotask.test = function () {
10847
- return typeof commonjsGlobal.queueMicrotask === 'function';
10848
- };
10849
- queueMicrotask.install = function (func) {
10850
- return function () {
10851
- commonjsGlobal.queueMicrotask(func);
10860
+ var hasRequiredQueueMicrotask;
10861
+ function requireQueueMicrotask() {
10862
+ if (hasRequiredQueueMicrotask) return queueMicrotask;
10863
+ hasRequiredQueueMicrotask = 1;
10864
+ queueMicrotask.test = function () {
10865
+ return typeof commonjsGlobal.queueMicrotask === 'function';
10852
10866
  };
10853
- };
10867
+ queueMicrotask.install = function (func) {
10868
+ return function () {
10869
+ commonjsGlobal.queueMicrotask(func);
10870
+ };
10871
+ };
10872
+ return queueMicrotask;
10873
+ }
10854
10874
 
10855
10875
  var mutation = {};
10856
10876
 
10857
- //based off rsvp https://github.com/tildeio/rsvp.js
10858
- //license https://github.com/tildeio/rsvp.js/blob/master/LICENSE
10859
- //https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/asap.js
10860
-
10861
- var Mutation = commonjsGlobal.MutationObserver || commonjsGlobal.WebKitMutationObserver;
10862
- mutation.test = function () {
10863
- return Mutation;
10864
- };
10865
- mutation.install = function (handle) {
10866
- var called = 0;
10867
- var observer = new Mutation(handle);
10868
- var element = commonjsGlobal.document.createTextNode('');
10869
- observer.observe(element, {
10870
- characterData: true
10871
- });
10872
- return function () {
10873
- element.data = called = ++called % 2;
10877
+ var hasRequiredMutation;
10878
+ function requireMutation() {
10879
+ if (hasRequiredMutation) return mutation;
10880
+ hasRequiredMutation = 1;
10881
+ //based off rsvp https://github.com/tildeio/rsvp.js
10882
+ //license https://github.com/tildeio/rsvp.js/blob/master/LICENSE
10883
+ //https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/asap.js
10884
+
10885
+ var Mutation = commonjsGlobal.MutationObserver || commonjsGlobal.WebKitMutationObserver;
10886
+ mutation.test = function () {
10887
+ return Mutation;
10874
10888
  };
10875
- };
10889
+ mutation.install = function (handle) {
10890
+ var called = 0;
10891
+ var observer = new Mutation(handle);
10892
+ var element = commonjsGlobal.document.createTextNode('');
10893
+ observer.observe(element, {
10894
+ characterData: true
10895
+ });
10896
+ return function () {
10897
+ element.data = called = ++called % 2;
10898
+ };
10899
+ };
10900
+ return mutation;
10901
+ }
10876
10902
 
10877
10903
  var messageChannel = {};
10878
10904
 
10879
- messageChannel.test = function () {
10880
- if (commonjsGlobal.setImmediate) {
10881
- // we can only get here in IE10
10882
- // which doesn't handel postMessage well
10883
- return false;
10884
- }
10885
- return typeof commonjsGlobal.MessageChannel !== 'undefined';
10886
- };
10887
- messageChannel.install = function (func) {
10888
- var channel = new commonjsGlobal.MessageChannel();
10889
- channel.port1.onmessage = func;
10890
- return function () {
10891
- channel.port2.postMessage(0);
10905
+ var hasRequiredMessageChannel;
10906
+ function requireMessageChannel() {
10907
+ if (hasRequiredMessageChannel) return messageChannel;
10908
+ hasRequiredMessageChannel = 1;
10909
+ messageChannel.test = function () {
10910
+ if (commonjsGlobal.setImmediate) {
10911
+ // we can only get here in IE10
10912
+ // which doesn't handel postMessage well
10913
+ return false;
10914
+ }
10915
+ return typeof commonjsGlobal.MessageChannel !== 'undefined';
10892
10916
  };
10893
- };
10917
+ messageChannel.install = function (func) {
10918
+ var channel = new commonjsGlobal.MessageChannel();
10919
+ channel.port1.onmessage = func;
10920
+ return function () {
10921
+ channel.port2.postMessage(0);
10922
+ };
10923
+ };
10924
+ return messageChannel;
10925
+ }
10894
10926
 
10895
10927
  var stateChange = {};
10896
10928
 
10897
- stateChange.test = function () {
10898
- return 'document' in commonjsGlobal && 'onreadystatechange' in commonjsGlobal.document.createElement('script');
10899
- };
10900
- stateChange.install = function (handle) {
10901
- return function () {
10902
- // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
10903
- // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
10904
- var scriptEl = commonjsGlobal.document.createElement('script');
10905
- scriptEl.onreadystatechange = function () {
10906
- handle();
10907
- scriptEl.onreadystatechange = null;
10908
- scriptEl.parentNode.removeChild(scriptEl);
10909
- scriptEl = null;
10929
+ var hasRequiredStateChange;
10930
+ function requireStateChange() {
10931
+ if (hasRequiredStateChange) return stateChange;
10932
+ hasRequiredStateChange = 1;
10933
+ stateChange.test = function () {
10934
+ return 'document' in commonjsGlobal && 'onreadystatechange' in commonjsGlobal.document.createElement('script');
10935
+ };
10936
+ stateChange.install = function (handle) {
10937
+ return function () {
10938
+ // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
10939
+ // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
10940
+ var scriptEl = commonjsGlobal.document.createElement('script');
10941
+ scriptEl.onreadystatechange = function () {
10942
+ handle();
10943
+ scriptEl.onreadystatechange = null;
10944
+ scriptEl.parentNode.removeChild(scriptEl);
10945
+ scriptEl = null;
10946
+ };
10947
+ commonjsGlobal.document.documentElement.appendChild(scriptEl);
10948
+ return handle;
10910
10949
  };
10911
- commonjsGlobal.document.documentElement.appendChild(scriptEl);
10912
- return handle;
10913
10950
  };
10914
- };
10951
+ return stateChange;
10952
+ }
10915
10953
 
10916
10954
  var timeout = {};
10917
10955
 
10918
- timeout.test = function () {
10919
- return true;
10920
- };
10921
- timeout.install = function (t) {
10922
- return function () {
10923
- setTimeout(t, 0);
10956
+ var hasRequiredTimeout;
10957
+ function requireTimeout() {
10958
+ if (hasRequiredTimeout) return timeout;
10959
+ hasRequiredTimeout = 1;
10960
+ timeout.test = function () {
10961
+ return true;
10924
10962
  };
10925
- };
10926
-
10927
- var types = [nextTick$1, queueMicrotask, mutation, messageChannel, stateChange, timeout];
10928
- var draining;
10929
- var currentQueue;
10930
- var queueIndex = -1;
10931
- var queue = [];
10932
- var scheduled = false;
10933
- function cleanUpNextTick() {
10934
- if (!draining || !currentQueue) {
10935
- return;
10936
- }
10937
- draining = false;
10938
- if (currentQueue.length) {
10939
- queue = currentQueue.concat(queue);
10940
- } else {
10941
- queueIndex = -1;
10942
- }
10943
- if (queue.length) {
10944
- nextTick();
10963
+ timeout.install = function (t) {
10964
+ return function () {
10965
+ setTimeout(t, 0);
10966
+ };
10967
+ };
10968
+ return timeout;
10969
+ }
10970
+
10971
+ var lib;
10972
+ var hasRequiredLib;
10973
+ function requireLib() {
10974
+ if (hasRequiredLib) return lib;
10975
+ hasRequiredLib = 1;
10976
+ var types = [requireNextTick(), requireQueueMicrotask(), requireMutation(), requireMessageChannel(), requireStateChange(), requireTimeout()];
10977
+ var draining;
10978
+ var currentQueue;
10979
+ var queueIndex = -1;
10980
+ var queue = [];
10981
+ var scheduled = false;
10982
+ function cleanUpNextTick() {
10983
+ if (!draining || !currentQueue) {
10984
+ return;
10985
+ }
10986
+ draining = false;
10987
+ if (currentQueue.length) {
10988
+ queue = currentQueue.concat(queue);
10989
+ } else {
10990
+ queueIndex = -1;
10991
+ }
10992
+ if (queue.length) {
10993
+ nextTick();
10994
+ }
10945
10995
  }
10946
- }
10947
10996
 
10948
- //named nextTick for less confusing stack traces
10949
- function nextTick() {
10950
- if (draining) {
10951
- return;
10952
- }
10953
- scheduled = false;
10954
- draining = true;
10955
- var len = queue.length;
10956
- var timeout = setTimeout(cleanUpNextTick);
10957
- while (len) {
10958
- currentQueue = queue;
10959
- queue = [];
10960
- while (currentQueue && ++queueIndex < len) {
10961
- currentQueue[queueIndex].run();
10997
+ //named nextTick for less confusing stack traces
10998
+ function nextTick() {
10999
+ if (draining) {
11000
+ return;
11001
+ }
11002
+ scheduled = false;
11003
+ draining = true;
11004
+ var len = queue.length;
11005
+ var timeout = setTimeout(cleanUpNextTick);
11006
+ while (len) {
11007
+ currentQueue = queue;
11008
+ queue = [];
11009
+ while (currentQueue && ++queueIndex < len) {
11010
+ currentQueue[queueIndex].run();
11011
+ }
11012
+ queueIndex = -1;
11013
+ len = queue.length;
10962
11014
  }
11015
+ currentQueue = null;
10963
11016
  queueIndex = -1;
10964
- len = queue.length;
10965
- }
10966
- currentQueue = null;
10967
- queueIndex = -1;
10968
- draining = false;
10969
- clearTimeout(timeout);
10970
- }
10971
- var scheduleDrain;
10972
- var i = -1;
10973
- var len = types.length;
10974
- while (++i < len) {
10975
- if (types[i] && types[i].test && types[i].test()) {
10976
- scheduleDrain = types[i].install(nextTick);
10977
- break;
10978
- }
10979
- }
10980
- // v8 likes predictible objects
10981
- function Item(fun, array) {
10982
- this.fun = fun;
10983
- this.array = array;
10984
- }
10985
- Item.prototype.run = function () {
10986
- var fun = this.fun;
10987
- var array = this.array;
10988
- switch (array.length) {
10989
- case 0:
10990
- return fun();
10991
- case 1:
10992
- return fun(array[0]);
10993
- case 2:
10994
- return fun(array[0], array[1]);
10995
- case 3:
10996
- return fun(array[0], array[1], array[2]);
10997
- default:
10998
- return fun.apply(null, array);
10999
- }
11000
- };
11001
- var lib = immediate;
11002
- function immediate(task) {
11003
- var args = new Array(arguments.length - 1);
11004
- if (arguments.length > 1) {
11005
- for (var i = 1; i < arguments.length; i++) {
11006
- args[i - 1] = arguments[i];
11017
+ draining = false;
11018
+ clearTimeout(timeout);
11019
+ }
11020
+ var scheduleDrain;
11021
+ var i = -1;
11022
+ var len = types.length;
11023
+ while (++i < len) {
11024
+ if (types[i] && types[i].test && types[i].test()) {
11025
+ scheduleDrain = types[i].install(nextTick);
11026
+ break;
11007
11027
  }
11008
11028
  }
11009
- queue.push(new Item(task, args));
11010
- if (!scheduled && !draining) {
11011
- scheduled = true;
11012
- scheduleDrain();
11029
+ // v8 likes predictible objects
11030
+ function Item(fun, array) {
11031
+ this.fun = fun;
11032
+ this.array = array;
11033
+ }
11034
+ Item.prototype.run = function () {
11035
+ var fun = this.fun;
11036
+ var array = this.array;
11037
+ switch (array.length) {
11038
+ case 0:
11039
+ return fun();
11040
+ case 1:
11041
+ return fun(array[0]);
11042
+ case 2:
11043
+ return fun(array[0], array[1]);
11044
+ case 3:
11045
+ return fun(array[0], array[1], array[2]);
11046
+ default:
11047
+ return fun.apply(null, array);
11048
+ }
11049
+ };
11050
+ lib = immediate;
11051
+ function immediate(task) {
11052
+ var args = new Array(arguments.length - 1);
11053
+ if (arguments.length > 1) {
11054
+ for (var i = 1; i < arguments.length; i++) {
11055
+ args[i - 1] = arguments[i];
11056
+ }
11057
+ }
11058
+ queue.push(new Item(task, args));
11059
+ if (!scheduled && !draining) {
11060
+ scheduled = true;
11061
+ scheduleDrain();
11062
+ }
11013
11063
  }
11064
+ return lib;
11014
11065
  }
11015
- var immediate$1 = /*@__PURE__*/getDefaultExportFromCjs(lib);
11016
11066
 
11017
- // Simple FIFO queue implementation to avoid having to do shift()
11018
- // on an array, which is slow.
11067
+ var libExports = requireLib();
11068
+ var immediate = /*@__PURE__*/getDefaultExportFromCjs(libExports);
11019
11069
 
11020
- function Queue() {
11021
- this.length = 0;
11022
- }
11023
- Queue.prototype.push = function (item) {
11024
- var node = {
11025
- item: item
11026
- };
11027
- if (this.last) {
11028
- this.last = this.last.next = node;
11029
- } else {
11030
- this.last = this.first = node;
11070
+ var tinyQueue;
11071
+ var hasRequiredTinyQueue;
11072
+ function requireTinyQueue() {
11073
+ if (hasRequiredTinyQueue) return tinyQueue;
11074
+ hasRequiredTinyQueue = 1;
11075
+
11076
+ // Simple FIFO queue implementation to avoid having to do shift()
11077
+ // on an array, which is slow.
11078
+
11079
+ function Queue() {
11080
+ this.length = 0;
11031
11081
  }
11032
- this.length++;
11033
- };
11034
- Queue.prototype.shift = function () {
11035
- var node = this.first;
11036
- if (node) {
11037
- this.first = node.next;
11038
- if (! --this.length) {
11039
- this.last = undefined;
11082
+ Queue.prototype.push = function (item) {
11083
+ var node = {
11084
+ item: item
11085
+ };
11086
+ if (this.last) {
11087
+ this.last = this.last.next = node;
11088
+ } else {
11089
+ this.last = this.first = node;
11040
11090
  }
11041
- return node.item;
11042
- }
11043
- };
11044
- Queue.prototype.slice = function (start, end) {
11045
- start = typeof start === 'undefined' ? 0 : start;
11046
- end = typeof end === 'undefined' ? Infinity : end;
11047
- var output = [];
11048
- var i = 0;
11049
- for (var node = this.first; node; node = node.next) {
11050
- if (--end < 0) {
11051
- break;
11052
- } else if (++i > start) {
11053
- output.push(node.item);
11091
+ this.length++;
11092
+ };
11093
+ Queue.prototype.shift = function () {
11094
+ var node = this.first;
11095
+ if (node) {
11096
+ this.first = node.next;
11097
+ if (! --this.length) {
11098
+ this.last = undefined;
11099
+ }
11100
+ return node.item;
11054
11101
  }
11055
- }
11056
- return output;
11057
- };
11058
- var tinyQueue = Queue;
11059
- var Queue$1 = /*@__PURE__*/getDefaultExportFromCjs(tinyQueue);
11102
+ };
11103
+ Queue.prototype.slice = function (start, end) {
11104
+ start = typeof start === 'undefined' ? 0 : start;
11105
+ end = typeof end === 'undefined' ? Infinity : end;
11106
+ var output = [];
11107
+ var i = 0;
11108
+ for (var node = this.first; node; node = node.next) {
11109
+ if (--end < 0) {
11110
+ break;
11111
+ } else if (++i > start) {
11112
+ output.push(node.item);
11113
+ }
11114
+ }
11115
+ return output;
11116
+ };
11117
+ tinyQueue = Queue;
11118
+ return tinyQueue;
11119
+ }
11060
11120
 
11061
- var noopFn = function () {};
11062
- var noop = /*@__PURE__*/getDefaultExportFromCjs(noopFn);
11121
+ var tinyQueueExports = requireTinyQueue();
11122
+ var Queue = /*@__PURE__*/getDefaultExportFromCjs(tinyQueueExports);
11123
+
11124
+ var noopFn;
11125
+ var hasRequiredNoopFn;
11126
+ function requireNoopFn() {
11127
+ if (hasRequiredNoopFn) return noopFn;
11128
+ hasRequiredNoopFn = 1;
11129
+ noopFn = function () {};
11130
+ return noopFn;
11131
+ }
11132
+
11133
+ var noopFnExports = requireNoopFn();
11134
+ var noop = /*@__PURE__*/getDefaultExportFromCjs(noopFnExports);
11063
11135
 
11064
11136
  function WebSQLRows(array) {
11065
11137
  this._array = array;
@@ -11174,8 +11246,8 @@ function WebSQLTransaction(websqlDatabase, executeDelay) {
11174
11246
  this._error = null;
11175
11247
  this._complete = false;
11176
11248
  this._runningTimeout = false;
11177
- this._executeDelay = executeDelay || immediate$1;
11178
- this._sqlQueue = new Queue$1();
11249
+ this._executeDelay = executeDelay || immediate;
11250
+ this._sqlQueue = new Queue();
11179
11251
  if (!websqlDatabase._currentTask.readOnly) {
11180
11252
  // Since we serialize all access to the database, there is no need to
11181
11253
  // run read-only tasks in a transaction. This is a perf boost.
@@ -11219,10 +11291,10 @@ function TransactionTask(readOnly, txnCallback, errorCallback, successCallback,
11219
11291
  function WebSQLDatabase(dbVersion, db, webSQLOverrides) {
11220
11292
  this.version = dbVersion;
11221
11293
  this._db = db;
11222
- this._txnQueue = new Queue$1();
11294
+ this._txnQueue = new Queue();
11223
11295
  this._running = false;
11224
11296
  this._currentTask = null;
11225
- this._transactionDelay = webSQLOverrides.transactionDelay || immediate$1;
11297
+ this._transactionDelay = webSQLOverrides.transactionDelay || immediate;
11226
11298
  this._executeDelay = webSQLOverrides.executeDelay;
11227
11299
  }
11228
11300
  WebSQLDatabase.prototype._onTransactionComplete = function (err) {
@@ -11326,7 +11398,7 @@ function customOpenDatabase(SQLiteDatabase, opts) {
11326
11398
  opts = opts || {};
11327
11399
  var sqliteOpts = opts.sqlite;
11328
11400
  var webSQLOverrides = opts.websql || {};
11329
- var openDelay = webSQLOverrides.openDelay || immediate$1;
11401
+ var openDelay = webSQLOverrides.openDelay || immediate;
11330
11402
  function createDb(dbName, dbVersion) {
11331
11403
  var sqliteDatabase = new SQLiteDatabase(dbName, sqliteOpts);
11332
11404
  return new WebSQLDatabase(dbVersion, sqliteDatabase, webSQLOverrides);
@@ -11358,249 +11430,268 @@ function commonjsRequire(path) {
11358
11430
 
11359
11431
  var bindings = {exports: {}};
11360
11432
 
11361
- /**
11362
- * Module dependencies.
11363
- */
11433
+ var fileUriToPath_1;
11434
+ var hasRequiredFileUriToPath;
11435
+ function requireFileUriToPath() {
11436
+ if (hasRequiredFileUriToPath) return fileUriToPath_1;
11437
+ hasRequiredFileUriToPath = 1;
11438
+ /**
11439
+ * Module dependencies.
11440
+ */
11364
11441
 
11365
- var sep = path.sep || '/';
11442
+ var sep = path.sep || '/';
11366
11443
 
11367
- /**
11368
- * Module exports.
11369
- */
11444
+ /**
11445
+ * Module exports.
11446
+ */
11370
11447
 
11371
- var fileUriToPath_1 = fileUriToPath;
11448
+ fileUriToPath_1 = fileUriToPath;
11372
11449
 
11373
- /**
11374
- * File URI to Path function.
11375
- *
11376
- * @param {String} uri
11377
- * @return {String} path
11378
- * @api public
11379
- */
11450
+ /**
11451
+ * File URI to Path function.
11452
+ *
11453
+ * @param {String} uri
11454
+ * @return {String} path
11455
+ * @api public
11456
+ */
11380
11457
 
11381
- function fileUriToPath(uri) {
11382
- if ('string' != typeof uri || uri.length <= 7 || 'file://' != uri.substring(0, 7)) {
11383
- throw new TypeError('must pass in a file:// URI to convert to a file path');
11384
- }
11385
- var rest = decodeURI(uri.substring(7));
11386
- var firstSlash = rest.indexOf('/');
11387
- var host = rest.substring(0, firstSlash);
11388
- var path = rest.substring(firstSlash + 1);
11458
+ function fileUriToPath(uri) {
11459
+ if ('string' != typeof uri || uri.length <= 7 || 'file://' != uri.substring(0, 7)) {
11460
+ throw new TypeError('must pass in a file:// URI to convert to a file path');
11461
+ }
11462
+ var rest = decodeURI(uri.substring(7));
11463
+ var firstSlash = rest.indexOf('/');
11464
+ var host = rest.substring(0, firstSlash);
11465
+ var path = rest.substring(firstSlash + 1);
11389
11466
 
11390
- // 2. Scheme Definition
11391
- // As a special case, <host> can be the string "localhost" or the empty
11392
- // string; this is interpreted as "the machine from which the URL is
11393
- // being interpreted".
11394
- if ('localhost' == host) host = '';
11395
- if (host) {
11396
- host = sep + sep + host;
11397
- }
11467
+ // 2. Scheme Definition
11468
+ // As a special case, <host> can be the string "localhost" or the empty
11469
+ // string; this is interpreted as "the machine from which the URL is
11470
+ // being interpreted".
11471
+ if ('localhost' == host) host = '';
11472
+ if (host) {
11473
+ host = sep + sep + host;
11474
+ }
11398
11475
 
11399
- // 3.2 Drives, drive letters, mount points, file system root
11400
- // Drive letters are mapped into the top of a file URI in various ways,
11401
- // depending on the implementation; some applications substitute
11402
- // vertical bar ("|") for the colon after the drive letter, yielding
11403
- // "file:///c|/tmp/test.txt". In some cases, the colon is left
11404
- // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
11405
- // colon is simply omitted, as in "file:///c/tmp/test.txt".
11406
- path = path.replace(/^(.+)\|/, '$1:');
11476
+ // 3.2 Drives, drive letters, mount points, file system root
11477
+ // Drive letters are mapped into the top of a file URI in various ways,
11478
+ // depending on the implementation; some applications substitute
11479
+ // vertical bar ("|") for the colon after the drive letter, yielding
11480
+ // "file:///c|/tmp/test.txt". In some cases, the colon is left
11481
+ // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
11482
+ // colon is simply omitted, as in "file:///c/tmp/test.txt".
11483
+ path = path.replace(/^(.+)\|/, '$1:');
11407
11484
 
11408
- // for Windows, we need to invert the path separators from what a URI uses
11409
- if (sep == '\\') {
11410
- path = path.replace(/\//g, '\\');
11411
- }
11412
- if (/^.+\:/.test(path)) ; else {
11413
- // unix path…
11414
- path = sep + path;
11485
+ // for Windows, we need to invert the path separators from what a URI uses
11486
+ if (sep == '\\') {
11487
+ path = path.replace(/\//g, '\\');
11488
+ }
11489
+ if (/^.+\:/.test(path)) ; else {
11490
+ // unix path…
11491
+ path = sep + path;
11492
+ }
11493
+ return host + path;
11415
11494
  }
11416
- return host + path;
11495
+ return fileUriToPath_1;
11417
11496
  }
11418
11497
 
11419
11498
  /**
11420
11499
  * Module dependencies.
11421
11500
  */
11422
- (function (module, exports) {
11423
- var fs = require$$0,
11424
- path$1 = path,
11425
- fileURLToPath = fileUriToPath_1,
11426
- join = path$1.join,
11427
- dirname = path$1.dirname,
11428
- exists = fs.accessSync && function (path) {
11429
- try {
11430
- fs.accessSync(path);
11431
- } catch (e) {
11432
- return false;
11501
+ var hasRequiredBindings;
11502
+ function requireBindings() {
11503
+ if (hasRequiredBindings) return bindings.exports;
11504
+ hasRequiredBindings = 1;
11505
+ (function (module, exports) {
11506
+ var fs = require$$0,
11507
+ path$1 = path,
11508
+ fileURLToPath = requireFileUriToPath(),
11509
+ join = path$1.join,
11510
+ dirname = path$1.dirname,
11511
+ exists = fs.accessSync && function (path) {
11512
+ try {
11513
+ fs.accessSync(path);
11514
+ } catch (e) {
11515
+ return false;
11516
+ }
11517
+ return true;
11518
+ } || fs.existsSync || path$1.existsSync,
11519
+ defaults = {
11520
+ arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
11521
+ compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
11522
+ platform: process.platform,
11523
+ arch: process.arch,
11524
+ nodePreGyp: 'node-v' + process.versions.modules + '-' + process.platform + '-' + process.arch,
11525
+ version: process.versions.node,
11526
+ bindings: 'bindings.node',
11527
+ try: [
11528
+ // node-gyp's linked version in the "build" dir
11529
+ ['module_root', 'build', 'bindings'],
11530
+ // node-waf and gyp_addon (a.k.a node-gyp)
11531
+ ['module_root', 'build', 'Debug', 'bindings'], ['module_root', 'build', 'Release', 'bindings'],
11532
+ // Debug files, for development (legacy behavior, remove for node v0.9)
11533
+ ['module_root', 'out', 'Debug', 'bindings'], ['module_root', 'Debug', 'bindings'],
11534
+ // Release files, but manually compiled (legacy behavior, remove for node v0.9)
11535
+ ['module_root', 'out', 'Release', 'bindings'], ['module_root', 'Release', 'bindings'],
11536
+ // Legacy from node-waf, node <= 0.4.x
11537
+ ['module_root', 'build', 'default', 'bindings'],
11538
+ // Production "Release" buildtype binary (meh...)
11539
+ ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
11540
+ // node-qbs builds
11541
+ ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
11542
+ // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
11543
+ ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']]
11544
+ };
11545
+
11546
+ /**
11547
+ * The main `bindings()` function loads the compiled bindings for a given module.
11548
+ * It uses V8's Error API to determine the parent filename that this function is
11549
+ * being invoked from, which is then used to find the root directory.
11550
+ */
11551
+
11552
+ function bindings(opts) {
11553
+ // Argument surgery
11554
+ if (typeof opts == 'string') {
11555
+ opts = {
11556
+ bindings: opts
11557
+ };
11558
+ } else if (!opts) {
11559
+ opts = {};
11433
11560
  }
11434
- return true;
11435
- } || fs.existsSync || path$1.existsSync,
11436
- defaults = {
11437
- arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
11438
- compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
11439
- platform: process.platform,
11440
- arch: process.arch,
11441
- nodePreGyp: 'node-v' + process.versions.modules + '-' + process.platform + '-' + process.arch,
11442
- version: process.versions.node,
11443
- bindings: 'bindings.node',
11444
- try: [
11445
- // node-gyp's linked version in the "build" dir
11446
- ['module_root', 'build', 'bindings'],
11447
- // node-waf and gyp_addon (a.k.a node-gyp)
11448
- ['module_root', 'build', 'Debug', 'bindings'], ['module_root', 'build', 'Release', 'bindings'],
11449
- // Debug files, for development (legacy behavior, remove for node v0.9)
11450
- ['module_root', 'out', 'Debug', 'bindings'], ['module_root', 'Debug', 'bindings'],
11451
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
11452
- ['module_root', 'out', 'Release', 'bindings'], ['module_root', 'Release', 'bindings'],
11453
- // Legacy from node-waf, node <= 0.4.x
11454
- ['module_root', 'build', 'default', 'bindings'],
11455
- // Production "Release" buildtype binary (meh...)
11456
- ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
11457
- // node-qbs builds
11458
- ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
11459
- // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
11460
- ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']]
11461
- };
11462
11561
 
11463
- /**
11464
- * The main `bindings()` function loads the compiled bindings for a given module.
11465
- * It uses V8's Error API to determine the parent filename that this function is
11466
- * being invoked from, which is then used to find the root directory.
11467
- */
11562
+ // maps `defaults` onto `opts` object
11563
+ Object.keys(defaults).map(function (i) {
11564
+ if (!(i in opts)) opts[i] = defaults[i];
11565
+ });
11468
11566
 
11469
- function bindings(opts) {
11470
- // Argument surgery
11471
- if (typeof opts == 'string') {
11472
- opts = {
11473
- bindings: opts
11474
- };
11475
- } else if (!opts) {
11476
- opts = {};
11477
- }
11567
+ // Get the module root
11568
+ if (!opts.module_root) {
11569
+ opts.module_root = exports.getRoot(exports.getFileName());
11570
+ }
11478
11571
 
11479
- // maps `defaults` onto `opts` object
11480
- Object.keys(defaults).map(function (i) {
11481
- if (!(i in opts)) opts[i] = defaults[i];
11482
- });
11572
+ // Ensure the given bindings name ends with .node
11573
+ if (path$1.extname(opts.bindings) != '.node') {
11574
+ opts.bindings += '.node';
11575
+ }
11483
11576
 
11484
- // Get the module root
11485
- if (!opts.module_root) {
11486
- opts.module_root = exports.getRoot(exports.getFileName());
11487
- }
11488
-
11489
- // Ensure the given bindings name ends with .node
11490
- if (path$1.extname(opts.bindings) != '.node') {
11491
- opts.bindings += '.node';
11492
- }
11493
-
11494
- // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
11495
- var requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : commonjsRequire;
11496
- var tries = [],
11497
- i = 0,
11498
- l = opts.try.length,
11499
- n,
11500
- b,
11501
- err;
11502
- for (; i < l; i++) {
11503
- n = join.apply(null, opts.try[i].map(function (p) {
11504
- return opts[p] || p;
11505
- }));
11506
- tries.push(n);
11507
- try {
11508
- b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
11509
- if (!opts.path) {
11510
- b.path = n;
11511
- }
11512
- return b;
11513
- } catch (e) {
11514
- if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && !/not find/i.test(e.message)) {
11515
- throw e;
11577
+ // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
11578
+ var requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : commonjsRequire;
11579
+ var tries = [],
11580
+ i = 0,
11581
+ l = opts.try.length,
11582
+ n,
11583
+ b,
11584
+ err;
11585
+ for (; i < l; i++) {
11586
+ n = join.apply(null, opts.try[i].map(function (p) {
11587
+ return opts[p] || p;
11588
+ }));
11589
+ tries.push(n);
11590
+ try {
11591
+ b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
11592
+ if (!opts.path) {
11593
+ b.path = n;
11594
+ }
11595
+ return b;
11596
+ } catch (e) {
11597
+ if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && !/not find/i.test(e.message)) {
11598
+ throw e;
11599
+ }
11516
11600
  }
11517
11601
  }
11602
+ err = new Error('Could not locate the bindings file. Tried:\n' + tries.map(function (a) {
11603
+ return opts.arrow + a;
11604
+ }).join('\n'));
11605
+ err.tries = tries;
11606
+ throw err;
11518
11607
  }
11519
- err = new Error('Could not locate the bindings file. Tried:\n' + tries.map(function (a) {
11520
- return opts.arrow + a;
11521
- }).join('\n'));
11522
- err.tries = tries;
11523
- throw err;
11524
- }
11525
- module.exports = exports = bindings;
11608
+ module.exports = exports = bindings;
11526
11609
 
11527
- /**
11528
- * Gets the filename of the JavaScript file that invokes this function.
11529
- * Used to help find the root directory of a module.
11530
- * Optionally accepts an filename argument to skip when searching for the invoking filename
11531
- */
11610
+ /**
11611
+ * Gets the filename of the JavaScript file that invokes this function.
11612
+ * Used to help find the root directory of a module.
11613
+ * Optionally accepts an filename argument to skip when searching for the invoking filename
11614
+ */
11532
11615
 
11533
- exports.getFileName = function getFileName(calling_file) {
11534
- var origPST = Error.prepareStackTrace,
11535
- origSTL = Error.stackTraceLimit,
11536
- dummy = {},
11537
- fileName;
11538
- Error.stackTraceLimit = 10;
11539
- Error.prepareStackTrace = function (e, st) {
11540
- for (var i = 0, l = st.length; i < l; i++) {
11541
- fileName = st[i].getFileName();
11542
- if (fileName !== __filename) {
11543
- if (calling_file) {
11544
- if (fileName !== calling_file) {
11616
+ exports.getFileName = function getFileName(calling_file) {
11617
+ var origPST = Error.prepareStackTrace,
11618
+ origSTL = Error.stackTraceLimit,
11619
+ dummy = {},
11620
+ fileName;
11621
+ Error.stackTraceLimit = 10;
11622
+ Error.prepareStackTrace = function (e, st) {
11623
+ for (var i = 0, l = st.length; i < l; i++) {
11624
+ fileName = st[i].getFileName();
11625
+ if (fileName !== __filename) {
11626
+ if (calling_file) {
11627
+ if (fileName !== calling_file) {
11628
+ return;
11629
+ }
11630
+ } else {
11545
11631
  return;
11546
11632
  }
11547
- } else {
11548
- return;
11549
11633
  }
11550
11634
  }
11551
- }
11552
- };
11635
+ };
11553
11636
 
11554
- // run the 'prepareStackTrace' function above
11555
- Error.captureStackTrace(dummy);
11556
- dummy.stack;
11637
+ // run the 'prepareStackTrace' function above
11638
+ Error.captureStackTrace(dummy);
11639
+ dummy.stack;
11557
11640
 
11558
- // cleanup
11559
- Error.prepareStackTrace = origPST;
11560
- Error.stackTraceLimit = origSTL;
11641
+ // cleanup
11642
+ Error.prepareStackTrace = origPST;
11643
+ Error.stackTraceLimit = origSTL;
11561
11644
 
11562
- // handle filename that starts with "file://"
11563
- var fileSchema = 'file://';
11564
- if (fileName.indexOf(fileSchema) === 0) {
11565
- fileName = fileURLToPath(fileName);
11566
- }
11567
- return fileName;
11568
- };
11645
+ // handle filename that starts with "file://"
11646
+ var fileSchema = 'file://';
11647
+ if (fileName.indexOf(fileSchema) === 0) {
11648
+ fileName = fileURLToPath(fileName);
11649
+ }
11650
+ return fileName;
11651
+ };
11569
11652
 
11570
- /**
11571
- * Gets the root directory of a module, given an arbitrary filename
11572
- * somewhere in the module tree. The "root directory" is the directory
11573
- * containing the `package.json` file.
11574
- *
11575
- * In: /home/nate/node-native-module/lib/index.js
11576
- * Out: /home/nate/node-native-module
11577
- */
11653
+ /**
11654
+ * Gets the root directory of a module, given an arbitrary filename
11655
+ * somewhere in the module tree. The "root directory" is the directory
11656
+ * containing the `package.json` file.
11657
+ *
11658
+ * In: /home/nate/node-native-module/lib/index.js
11659
+ * Out: /home/nate/node-native-module
11660
+ */
11578
11661
 
11579
- exports.getRoot = function getRoot(file) {
11580
- var dir = dirname(file),
11581
- prev;
11582
- while (true) {
11583
- if (dir === '.') {
11584
- // Avoids an infinite loop in rare cases, like the REPL
11585
- dir = process.cwd();
11586
- }
11587
- if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
11588
- // Found the 'package.json' file or 'node_modules' dir; we're done
11589
- return dir;
11590
- }
11591
- if (prev === dir) {
11592
- // Got to the top
11593
- throw new Error('Could not find module root given file: "' + file + '". Do you have a `package.json` file? ');
11662
+ exports.getRoot = function getRoot(file) {
11663
+ var dir = dirname(file),
11664
+ prev;
11665
+ while (true) {
11666
+ if (dir === '.') {
11667
+ // Avoids an infinite loop in rare cases, like the REPL
11668
+ dir = process.cwd();
11669
+ }
11670
+ if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
11671
+ // Found the 'package.json' file or 'node_modules' dir; we're done
11672
+ return dir;
11673
+ }
11674
+ if (prev === dir) {
11675
+ // Got to the top
11676
+ throw new Error('Could not find module root given file: "' + file + '". Do you have a `package.json` file? ');
11677
+ }
11678
+ // Try the parent dir next
11679
+ prev = dir;
11680
+ dir = join(dir, '..');
11594
11681
  }
11595
- // Try the parent dir next
11596
- prev = dir;
11597
- dir = join(dir, '..');
11598
- }
11599
- };
11600
- })(bindings, bindings.exports);
11601
- var bindingsExports = bindings.exports;
11682
+ };
11683
+ })(bindings, bindings.exports);
11684
+ return bindings.exports;
11685
+ }
11602
11686
 
11603
- var sqlite3Binding = bindingsExports('node_sqlite3.node');
11687
+ var sqlite3Binding;
11688
+ var hasRequiredSqlite3Binding;
11689
+ function requireSqlite3Binding() {
11690
+ if (hasRequiredSqlite3Binding) return sqlite3Binding;
11691
+ hasRequiredSqlite3Binding = 1;
11692
+ sqlite3Binding = requireBindings()('node_sqlite3.node');
11693
+ return sqlite3Binding;
11694
+ }
11604
11695
 
11605
11696
  var trace = {};
11606
11697
 
@@ -11644,177 +11735,184 @@ function requireTrace() {
11644
11735
  return trace;
11645
11736
  }
11646
11737
 
11647
- (function (module, exports) {
11648
- const path$1 = path;
11649
- const sqlite3 = sqlite3Binding;
11650
- const EventEmitter = require$$2.EventEmitter;
11651
- module.exports = sqlite3;
11652
- function normalizeMethod(fn) {
11653
- return function (sql) {
11654
- let errBack;
11655
- const args = Array.prototype.slice.call(arguments, 1);
11656
- if (typeof args[args.length - 1] === 'function') {
11657
- const callback = args[args.length - 1];
11658
- errBack = function (err) {
11659
- if (err) {
11660
- callback(err);
11661
- }
11662
- };
11663
- }
11664
- const statement = new Statement(this, sql, errBack);
11665
- return fn.call(this, statement, args);
11666
- };
11667
- }
11668
- function inherits(target, source) {
11669
- for (const k in source.prototype) target.prototype[k] = source.prototype[k];
11670
- }
11671
- sqlite3.cached = {
11672
- Database: function (file, a, b) {
11673
- if (file === '' || file === ':memory:') {
11674
- // Don't cache special databases.
11675
- return new Database(file, a, b);
11676
- }
11677
- let db;
11678
- file = path$1.resolve(file);
11679
- if (!sqlite3.cached.objects[file]) {
11680
- db = sqlite3.cached.objects[file] = new Database(file, a, b);
11681
- } else {
11682
- // Make sure the callback is called.
11683
- db = sqlite3.cached.objects[file];
11684
- const callback = typeof a === 'number' ? b : a;
11685
- if (typeof callback === 'function') {
11686
- function cb() {
11687
- callback.call(db, null);
11738
+ var hasRequiredSqlite3;
11739
+ function requireSqlite3() {
11740
+ if (hasRequiredSqlite3) return sqlite3$1.exports;
11741
+ hasRequiredSqlite3 = 1;
11742
+ (function (module, exports) {
11743
+ const path$1 = path;
11744
+ const sqlite3 = requireSqlite3Binding();
11745
+ const EventEmitter = require$$2.EventEmitter;
11746
+ module.exports = sqlite3;
11747
+ function normalizeMethod(fn) {
11748
+ return function (sql) {
11749
+ let errBack;
11750
+ const args = Array.prototype.slice.call(arguments, 1);
11751
+ if (typeof args[args.length - 1] === 'function') {
11752
+ const callback = args[args.length - 1];
11753
+ errBack = function (err) {
11754
+ if (err) {
11755
+ callback(err);
11756
+ }
11757
+ };
11758
+ }
11759
+ const statement = new Statement(this, sql, errBack);
11760
+ return fn.call(this, statement, args);
11761
+ };
11762
+ }
11763
+ function inherits(target, source) {
11764
+ for (const k in source.prototype) target.prototype[k] = source.prototype[k];
11765
+ }
11766
+ sqlite3.cached = {
11767
+ Database: function (file, a, b) {
11768
+ if (file === '' || file === ':memory:') {
11769
+ // Don't cache special databases.
11770
+ return new Database(file, a, b);
11771
+ }
11772
+ let db;
11773
+ file = path$1.resolve(file);
11774
+ if (!sqlite3.cached.objects[file]) {
11775
+ db = sqlite3.cached.objects[file] = new Database(file, a, b);
11776
+ } else {
11777
+ // Make sure the callback is called.
11778
+ db = sqlite3.cached.objects[file];
11779
+ const callback = typeof a === 'number' ? b : a;
11780
+ if (typeof callback === 'function') {
11781
+ function cb() {
11782
+ callback.call(db, null);
11783
+ }
11784
+ if (db.open) process.nextTick(cb);else db.once('open', cb);
11688
11785
  }
11689
- if (db.open) process.nextTick(cb);else db.once('open', cb);
11690
11786
  }
11691
- }
11692
- return db;
11693
- },
11694
- objects: {}
11695
- };
11696
- const Database = sqlite3.Database;
11697
- const Statement = sqlite3.Statement;
11698
- const Backup = sqlite3.Backup;
11699
- inherits(Database, EventEmitter);
11700
- inherits(Statement, EventEmitter);
11701
- inherits(Backup, EventEmitter);
11702
-
11703
- // Database#prepare(sql, [bind1, bind2, ...], [callback])
11704
- Database.prototype.prepare = normalizeMethod(function (statement, params) {
11705
- return params.length ? statement.bind.apply(statement, params) : statement;
11706
- });
11787
+ return db;
11788
+ },
11789
+ objects: {}
11790
+ };
11791
+ const Database = sqlite3.Database;
11792
+ const Statement = sqlite3.Statement;
11793
+ const Backup = sqlite3.Backup;
11794
+ inherits(Database, EventEmitter);
11795
+ inherits(Statement, EventEmitter);
11796
+ inherits(Backup, EventEmitter);
11797
+
11798
+ // Database#prepare(sql, [bind1, bind2, ...], [callback])
11799
+ Database.prototype.prepare = normalizeMethod(function (statement, params) {
11800
+ return params.length ? statement.bind.apply(statement, params) : statement;
11801
+ });
11707
11802
 
11708
- // Database#run(sql, [bind1, bind2, ...], [callback])
11709
- Database.prototype.run = normalizeMethod(function (statement, params) {
11710
- statement.run.apply(statement, params).finalize();
11711
- return this;
11712
- });
11803
+ // Database#run(sql, [bind1, bind2, ...], [callback])
11804
+ Database.prototype.run = normalizeMethod(function (statement, params) {
11805
+ statement.run.apply(statement, params).finalize();
11806
+ return this;
11807
+ });
11713
11808
 
11714
- // Database#get(sql, [bind1, bind2, ...], [callback])
11715
- Database.prototype.get = normalizeMethod(function (statement, params) {
11716
- statement.get.apply(statement, params).finalize();
11717
- return this;
11718
- });
11809
+ // Database#get(sql, [bind1, bind2, ...], [callback])
11810
+ Database.prototype.get = normalizeMethod(function (statement, params) {
11811
+ statement.get.apply(statement, params).finalize();
11812
+ return this;
11813
+ });
11719
11814
 
11720
- // Database#all(sql, [bind1, bind2, ...], [callback])
11721
- Database.prototype.all = normalizeMethod(function (statement, params) {
11722
- statement.all.apply(statement, params).finalize();
11723
- return this;
11724
- });
11815
+ // Database#all(sql, [bind1, bind2, ...], [callback])
11816
+ Database.prototype.all = normalizeMethod(function (statement, params) {
11817
+ statement.all.apply(statement, params).finalize();
11818
+ return this;
11819
+ });
11725
11820
 
11726
- // Database#each(sql, [bind1, bind2, ...], [callback], [complete])
11727
- Database.prototype.each = normalizeMethod(function (statement, params) {
11728
- statement.each.apply(statement, params).finalize();
11729
- return this;
11730
- });
11731
- Database.prototype.map = normalizeMethod(function (statement, params) {
11732
- statement.map.apply(statement, params).finalize();
11733
- return this;
11734
- });
11821
+ // Database#each(sql, [bind1, bind2, ...], [callback], [complete])
11822
+ Database.prototype.each = normalizeMethod(function (statement, params) {
11823
+ statement.each.apply(statement, params).finalize();
11824
+ return this;
11825
+ });
11826
+ Database.prototype.map = normalizeMethod(function (statement, params) {
11827
+ statement.map.apply(statement, params).finalize();
11828
+ return this;
11829
+ });
11735
11830
 
11736
- // Database#backup(filename, [callback])
11737
- // Database#backup(filename, destName, sourceName, filenameIsDest, [callback])
11738
- Database.prototype.backup = function () {
11739
- let backup;
11740
- if (arguments.length <= 2) {
11741
- // By default, we write the main database out to the main database of the named file.
11742
- // This is the most likely use of the backup api.
11743
- backup = new Backup(this, arguments[0], 'main', 'main', true, arguments[1]);
11744
- } else {
11745
- // Otherwise, give the user full control over the sqlite3_backup_init arguments.
11746
- backup = new Backup(this, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
11747
- }
11748
- // Per the sqlite docs, exclude the following errors as non-fatal by default.
11749
- backup.retryErrors = [sqlite3.BUSY, sqlite3.LOCKED];
11750
- return backup;
11751
- };
11752
- Statement.prototype.map = function () {
11753
- const params = Array.prototype.slice.call(arguments);
11754
- const callback = params.pop();
11755
- params.push(function (err, rows) {
11756
- if (err) return callback(err);
11757
- const result = {};
11758
- if (rows.length) {
11759
- const keys = Object.keys(rows[0]);
11760
- const key = keys[0];
11761
- if (keys.length > 2) {
11762
- // Value is an object
11763
- for (let i = 0; i < rows.length; i++) {
11764
- result[rows[i][key]] = rows[i];
11765
- }
11766
- } else {
11767
- const value = keys[1];
11768
- // Value is a plain value
11769
- for (let i = 0; i < rows.length; i++) {
11770
- result[rows[i][key]] = rows[i][value];
11831
+ // Database#backup(filename, [callback])
11832
+ // Database#backup(filename, destName, sourceName, filenameIsDest, [callback])
11833
+ Database.prototype.backup = function () {
11834
+ let backup;
11835
+ if (arguments.length <= 2) {
11836
+ // By default, we write the main database out to the main database of the named file.
11837
+ // This is the most likely use of the backup api.
11838
+ backup = new Backup(this, arguments[0], 'main', 'main', true, arguments[1]);
11839
+ } else {
11840
+ // Otherwise, give the user full control over the sqlite3_backup_init arguments.
11841
+ backup = new Backup(this, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
11842
+ }
11843
+ // Per the sqlite docs, exclude the following errors as non-fatal by default.
11844
+ backup.retryErrors = [sqlite3.BUSY, sqlite3.LOCKED];
11845
+ return backup;
11846
+ };
11847
+ Statement.prototype.map = function () {
11848
+ const params = Array.prototype.slice.call(arguments);
11849
+ const callback = params.pop();
11850
+ params.push(function (err, rows) {
11851
+ if (err) return callback(err);
11852
+ const result = {};
11853
+ if (rows.length) {
11854
+ const keys = Object.keys(rows[0]);
11855
+ const key = keys[0];
11856
+ if (keys.length > 2) {
11857
+ // Value is an object
11858
+ for (let i = 0; i < rows.length; i++) {
11859
+ result[rows[i][key]] = rows[i];
11860
+ }
11861
+ } else {
11862
+ const value = keys[1];
11863
+ // Value is a plain value
11864
+ for (let i = 0; i < rows.length; i++) {
11865
+ result[rows[i][key]] = rows[i][value];
11866
+ }
11771
11867
  }
11772
11868
  }
11869
+ callback(err, result);
11870
+ });
11871
+ return this.all.apply(this, params);
11872
+ };
11873
+ let isVerbose = false;
11874
+ const supportedEvents = ['trace', 'profile', 'change'];
11875
+ Database.prototype.addListener = Database.prototype.on = function (type) {
11876
+ const val = EventEmitter.prototype.addListener.apply(this, arguments);
11877
+ if (supportedEvents.indexOf(type) >= 0) {
11878
+ this.configure(type, true);
11879
+ }
11880
+ return val;
11881
+ };
11882
+ Database.prototype.removeListener = function (type) {
11883
+ const val = EventEmitter.prototype.removeListener.apply(this, arguments);
11884
+ if (supportedEvents.indexOf(type) >= 0 && !this._events[type]) {
11885
+ this.configure(type, false);
11773
11886
  }
11774
- callback(err, result);
11775
- });
11776
- return this.all.apply(this, params);
11777
- };
11778
- let isVerbose = false;
11779
- const supportedEvents = ['trace', 'profile', 'change'];
11780
- Database.prototype.addListener = Database.prototype.on = function (type) {
11781
- const val = EventEmitter.prototype.addListener.apply(this, arguments);
11782
- if (supportedEvents.indexOf(type) >= 0) {
11783
- this.configure(type, true);
11784
- }
11785
- return val;
11786
- };
11787
- Database.prototype.removeListener = function (type) {
11788
- const val = EventEmitter.prototype.removeListener.apply(this, arguments);
11789
- if (supportedEvents.indexOf(type) >= 0 && !this._events[type]) {
11790
- this.configure(type, false);
11791
- }
11792
- return val;
11793
- };
11794
- Database.prototype.removeAllListeners = function (type) {
11795
- const val = EventEmitter.prototype.removeAllListeners.apply(this, arguments);
11796
- if (supportedEvents.indexOf(type) >= 0) {
11797
- this.configure(type, false);
11798
- }
11799
- return val;
11800
- };
11887
+ return val;
11888
+ };
11889
+ Database.prototype.removeAllListeners = function (type) {
11890
+ const val = EventEmitter.prototype.removeAllListeners.apply(this, arguments);
11891
+ if (supportedEvents.indexOf(type) >= 0) {
11892
+ this.configure(type, false);
11893
+ }
11894
+ return val;
11895
+ };
11801
11896
 
11802
- // Save the stack trace over EIO callbacks.
11803
- sqlite3.verbose = function () {
11804
- if (!isVerbose) {
11805
- const trace = requireTrace();
11806
- ['prepare', 'get', 'run', 'all', 'each', 'map', 'close', 'exec'].forEach(function (name) {
11807
- trace.extendTrace(Database.prototype, name);
11808
- });
11809
- ['bind', 'get', 'run', 'all', 'each', 'map', 'reset', 'finalize'].forEach(function (name) {
11810
- trace.extendTrace(Statement.prototype, name);
11811
- });
11812
- isVerbose = true;
11813
- }
11814
- return sqlite3;
11815
- };
11816
- })(sqlite3$1);
11817
- var sqlite3Exports = sqlite3$1.exports;
11897
+ // Save the stack trace over EIO callbacks.
11898
+ sqlite3.verbose = function () {
11899
+ if (!isVerbose) {
11900
+ const trace = requireTrace();
11901
+ ['prepare', 'get', 'run', 'all', 'each', 'map', 'close', 'exec'].forEach(function (name) {
11902
+ trace.extendTrace(Database.prototype, name);
11903
+ });
11904
+ ['bind', 'get', 'run', 'all', 'each', 'map', 'reset', 'finalize'].forEach(function (name) {
11905
+ trace.extendTrace(Statement.prototype, name);
11906
+ });
11907
+ isVerbose = true;
11908
+ }
11909
+ return sqlite3;
11910
+ };
11911
+ })(sqlite3$1);
11912
+ return sqlite3$1.exports;
11913
+ }
11914
+
11915
+ var sqlite3Exports = requireSqlite3();
11818
11916
  var sqlite3 = /*@__PURE__*/getDefaultExportFromCjs(sqlite3Exports);
11819
11917
 
11820
11918
  function SQLiteResult(error, insertId, rowsAffected, rows) {