indexeddbshim 15.1.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 +808 -700
  29. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  30. package/dist/indexeddbshim-UnicodeIdentifiers.js +315 -493
  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 +808 -700
  35. package/dist/indexeddbshim-node.cjs.map +1 -1
  36. package/dist/indexeddbshim-noninvasive.js +315 -493
  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 +315 -493
  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 +2 -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 +18 -6
  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 +3 -1
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v15.0.4 - 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
  }
@@ -1313,12 +1322,13 @@ function escapeIndexNameForSQLKeyColumn(index) {
1313
1322
  }
1314
1323
 
1315
1324
  /**
1325
+ * @todo Didn't need to escape `%`. Do we still need this escape?
1316
1326
  * @param {string} str
1317
1327
  * @returns {string}
1318
1328
  */
1319
1329
  function sqlLIKEEscape(str) {
1320
1330
  // https://www.sqlite.org/lang_expr.html#like
1321
- return sqlEscape(str).replaceAll('^', '^^');
1331
+ return str.replaceAll('^', '^^');
1322
1332
  }
1323
1333
 
1324
1334
  /**
@@ -2081,7 +2091,6 @@ try {
2081
2091
  // Native DOMException works as expected
2082
2092
  useNativeDOMException = true;
2083
2093
  }
2084
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
2085
2094
  } catch (err) {}
2086
2095
  const createDOMException = useNativeDOMException
2087
2096
  // eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
@@ -2688,7 +2697,7 @@ const signValues = ['negativeInfinity', 'bigNegative', 'smallNegative', 'smallPo
2688
2697
  * }
2689
2698
  * }}
2690
2699
  */
2691
- const types$1 = {
2700
+ const types = {
2692
2701
  invalid: {
2693
2702
  /**
2694
2703
  * @returns {string}
@@ -3190,7 +3199,7 @@ function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
3190
3199
  value: date.getTime()
3191
3200
  } : {
3192
3201
  type,
3193
- value: new Date(date.getTime())
3202
+ value: new Date(date)
3194
3203
  };
3195
3204
  }
3196
3205
  return {
@@ -3544,7 +3553,7 @@ function encode$1(key, inArray) {
3544
3553
  return null;
3545
3554
  }
3546
3555
  // array, date, number, string, binary (should already have detected "invalid")
3547
- return types$1[getKeyType(key)].encode(key, inArray);
3556
+ return types[getKeyType(key)].encode(key, inArray);
3548
3557
  }
3549
3558
 
3550
3559
  /**
@@ -3558,7 +3567,7 @@ function decode$1(key, inArray) {
3558
3567
  if (typeof key !== 'string') {
3559
3568
  return undefined;
3560
3569
  }
3561
- return types$1[encodedCharToKeyType[key.slice(0, 1)]].decode(key, inArray);
3570
+ return types[encodedCharToKeyType[key.slice(0, 1)]].decode(key, inArray);
3562
3571
  }
3563
3572
 
3564
3573
  /**
@@ -4010,7 +4019,6 @@ if (Object.defineProperty) {
4010
4019
  if (testObject.test) {
4011
4020
  cleanInterface = true;
4012
4021
  }
4013
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
4014
4022
  } catch (err) {
4015
4023
  // Object.defineProperty does not work as intended.
4016
4024
  }
@@ -4874,7 +4882,6 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
4874
4882
  }
4875
4883
  try {
4876
4884
  me.__tx.executeSql('ROLLBACK', [], abort, /** @type {SQLStatementErrorCallback} */abort); // Not working in some circumstances, even in Node
4877
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
4878
4885
  } catch (err) {
4879
4886
  // Browser errs when transaction has ended and since it most likely already erred here,
4880
4887
  // we call to abort
@@ -5001,7 +5008,7 @@ function ownKeys(e, t) {
5001
5008
  function _objectSpread2(e) {
5002
5009
  for (var t = 1; t < arguments.length; t++) {
5003
5010
  var r = null != arguments[t] ? arguments[t] : {};
5004
- t % 2 ? ownKeys(Object(r), !0).forEach(function (t) {
5011
+ t % 2 ? ownKeys(Object(r), true).forEach(function (t) {
5005
5012
  _defineProperty(e, t, r[t]);
5006
5013
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function (t) {
5007
5014
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
@@ -5023,18 +5030,18 @@ function _createClass(e, t, r) {
5023
5030
  return t && function _defineProperties(e, t) {
5024
5031
  for (var r = 0; r < t.length; r++) {
5025
5032
  var n = t[r];
5026
- 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);
5027
5034
  }
5028
5035
  }(e.prototype, t), Object.defineProperty(e, "prototype", {
5029
- writable: !1
5036
+ writable: false
5030
5037
  }), e;
5031
5038
  }
5032
5039
  function _defineProperty(e, t, r) {
5033
5040
  return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
5034
5041
  value: r,
5035
- enumerable: !0,
5036
- configurable: !0,
5037
- writable: !0
5042
+ enumerable: true,
5043
+ configurable: true,
5044
+ writable: true
5038
5045
  }) : e[t] = r, e;
5039
5046
  }
5040
5047
  function _slicedToArray(e, t) {
@@ -5048,15 +5055,15 @@ function _slicedToArray(e, t) {
5048
5055
  o,
5049
5056
  i,
5050
5057
  c = [],
5051
- s = !0,
5052
- u = !1;
5058
+ s = true,
5059
+ u = false;
5053
5060
  try {
5054
5061
  if (o = (r = r.call(e)).next, 0 === t) {
5055
5062
  if (Object(r) !== r) return;
5056
5063
  s = !1;
5057
5064
  } else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
5058
5065
  } catch (e) {
5059
- u = !0, a = e;
5066
+ u = true, a = e;
5060
5067
  } finally {
5061
5068
  try {
5062
5069
  if (!s && null != r.return && (i = r.return(), Object(i) !== i)) return;
@@ -5143,13 +5150,13 @@ e.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && Object.d
5143
5150
  var t = Object.hasOwn,
5144
5151
  r = Object.getPrototypeOf;
5145
5152
  function isThenable(e, t) {
5146
- return isObject(e) && "function" == typeof e.then && (!t);
5153
+ return isObject(e) && "function" == typeof e.then && (true || "function" == typeof e.catch);
5147
5154
  }
5148
5155
  function toStringTag(e) {
5149
5156
  return Object.prototype.toString.call(e).slice(8, -1);
5150
5157
  }
5151
5158
  function hasConstructorOf(e, n) {
5152
- if (!e || "object" !== _typeof(e)) return !1;
5159
+ if (!e || "object" !== _typeof(e)) return false;
5153
5160
  var a = r(e);
5154
5161
  if (!a) return null === n;
5155
5162
  var o = t(a, "constructor") && a.constructor;
@@ -5159,7 +5166,7 @@ function isPlainObject(e) {
5159
5166
  return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
5160
5167
  }
5161
5168
  function isUserObject(e) {
5162
- if (!e || "Object" !== toStringTag(e)) return !1;
5169
+ if (!e || "Object" !== toStringTag(e)) return false;
5163
5170
  var t = r(e);
5164
5171
  return !t || hasConstructorOf(e, Object) || isUserObject(t);
5165
5172
  }
@@ -5197,7 +5204,7 @@ function _await(e, t, r) {
5197
5204
  var n = Object.keys,
5198
5205
  a = Object.hasOwn,
5199
5206
  o = Array.isArray,
5200
- i$1 = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5207
+ i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
5201
5208
  function _async(e) {
5202
5209
  return function () {
5203
5210
  for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
@@ -5223,7 +5230,7 @@ var c = function () {
5223
5230
  key: "stringify",
5224
5231
  value: function stringify(e, t, r, n) {
5225
5232
  n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
5226
- stringification: !0
5233
+ stringification: true
5227
5234
  });
5228
5235
  var a = this.encapsulate(e, null, n);
5229
5236
  return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
@@ -5234,63 +5241,63 @@ var c = function () {
5234
5241
  key: "stringifySync",
5235
5242
  value: function stringifySync(e, t, r, n) {
5236
5243
  return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
5237
- throwOnBadSyncType: !0
5244
+ throwOnBadSyncType: true
5238
5245
  }, n), {}, {
5239
- sync: !0
5246
+ sync: true
5240
5247
  }));
5241
5248
  }
5242
5249
  }, {
5243
5250
  key: "stringifyAsync",
5244
5251
  value: function stringifyAsync(e, t, r, n) {
5245
5252
  return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
5246
- throwOnBadSyncType: !0
5253
+ throwOnBadSyncType: true
5247
5254
  }, n), {}, {
5248
- sync: !1
5255
+ sync: false
5249
5256
  }));
5250
5257
  }
5251
5258
  }, {
5252
5259
  key: "parse",
5253
5260
  value: function parse(e, t, r) {
5254
5261
  return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
5255
- parse: !0
5262
+ parse: true
5256
5263
  }), this.revive(JSON.parse(e, t), r);
5257
5264
  }
5258
5265
  }, {
5259
5266
  key: "parseSync",
5260
5267
  value: function parseSync(e, t, r) {
5261
5268
  return this.parse(e, t, _objectSpread2(_objectSpread2({
5262
- throwOnBadSyncType: !0
5269
+ throwOnBadSyncType: true
5263
5270
  }, r), {}, {
5264
- sync: !0
5271
+ sync: true
5265
5272
  }));
5266
5273
  }
5267
5274
  }, {
5268
5275
  key: "parseAsync",
5269
5276
  value: function parseAsync(e, t, r) {
5270
5277
  return this.parse(e, t, _objectSpread2(_objectSpread2({
5271
- throwOnBadSyncType: !0
5278
+ throwOnBadSyncType: true
5272
5279
  }, r), {}, {
5273
- sync: !1
5280
+ sync: false
5274
5281
  }));
5275
5282
  }
5276
5283
  }, {
5277
5284
  key: "specialTypeNames",
5278
5285
  value: function specialTypeNames(e, t) {
5279
5286
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
5280
- return r.returnTypeNames = !0, this.encapsulate(e, t, r);
5287
+ return r.returnTypeNames = true, this.encapsulate(e, t, r);
5281
5288
  }
5282
5289
  }, {
5283
5290
  key: "rootTypeName",
5284
5291
  value: function rootTypeName(e, t) {
5285
5292
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
5286
- return r.iterateNone = !0, this.encapsulate(e, t, r);
5293
+ return r.iterateNone = true, this.encapsulate(e, t, r);
5287
5294
  }
5288
5295
  }, {
5289
5296
  key: "encapsulate",
5290
5297
  value: function encapsulate(t, r, c) {
5291
5298
  var s = this,
5292
5299
  u = _objectSpread2(_objectSpread2({
5293
- sync: !0
5300
+ sync: true
5294
5301
  }, this.options), c),
5295
5302
  l = u.sync,
5296
5303
  f = {},
@@ -5298,8 +5305,8 @@ var c = function () {
5298
5305
  p = [],
5299
5306
  d = [],
5300
5307
  v = !("cyclic" in u) || u.cyclic,
5301
- m = u.encapsulateObserver,
5302
- b = function finish(e) {
5308
+ b = u.encapsulateObserver,
5309
+ m = function finish(e) {
5303
5310
  var t = Object.values(f);
5304
5311
  if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
5305
5312
  if (t.length) {
@@ -5320,7 +5327,7 @@ var c = function () {
5320
5327
  };
5321
5328
  } else isObject(e) && a(e, "$types") && (e = {
5322
5329
  $: e,
5323
- $types: !0
5330
+ $types: true
5324
5331
  });
5325
5332
  return !u.returnTypeNames && e;
5326
5333
  },
@@ -5329,7 +5336,7 @@ var c = function () {
5329
5336
  return e[1].p;
5330
5337
  })), function (n) {
5331
5338
  return _await(Promise.all(n.map(_async(function (n) {
5332
- var a = !1,
5339
+ var a = false,
5333
5340
  o = [],
5334
5341
  i = _slicedToArray(r.splice(0, 1), 1),
5335
5342
  c = _slicedToArray(i[0], 7),
@@ -5339,7 +5346,7 @@ var c = function () {
5339
5346
  f = c[4],
5340
5347
  y = c[5],
5341
5348
  p = c[6],
5342
- d = O(s, n, u, l, o, !0, p),
5349
+ d = O(s, n, u, l, o, true, p),
5343
5350
  v = hasConstructorOf(d, e);
5344
5351
  return function _invoke(e, t) {
5345
5352
  var r = e();
@@ -5348,7 +5355,7 @@ var c = function () {
5348
5355
  if (s && v) return _await(d.p, function (e) {
5349
5356
  f[y] = e;
5350
5357
  var r = h(t, o);
5351
- return a = !0, r;
5358
+ return a = true, r;
5352
5359
  });
5353
5360
  }, function (e) {
5354
5361
  return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
@@ -5360,22 +5367,22 @@ var c = function () {
5360
5367
  }),
5361
5368
  g = function _adaptBuiltinStateObjectProperties(e, t, r) {
5362
5369
  Object.assign(e, t);
5363
- var n = i$1.map(function (t) {
5370
+ var n = i.map(function (t) {
5364
5371
  var r = e[t];
5365
5372
  return delete e[t], r;
5366
5373
  });
5367
- r(), i$1.forEach(function (t, r) {
5374
+ r(), i.forEach(function (t, r) {
5368
5375
  e[t] = n[r];
5369
5376
  });
5370
5377
  },
5371
5378
  O = function _encapsulate(t, r, i, c, l, d, v) {
5372
- var b,
5379
+ var m,
5373
5380
  h = {},
5374
5381
  O = _typeof(r),
5375
- _ = m ? function (n) {
5382
+ _ = b ? function (n) {
5376
5383
  var a,
5377
5384
  o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
5378
- m(Object.assign(null != n ? n : h, {
5385
+ b(Object.assign(null != n ? n : h, {
5379
5386
  keypath: t,
5380
5387
  value: r,
5381
5388
  cyclic: i,
@@ -5387,30 +5394,30 @@ var c = function () {
5387
5394
  type: o
5388
5395
  }));
5389
5396
  } : null;
5390
- 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 = {
5391
- replaced: b
5392
- }) : 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;
5393
5400
  if (null === r) return _ && _(), r;
5394
5401
  if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
5395
5402
  var A = y.indexOf(r);
5396
5403
  if (!(A < 0)) return f[t] = "#", _ && _({
5397
5404
  cyclicKeypath: p[A]
5398
5405
  }), "#" + p[A];
5399
- !0 === i && (y.push(r), p.push(t));
5406
+ true === i && (y.push(r), p.push(t));
5400
5407
  }
5401
5408
  var S,
5402
5409
  j,
5403
5410
  T = isPlainObject(r),
5404
5411
  I = o(r),
5405
5412
  N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
5406
- if (N !== r ? (b = N, h = {
5413
+ if (N !== r ? (m = N, h = {
5407
5414
  replaced: N
5408
- }) : "" === 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 = {
5409
5416
  clone: S
5410
- }) : (["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 = {
5411
5418
  clone: S
5412
- }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
5413
- if (!S) return b;
5419
+ }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : m;
5420
+ if (!S) return m;
5414
5421
  if (c.iterateIn) {
5415
5422
  var P = function _loop(n) {
5416
5423
  var o = {
@@ -5424,27 +5431,27 @@ var c = function () {
5424
5431
  };
5425
5432
  for (var x in r) P(x);
5426
5433
  _ && _({
5427
- endIterateIn: !0,
5428
- end: !0
5434
+ endIterateIn: true,
5435
+ end: true
5429
5436
  });
5430
5437
  } else n(r).forEach(function (n) {
5431
5438
  var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
5432
5439
  g(c, {
5433
- ownKeys: !0
5440
+ ownKeys: true
5434
5441
  }, function () {
5435
5442
  var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
5436
5443
  hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
5437
5444
  });
5438
5445
  }), _ && _({
5439
- endIterateOwn: !0,
5440
- end: !0
5446
+ endIterateOwn: true,
5447
+ end: true
5441
5448
  });
5442
5449
  if (c.iterateUnsetNumeric) {
5443
5450
  for (var E = r.length, C = function _loop2(n) {
5444
5451
  if (!(n in r)) {
5445
5452
  var a = "".concat(t).concat(t ? "." : "").concat(n);
5446
5453
  g(c, {
5447
- ownKeys: !1
5454
+ ownKeys: false
5448
5455
  }, function () {
5449
5456
  var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
5450
5457
  hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
@@ -5452,8 +5459,8 @@ var c = function () {
5452
5459
  }
5453
5460
  }, B = 0; B < E; B++) C(B);
5454
5461
  _ && _({
5455
- endIterateUnsetNumeric: !0,
5456
- end: !0
5462
+ endIterateUnsetNumeric: true,
5463
+ end: true
5457
5464
  });
5458
5465
  }
5459
5466
  return S;
@@ -5469,19 +5476,19 @@ var c = function () {
5469
5476
  }
5470
5477
  if (Object.assign(r, {
5471
5478
  type: p,
5472
- replaced: !0
5479
+ replaced: true
5473
5480
  }), (l || !y.replaceAsync) && !y.replace) return i && i({
5474
- typeDetected: !0
5481
+ typeDetected: true
5475
5482
  }), O(e, t, v && "readonly", r, n, o, p);
5476
5483
  i && i({
5477
- replacing: !0
5484
+ replacing: true
5478
5485
  });
5479
- var m = void 0;
5486
+ var b = void 0;
5480
5487
  if (l || !y.replaceAsync) {
5481
5488
  if (void 0 === y.replace) throw new TypeError("Missing replacer");
5482
- m = y.replace(t, r);
5483
- } else m = y.replaceAsync(t, r);
5484
- 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);
5485
5492
  }
5486
5493
  }
5487
5494
  return t;
@@ -5489,26 +5496,26 @@ var c = function () {
5489
5496
  _ = O("", t, v, null != r ? r : {}, d);
5490
5497
  if (d.length) return l && u.throwOnBadSyncType ? function () {
5491
5498
  throw new TypeError("Sync method requested but async result obtained");
5492
- }() : Promise.resolve(h(_, d)).then(b);
5499
+ }() : Promise.resolve(h(_, d)).then(m);
5493
5500
  if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
5494
- return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
5501
+ return u.stringification && l ? [m(_)] : l ? m(_) : Promise.resolve(m(_));
5495
5502
  }
5496
5503
  }, {
5497
5504
  key: "encapsulateSync",
5498
5505
  value: function encapsulateSync(e, t, r) {
5499
5506
  return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
5500
- throwOnBadSyncType: !0
5507
+ throwOnBadSyncType: true
5501
5508
  }, r), {}, {
5502
- sync: !0
5509
+ sync: true
5503
5510
  }));
5504
5511
  }
5505
5512
  }, {
5506
5513
  key: "encapsulateAsync",
5507
5514
  value: function encapsulateAsync(e, t, r) {
5508
5515
  return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
5509
- throwOnBadSyncType: !0
5516
+ throwOnBadSyncType: true
5510
5517
  }, r), {}, {
5511
- sync: !1
5518
+ sync: false
5512
5519
  }));
5513
5520
  }
5514
5521
  }, {
@@ -5516,7 +5523,7 @@ var c = function () {
5516
5523
  value: function revive(t, r) {
5517
5524
  var a = this,
5518
5525
  i = _objectSpread2(_objectSpread2({
5519
- sync: !0
5526
+ sync: true
5520
5527
  }, this.options), r),
5521
5528
  c = i.sync;
5522
5529
  function finishRevival(e) {
@@ -5526,12 +5533,12 @@ var c = function () {
5526
5533
  }
5527
5534
  if (!t || "object" !== _typeof(t) || Array.isArray(t)) return finishRevival(t);
5528
5535
  var u = t.$types;
5529
- if (!0 === u) return finishRevival(t.$);
5536
+ if (true === u) return finishRevival(t.$);
5530
5537
  if (!u || "object" !== _typeof(u) || Array.isArray(u)) return finishRevival(t);
5531
5538
  var l = [],
5532
5539
  f = {},
5533
- y = !0;
5534
- u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
5540
+ y = true;
5541
+ u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = false);
5535
5542
  var p = function executeReviver(e, t) {
5536
5543
  var r,
5537
5544
  n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
@@ -5546,7 +5553,7 @@ var c = function () {
5546
5553
  return hasConstructorOf(e, s) ? void 0 : e;
5547
5554
  }
5548
5555
  var v,
5549
- m = function revivePlainObjects() {
5556
+ b = function revivePlainObjects() {
5550
5557
  var r = [];
5551
5558
  if (!u) throw new Error("Found bad `types`");
5552
5559
  if (Object.entries(u).forEach(function (e) {
@@ -5578,28 +5585,28 @@ var c = function () {
5578
5585
  c === i && (t = c);
5579
5586
  }, void 0);
5580
5587
  }();
5581
- return hasConstructorOf(m, e) ? v = m.then(function () {
5588
+ return hasConstructorOf(b, e) ? v = b.then(function () {
5582
5589
  return t;
5583
5590
  }) : (v = function _revive(t, r, a, i, c) {
5584
5591
  if (!y || "$types" !== t) {
5585
5592
  var f = u[t],
5586
5593
  v = o(r);
5587
5594
  if (v || isPlainObject(r)) {
5588
- var m = v ? new Array(r.length) : {};
5595
+ var b = v ? new Array(r.length) : {};
5589
5596
  for (n(r).forEach(function (n) {
5590
- 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),
5591
5598
  i = function set(e) {
5592
- 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;
5593
5600
  };
5594
5601
  hasConstructorOf(o, e) ? d.push(o.then(function (e) {
5595
5602
  return i(e);
5596
5603
  })) : i(o);
5597
- }), r = m; l.length;) {
5598
- var b = _slicedToArray(l[0], 4),
5599
- h = b[0],
5600
- g = b[1],
5601
- O = b[2],
5602
- 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],
5603
5610
  _ = getByKeyPath(h, g);
5604
5611
  if (void 0 === _) break;
5605
5612
  O[w] = _, l.splice(0, 1);
@@ -5632,18 +5639,18 @@ var c = function () {
5632
5639
  key: "reviveSync",
5633
5640
  value: function reviveSync(e, t) {
5634
5641
  return this.revive(e, _objectSpread2(_objectSpread2({
5635
- throwOnBadSyncType: !0
5642
+ throwOnBadSyncType: true
5636
5643
  }, t), {}, {
5637
- sync: !0
5644
+ sync: true
5638
5645
  }));
5639
5646
  }
5640
5647
  }, {
5641
5648
  key: "reviveAsync",
5642
5649
  value: function reviveAsync(e, t) {
5643
5650
  return this.revive(e, _objectSpread2(_objectSpread2({
5644
- throwOnBadSyncType: !0
5651
+ throwOnBadSyncType: true
5645
5652
  }, t), {}, {
5646
- sync: !1
5653
+ sync: false
5647
5654
  }));
5648
5655
  }
5649
5656
  }, {
@@ -5740,26 +5747,27 @@ const v = {
5740
5747
  index: r
5741
5748
  } : (t.buffers.push(e), {
5742
5749
  s: p(e),
5743
- maxByteLength: e.maxByteLength
5750
+ maxByteLength: e.maxByteLength,
5751
+ resizable: e.resizable
5744
5752
  });
5745
5753
  },
5746
5754
  revive(e, t) {
5747
5755
  if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
5748
- const r = d(e.s, {
5756
+ const r = d(e.s, e.resizable ? {
5749
5757
  maxByteLength: e.maxByteLength
5750
- });
5758
+ } : void 0);
5751
5759
  return t.buffers.push(r), r;
5752
5760
  }
5753
5761
  }
5754
5762
  },
5755
- m = {
5763
+ b = {
5756
5764
  bigintObject: {
5757
5765
  test: e => "object" == typeof e && hasConstructorOf(e, BigInt),
5758
5766
  replace: String,
5759
5767
  revive: e => new Object(BigInt(e))
5760
5768
  }
5761
5769
  },
5762
- b = {
5770
+ m = {
5763
5771
  bigint: {
5764
5772
  test: e => "bigint" == typeof e,
5765
5773
  replace: String,
@@ -5779,7 +5787,7 @@ const h = {
5779
5787
  test: e => "Blob" === toStringTag(e),
5780
5788
  replace(e) {
5781
5789
  const t = new XMLHttpRequest();
5782
- 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);
5783
5791
  return {
5784
5792
  type: e.type,
5785
5793
  stringContents: t.responseText
@@ -5829,7 +5837,7 @@ const w = {
5829
5837
  algorithm: r,
5830
5838
  usages: n
5831
5839
  } = e;
5832
- return crypto.subtle.importKey("jwk", t, r, !0, n);
5840
+ return crypto.subtle.importKey("jwk", t, r, true, n);
5833
5841
  }
5834
5842
  }
5835
5843
  },
@@ -5850,6 +5858,7 @@ const w = {
5850
5858
  } : (n.buffers.push(e), {
5851
5859
  encoded: p(e),
5852
5860
  maxByteLength: e.maxByteLength,
5861
+ resizable: e.resizable,
5853
5862
  byteOffset: t,
5854
5863
  byteLength: r
5855
5864
  });
@@ -5861,12 +5870,13 @@ const w = {
5861
5870
  byteLength: n,
5862
5871
  encoded: a,
5863
5872
  index: o,
5864
- maxByteLength: i
5873
+ maxByteLength: i,
5874
+ resizable: c
5865
5875
  } = e;
5866
- let c;
5867
- 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 ? {
5868
5878
  maxByteLength: i
5869
- }), t.buffers.push(c)), new DataView(c, r, n);
5879
+ } : i), t.buffers.push(s)), new DataView(s, r, n);
5870
5880
  }
5871
5881
  }
5872
5882
  },
@@ -6042,7 +6052,7 @@ const E = {
6042
6052
  test: e => "File" === toStringTag(e),
6043
6053
  replace(e) {
6044
6054
  const t = new XMLHttpRequest();
6045
- 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);
6046
6056
  return {
6047
6057
  type: e.type,
6048
6058
  stringContents: t.responseText,
@@ -6180,7 +6190,7 @@ const E = {
6180
6190
  revive: () => -0
6181
6191
  }
6182
6192
  },
6183
- V = {
6193
+ J = {
6184
6194
  StringObject: {
6185
6195
  test: e => "String" === toStringTag(e) && "object" == typeof e,
6186
6196
  replace: String,
@@ -6197,7 +6207,7 @@ const E = {
6197
6207
  revive: e => new Number(e)
6198
6208
  }
6199
6209
  },
6200
- Y = {
6210
+ q = {
6201
6211
  regexp: {
6202
6212
  test: e => "RegExp" === toStringTag(e),
6203
6213
  replace: e => ({
@@ -6210,7 +6220,7 @@ const E = {
6210
6220
  }) => new RegExp(e, t)
6211
6221
  }
6212
6222
  },
6213
- H = {
6223
+ G = {
6214
6224
  set: {
6215
6225
  test: e => "Set" === toStringTag(e),
6216
6226
  replace: e => [...e.values()],
@@ -6244,6 +6254,7 @@ const X = {};
6244
6254
  length: r
6245
6255
  } : (n.buffers.push(e), {
6246
6256
  maxByteLength: e.maxByteLength,
6257
+ resizable: e.resizable,
6247
6258
  encoded: p(e),
6248
6259
  byteOffset: t,
6249
6260
  length: r
@@ -6256,12 +6267,13 @@ const X = {};
6256
6267
  length: a,
6257
6268
  encoded: o,
6258
6269
  index: i,
6259
- maxByteLength: c
6270
+ maxByteLength: c,
6271
+ resizable: s
6260
6272
  } = t;
6261
- let s;
6262
- 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 ? {
6263
6275
  maxByteLength: c
6264
- }), r.buffers.push(s)), new e(s, n, a);
6276
+ } : void 0), r.buffers.push(u)), new e(u, n, a);
6265
6277
  }
6266
6278
  };
6267
6279
  }(e));
@@ -6283,9 +6295,9 @@ const Z = {
6283
6295
  },
6284
6296
  te = [{
6285
6297
  arrayNonindexKeys: {
6286
- testPlainObjects: !0,
6287
- test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = !0), !0),
6288
- 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),
6289
6301
  revive(e) {
6290
6302
  if (Array.isArray(e)) return e;
6291
6303
  const t = [];
@@ -6296,19 +6308,19 @@ const Z = {
6296
6308
  }
6297
6309
  }, {
6298
6310
  sparseUndefined: {
6299
- test: (e, t) => void 0 === e && !1 === t.ownKeys,
6311
+ test: (e, t) => void 0 === e && false === t.ownKeys,
6300
6312
  replace: () => 0,
6301
6313
  revive() {}
6302
6314
  }
6303
6315
  }],
6304
6316
  re = [K, U, F, $],
6305
- 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 : []),
6306
6318
  se = ce.concat({
6307
6319
  checkDataCloneException: {
6308
6320
  test(e) {
6309
6321
  const t = {}.toString.call(e).slice(8, -1);
6310
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");
6311
- return !1;
6323
+ return false;
6312
6324
  }
6313
6325
  }
6314
6326
  });
@@ -6652,7 +6664,6 @@ IDBIndex.__createIndex = function (store, index) {
6652
6664
  tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
6653
6665
  addIndexEntry(i + 1);
6654
6666
  }, /** @type {SQLStatementErrorCallback} */error);
6655
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
6656
6667
  } catch (err) {
6657
6668
  // Not a valid value to insert into index, so just continue
6658
6669
  addIndexEntry(i + 1);
@@ -6779,7 +6790,6 @@ IDBIndex.__deleteIndex = function (store, index) {
6779
6790
  IDBIndex.__updateIndexList = function (store, tx, success, failure) {
6780
6791
  /** @type {IndexList} **/
6781
6792
  const indexList = {};
6782
- // eslint-disable-next-line sonarjs/prefer-for-of -- Implement iterability?
6783
6793
  for (let i = 0; i < store.indexNames.length; i++) {
6784
6794
  const idx = store.__indexes[store.indexNames[i]];
6785
6795
  indexList[idx.name] = {
@@ -7151,8 +7161,11 @@ function executeFetchIndexData(count, unboundedDisallowed, index, hasKey, range,
7151
7161
  */
7152
7162
  check => rowKey.includes(check)) ||
7153
7163
  // More precise than our SQL
7154
- isMultiEntryMatch(/** @type {string} */
7155
- encodedKey, row[escapedIndexNameForKeyCol]))) {
7164
+ isMultiEntryMatch(
7165
+ // Added `JSON.stringify` as was having problems with
7166
+ // `JSON.stringify` encoding added to nested
7167
+ // array keys
7168
+ JSON.stringify(encodedKey).slice(1, -1), row[escapedIndexNameForKeyCol]))) {
7156
7169
  recordCount++;
7157
7170
  record = row;
7158
7171
  } else if (!hasKey && !multiChecks) {
@@ -7225,7 +7238,13 @@ function buildFetchIndexDataSQL(nullDisallowed, index, range, opType, multiCheck
7225
7238
  sql.push(')');
7226
7239
  } else if (index.multiEntry) {
7227
7240
  sql.push('AND', escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^'");
7228
- sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(range, index.multiEntry)) + '%');
7241
+ if (Array.isArray(range)) {
7242
+ // Todo: For nesting deeper than one level, we probably need to
7243
+ // run `JSON.stringify` again
7244
+ sqlValues.push('%' + sqlLIKEEscape(JSON.stringify(/** @type {string} */encode$1(range, index.multiEntry)).slice(1, -1)) + '%');
7245
+ } else {
7246
+ sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(range, index.multiEntry)) + '%');
7247
+ }
7229
7248
  } else {
7230
7249
  const convertedRange = convertValueToKeyRange(range, nullDisallowed);
7231
7250
  setSQLForKeyRange(convertedRange, escapeIndexNameForSQL(index.name), sql, sqlValues, true, false);
@@ -7730,7 +7749,6 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
7730
7749
  if ('invalid' in indexKey && indexKey.invalid || 'failure' in indexKey && indexKey.failure) {
7731
7750
  throw new Error('Go to catch');
7732
7751
  }
7733
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
7734
7752
  } catch (err) {
7735
7753
  resolve(undefined);
7736
7754
  return;
@@ -8830,7 +8848,7 @@ let nameCounter = 0;
8830
8848
  */
8831
8849
  function getLatestCachedWebSQLVersion(name) {
8832
8850
  return Object.keys(websqlDBCache[name]).map(Number).reduce((prev, curr) => {
8833
- return curr > prev ? curr : prev;
8851
+ return Math.max(curr, prev);
8834
8852
  }, 0);
8835
8853
  }
8836
8854
 
@@ -9112,7 +9130,6 @@ IDBFactory.prototype.open = function (name /* , version */) {
9112
9130
  if (err) {
9113
9131
  try {
9114
9132
  systx.executeSql('ROLLBACK', [], cb, cb);
9115
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
9116
9133
  } catch (err) {
9117
9134
  // Browser may fail with expired transaction above so
9118
9135
  // no choice but to manually revert
@@ -9220,7 +9237,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
9220
9237
  // eslint-disable-next-line camelcase -- Clear API
9221
9238
  req.transaction.on__complete = function () {
9222
9239
  const pos = connection.__transactions.indexOf(req.transaction);
9223
- if (pos > -1) {
9240
+ if (pos !== -1) {
9224
9241
  connection.__transactions.splice(pos, 1);
9225
9242
  }
9226
9243
  if (/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
@@ -10475,6 +10492,8 @@ Object.defineProperty(IDBCursorWithValue, 'prototype', {
10475
10492
  writable: false
10476
10493
  });
10477
10494
 
10495
+ /* eslint-disable unicorn/prefer-global-this -- Older browsers? */
10496
+
10478
10497
  /**
10479
10498
  * @typedef {any} AnyValue
10480
10499
  */
@@ -10620,7 +10639,6 @@ function setGlobalVars(idb, initialConfig) {
10620
10639
  Object.getOwnPropertyDescriptor(o, name);
10621
10640
  }
10622
10641
  Object.defineProperty(IDB, name, desc);
10623
- // eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
10624
10642
  } catch (err) {
10625
10643
  // With `indexedDB`, PhantomJS fails here and below but
10626
10644
  // not above, while Chrome is reverse (and Firefox doesn't
@@ -10819,237 +10837,301 @@ function getDefaultExportFromCjs (x) {
10819
10837
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10820
10838
  }
10821
10839
 
10822
- var nextTick$1 = {};
10840
+ var nextTick = {};
10823
10841
 
10824
- nextTick$1.test = function () {
10825
- // Don't get fooled by e.g. browserify environments.
10826
- return typeof process !== 'undefined' && !process.browser;
10827
- };
10828
- nextTick$1.install = function (func) {
10829
- return function () {
10830
- 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;
10831
10849
  };
10832
- };
10850
+ nextTick.install = function (func) {
10851
+ return function () {
10852
+ process.nextTick(func);
10853
+ };
10854
+ };
10855
+ return nextTick;
10856
+ }
10833
10857
 
10834
10858
  var queueMicrotask = {};
10835
10859
 
10836
- queueMicrotask.test = function () {
10837
- return typeof commonjsGlobal.queueMicrotask === 'function';
10838
- };
10839
- queueMicrotask.install = function (func) {
10840
- return function () {
10841
- 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';
10842
10866
  };
10843
- };
10867
+ queueMicrotask.install = function (func) {
10868
+ return function () {
10869
+ commonjsGlobal.queueMicrotask(func);
10870
+ };
10871
+ };
10872
+ return queueMicrotask;
10873
+ }
10844
10874
 
10845
10875
  var mutation = {};
10846
10876
 
10847
- //based off rsvp https://github.com/tildeio/rsvp.js
10848
- //license https://github.com/tildeio/rsvp.js/blob/master/LICENSE
10849
- //https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/asap.js
10850
-
10851
- var Mutation = commonjsGlobal.MutationObserver || commonjsGlobal.WebKitMutationObserver;
10852
- mutation.test = function () {
10853
- return Mutation;
10854
- };
10855
- mutation.install = function (handle) {
10856
- var called = 0;
10857
- var observer = new Mutation(handle);
10858
- var element = commonjsGlobal.document.createTextNode('');
10859
- observer.observe(element, {
10860
- characterData: true
10861
- });
10862
- return function () {
10863
- 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;
10864
10888
  };
10865
- };
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
+ }
10866
10902
 
10867
10903
  var messageChannel = {};
10868
10904
 
10869
- messageChannel.test = function () {
10870
- if (commonjsGlobal.setImmediate) {
10871
- // we can only get here in IE10
10872
- // which doesn't handel postMessage well
10873
- return false;
10874
- }
10875
- return typeof commonjsGlobal.MessageChannel !== 'undefined';
10876
- };
10877
- messageChannel.install = function (func) {
10878
- var channel = new commonjsGlobal.MessageChannel();
10879
- channel.port1.onmessage = func;
10880
- return function () {
10881
- 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';
10882
10916
  };
10883
- };
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
+ }
10884
10926
 
10885
10927
  var stateChange = {};
10886
10928
 
10887
- stateChange.test = function () {
10888
- return 'document' in commonjsGlobal && 'onreadystatechange' in commonjsGlobal.document.createElement('script');
10889
- };
10890
- stateChange.install = function (handle) {
10891
- return function () {
10892
- // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
10893
- // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
10894
- var scriptEl = commonjsGlobal.document.createElement('script');
10895
- scriptEl.onreadystatechange = function () {
10896
- handle();
10897
- scriptEl.onreadystatechange = null;
10898
- scriptEl.parentNode.removeChild(scriptEl);
10899
- 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;
10900
10949
  };
10901
- commonjsGlobal.document.documentElement.appendChild(scriptEl);
10902
- return handle;
10903
10950
  };
10904
- };
10951
+ return stateChange;
10952
+ }
10905
10953
 
10906
10954
  var timeout = {};
10907
10955
 
10908
- timeout.test = function () {
10909
- return true;
10910
- };
10911
- timeout.install = function (t) {
10912
- return function () {
10913
- setTimeout(t, 0);
10956
+ var hasRequiredTimeout;
10957
+ function requireTimeout() {
10958
+ if (hasRequiredTimeout) return timeout;
10959
+ hasRequiredTimeout = 1;
10960
+ timeout.test = function () {
10961
+ return true;
10914
10962
  };
10915
- };
10916
-
10917
- var types = [nextTick$1, queueMicrotask, mutation, messageChannel, stateChange, timeout];
10918
- var draining;
10919
- var currentQueue;
10920
- var queueIndex = -1;
10921
- var queue = [];
10922
- var scheduled = false;
10923
- function cleanUpNextTick() {
10924
- if (!draining || !currentQueue) {
10925
- return;
10926
- }
10927
- draining = false;
10928
- if (currentQueue.length) {
10929
- queue = currentQueue.concat(queue);
10930
- } else {
10931
- queueIndex = -1;
10932
- }
10933
- if (queue.length) {
10934
- 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
+ }
10935
10995
  }
10936
- }
10937
10996
 
10938
- //named nextTick for less confusing stack traces
10939
- function nextTick() {
10940
- if (draining) {
10941
- return;
10942
- }
10943
- scheduled = false;
10944
- draining = true;
10945
- var len = queue.length;
10946
- var timeout = setTimeout(cleanUpNextTick);
10947
- while (len) {
10948
- currentQueue = queue;
10949
- queue = [];
10950
- while (currentQueue && ++queueIndex < len) {
10951
- currentQueue[queueIndex].run();
10997
+ //named nextTick for less confusing stack traces
10998
+ function nextTick() {
10999
+ if (draining) {
11000
+ return;
10952
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;
11014
+ }
11015
+ currentQueue = null;
10953
11016
  queueIndex = -1;
10954
- len = queue.length;
10955
- }
10956
- currentQueue = null;
10957
- queueIndex = -1;
10958
- draining = false;
10959
- clearTimeout(timeout);
10960
- }
10961
- var scheduleDrain;
10962
- var i = -1;
10963
- var len = types.length;
10964
- while (++i < len) {
10965
- if (types[i] && types[i].test && types[i].test()) {
10966
- scheduleDrain = types[i].install(nextTick);
10967
- break;
10968
- }
10969
- }
10970
- // v8 likes predictible objects
10971
- function Item(fun, array) {
10972
- this.fun = fun;
10973
- this.array = array;
10974
- }
10975
- Item.prototype.run = function () {
10976
- var fun = this.fun;
10977
- var array = this.array;
10978
- switch (array.length) {
10979
- case 0:
10980
- return fun();
10981
- case 1:
10982
- return fun(array[0]);
10983
- case 2:
10984
- return fun(array[0], array[1]);
10985
- case 3:
10986
- return fun(array[0], array[1], array[2]);
10987
- default:
10988
- return fun.apply(null, array);
10989
- }
10990
- };
10991
- var lib = immediate;
10992
- function immediate(task) {
10993
- var args = new Array(arguments.length - 1);
10994
- if (arguments.length > 1) {
10995
- for (var i = 1; i < arguments.length; i++) {
10996
- 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;
10997
11027
  }
10998
11028
  }
10999
- queue.push(new Item(task, args));
11000
- if (!scheduled && !draining) {
11001
- scheduled = true;
11002
- 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
+ }
11003
11063
  }
11064
+ return lib;
11004
11065
  }
11005
- var immediate$1 = /*@__PURE__*/getDefaultExportFromCjs(lib);
11006
11066
 
11007
- // Simple FIFO queue implementation to avoid having to do shift()
11008
- // on an array, which is slow.
11067
+ var libExports = requireLib();
11068
+ var immediate = /*@__PURE__*/getDefaultExportFromCjs(libExports);
11009
11069
 
11010
- function Queue() {
11011
- this.length = 0;
11012
- }
11013
- Queue.prototype.push = function (item) {
11014
- var node = {
11015
- item: item
11016
- };
11017
- if (this.last) {
11018
- this.last = this.last.next = node;
11019
- } else {
11020
- 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;
11021
11081
  }
11022
- this.length++;
11023
- };
11024
- Queue.prototype.shift = function () {
11025
- var node = this.first;
11026
- if (node) {
11027
- this.first = node.next;
11028
- if (! --this.length) {
11029
- 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;
11030
11090
  }
11031
- return node.item;
11032
- }
11033
- };
11034
- Queue.prototype.slice = function (start, end) {
11035
- start = typeof start === 'undefined' ? 0 : start;
11036
- end = typeof end === 'undefined' ? Infinity : end;
11037
- var output = [];
11038
- var i = 0;
11039
- for (var node = this.first; node; node = node.next) {
11040
- if (--end < 0) {
11041
- break;
11042
- } else if (++i > start) {
11043
- 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;
11044
11101
  }
11045
- }
11046
- return output;
11047
- };
11048
- var tinyQueue = Queue;
11049
- 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
+ }
11050
11120
 
11051
- var noopFn = function () {};
11052
- 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);
11053
11135
 
11054
11136
  function WebSQLRows(array) {
11055
11137
  this._array = array;
@@ -11164,8 +11246,8 @@ function WebSQLTransaction(websqlDatabase, executeDelay) {
11164
11246
  this._error = null;
11165
11247
  this._complete = false;
11166
11248
  this._runningTimeout = false;
11167
- this._executeDelay = executeDelay || immediate$1;
11168
- this._sqlQueue = new Queue$1();
11249
+ this._executeDelay = executeDelay || immediate;
11250
+ this._sqlQueue = new Queue();
11169
11251
  if (!websqlDatabase._currentTask.readOnly) {
11170
11252
  // Since we serialize all access to the database, there is no need to
11171
11253
  // run read-only tasks in a transaction. This is a perf boost.
@@ -11209,10 +11291,10 @@ function TransactionTask(readOnly, txnCallback, errorCallback, successCallback,
11209
11291
  function WebSQLDatabase(dbVersion, db, webSQLOverrides) {
11210
11292
  this.version = dbVersion;
11211
11293
  this._db = db;
11212
- this._txnQueue = new Queue$1();
11294
+ this._txnQueue = new Queue();
11213
11295
  this._running = false;
11214
11296
  this._currentTask = null;
11215
- this._transactionDelay = webSQLOverrides.transactionDelay || immediate$1;
11297
+ this._transactionDelay = webSQLOverrides.transactionDelay || immediate;
11216
11298
  this._executeDelay = webSQLOverrides.executeDelay;
11217
11299
  }
11218
11300
  WebSQLDatabase.prototype._onTransactionComplete = function (err) {
@@ -11316,7 +11398,7 @@ function customOpenDatabase(SQLiteDatabase, opts) {
11316
11398
  opts = opts || {};
11317
11399
  var sqliteOpts = opts.sqlite;
11318
11400
  var webSQLOverrides = opts.websql || {};
11319
- var openDelay = webSQLOverrides.openDelay || immediate$1;
11401
+ var openDelay = webSQLOverrides.openDelay || immediate;
11320
11402
  function createDb(dbName, dbVersion) {
11321
11403
  var sqliteDatabase = new SQLiteDatabase(dbName, sqliteOpts);
11322
11404
  return new WebSQLDatabase(dbVersion, sqliteDatabase, webSQLOverrides);
@@ -11348,249 +11430,268 @@ function commonjsRequire(path) {
11348
11430
 
11349
11431
  var bindings = {exports: {}};
11350
11432
 
11351
- /**
11352
- * Module dependencies.
11353
- */
11433
+ var fileUriToPath_1;
11434
+ var hasRequiredFileUriToPath;
11435
+ function requireFileUriToPath() {
11436
+ if (hasRequiredFileUriToPath) return fileUriToPath_1;
11437
+ hasRequiredFileUriToPath = 1;
11438
+ /**
11439
+ * Module dependencies.
11440
+ */
11354
11441
 
11355
- var sep = path.sep || '/';
11442
+ var sep = path.sep || '/';
11356
11443
 
11357
- /**
11358
- * Module exports.
11359
- */
11444
+ /**
11445
+ * Module exports.
11446
+ */
11360
11447
 
11361
- var fileUriToPath_1 = fileUriToPath;
11448
+ fileUriToPath_1 = fileUriToPath;
11362
11449
 
11363
- /**
11364
- * File URI to Path function.
11365
- *
11366
- * @param {String} uri
11367
- * @return {String} path
11368
- * @api public
11369
- */
11450
+ /**
11451
+ * File URI to Path function.
11452
+ *
11453
+ * @param {String} uri
11454
+ * @return {String} path
11455
+ * @api public
11456
+ */
11370
11457
 
11371
- function fileUriToPath(uri) {
11372
- if ('string' != typeof uri || uri.length <= 7 || 'file://' != uri.substring(0, 7)) {
11373
- throw new TypeError('must pass in a file:// URI to convert to a file path');
11374
- }
11375
- var rest = decodeURI(uri.substring(7));
11376
- var firstSlash = rest.indexOf('/');
11377
- var host = rest.substring(0, firstSlash);
11378
- 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);
11379
11466
 
11380
- // 2. Scheme Definition
11381
- // As a special case, <host> can be the string "localhost" or the empty
11382
- // string; this is interpreted as "the machine from which the URL is
11383
- // being interpreted".
11384
- if ('localhost' == host) host = '';
11385
- if (host) {
11386
- host = sep + sep + host;
11387
- }
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
+ }
11388
11475
 
11389
- // 3.2 Drives, drive letters, mount points, file system root
11390
- // Drive letters are mapped into the top of a file URI in various ways,
11391
- // depending on the implementation; some applications substitute
11392
- // vertical bar ("|") for the colon after the drive letter, yielding
11393
- // "file:///c|/tmp/test.txt". In some cases, the colon is left
11394
- // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
11395
- // colon is simply omitted, as in "file:///c/tmp/test.txt".
11396
- 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:');
11397
11484
 
11398
- // for Windows, we need to invert the path separators from what a URI uses
11399
- if (sep == '\\') {
11400
- path = path.replace(/\//g, '\\');
11401
- }
11402
- if (/^.+\:/.test(path)) ; else {
11403
- // unix path…
11404
- 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;
11405
11494
  }
11406
- return host + path;
11495
+ return fileUriToPath_1;
11407
11496
  }
11408
11497
 
11409
11498
  /**
11410
11499
  * Module dependencies.
11411
11500
  */
11412
- (function (module, exports) {
11413
- var fs = require$$0,
11414
- path$1 = path,
11415
- fileURLToPath = fileUriToPath_1,
11416
- join = path$1.join,
11417
- dirname = path$1.dirname,
11418
- exists = fs.accessSync && function (path) {
11419
- try {
11420
- fs.accessSync(path);
11421
- } catch (e) {
11422
- 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 = {};
11423
11560
  }
11424
- return true;
11425
- } || fs.existsSync || path$1.existsSync,
11426
- defaults = {
11427
- arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
11428
- compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
11429
- platform: process.platform,
11430
- arch: process.arch,
11431
- nodePreGyp: 'node-v' + process.versions.modules + '-' + process.platform + '-' + process.arch,
11432
- version: process.versions.node,
11433
- bindings: 'bindings.node',
11434
- try: [
11435
- // node-gyp's linked version in the "build" dir
11436
- ['module_root', 'build', 'bindings'],
11437
- // node-waf and gyp_addon (a.k.a node-gyp)
11438
- ['module_root', 'build', 'Debug', 'bindings'], ['module_root', 'build', 'Release', 'bindings'],
11439
- // Debug files, for development (legacy behavior, remove for node v0.9)
11440
- ['module_root', 'out', 'Debug', 'bindings'], ['module_root', 'Debug', 'bindings'],
11441
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
11442
- ['module_root', 'out', 'Release', 'bindings'], ['module_root', 'Release', 'bindings'],
11443
- // Legacy from node-waf, node <= 0.4.x
11444
- ['module_root', 'build', 'default', 'bindings'],
11445
- // Production "Release" buildtype binary (meh...)
11446
- ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
11447
- // node-qbs builds
11448
- ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
11449
- // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
11450
- ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']]
11451
- };
11452
11561
 
11453
- /**
11454
- * The main `bindings()` function loads the compiled bindings for a given module.
11455
- * It uses V8's Error API to determine the parent filename that this function is
11456
- * being invoked from, which is then used to find the root directory.
11457
- */
11562
+ // maps `defaults` onto `opts` object
11563
+ Object.keys(defaults).map(function (i) {
11564
+ if (!(i in opts)) opts[i] = defaults[i];
11565
+ });
11458
11566
 
11459
- function bindings(opts) {
11460
- // Argument surgery
11461
- if (typeof opts == 'string') {
11462
- opts = {
11463
- bindings: opts
11464
- };
11465
- } else if (!opts) {
11466
- opts = {};
11467
- }
11567
+ // Get the module root
11568
+ if (!opts.module_root) {
11569
+ opts.module_root = exports.getRoot(exports.getFileName());
11570
+ }
11468
11571
 
11469
- // maps `defaults` onto `opts` object
11470
- Object.keys(defaults).map(function (i) {
11471
- if (!(i in opts)) opts[i] = defaults[i];
11472
- });
11572
+ // Ensure the given bindings name ends with .node
11573
+ if (path$1.extname(opts.bindings) != '.node') {
11574
+ opts.bindings += '.node';
11575
+ }
11473
11576
 
11474
- // Get the module root
11475
- if (!opts.module_root) {
11476
- opts.module_root = exports.getRoot(exports.getFileName());
11477
- }
11478
-
11479
- // Ensure the given bindings name ends with .node
11480
- if (path$1.extname(opts.bindings) != '.node') {
11481
- opts.bindings += '.node';
11482
- }
11483
-
11484
- // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
11485
- var requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : commonjsRequire;
11486
- var tries = [],
11487
- i = 0,
11488
- l = opts.try.length,
11489
- n,
11490
- b,
11491
- err;
11492
- for (; i < l; i++) {
11493
- n = join.apply(null, opts.try[i].map(function (p) {
11494
- return opts[p] || p;
11495
- }));
11496
- tries.push(n);
11497
- try {
11498
- b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
11499
- if (!opts.path) {
11500
- b.path = n;
11501
- }
11502
- return b;
11503
- } catch (e) {
11504
- if (e.code !== 'MODULE_NOT_FOUND' && e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && !/not find/i.test(e.message)) {
11505
- 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
+ }
11506
11600
  }
11507
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;
11508
11607
  }
11509
- err = new Error('Could not locate the bindings file. Tried:\n' + tries.map(function (a) {
11510
- return opts.arrow + a;
11511
- }).join('\n'));
11512
- err.tries = tries;
11513
- throw err;
11514
- }
11515
- module.exports = exports = bindings;
11608
+ module.exports = exports = bindings;
11516
11609
 
11517
- /**
11518
- * Gets the filename of the JavaScript file that invokes this function.
11519
- * Used to help find the root directory of a module.
11520
- * Optionally accepts an filename argument to skip when searching for the invoking filename
11521
- */
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
+ */
11522
11615
 
11523
- exports.getFileName = function getFileName(calling_file) {
11524
- var origPST = Error.prepareStackTrace,
11525
- origSTL = Error.stackTraceLimit,
11526
- dummy = {},
11527
- fileName;
11528
- Error.stackTraceLimit = 10;
11529
- Error.prepareStackTrace = function (e, st) {
11530
- for (var i = 0, l = st.length; i < l; i++) {
11531
- fileName = st[i].getFileName();
11532
- if (fileName !== __filename) {
11533
- if (calling_file) {
11534
- 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 {
11535
11631
  return;
11536
11632
  }
11537
- } else {
11538
- return;
11539
11633
  }
11540
11634
  }
11541
- }
11542
- };
11635
+ };
11543
11636
 
11544
- // run the 'prepareStackTrace' function above
11545
- Error.captureStackTrace(dummy);
11546
- dummy.stack;
11637
+ // run the 'prepareStackTrace' function above
11638
+ Error.captureStackTrace(dummy);
11639
+ dummy.stack;
11547
11640
 
11548
- // cleanup
11549
- Error.prepareStackTrace = origPST;
11550
- Error.stackTraceLimit = origSTL;
11641
+ // cleanup
11642
+ Error.prepareStackTrace = origPST;
11643
+ Error.stackTraceLimit = origSTL;
11551
11644
 
11552
- // handle filename that starts with "file://"
11553
- var fileSchema = 'file://';
11554
- if (fileName.indexOf(fileSchema) === 0) {
11555
- fileName = fileURLToPath(fileName);
11556
- }
11557
- return fileName;
11558
- };
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
+ };
11559
11652
 
11560
- /**
11561
- * Gets the root directory of a module, given an arbitrary filename
11562
- * somewhere in the module tree. The "root directory" is the directory
11563
- * containing the `package.json` file.
11564
- *
11565
- * In: /home/nate/node-native-module/lib/index.js
11566
- * Out: /home/nate/node-native-module
11567
- */
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
+ */
11568
11661
 
11569
- exports.getRoot = function getRoot(file) {
11570
- var dir = dirname(file),
11571
- prev;
11572
- while (true) {
11573
- if (dir === '.') {
11574
- // Avoids an infinite loop in rare cases, like the REPL
11575
- dir = process.cwd();
11576
- }
11577
- if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
11578
- // Found the 'package.json' file or 'node_modules' dir; we're done
11579
- return dir;
11580
- }
11581
- if (prev === dir) {
11582
- // Got to the top
11583
- 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, '..');
11584
11681
  }
11585
- // Try the parent dir next
11586
- prev = dir;
11587
- dir = join(dir, '..');
11588
- }
11589
- };
11590
- })(bindings, bindings.exports);
11591
- var bindingsExports = bindings.exports;
11682
+ };
11683
+ })(bindings, bindings.exports);
11684
+ return bindings.exports;
11685
+ }
11592
11686
 
11593
- 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
+ }
11594
11695
 
11595
11696
  var trace = {};
11596
11697
 
@@ -11634,177 +11735,184 @@ function requireTrace() {
11634
11735
  return trace;
11635
11736
  }
11636
11737
 
11637
- (function (module, exports) {
11638
- const path$1 = path;
11639
- const sqlite3 = sqlite3Binding;
11640
- const EventEmitter = require$$2.EventEmitter;
11641
- module.exports = sqlite3;
11642
- function normalizeMethod(fn) {
11643
- return function (sql) {
11644
- let errBack;
11645
- const args = Array.prototype.slice.call(arguments, 1);
11646
- if (typeof args[args.length - 1] === 'function') {
11647
- const callback = args[args.length - 1];
11648
- errBack = function (err) {
11649
- if (err) {
11650
- callback(err);
11651
- }
11652
- };
11653
- }
11654
- const statement = new Statement(this, sql, errBack);
11655
- return fn.call(this, statement, args);
11656
- };
11657
- }
11658
- function inherits(target, source) {
11659
- for (const k in source.prototype) target.prototype[k] = source.prototype[k];
11660
- }
11661
- sqlite3.cached = {
11662
- Database: function (file, a, b) {
11663
- if (file === '' || file === ':memory:') {
11664
- // Don't cache special databases.
11665
- return new Database(file, a, b);
11666
- }
11667
- let db;
11668
- file = path$1.resolve(file);
11669
- if (!sqlite3.cached.objects[file]) {
11670
- db = sqlite3.cached.objects[file] = new Database(file, a, b);
11671
- } else {
11672
- // Make sure the callback is called.
11673
- db = sqlite3.cached.objects[file];
11674
- const callback = typeof a === 'number' ? b : a;
11675
- if (typeof callback === 'function') {
11676
- function cb() {
11677
- 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);
11678
11785
  }
11679
- if (db.open) process.nextTick(cb);else db.once('open', cb);
11680
11786
  }
11681
- }
11682
- return db;
11683
- },
11684
- objects: {}
11685
- };
11686
- const Database = sqlite3.Database;
11687
- const Statement = sqlite3.Statement;
11688
- const Backup = sqlite3.Backup;
11689
- inherits(Database, EventEmitter);
11690
- inherits(Statement, EventEmitter);
11691
- inherits(Backup, EventEmitter);
11692
-
11693
- // Database#prepare(sql, [bind1, bind2, ...], [callback])
11694
- Database.prototype.prepare = normalizeMethod(function (statement, params) {
11695
- return params.length ? statement.bind.apply(statement, params) : statement;
11696
- });
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
+ });
11697
11802
 
11698
- // Database#run(sql, [bind1, bind2, ...], [callback])
11699
- Database.prototype.run = normalizeMethod(function (statement, params) {
11700
- statement.run.apply(statement, params).finalize();
11701
- return this;
11702
- });
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
+ });
11703
11808
 
11704
- // Database#get(sql, [bind1, bind2, ...], [callback])
11705
- Database.prototype.get = normalizeMethod(function (statement, params) {
11706
- statement.get.apply(statement, params).finalize();
11707
- return this;
11708
- });
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
+ });
11709
11814
 
11710
- // Database#all(sql, [bind1, bind2, ...], [callback])
11711
- Database.prototype.all = normalizeMethod(function (statement, params) {
11712
- statement.all.apply(statement, params).finalize();
11713
- return this;
11714
- });
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
+ });
11715
11820
 
11716
- // Database#each(sql, [bind1, bind2, ...], [callback], [complete])
11717
- Database.prototype.each = normalizeMethod(function (statement, params) {
11718
- statement.each.apply(statement, params).finalize();
11719
- return this;
11720
- });
11721
- Database.prototype.map = normalizeMethod(function (statement, params) {
11722
- statement.map.apply(statement, params).finalize();
11723
- return this;
11724
- });
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
+ });
11725
11830
 
11726
- // Database#backup(filename, [callback])
11727
- // Database#backup(filename, destName, sourceName, filenameIsDest, [callback])
11728
- Database.prototype.backup = function () {
11729
- let backup;
11730
- if (arguments.length <= 2) {
11731
- // By default, we write the main database out to the main database of the named file.
11732
- // This is the most likely use of the backup api.
11733
- backup = new Backup(this, arguments[0], 'main', 'main', true, arguments[1]);
11734
- } else {
11735
- // Otherwise, give the user full control over the sqlite3_backup_init arguments.
11736
- backup = new Backup(this, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
11737
- }
11738
- // Per the sqlite docs, exclude the following errors as non-fatal by default.
11739
- backup.retryErrors = [sqlite3.BUSY, sqlite3.LOCKED];
11740
- return backup;
11741
- };
11742
- Statement.prototype.map = function () {
11743
- const params = Array.prototype.slice.call(arguments);
11744
- const callback = params.pop();
11745
- params.push(function (err, rows) {
11746
- if (err) return callback(err);
11747
- const result = {};
11748
- if (rows.length) {
11749
- const keys = Object.keys(rows[0]);
11750
- const key = keys[0];
11751
- if (keys.length > 2) {
11752
- // Value is an object
11753
- for (let i = 0; i < rows.length; i++) {
11754
- result[rows[i][key]] = rows[i];
11755
- }
11756
- } else {
11757
- const value = keys[1];
11758
- // Value is a plain value
11759
- for (let i = 0; i < rows.length; i++) {
11760
- 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
+ }
11761
11867
  }
11762
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);
11763
11886
  }
11764
- callback(err, result);
11765
- });
11766
- return this.all.apply(this, params);
11767
- };
11768
- let isVerbose = false;
11769
- const supportedEvents = ['trace', 'profile', 'change'];
11770
- Database.prototype.addListener = Database.prototype.on = function (type) {
11771
- const val = EventEmitter.prototype.addListener.apply(this, arguments);
11772
- if (supportedEvents.indexOf(type) >= 0) {
11773
- this.configure(type, true);
11774
- }
11775
- return val;
11776
- };
11777
- Database.prototype.removeListener = function (type) {
11778
- const val = EventEmitter.prototype.removeListener.apply(this, arguments);
11779
- if (supportedEvents.indexOf(type) >= 0 && !this._events[type]) {
11780
- this.configure(type, false);
11781
- }
11782
- return val;
11783
- };
11784
- Database.prototype.removeAllListeners = function (type) {
11785
- const val = EventEmitter.prototype.removeAllListeners.apply(this, arguments);
11786
- if (supportedEvents.indexOf(type) >= 0) {
11787
- this.configure(type, false);
11788
- }
11789
- return val;
11790
- };
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
+ };
11791
11896
 
11792
- // Save the stack trace over EIO callbacks.
11793
- sqlite3.verbose = function () {
11794
- if (!isVerbose) {
11795
- const trace = requireTrace();
11796
- ['prepare', 'get', 'run', 'all', 'each', 'map', 'close', 'exec'].forEach(function (name) {
11797
- trace.extendTrace(Database.prototype, name);
11798
- });
11799
- ['bind', 'get', 'run', 'all', 'each', 'map', 'reset', 'finalize'].forEach(function (name) {
11800
- trace.extendTrace(Statement.prototype, name);
11801
- });
11802
- isVerbose = true;
11803
- }
11804
- return sqlite3;
11805
- };
11806
- })(sqlite3$1);
11807
- 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();
11808
11916
  var sqlite3 = /*@__PURE__*/getDefaultExportFromCjs(sqlite3Exports);
11809
11917
 
11810
11918
  function SQLiteResult(error, insertId, rowsAffected, rows) {